arkos 1.2.19-test → 1.2.20-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,8 +10,6 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
10
10
|
const dev_1 = require("../dev");
|
|
11
11
|
const start_1 = require("../start");
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
|
-
const url_1 = require("url");
|
|
14
|
-
const path_2 = require("path");
|
|
15
13
|
function ensureDirectoryExists(dirPath) {
|
|
16
14
|
if (!fs_1.default.existsSync(dirPath)) {
|
|
17
15
|
fs_1.default.mkdirSync(dirPath, { recursive: true });
|
|
@@ -22,14 +20,8 @@ function killServerChildProcess() {
|
|
|
22
20
|
(0, start_1.killProductionServerChildProcess)();
|
|
23
21
|
}
|
|
24
22
|
function getVersion() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
currentDir = __dirname;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
currentDir = (0, path_2.dirname)((0, url_1.fileURLToPath)(import.meta.url));
|
|
31
|
-
}
|
|
32
|
-
const packageJson = JSON.parse(fs_1.default.readFileSync(path_1.default.join(currentDir, "../../../../../package.json"), "utf8") || "{}");
|
|
23
|
+
const packageJsonPath = path_1.default.resolve(__dirname || process.cwd(), "../../../../../package.json");
|
|
24
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, "utf8") || "{}");
|
|
33
25
|
return packageJson?.version || "1.0.0";
|
|
34
26
|
}
|
|
35
27
|
//# sourceMappingURL=cli.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.helpers.js","sourceRoot":"","sources":["../../../../../src/utils/cli/utils/cli.helpers.ts"],"names":[],"mappings":";;;;;AAOA,sDAIC;AAED,wDAGC;
|
|
1
|
+
{"version":3,"file":"cli.helpers.js","sourceRoot":"","sources":["../../../../../src/utils/cli/utils/cli.helpers.ts"],"names":[],"mappings":";;;;;AAOA,sDAIC;AAED,wDAGC;AAsBD,gCAWC;AAjDD,4CAAoB;AACpB,gCAA2D;AAC3D,oCAA4D;AAC5D,gDAAwB;AAIxB,SAAgB,qBAAqB,CAAC,OAAe;IACnD,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,SAAgB,sBAAsB;IACpC,IAAA,uCAAiC,GAAE,CAAC;IACpC,IAAA,wCAAgC,GAAE,CAAC;AACrC,CAAC;AAsBD,SAAgB,UAAU;IAExB,MAAM,eAAe,GAAG,cAAI,CAAC,OAAO,CAClC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,EAC1B,6BAA6B,CAC9B,CAAC;IAEF,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,IAAI,CACjD,CAAC;IACF,OAAO,WAAW,EAAE,OAAO,IAAI,OAAO,CAAC;AACzC,CAAC","sourcesContent":["import fs from \"fs\";\nimport { killDevelopmentServerChildProcess } from \"../dev\";\nimport { killProductionServerChildProcess } from \"../start\";\nimport path from \"path\";\n// import { fileURLToPath } from \"url\";\n// import { dirname } from \"path\";\n\nexport function ensureDirectoryExists(dirPath: string): void {\n if (!fs.existsSync(dirPath)) {\n fs.mkdirSync(dirPath, { recursive: true });\n }\n}\n\nexport function killServerChildProcess() {\n killDevelopmentServerChildProcess();\n killProductionServerChildProcess();\n}\n\n// export function getVersion() {\n// let currentDir: string;\n// // @ts-ignore\n// if (typeof __dirname !== \"undefined\") {\n// // @ts-ignore\n// currentDir = __dirname;\n// } else {\n// // @ts-ignore\n// currentDir = dirname(fileURLToPath((import.meta as any).url));\n// }\n\n// const packageJson = JSON.parse(\n// fs.readFileSync(\n// path.join(currentDir, \"../../../../../package.json\"),\n// \"utf8\"\n// ) || \"{}\"\n// );\n// return packageJson?.version || \"1.0.0\";\n// }\n\nexport function getVersion() {\n // Just use process.cwd() or a relative path that works from the compiled location\n const packageJsonPath = path.resolve(\n __dirname || process.cwd(),\n \"../../../../../package.json\"\n );\n\n const packageJson = JSON.parse(\n fs.readFileSync(packageJsonPath, \"utf8\") || \"{}\"\n );\n return packageJson?.version || \"1.0.0\";\n}\n"]}
|
|
@@ -2,8 +2,6 @@ import fs from "fs";
|
|
|
2
2
|
import { killDevelopmentServerChildProcess } from "../dev";
|
|
3
3
|
import { killProductionServerChildProcess } from "../start";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { fileURLToPath } from "url";
|
|
6
|
-
import { dirname } from "path";
|
|
7
5
|
export function ensureDirectoryExists(dirPath) {
|
|
8
6
|
if (!fs.existsSync(dirPath)) {
|
|
9
7
|
fs.mkdirSync(dirPath, { recursive: true });
|
|
@@ -14,14 +12,8 @@ export function killServerChildProcess() {
|
|
|
14
12
|
killProductionServerChildProcess();
|
|
15
13
|
}
|
|
16
14
|
export function getVersion() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
currentDir = __dirname;
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
currentDir = dirname(fileURLToPath(import.meta.url));
|
|
23
|
-
}
|
|
24
|
-
const packageJson = JSON.parse(fs.readFileSync(path.join(currentDir, "../../../../../package.json"), "utf8") || "{}");
|
|
15
|
+
const packageJsonPath = path.resolve(__dirname || process.cwd(), "../../../../../package.json");
|
|
16
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8") || "{}");
|
|
25
17
|
return packageJson?.version || "1.0.0";
|
|
26
18
|
}
|
|
27
19
|
//# sourceMappingURL=cli.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.helpers.js","sourceRoot":"","sources":["../../../../../src/utils/cli/utils/cli.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,iCAAiC,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.helpers.js","sourceRoot":"","sources":["../../../../../src/utils/cli/utils/cli.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,iCAAiC,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,iCAAiC,EAAE,CAAC;IACpC,gCAAgC,EAAE,CAAC;AACrC,CAAC;AAsBD,MAAM,UAAU,UAAU;IAExB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAClC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,EAC1B,6BAA6B,CAC9B,CAAC;IAEF,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,IAAI,CACjD,CAAC;IACF,OAAO,WAAW,EAAE,OAAO,IAAI,OAAO,CAAC;AACzC,CAAC","sourcesContent":["import fs from \"fs\";\nimport { killDevelopmentServerChildProcess } from \"../dev\";\nimport { killProductionServerChildProcess } from \"../start\";\nimport path from \"path\";\n// import { fileURLToPath } from \"url\";\n// import { dirname } from \"path\";\n\nexport function ensureDirectoryExists(dirPath: string): void {\n if (!fs.existsSync(dirPath)) {\n fs.mkdirSync(dirPath, { recursive: true });\n }\n}\n\nexport function killServerChildProcess() {\n killDevelopmentServerChildProcess();\n killProductionServerChildProcess();\n}\n\n// export function getVersion() {\n// let currentDir: string;\n// // @ts-ignore\n// if (typeof __dirname !== \"undefined\") {\n// // @ts-ignore\n// currentDir = __dirname;\n// } else {\n// // @ts-ignore\n// currentDir = dirname(fileURLToPath((import.meta as any).url));\n// }\n\n// const packageJson = JSON.parse(\n// fs.readFileSync(\n// path.join(currentDir, \"../../../../../package.json\"),\n// \"utf8\"\n// ) || \"{}\"\n// );\n// return packageJson?.version || \"1.0.0\";\n// }\n\nexport function getVersion() {\n // Just use process.cwd() or a relative path that works from the compiled location\n const packageJsonPath = path.resolve(\n __dirname || process.cwd(),\n \"../../../../../package.json\"\n );\n\n const packageJson = JSON.parse(\n fs.readFileSync(packageJsonPath, \"utf8\") || \"{}\"\n );\n return packageJson?.version || \"1.0.0\";\n}\n"]}
|