@tuya-sat/micro-script 3.0.29 → 3.1.0

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/bin/cli.d.ts CHANGED
@@ -1,5 +1,2 @@
1
1
  #!/usr/bin/env node
2
- declare const PORXY_SIGN = "--proxy";
3
- declare const IS_MAIN = "--main";
4
- declare const params: string[];
5
- declare const action: string, rest: string[];
2
+ export {};
package/dist/bin/cli.js CHANGED
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const checkVersion_1 = require("../utils/checkVersion");
5
+ (0, checkVersion_1.checkVersion)();
2
6
  const PORXY_SIGN = "--proxy";
3
7
  const IS_MAIN = "--main";
4
8
  const params = process.argv.slice(2);
@@ -0,0 +1 @@
1
+ export declare function checkVersion(): void;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.checkVersion = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ // @ts-ignore
10
+ const update_notifier_1 = __importDefault(require("update-notifier"));
11
+ function checkVersion() {
12
+ const pkg = fs_extra_1.default.readJSONSync(path_1.default.resolve(__dirname, '../../package.json'));
13
+ (0, update_notifier_1.default)({
14
+ pkg,
15
+ updateCheckInterval: 0,
16
+ shouldNotifyInNpmScript: true,
17
+ }).notify({
18
+ defer: false,
19
+ });
20
+ }
21
+ exports.checkVersion = checkVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "3.0.29",
3
+ "version": "3.1.0",
4
4
  "bin": "./dist/bin/cli.js",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
@@ -23,9 +23,9 @@
23
23
  "@babel/preset-typescript": "7.16.7",
24
24
  "@babel/traverse": "^7.20.13",
25
25
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
26
- "@tuya-sat/micro-dev-loader": "3.0.29",
27
- "@tuya-sat/micro-dev-proxy": "3.0.29",
28
- "@tuya-sat/micro-utils": "3.0.29",
26
+ "@tuya-sat/micro-dev-loader": "3.1.0",
27
+ "@tuya-sat/micro-dev-proxy": "3.1.0",
28
+ "@tuya-sat/micro-utils": "3.1.0",
29
29
  "@types/kill-port": "^2.0.0",
30
30
  "babel-loader": "8.2.4",
31
31
  "babel-plugin-import": "1.13.3",
@@ -64,6 +64,7 @@
64
64
  "tsconfig-paths-webpack-plugin": "^4.0.0",
65
65
  "uid": "^2.0.1",
66
66
  "undici": "^5.20.0",
67
+ "update-notifier": "5.1.0",
67
68
  "url-loader": "4.1.1",
68
69
  "uuid": "8.3.2",
69
70
  "vue-loader": "17.0.0",