create-weapp-vite 3.0.0 → 3.0.1
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-DetUnDjV.js → src-C1wHIaC9.js} +38 -23
- package/package.json +7 -5
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as validateDependencyVersionStrategy, n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-
|
|
1
|
+
import { i as validateDependencyVersionStrategy, n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-C1wHIaC9.js";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import logger from "@weapp-core/logger";
|
|
4
4
|
import { fs } from "@weapp-core/shared/fs";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as TemplateName, t as createProject } from "./src-
|
|
1
|
+
import { r as TemplateName, t as createProject } from "./src-C1wHIaC9.js";
|
|
2
2
|
export { TemplateName, createProject };
|
|
@@ -4,10 +4,12 @@ import logger from "@weapp-core/logger";
|
|
|
4
4
|
import { fs } from "@weapp-core/shared/fs";
|
|
5
5
|
import path from "pathe";
|
|
6
6
|
import { gte, minVersion, prerelease, rcompare, satisfies, valid } from "semver";
|
|
7
|
-
import { access, writeFile } from "node:fs/promises";
|
|
7
|
+
import { access, readFile, writeFile } from "node:fs/promises";
|
|
8
8
|
import path$1 from "node:path";
|
|
9
9
|
import NpmConfig from "@npmcli/config";
|
|
10
10
|
import configDefinitions from "@npmcli/config/lib/definitions/index.js";
|
|
11
|
+
import picomatch from "picomatch";
|
|
12
|
+
import { parse } from "yaml";
|
|
11
13
|
import makeFetch from "make-fetch-happen";
|
|
12
14
|
import registryFetch from "npm-registry-fetch";
|
|
13
15
|
import { isIP } from "node:net";
|
|
@@ -38,19 +40,19 @@ function createAgentsGuidelines(templateName) {
|
|
|
38
40
|
}
|
|
39
41
|
//#endregion
|
|
40
42
|
//#region ../../packages-runtime/react/package.json
|
|
41
|
-
var version$4 = "0.2.
|
|
43
|
+
var version$4 = "0.2.11";
|
|
42
44
|
//#endregion
|
|
43
45
|
//#region ../../packages-runtime/wevu/package.json
|
|
44
|
-
var version$3 = "7.
|
|
46
|
+
var version$3 = "7.4.0";
|
|
45
47
|
//#endregion
|
|
46
48
|
//#region ../dashboard/package.json
|
|
47
|
-
var version$2 = "7.
|
|
49
|
+
var version$2 = "7.4.0";
|
|
48
50
|
//#endregion
|
|
49
51
|
//#region ../eslint/package.json
|
|
50
|
-
var version$1 = "0.2.
|
|
52
|
+
var version$1 = "0.2.9";
|
|
51
53
|
//#endregion
|
|
52
54
|
//#region ../weapp-vite/package.json
|
|
53
|
-
var version = "7.
|
|
55
|
+
var version = "7.4.0";
|
|
54
56
|
//#endregion
|
|
55
57
|
//#region src/pnpmBuildPolicy.ts
|
|
56
58
|
const WORKSPACE_CONFIG = `packages: []
|
|
@@ -67,13 +69,22 @@ allowBuilds:
|
|
|
67
69
|
esbuild: false
|
|
68
70
|
weapp-tailwindcss: false
|
|
69
71
|
`;
|
|
70
|
-
/**
|
|
72
|
+
/** 按成员目录规则查找目标项目所属的最近工作区,不越过独立工作区。 */
|
|
71
73
|
async function findPnpmWorkspaceRoot(root) {
|
|
72
|
-
|
|
74
|
+
const target = path$1.resolve(root);
|
|
75
|
+
let current = target;
|
|
73
76
|
while (true) {
|
|
74
77
|
try {
|
|
75
|
-
await
|
|
76
|
-
|
|
78
|
+
const content = await readFile(path$1.join(current, "pnpm-workspace.yaml"), "utf8");
|
|
79
|
+
const relative = path$1.relative(current, target).split(path$1.sep).join("/");
|
|
80
|
+
if (!relative) return current;
|
|
81
|
+
const patterns = (parse(content)?.packages ?? []).map((pattern) => pattern.replace(/\/+$/, ""));
|
|
82
|
+
const included = patterns.filter((pattern) => !pattern.startsWith("!"));
|
|
83
|
+
const excluded = patterns.filter((pattern) => pattern.startsWith("!")).map((pattern) => pattern.slice(1));
|
|
84
|
+
return included.length > 0 && picomatch(included, {
|
|
85
|
+
dot: true,
|
|
86
|
+
ignore: excluded
|
|
87
|
+
})(relative) ? current : void 0;
|
|
77
88
|
} catch (error) {
|
|
78
89
|
if (error.code !== "ENOENT") throw error;
|
|
79
90
|
}
|
|
@@ -153,7 +164,8 @@ async function findProjectConfigDir(cwd) {
|
|
|
153
164
|
await Promise.any([
|
|
154
165
|
".npmrc",
|
|
155
166
|
"package.json",
|
|
156
|
-
"node_modules"
|
|
167
|
+
"node_modules",
|
|
168
|
+
"pnpm-workspace.yaml"
|
|
157
169
|
].map((name) => access(path$1.join(current, name))));
|
|
158
170
|
return current;
|
|
159
171
|
} catch {
|
|
@@ -177,8 +189,9 @@ async function resolveRegistryOptions(options = {}) {
|
|
|
177
189
|
delete env.NPM_CONFIG_REGISTRY;
|
|
178
190
|
env.npm_config_registry = registryOverride;
|
|
179
191
|
}
|
|
180
|
-
const
|
|
181
|
-
const
|
|
192
|
+
const requestedDir = path$1.resolve(options.projectRoot ?? options.cwd ?? process.cwd());
|
|
193
|
+
const target = options.projectRoot ? requestedDir : await findProjectConfigDir(requestedDir);
|
|
194
|
+
const cwd = await findPnpmWorkspaceRoot(target) ?? target;
|
|
182
195
|
const config = new ScaffoldNpmConfig({
|
|
183
196
|
...configDefinitions,
|
|
184
197
|
flatten: flattenNetworkConfig,
|
|
@@ -607,18 +620,20 @@ const TEMPLATE_CATALOG = {
|
|
|
607
620
|
"@babel/types": "^8.0.6",
|
|
608
621
|
"@douyin-microapp/typings": "^1.3.1",
|
|
609
622
|
"@egoist/tailwindcss-icons": "^1.9.2",
|
|
610
|
-
"@icebreakers/eslint-config": "^8.0.
|
|
623
|
+
"@icebreakers/eslint-config": "^8.0.3",
|
|
611
624
|
"@icebreakers/stylelint-config": "^5.1.2",
|
|
612
625
|
"@iconify-json/mdi": "^1.2.3",
|
|
613
626
|
"@iconify/tailwind4": "^1.2.3",
|
|
614
627
|
"@mini-types/alipay": "^3.0.14",
|
|
615
628
|
"@tailwindcss/vite": "^4.3.3",
|
|
616
629
|
"@types/d3": "^7.4.3",
|
|
617
|
-
"@types/node": "^26.6.
|
|
630
|
+
"@types/node": "^26.6.3",
|
|
618
631
|
"@types/react": "19.3.0",
|
|
619
632
|
"@types/react-reconciler": "0.33.0",
|
|
620
633
|
"@types/semver": "^7.8.0",
|
|
621
634
|
"@vant/weapp": "^1.11.7",
|
|
635
|
+
"@vitejs/devtools": "0.7.6",
|
|
636
|
+
"@vitejs/devtools-kit": "0.7.6",
|
|
622
637
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
623
638
|
"@vue/babel-plugin-jsx": "3.0.0",
|
|
624
639
|
"@vue/compiler-core": "^3.5.43",
|
|
@@ -642,21 +657,21 @@ const TEMPLATE_CATALOG = {
|
|
|
642
657
|
"postcss-selector-parser": "^7.1.6",
|
|
643
658
|
"react-reconciler": "0.34.0",
|
|
644
659
|
"sass-embedded": "^1.105.0",
|
|
645
|
-
"socket.io-client": "^4.8.
|
|
660
|
+
"socket.io-client": "^4.8.4",
|
|
646
661
|
"tailwind-merge": "^3.7.0",
|
|
647
662
|
"tailwind-variants": "^3.3.1",
|
|
648
663
|
"tdesign-miniprogram": "^1.17.0",
|
|
649
664
|
"ts-morph": "^28.0.0",
|
|
650
|
-
"uview-plus": "3.8.
|
|
665
|
+
"uview-plus": "3.8.125",
|
|
651
666
|
"vite-plugin-inspect": "^12.0.2",
|
|
652
667
|
"vue-tsc": "^3.3.11",
|
|
653
|
-
"weapp-tailwindcss": "^5.5.
|
|
668
|
+
"weapp-tailwindcss": "^5.5.11",
|
|
654
669
|
autoprefixer: "^10.6.1",
|
|
655
670
|
axios: "^1.20.0",
|
|
656
671
|
clsx: "^2.1.1",
|
|
657
672
|
d3: "^7.9.0",
|
|
658
673
|
dayjs: "^1.11.23",
|
|
659
|
-
devframe: "1.
|
|
674
|
+
devframe: "1.1.0",
|
|
660
675
|
echarts: "^6.1.0",
|
|
661
676
|
esbuild: "^0.28.2",
|
|
662
677
|
eslint: "^10.11.0",
|
|
@@ -669,21 +684,21 @@ const TEMPLATE_CATALOG = {
|
|
|
669
684
|
picocolors: "^1.1.1",
|
|
670
685
|
postcss: "^8.5.28",
|
|
671
686
|
react: "19.3.0",
|
|
672
|
-
rolldown: "1.2.
|
|
687
|
+
rolldown: "1.2.11",
|
|
673
688
|
sass: "^1.105.0",
|
|
674
|
-
sharp: "^0.35.
|
|
689
|
+
sharp: "^0.35.5",
|
|
675
690
|
stylelint: "^17.15.0",
|
|
676
691
|
tailwindcss: "^4.3.3",
|
|
677
692
|
tslib: "^2.8.1",
|
|
678
693
|
tsx: "^4.23.15",
|
|
679
694
|
typescript: "^6.0.3",
|
|
680
|
-
vite: "8.3.
|
|
695
|
+
vite: "8.3.1",
|
|
681
696
|
vue: "^3.5.43",
|
|
682
697
|
zod: "^4.6.5"
|
|
683
698
|
};
|
|
684
699
|
const TEMPLATE_NAMED_CATALOG = {
|
|
685
700
|
"tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.17.0" },
|
|
686
|
-
"weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.5.
|
|
701
|
+
"weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.5.11" },
|
|
687
702
|
latest: {
|
|
688
703
|
"miniprogram-api-typings": "^5.2.3",
|
|
689
704
|
typescript: "^6.0.3"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"description": "create-weapp-vite tools and runtime components for modern WeChat and multi-platform mini-program development.",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,15 +60,17 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@inquirer/prompts": "^8.7.2",
|
|
62
62
|
"@npmcli/config": "^11.1.0",
|
|
63
|
-
"@weapp-core/init": "6.0.
|
|
64
|
-
"@weapp-core/logger": "3.1.
|
|
65
|
-
"@weapp-core/shared": "3.2.
|
|
63
|
+
"@weapp-core/init": "6.0.24",
|
|
64
|
+
"@weapp-core/logger": "3.1.8",
|
|
65
|
+
"@weapp-core/shared": "3.2.7",
|
|
66
66
|
"execa": "^10.0.1",
|
|
67
67
|
"make-fetch-happen": "^16.0.1",
|
|
68
68
|
"npm-registry-fetch": "^20.0.1",
|
|
69
69
|
"pathe": "^2.0.3",
|
|
70
|
+
"picomatch": "^4.0.7",
|
|
70
71
|
"pkg-types": "^2.3.3",
|
|
71
|
-
"semver": "^7.8.5"
|
|
72
|
+
"semver": "^7.8.5",
|
|
73
|
+
"yaml": "^2.9.1"
|
|
72
74
|
},
|
|
73
75
|
"devDependencies": {
|
|
74
76
|
"@types/make-fetch-happen": "^10.0.4",
|