@kmlckj/licos-ai-cli 0.0.27 → 0.0.29

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.
Files changed (42) hide show
  1. package/lib/__templates__/expo/.licosproj/scripts/dev_build.sh +3 -1
  2. package/lib/__templates__/expo/.licosproj/scripts/dev_run.sh +2 -2
  3. package/lib/__templates__/expo/.licosproj/scripts/prod_build.sh +2 -2
  4. package/lib/__templates__/expo/.licosproj/scripts/prod_run.sh +1 -1
  5. package/lib/__templates__/expo/.licosproj/scripts/server_dev_run.sh +1 -1
  6. package/lib/__templates__/expo/AGENTS.md +5 -5
  7. package/lib/__templates__/expo/README.md +5 -5
  8. package/lib/__templates__/expo/client/package.json +1 -1
  9. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +11 -6
  10. package/lib/__templates__/expo/package.json +10 -4
  11. package/lib/__templates__/expo/server/package.json +5 -5
  12. package/lib/__templates__/expo/template.config.js +8 -2
  13. package/lib/__templates__/nextjs/AGENTS.md +3 -3
  14. package/lib/__templates__/nextjs/README.md +3 -3
  15. package/lib/__templates__/nextjs/package.json +16 -12
  16. package/lib/__templates__/nextjs/pnpm-lock.yaml +16 -273
  17. package/lib/__templates__/nextjs/scripts/build.sh +1 -1
  18. package/lib/__templates__/nextjs/scripts/prepare.sh +1 -1
  19. package/lib/__templates__/nextjs/template.config.js +8 -2
  20. package/lib/__templates__/nuxt-vue/AGENTS.md +3 -3
  21. package/lib/__templates__/nuxt-vue/README.md +1 -1
  22. package/lib/__templates__/nuxt-vue/package.json +15 -11
  23. package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +6 -401
  24. package/lib/__templates__/nuxt-vue/scripts/build.sh +1 -1
  25. package/lib/__templates__/nuxt-vue/scripts/prepare.sh +1 -1
  26. package/lib/__templates__/taro/.licosproj/scripts/deploy_build.sh +1 -1
  27. package/lib/__templates__/taro/.licosproj/scripts/dev_build.sh +8 -0
  28. package/lib/__templates__/taro/.licosproj/scripts/dev_run.sh +7 -2
  29. package/lib/__templates__/taro/AGENTS.md +7 -5
  30. package/lib/__templates__/taro/README.md +7 -7
  31. package/lib/__templates__/taro/package.json +6 -3
  32. package/lib/__templates__/taro/pnpm-lock.yaml +7 -206
  33. package/lib/__templates__/taro/server/src/main.ts +2 -2
  34. package/lib/__templates__/vite/AGENTS.md +3 -3
  35. package/lib/__templates__/vite/README.md +7 -7
  36. package/lib/__templates__/vite/package.json +16 -12
  37. package/lib/__templates__/vite/pnpm-lock.yaml +0 -417
  38. package/lib/__templates__/vite/scripts/build.sh +1 -1
  39. package/lib/__templates__/vite/scripts/prepare.sh +1 -1
  40. package/lib/__templates__/vite/template.config.js +8 -2
  41. package/lib/cli.js +14 -9
  42. package/package.json +1 -1
@@ -6,7 +6,7 @@ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
6
6
  cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
- pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
9
+ pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
10
10
 
11
11
  echo "Building frontend with Vite..."
12
12
  pnpm vite build
@@ -6,4 +6,4 @@ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
6
6
  cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
- pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
9
+ pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -80,7 +80,13 @@ const config = {
80
80
  }
81
81
 
82
82
  const cmd = 'pnpm';
83
- const args = ['install'];
83
+ const args = [
84
+ 'install',
85
+ '--registry=https://registry.npmmirror.com',
86
+ '--prefer-frozen-lockfile',
87
+ '--prefer-offline',
88
+ '--reporter=append-only',
89
+ ];
84
90
  console.log(
85
91
  `\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
86
92
  );
@@ -115,7 +121,7 @@ const config = {
115
121
  console.log(` Log file: ${logFile}`);
116
122
  } catch (error) {
117
123
  console.error('✗ Failed to trigger pnpm install:', error);
118
- console.log(' You can manually run: pnpm install');
124
+ console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com');
119
125
  }
120
126
  },
121
127
  };
package/lib/cli.js CHANGED
@@ -113,7 +113,9 @@ const generateTemplatesHelpText = () => {
113
113
  lines.push(`\n Template: ${template.name}`);
114
114
  lines.push(` Description: ${template.description}`);
115
115
 
116
- const params = Object.entries(template.paramsSchema);
116
+ const params = Object.entries(
117
+ (template.paramsSchema && template.paramsSchema.properties) || {},
118
+ );
117
119
  if (params.length > 0) {
118
120
  lines.push(' Parameters:');
119
121
  params.forEach(([paramName, param]) => {
@@ -2107,7 +2109,7 @@ const EventBuilder = {
2107
2109
  };
2108
2110
 
2109
2111
  var name = "@kmlckj/licos-ai-cli";
2110
- var version = "0.0.27";
2112
+ var version = "0.0.29";
2111
2113
  var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
2112
2114
  var license = "MIT";
2113
2115
  var author = "kmlckj";
@@ -2672,10 +2674,13 @@ const warmupTemplate = (templatePath, templateName) => {
2672
2674
  return;
2673
2675
  }
2674
2676
 
2675
- const result = shelljs.exec('pnpm install', {
2677
+ const result = shelljs.exec(
2678
+ 'pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only',
2679
+ {
2676
2680
  cwd: templatePath,
2677
2681
  silent: true,
2678
- });
2682
+ },
2683
+ );
2679
2684
 
2680
2685
  // 输出 stdout
2681
2686
  if (result.stdout) {
@@ -2691,7 +2696,7 @@ const warmupTemplate = (templatePath, templateName) => {
2691
2696
  logger.success(` ✓ ${templateName} warmed up successfully`);
2692
2697
  } else {
2693
2698
  const errorMessage = [
2694
- `pnpm install failed for ${templateName} with exit code ${result.code}`,
2699
+ `pnpm install --registry=https://registry.npmmirror.com failed for ${templateName} with exit code ${result.code}`,
2695
2700
  result.stderr ? `\nStderr:\n${result.stderr}` : '',
2696
2701
  result.stdout ? `\nStdout:\n${result.stdout}` : '',
2697
2702
  ]
@@ -8910,9 +8915,9 @@ function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else {
8910
8915
  */
8911
8916
  const runPnpmInstall = (projectPath) => {
8912
8917
  logger.info('\nInstalling dependencies with pnpm...');
8913
- logger.info(`Executing: pnpm install in ${projectPath}`);
8918
+ logger.info(`Executing: pnpm install --registry=https://registry.npmmirror.com in ${projectPath}`);
8914
8919
 
8915
- const result = shelljs.exec('pnpm install', {
8920
+ const result = shelljs.exec('pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only', {
8916
8921
  cwd: projectPath,
8917
8922
  silent: true, // 使用 silent 来捕获输出
8918
8923
  });
@@ -8931,7 +8936,7 @@ const runPnpmInstall = (projectPath) => {
8931
8936
  logger.success('Dependencies installed successfully!');
8932
8937
  } else {
8933
8938
  const errorMessage = [
8934
- `pnpm install failed with exit code ${result.code}`,
8939
+ `pnpm install --registry=https://registry.npmmirror.com failed with exit code ${result.code}`,
8935
8940
  result.stderr ? `\nStderr:\n${result.stderr}` : '',
8936
8941
  result.stdout ? `\nStdout:\n${result.stdout}` : '',
8937
8942
  ]
@@ -9267,7 +9272,7 @@ const startDevServerStep = ctx => {
9267
9272
  logger.info('\nNext steps:');
9268
9273
  logger.info(` cd ${ctx.outputPath}`);
9269
9274
  if (skipInstall && ctx.hasPackageJson) {
9270
- logger.info(' pnpm install');
9275
+ logger.info(' pnpm install --registry=https://registry.npmmirror.com');
9271
9276
  }
9272
9277
  if (skipGit) {
9273
9278
  logger.info(' git init');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-ai-cli",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "LICOS AI coding workspace CLI - project template engine and dev tools",
5
5
  "license": "MIT",
6
6
  "author": "kmlckj",