create-weapp-vite 2.8.11 → 2.8.13

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.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  //#region src/cli.d.ts
2
- declare function run(): Promise<void>;
2
+ export declare function run(): Promise<void>;
3
3
  /**
4
4
  * @description CLI 主入口执行 Promise(便于测试或外部调用)
5
5
  */
6
- declare const runPromise: Promise<void>;
7
- //#endregion
8
- export { run, runPromise };
6
+ export declare const runPromise: Promise<void>;
7
+ //#endregion
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-CBeDqu9u.js";
1
+ import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-C8OBh4jK.js";
2
2
  import logger from "@weapp-core/logger";
3
3
  import { fs } from "@weapp-core/shared/fs";
4
4
  import process from "node:process";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "pkg-types";
2
2
  //#region src/enums.d.ts
3
- declare enum TemplateName {
3
+ export declare enum TemplateName {
4
4
  default = "default",
5
5
  multiPlatform = "multi-platform",
6
6
  multiPlatformSfc = "multi-platform-sfc",
@@ -21,6 +21,6 @@ interface CreateProjectOptions {
21
21
  /**
22
22
  * @description 根据模板创建项目
23
23
  */
24
- declare function createProject(targetDir?: string, templateName?: TemplateName, options?: CreateProjectOptions): Promise<void>;
24
+ export declare function createProject(targetDir?: string, templateName?: TemplateName, options?: CreateProjectOptions): Promise<void>;
25
25
  //#endregion
26
- export { type CreateProjectOptions, TemplateName, createProject };
26
+ export type { CreateProjectOptions };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as TemplateName, t as createProject } from "./src-CBeDqu9u.js";
1
+ import { r as TemplateName, t as createProject } from "./src-C8OBh4jK.js";
2
2
  export { TemplateName, createProject };
@@ -6,19 +6,19 @@ import https from "node:https";
6
6
  import { spawn } from "node:child_process";
7
7
  import process from "node:process";
8
8
  //#region ../../packages-runtime/react/package.json
9
- var version$4 = "0.2.3";
9
+ var version$4 = "0.2.5";
10
10
  //#endregion
11
11
  //#region ../../packages-runtime/wevu/package.json
12
- var version$3 = "7.0.3";
12
+ var version$3 = "7.1.0";
13
13
  //#endregion
14
14
  //#region ../dashboard/package.json
15
- var version$2 = "7.0.3";
15
+ var version$2 = "7.1.0";
16
16
  //#endregion
17
17
  //#region ../eslint/package.json
18
18
  var version$1 = "0.2.3";
19
19
  //#endregion
20
20
  //#region ../weapp-vite/package.json
21
- var version = "7.0.3";
21
+ var version = "7.1.0";
22
22
  //#endregion
23
23
  //#region src/generated/agents.ts
24
24
  const generatedAgentGuidelines = {
@@ -70,13 +70,13 @@ const TEMPLATE_CATALOG = {
70
70
  "@babel/types": "^8.0.4",
71
71
  "@douyin-microapp/typings": "^1.3.1",
72
72
  "@egoist/tailwindcss-icons": "^1.9.2",
73
- "@icebreakers/eslint-config": "^7.1.1",
74
- "@icebreakers/stylelint-config": "^5.0.7",
73
+ "@icebreakers/eslint-config": "^7.1.3",
74
+ "@icebreakers/stylelint-config": "^5.0.9",
75
75
  "@iconify-json/mdi": "^1.2.3",
76
76
  "@iconify/tailwind4": "^1.2.3",
77
77
  "@mini-types/alipay": "^3.0.14",
78
78
  "@tailwindcss/vite": "^4.3.3",
79
- "@types/node": "^26.4.1",
79
+ "@types/node": "^26.5.0",
80
80
  "@types/react": "19.2.18",
81
81
  "@types/react-reconciler": "0.33.0",
82
82
  "@types/semver": "^7.8.0",
@@ -94,32 +94,32 @@ const TEMPLATE_CATALOG = {
94
94
  "estree-walker": "^3.0.3",
95
95
  "gm-crypto": "^0.1.12",
96
96
  "graphql-request": "^7.4.0",
97
- "happy-dom": "^20.13.1",
97
+ "happy-dom": "^20.14.0",
98
98
  "lru-cache": "^11.5.2",
99
99
  "magic-string": "^1.2.3",
100
100
  "miniprogram-api-typings": "^5.2.3",
101
- "oxc-parser": "^0.148.0",
101
+ "oxc-parser": "^0.149.0",
102
102
  "oxc-walker": "^1.1.1",
103
- "pkg-types": "^2.3.1",
104
- "postcss-selector-parser": "^7.1.5",
103
+ "pkg-types": "^2.3.3",
104
+ "postcss-selector-parser": "^7.1.6",
105
105
  "react-reconciler": "0.33.0",
106
- "sass-embedded": "^1.103.1",
106
+ "sass-embedded": "^1.104.0",
107
107
  "socket.io-client": "^4.8.3",
108
108
  "tailwind-merge": "^3.6.0",
109
109
  "tailwind-variants": "^3.3.1",
110
- "tdesign-miniprogram": "^1.16.0",
110
+ "tdesign-miniprogram": "^1.16.1",
111
111
  "ts-morph": "^28.0.0",
112
112
  "uview-plus": "3.8.113",
113
113
  "vite-plugin-inspect": "^12.0.2",
114
114
  "vue-tsc": "^3.3.11",
115
- "weapp-tailwindcss": "^5.5.0",
116
- autoprefixer: "^10.5.4",
115
+ "weapp-tailwindcss": "^5.5.2",
116
+ autoprefixer: "^10.5.5",
117
117
  axios: "^1.20.0",
118
118
  clsx: "^2.1.1",
119
119
  dayjs: "^1.11.23",
120
120
  echarts: "^6.1.0",
121
121
  esbuild: "^0.28.2",
122
- eslint: "^10.9.1",
122
+ eslint: "^10.10.0",
123
123
  fdir: "^6.5.0",
124
124
  htmlparser2: "^12.0.0",
125
125
  lodash: "^4.18.1",
@@ -127,12 +127,12 @@ const TEMPLATE_CATALOG = {
127
127
  obug: "^2.1.4",
128
128
  pathe: "^2.0.3",
129
129
  picocolors: "^1.1.1",
130
- postcss: "^8.5.26",
130
+ postcss: "^8.5.28",
131
131
  react: "19.2.8",
132
- rolldown: "1.2.7",
133
- sass: "^1.103.1",
132
+ rolldown: "1.2.8",
133
+ sass: "^1.104.0",
134
134
  sharp: "^0.35.4",
135
- stylelint: "^17.14.1",
135
+ stylelint: "^17.15.0",
136
136
  tailwindcss: "^4.3.3",
137
137
  tslib: "^2.8.1",
138
138
  tsx: "^4.23.13",
@@ -142,8 +142,8 @@ const TEMPLATE_CATALOG = {
142
142
  zod: "^4.5.4"
143
143
  };
144
144
  const TEMPLATE_NAMED_CATALOG = {
145
- "tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.16.0" },
146
- "weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.5.0" },
145
+ "tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.16.1" },
146
+ "weapp-tailwindcss-fixed": { "weapp-tailwindcss": "5.5.2" },
147
147
  latest: {
148
148
  "miniprogram-api-typings": "^5.2.3",
149
149
  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": "2.8.11",
4
+ "version": "2.8.13",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -46,12 +46,12 @@
46
46
  "node": "^20.19.0 || >=22.12.0"
47
47
  },
48
48
  "dependencies": {
49
- "@inquirer/prompts": "^8.7.0",
50
- "@weapp-core/init": "6.0.17",
51
- "@weapp-core/logger": "3.1.1",
49
+ "@inquirer/prompts": "^8.7.2",
50
+ "@weapp-core/init": "6.0.18",
51
+ "@weapp-core/logger": "3.1.2",
52
52
  "@weapp-core/shared": "3.2.1",
53
53
  "pathe": "^2.0.3",
54
- "pkg-types": "^2.3.1"
54
+ "pkg-types": "^2.3.3"
55
55
  },
56
56
  "scripts": {
57
57
  "catalog:sync": "node --import tsx scripts/generate-template-catalog.ts",
@@ -1 +1,6 @@
1
- Component({})
1
+ Component({
2
+ properties: {
3
+ title: String,
4
+ subtitle: String,
5
+ },
6
+ })
@@ -33,8 +33,10 @@
33
33
  "postinstall": "wv prepare -p weapp"
34
34
  },
35
35
  "devDependencies": {
36
+ "@douyin-microapp/typings": "catalog:",
36
37
  "@icebreakers/eslint-config": "catalog:",
37
38
  "@icebreakers/stylelint-config": "catalog:",
39
+ "@mini-types/alipay": "catalog:",
38
40
  "@types/node": "catalog:",
39
41
  "@weapp-vite/dashboard": "workspace:*",
40
42
  "eslint": "catalog:",
@@ -10,7 +10,7 @@
10
10
  <view id="platform-marker" class="runtime-marker">MP_PLATFORM={{platformTools.label(platform)}}</view>
11
11
  <view id="runtime-status" class="runtime-status">status={{status}}</view>
12
12
 
13
- <PlatformCard platform="{{platform}}" />
13
+ <PlatformCard id="platform-card-host" platform="{{platform}}" />
14
14
 
15
15
  <view class="counter-panel">
16
16
  <view class="counter-panel__label">跨端交互检查</view>
@@ -33,8 +33,10 @@
33
33
  "postinstall": "wv prepare -p weapp"
34
34
  },
35
35
  "devDependencies": {
36
+ "@douyin-microapp/typings": "catalog:",
36
37
  "@icebreakers/eslint-config": "catalog:",
37
38
  "@icebreakers/stylelint-config": "catalog:",
39
+ "@mini-types/alipay": "catalog:",
38
40
  "@types/node": "catalog:",
39
41
  "@weapp-vite/dashboard": "workspace:*",
40
42
  "eslint": "catalog:",
@@ -37,7 +37,7 @@ function increment() {
37
37
  status={{ status }}
38
38
  </view>
39
39
 
40
- <PlatformCard :platform="platform" />
40
+ <PlatformCard id="platform-card-host" :platform="platform" />
41
41
 
42
42
  <view class="counter-panel">
43
43
  <view class="counter-panel__label">
@@ -31,6 +31,9 @@
31
31
  ## 使用提示
32
32
 
33
33
  - 模板默认通过 `weapp.pluginRoot` 输出 `dist-plugin/**`
34
+ - 托管 TypeScript 配置默认包含 `src/` 和配置的 `pluginRoot`;模板通过 `weapp.typescript.app.include` 额外声明 `shared/`,新增共享源码目录时也应同步声明。
35
+ - `project.config.json` 使用 `compileType: "plugin"`,`src/app.json` 中的 `hello-plugin.version` 使用 `"dev"`,调试当前 `pluginRoot` 内的本地插件
36
+ - 插件产物由 `weapp-vite` 编译,项目设置 `setting.es6: false`,避免开发者工具重复 Babel 转译时生成越过插件根目录的 `@babel/runtime` helper 引用
34
37
  - `src/app.json` 里预置了与插件 AppID 一致的 `hello-plugin.provider`
35
38
  - 如果你要在自己的插件 AppID 下调试或上传,请先替换 `project.config.json` 的 `appid`,并同步修改 `src/app.json` 里的 `plugins.hello-plugin.provider`
36
39
 
@@ -7,7 +7,7 @@
7
7
  "srcMiniprogramRoot": "dist/",
8
8
  "appid": "wxb3d842a4a7e3440d",
9
9
  "setting": {
10
- "es6": true,
10
+ "es6": false,
11
11
  "postcss": false,
12
12
  "compileWorklet": false,
13
13
  "minified": false,
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "plugins": {
7
7
  "hello-plugin": {
8
- "version": "0.0.1",
8
+ "version": "dev",
9
9
  "provider": "wxb3d842a4a7e3440d"
10
10
  }
11
11
  }
@@ -9,7 +9,7 @@
9
9
 
10
10
  <view class="panel">
11
11
  <text class="panel__title">宿主拿到的插件信息</text>
12
- <text class="panel__line">plugin.answer = {{ pluginAnswer }}</text>
12
+ <text id="plugin-answer" class="panel__line">plugin.answer = {{ pluginAnswer }}</text>
13
13
  <text class="panel__line">{{ hostMessage }}</text>
14
14
  <text class="panel__line">{{ pluginMessage }}</text>
15
15
  <text class="panel__line">{{ pluginSummary }}</text>
@@ -6,6 +6,7 @@ export default defineConfig({
6
6
  pluginRoot: 'plugin',
7
7
  typescript: {
8
8
  app: {
9
+ include: ['../shared/**/*'],
9
10
  compilerOptions: {
10
11
  paths: {
11
12
  '@/*': ['./*'],
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "@icebreakers/eslint-config": "catalog:",
28
28
  "@icebreakers/stylelint-config": "catalog:",
29
- "@swc/core": "^1.16.1",
29
+ "@swc/core": "^1.16.2",
30
30
  "@types/node": "catalog:",
31
31
  "@types/react": "catalog:",
32
32
  "@types/react-reconciler": "catalog:",
@@ -1 +1,6 @@
1
- Component({})
1
+ Component({
2
+ properties: {
3
+ title: String,
4
+ subtitle: String,
5
+ },
6
+ })
@@ -1 +1,6 @@
1
- Component({})
1
+ Component({
2
+ properties: {
3
+ title: String,
4
+ subtitle: String,
5
+ },
6
+ })
@@ -1 +1,6 @@
1
- Component({})
1
+ Component({
2
+ properties: {
3
+ title: String,
4
+ subtitle: String,
5
+ },
6
+ })
@@ -19,8 +19,8 @@ const doubled = computed(() => count.value * 2)
19
19
  一个尽量小的 Vue SFC 小程序起点,复杂能力示例请看 e2e-apps。
20
20
  </view>
21
21
  <view class="counter">
22
- <text>count: {{ count }}</text>
23
- <text>double: {{ doubled }}</text>
22
+ <text id="counter-value">count: {{ count }}</text>
23
+ <text id="counter-doubled">double: {{ doubled }}</text>
24
24
  </view>
25
25
  <button class="action-btn" @tap="count += 1">
26
26
  +1