@coze-arch/cli 0.0.13 → 0.0.14-alpha.e0ee3f
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/AGENTS.md +15 -7
- package/lib/__templates__/expo/README.md +15 -7
- package/lib/__templates__/expo/client/eslint.config.mjs +3 -0
- package/lib/__templates__/expo/eslint-plugins/expo/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/expo/rule.js +105 -0
- package/lib/__templates__/expo/eslint-plugins/expo/tech.md +108 -0
- package/lib/__templates__/nextjs/AGENTS.md +9 -0
- package/lib/__templates__/nextjs/eslint.config.mjs +15 -0
- package/lib/__templates__/nextjs/scripts/check-bins.js +73 -0
- package/lib/__templates__/nextjs/scripts/prepare.sh +1 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +24 -14
- package/lib/__templates__/taro/server/package.json +0 -2
- package/lib/__templates__/taro/src/presets/dev-debug.ts +2 -2
- package/lib/__templates__/vite/AGENTS.md +5 -0
- package/lib/cli.js +1 -1
- package/package.json +1 -1
|
@@ -152,17 +152,25 @@ export default function TabLayout() {
|
|
|
152
152
|
'--color-border',
|
|
153
153
|
]) as string[];
|
|
154
154
|
|
|
155
|
+
let tabBarStyle = {
|
|
156
|
+
backgroundColor: background,
|
|
157
|
+
borderTopWidth: 1,
|
|
158
|
+
borderTopColor: border,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// 用于修复 Web 上高度异常的问题(这个 if 逻辑必须添加)
|
|
162
|
+
if (Platform.OS === 'web') {
|
|
163
|
+
tabBarStyle = {
|
|
164
|
+
...tabBarStyle,
|
|
165
|
+
height: 'auto',
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
155
169
|
return (
|
|
156
170
|
<Tabs
|
|
157
171
|
screenOptions={{
|
|
158
172
|
headerShown: false,
|
|
159
|
-
tabBarStyle
|
|
160
|
-
backgroundColor: background,
|
|
161
|
-
borderTopWidth: 1,
|
|
162
|
-
borderTopColor: border,
|
|
163
|
-
// 通过固定宽度 55 来修正 Web 上的表现
|
|
164
|
-
height: Platform.OS === 'web' ? 55 : 50 + insets.bottom,
|
|
165
|
-
},
|
|
173
|
+
tabBarStyle,
|
|
166
174
|
tabBarActiveTintColor: accent,
|
|
167
175
|
tabBarInactiveTintColor: muted,
|
|
168
176
|
}}
|
|
@@ -152,17 +152,25 @@ export default function TabLayout() {
|
|
|
152
152
|
'--color-border',
|
|
153
153
|
]) as string[];
|
|
154
154
|
|
|
155
|
+
let tabBarStyle = {
|
|
156
|
+
backgroundColor: background,
|
|
157
|
+
borderTopWidth: 1,
|
|
158
|
+
borderTopColor: border,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// 用于修复 Web 上高度异常的问题(这个 if 逻辑必须添加)
|
|
162
|
+
if (Platform.OS === 'web') {
|
|
163
|
+
tabBarStyle = {
|
|
164
|
+
...tabBarStyle,
|
|
165
|
+
height: 'auto',
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
155
169
|
return (
|
|
156
170
|
<Tabs
|
|
157
171
|
screenOptions={{
|
|
158
172
|
headerShown: false,
|
|
159
|
-
tabBarStyle
|
|
160
|
-
backgroundColor: background,
|
|
161
|
-
borderTopWidth: 1,
|
|
162
|
-
borderTopColor: border,
|
|
163
|
-
// 通过固定宽度 55 来修正 Web 上的表现
|
|
164
|
-
height: Platform.OS === 'web' ? 55 : 50 + insets.bottom,
|
|
165
|
-
},
|
|
173
|
+
tabBarStyle,
|
|
166
174
|
tabBarActiveTintColor: accent,
|
|
167
175
|
tabBarInactiveTintColor: muted,
|
|
168
176
|
}}
|
|
@@ -10,6 +10,7 @@ import reanimated from '../eslint-plugins/reanimated/index.js';
|
|
|
10
10
|
import reactnative from '../eslint-plugins/react-native/index.js';
|
|
11
11
|
import forbidEmoji from '../eslint-plugins/forbid-emoji/index.js';
|
|
12
12
|
import restrictLinearGradient from '../eslint-plugins/restrict-linear-gradient/index.js';
|
|
13
|
+
import expo from '../eslint-plugins/expo/index.js';
|
|
13
14
|
|
|
14
15
|
export default [
|
|
15
16
|
{
|
|
@@ -66,6 +67,7 @@ export default [
|
|
|
66
67
|
reactnative,
|
|
67
68
|
forbidEmoji,
|
|
68
69
|
restrictLinearGradient,
|
|
70
|
+
expo,
|
|
69
71
|
},
|
|
70
72
|
rules: {
|
|
71
73
|
// 关闭代码风格规则
|
|
@@ -90,6 +92,7 @@ export default [
|
|
|
90
92
|
'reanimated/ban-mix-use': 'error',
|
|
91
93
|
'forbidEmoji/no-emoji': 'error',
|
|
92
94
|
'restrictLinearGradient/no-linear-gradient-backgroundcolor': 'error',
|
|
95
|
+
'expo/require-globalcss-and-provider': 'error',
|
|
93
96
|
// 禁止使用 via.placeholder.com 服务
|
|
94
97
|
'no-restricted-syntax': [
|
|
95
98
|
'error',
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
function normalizeFilename(filename) {
|
|
2
|
+
// ESLint may provide Windows paths; normalize to forward slashes for suffix checks.
|
|
3
|
+
return typeof filename === 'string' ? filename.replace(/\\/g, '/') : ''
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function isTargetLayoutFile(context) {
|
|
7
|
+
return normalizeFilename(context.getFilename()).endsWith('/app/_layout.tsx')
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function isSideEffectImportOf(node, sourceValue) {
|
|
11
|
+
return (
|
|
12
|
+
node &&
|
|
13
|
+
node.type === 'ImportDeclaration' &&
|
|
14
|
+
node.source &&
|
|
15
|
+
node.source.type === 'Literal' &&
|
|
16
|
+
node.source.value === sourceValue &&
|
|
17
|
+
Array.isArray(node.specifiers) &&
|
|
18
|
+
node.specifiers.length === 0
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getProviderImportLocalName(node) {
|
|
23
|
+
if (
|
|
24
|
+
!node ||
|
|
25
|
+
node.type !== 'ImportDeclaration' ||
|
|
26
|
+
!node.source ||
|
|
27
|
+
node.source.type !== 'Literal' ||
|
|
28
|
+
node.source.value !== '@/components/Provider'
|
|
29
|
+
) {
|
|
30
|
+
return null
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const specifiers = Array.isArray(node.specifiers) ? node.specifiers : []
|
|
34
|
+
if (specifiers.length !== 1) return null
|
|
35
|
+
const [specifier] = specifiers
|
|
36
|
+
if (specifier.type !== 'ImportSpecifier') return null
|
|
37
|
+
if (!specifier.imported || specifier.imported.type !== 'Identifier') return null
|
|
38
|
+
if (!specifier.local || specifier.local.type !== 'Identifier') return null
|
|
39
|
+
|
|
40
|
+
// Allow `import { Provider } ...` and `import { Provider as XXX } ...`
|
|
41
|
+
if (specifier.imported.name !== 'Provider') return null
|
|
42
|
+
return specifier.local.name
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
meta: {
|
|
47
|
+
type: 'problem',
|
|
48
|
+
docs: {
|
|
49
|
+
description: 'Require global.css import and Provider usage in app/_layout.tsx',
|
|
50
|
+
recommended: 'error',
|
|
51
|
+
},
|
|
52
|
+
schema: [],
|
|
53
|
+
messages: {
|
|
54
|
+
missingGlobalCssImport: `app/_layout.tsx 必须引入 global.css 文件(参考写法:import '../global.css')`,
|
|
55
|
+
requireProviderImportAndUsage:
|
|
56
|
+
"app/_layout.tsx 必须从 @/components/Provider 导入 Provider(参考写法:import { Provider } from '@/components/Provider'),并使用导入的 Provider 包裹其余组件",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
create(context) {
|
|
61
|
+
if (!isTargetLayoutFile(context)) {
|
|
62
|
+
return {}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let hasGlobalCssImport = false
|
|
66
|
+
let providerImportLocalName = null
|
|
67
|
+
let hasProviderJsxUsage = false
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
Program(node) {
|
|
71
|
+
const body = Array.isArray(node.body) ? node.body : []
|
|
72
|
+
for (const stmt of body) {
|
|
73
|
+
if (isSideEffectImportOf(stmt, '../global.css')) {
|
|
74
|
+
hasGlobalCssImport = true
|
|
75
|
+
}
|
|
76
|
+
const localName = getProviderImportLocalName(stmt)
|
|
77
|
+
if (localName) {
|
|
78
|
+
providerImportLocalName = localName
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
JSXOpeningElement(node) {
|
|
84
|
+
if (!node || !node.name) return
|
|
85
|
+
if (
|
|
86
|
+
providerImportLocalName &&
|
|
87
|
+
node.name.type === 'JSXIdentifier' &&
|
|
88
|
+
node.name.name === providerImportLocalName
|
|
89
|
+
) {
|
|
90
|
+
hasProviderJsxUsage = true
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
'Program:exit'(node) {
|
|
95
|
+
if (!hasGlobalCssImport) {
|
|
96
|
+
context.report({ node, messageId: 'missingGlobalCssImport' })
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!providerImportLocalName || !hasProviderJsxUsage) {
|
|
100
|
+
context.report({ node, messageId: 'requireProviderImportAndUsage' })
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# expo 技术设计(layout 规则)
|
|
2
|
+
|
|
3
|
+
## 目标
|
|
4
|
+
- 强约束 Expo Router 的 `app/_layout.tsx` 模板结构,避免初始化项目后被误删导致运行时样式/上下文缺失
|
|
5
|
+
- 校验 `app/_layout.tsx` 必须:
|
|
6
|
+
- 包含 `import '../global.css'`
|
|
7
|
+
- 使用从 `@/components/Provider` 导入的 Provider 组件作为 JSX 组件(允许 `import { Provider } ...` 或 `import { Provider as XXX } ...`)
|
|
8
|
+
- 实现轻量、易维护,不引入新依赖
|
|
9
|
+
|
|
10
|
+
## 规则命名与对外形态
|
|
11
|
+
- 插件目录:expo/eslint-plugins/expo
|
|
12
|
+
- 规则名:expo/require-globalcss-and-provider
|
|
13
|
+
- 规则类型:problem
|
|
14
|
+
- 默认等级:error
|
|
15
|
+
|
|
16
|
+
## 规则行为定义
|
|
17
|
+
### 报错
|
|
18
|
+
仅对目标文件 `app/_layout.tsx` 生效,满足以下任一情况报错:
|
|
19
|
+
- 缺少 side-effect import:`import '../global.css'`
|
|
20
|
+
- 缺少或不符合要求的 Provider 导入语句:
|
|
21
|
+
- 必须从 `@/components/Provider` 导入
|
|
22
|
+
- 必须为命名导入,导入名必须为 `Provider`
|
|
23
|
+
- 允许形式:
|
|
24
|
+
- `import { Provider } from '@/components/Provider';`
|
|
25
|
+
- `import { Provider as XXX } from '@/components/Provider';`
|
|
26
|
+
- 未在 JSX 中使用导入的 Provider 组件(例如:只导入但从未作为 JSX 组件出现)
|
|
27
|
+
|
|
28
|
+
### 不报错
|
|
29
|
+
- 非 `app/_layout.tsx` 文件不做检查
|
|
30
|
+
- 目标文件同时满足:
|
|
31
|
+
- 存在 `import '../global.css'`
|
|
32
|
+
- 存在 Provider 命名导入(允许 as 别名)
|
|
33
|
+
- JSX 中至少出现一次 `<Provider ...>` / `<Provider>` 或 `<XXX ...>` / `<XXX>`(XXX 为别名)
|
|
34
|
+
|
|
35
|
+
## 检测策略
|
|
36
|
+
### 目标文件判定
|
|
37
|
+
- 通过 `context.getFilename()` 获取当前文件路径
|
|
38
|
+
- 仅当路径以 `/app/_layout.tsx` 结尾时启用规则(同时兼容 Windows 路径分隔符做归一化)
|
|
39
|
+
|
|
40
|
+
### AST 访问节点
|
|
41
|
+
- `Program`:收集顶层 `ImportDeclaration`,判定是否存在目标 import
|
|
42
|
+
- `JSXOpeningElement` / `JSXElement`:判定是否使用 `<Provider>`
|
|
43
|
+
|
|
44
|
+
### Import 判定细则
|
|
45
|
+
- global.css:
|
|
46
|
+
- `ImportDeclaration.source.value === '../global.css'`
|
|
47
|
+
- `ImportDeclaration.specifiers.length === 0`(side-effect import)
|
|
48
|
+
- Provider import(严格形式):
|
|
49
|
+
- `ImportDeclaration.source.value === '@/components/Provider'`
|
|
50
|
+
- `ImportDeclaration.specifiers` 仅包含一个 `ImportSpecifier`
|
|
51
|
+
- `specifier.imported.name === 'Provider'`,`specifier.local.name` 允许为 `Provider` 或任意别名
|
|
52
|
+
|
|
53
|
+
## 报错信息
|
|
54
|
+
- messageId: missingGlobalCssImport
|
|
55
|
+
- 文案:`app/_layout.tsx 必须包含 "import '../global.css';"`
|
|
56
|
+
- messageId: requireProviderImportAndUsage
|
|
57
|
+
- 文案:`app/_layout.tsx 中必须从 @/components/Provider 导入 Provider(参考写法:import { Provider } from '@/components/Provider'),并使用导入的 Provider 包裹其余组件`
|
|
58
|
+
|
|
59
|
+
## 典型示例
|
|
60
|
+
### 触发
|
|
61
|
+
- 缺少 global.css:
|
|
62
|
+
- 未包含 `import '../global.css';`
|
|
63
|
+
- Provider import 形式不对:
|
|
64
|
+
- `import Provider from '@/components/Provider'`
|
|
65
|
+
- `import { Provider } from '@/components/provider'`
|
|
66
|
+
- Provider 未使用:
|
|
67
|
+
- 有 `import { Provider } ...`,但 JSX 中没有 `<Provider>`
|
|
68
|
+
|
|
69
|
+
### 不触发
|
|
70
|
+
```tsx
|
|
71
|
+
import { Provider } from '@/components/Provider';
|
|
72
|
+
import '../global.css';
|
|
73
|
+
|
|
74
|
+
export default function RootLayout() {
|
|
75
|
+
return (
|
|
76
|
+
<Provider>
|
|
77
|
+
{/* ... */}
|
|
78
|
+
</Provider>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { Provider as AppProvider } from '@/components/Provider';
|
|
85
|
+
import '../global.css';
|
|
86
|
+
|
|
87
|
+
export default function RootLayout() {
|
|
88
|
+
return (
|
|
89
|
+
<AppProvider>
|
|
90
|
+
{/* ... */}
|
|
91
|
+
</AppProvider>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 边界与决策
|
|
97
|
+
- 仅做结构约束,不尝试自动修复(fixer)以避免在 TSX 顶部插入 import 引起格式与注释位置变化
|
|
98
|
+
- 仅检查 JSX 中的 `<Provider>` 使用,不做“必须最外层包裹”的结构分析,降低复杂度与误报
|
|
99
|
+
|
|
100
|
+
## 性能考虑
|
|
101
|
+
- 仅在命中目标文件时启用
|
|
102
|
+
- 仅扫描顶层 import 与 JSX 标签名,复杂度 O(n)
|
|
103
|
+
|
|
104
|
+
## 测试计划
|
|
105
|
+
- 缺少 global.css import:报 `missingGlobalCssImport`
|
|
106
|
+
- 未从 `@/components/Provider` 正确导入 Provider:报 `requireProviderImportAndUsage`
|
|
107
|
+
- Provider 未在 JSX 使用:报 `requireProviderImportAndUsage`
|
|
108
|
+
- 满足全部要求:不报错
|
|
@@ -42,6 +42,15 @@
|
|
|
42
42
|
|
|
43
43
|
## 开发规范
|
|
44
44
|
|
|
45
|
+
### 编码规范
|
|
46
|
+
|
|
47
|
+
- 默认按 TypeScript `strict` 心智写代码;优先复用当前作用域已声明的变量、函数、类型和导入,禁止引用未声明标识符或拼错变量名。
|
|
48
|
+
- 禁止隐式 `any` 和 `as any`;函数参数、返回值、解构项、事件对象、`catch` 错误在使用前应有明确类型或先完成类型收窄,并清理未使用的变量和导入。
|
|
49
|
+
|
|
50
|
+
### next.config 配置规范
|
|
51
|
+
|
|
52
|
+
- 配置的路径不要写死绝对路径,必须使用 path.resolve(__dirname, ...)、import.meta.dirname 或 process.cwd() 动态拼接。
|
|
53
|
+
|
|
45
54
|
### Hydration 问题防范
|
|
46
55
|
|
|
47
56
|
1. 严禁在 JSX 渲染逻辑中直接使用 typeof window、Date.now()、Math.random() 等动态数据。**必须使用 'use client' 并配合 useEffect + useState 确保动态内容仅在客户端挂载后渲染**;同时严禁非法 HTML 嵌套(如 <p> 嵌套 <div>)。
|
|
@@ -10,6 +10,15 @@ const syntaxRules = [
|
|
|
10
10
|
},
|
|
11
11
|
];
|
|
12
12
|
|
|
13
|
+
const nextConfigRestrictedSyntaxRules = [
|
|
14
|
+
{
|
|
15
|
+
selector:
|
|
16
|
+
'Property[key.name=/^(root|outputFileTracingRoot)$/] > Literal[value=/^\\//]',
|
|
17
|
+
message:
|
|
18
|
+
'禁止在 next.config 中写死绝对路径,请改用 path.resolve(__dirname, ...)、import.meta.dirname 或 process.cwd() 动态拼接。',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
|
|
13
22
|
const eslintConfig = defineConfig([
|
|
14
23
|
...nextVitals,
|
|
15
24
|
...nextTs,
|
|
@@ -19,6 +28,12 @@ const eslintConfig = defineConfig([
|
|
|
19
28
|
'no-restricted-syntax': ['error', ...syntaxRules],
|
|
20
29
|
},
|
|
21
30
|
},
|
|
31
|
+
{
|
|
32
|
+
files: ['next.config.ts'],
|
|
33
|
+
rules: {
|
|
34
|
+
'no-restricted-syntax': ['error', ...nextConfigRestrictedSyntaxRules],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
22
37
|
// Override default ignores of eslint-config-next.
|
|
23
38
|
globalIgnores([
|
|
24
39
|
// Default ignores of eslint-config-next:
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('fs/promises');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { execSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
async function checkBins() {
|
|
9
|
+
const cwd = path.join(__dirname, '..');
|
|
10
|
+
|
|
11
|
+
const pkgJson = JSON.parse(
|
|
12
|
+
await fs.readFile(path.join(cwd, 'package.json'), 'utf8'),
|
|
13
|
+
);
|
|
14
|
+
const allDeps = Object.keys({
|
|
15
|
+
...pkgJson.dependencies,
|
|
16
|
+
...pkgJson.devDependencies,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const binDir = path.join(cwd, 'node_modules', '.bin');
|
|
20
|
+
const missing = [];
|
|
21
|
+
|
|
22
|
+
await Promise.all(
|
|
23
|
+
allDeps.map(async depName => {
|
|
24
|
+
const depPkgPath = path.join(
|
|
25
|
+
cwd,
|
|
26
|
+
'node_modules',
|
|
27
|
+
depName,
|
|
28
|
+
'package.json',
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
let depPkg;
|
|
32
|
+
try {
|
|
33
|
+
depPkg = JSON.parse(await fs.readFile(depPkgPath, 'utf8'));
|
|
34
|
+
} catch {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!depPkg.bin) return;
|
|
39
|
+
|
|
40
|
+
// bin can be a string (single binary named after the package) or an object
|
|
41
|
+
const bins =
|
|
42
|
+
typeof depPkg.bin === 'string'
|
|
43
|
+
? { [depName.split('/').pop()]: depPkg.bin }
|
|
44
|
+
: depPkg.bin;
|
|
45
|
+
|
|
46
|
+
await Promise.all(
|
|
47
|
+
Object.keys(bins).map(async binName => {
|
|
48
|
+
try {
|
|
49
|
+
await fs.access(path.join(binDir, binName));
|
|
50
|
+
} catch {
|
|
51
|
+
missing.push({ dep: depName, bin: binName });
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
if (missing.length === 0) {
|
|
59
|
+
console.log('check-bins: all bin entries present, skipping force install.');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
console.log('check-bins: missing bin entries detected:');
|
|
64
|
+
for (const { dep, bin } of missing) {
|
|
65
|
+
console.log(` ${dep} -> .bin/${bin}`);
|
|
66
|
+
}
|
|
67
|
+
console.log('check-bins: running pnpm i --force to fix...');
|
|
68
|
+
execSync('pnpm i --force', { stdio: 'inherit', cwd });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
checkBins().catch(err => {
|
|
72
|
+
console.warn('check-bins: skipped due to error:', err.message);
|
|
73
|
+
});
|
|
@@ -197,9 +197,6 @@ importers:
|
|
|
197
197
|
'@supabase/supabase-js':
|
|
198
198
|
specifier: 2.95.3
|
|
199
199
|
version: 2.95.3
|
|
200
|
-
better-sqlite3:
|
|
201
|
-
specifier: ^11.9.1
|
|
202
|
-
version: 11.10.0
|
|
203
200
|
coze-coding-dev-sdk:
|
|
204
201
|
specifier: ^0.7.16
|
|
205
202
|
version: 0.7.16(openai@6.16.0(ws@8.19.0)(zod@4.3.5))(ws@8.19.0)
|
|
@@ -234,9 +231,6 @@ importers:
|
|
|
234
231
|
'@nestjs/schematics':
|
|
235
232
|
specifier: ^10.2.3
|
|
236
233
|
version: 10.2.3(chokidar@3.6.0)(typescript@5.9.3)
|
|
237
|
-
'@types/better-sqlite3':
|
|
238
|
-
specifier: ^7.6.13
|
|
239
|
-
version: 7.6.13
|
|
240
234
|
'@types/express':
|
|
241
235
|
specifier: 5.0.6
|
|
242
236
|
version: 5.0.6
|
|
@@ -15586,6 +15580,7 @@ snapshots:
|
|
|
15586
15580
|
'@types/better-sqlite3@7.6.13':
|
|
15587
15581
|
dependencies:
|
|
15588
15582
|
'@types/node': 22.19.6
|
|
15583
|
+
optional: true
|
|
15589
15584
|
|
|
15590
15585
|
'@types/body-parser@1.19.6':
|
|
15591
15586
|
dependencies:
|
|
@@ -16921,6 +16916,7 @@ snapshots:
|
|
|
16921
16916
|
dependencies:
|
|
16922
16917
|
bindings: 1.5.0
|
|
16923
16918
|
prebuild-install: 7.1.3
|
|
16919
|
+
optional: true
|
|
16924
16920
|
|
|
16925
16921
|
big-integer@1.6.52: {}
|
|
16926
16922
|
|
|
@@ -16936,6 +16932,7 @@ snapshots:
|
|
|
16936
16932
|
bindings@1.5.0:
|
|
16937
16933
|
dependencies:
|
|
16938
16934
|
file-uri-to-path: 1.0.0
|
|
16935
|
+
optional: true
|
|
16939
16936
|
|
|
16940
16937
|
bl@1.2.3:
|
|
16941
16938
|
dependencies:
|
|
@@ -17239,7 +17236,8 @@ snapshots:
|
|
|
17239
17236
|
dependencies:
|
|
17240
17237
|
readdirp: 5.0.0
|
|
17241
17238
|
|
|
17242
|
-
chownr@1.1.4:
|
|
17239
|
+
chownr@1.1.4:
|
|
17240
|
+
optional: true
|
|
17243
17241
|
|
|
17244
17242
|
chroma-js@2.6.0: {}
|
|
17245
17243
|
|
|
@@ -17735,6 +17733,7 @@ snapshots:
|
|
|
17735
17733
|
decompress-response@6.0.0:
|
|
17736
17734
|
dependencies:
|
|
17737
17735
|
mimic-response: 3.1.0
|
|
17736
|
+
optional: true
|
|
17738
17737
|
|
|
17739
17738
|
decompress-tar@4.1.1:
|
|
17740
17739
|
dependencies:
|
|
@@ -18491,7 +18490,8 @@ snapshots:
|
|
|
18491
18490
|
|
|
18492
18491
|
exif-parser@0.1.12: {}
|
|
18493
18492
|
|
|
18494
|
-
expand-template@2.0.3:
|
|
18493
|
+
expand-template@2.0.3:
|
|
18494
|
+
optional: true
|
|
18495
18495
|
|
|
18496
18496
|
express@4.21.2:
|
|
18497
18497
|
dependencies:
|
|
@@ -18679,7 +18679,8 @@ snapshots:
|
|
|
18679
18679
|
|
|
18680
18680
|
file-type@8.1.0: {}
|
|
18681
18681
|
|
|
18682
|
-
file-uri-to-path@1.0.0:
|
|
18682
|
+
file-uri-to-path@1.0.0:
|
|
18683
|
+
optional: true
|
|
18683
18684
|
|
|
18684
18685
|
filename-reserved-regex@2.0.0: {}
|
|
18685
18686
|
|
|
@@ -18963,7 +18964,8 @@ snapshots:
|
|
|
18963
18964
|
|
|
18964
18965
|
git-clone@0.1.0: {}
|
|
18965
18966
|
|
|
18966
|
-
github-from-package@0.0.0:
|
|
18967
|
+
github-from-package@0.0.0:
|
|
18968
|
+
optional: true
|
|
18967
18969
|
|
|
18968
18970
|
glob-parent@5.1.2:
|
|
18969
18971
|
dependencies:
|
|
@@ -20214,7 +20216,8 @@ snapshots:
|
|
|
20214
20216
|
|
|
20215
20217
|
mimic-response@1.0.1: {}
|
|
20216
20218
|
|
|
20217
|
-
mimic-response@3.1.0:
|
|
20219
|
+
mimic-response@3.1.0:
|
|
20220
|
+
optional: true
|
|
20218
20221
|
|
|
20219
20222
|
min-document@2.19.2:
|
|
20220
20223
|
dependencies:
|
|
@@ -20446,7 +20449,8 @@ snapshots:
|
|
|
20446
20449
|
|
|
20447
20450
|
mkdir-p@0.0.7: {}
|
|
20448
20451
|
|
|
20449
|
-
mkdirp-classic@0.5.3:
|
|
20452
|
+
mkdirp-classic@0.5.3:
|
|
20453
|
+
optional: true
|
|
20450
20454
|
|
|
20451
20455
|
mkdirp@0.5.6:
|
|
20452
20456
|
dependencies:
|
|
@@ -20503,7 +20507,8 @@ snapshots:
|
|
|
20503
20507
|
|
|
20504
20508
|
nanoid@3.3.11: {}
|
|
20505
20509
|
|
|
20506
|
-
napi-build-utils@2.0.0:
|
|
20510
|
+
napi-build-utils@2.0.0:
|
|
20511
|
+
optional: true
|
|
20507
20512
|
|
|
20508
20513
|
natural-compare@1.4.0: {}
|
|
20509
20514
|
|
|
@@ -20545,6 +20550,7 @@ snapshots:
|
|
|
20545
20550
|
node-abi@3.87.0:
|
|
20546
20551
|
dependencies:
|
|
20547
20552
|
semver: 7.7.4
|
|
20553
|
+
optional: true
|
|
20548
20554
|
|
|
20549
20555
|
node-abort-controller@3.1.1: {}
|
|
20550
20556
|
|
|
@@ -21505,6 +21511,7 @@ snapshots:
|
|
|
21505
21511
|
simple-get: 4.0.1
|
|
21506
21512
|
tar-fs: 2.1.4
|
|
21507
21513
|
tunnel-agent: 0.6.0
|
|
21514
|
+
optional: true
|
|
21508
21515
|
|
|
21509
21516
|
prelude-ls@1.2.1: {}
|
|
21510
21517
|
|
|
@@ -22232,13 +22239,15 @@ snapshots:
|
|
|
22232
22239
|
|
|
22233
22240
|
signal-exit@4.1.0: {}
|
|
22234
22241
|
|
|
22235
|
-
simple-concat@1.0.1:
|
|
22242
|
+
simple-concat@1.0.1:
|
|
22243
|
+
optional: true
|
|
22236
22244
|
|
|
22237
22245
|
simple-get@4.0.1:
|
|
22238
22246
|
dependencies:
|
|
22239
22247
|
decompress-response: 6.0.0
|
|
22240
22248
|
once: 1.4.0
|
|
22241
22249
|
simple-concat: 1.0.1
|
|
22250
|
+
optional: true
|
|
22242
22251
|
|
|
22243
22252
|
simple-plist@1.3.1:
|
|
22244
22253
|
dependencies:
|
|
@@ -22650,6 +22659,7 @@ snapshots:
|
|
|
22650
22659
|
mkdirp-classic: 0.5.3
|
|
22651
22660
|
pump: 3.0.3
|
|
22652
22661
|
tar-stream: 2.2.0
|
|
22662
|
+
optional: true
|
|
22653
22663
|
|
|
22654
22664
|
tar-stream@1.6.2:
|
|
22655
22665
|
dependencies:
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"@nestjs/core": "^10.4.15",
|
|
18
18
|
"@nestjs/platform-express": "^10.4.15",
|
|
19
19
|
"@supabase/supabase-js": "2.95.3",
|
|
20
|
-
"better-sqlite3": "^11.9.1",
|
|
21
20
|
"coze-coding-dev-sdk": "^0.7.16",
|
|
22
21
|
"dotenv": "^17.2.3",
|
|
23
22
|
"drizzle-kit": "^0.31.8",
|
|
@@ -31,7 +30,6 @@
|
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@nestjs/cli": "^10.4.9",
|
|
33
32
|
"@nestjs/schematics": "^10.2.3",
|
|
34
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
35
33
|
"@types/express": "5.0.6",
|
|
36
34
|
"@types/node": "^22.10.2",
|
|
37
35
|
"drizzle-kit": "^0.31.8",
|
|
@@ -3,11 +3,11 @@ import Taro from '@tarojs/taro';
|
|
|
3
3
|
/**
|
|
4
4
|
* 小程序调试工具
|
|
5
5
|
* 在开发版/体验版自动开启调试模式
|
|
6
|
-
*
|
|
6
|
+
* 支持微信小程序
|
|
7
7
|
*/
|
|
8
8
|
export function devDebug() {
|
|
9
9
|
const env = Taro.getEnv();
|
|
10
|
-
if (env === Taro.ENV_TYPE.WEAPP
|
|
10
|
+
if (env === Taro.ENV_TYPE.WEAPP) {
|
|
11
11
|
try {
|
|
12
12
|
const accountInfo = Taro.getAccountInfoSync();
|
|
13
13
|
const envVersion = accountInfo.miniProgram.envVersion;
|
package/lib/cli.js
CHANGED
|
@@ -2107,7 +2107,7 @@ const EventBuilder = {
|
|
|
2107
2107
|
};
|
|
2108
2108
|
|
|
2109
2109
|
var name = "@coze-arch/cli";
|
|
2110
|
-
var version = "0.0.
|
|
2110
|
+
var version = "0.0.14-alpha.e0ee3f";
|
|
2111
2111
|
var description = "coze coding devtools cli";
|
|
2112
2112
|
var license = "MIT";
|
|
2113
2113
|
var author = "fanwenjie.fe@bytedance.com";
|