@kmlckj/licos-ai-cli 1.0.19 → 1.0.20
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/lib/__templates__/expo/.licosproj/scripts/dev_build.sh +4 -1
- package/lib/__templates__/expo/package.json +1 -1
- package/lib/__templates__/expo/template.config.js +4 -7
- package/lib/__templates__/nextjs/package.json +1 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +11549 -12072
- package/lib/__templates__/nextjs/scripts/prepare.sh +4 -1
- package/lib/__templates__/nextjs/template.config.js +4 -7
- package/lib/__templates__/nuxt-vue/package.json +1 -1
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +8586 -8283
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +4 -1
- package/lib/__templates__/taro/.licosproj/scripts/dev_build.sh +4 -1
- package/lib/__templates__/taro/.licosproj/scripts/dev_run.sh +4 -1
- package/lib/__templates__/taro/package.json +2 -2
- package/lib/__templates__/taro/pnpm-lock.yaml +20848 -21212
- package/lib/__templates__/vite/package.json +1 -1
- package/lib/__templates__/vite/scripts/prepare.sh +4 -1
- package/lib/__templates__/vite/template.config.js +4 -7
- package/lib/cli.js +1 -1
- package/package.json +1 -1
|
@@ -36,7 +36,10 @@ if [ ! -f "package.json" ]; then
|
|
|
36
36
|
exit 1
|
|
37
37
|
fi
|
|
38
38
|
# 步骤 2.1/2.2:安装项目依赖
|
|
39
|
-
pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only
|
|
39
|
+
pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || {
|
|
40
|
+
echo "Primary registry install failed; retrying with npmjs registry..."
|
|
41
|
+
pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only
|
|
42
|
+
}
|
|
40
43
|
|
|
41
44
|
echo "检查根目录 post_install.py"
|
|
42
45
|
if [ -f "$PREVIEW_DIR/post_install.py" ]; then
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dev": "bash .licosproj/scripts/dev_run.sh",
|
|
7
7
|
"build": "bash .licosproj/scripts/prod_build.sh",
|
|
8
8
|
"start": "bash .licosproj/scripts/prod_run.sh",
|
|
9
|
-
"ensure:deps": "node -e \"const fs=require('fs'); const bins=['client/node_modules/.bin/expo','server/node_modules/.bin/tsx','server/node_modules/.bin/tsc']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only",
|
|
9
|
+
"ensure:deps": "node -e \"const fs=require('fs'); const bins=['client/node_modules/.bin/expo','server/node_modules/.bin/tsx','server/node_modules/.bin/tsc']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only",
|
|
10
10
|
"prebuild": "pnpm run ensure:deps",
|
|
11
11
|
"predev": "pnpm run ensure:deps",
|
|
12
12
|
"preinstall": "node -e \"const ua=process.env.npm_config_user_agent||''; if(!ua.includes('pnpm')){console.error('Use pnpm to install dependencies.'); process.exit(1)}\"",
|
|
@@ -62,13 +62,10 @@ const config = {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const cmd = '
|
|
65
|
+
const cmd = 'bash';
|
|
66
66
|
const args = [
|
|
67
|
-
'
|
|
68
|
-
'--registry=https://registry.npmmirror.com',
|
|
69
|
-
'--prefer-frozen-lockfile',
|
|
70
|
-
'--prefer-offline',
|
|
71
|
-
'--reporter=append-only',
|
|
67
|
+
'-lc',
|
|
68
|
+
'pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only',
|
|
72
69
|
];
|
|
73
70
|
console.log(
|
|
74
71
|
`\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
|
|
@@ -104,7 +101,7 @@ const config = {
|
|
|
104
101
|
console.log(` Log file: ${logFile}`);
|
|
105
102
|
} catch (error) {
|
|
106
103
|
console.error('✗ Failed to trigger pnpm install:', error);
|
|
107
|
-
console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com');
|
|
104
|
+
console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile');
|
|
108
105
|
}
|
|
109
106
|
},
|
|
110
107
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "bash ./scripts/build.sh",
|
|
7
7
|
"dev": "bash ./scripts/dev.sh",
|
|
8
|
-
"ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/next','node_modules/.bin/tsx','node_modules/.bin/tsup','node_modules/.bin/eslint','node_modules/.bin/tsc']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only",
|
|
8
|
+
"ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/next','node_modules/.bin/tsx','node_modules/.bin/tsup','node_modules/.bin/eslint','node_modules/.bin/tsc']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only",
|
|
9
9
|
"prebuild": "pnpm run ensure:deps",
|
|
10
10
|
"predev": "pnpm run ensure:deps",
|
|
11
11
|
"preinstall": "node -e \"const ua=process.env.npm_config_user_agent||''; if(!ua.includes('pnpm')){console.error('Use pnpm to install dependencies.'); process.exit(1)}\"",
|