@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.
@@ -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
- const versionResponse = await fetch('https://registry.npmjs.org/@devicecloud.dev/dcd/latest');
49
- const versionResponseJson = await versionResponse.json();
50
- const latestVersion = versionResponseJson.version;
51
- if (latestVersion !== this.config.version) {
52
- this.log(`
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
@@ -14,6 +14,7 @@ exports.SUPPORTED_MAESTRO_VERSIONS = [
14
14
  '1.41.0',
15
15
  '2.0.2',
16
16
  '2.0.3',
17
+ '2.0.4',
17
18
  ];
18
19
  exports.DEFAULT_MAESTRO_VERSION = '1.41.0';
19
20
  const getLatestMaestroVersion = () => exports.SUPPORTED_MAESTRO_VERSIONS.at(-1);
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;
@@ -303,6 +303,7 @@
303
303
  "1.41.0",
304
304
  "2.0.2",
305
305
  "2.0.3",
306
+ "2.0.4",
306
307
  "latest"
307
308
  ],
308
309
  "type": "option"
@@ -578,5 +579,5 @@
578
579
  ]
579
580
  }
580
581
  },
581
- "version": "4.0.3"
582
+ "version": "4.0.4"
582
583
  }
package/package.json CHANGED
@@ -72,7 +72,7 @@
72
72
  "type": "git",
73
73
  "url": "https://devicecloud.dev"
74
74
  },
75
- "version": "4.0.3",
75
+ "version": "4.0.4",
76
76
  "bugs": {
77
77
  "url": "https://discord.gg/gm3mJwcNw8"
78
78
  },