@devicecloud.dev/dcd 4.0.3 → 4.0.4
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/dist/commands/cloud.js +12 -5
- package/dist/constants.js +1 -0
- package/dist/plan.d.ts +8 -0
- package/oclif.manifest.json +2 -1
- package/package.json +1 -1
package/dist/commands/cloud.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.mimeTypeLookupByExtension = void 0;
|
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const cli_ux_1 = require("@oclif/core/lib/cli-ux");
|
|
7
7
|
const errors_1 = require("@oclif/core/lib/errors");
|
|
8
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
9
|
const fs = require("node:fs");
|
|
9
10
|
const os = require("node:os");
|
|
10
11
|
const path = require("node:path");
|
|
@@ -45,16 +46,22 @@ class Cloud extends core_1.Command {
|
|
|
45
46
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
46
47
|
static flags = constants_1.flags;
|
|
47
48
|
versionCheck = async () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
try {
|
|
50
|
+
const latestVersion = (0, node_child_process_1.execSync)('npm view @devicecloud.dev/dcd version', {
|
|
51
|
+
encoding: 'utf8',
|
|
52
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
53
|
+
}).trim();
|
|
54
|
+
if (latestVersion !== this.config.version) {
|
|
55
|
+
this.log(`
|
|
53
56
|
-------------------
|
|
54
57
|
A new version of the devicecloud.dev CLI is available: ${latestVersion}
|
|
55
58
|
Run 'npm install -g @devicecloud.dev/dcd@latest' to update to the latest version
|
|
56
59
|
-------------------
|
|
57
60
|
`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Silently fail if npm view command fails (e.g., no network connection)
|
|
58
65
|
}
|
|
59
66
|
};
|
|
60
67
|
async run() {
|
package/dist/constants.js
CHANGED
package/dist/plan.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
interface INotificationsConfig {
|
|
2
|
+
email?: {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
onSuccess?: boolean;
|
|
5
|
+
recipients?: string[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
1
8
|
interface IWorkspaceConfig {
|
|
2
9
|
excludeTags?: null | string[];
|
|
3
10
|
executionOrder?: IExecutionOrder | null;
|
|
4
11
|
flows?: null | string[];
|
|
5
12
|
includeTags?: null | string[];
|
|
6
13
|
local?: ILocal | null;
|
|
14
|
+
notifications?: INotificationsConfig;
|
|
7
15
|
}
|
|
8
16
|
interface ILocal {
|
|
9
17
|
deterministicOrder: boolean | null;
|
package/oclif.manifest.json
CHANGED