weapp-vite 5.11.4 → 5.12.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/auto-routes.cjs +2 -2
- package/dist/auto-routes.mjs +1 -1
- package/dist/{chunk-NIUQMR6K.cjs → chunk-7DRE4BEK.cjs} +4 -4
- package/dist/{chunk-Q4SMSDJY.cjs → chunk-ANDG4OME.cjs} +94 -75
- package/dist/{chunk-KZVQVHXZ.mjs → chunk-LLYDSPS7.mjs} +1 -1
- package/dist/{chunk-K5QGB3YX.mjs → chunk-TS7WK45E.mjs} +60 -41
- package/dist/cli.cjs +55 -55
- package/dist/cli.mjs +2 -2
- package/dist/{config-D1eBLaq2.d.cts → config-DgMm7Geo.d.cts} +19 -19
- package/dist/{config-9JglUSN2.d.ts → config-sFIhUM69.d.ts} +19 -19
- package/dist/config.d.cts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +2 -2
- package/dist/json.d.cts +1 -2
- package/dist/json.d.ts +1 -2
- package/dist/types.d.cts +1 -2
- package/dist/types.d.ts +1 -2
- package/package.json +8 -9
package/dist/auto-routes.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkANDG4OMEcjs = require('./chunk-ANDG4OME.cjs');
|
|
4
4
|
require('./chunk-INJNZ3X2.cjs');
|
|
5
5
|
require('./chunk-MTUYQJIF.cjs');
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ function createGetter(resolver) {
|
|
|
24
24
|
get: resolver
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
var ctx =
|
|
27
|
+
var ctx = _chunkANDG4OMEcjs.getCompilerContext.call(void 0, );
|
|
28
28
|
var service = ctx.autoRoutesService;
|
|
29
29
|
var routes = {};
|
|
30
30
|
Object.defineProperties(routes, {
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkANDG4OMEcjs = require('./chunk-ANDG4OME.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
|
|
@@ -12,10 +12,10 @@ _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
|
|
|
12
12
|
async function createCompilerContext(options) {
|
|
13
13
|
const key = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.key]), () => ( "default"));
|
|
14
14
|
if (!_optionalChain([options, 'optionalAccess', _2 => _2.key])) {
|
|
15
|
-
|
|
15
|
+
_chunkANDG4OMEcjs.resetCompilerContext.call(void 0, key);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
const ctx =
|
|
17
|
+
_chunkANDG4OMEcjs.setActiveCompilerContextKey.call(void 0, key);
|
|
18
|
+
const ctx = _chunkANDG4OMEcjs.getCompilerContext.call(void 0, key);
|
|
19
19
|
const { configService, scanService, autoRoutesService } = ctx;
|
|
20
20
|
await configService.load(options);
|
|
21
21
|
if (autoRoutesService) {
|
|
@@ -10070,7 +10070,7 @@ var PathScurryBase = class {
|
|
|
10070
10070
|
const dirs = /* @__PURE__ */ new Set();
|
|
10071
10071
|
const queue = [entry];
|
|
10072
10072
|
let processing = 0;
|
|
10073
|
-
const
|
|
10073
|
+
const process11 = () => {
|
|
10074
10074
|
let paused = false;
|
|
10075
10075
|
while (!paused) {
|
|
10076
10076
|
const dir = queue.shift();
|
|
@@ -10111,9 +10111,9 @@ var PathScurryBase = class {
|
|
|
10111
10111
|
}
|
|
10112
10112
|
}
|
|
10113
10113
|
if (paused && !results.flowing) {
|
|
10114
|
-
results.once("drain",
|
|
10114
|
+
results.once("drain", process11);
|
|
10115
10115
|
} else if (!sync2) {
|
|
10116
|
-
|
|
10116
|
+
process11();
|
|
10117
10117
|
}
|
|
10118
10118
|
};
|
|
10119
10119
|
let sync2 = true;
|
|
@@ -10121,7 +10121,7 @@ var PathScurryBase = class {
|
|
|
10121
10121
|
sync2 = false;
|
|
10122
10122
|
}
|
|
10123
10123
|
};
|
|
10124
|
-
|
|
10124
|
+
process11();
|
|
10125
10125
|
return results;
|
|
10126
10126
|
}
|
|
10127
10127
|
streamSync(entry = this.cwd, opts = {}) {
|
|
@@ -10139,7 +10139,7 @@ var PathScurryBase = class {
|
|
|
10139
10139
|
}
|
|
10140
10140
|
const queue = [entry];
|
|
10141
10141
|
let processing = 0;
|
|
10142
|
-
const
|
|
10142
|
+
const process11 = () => {
|
|
10143
10143
|
let paused = false;
|
|
10144
10144
|
while (!paused) {
|
|
10145
10145
|
const dir = queue.shift();
|
|
@@ -10173,9 +10173,9 @@ var PathScurryBase = class {
|
|
|
10173
10173
|
}
|
|
10174
10174
|
}
|
|
10175
10175
|
if (paused && !results.flowing)
|
|
10176
|
-
results.once("drain",
|
|
10176
|
+
results.once("drain", process11);
|
|
10177
10177
|
};
|
|
10178
|
-
|
|
10178
|
+
process11();
|
|
10179
10179
|
return results;
|
|
10180
10180
|
}
|
|
10181
10181
|
chdir(path37 = this.cwd) {
|
|
@@ -26317,10 +26317,11 @@ _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
|
|
|
26317
26317
|
|
|
26318
26318
|
|
|
26319
26319
|
|
|
26320
|
-
|
|
26320
|
+
|
|
26321
|
+
|
|
26321
26322
|
function createNpmService(ctx) {
|
|
26322
26323
|
const oxcRuntimeSupport = createOxcRuntimeSupport();
|
|
26323
|
-
const
|
|
26324
|
+
const oxcVitePlugin = oxcRuntimeSupport.vitePlugin;
|
|
26324
26325
|
function getDependenciesCacheFilePath(key = "/") {
|
|
26325
26326
|
if (!ctx.configService) {
|
|
26326
26327
|
throw new Error("configService must be initialized before generating npm cache path");
|
|
@@ -26367,29 +26368,34 @@ function createNpmService(ctx) {
|
|
|
26367
26368
|
}
|
|
26368
26369
|
async function bundleBuild({ entry, name, options, outDir }) {
|
|
26369
26370
|
const mergedOptions = _shared.defu.call(void 0, options, {
|
|
26370
|
-
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
|
|
26374
|
-
|
|
26375
|
-
|
|
26376
|
-
return {
|
|
26377
|
-
js: ".js"
|
|
26378
|
-
};
|
|
26371
|
+
configFile: false,
|
|
26372
|
+
publicDir: false,
|
|
26373
|
+
logLevel: "silent",
|
|
26374
|
+
root: _nullishCoalesce(_optionalChain([ctx, 'access', _495 => _495.configService, 'optionalAccess', _496 => _496.cwd]), () => ( _process2.default.cwd())),
|
|
26375
|
+
define: {
|
|
26376
|
+
"process.env.NODE_ENV": JSON.stringify("production")
|
|
26379
26377
|
},
|
|
26380
|
-
|
|
26381
|
-
|
|
26382
|
-
|
|
26383
|
-
|
|
26384
|
-
|
|
26385
|
-
|
|
26386
|
-
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
|
|
26390
|
-
|
|
26378
|
+
plugins: [],
|
|
26379
|
+
build: {
|
|
26380
|
+
lib: {
|
|
26381
|
+
entry,
|
|
26382
|
+
formats: ["cjs"],
|
|
26383
|
+
fileName: (_format, entryName) => `${entryName}.js`
|
|
26384
|
+
},
|
|
26385
|
+
outDir,
|
|
26386
|
+
emptyOutDir: true,
|
|
26387
|
+
sourcemap: false,
|
|
26388
|
+
minify: true,
|
|
26389
|
+
target: "es6",
|
|
26390
|
+
rollupOptions: {
|
|
26391
|
+
external: [],
|
|
26392
|
+
output: {
|
|
26393
|
+
exports: "named"
|
|
26394
|
+
}
|
|
26395
|
+
}
|
|
26396
|
+
}
|
|
26391
26397
|
});
|
|
26392
|
-
const resolvedOptions = _optionalChain([ctx, 'access',
|
|
26398
|
+
const resolvedOptions = _optionalChain([ctx, 'access', _497 => _497.configService, 'optionalAccess', _498 => _498.weappViteConfig, 'optionalAccess', _499 => _499.npm, 'optionalAccess', _500 => _500.buildOptions, 'optionalCall', _501 => _501(
|
|
26393
26399
|
mergedOptions,
|
|
26394
26400
|
{ name, entry }
|
|
26395
26401
|
)]);
|
|
@@ -26400,19 +26406,32 @@ function createNpmService(ctx) {
|
|
|
26400
26406
|
finalOptions = resolvedOptions;
|
|
26401
26407
|
}
|
|
26402
26408
|
if (finalOptions) {
|
|
26403
|
-
if (
|
|
26404
|
-
const
|
|
26405
|
-
|
|
26406
|
-
|
|
26409
|
+
if (oxcVitePlugin) {
|
|
26410
|
+
const toPluginArray = (plugins) => {
|
|
26411
|
+
const queue = [];
|
|
26412
|
+
const result = [];
|
|
26413
|
+
if (plugins) {
|
|
26414
|
+
queue.push(plugins);
|
|
26415
|
+
}
|
|
26416
|
+
while (queue.length > 0) {
|
|
26417
|
+
const current2 = queue.shift();
|
|
26418
|
+
if (!current2) {
|
|
26419
|
+
continue;
|
|
26420
|
+
}
|
|
26421
|
+
if (Array.isArray(current2)) {
|
|
26422
|
+
queue.unshift(...current2);
|
|
26423
|
+
continue;
|
|
26424
|
+
}
|
|
26425
|
+
result.push(current2);
|
|
26407
26426
|
}
|
|
26408
|
-
return
|
|
26427
|
+
return result;
|
|
26409
26428
|
};
|
|
26410
|
-
const existing =
|
|
26411
|
-
const hasPlugin = existing.includes(
|
|
26412
|
-
const nextPlugins = hasPlugin ? existing : [
|
|
26413
|
-
finalOptions.plugins = nextPlugins
|
|
26429
|
+
const existing = toPluginArray(finalOptions.plugins);
|
|
26430
|
+
const hasPlugin = existing.includes(oxcVitePlugin);
|
|
26431
|
+
const nextPlugins = hasPlugin ? existing : [oxcVitePlugin, ...existing];
|
|
26432
|
+
finalOptions.plugins = nextPlugins;
|
|
26414
26433
|
}
|
|
26415
|
-
await
|
|
26434
|
+
await _vite.build.call(void 0, finalOptions);
|
|
26416
26435
|
}
|
|
26417
26436
|
}
|
|
26418
26437
|
async function copyBuild({ from, to }) {
|
|
@@ -26489,7 +26508,7 @@ function createNpmService(ctx) {
|
|
|
26489
26508
|
throw new Error("configService must be initialized before resolving npm relation list");
|
|
26490
26509
|
}
|
|
26491
26510
|
let packNpmRelationList = [];
|
|
26492
|
-
if (_optionalChain([ctx, 'access',
|
|
26511
|
+
if (_optionalChain([ctx, 'access', _502 => _502.configService, 'access', _503 => _503.projectConfig, 'access', _504 => _504.setting, 'optionalAccess', _505 => _505.packNpmManually]) && Array.isArray(ctx.configService.projectConfig.setting.packNpmRelationList)) {
|
|
26493
26512
|
packNpmRelationList = ctx.configService.projectConfig.setting.packNpmRelationList;
|
|
26494
26513
|
} else {
|
|
26495
26514
|
packNpmRelationList = [
|
|
@@ -26502,10 +26521,10 @@ function createNpmService(ctx) {
|
|
|
26502
26521
|
return packNpmRelationList;
|
|
26503
26522
|
}
|
|
26504
26523
|
async function build3(options) {
|
|
26505
|
-
if (!_optionalChain([ctx, 'access',
|
|
26524
|
+
if (!_optionalChain([ctx, 'access', _506 => _506.configService, 'optionalAccess', _507 => _507.weappViteConfig, 'optionalAccess', _508 => _508.npm, 'optionalAccess', _509 => _509.enable])) {
|
|
26506
26525
|
return;
|
|
26507
26526
|
}
|
|
26508
|
-
_optionalChain([debug, 'optionalCall',
|
|
26527
|
+
_optionalChain([debug, 'optionalCall', _510 => _510("buildNpm start")]);
|
|
26509
26528
|
const packNpmRelationList = getPackNpmRelationList();
|
|
26510
26529
|
const [mainRelation, ...subRelations] = packNpmRelationList;
|
|
26511
26530
|
const packageJsonPath = _pathe2.default.resolve(ctx.configService.cwd, mainRelation.packageJsonPath);
|
|
@@ -26580,7 +26599,7 @@ function createNpmService(ctx) {
|
|
|
26580
26599
|
}
|
|
26581
26600
|
}
|
|
26582
26601
|
}
|
|
26583
|
-
_optionalChain([debug, 'optionalCall',
|
|
26602
|
+
_optionalChain([debug, 'optionalCall', _511 => _511("buildNpm end")]);
|
|
26584
26603
|
}
|
|
26585
26604
|
return {
|
|
26586
26605
|
getDependenciesCacheFilePath,
|
|
@@ -26624,7 +26643,7 @@ var TimeoutError = (_class16 = class _TimeoutError extends Error {
|
|
|
26624
26643
|
__init36() {this.name = "TimeoutError"}
|
|
26625
26644
|
constructor(message, options) {
|
|
26626
26645
|
super(message, options);_class16.prototype.__init36.call(this);;
|
|
26627
|
-
_optionalChain([Error, 'access',
|
|
26646
|
+
_optionalChain([Error, 'access', _512 => _512.captureStackTrace, 'optionalCall', _513 => _513(this, _TimeoutError)]);
|
|
26628
26647
|
}
|
|
26629
26648
|
}, _class16);
|
|
26630
26649
|
var getAbortedReason = (signal) => _nullishCoalesce(signal.reason, () => ( new DOMException("This operation was aborted.", "AbortError")));
|
|
@@ -26642,7 +26661,7 @@ function pTimeout(promise, options) {
|
|
|
26642
26661
|
if (typeof milliseconds !== "number" || Math.sign(milliseconds) !== 1) {
|
|
26643
26662
|
throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``);
|
|
26644
26663
|
}
|
|
26645
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
26664
|
+
if (_optionalChain([signal, 'optionalAccess', _514 => _514.aborted])) {
|
|
26646
26665
|
reject(getAbortedReason(signal));
|
|
26647
26666
|
return;
|
|
26648
26667
|
}
|
|
@@ -26740,7 +26759,7 @@ var PriorityQueue = class {
|
|
|
26740
26759
|
}
|
|
26741
26760
|
dequeue() {
|
|
26742
26761
|
const item = this.#queue.shift();
|
|
26743
|
-
return _optionalChain([item, 'optionalAccess',
|
|
26762
|
+
return _optionalChain([item, 'optionalAccess', _515 => _515.run]);
|
|
26744
26763
|
}
|
|
26745
26764
|
filter(options) {
|
|
26746
26765
|
return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
@@ -26801,10 +26820,10 @@ var PQueue = class extends import_index2.default {
|
|
|
26801
26820
|
...options
|
|
26802
26821
|
};
|
|
26803
26822
|
if (!(typeof options.intervalCap === "number" && options.intervalCap >= 1)) {
|
|
26804
|
-
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${_nullishCoalesce(_optionalChain([options, 'access',
|
|
26823
|
+
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${_nullishCoalesce(_optionalChain([options, 'access', _516 => _516.intervalCap, 'optionalAccess', _517 => _517.toString, 'call', _518 => _518()]), () => ( ""))}\` (${typeof options.intervalCap})`);
|
|
26805
26824
|
}
|
|
26806
26825
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
26807
|
-
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${_nullishCoalesce(_optionalChain([options, 'access',
|
|
26826
|
+
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${_nullishCoalesce(_optionalChain([options, 'access', _519 => _519.interval, 'optionalAccess', _520 => _520.toString, 'call', _521 => _521()]), () => ( ""))}\` (${typeof options.interval})`);
|
|
26808
26827
|
}
|
|
26809
26828
|
this.#carryoverIntervalCount = _nullishCoalesce(_nullishCoalesce(options.carryoverIntervalCount, () => ( options.carryoverConcurrencyCount)), () => ( false));
|
|
26810
26829
|
this.#isIntervalIgnored = options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0;
|
|
@@ -27005,7 +27024,7 @@ var PQueue = class extends import_index2.default {
|
|
|
27005
27024
|
let eventListener;
|
|
27006
27025
|
try {
|
|
27007
27026
|
try {
|
|
27008
|
-
_optionalChain([options, 'access',
|
|
27027
|
+
_optionalChain([options, 'access', _522 => _522.signal, 'optionalAccess', _523 => _523.throwIfAborted, 'call', _524 => _524()]);
|
|
27009
27028
|
} catch (error) {
|
|
27010
27029
|
if (!this.#isIntervalIgnored) {
|
|
27011
27030
|
this.#intervalCount--;
|
|
@@ -27037,7 +27056,7 @@ var PQueue = class extends import_index2.default {
|
|
|
27037
27056
|
this.emit("error", error);
|
|
27038
27057
|
} finally {
|
|
27039
27058
|
if (eventListener) {
|
|
27040
|
-
_optionalChain([options, 'access',
|
|
27059
|
+
_optionalChain([options, 'access', _525 => _525.signal, 'optionalAccess', _526 => _526.removeEventListener, 'call', _527 => _527("abort", eventListener)]);
|
|
27041
27060
|
}
|
|
27042
27061
|
this.#runningTasks.delete(taskSymbol);
|
|
27043
27062
|
queueMicrotask(() => {
|
|
@@ -27387,7 +27406,7 @@ var FileCache = class {
|
|
|
27387
27406
|
return true;
|
|
27388
27407
|
}
|
|
27389
27408
|
const cachedMtime = this.mtimeMap.get(id);
|
|
27390
|
-
const nextSignature = _optionalChain([options, 'optionalAccess',
|
|
27409
|
+
const nextSignature = _optionalChain([options, 'optionalAccess', _528 => _528.content]) !== void 0 ? createSignature(options.content) : void 0;
|
|
27391
27410
|
const updateSignature = () => {
|
|
27392
27411
|
if (nextSignature !== void 0) {
|
|
27393
27412
|
this.signatureMap.set(id, nextSignature);
|
|
@@ -27622,7 +27641,7 @@ function coerceStyleConfig(entry) {
|
|
|
27622
27641
|
if (!entry || typeof entry !== "object") {
|
|
27623
27642
|
return void 0;
|
|
27624
27643
|
}
|
|
27625
|
-
const source = _optionalChain([entry, 'access',
|
|
27644
|
+
const source = _optionalChain([entry, 'access', _529 => _529.source, 'optionalAccess', _530 => _530.toString, 'call', _531 => _531(), 'access', _532 => _532.trim, 'call', _533 => _533()]);
|
|
27626
27645
|
if (!source) {
|
|
27627
27646
|
return void 0;
|
|
27628
27647
|
}
|
|
@@ -27798,7 +27817,7 @@ function normalizeSubPackageStyleEntries(styles, subPackage, configService) {
|
|
|
27798
27817
|
if (!service) {
|
|
27799
27818
|
return void 0;
|
|
27800
27819
|
}
|
|
27801
|
-
const root = _optionalChain([subPackage, 'access',
|
|
27820
|
+
const root = _optionalChain([subPackage, 'access', _534 => _534.root, 'optionalAccess', _535 => _535.trim, 'call', _536 => _536()]);
|
|
27802
27821
|
if (!root) {
|
|
27803
27822
|
return void 0;
|
|
27804
27823
|
}
|
|
@@ -27906,7 +27925,7 @@ function createScanService(ctx) {
|
|
|
27906
27925
|
if (!ctx.configService) {
|
|
27907
27926
|
throw new Error("configService must be initialized before scanning subpackages");
|
|
27908
27927
|
}
|
|
27909
|
-
const json = _optionalChain([scanState, 'access',
|
|
27928
|
+
const json = _optionalChain([scanState, 'access', _537 => _537.appEntry, 'optionalAccess', _538 => _538.json]);
|
|
27910
27929
|
if (scanState.isDirty || subPackageMap.size === 0) {
|
|
27911
27930
|
subPackageMap.clear();
|
|
27912
27931
|
independentSubPackageMap.clear();
|
|
@@ -27924,16 +27943,16 @@ function createScanService(ctx) {
|
|
|
27924
27943
|
subPackage,
|
|
27925
27944
|
entries: resolveSubPackageEntries(subPackage)
|
|
27926
27945
|
};
|
|
27927
|
-
const subPackageConfig = _optionalChain([ctx, 'access',
|
|
27928
|
-
meta.subPackage.dependencies = _optionalChain([subPackageConfig, 'optionalAccess',
|
|
27929
|
-
meta.subPackage.inlineConfig = _optionalChain([subPackageConfig, 'optionalAccess',
|
|
27930
|
-
meta.autoImportComponents = _optionalChain([subPackageConfig, 'optionalAccess',
|
|
27946
|
+
const subPackageConfig = _optionalChain([ctx, 'access', _539 => _539.configService, 'access', _540 => _540.weappViteConfig, 'optionalAccess', _541 => _541.subPackages, 'optionalAccess', _542 => _542[subPackage.root]]);
|
|
27947
|
+
meta.subPackage.dependencies = _optionalChain([subPackageConfig, 'optionalAccess', _543 => _543.dependencies]);
|
|
27948
|
+
meta.subPackage.inlineConfig = _optionalChain([subPackageConfig, 'optionalAccess', _544 => _544.inlineConfig]);
|
|
27949
|
+
meta.autoImportComponents = _optionalChain([subPackageConfig, 'optionalAccess', _545 => _545.autoImportComponents]);
|
|
27931
27950
|
meta.styleEntries = normalizeSubPackageStyleEntries(
|
|
27932
|
-
_optionalChain([subPackageConfig, 'optionalAccess',
|
|
27951
|
+
_optionalChain([subPackageConfig, 'optionalAccess', _546 => _546.styles]),
|
|
27933
27952
|
subPackage,
|
|
27934
27953
|
ctx.configService
|
|
27935
27954
|
);
|
|
27936
|
-
meta.watchSharedStyles = _nullishCoalesce(_optionalChain([subPackageConfig, 'optionalAccess',
|
|
27955
|
+
meta.watchSharedStyles = _nullishCoalesce(_optionalChain([subPackageConfig, 'optionalAccess', _547 => _547.watchSharedStyles]), () => ( true));
|
|
27937
27956
|
metas.push(meta);
|
|
27938
27957
|
if (subPackage.root) {
|
|
27939
27958
|
subPackageMap.set(subPackage.root, meta);
|
|
@@ -27989,11 +28008,11 @@ function createScanService(ctx) {
|
|
|
27989
28008
|
loadSubPackages,
|
|
27990
28009
|
isMainPackageFileName,
|
|
27991
28010
|
get workersOptions() {
|
|
27992
|
-
return _optionalChain([scanState, 'access',
|
|
28011
|
+
return _optionalChain([scanState, 'access', _548 => _548.appEntry, 'optionalAccess', _549 => _549.json, 'optionalAccess', _550 => _550.workers]);
|
|
27993
28012
|
},
|
|
27994
28013
|
get workersDir() {
|
|
27995
|
-
const workersOptions = _optionalChain([scanState, 'access',
|
|
27996
|
-
return typeof workersOptions === "object" ? _optionalChain([workersOptions, 'optionalAccess',
|
|
28014
|
+
const workersOptions = _optionalChain([scanState, 'access', _551 => _551.appEntry, 'optionalAccess', _552 => _552.json, 'optionalAccess', _553 => _553.workers]);
|
|
28015
|
+
return typeof workersOptions === "object" ? _optionalChain([workersOptions, 'optionalAccess', _554 => _554.path]) : workersOptions;
|
|
27997
28016
|
},
|
|
27998
28017
|
markDirty() {
|
|
27999
28018
|
scanState.isDirty = true;
|
|
@@ -28040,7 +28059,7 @@ function createWatcherService(ctx) {
|
|
|
28040
28059
|
},
|
|
28041
28060
|
setRollupWatcher(watcher, root = "/") {
|
|
28042
28061
|
const oldWatcher = rollupWatcherMap.get(root);
|
|
28043
|
-
_optionalChain([oldWatcher, 'optionalAccess',
|
|
28062
|
+
_optionalChain([oldWatcher, 'optionalAccess', _555 => _555.close, 'call', _556 => _556()]);
|
|
28044
28063
|
rollupWatcherMap.set(root, watcher);
|
|
28045
28064
|
},
|
|
28046
28065
|
closeAll() {
|
|
@@ -28053,7 +28072,7 @@ function createWatcherService(ctx) {
|
|
|
28053
28072
|
});
|
|
28054
28073
|
});
|
|
28055
28074
|
sidecarWatcherMap.clear();
|
|
28056
|
-
void _optionalChain([ctx, 'access',
|
|
28075
|
+
void _optionalChain([ctx, 'access', _557 => _557.webService, 'optionalAccess', _558 => _558.close, 'call', _559 => _559(), 'access', _560 => _560.catch, 'call', _561 => _561(() => {
|
|
28057
28076
|
})]);
|
|
28058
28077
|
},
|
|
28059
28078
|
close(root = "/") {
|
|
@@ -28069,7 +28088,7 @@ function createWatcherService(ctx) {
|
|
|
28069
28088
|
sidecarWatcherMap.delete(root);
|
|
28070
28089
|
}
|
|
28071
28090
|
if (rollupWatcherMap.size === 0 && sidecarWatcherMap.size === 0) {
|
|
28072
|
-
void _optionalChain([ctx, 'access',
|
|
28091
|
+
void _optionalChain([ctx, 'access', _562 => _562.webService, 'optionalAccess', _563 => _563.close, 'call', _564 => _564(), 'access', _565 => _565.catch, 'call', _566 => _566(() => {
|
|
28073
28092
|
})]);
|
|
28074
28093
|
}
|
|
28075
28094
|
}
|
|
@@ -28082,7 +28101,7 @@ function createWatcherServicePlugin(ctx) {
|
|
|
28082
28101
|
name: "weapp-runtime:watcher-service",
|
|
28083
28102
|
closeBundle() {
|
|
28084
28103
|
const configService = ctx.configService;
|
|
28085
|
-
const isWatchMode = _optionalChain([configService, 'optionalAccess',
|
|
28104
|
+
const isWatchMode = _optionalChain([configService, 'optionalAccess', _567 => _567.isDev]) || Boolean(_optionalChain([configService, 'optionalAccess', _568 => _568.inlineConfig, 'optionalAccess', _569 => _569.build, 'optionalAccess', _570 => _570.watch]));
|
|
28086
28105
|
if (!isWatchMode) {
|
|
28087
28106
|
service.closeAll();
|
|
28088
28107
|
}
|
|
@@ -28099,10 +28118,10 @@ function createWebService(ctx) {
|
|
|
28099
28118
|
}
|
|
28100
28119
|
let devServer;
|
|
28101
28120
|
function isEnabled() {
|
|
28102
|
-
return Boolean(_optionalChain([ctx, 'access',
|
|
28121
|
+
return Boolean(_optionalChain([ctx, 'access', _571 => _571.configService, 'optionalAccess', _572 => _572.weappWebConfig, 'optionalAccess', _573 => _573.enabled]));
|
|
28103
28122
|
}
|
|
28104
28123
|
async function startDevServer() {
|
|
28105
|
-
if (!_optionalChain([ctx, 'access',
|
|
28124
|
+
if (!_optionalChain([ctx, 'access', _574 => _574.configService, 'optionalAccess', _575 => _575.isDev])) {
|
|
28106
28125
|
return void 0;
|
|
28107
28126
|
}
|
|
28108
28127
|
if (!isEnabled()) {
|
|
@@ -28111,7 +28130,7 @@ function createWebService(ctx) {
|
|
|
28111
28130
|
if (devServer) {
|
|
28112
28131
|
return devServer;
|
|
28113
28132
|
}
|
|
28114
|
-
const inlineConfig = _optionalChain([ctx, 'access',
|
|
28133
|
+
const inlineConfig = _optionalChain([ctx, 'access', _576 => _576.configService, 'optionalAccess', _577 => _577.mergeWeb, 'call', _578 => _578()]);
|
|
28115
28134
|
if (!inlineConfig) {
|
|
28116
28135
|
return void 0;
|
|
28117
28136
|
}
|
|
@@ -28124,7 +28143,7 @@ function createWebService(ctx) {
|
|
|
28124
28143
|
if (!isEnabled()) {
|
|
28125
28144
|
return void 0;
|
|
28126
28145
|
}
|
|
28127
|
-
const inlineConfig = _optionalChain([ctx, 'access',
|
|
28146
|
+
const inlineConfig = _optionalChain([ctx, 'access', _579 => _579.configService, 'optionalAccess', _580 => _580.mergeWeb, 'call', _581 => _581()]);
|
|
28128
28147
|
if (!inlineConfig) {
|
|
28129
28148
|
return void 0;
|
|
28130
28149
|
}
|
|
@@ -28154,7 +28173,7 @@ function createWebServicePlugin(ctx) {
|
|
|
28154
28173
|
return {
|
|
28155
28174
|
name: "weapp-runtime:web-service",
|
|
28156
28175
|
async closeBundle() {
|
|
28157
|
-
if (!_optionalChain([ctx, 'access',
|
|
28176
|
+
if (!_optionalChain([ctx, 'access', _582 => _582.configService, 'optionalAccess', _583 => _583.isDev])) {
|
|
28158
28177
|
await service.close();
|
|
28159
28178
|
}
|
|
28160
28179
|
}
|
|
@@ -30805,7 +30824,7 @@ function createWxmlService(ctx) {
|
|
|
30805
30824
|
return set3;
|
|
30806
30825
|
}
|
|
30807
30826
|
function clearAll() {
|
|
30808
|
-
const currentRoot = _optionalChain([ctx, 'access',
|
|
30827
|
+
const currentRoot = _optionalChain([ctx, 'access', _584 => _584.configService, 'optionalAccess', _585 => _585.currentSubPackageRoot]);
|
|
30809
30828
|
if (!currentRoot) {
|
|
30810
30829
|
depsMap.clear();
|
|
30811
30830
|
tokenMap.clear();
|
|
@@ -30864,7 +30883,7 @@ function createWxmlService(ctx) {
|
|
|
30864
30883
|
if (!ctx.configService) {
|
|
30865
30884
|
throw new Error("configService must be initialized before scanning wxml");
|
|
30866
30885
|
}
|
|
30867
|
-
const wxmlConfig = _nullishCoalesce(_optionalChain([ctx, 'access',
|
|
30886
|
+
const wxmlConfig = _nullishCoalesce(_optionalChain([ctx, 'access', _586 => _586.configService, 'access', _587 => _587.weappViteConfig, 'optionalAccess', _588 => _588.wxml]), () => ( _optionalChain([ctx, 'access', _589 => _589.configService, 'access', _590 => _590.weappViteConfig, 'optionalAccess', _591 => _591.enhance, 'optionalAccess', _592 => _592.wxml])));
|
|
30868
30887
|
return scanWxml(wxml, {
|
|
30869
30888
|
platform: ctx.configService.platform,
|
|
30870
30889
|
...wxmlConfig === true ? {} : wxmlConfig
|