@dcloudio/uni-cli-shared 3.0.0-alpha-3060320220919002 → 3.0.0-alpha-3060320220919004

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/fs.js CHANGED
@@ -1,23 +1,18 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.emptyDir = void 0;
4
- const path_1 = require("path");
5
- const fs_extra_1 = require("fs-extra");
6
- const fs_1 = require("fs");
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
7
9
  function emptyDir(dir, skip = []) {
8
- for (const file of (0, fs_extra_1.readdirSync)(dir)) {
10
+ for (const file of fs_1.default.readdirSync(dir)) {
9
11
  if (skip.includes(file)) {
10
12
  continue;
11
13
  }
12
- const abs = (0, path_1.resolve)(dir, file);
13
- // baseline is Node 12 so can't use rmSync :(
14
- if ((0, fs_extra_1.lstatSync)(abs).isDirectory()) {
15
- (0, fs_extra_1.emptyDirSync)(abs);
16
- (0, fs_1.rmdirSync)(abs);
17
- }
18
- else {
19
- (0, fs_extra_1.unlinkSync)(abs);
20
- }
14
+ // node >= 14.14.0
15
+ fs_1.default.rmSync(path_1.default.resolve(dir, file), { recursive: true, force: true });
21
16
  }
22
17
  }
23
18
  exports.emptyDir = emptyDir;
@@ -18,6 +18,7 @@ function parseMiniProgramPagesJson(jsonStr, platform, options = { subpackages: f
18
18
  exports.parseMiniProgramPagesJson = parseMiniProgramPagesJson;
19
19
  const NON_APP_JSON_KEYS = [
20
20
  'unipush',
21
+ 'secureNetwork',
21
22
  'usingComponents',
22
23
  'optimization',
23
24
  'scopedSlotsCompiler',
package/dist/resolve.d.ts CHANGED
@@ -12,4 +12,5 @@ export declare function resolveComponentsLibPath(): string;
12
12
  * @returns
13
13
  */
14
14
  export declare function resolveUtsAppModule(id: string, importer: string): string | undefined;
15
+ export declare function resolveUtsModuleProxyFile(id: string, importer: string): string | undefined;
15
16
  export declare function resolveUtsModule(id: string, importer: string, platform: typeof process.env.UNI_UTS_PLATFORM): string | undefined;
package/dist/resolve.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveUtsModule = exports.resolveUtsAppModule = exports.resolveComponentsLibPath = exports.resolveVueI18nRuntime = exports.resolveBuiltIn = exports.getBuiltInPaths = exports.resolveMainPathOnce = exports.relativeFile = exports.requireResolve = void 0;
6
+ exports.resolveUtsModule = exports.resolveUtsModuleProxyFile = exports.resolveUtsAppModule = exports.resolveComponentsLibPath = exports.resolveVueI18nRuntime = exports.resolveBuiltIn = exports.getBuiltInPaths = exports.resolveMainPathOnce = exports.relativeFile = exports.requireResolve = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const debug_1 = __importDefault(require("debug"));
@@ -133,10 +133,17 @@ function resolveUtsAppModule(id, importer) {
133
133
  }
134
134
  }
135
135
  exports.resolveUtsAppModule = resolveUtsAppModule;
136
+ function resolveUtsModuleProxyFile(id, importer) {
137
+ const file = resolveUtsAppModule(id, importer);
138
+ if (file) {
139
+ return '\0' + file + '?uts-proxy';
140
+ }
141
+ }
142
+ exports.resolveUtsModuleProxyFile = resolveUtsModuleProxyFile;
136
143
  // 仅限 root/uni_modules/test-plugin | root/utssdk/test-plugin 格式
137
144
  function resolveUtsModule(id, importer, platform) {
138
145
  if (process.env.UNI_PLATFORM === 'app') {
139
- return;
146
+ return resolveUtsAppModule(id, importer);
140
147
  }
141
148
  id = path_1.default.resolve(importer, id);
142
149
  if (id.includes('utssdk') || id.includes('uni_modules')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-3060320220919002",
3
+ "version": "3.0.0-alpha-3060320220919004",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,9 @@
8
8
  "dist",
9
9
  "lib"
10
10
  ],
11
+ "engines": {
12
+ "node": "^14.18.0 || >=16.0.0"
13
+ },
11
14
  "repository": {
12
15
  "type": "git",
13
16
  "url": "git+https://github.com/dcloudio/uni-app.git",
@@ -22,8 +25,8 @@
22
25
  "@babel/core": "^7.17.9",
23
26
  "@babel/parser": "^7.17.9",
24
27
  "@babel/types": "^7.17.0",
25
- "@dcloudio/uni-i18n": "3.0.0-alpha-3060320220919002",
26
- "@dcloudio/uni-shared": "3.0.0-alpha-3060320220919002",
28
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3060320220919004",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3060320220919004",
27
30
  "@intlify/core-base": "9.1.9",
28
31
  "@intlify/shared": "9.1.9",
29
32
  "@intlify/vue-devtools": "9.1.9",
@@ -33,7 +36,7 @@
33
36
  "@vue/compiler-sfc": "3.2.39",
34
37
  "@vue/server-renderer": "3.2.39",
35
38
  "@vue/shared": "3.2.39",
36
- "autoprefixer": "^10.4.11",
39
+ "autoprefixer": "^10.4.12",
37
40
  "base64url": "^3.0.1",
38
41
  "chokidar": "^3.5.3",
39
42
  "compare-versions": "^3.6.0",