cmyr-template-cli 1.36.0 → 1.37.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/plopfile.js CHANGED
@@ -56,7 +56,6 @@ var REMOTES = [
56
56
  "https://ghproxy.com/https://github.com",
57
57
  "https://gh.ddlc.top/https://github.com",
58
58
  "https://gh.flyinbug.top/gh/https://github.com",
59
- "https://gh.con.sh/https://github.com",
60
59
  "https://cors.isteed.cc/github.com",
61
60
  "https://ghps.cc/https://github.com",
62
61
  "https://download.nuaa.cf",
@@ -138,7 +137,8 @@ var TEMPLATES_META_LIST = [
138
137
  runtime: "browser",
139
138
  vueVersion: 3,
140
139
  docker: false,
141
- priority: 0
140
+ priority: 0,
141
+ tags: ["vite"]
142
142
  },
143
143
  // {
144
144
  // name: 'vite3-template',
@@ -154,7 +154,8 @@ var TEMPLATES_META_LIST = [
154
154
  runtime: "browser",
155
155
  vueVersion: 2,
156
156
  docker: false,
157
- priority: 0
157
+ priority: 0,
158
+ tags: ["vite"]
158
159
  },
159
160
  // {
160
161
  // name: 'vite2-template',
@@ -180,13 +181,23 @@ var TEMPLATES_META_LIST = [
180
181
  // docker: false,
181
182
  // priority: 0,
182
183
  // },
184
+ {
185
+ name: "tauri-template",
186
+ language: "vue",
187
+ runtime: "browser",
188
+ vueVersion: 3,
189
+ docker: false,
190
+ priority: 0,
191
+ tags: ["tauri", "vite"]
192
+ },
183
193
  {
184
194
  name: "electron-vite-template",
185
195
  language: "vue",
186
196
  runtime: "browser",
187
197
  vueVersion: 3,
188
198
  docker: false,
189
- priority: 0
199
+ priority: 0,
200
+ tags: ["electron", "vite"]
190
201
  },
191
202
  // {
192
203
  // name: 'electron-vue-template',
@@ -229,7 +240,8 @@ var TEMPLATES_META_LIST = [
229
240
  runtime: "browser",
230
241
  vueVersion: 0,
231
242
  docker: false,
232
- priority: 0
243
+ priority: 0,
244
+ tags: ["vite"]
233
245
  },
234
246
  {
235
247
  name: "react-template",
@@ -262,7 +274,8 @@ var TEMPLATES_META_LIST = [
262
274
  runtime: "nodejs",
263
275
  vueVersion: 0,
264
276
  docker: true,
265
- priority: 0
277
+ priority: 0,
278
+ tags: ["express"]
266
279
  },
267
280
  // {
268
281
  // name: 'koa2-template',
@@ -371,7 +384,7 @@ var TEMPLATES_META_LIST = [
371
384
  javaVersion: 17,
372
385
  docker: true,
373
386
  priority: 0,
374
- tags: ["spring-boot"]
387
+ tags: ["spring-boot-v3"]
375
388
  }
376
389
  ];
377
390
 
@@ -839,17 +852,11 @@ async function initRemoteGitRepo(projectPath, answers) {
839
852
  if (templateMeta.docker) {
840
853
  keywords.push("docker");
841
854
  }
842
- if (templateMeta?.language) {
843
- keywords.push(templateMeta?.language);
844
- }
845
855
  if (templateMeta?.runtime) {
846
856
  keywords.push(templateMeta?.runtime);
847
857
  }
848
- if (templateMeta?.vueVersion === 3) {
849
- keywords.push("vue3");
850
- }
851
- if (templateMeta.tags?.length) {
852
- keywords.push(...templateMeta.tags);
858
+ if (templateMeta?.language) {
859
+ keywords.push(templateMeta?.language);
853
860
  }
854
861
  await replaceGithubRepositoryTopics(authToken, {
855
862
  owner,
@@ -1135,6 +1142,22 @@ async function getProjectInfo(projectPath, answers) {
1135
1142
  const pkg = await getProjectJson(projectPath);
1136
1143
  const nodeVersion = await getLtsNodeVersion() || "20";
1137
1144
  const node = Number(nodeVersion) - 4;
1145
+ let keywords = [
1146
+ ...answers.keywords || []
1147
+ ];
1148
+ if (templateMeta.docker) {
1149
+ keywords.push("docker");
1150
+ }
1151
+ if (templateMeta?.language) {
1152
+ keywords.push(templateMeta?.language);
1153
+ }
1154
+ if (templateMeta?.vueVersion === 3) {
1155
+ keywords.push("vue3");
1156
+ }
1157
+ if (templateMeta.tags?.length) {
1158
+ keywords.push(...templateMeta.tags);
1159
+ }
1160
+ keywords = (0, import_lodash.uniq)(keywords).map((e) => kebabCase(e));
1138
1161
  const packageName = isPrivateScopePackage ? `@${scopeName}/${name}` : name;
1139
1162
  const engines = (0, import_lodash.merge)({}, pkg?.engines, { node: `>=${node}` });
1140
1163
  const version = pkg?.version || "0.1.0";
@@ -1146,7 +1169,6 @@ async function getProjectInfo(projectPath, answers) {
1146
1169
  const lintCommand = pkg?.scripts?.lint && `${packageManager} run lint`;
1147
1170
  const commitCommand = pkg?.scripts?.commit && `${packageManager} run commit`;
1148
1171
  const mainFile = pkg?.main;
1149
- answers.config = config;
1150
1172
  const githubUsername = config?.GITHUB_USERNAME || author;
1151
1173
  const giteeUsername = config?.GITEE_USERNAME;
1152
1174
  const weiboUsername = config?.WEIBO_USERNAME;
@@ -1171,6 +1193,7 @@ async function getProjectInfo(projectPath, answers) {
1171
1193
  const authorWebsite = isOpenSource ? await getAuthorWebsiteFromGithubAPI(githubUsername) : "";
1172
1194
  const projectInfos = {
1173
1195
  ...answers,
1196
+ keywords,
1174
1197
  currentYear: (/* @__PURE__ */ new Date()).getFullYear(),
1175
1198
  name,
1176
1199
  description,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "@types/lodash": "^4.14.165",
43
43
  "@types/node": "^22.0.0",
44
44
  "@typescript-eslint/eslint-plugin": "7.18.0",
45
- "@typescript-eslint/parser": "7.18.0",
45
+ "@typescript-eslint/parser": "8.24.0",
46
46
  "commitizen": "^4.2.2",
47
47
  "conventional-changelog-cli": "^5.0.0",
48
48
  "conventional-changelog-cmyr-config": "^2.1.1",
@@ -22,5 +22,6 @@ trim_trailing_whitespace = false
22
22
  end_of_line = lf
23
23
  [package.json]
24
24
  indent_size = 2
25
+ insert_final_newline = false
25
26
  [*.yml]
26
27
  indent_size = 2
@@ -3,10 +3,10 @@ on:
3
3
  push:
4
4
  branches:
5
5
  - master
6
- # 仅取消针对当前工作流正在进行的作业或运行
6
+ # 仅针对当前工作流正在进行的作业或运行
7
7
  concurrency:
8
8
  group: ${{ github.workflow }}-${{ github.ref }}
9
- cancel-in-progress: true
9
+ cancel-in-progress: false # Release 作业不取消,因为要确保版本发布成功
10
10
  jobs:
11
11
  release:
12
12
  name: Release