@interopio/iocd-cli 0.0.47 → 0.0.49
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.
- package/README.md +28 -15
- package/dist/commands/apps.command.js +20 -21
- package/dist/commands/apps.command.js.map +1 -1
- package/dist/commands/build.command.js +5 -5
- package/dist/commands/build.command.js.map +1 -1
- package/dist/commands/components.command.js +19 -20
- package/dist/commands/components.command.js.map +1 -1
- package/dist/commands/create.command.js +18 -14
- package/dist/commands/create.command.js.map +1 -1
- package/dist/commands/dev.command.js +2 -2
- package/dist/commands/license.command.js +11 -10
- package/dist/commands/license.command.js.map +1 -1
- package/dist/commands/modifications.command.js +3 -4
- package/dist/commands/modifications.command.js.map +1 -1
- package/dist/commands/setup.command.js +4 -4
- package/dist/commands/setup.command.js.map +1 -1
- package/dist/commands/test.command.js +2 -2
- package/dist/commands/test.command.js.map +1 -1
- package/dist/schemas/iocd.cli.config.schema.json +6 -7
- package/dist/services/app.service.js +29 -29
- package/dist/services/app.service.js.map +1 -1
- package/dist/services/components/components.registry.js +6 -6
- package/dist/services/components/components.registry.js.map +1 -1
- package/dist/services/components/platform.utils.js +9 -10
- package/dist/services/components/platform.utils.js.map +1 -1
- package/dist/services/components/stores/s3.store.js +1 -1
- package/dist/services/components/stores/s3.store.js.map +1 -1
- package/dist/services/config/config.service.js +28 -12
- package/dist/services/config/config.service.js.map +1 -1
- package/dist/services/create.service.js +146 -67
- package/dist/services/create.service.js.map +1 -1
- package/dist/services/dev.service.js +11 -11
- package/dist/services/dev.service.js.map +1 -1
- package/dist/services/installer/prerequisites.js +3 -3
- package/dist/services/installer/prerequisites.js.map +1 -1
- package/dist/services/installer/windows.helper.js +17 -14
- package/dist/services/installer/windows.helper.js.map +1 -1
- package/dist/services/license-file.service.js +1 -1
- package/dist/services/license-file.service.js.map +1 -1
- package/dist/services/license.service.js +18 -17
- package/dist/services/license.service.js.map +1 -1
- package/dist/services/modifications/modifications.service.js +49 -18
- package/dist/services/modifications/modifications.service.js.map +1 -1
- package/dist/services/template.service.js +72 -59
- package/dist/services/template.service.js.map +1 -1
- package/dist/services/test.service.js +4 -4
- package/dist/services/test.service.js.map +1 -1
- package/dist/templates/ioconnect-desktop/README.md +28 -15
- package/dist/templates/ioconnect-desktop/config/iocd.cli.config.json +0 -3
- package/dist/templates/ioconnect-desktop/modifications/base/iocd/config/system.json.merge +2 -1
- package/dist/templates/ioconnect-desktop/package.json +2 -2
- package/dist/templates/tests/tests/package-lock.json +5 -11
- package/dist/templates/tests/tests/package.json +2 -6
- package/dist/templates/tests/tests/tests/sample.spec.ts +65 -22
- package/dist/templates/tests/tests/tsconfig.json +10 -10
- package/dist/templates/tests/tests/wdio.config.ts +29 -26
- package/dist/utils/colors.js +31 -31
- package/dist/utils/colors.js.map +1 -1
- package/dist/utils/deep.merge.js +3 -3
- package/dist/utils/deep.merge.js.map +1 -1
- package/dist/utils/electron.builder.config.helper.js +2 -2
- package/dist/utils/ensure.iocd.exists.js +5 -7
- package/dist/utils/ensure.iocd.exists.js.map +1 -1
- package/dist/utils/error.handler.js +23 -20
- package/dist/utils/error.handler.js.map +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/logger.js +17 -15
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/pacakge.json.helper.js +48 -2
- package/dist/utils/pacakge.json.helper.js.map +1 -1
- package/dist/utils/path.js +23 -23
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/sentry.js +15 -5
- package/dist/utils/sentry.js.map +1 -1
- package/dist/utils/version.js +2 -2
- package/package.json +5 -5
- package/dist/templates/launchpad/apps/launchpad/.eslintrc.json +0 -3
|
@@ -39,7 +39,8 @@ const file_1 = require("./file");
|
|
|
39
39
|
const fs_1 = require("fs");
|
|
40
40
|
const find_package_dir_1 = require("./find.package.dir");
|
|
41
41
|
class PackageJSONHelper {
|
|
42
|
-
static packageJsonPath = path_1.default.resolve(
|
|
42
|
+
static packageJsonPath = path_1.default.resolve("package.json");
|
|
43
|
+
static cachedPackageJson = null;
|
|
43
44
|
/** Returns the package.json of the CLI */
|
|
44
45
|
static getCliPackageJson() {
|
|
45
46
|
const path = (0, path_1.join)((0, find_package_dir_1.findPackageRoot)(), "package.json");
|
|
@@ -48,17 +49,62 @@ class PackageJSONHelper {
|
|
|
48
49
|
}
|
|
49
50
|
return {};
|
|
50
51
|
}
|
|
51
|
-
/** Returns the package.json of the project that runs the CLI. Sometimes this might be undefined if we use npx
|
|
52
|
+
/** Returns the package.json of the project that runs the CLI. Sometimes this might be undefined if we use npx.
|
|
53
|
+
* The result is cached after the first read. */
|
|
52
54
|
static getPackageJson() {
|
|
55
|
+
// Return cached value if already loaded (null means we checked but file doesn't exist)
|
|
56
|
+
if (this.cachedPackageJson !== null) {
|
|
57
|
+
return this.cachedPackageJson;
|
|
58
|
+
}
|
|
53
59
|
if (!(0, fs_1.existsSync)(this.packageJsonPath)) {
|
|
60
|
+
this.cachedPackageJson = undefined;
|
|
54
61
|
return undefined;
|
|
55
62
|
}
|
|
56
63
|
const packageJson = file_1.FileUtils.readJson(this.packageJsonPath);
|
|
57
64
|
if (!packageJson) {
|
|
65
|
+
this.cachedPackageJson = undefined;
|
|
58
66
|
return undefined;
|
|
59
67
|
}
|
|
68
|
+
this.cachedPackageJson = packageJson;
|
|
60
69
|
return packageJson;
|
|
61
70
|
}
|
|
71
|
+
/** Clears the cached package.json, forcing a re-read on next access */
|
|
72
|
+
static clearCache() {
|
|
73
|
+
this.cachedPackageJson = null;
|
|
74
|
+
}
|
|
75
|
+
/** Extracts the product slug from package.json 'name' field */
|
|
76
|
+
static getProductSlug() {
|
|
77
|
+
return this.getPackageJson()?.name;
|
|
78
|
+
}
|
|
79
|
+
/** Extracts the version from package.json */
|
|
80
|
+
static getVersion() {
|
|
81
|
+
return this.getPackageJson()?.version;
|
|
82
|
+
}
|
|
83
|
+
/** Extracts the product name from package.json 'productName' field */
|
|
84
|
+
static getProductName() {
|
|
85
|
+
return this.getPackageJson()?.productName;
|
|
86
|
+
}
|
|
87
|
+
/** Extracts the product description from package.json 'description' field */
|
|
88
|
+
static getProductDescription() {
|
|
89
|
+
return this.getPackageJson()?.description;
|
|
90
|
+
}
|
|
91
|
+
/** Extracts the company/author from package.json 'author' field.
|
|
92
|
+
* Handles both string format ("Company Name") and object format ({ name: "Company Name" }) */
|
|
93
|
+
static getCompany() {
|
|
94
|
+
const author = this.getPackageJson()?.author;
|
|
95
|
+
if (!author)
|
|
96
|
+
return undefined;
|
|
97
|
+
if (typeof author === "string")
|
|
98
|
+
return author;
|
|
99
|
+
if (typeof author === "object" && author.name)
|
|
100
|
+
return author.name;
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
/** Generates a copyright string based on the current year and company name */
|
|
104
|
+
static generateCopyright(company) {
|
|
105
|
+
const year = new Date().getFullYear();
|
|
106
|
+
return `Copyright © ${year} ${company}. All rights reserved.`;
|
|
107
|
+
}
|
|
62
108
|
}
|
|
63
109
|
exports.PackageJSONHelper = PackageJSONHelper;
|
|
64
110
|
//# sourceMappingURL=pacakge.json.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pacakge.json.helper.js","sourceRoot":"","sources":["../../src/utils/pacakge.json.helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAkC;AAClC,iCAAmC;AACnC,2BAAgC;AAChC,yDAAqD;
|
|
1
|
+
{"version":3,"file":"pacakge.json.helper.js","sourceRoot":"","sources":["../../src/utils/pacakge.json.helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAkC;AAClC,iCAAmC;AACnC,2BAAgC;AAChC,yDAAqD;AAarD,MAAa,iBAAiB;IACpB,MAAM,CAAC,eAAe,GAAG,cAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACtD,MAAM,CAAC,iBAAiB,GAC9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O,IAAI,CAAC,cAAc,EAAE,EAAE,WAAW,CAAC;IAC5C,CAAC;IAED,6EAA6E;IAC7E,MAAM,CAAC,qBAAqB;QAC1B,OAAO,IAAI,CAAC,cAAc,EAAE,EAAE,WAAW,CAAC;IAC5C,CAAC;IAED;kGAC8F;IAC9F,MAAM,CAAC,UAAU;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,EAAE,MAAM,CAAC;QAC7C,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC;QAC9C,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI;YAAE,OAAO,MAAM,CAAC,IAAI,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,8EAA8E;IAC9E,MAAM,CAAC,iBAAiB,CAAC,OAAe;QACtC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACtC,OAAO,eAAe,IAAI,IAAI,OAAO,wBAAwB,CAAC;IAChE,CAAC;;AA5EH,8CA6EC"}
|
package/dist/utils/path.js
CHANGED
|
@@ -9,34 +9,34 @@ const config_service_1 = require("../services/config/config.service");
|
|
|
9
9
|
class PathUtils {
|
|
10
10
|
/** Returns the root directory path of the project (not the cli) */
|
|
11
11
|
static getRootDir() {
|
|
12
|
-
return path_1.default.resolve(
|
|
12
|
+
return path_1.default.resolve(".");
|
|
13
13
|
}
|
|
14
14
|
static getAppsDir() {
|
|
15
|
-
return path_1.default.join(this.getRootDir(),
|
|
15
|
+
return path_1.default.join(this.getRootDir(), "apps");
|
|
16
16
|
}
|
|
17
17
|
static getComponentsDir() {
|
|
18
|
-
return path_1.default.join(this.getRootDir(),
|
|
18
|
+
return path_1.default.join(this.getRootDir(), "components");
|
|
19
19
|
}
|
|
20
20
|
static getModificationsDir() {
|
|
21
|
-
return path_1.default.join(this.getRootDir(),
|
|
21
|
+
return path_1.default.join(this.getRootDir(), "modifications");
|
|
22
22
|
}
|
|
23
23
|
static getDistDir() {
|
|
24
|
-
return path_1.default.join(this.getRootDir(),
|
|
24
|
+
return path_1.default.join(this.getRootDir(), "dist");
|
|
25
25
|
}
|
|
26
26
|
static getConfigDir() {
|
|
27
|
-
return path_1.default.join(this.getRootDir(),
|
|
27
|
+
return path_1.default.join(this.getRootDir(), "config");
|
|
28
28
|
}
|
|
29
29
|
/** Returns the path to the main CLI configuration file */
|
|
30
30
|
static getCliConfigPath() {
|
|
31
|
-
return path_1.default.join(this.getConfigDir(),
|
|
31
|
+
return path_1.default.join(this.getConfigDir(), "iocd.cli.config.json");
|
|
32
32
|
}
|
|
33
33
|
/** Returns the path to the forge configuration file */
|
|
34
34
|
static getForgeConfigPath() {
|
|
35
|
-
return path_1.default.join(this.getConfigDir(),
|
|
35
|
+
return path_1.default.join(this.getConfigDir(), "forge.config.js");
|
|
36
36
|
}
|
|
37
37
|
/** Returns the path to the license file */
|
|
38
38
|
static getLicensePath() {
|
|
39
|
-
return path_1.default.join(this.getConfigDir(),
|
|
39
|
+
return path_1.default.join(this.getConfigDir(), "iocd.license.key");
|
|
40
40
|
}
|
|
41
41
|
static getComponentDir(componentName) {
|
|
42
42
|
return path_1.default.join(this.getComponentsDir(), componentName);
|
|
@@ -46,38 +46,38 @@ class PathUtils {
|
|
|
46
46
|
}
|
|
47
47
|
/** On iocd root dir. Note that on mac os this is Contents inside the app bundle (and not the app bundle itself) */
|
|
48
48
|
static getIOCDDir() {
|
|
49
|
-
const iocdDir = this.getComponentDir(
|
|
50
|
-
if (process.platform ===
|
|
51
|
-
return path_1.default.join(iocdDir, config_service_1.ConfigManager.config.mac.appBundleName,
|
|
49
|
+
const iocdDir = this.getComponentDir("iocd");
|
|
50
|
+
if (process.platform === "darwin") {
|
|
51
|
+
return path_1.default.join(iocdDir, config_service_1.ConfigManager.config.mac.appBundleName, "Contents");
|
|
52
52
|
}
|
|
53
53
|
return iocdDir;
|
|
54
54
|
}
|
|
55
55
|
static getIOCDResourcesDir() {
|
|
56
56
|
const iocdDir = this.getIOCDDir();
|
|
57
57
|
let resourcesPath;
|
|
58
|
-
if (process.platform ===
|
|
58
|
+
if (process.platform === "darwin") {
|
|
59
59
|
// macOS: .app/Contents/Resources/metadata.json
|
|
60
|
-
resourcesPath = path_1.default.join(iocdDir,
|
|
60
|
+
resourcesPath = path_1.default.join(iocdDir, "Resources");
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
// Windows/Linux: resources/metadata.json
|
|
64
|
-
resourcesPath = path_1.default.join(iocdDir,
|
|
64
|
+
resourcesPath = path_1.default.join(iocdDir, "resources");
|
|
65
65
|
}
|
|
66
66
|
return resourcesPath;
|
|
67
67
|
}
|
|
68
68
|
static getIOCDAssetsDir() {
|
|
69
|
-
return path_1.default.join(this.getIOCDDir(),
|
|
69
|
+
return path_1.default.join(this.getIOCDDir(), "assets");
|
|
70
70
|
}
|
|
71
71
|
static getIOCDConfigDir() {
|
|
72
|
-
return path_1.default.join(this.getIOCDDir(),
|
|
72
|
+
return path_1.default.join(this.getIOCDDir(), "config");
|
|
73
73
|
}
|
|
74
74
|
static getIOCDExePath() {
|
|
75
75
|
const iocdDir = this.getIOCDDir();
|
|
76
|
-
if (process.platform ===
|
|
77
|
-
const exeName = config_service_1.ConfigManager.config.mac.appBundleName.replace(
|
|
78
|
-
return path_1.default.join(iocdDir,
|
|
76
|
+
if (process.platform === "darwin") {
|
|
77
|
+
const exeName = config_service_1.ConfigManager.config.mac.appBundleName.replace(".app", "");
|
|
78
|
+
return path_1.default.join(iocdDir, "MacOS", exeName);
|
|
79
79
|
}
|
|
80
|
-
else if (process.platform ===
|
|
80
|
+
else if (process.platform === "win32") {
|
|
81
81
|
return path_1.default.join(iocdDir, config_service_1.ConfigManager.config.win.exe.exeName);
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
@@ -86,8 +86,8 @@ class PathUtils {
|
|
|
86
86
|
}
|
|
87
87
|
/** MacOS only - gets the path to the .app bundle */
|
|
88
88
|
static getIOCDAppBundlePath() {
|
|
89
|
-
if (process.platform ===
|
|
90
|
-
return path_1.default.join(this.getComponentDir(
|
|
89
|
+
if (process.platform === "darwin") {
|
|
90
|
+
return path_1.default.join(this.getComponentDir("iocd"), config_service_1.ConfigManager.config.mac.appBundleName);
|
|
91
91
|
}
|
|
92
92
|
throw new Error(`Unsupported platform (${process.platform})`);
|
|
93
93
|
}
|
package/dist/utils/path.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,sEAAkE;AAElE,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,sEAAkE;AAElE,MAAa,SAAS;IACpB,mEAAmE;IACnE,MAAM,CAAC,UAAU;QACf,OAAO,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,gBAAgB;QACrB,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,YAAY,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,mBAAmB;QACxB,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,YAAY;QACjB,OAAO,cAAI,CAAC,IAAI,CAAC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AO,cAAI,CAAC,IAAI,CACd,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAC5B,8BAAa,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CACvC,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IAChE,CAAC;CACF;AA5GD,8BA4GC"}
|
package/dist/utils/sentry.js
CHANGED
|
@@ -43,7 +43,7 @@ Sentry.init({
|
|
|
43
43
|
sendDefaultPii: true,
|
|
44
44
|
enableLogs: true,
|
|
45
45
|
// Set environment based on NODE_ENV or default to 'development'
|
|
46
|
-
environment: process.env[
|
|
46
|
+
environment: process.env["NODE_ENV"] || "development",
|
|
47
47
|
// Add release information
|
|
48
48
|
release: cliPackageJSON?.version,
|
|
49
49
|
// Sample rate for performance monitoring (0.0 to 1.0)
|
|
@@ -61,9 +61,19 @@ const finishOk = async (status = "ok") => {
|
|
|
61
61
|
await Sentry.flush(100).catch(() => { });
|
|
62
62
|
};
|
|
63
63
|
// Clean exits
|
|
64
|
-
process.once("beforeExit", () => {
|
|
65
|
-
|
|
64
|
+
process.once("beforeExit", () => {
|
|
65
|
+
finishOk("ok");
|
|
66
|
+
});
|
|
67
|
+
process.once("exit", () => {
|
|
68
|
+
finishOk("ok");
|
|
69
|
+
});
|
|
66
70
|
// User-initiated termination => not a crash (shows up as an "abnormal" exit server-side)
|
|
67
|
-
process.once("SIGINT", () => {
|
|
68
|
-
|
|
71
|
+
process.once("SIGINT", () => {
|
|
72
|
+
finishOk("abnormal");
|
|
73
|
+
process.exit(130);
|
|
74
|
+
});
|
|
75
|
+
process.once("SIGTERM", () => {
|
|
76
|
+
finishOk("abnormal");
|
|
77
|
+
process.exit(143);
|
|
78
|
+
});
|
|
69
79
|
//# sourceMappingURL=sentry.js.map
|
package/dist/utils/sentry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry.js","sourceRoot":"","sources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E;IAC9B,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC;AACH,yFAAyF;AACzF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IAC3B,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
package/dist/utils/version.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeVersionFourDigitsIfNeeded = makeVersionFourDigitsIfNeeded;
|
|
4
4
|
function makeVersionFourDigitsIfNeeded(version) {
|
|
5
5
|
// count the number of . in the version. if less than 3, append .0 until it has 3 dots.
|
|
6
|
-
let dotCount = version.split(
|
|
6
|
+
let dotCount = version.split(".").length - 1;
|
|
7
7
|
if (dotCount >= 3)
|
|
8
8
|
return version; // already has 3 or more dots
|
|
9
9
|
// Append .0 until we have 3 dots
|
|
10
10
|
while (dotCount < 3) {
|
|
11
|
-
version +=
|
|
11
|
+
version += ".0";
|
|
12
12
|
dotCount++;
|
|
13
13
|
}
|
|
14
14
|
return version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interopio/iocd-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "CLI tool for setting up, building and packaging io.Connect Desktop platforms",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"iocd": "./dist/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "node ./scripts/delete-dist.js && tsc && npm run generate-schema && npm run copy-assets",
|
|
13
|
+
"build": "node ./scripts/delete-dist.js && tsc && npm run format && npm run lint && npm run generate-schema && npm run copy-assets",
|
|
14
14
|
"generate-schema": "node ./scripts/generate-schema.js",
|
|
15
15
|
"copy-assets": "node ./scripts/copy-assets.js",
|
|
16
16
|
"dev": "tsc --watch",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test:all": "npm run test:unit && npm run test:e2e",
|
|
23
23
|
"lint": "eslint src --ext .ts",
|
|
24
24
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
25
|
-
"format": "prettier --write src/**/*.ts",
|
|
25
|
+
"format": "prettier --write src/**/*.ts*",
|
|
26
26
|
"prepublishOnly": "npm run build && npm run gitignore:pre-package",
|
|
27
27
|
"postpublish": "npm run gitignore:post-publish",
|
|
28
28
|
"postinstall": "npm run gitignore:post-install",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"@types/jsonwebtoken": "^9.0.10",
|
|
67
67
|
"@types/log4js": "^0.0.33",
|
|
68
68
|
"@types/node": "^20.8.0",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
70
|
-
"@typescript-eslint/parser": "^
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
70
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
71
71
|
"eslint": "^8.50.0",
|
|
72
72
|
"eslint-config-prettier": "^9.0.0",
|
|
73
73
|
"eslint-plugin-prettier": "^5.0.0",
|