weapp-vite 5.9.4 → 5.9.5
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-import-components/resolvers.cjs +64 -1
- package/dist/auto-import-components/resolvers.d.cts +3 -1
- package/dist/auto-import-components/resolvers.d.ts +3 -1
- package/dist/auto-import-components/resolvers.mjs +64 -1
- package/dist/auto-routes.cjs +2 -2
- package/dist/auto-routes.mjs +1 -1
- package/dist/{chunk-R4NBLERP.mjs → chunk-C5O4OVCK.mjs} +1 -1
- package/dist/{chunk-VTF7DPLC.mjs → chunk-O6FIJOUD.mjs} +48 -17
- package/dist/{chunk-GSJZUMRD.cjs → chunk-POPKYIZY.cjs} +128 -97
- package/dist/{chunk-W5OEPQ7S.cjs → chunk-XF6XMVVY.cjs} +4 -4
- package/dist/cli.cjs +55 -55
- package/dist/cli.mjs +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +6 -6
|
@@ -242,6 +242,69 @@ var VantResolver = (opts) => {
|
|
|
242
242
|
return resolver;
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
+
// src/auto-import-components/resolvers/weui.ts
|
|
246
|
+
_chunkFUIUGCNVcjs.init_cjs_shims.call(void 0, );
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
// src/auto-import-components/resolvers/json/weui.json
|
|
250
|
+
var weui_default = [
|
|
251
|
+
"actionsheet",
|
|
252
|
+
"badge",
|
|
253
|
+
"cell",
|
|
254
|
+
"cells",
|
|
255
|
+
"checkbox",
|
|
256
|
+
"checkbox-group",
|
|
257
|
+
"dialog",
|
|
258
|
+
"form",
|
|
259
|
+
"form-page",
|
|
260
|
+
"gallery",
|
|
261
|
+
"grids",
|
|
262
|
+
"half-screen-dialog",
|
|
263
|
+
"icon",
|
|
264
|
+
"loading",
|
|
265
|
+
"msg",
|
|
266
|
+
"navigation-bar",
|
|
267
|
+
"searchbar",
|
|
268
|
+
"slideview",
|
|
269
|
+
"tabbar",
|
|
270
|
+
"toptips",
|
|
271
|
+
"uploader"
|
|
272
|
+
];
|
|
273
|
+
|
|
274
|
+
// src/auto-import-components/resolvers/weui.ts
|
|
275
|
+
var defaultPrefix3 = "mp-";
|
|
276
|
+
var WeuiResolver = (opts) => {
|
|
277
|
+
const { prefix, resolve } = _shared.defu.call(void 0, opts, {
|
|
278
|
+
prefix: defaultPrefix3,
|
|
279
|
+
resolve({ name, prefix: prefix2 }) {
|
|
280
|
+
return {
|
|
281
|
+
key: `${prefix2}${name}`,
|
|
282
|
+
value: `weui-miniprogram/${name}/${name}`
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
const map = weui_default.reduce((acc, cur) => {
|
|
287
|
+
const { key, value } = resolve({
|
|
288
|
+
name: cur,
|
|
289
|
+
prefix
|
|
290
|
+
});
|
|
291
|
+
acc[key] = value;
|
|
292
|
+
return acc;
|
|
293
|
+
}, {});
|
|
294
|
+
const resolver = (componentName) => {
|
|
295
|
+
const from = map[componentName];
|
|
296
|
+
if (from) {
|
|
297
|
+
return {
|
|
298
|
+
name: componentName,
|
|
299
|
+
from
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
resolver.components = Object.freeze({ ...map });
|
|
304
|
+
return resolver;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
|
|
245
308
|
|
|
246
309
|
|
|
247
|
-
exports.TDesignResolver = TDesignResolver; exports.VantResolver = VantResolver;
|
|
310
|
+
exports.TDesignResolver = TDesignResolver; exports.VantResolver = VantResolver; exports.WeuiResolver = WeuiResolver;
|
|
@@ -5,4 +5,6 @@ declare const TDesignResolver: CreateResolver;
|
|
|
5
5
|
|
|
6
6
|
declare const VantResolver: CreateResolver;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
declare const WeuiResolver: CreateResolver;
|
|
9
|
+
|
|
10
|
+
export { CreateResolver, TDesignResolver, VantResolver, WeuiResolver };
|
|
@@ -5,4 +5,6 @@ declare const TDesignResolver: CreateResolver;
|
|
|
5
5
|
|
|
6
6
|
declare const VantResolver: CreateResolver;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
declare const WeuiResolver: CreateResolver;
|
|
9
|
+
|
|
10
|
+
export { CreateResolver, TDesignResolver, VantResolver, WeuiResolver };
|
|
@@ -241,7 +241,70 @@ var VantResolver = (opts) => {
|
|
|
241
241
|
resolver.components = Object.freeze({ ...map });
|
|
242
242
|
return resolver;
|
|
243
243
|
};
|
|
244
|
+
|
|
245
|
+
// src/auto-import-components/resolvers/weui.ts
|
|
246
|
+
init_esm_shims();
|
|
247
|
+
import { defu as defu3 } from "@weapp-core/shared";
|
|
248
|
+
|
|
249
|
+
// src/auto-import-components/resolvers/json/weui.json
|
|
250
|
+
var weui_default = [
|
|
251
|
+
"actionsheet",
|
|
252
|
+
"badge",
|
|
253
|
+
"cell",
|
|
254
|
+
"cells",
|
|
255
|
+
"checkbox",
|
|
256
|
+
"checkbox-group",
|
|
257
|
+
"dialog",
|
|
258
|
+
"form",
|
|
259
|
+
"form-page",
|
|
260
|
+
"gallery",
|
|
261
|
+
"grids",
|
|
262
|
+
"half-screen-dialog",
|
|
263
|
+
"icon",
|
|
264
|
+
"loading",
|
|
265
|
+
"msg",
|
|
266
|
+
"navigation-bar",
|
|
267
|
+
"searchbar",
|
|
268
|
+
"slideview",
|
|
269
|
+
"tabbar",
|
|
270
|
+
"toptips",
|
|
271
|
+
"uploader"
|
|
272
|
+
];
|
|
273
|
+
|
|
274
|
+
// src/auto-import-components/resolvers/weui.ts
|
|
275
|
+
var defaultPrefix3 = "mp-";
|
|
276
|
+
var WeuiResolver = (opts) => {
|
|
277
|
+
const { prefix, resolve } = defu3(opts, {
|
|
278
|
+
prefix: defaultPrefix3,
|
|
279
|
+
resolve({ name, prefix: prefix2 }) {
|
|
280
|
+
return {
|
|
281
|
+
key: `${prefix2}${name}`,
|
|
282
|
+
value: `weui-miniprogram/${name}/${name}`
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
const map = weui_default.reduce((acc, cur) => {
|
|
287
|
+
const { key, value } = resolve({
|
|
288
|
+
name: cur,
|
|
289
|
+
prefix
|
|
290
|
+
});
|
|
291
|
+
acc[key] = value;
|
|
292
|
+
return acc;
|
|
293
|
+
}, {});
|
|
294
|
+
const resolver = (componentName) => {
|
|
295
|
+
const from = map[componentName];
|
|
296
|
+
if (from) {
|
|
297
|
+
return {
|
|
298
|
+
name: componentName,
|
|
299
|
+
from
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
resolver.components = Object.freeze({ ...map });
|
|
304
|
+
return resolver;
|
|
305
|
+
};
|
|
244
306
|
export {
|
|
245
307
|
TDesignResolver,
|
|
246
|
-
VantResolver
|
|
308
|
+
VantResolver,
|
|
309
|
+
WeuiResolver
|
|
247
310
|
};
|
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 _chunkPOPKYIZYcjs = require('./chunk-POPKYIZY.cjs');
|
|
4
4
|
require('./chunk-KV5JVZNT.cjs');
|
|
5
5
|
require('./chunk-3OFG76US.cjs');
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ function createGetter(resolver) {
|
|
|
24
24
|
get: resolver
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
var ctx =
|
|
27
|
+
var ctx = _chunkPOPKYIZYcjs.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
|
@@ -23637,6 +23637,7 @@ var watchedCssExts = new Set(supportedCssLangs.map((ext2) => `.${ext2}`));
|
|
|
23637
23637
|
var watchedTemplateExts = new Set(templateExtensions.map((ext2) => `.${ext2}`));
|
|
23638
23638
|
var configSuffixes = configExtensions.map((ext2) => `.${ext2}`);
|
|
23639
23639
|
var sidecarSuffixes = [...configSuffixes, ...watchedCssExts, ...watchedTemplateExts];
|
|
23640
|
+
var defaultIgnoredDirNames = /* @__PURE__ */ new Set(["node_modules", "miniprogram_npm", ".git", ".hg", ".svn", ".turbo"]);
|
|
23640
23641
|
var watchLimitErrorCodes = /* @__PURE__ */ new Set(["EMFILE", "ENOSPC"]);
|
|
23641
23642
|
var importProtocols = /^(?:https?:|data:|blob:|\/)/i;
|
|
23642
23643
|
var cssImportRE = /@(?:import|wv-keep-import)\s+(?:url\()?['"]?([^'")\s]+)['"]?\)?/gi;
|
|
@@ -23945,13 +23946,15 @@ function ensureSidecarWatcher(ctx, rootDir) {
|
|
|
23945
23946
|
...supportedCssLangs.map((ext2) => path25.join(absRoot, `**/*.${ext2}`)),
|
|
23946
23947
|
...templateExtensions.map((ext2) => path25.join(absRoot, `**/*.${ext2}`))
|
|
23947
23948
|
];
|
|
23949
|
+
const ignoredMatcher = createSidecarIgnoredMatcher(ctx, absRoot);
|
|
23948
23950
|
const watcher = esm_default.watch(patterns, {
|
|
23949
23951
|
ignoreInitial: false,
|
|
23950
23952
|
persistent: true,
|
|
23951
23953
|
awaitWriteFinish: {
|
|
23952
23954
|
stabilityThreshold: 100,
|
|
23953
23955
|
pollInterval: 20
|
|
23954
|
-
}
|
|
23956
|
+
},
|
|
23957
|
+
ignored: ignoredMatcher
|
|
23955
23958
|
});
|
|
23956
23959
|
const forwardChange = (event, input, options) => {
|
|
23957
23960
|
if (!input) {
|
|
@@ -23997,6 +24000,31 @@ function ensureSidecarWatcher(ctx, rootDir) {
|
|
|
23997
24000
|
close: () => void watcher.close()
|
|
23998
24001
|
});
|
|
23999
24002
|
}
|
|
24003
|
+
function createSidecarIgnoredMatcher(ctx, rootDir) {
|
|
24004
|
+
const configService = ctx.configService;
|
|
24005
|
+
const ignoredRoots = /* @__PURE__ */ new Set();
|
|
24006
|
+
const normalizedRoot = path25.normalize(rootDir);
|
|
24007
|
+
for (const dirName of defaultIgnoredDirNames) {
|
|
24008
|
+
ignoredRoots.add(path25.join(normalizedRoot, dirName));
|
|
24009
|
+
}
|
|
24010
|
+
if (configService?.mpDistRoot) {
|
|
24011
|
+
ignoredRoots.add(path25.resolve(configService.cwd, configService.mpDistRoot));
|
|
24012
|
+
} else {
|
|
24013
|
+
ignoredRoots.add(path25.join(normalizedRoot, "dist"));
|
|
24014
|
+
}
|
|
24015
|
+
if (configService?.outDir) {
|
|
24016
|
+
ignoredRoots.add(path25.resolve(configService.cwd, configService.outDir));
|
|
24017
|
+
}
|
|
24018
|
+
return (candidate) => {
|
|
24019
|
+
const normalized = path25.normalize(candidate);
|
|
24020
|
+
for (const ignored of ignoredRoots) {
|
|
24021
|
+
if (normalized === ignored || normalized.startsWith(`${ignored}${path25.sep}`)) {
|
|
24022
|
+
return true;
|
|
24023
|
+
}
|
|
24024
|
+
}
|
|
24025
|
+
return false;
|
|
24026
|
+
};
|
|
24027
|
+
}
|
|
24000
24028
|
|
|
24001
24029
|
// src/plugins/utils/parse.ts
|
|
24002
24030
|
init_esm_shims();
|
|
@@ -26329,14 +26357,14 @@ function createNpmServicePlugin(ctx) {
|
|
|
26329
26357
|
init_esm_shims();
|
|
26330
26358
|
import process9 from "process";
|
|
26331
26359
|
|
|
26332
|
-
// ../../node_modules/.pnpm/p-queue@9.0.
|
|
26360
|
+
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/index.js
|
|
26333
26361
|
init_esm_shims();
|
|
26334
26362
|
|
|
26335
26363
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
26336
26364
|
init_esm_shims();
|
|
26337
26365
|
var import_index2 = __toESM(require_eventemitter3(), 1);
|
|
26338
26366
|
|
|
26339
|
-
// ../../node_modules/.pnpm/p-timeout@7.0.
|
|
26367
|
+
// ../../node_modules/.pnpm/p-timeout@7.0.1/node_modules/p-timeout/index.js
|
|
26340
26368
|
init_esm_shims();
|
|
26341
26369
|
var TimeoutError = class _TimeoutError extends Error {
|
|
26342
26370
|
name = "TimeoutError";
|
|
@@ -26375,7 +26403,7 @@ function pTimeout(promise, options) {
|
|
|
26375
26403
|
return;
|
|
26376
26404
|
}
|
|
26377
26405
|
const timeoutError = new TimeoutError();
|
|
26378
|
-
timer = customTimers.setTimeout(() => {
|
|
26406
|
+
timer = customTimers.setTimeout.call(void 0, () => {
|
|
26379
26407
|
if (fallback) {
|
|
26380
26408
|
try {
|
|
26381
26409
|
resolve8(fallback());
|
|
@@ -26404,16 +26432,16 @@ function pTimeout(promise, options) {
|
|
|
26404
26432
|
}
|
|
26405
26433
|
});
|
|
26406
26434
|
cancelablePromise.clear = () => {
|
|
26407
|
-
customTimers.clearTimeout(timer);
|
|
26435
|
+
customTimers.clearTimeout.call(void 0, timer);
|
|
26408
26436
|
timer = void 0;
|
|
26409
26437
|
};
|
|
26410
26438
|
return cancelablePromise;
|
|
26411
26439
|
}
|
|
26412
26440
|
|
|
26413
|
-
// ../../node_modules/.pnpm/p-queue@9.0.
|
|
26441
|
+
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
26414
26442
|
init_esm_shims();
|
|
26415
26443
|
|
|
26416
|
-
// ../../node_modules/.pnpm/p-queue@9.0.
|
|
26444
|
+
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
26417
26445
|
init_esm_shims();
|
|
26418
26446
|
function lowerBound(array, value, comparator) {
|
|
26419
26447
|
let first = 0;
|
|
@@ -26431,7 +26459,7 @@ function lowerBound(array, value, comparator) {
|
|
|
26431
26459
|
return first;
|
|
26432
26460
|
}
|
|
26433
26461
|
|
|
26434
|
-
// ../../node_modules/.pnpm/p-queue@9.0.
|
|
26462
|
+
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
26435
26463
|
var PriorityQueue = class {
|
|
26436
26464
|
#queue = [];
|
|
26437
26465
|
enqueue(run, options) {
|
|
@@ -26468,7 +26496,7 @@ var PriorityQueue = class {
|
|
|
26468
26496
|
}
|
|
26469
26497
|
};
|
|
26470
26498
|
|
|
26471
|
-
// ../../node_modules/.pnpm/p-queue@9.0.
|
|
26499
|
+
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/index.js
|
|
26472
26500
|
var PQueue = class extends import_index2.default {
|
|
26473
26501
|
#carryoverIntervalCount;
|
|
26474
26502
|
#isIntervalIgnored;
|
|
@@ -26661,13 +26689,6 @@ var PQueue = class extends import_index2.default {
|
|
|
26661
26689
|
this.#concurrency = newConcurrency;
|
|
26662
26690
|
this.#processQueue();
|
|
26663
26691
|
}
|
|
26664
|
-
async #throwOnAbort(signal) {
|
|
26665
|
-
return new Promise((_resolve3, reject) => {
|
|
26666
|
-
signal.addEventListener("abort", () => {
|
|
26667
|
-
reject(signal.reason);
|
|
26668
|
-
}, { once: true });
|
|
26669
|
-
});
|
|
26670
|
-
}
|
|
26671
26692
|
/**
|
|
26672
26693
|
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
26673
26694
|
|
|
@@ -26727,6 +26748,7 @@ var PQueue = class extends import_index2.default {
|
|
|
26727
26748
|
startTime: Date.now(),
|
|
26728
26749
|
timeout: options.timeout
|
|
26729
26750
|
});
|
|
26751
|
+
let eventListener;
|
|
26730
26752
|
try {
|
|
26731
26753
|
try {
|
|
26732
26754
|
options.signal?.throwIfAborted();
|
|
@@ -26745,7 +26767,13 @@ var PQueue = class extends import_index2.default {
|
|
|
26745
26767
|
});
|
|
26746
26768
|
}
|
|
26747
26769
|
if (options.signal) {
|
|
26748
|
-
|
|
26770
|
+
const { signal } = options;
|
|
26771
|
+
operation = Promise.race([operation, new Promise((_resolve3, reject2) => {
|
|
26772
|
+
eventListener = () => {
|
|
26773
|
+
reject2(signal.reason);
|
|
26774
|
+
};
|
|
26775
|
+
signal.addEventListener("abort", eventListener, { once: true });
|
|
26776
|
+
})]);
|
|
26749
26777
|
}
|
|
26750
26778
|
const result = await operation;
|
|
26751
26779
|
resolve8(result);
|
|
@@ -26754,6 +26782,9 @@ var PQueue = class extends import_index2.default {
|
|
|
26754
26782
|
reject(error);
|
|
26755
26783
|
this.emit("error", error);
|
|
26756
26784
|
} finally {
|
|
26785
|
+
if (eventListener) {
|
|
26786
|
+
options.signal?.removeEventListener("abort", eventListener);
|
|
26787
|
+
}
|
|
26757
26788
|
this.#runningTasks.delete(taskSymbol);
|
|
26758
26789
|
queueMicrotask(() => {
|
|
26759
26790
|
this.#next();
|