Skip to content

Commit ecbe5ac

Browse files
authored
refactor: move and rename files (#459)
1 parent 5455abd commit ecbe5ac

30 files changed

+73
-80
lines changed
File renamed without changes.
File renamed without changes.

src/commands/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import os from "node:os";
33
import path from "node:path";
44
import fs from "node:fs/promises";
55
import { existsSync } from "node:fs";
6+
import { spawn } from "node:child_process";
67

78
// Import Third-party Dependencies
89
import * as RC from "@nodesecure/rc";
910
import kleur from "kleur";
10-
import { spawn } from "node:child_process";
1111

1212
const K_HOME_PATH = path.join(os.homedir(), "nodesecure");
1313

src/commands/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as i18n from "@nodesecure/i18n";
1010

1111
// Import Internal Dependencies
1212
import { buildServer } from "../http-server/index.js";
13-
import { appCache } from "../http-server/cache.js";
13+
import { appCache } from "../cache.js";
1414

1515
// CONSTANTS
1616
const kRequiredScannerRange = ">=5.1.0";

src/commands/scanner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as Scanner from "@nodesecure/scanner";
1313

1414
// Import Internal Dependencies
1515
import * as http from "./http.js";
16-
import { appCache } from "../http-server/cache.js";
16+
import { appCache } from "../cache.js";
1717

1818
export async function auto(spec, options) {
1919
const { keep, ...commandOptions } = options;

src/commands/scorecard.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import kleur from "kleur";
77
import * as scorecard from "@nodesecure/ossf-scorecard-sdk";
88
import ini from "ini";
99
import { Ok, Err } from "@openally/result";
10+
1011
// VARS
1112
const { yellow, grey, cyan, white } = kleur;
1213

src/http-server/ViewBuilder.class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import chokidar from "chokidar";
1010
import { globStream } from "glob";
1111

1212
// Import Internal Dependencies
13-
import { logger } from "./logger.js";
13+
import { logger } from "../logger.js";
1414

1515
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1616
const kProjectRootDir = path.join(__dirname, "..", "..");

src/http-server/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Import Internal Dependencies
2-
import { appCache } from "./cache.js";
3-
import { logger } from "./logger.js";
2+
import { appCache } from "../cache.js";
3+
import { logger } from "../logger.js";
44

55
// CONSTANTS
66
const kDefaultConfig = {

src/http-server/endpoints/bundle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Import Third-party Dependencikes
2-
import { get as getRequest } from "@myunisoft/httpie";
2+
import * as httpie from "@myunisoft/httpie";
33
import send from "@polka/send-type";
44

55
// CONSTANTS
@@ -10,7 +10,7 @@ export async function get(req, res) {
1010

1111
const pkgTemplate = version ? `${pkgName.replaceAll("%2F", "/")}@${version}` : pkgName;
1212
try {
13-
const { data } = await getRequest(`${kBaseBundlePhobiaUrl}/size?package=${pkgTemplate}`);
13+
const { data } = await httpie.get(`${kBaseBundlePhobiaUrl}/size?package=${pkgTemplate}`);
1414
const { gzip, size, dependencySizes } = data;
1515

1616
return send(res, 200, {

src/http-server/endpoints/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import send from "@polka/send-type";
33

44
// Import Internal Dependencies
55
import * as config from "../config.js";
6-
import { bodyParser } from "../bodyParser.js";
6+
import { bodyParser } from "../middlewares/bodyParser.js";
77

88
export async function get(_req, res) {
99
const result = await config.get();

0 commit comments

Comments
 (0)