@dcloudio/uni-cli-shared 3.0.0-alpha-4030120241024002 → 3.0.0-alpha-4030220241101001
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.
|
@@ -12,5 +12,5 @@ export * from './easycom';
|
|
|
12
12
|
export * from './json';
|
|
13
13
|
export { uniViteSfcSrcImportPlugin } from './sfc';
|
|
14
14
|
export { assetPlugin, parseAssets, getAssetHash } from './vitejs/plugins/asset';
|
|
15
|
-
export { isCSSRequest, cssPlugin, cssPostPlugin, minifyCSS, cssLangRE, commonjsProxyRE, rewriteScssReadFileSync, } from './vitejs/plugins/css';
|
|
15
|
+
export { isCSSRequest, cssPlugin, cssPostPlugin, minifyCSS, cssLangRE, commonjsProxyRE, rewriteScssReadFileSync, getCssDepMap, } from './vitejs/plugins/css';
|
|
16
16
|
export { generateCodeFrame, locToStartAndEnd, offsetToStartAndEnd, } from './vitejs/utils';
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.offsetToStartAndEnd = exports.locToStartAndEnd = exports.generateCodeFrame = exports.rewriteScssReadFileSync = exports.commonjsProxyRE = exports.cssLangRE = exports.minifyCSS = exports.cssPostPlugin = exports.cssPlugin = exports.isCSSRequest = exports.getAssetHash = exports.parseAssets = exports.assetPlugin = exports.uniViteSfcSrcImportPlugin = void 0;
|
|
17
|
+
exports.offsetToStartAndEnd = exports.locToStartAndEnd = exports.generateCodeFrame = exports.getCssDepMap = exports.rewriteScssReadFileSync = exports.commonjsProxyRE = exports.cssLangRE = exports.minifyCSS = exports.cssPostPlugin = exports.cssPlugin = exports.isCSSRequest = exports.getAssetHash = exports.parseAssets = exports.assetPlugin = exports.uniViteSfcSrcImportPlugin = void 0;
|
|
18
18
|
__exportStar(require("./cssScoped"), exports);
|
|
19
19
|
__exportStar(require("./copy"), exports);
|
|
20
20
|
__exportStar(require("./inject"), exports);
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "minifyCSS", { enumerable: true, get: function ()
|
|
|
41
41
|
Object.defineProperty(exports, "cssLangRE", { enumerable: true, get: function () { return css_1.cssLangRE; } });
|
|
42
42
|
Object.defineProperty(exports, "commonjsProxyRE", { enumerable: true, get: function () { return css_1.commonjsProxyRE; } });
|
|
43
43
|
Object.defineProperty(exports, "rewriteScssReadFileSync", { enumerable: true, get: function () { return css_1.rewriteScssReadFileSync; } });
|
|
44
|
+
Object.defineProperty(exports, "getCssDepMap", { enumerable: true, get: function () { return css_1.getCssDepMap; } });
|
|
44
45
|
var utils_1 = require("./vitejs/utils");
|
|
45
46
|
Object.defineProperty(exports, "generateCodeFrame", { enumerable: true, get: function () { return utils_1.generateCodeFrame; } });
|
|
46
47
|
Object.defineProperty(exports, "locToStartAndEnd", { enumerable: true, get: function () { return utils_1.locToStartAndEnd; } });
|
|
@@ -314,6 +314,13 @@ function uniUTSAppUniModulesPlugin(options = {}) {
|
|
|
314
314
|
continue;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
+
if (process.env.UNI_APP_X !== 'true' &&
|
|
318
|
+
process.env.UNI_PLATFORM === 'app-harmony') {
|
|
319
|
+
// uniExtApiCompiler本身是为X项目准备的,但是在app-harmony项目中也会调用
|
|
320
|
+
if (!fs_extra_1.default.existsSync(path_1.default.resolve(pluginDir, 'utssdk', 'app-harmony', 'index.uts'))) {
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
317
324
|
const result = await compilePlugin(pluginDir);
|
|
318
325
|
if (result) {
|
|
319
326
|
// 时机不对,不能addWatch
|
|
@@ -30,6 +30,7 @@ export declare const cssLangRE: RegExp;
|
|
|
30
30
|
export declare const commonjsProxyRE: RegExp;
|
|
31
31
|
export declare const isCSSRequest: (request: string) => boolean;
|
|
32
32
|
export declare const isDirectCSSRequest: (request: string) => boolean;
|
|
33
|
+
export declare function getCssDepMap(): Map<string, Set<string>>;
|
|
33
34
|
/**
|
|
34
35
|
* Plugin applied before user plugins
|
|
35
36
|
*/
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.rewriteScssReadFileSync = exports.hoistAtRules = exports.minifyCSS = exports.importCssRE = exports.cssDataUriRE = exports.cssUrlRE = exports.formatPostcssSourceMap = exports.cssPostPlugin = exports.cssPlugin = exports.isDirectCSSRequest = exports.isCSSRequest = exports.commonjsProxyRE = exports.cssLangRE = void 0;
|
|
29
|
+
exports.rewriteScssReadFileSync = exports.hoistAtRules = exports.minifyCSS = exports.importCssRE = exports.cssDataUriRE = exports.cssUrlRE = exports.formatPostcssSourceMap = exports.cssPostPlugin = exports.cssPlugin = exports.getCssDepMap = exports.isDirectCSSRequest = exports.isCSSRequest = exports.commonjsProxyRE = exports.cssLangRE = void 0;
|
|
30
30
|
const fs_1 = __importDefault(require("fs"));
|
|
31
31
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
32
32
|
const path_1 = __importDefault(require("path"));
|
|
@@ -96,6 +96,11 @@ function wrapResolve(resolve, code, source, getDescriptor) {
|
|
|
96
96
|
return;
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
+
const depMap = new Map();
|
|
100
|
+
function getCssDepMap() {
|
|
101
|
+
return depMap;
|
|
102
|
+
}
|
|
103
|
+
exports.getCssDepMap = getCssDepMap;
|
|
99
104
|
/**
|
|
100
105
|
* Plugin applied before user plugins
|
|
101
106
|
*/
|
|
@@ -152,8 +157,16 @@ function cssPlugin(config, options = { isAndroidX: false }) {
|
|
|
152
157
|
}
|
|
153
158
|
// track deps for build watch mode
|
|
154
159
|
if (config.command === 'build' && config.build.watch && deps) {
|
|
160
|
+
const normalizedId = (0, utils_1.normalizePath)(id.split('?')[0]);
|
|
155
161
|
for (const file of deps) {
|
|
156
162
|
this.addWatchFile(file);
|
|
163
|
+
if (options.isAndroidX) {
|
|
164
|
+
const normalizedFile = (0, utils_1.normalizePath)(file.split('?')[0]);
|
|
165
|
+
if (!depMap.has(normalizedFile)) {
|
|
166
|
+
depMap.set(normalizedFile, new Set());
|
|
167
|
+
}
|
|
168
|
+
depMap.get(normalizedFile).add(normalizedId);
|
|
169
|
+
}
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
172
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-4030220241101001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/core": "^7.23.3",
|
|
27
27
|
"@babel/parser": "^7.23.9",
|
|
28
28
|
"@babel/types": "^7.20.7",
|
|
29
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
29
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-4030220241101001",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4030220241101001",
|
|
31
31
|
"@intlify/core-base": "9.1.9",
|
|
32
32
|
"@intlify/shared": "9.1.9",
|
|
33
33
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
74
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4030220241101001",
|
|
75
75
|
"@types/adm-zip": "^0.5.5",
|
|
76
76
|
"@types/babel__code-frame": "^7.0.6",
|
|
77
77
|
"@types/babel__core": "^7.1.19",
|