@coze-arch/cli 0.0.1-alpha.224471 → 0.0.1-alpha.225a7a
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/.cozeproj/scripts/dev_run.sh +25 -16
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +9 -8
- package/lib/__templates__/expo/README.md +2 -2
- package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/app/_layout.tsx +11 -8
- package/lib/__templates__/expo/client/app.config.ts +2 -2
- package/lib/__templates__/expo/client/components/Screen.tsx +1 -17
- package/lib/__templates__/expo/client/components/ThemedView.tsx +1 -2
- package/lib/__templates__/expo/client/constants/theme.ts +21 -698
- package/lib/__templates__/expo/client/eslint.config.mjs +20 -0
- package/lib/__templates__/expo/client/hooks/{useColorScheme.ts → useColorScheme.tsx} +20 -6
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/package.json +36 -34
- package/lib/__templates__/expo/client/screens/demo/index.tsx +3 -3
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1886 -2483
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +20 -1
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
- package/lib/__templates__/expo/package.json +3 -0
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1258 -2632
- package/lib/__templates__/expo/server/package.json +1 -1
- package/lib/__templates__/expo/server/src/index.ts +1 -0
- package/lib/__templates__/expo/template.config.js +56 -0
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/package.json +9 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2603 -1728
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -3
- package/lib/__templates__/nextjs/src/app/page.tsx +18 -60
- package/lib/__templates__/nextjs/template.config.js +47 -12
- package/lib/__templates__/taro/.coze +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +81 -0
- package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +1 -0
- package/lib/__templates__/taro/README.md +687 -0
- package/lib/__templates__/taro/_gitignore +40 -0
- package/lib/__templates__/taro/_npmrc +18 -0
- package/lib/__templates__/taro/babel.config.js +12 -0
- package/lib/__templates__/taro/config/dev.ts +9 -0
- package/lib/__templates__/taro/config/index.ts +173 -0
- package/lib/__templates__/taro/config/prod.ts +35 -0
- package/lib/__templates__/taro/eslint.config.mjs +57 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +95 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +22430 -0
- package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
- package/lib/__templates__/taro/project.config.json +15 -0
- package/lib/__templates__/taro/server/nest-cli.json +10 -0
- package/lib/__templates__/taro/server/package.json +38 -0
- package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
- package/lib/__templates__/taro/server/src/app.module.ts +10 -0
- package/lib/__templates__/taro/server/src/app.service.ts +8 -0
- package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
- package/lib/__templates__/taro/server/src/main.ts +49 -0
- package/lib/__templates__/taro/server/tsconfig.json +24 -0
- package/lib/__templates__/taro/src/app.config.ts +11 -0
- package/lib/__templates__/taro/src/app.css +52 -0
- package/lib/__templates__/taro/src/app.ts +14 -0
- package/lib/__templates__/taro/src/index.html +39 -0
- package/lib/__templates__/taro/src/network.ts +39 -0
- package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
- package/lib/__templates__/taro/src/pages/index/index.css +1 -0
- package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
- package/lib/__templates__/taro/src/utils/h5-styles.ts +22 -0
- package/lib/__templates__/taro/src/utils/wx-debug.ts +23 -0
- package/lib/__templates__/taro/stylelint.config.mjs +4 -0
- package/lib/__templates__/taro/template.config.js +68 -0
- package/lib/__templates__/taro/tsconfig.json +29 -0
- package/lib/__templates__/taro/types/global.d.ts +32 -0
- package/lib/__templates__/templates.json +32 -0
- package/lib/__templates__/vite/package.json +6 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +504 -982
- package/lib/__templates__/vite/src/main.ts +17 -47
- package/lib/__templates__/vite/template.config.js +47 -10
- package/lib/cli.js +856 -108
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { resolve, join, basename } from 'path';
|
|
5
|
+
import { appendFileSync, openSync, closeSync, mkdirSync } from 'fs';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
|
|
@@ -45,6 +48,59 @@ const config = {
|
|
|
45
48
|
console.log(` - Framework: Expo`);
|
|
46
49
|
console.log(` - Port: ${context.port}`);
|
|
47
50
|
},
|
|
51
|
+
onComplete: async (_context, outputPath) => {
|
|
52
|
+
// Skip pnpm update in test environment to avoid monorepo workspace issues
|
|
53
|
+
if (process.env.NODE_ENV === 'test') {
|
|
54
|
+
console.log('⊘ Skipping dependency update in test environment');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const cmd = 'pnpm';
|
|
59
|
+
const args = ['-r', 'up', 'coze-coding-dev-sdk@^0.7.0'];
|
|
60
|
+
console.log(
|
|
61
|
+
`\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const projectRoot = resolve(outputPath);
|
|
66
|
+
|
|
67
|
+
// Determine log directory
|
|
68
|
+
const logDir = process.env.COZE_LOG_DIR || resolve(__dirname, '../.log');
|
|
69
|
+
mkdirSync(logDir, { recursive: true });
|
|
70
|
+
|
|
71
|
+
// Use project name in log file to avoid conflicts
|
|
72
|
+
const projectName = basename(projectRoot);
|
|
73
|
+
const logFile = join(logDir, `${projectName}-init.log`);
|
|
74
|
+
|
|
75
|
+
// Write log header
|
|
76
|
+
const timestamp = new Date().toISOString();
|
|
77
|
+
appendFileSync(
|
|
78
|
+
logFile,
|
|
79
|
+
`\n=== [${timestamp}] ${cmd} ${args.join(' ')} ===\n`,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Open log file for appending
|
|
83
|
+
const logFd = openSync(logFile, 'a');
|
|
84
|
+
|
|
85
|
+
// Spawn in detached mode
|
|
86
|
+
const child = spawn(cmd, args, {
|
|
87
|
+
cwd: projectRoot,
|
|
88
|
+
detached: true,
|
|
89
|
+
stdio: ['ignore', logFd, logFd],
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
child.unref();
|
|
93
|
+
closeSync(logFd);
|
|
94
|
+
|
|
95
|
+
console.log(
|
|
96
|
+
'✓ coze-coding-dev-sdk update triggered (running in background)',
|
|
97
|
+
);
|
|
98
|
+
console.log(` Log file: ${logFile}`);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('✗ Failed to trigger coze-coding-dev-sdk update:', error);
|
|
101
|
+
console.log(' You can manually run: pnpm update coze-coding-dev-sdk');
|
|
102
|
+
}
|
|
103
|
+
},
|
|
48
104
|
};
|
|
49
105
|
|
|
50
106
|
export default config;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"class-variance-authority": "^0.7.1",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
45
45
|
"cmdk": "^1.1.1",
|
|
46
|
-
"coze-coding-dev-sdk": "^0.7.
|
|
46
|
+
"coze-coding-dev-sdk": "^0.7.3",
|
|
47
47
|
"date-fns": "^4.1.0",
|
|
48
48
|
"drizzle-kit": "^0.31.8",
|
|
49
49
|
"drizzle-orm": "^0.45.1",
|
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
"zod": "^4.3.5"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
+
"@react-dev-inspector/babel-plugin": "^2.0.1",
|
|
71
|
+
"@react-dev-inspector/middleware": "^2.0.1",
|
|
70
72
|
"@tailwindcss/postcss": "^4",
|
|
71
73
|
"@types/node": "^20",
|
|
72
74
|
"@types/pg": "^8.16.0",
|
|
@@ -75,6 +77,7 @@
|
|
|
75
77
|
"eslint": "^9",
|
|
76
78
|
"eslint-config-next": "16.1.1",
|
|
77
79
|
"only-allow": "^1.2.2",
|
|
80
|
+
"react-dev-inspector": "^2.0.1",
|
|
78
81
|
"shadcn": "latest",
|
|
79
82
|
"tailwindcss": "^4",
|
|
80
83
|
"typescript": "^5"
|
|
@@ -82,5 +85,10 @@
|
|
|
82
85
|
"packageManager": "pnpm@9.0.0",
|
|
83
86
|
"engines": {
|
|
84
87
|
"pnpm": ">=9.0.0"
|
|
88
|
+
},
|
|
89
|
+
"pnpm": {
|
|
90
|
+
"overrides": {
|
|
91
|
+
"esbuild": "^0.25.12"
|
|
92
|
+
}
|
|
85
93
|
}
|
|
86
94
|
}
|