@coze-arch/cli 0.0.1-alpha.c3932f → 0.0.1-alpha.c47a58
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/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/app.config.ts +2 -2
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/package.json +1 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +91 -83
- package/lib/__templates__/nextjs/next.config.ts +1 -1
- package/lib/cli.js +267 -87
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
2
|
+
import { Link } from 'expo-router';
|
|
3
|
+
import { useTheme } from '@/hooks/useTheme';
|
|
4
|
+
import { Spacing } from '@/constants/theme';
|
|
5
|
+
|
|
6
|
+
export default function NotFoundScreen() {
|
|
7
|
+
const { theme } = useTheme();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<View style={[styles.container, { backgroundColor: theme.backgroundRoot }]}>
|
|
11
|
+
<Text>
|
|
12
|
+
页面不存在
|
|
13
|
+
</Text>
|
|
14
|
+
<Link href="/" style={[styles.gohome]}>
|
|
15
|
+
返回首页
|
|
16
|
+
</Link>
|
|
17
|
+
</View>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container: {
|
|
23
|
+
flex: 1,
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
},
|
|
27
|
+
gohome: {
|
|
28
|
+
marginTop: Spacing['2xl'],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig, ConfigContext } from 'expo/config';
|
|
2
2
|
|
|
3
|
-
const appName = process.env.EXPO_PUBLIC_COZE_PROJECT_NAME || '应用';
|
|
4
|
-
const projectId = process.env.EXPO_PUBLIC_COZE_PROJECT_ID;
|
|
3
|
+
const appName = process.env.COZE_PROJECT_NAME || process.env.EXPO_PUBLIC_COZE_PROJECT_NAME || '应用';
|
|
4
|
+
const projectId = process.env.COZE_PROJECT_ID || process.env.EXPO_PUBLIC_COZE_PROJECT_ID;
|
|
5
5
|
const slugAppName = projectId ? `app${projectId}` : 'myapp';
|
|
6
6
|
|
|
7
7
|
export default ({ config }: ConfigContext): ExpoConfig => {
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 安全路由 Hook - 完全代替原生的 useRouter 和 useLocalSearchParams
|
|
3
|
+
*
|
|
4
|
+
* 提供的 Hook:
|
|
5
|
+
* - useSafeRouter: 代替 useRouter,包含所有路由方法,并对 push/replace/navigate/setParams 进行安全编码
|
|
6
|
+
* - useSafeSearchParams: 代替 useLocalSearchParams,获取路由参数
|
|
7
|
+
*
|
|
8
|
+
* 解决的问题:
|
|
9
|
+
* 1. URI 编解码不对称 - useLocalSearchParams 会自动解码,但 router.push 不会自动编码,
|
|
10
|
+
* 当参数包含 % 等特殊字符时会拿到错误的值
|
|
11
|
+
* 2. 类型丢失 - URL 参数全是 string,Number/Boolean 类型会丢失
|
|
12
|
+
* 3. 嵌套对象无法传递 - URL search params 不支持嵌套结构
|
|
13
|
+
*
|
|
14
|
+
* 解决方案:
|
|
15
|
+
* 采用 Payload 模式,将所有参数打包成 JSON 并 Base64 编码后传递,
|
|
16
|
+
* 接收时再解码还原,确保数据完整性和类型安全。
|
|
17
|
+
*
|
|
18
|
+
* 优点:
|
|
19
|
+
* 1. 自动处理所有特殊字符(如 %、&、=、中文、Emoji 等)
|
|
20
|
+
* 2. 保留数据类型(Number、Boolean 不会变成 String)
|
|
21
|
+
* 3. 支持嵌套对象和数组传递
|
|
22
|
+
* 4. 三端兼容(iOS、Android、Web)
|
|
23
|
+
*
|
|
24
|
+
* 使用方式:
|
|
25
|
+
* ```tsx
|
|
26
|
+
* // 发送端 - 使用 useSafeRouter 代替 useRouter
|
|
27
|
+
* const router = useSafeRouter();
|
|
28
|
+
* router.push('/detail', { id: 123, uri: 'file:///path/%40test.mp3' });
|
|
29
|
+
* router.replace('/home', { tab: 'settings' });
|
|
30
|
+
* router.navigate('/profile', { userId: 456 });
|
|
31
|
+
* router.back();
|
|
32
|
+
* if (router.canGoBack()) { ... }
|
|
33
|
+
* router.setParams({ updated: true });
|
|
34
|
+
*
|
|
35
|
+
* // 接收端 - 使用 useSafeSearchParams 代替 useLocalSearchParams
|
|
36
|
+
* const { id, uri } = useSafeSearchParams<{ id: number; uri: string }>();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
import { useMemo } from 'react';
|
|
40
|
+
import { useRouter as useExpoRouter, useLocalSearchParams as useExpoParams } from 'expo-router';
|
|
41
|
+
import { Base64 } from 'js-base64';
|
|
42
|
+
|
|
43
|
+
const PAYLOAD_KEY = '__safeRouterPayload__';
|
|
44
|
+
const LOG_PREFIX = '[SafeRouter]';
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const getCurrentParams = (rawParams: Record<string, string | string[]>): Record<string, unknown> => {
|
|
48
|
+
const payload = rawParams[PAYLOAD_KEY];
|
|
49
|
+
if (payload && typeof payload === 'string') {
|
|
50
|
+
const decoded = deserializeParams<Record<string, unknown>>(payload);
|
|
51
|
+
if (decoded && Object.keys(decoded).length > 0) {
|
|
52
|
+
return decoded;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const { [PAYLOAD_KEY]: _, ...rest } = rawParams;
|
|
56
|
+
return rest as Record<string, unknown>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const serializeParams = (params: Record<string, unknown>): string => {
|
|
60
|
+
try {
|
|
61
|
+
const jsonStr = JSON.stringify(params);
|
|
62
|
+
return Base64.encode(jsonStr);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error(LOG_PREFIX, 'serialize failed:', error instanceof Error ? error.message : 'Unknown error');
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const deserializeParams = <T = Record<string, unknown>>(
|
|
70
|
+
payload: string | string[] | undefined
|
|
71
|
+
): T | null => {
|
|
72
|
+
if (!payload || typeof payload !== 'string') {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const jsonStr = Base64.decode(payload);
|
|
77
|
+
return JSON.parse(jsonStr) as T;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error(LOG_PREFIX, 'deserialize failed:', error instanceof Error ? error.message : 'Unknown error');
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 安全路由 Hook,用于页面跳转,代替 useRouter
|
|
87
|
+
* @returns 路由方法(继承 useRouter 所有方法,并对以下方法进行安全编码)
|
|
88
|
+
* - push(pathname, params) - 入栈新页面
|
|
89
|
+
* - replace(pathname, params) - 替换当前页面
|
|
90
|
+
* - navigate(pathname, params) - 智能跳转(已存在则返回,否则 push)
|
|
91
|
+
* - setParams(params) - 更新当前页面参数(合并现有参数)
|
|
92
|
+
*/
|
|
93
|
+
export function useSafeRouter() {
|
|
94
|
+
const router = useExpoRouter();
|
|
95
|
+
const rawParams = useExpoParams<Record<string, string | string[]>>();
|
|
96
|
+
|
|
97
|
+
const push = (pathname: string, params: Record<string, unknown> = {}) => {
|
|
98
|
+
const encodedPayload = serializeParams(params);
|
|
99
|
+
router.push({
|
|
100
|
+
pathname: pathname as `/${string}`,
|
|
101
|
+
params: { [PAYLOAD_KEY]: encodedPayload },
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const replace = (pathname: string, params: Record<string, unknown> = {}) => {
|
|
106
|
+
const encodedPayload = serializeParams(params);
|
|
107
|
+
router.replace({
|
|
108
|
+
pathname: pathname as `/${string}`,
|
|
109
|
+
params: { [PAYLOAD_KEY]: encodedPayload },
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const navigate = (pathname: string, params: Record<string, unknown> = {}) => {
|
|
114
|
+
const encodedPayload = serializeParams(params);
|
|
115
|
+
router.navigate({
|
|
116
|
+
pathname: pathname as `/${string}`,
|
|
117
|
+
params: { [PAYLOAD_KEY]: encodedPayload },
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const setParams = (params: Record<string, unknown>) => {
|
|
122
|
+
const currentParams = getCurrentParams(rawParams);
|
|
123
|
+
const mergedParams = { ...currentParams, ...params };
|
|
124
|
+
const encodedPayload = serializeParams(mergedParams);
|
|
125
|
+
router.setParams({ [PAYLOAD_KEY]: encodedPayload });
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
...router,
|
|
130
|
+
push,
|
|
131
|
+
replace,
|
|
132
|
+
navigate,
|
|
133
|
+
setParams,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 安全获取路由参数 Hook,用于接收方,代替 useLocalSearchParams
|
|
139
|
+
* 兼容两种跳转方式:
|
|
140
|
+
* 1. useSafeRouter 跳转 - 自动解码 Payload
|
|
141
|
+
* 2. 外部跳转(深链接、浏览器直接访问等)- 回退到原始参数
|
|
142
|
+
* @returns 解码后的参数对象,类型安全
|
|
143
|
+
*/
|
|
144
|
+
export function useSafeSearchParams<T = Record<string, unknown>>(): T {
|
|
145
|
+
const rawParams = useExpoParams<Record<string, string | string[]>>();
|
|
146
|
+
|
|
147
|
+
const decodedParams = useMemo(() => {
|
|
148
|
+
return getCurrentParams(rawParams) as T;
|
|
149
|
+
}, [rawParams]);
|
|
150
|
+
|
|
151
|
+
return decodedParams;
|
|
152
|
+
}
|
|
@@ -18,13 +18,13 @@ importers:
|
|
|
18
18
|
version: 6.1.2(expo@54.0.30)(react-dom@19.1.0(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
19
19
|
'@expo/vector-icons':
|
|
20
20
|
specifier: ^15.0.0
|
|
21
|
-
version: 15.0.3(expo-font@14.0.10(expo@54.0.30
|
|
21
|
+
version: 15.0.3(expo-font@14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
22
22
|
'@react-native-async-storage/async-storage':
|
|
23
23
|
specifier: ^2.2.0
|
|
24
24
|
version: 2.2.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
25
25
|
'@react-native-community/datetimepicker':
|
|
26
26
|
specifier: ^8.5.0
|
|
27
|
-
version: 8.5.1(expo@54.0.30
|
|
27
|
+
version: 8.5.1(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
28
28
|
'@react-native-community/slider':
|
|
29
29
|
specifier: ^5.0.1
|
|
30
30
|
version: 5.1.1
|
|
@@ -48,61 +48,64 @@ importers:
|
|
|
48
48
|
version: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
49
49
|
expo-auth-session:
|
|
50
50
|
specifier: ^7.0.9
|
|
51
|
-
version: 7.0.10(expo@54.0.30
|
|
51
|
+
version: 7.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
52
52
|
expo-av:
|
|
53
53
|
specifier: ~16.0.6
|
|
54
|
-
version: 16.0.8(expo@54.0.30
|
|
54
|
+
version: 16.0.8(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
55
55
|
expo-blur:
|
|
56
56
|
specifier: ~15.0.6
|
|
57
|
-
version: 15.0.8(expo@54.0.30
|
|
57
|
+
version: 15.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
58
58
|
expo-camera:
|
|
59
59
|
specifier: ~17.0.10
|
|
60
|
-
version: 17.0.10(expo@54.0.30
|
|
60
|
+
version: 17.0.10(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
61
61
|
expo-constants:
|
|
62
62
|
specifier: ~18.0.8
|
|
63
|
-
version: 18.0.12(expo@54.0.30
|
|
63
|
+
version: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
64
64
|
expo-crypto:
|
|
65
65
|
specifier: ^15.0.7
|
|
66
|
-
version: 15.0.8(expo@54.0.30
|
|
66
|
+
version: 15.0.8(expo@54.0.30)
|
|
67
67
|
expo-font:
|
|
68
68
|
specifier: ~14.0.7
|
|
69
|
-
version: 14.0.10(expo@54.0.30
|
|
69
|
+
version: 14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
70
70
|
expo-haptics:
|
|
71
71
|
specifier: ~15.0.6
|
|
72
|
-
version: 15.0.8(expo@54.0.30
|
|
72
|
+
version: 15.0.8(expo@54.0.30)
|
|
73
73
|
expo-image:
|
|
74
74
|
specifier: ^3.0.11
|
|
75
|
-
version: 3.0.11(expo@54.0.30
|
|
75
|
+
version: 3.0.11(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
76
76
|
expo-image-picker:
|
|
77
77
|
specifier: ~17.0.7
|
|
78
|
-
version: 17.0.10(expo@54.0.30
|
|
78
|
+
version: 17.0.10(expo@54.0.30)
|
|
79
79
|
expo-linear-gradient:
|
|
80
80
|
specifier: ~15.0.6
|
|
81
|
-
version: 15.0.8(expo@54.0.30
|
|
81
|
+
version: 15.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
82
82
|
expo-linking:
|
|
83
83
|
specifier: ~8.0.7
|
|
84
|
-
version: 8.0.11(expo@54.0.30
|
|
84
|
+
version: 8.0.11(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
85
85
|
expo-location:
|
|
86
86
|
specifier: ~19.0.7
|
|
87
|
-
version: 19.0.8(expo@54.0.30
|
|
87
|
+
version: 19.0.8(expo@54.0.30)
|
|
88
88
|
expo-router:
|
|
89
89
|
specifier: ~6.0.0
|
|
90
|
-
version: 6.0.21(
|
|
90
|
+
version: 6.0.21(6xbk2vlnezwokmsrfmri22osry)
|
|
91
91
|
expo-splash-screen:
|
|
92
92
|
specifier: ~31.0.8
|
|
93
|
-
version: 31.0.13(expo@54.0.30
|
|
93
|
+
version: 31.0.13(expo@54.0.30)
|
|
94
94
|
expo-status-bar:
|
|
95
95
|
specifier: ~3.0.7
|
|
96
96
|
version: 3.0.9(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
97
97
|
expo-symbols:
|
|
98
98
|
specifier: ~1.0.6
|
|
99
|
-
version: 1.0.8(expo@54.0.30
|
|
99
|
+
version: 1.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
100
100
|
expo-system-ui:
|
|
101
101
|
specifier: ~6.0.9
|
|
102
|
-
version: 6.0.9(expo@54.0.30
|
|
102
|
+
version: 6.0.9(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
103
103
|
expo-web-browser:
|
|
104
104
|
specifier: ~15.0.10
|
|
105
|
-
version: 15.0.10(expo@54.0.30
|
|
105
|
+
version: 15.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
106
|
+
js-base64:
|
|
107
|
+
specifier: ^3.7.7
|
|
108
|
+
version: 3.7.8
|
|
106
109
|
react:
|
|
107
110
|
specifier: 19.1.0
|
|
108
111
|
version: 19.1.0
|
|
@@ -123,7 +126,7 @@ importers:
|
|
|
123
126
|
version: 0.9.5(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
124
127
|
react-native-modal-datetime-picker:
|
|
125
128
|
specifier: 18.0.0
|
|
126
|
-
version: 18.0.0(@react-native-community/datetimepicker@8.5.1(expo@54.0.30
|
|
129
|
+
version: 18.0.0(@react-native-community/datetimepicker@8.5.1(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
127
130
|
react-native-reanimated:
|
|
128
131
|
specifier: ~4.1.0
|
|
129
132
|
version: 4.1.6(@babel/core@7.28.5)(react-native-worklets@0.5.1(@babel/core@7.28.5)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
@@ -172,7 +175,7 @@ importers:
|
|
|
172
175
|
version: 5.0.2
|
|
173
176
|
babel-preset-expo:
|
|
174
177
|
specifier: ^54.0.9
|
|
175
|
-
version: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30
|
|
178
|
+
version: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30)(react-refresh@0.14.2)
|
|
176
179
|
chalk:
|
|
177
180
|
specifier: ^4.1.2
|
|
178
181
|
version: 4.1.2
|
|
@@ -217,7 +220,7 @@ importers:
|
|
|
217
220
|
version: 29.7.0(@types/node@25.0.3)
|
|
218
221
|
jest-expo:
|
|
219
222
|
specifier: ~54.0.10
|
|
220
|
-
version: 54.0.16(@babel/core@7.28.5)(expo@54.0.30
|
|
223
|
+
version: 54.0.16(@babel/core@7.28.5)(expo@54.0.30)(jest@29.7.0(@types/node@25.0.3))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
221
224
|
react-test-renderer:
|
|
222
225
|
specifier: 19.1.0
|
|
223
226
|
version: 19.1.0(react@19.1.0)
|
|
@@ -4415,6 +4418,9 @@ packages:
|
|
|
4415
4418
|
jimp-compact@0.16.1:
|
|
4416
4419
|
resolution: {integrity: sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==}
|
|
4417
4420
|
|
|
4421
|
+
js-base64@3.7.8:
|
|
4422
|
+
resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==}
|
|
4423
|
+
|
|
4418
4424
|
js-tiktoken@1.0.21:
|
|
4419
4425
|
resolution: {integrity: sha512-biOj/6M5qdgx5TKjDnFT1ymSpM5tbd3ylwDtrQvFQSu0Z7bBYko2dF+W/aUkXUPuk6IVpRxk/3Q2sHOzGlS36g==}
|
|
4420
4426
|
|
|
@@ -7649,8 +7655,8 @@ snapshots:
|
|
|
7649
7655
|
'@eslint/core': 0.17.0
|
|
7650
7656
|
levn: 0.4.1
|
|
7651
7657
|
|
|
7652
|
-
|
|
7653
|
-
|
|
7658
|
+
'@expo/cli@54.0.20(expo-router@6.0.21)(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))':
|
|
7659
|
+
dependencies:
|
|
7654
7660
|
'@0no-co/graphql.web': 1.2.0
|
|
7655
7661
|
'@expo/code-signing-certificates': 0.0.5
|
|
7656
7662
|
'@expo/config': 12.0.13
|
|
@@ -7660,11 +7666,11 @@ snapshots:
|
|
|
7660
7666
|
'@expo/image-utils': 0.8.8
|
|
7661
7667
|
'@expo/json-file': 10.0.8
|
|
7662
7668
|
'@expo/metro': 54.2.0
|
|
7663
|
-
'@expo/metro-config': 54.0.12(expo@54.0.30
|
|
7669
|
+
'@expo/metro-config': 54.0.12(expo@54.0.30)
|
|
7664
7670
|
'@expo/osascript': 2.3.8
|
|
7665
7671
|
'@expo/package-manager': 1.9.9
|
|
7666
7672
|
'@expo/plist': 0.4.8
|
|
7667
|
-
'@expo/prebuild-config': 54.0.8(expo@54.0.30
|
|
7673
|
+
'@expo/prebuild-config': 54.0.8(expo@54.0.30)
|
|
7668
7674
|
'@expo/schema-utils': 0.1.8
|
|
7669
7675
|
'@expo/spawn-async': 1.7.2
|
|
7670
7676
|
'@expo/ws-tunnel': 1.0.6
|
|
@@ -7716,7 +7722,7 @@ snapshots:
|
|
|
7716
7722
|
wrap-ansi: 7.0.0
|
|
7717
7723
|
ws: 8.18.3
|
|
7718
7724
|
optionalDependencies:
|
|
7719
|
-
expo-router: 6.0.21(
|
|
7725
|
+
expo-router: 6.0.21(6xbk2vlnezwokmsrfmri22osry)
|
|
7720
7726
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
7721
7727
|
transitivePeerDependencies:
|
|
7722
7728
|
- bufferutil
|
|
@@ -7826,7 +7832,7 @@ snapshots:
|
|
|
7826
7832
|
'@babel/code-frame': 7.10.4
|
|
7827
7833
|
json5: 2.2.3
|
|
7828
7834
|
|
|
7829
|
-
'@expo/metro-config@54.0.12(expo@54.0.30
|
|
7835
|
+
'@expo/metro-config@54.0.12(expo@54.0.30)':
|
|
7830
7836
|
dependencies:
|
|
7831
7837
|
'@babel/code-frame': 7.27.1
|
|
7832
7838
|
'@babel/core': 7.28.5
|
|
@@ -7909,7 +7915,7 @@ snapshots:
|
|
|
7909
7915
|
base64-js: 1.5.1
|
|
7910
7916
|
xmlbuilder: 15.1.1
|
|
7911
7917
|
|
|
7912
|
-
'@expo/prebuild-config@54.0.8(expo@54.0.30
|
|
7918
|
+
'@expo/prebuild-config@54.0.8(expo@54.0.30)':
|
|
7913
7919
|
dependencies:
|
|
7914
7920
|
'@expo/config': 12.0.13
|
|
7915
7921
|
'@expo/config-plugins': 54.0.4
|
|
@@ -7935,9 +7941,9 @@ snapshots:
|
|
|
7935
7941
|
|
|
7936
7942
|
'@expo/sudo-prompt@9.3.2': {}
|
|
7937
7943
|
|
|
7938
|
-
'@expo/vector-icons@15.0.3(expo-font@14.0.10(expo@54.0.30
|
|
7944
|
+
'@expo/vector-icons@15.0.3(expo-font@14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)':
|
|
7939
7945
|
dependencies:
|
|
7940
|
-
expo-font: 14.0.10(expo@54.0.30
|
|
7946
|
+
expo-font: 14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
7941
7947
|
react: 19.1.0
|
|
7942
7948
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
7943
7949
|
|
|
@@ -8404,7 +8410,7 @@ snapshots:
|
|
|
8404
8410
|
merge-options: 3.0.4
|
|
8405
8411
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
8406
8412
|
|
|
8407
|
-
'@react-native-community/datetimepicker@8.5.1(expo@54.0.30
|
|
8413
|
+
'@react-native-community/datetimepicker@8.5.1(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)':
|
|
8408
8414
|
dependencies:
|
|
8409
8415
|
invariant: 2.2.4
|
|
8410
8416
|
react: 19.1.0
|
|
@@ -9580,7 +9586,7 @@ snapshots:
|
|
|
9580
9586
|
'@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.28.5)
|
|
9581
9587
|
'@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.28.5)
|
|
9582
9588
|
|
|
9583
|
-
babel-preset-expo@54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30
|
|
9589
|
+
babel-preset-expo@54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30)(react-refresh@0.14.2):
|
|
9584
9590
|
dependencies:
|
|
9585
9591
|
'@babel/helper-module-imports': 7.27.1
|
|
9586
9592
|
'@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.5)
|
|
@@ -10418,7 +10424,7 @@ snapshots:
|
|
|
10418
10424
|
transitivePeerDependencies:
|
|
10419
10425
|
- supports-color
|
|
10420
10426
|
|
|
10421
|
-
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.51.0(eslint@9.39.2)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4
|
|
10427
|
+
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.51.0(eslint@9.39.2)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.2):
|
|
10422
10428
|
dependencies:
|
|
10423
10429
|
debug: 3.2.7
|
|
10424
10430
|
optionalDependencies:
|
|
@@ -10440,7 +10446,7 @@ snapshots:
|
|
|
10440
10446
|
doctrine: 2.1.0
|
|
10441
10447
|
eslint: 9.39.2
|
|
10442
10448
|
eslint-import-resolver-node: 0.3.9
|
|
10443
|
-
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.51.0(eslint@9.39.2)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4
|
|
10449
|
+
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.51.0(eslint@9.39.2)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.2)
|
|
10444
10450
|
hasown: 2.0.2
|
|
10445
10451
|
is-core-module: 2.16.1
|
|
10446
10452
|
is-glob: 4.0.3
|
|
@@ -10608,27 +10614,27 @@ snapshots:
|
|
|
10608
10614
|
jest-message-util: 29.7.0
|
|
10609
10615
|
jest-util: 29.7.0
|
|
10610
10616
|
|
|
10611
|
-
expo-application@7.0.8(expo@54.0.30
|
|
10617
|
+
expo-application@7.0.8(expo@54.0.30):
|
|
10612
10618
|
dependencies:
|
|
10613
10619
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10614
10620
|
|
|
10615
|
-
expo-asset@12.0.12(expo@54.0.30
|
|
10621
|
+
expo-asset@12.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10616
10622
|
dependencies:
|
|
10617
10623
|
'@expo/image-utils': 0.8.8
|
|
10618
10624
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10619
|
-
expo-constants: 18.0.12(expo@54.0.30
|
|
10625
|
+
expo-constants: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10620
10626
|
react: 19.1.0
|
|
10621
10627
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10622
10628
|
transitivePeerDependencies:
|
|
10623
10629
|
- supports-color
|
|
10624
10630
|
|
|
10625
|
-
expo-auth-session@7.0.10(expo@54.0.30
|
|
10631
|
+
expo-auth-session@7.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10626
10632
|
dependencies:
|
|
10627
|
-
expo-application: 7.0.8(expo@54.0.30
|
|
10628
|
-
expo-constants: 18.0.12(expo@54.0.30
|
|
10629
|
-
expo-crypto: 15.0.8(expo@54.0.30
|
|
10630
|
-
expo-linking: 8.0.11(expo@54.0.30
|
|
10631
|
-
expo-web-browser: 15.0.10(expo@54.0.30
|
|
10633
|
+
expo-application: 7.0.8(expo@54.0.30)
|
|
10634
|
+
expo-constants: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10635
|
+
expo-crypto: 15.0.8(expo@54.0.30)
|
|
10636
|
+
expo-linking: 8.0.11(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10637
|
+
expo-web-browser: 15.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10632
10638
|
invariant: 2.2.4
|
|
10633
10639
|
react: 19.1.0
|
|
10634
10640
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
@@ -10636,7 +10642,7 @@ snapshots:
|
|
|
10636
10642
|
- expo
|
|
10637
10643
|
- supports-color
|
|
10638
10644
|
|
|
10639
|
-
expo-av@16.0.8(expo@54.0.30
|
|
10645
|
+
expo-av@16.0.8(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10640
10646
|
dependencies:
|
|
10641
10647
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10642
10648
|
react: 19.1.0
|
|
@@ -10644,13 +10650,13 @@ snapshots:
|
|
|
10644
10650
|
optionalDependencies:
|
|
10645
10651
|
react-native-web: 0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
|
10646
10652
|
|
|
10647
|
-
expo-blur@15.0.8(expo@54.0.30
|
|
10653
|
+
expo-blur@15.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10648
10654
|
dependencies:
|
|
10649
10655
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10650
10656
|
react: 19.1.0
|
|
10651
10657
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10652
10658
|
|
|
10653
|
-
expo-camera@17.0.10(expo@54.0.30
|
|
10659
|
+
expo-camera@17.0.10(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10654
10660
|
dependencies:
|
|
10655
10661
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10656
10662
|
invariant: 2.2.4
|
|
@@ -10659,7 +10665,7 @@ snapshots:
|
|
|
10659
10665
|
optionalDependencies:
|
|
10660
10666
|
react-native-web: 0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
|
10661
10667
|
|
|
10662
|
-
expo-constants@18.0.12(expo@54.0.30
|
|
10668
|
+
expo-constants@18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
10663
10669
|
dependencies:
|
|
10664
10670
|
'@expo/config': 12.0.13
|
|
10665
10671
|
'@expo/env': 2.0.8
|
|
@@ -10668,37 +10674,37 @@ snapshots:
|
|
|
10668
10674
|
transitivePeerDependencies:
|
|
10669
10675
|
- supports-color
|
|
10670
10676
|
|
|
10671
|
-
expo-crypto@15.0.8(expo@54.0.30
|
|
10677
|
+
expo-crypto@15.0.8(expo@54.0.30):
|
|
10672
10678
|
dependencies:
|
|
10673
10679
|
base64-js: 1.5.1
|
|
10674
10680
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10675
10681
|
|
|
10676
|
-
expo-file-system@19.0.21(expo@54.0.30
|
|
10682
|
+
expo-file-system@19.0.21(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
10677
10683
|
dependencies:
|
|
10678
10684
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10679
10685
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10680
10686
|
|
|
10681
|
-
expo-font@14.0.10(expo@54.0.30
|
|
10687
|
+
expo-font@14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10682
10688
|
dependencies:
|
|
10683
10689
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10684
10690
|
fontfaceobserver: 2.3.0
|
|
10685
10691
|
react: 19.1.0
|
|
10686
10692
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10687
10693
|
|
|
10688
|
-
expo-haptics@15.0.8(expo@54.0.30
|
|
10694
|
+
expo-haptics@15.0.8(expo@54.0.30):
|
|
10689
10695
|
dependencies:
|
|
10690
10696
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10691
10697
|
|
|
10692
|
-
expo-image-loader@6.0.0(expo@54.0.30
|
|
10698
|
+
expo-image-loader@6.0.0(expo@54.0.30):
|
|
10693
10699
|
dependencies:
|
|
10694
10700
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10695
10701
|
|
|
10696
|
-
expo-image-picker@17.0.10(expo@54.0.30
|
|
10702
|
+
expo-image-picker@17.0.10(expo@54.0.30):
|
|
10697
10703
|
dependencies:
|
|
10698
10704
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10699
|
-
expo-image-loader: 6.0.0(expo@54.0.30
|
|
10705
|
+
expo-image-loader: 6.0.0(expo@54.0.30)
|
|
10700
10706
|
|
|
10701
|
-
expo-image@3.0.11(expo@54.0.30
|
|
10707
|
+
expo-image@3.0.11(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10702
10708
|
dependencies:
|
|
10703
10709
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10704
10710
|
react: 19.1.0
|
|
@@ -10706,20 +10712,20 @@ snapshots:
|
|
|
10706
10712
|
optionalDependencies:
|
|
10707
10713
|
react-native-web: 0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
|
10708
10714
|
|
|
10709
|
-
expo-keep-awake@15.0.8(expo@54.0.30
|
|
10715
|
+
expo-keep-awake@15.0.8(expo@54.0.30)(react@19.1.0):
|
|
10710
10716
|
dependencies:
|
|
10711
10717
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10712
10718
|
react: 19.1.0
|
|
10713
10719
|
|
|
10714
|
-
expo-linear-gradient@15.0.8(expo@54.0.30
|
|
10720
|
+
expo-linear-gradient@15.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10715
10721
|
dependencies:
|
|
10716
10722
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10717
10723
|
react: 19.1.0
|
|
10718
10724
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10719
10725
|
|
|
10720
|
-
expo-linking@8.0.11(expo@54.0.30
|
|
10726
|
+
expo-linking@8.0.11(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10721
10727
|
dependencies:
|
|
10722
|
-
expo-constants: 18.0.12(expo@54.0.30
|
|
10728
|
+
expo-constants: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10723
10729
|
invariant: 2.2.4
|
|
10724
10730
|
react: 19.1.0
|
|
10725
10731
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
@@ -10727,7 +10733,7 @@ snapshots:
|
|
|
10727
10733
|
- expo
|
|
10728
10734
|
- supports-color
|
|
10729
10735
|
|
|
10730
|
-
expo-location@19.0.8(expo@54.0.30
|
|
10736
|
+
expo-location@19.0.8(expo@54.0.30):
|
|
10731
10737
|
dependencies:
|
|
10732
10738
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10733
10739
|
|
|
@@ -10745,8 +10751,8 @@ snapshots:
|
|
|
10745
10751
|
react: 19.1.0
|
|
10746
10752
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10747
10753
|
|
|
10748
|
-
|
|
10749
|
-
|
|
10754
|
+
expo-router@6.0.21(6xbk2vlnezwokmsrfmri22osry):
|
|
10755
|
+
dependencies:
|
|
10750
10756
|
'@expo/metro-runtime': 6.1.2(expo@54.0.30)(react-dom@19.1.0(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10751
10757
|
'@expo/schema-utils': 0.1.8
|
|
10752
10758
|
'@radix-ui/react-slot': 1.2.0(@types/react@19.1.17)(react@19.1.0)
|
|
@@ -10758,8 +10764,8 @@ snapshots:
|
|
|
10758
10764
|
debug: 4.4.3
|
|
10759
10765
|
escape-string-regexp: 4.0.0
|
|
10760
10766
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10761
|
-
expo-constants: 18.0.12(expo@54.0.30
|
|
10762
|
-
expo-linking: 8.0.11(expo@54.0.30
|
|
10767
|
+
expo-constants: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10768
|
+
expo-linking: 8.0.11(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10763
10769
|
expo-server: 1.0.5
|
|
10764
10770
|
fast-deep-equal: 3.1.3
|
|
10765
10771
|
invariant: 2.2.4
|
|
@@ -10790,9 +10796,9 @@ snapshots:
|
|
|
10790
10796
|
|
|
10791
10797
|
expo-server@1.0.5: {}
|
|
10792
10798
|
|
|
10793
|
-
expo-splash-screen@31.0.13(expo@54.0.30
|
|
10799
|
+
expo-splash-screen@31.0.13(expo@54.0.30):
|
|
10794
10800
|
dependencies:
|
|
10795
|
-
'@expo/prebuild-config': 54.0.8(expo@54.0.30
|
|
10801
|
+
'@expo/prebuild-config': 54.0.8(expo@54.0.30)
|
|
10796
10802
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10797
10803
|
transitivePeerDependencies:
|
|
10798
10804
|
- supports-color
|
|
@@ -10803,13 +10809,13 @@ snapshots:
|
|
|
10803
10809
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10804
10810
|
react-native-is-edge-to-edge: 1.2.1(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10805
10811
|
|
|
10806
|
-
expo-symbols@1.0.8(expo@54.0.30
|
|
10812
|
+
expo-symbols@1.0.8(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
10807
10813
|
dependencies:
|
|
10808
10814
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10809
10815
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
10810
10816
|
sf-symbols-typescript: 2.2.0
|
|
10811
10817
|
|
|
10812
|
-
expo-system-ui@6.0.9(expo@54.0.30
|
|
10818
|
+
expo-system-ui@6.0.9(expo@54.0.30)(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
10813
10819
|
dependencies:
|
|
10814
10820
|
'@react-native/normalize-colors': 0.81.5
|
|
10815
10821
|
debug: 4.4.3
|
|
@@ -10820,7 +10826,7 @@ snapshots:
|
|
|
10820
10826
|
transitivePeerDependencies:
|
|
10821
10827
|
- supports-color
|
|
10822
10828
|
|
|
10823
|
-
expo-web-browser@15.0.10(expo@54.0.30
|
|
10829
|
+
expo-web-browser@15.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
10824
10830
|
dependencies:
|
|
10825
10831
|
expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10826
10832
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
@@ -10828,21 +10834,21 @@ snapshots:
|
|
|
10828
10834
|
expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
10829
10835
|
dependencies:
|
|
10830
10836
|
'@babel/runtime': 7.28.4
|
|
10831
|
-
'@expo/cli': 54.0.20(expo-router@6.0.21
|
|
10837
|
+
'@expo/cli': 54.0.20(expo-router@6.0.21)(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10832
10838
|
'@expo/config': 12.0.13
|
|
10833
10839
|
'@expo/config-plugins': 54.0.4
|
|
10834
10840
|
'@expo/devtools': 0.1.8(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10835
10841
|
'@expo/fingerprint': 0.15.4
|
|
10836
10842
|
'@expo/metro': 54.2.0
|
|
10837
|
-
'@expo/metro-config': 54.0.12(expo@54.0.30
|
|
10838
|
-
'@expo/vector-icons': 15.0.3(expo-font@14.0.10(expo@54.0.30
|
|
10843
|
+
'@expo/metro-config': 54.0.12(expo@54.0.30)
|
|
10844
|
+
'@expo/vector-icons': 15.0.3(expo-font@14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10839
10845
|
'@ungap/structured-clone': 1.3.0
|
|
10840
|
-
babel-preset-expo: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30
|
|
10841
|
-
expo-asset: 12.0.12(expo@54.0.30
|
|
10842
|
-
expo-constants: 18.0.12(expo@54.0.30
|
|
10843
|
-
expo-file-system: 19.0.21(expo@54.0.30
|
|
10844
|
-
expo-font: 14.0.10(expo@54.0.30
|
|
10845
|
-
expo-keep-awake: 15.0.8(expo@54.0.30
|
|
10846
|
+
babel-preset-expo: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30)(react-refresh@0.14.2)
|
|
10847
|
+
expo-asset: 12.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10848
|
+
expo-constants: 18.0.12(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10849
|
+
expo-file-system: 19.0.21(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
10850
|
+
expo-font: 14.0.10(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10851
|
+
expo-keep-awake: 15.0.8(expo@54.0.30)(react@19.1.0)
|
|
10846
10852
|
expo-modules-autolinking: 3.0.23
|
|
10847
10853
|
expo-modules-core: 3.0.29(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
10848
10854
|
pretty-format: 29.7.0
|
|
@@ -11628,7 +11634,7 @@ snapshots:
|
|
|
11628
11634
|
jest-mock: 29.7.0
|
|
11629
11635
|
jest-util: 29.7.0
|
|
11630
11636
|
|
|
11631
|
-
jest-expo@54.0.16(@babel/core@7.28.5)(expo@54.0.30
|
|
11637
|
+
jest-expo@54.0.16(@babel/core@7.28.5)(expo@54.0.30)(jest@29.7.0(@types/node@25.0.3))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
|
|
11632
11638
|
dependencies:
|
|
11633
11639
|
'@expo/config': 12.0.13
|
|
11634
11640
|
'@expo/json-file': 10.0.8
|
|
@@ -11873,6 +11879,8 @@ snapshots:
|
|
|
11873
11879
|
|
|
11874
11880
|
jimp-compact@0.16.1: {}
|
|
11875
11881
|
|
|
11882
|
+
js-base64@3.7.8: {}
|
|
11883
|
+
|
|
11876
11884
|
js-tiktoken@1.0.21:
|
|
11877
11885
|
dependencies:
|
|
11878
11886
|
base64-js: 1.5.1
|
|
@@ -12852,9 +12860,9 @@ snapshots:
|
|
|
12852
12860
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
12853
12861
|
react-native-iphone-x-helper: 1.3.1(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))
|
|
12854
12862
|
|
|
12855
|
-
react-native-modal-datetime-picker@18.0.0(@react-native-community/datetimepicker@8.5.1(expo@54.0.30
|
|
12863
|
+
react-native-modal-datetime-picker@18.0.0(@react-native-community/datetimepicker@8.5.1(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)):
|
|
12856
12864
|
dependencies:
|
|
12857
|
-
'@react-native-community/datetimepicker': 8.5.1(expo@54.0.30
|
|
12865
|
+
'@react-native-community/datetimepicker': 8.5.1(expo@54.0.30)(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
|
|
12858
12866
|
prop-types: 15.8.1
|
|
12859
12867
|
react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
|
|
12860
12868
|
|
|
@@ -2,7 +2,7 @@ import type { NextConfig } from 'next';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
const nextConfig: NextConfig = {
|
|
5
|
-
outputFileTracingRoot: path.resolve(__dirname, '../../'),
|
|
5
|
+
// outputFileTracingRoot: path.resolve(__dirname, '../../'),
|
|
6
6
|
/* config options here */
|
|
7
7
|
allowedDevOrigins: ['*.dev.coze.site'],
|
|
8
8
|
images: {
|
package/lib/cli.js
CHANGED
|
@@ -1105,7 +1105,7 @@ const executeRun = async (
|
|
|
1105
1105
|
logger.info(`Running ${commandName} command...`);
|
|
1106
1106
|
|
|
1107
1107
|
// 1. 对于 build 命令,先执行 fix 以确保项目配置正确
|
|
1108
|
-
if (
|
|
1108
|
+
if (['dev', 'build'].includes(commandName)) {
|
|
1109
1109
|
logger.info('\n🔧 Running fix command before build...\n');
|
|
1110
1110
|
try {
|
|
1111
1111
|
await executeFix();
|
|
@@ -1437,6 +1437,11 @@ const shouldIgnoreFile = (filePath) => {
|
|
|
1437
1437
|
return directoryPatterns.some(dir => pathParts.includes(dir));
|
|
1438
1438
|
};
|
|
1439
1439
|
|
|
1440
|
+
// ABOUTME: File system utilities for template file processing
|
|
1441
|
+
// ABOUTME: Provides directory scanning, file path conversion, and node_modules copying
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
// start_aigc
|
|
1440
1445
|
/**
|
|
1441
1446
|
* 递归获取目录中的所有文件
|
|
1442
1447
|
*
|
|
@@ -1507,6 +1512,58 @@ const convertDotfileName = (filePath) => {
|
|
|
1507
1512
|
return filePath;
|
|
1508
1513
|
};
|
|
1509
1514
|
|
|
1515
|
+
/**
|
|
1516
|
+
* 复制 node_modules 目录(如果存在)
|
|
1517
|
+
*
|
|
1518
|
+
* @param sourceNodeModules - 源 node_modules 路径
|
|
1519
|
+
* @param targetNodeModules - 目标 node_modules 路径
|
|
1520
|
+
*/
|
|
1521
|
+
const copyNodeModules = (
|
|
1522
|
+
sourceNodeModules,
|
|
1523
|
+
targetNodeModules,
|
|
1524
|
+
) => {
|
|
1525
|
+
if (!fs.existsSync(sourceNodeModules)) {
|
|
1526
|
+
return;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
logger.info('\nCopying node_modules from pre-warmed template...');
|
|
1530
|
+
logger.verbose(` From: ${sourceNodeModules}`);
|
|
1531
|
+
logger.verbose(` To: ${targetNodeModules}`);
|
|
1532
|
+
|
|
1533
|
+
const result = shelljs.exec(`cp -R "${sourceNodeModules}" "${targetNodeModules}"`, {
|
|
1534
|
+
silent: true,
|
|
1535
|
+
});
|
|
1536
|
+
|
|
1537
|
+
if (result.stdout) {
|
|
1538
|
+
process.stdout.write(result.stdout);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
if (result.stderr) {
|
|
1542
|
+
process.stderr.write(result.stderr);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
if (result.code === 0) {
|
|
1546
|
+
logger.success('✓ node_modules copied successfully');
|
|
1547
|
+
} else {
|
|
1548
|
+
logger.warn(
|
|
1549
|
+
`Failed to copy node_modules: ${result.stderr || 'unknown error'}`,
|
|
1550
|
+
);
|
|
1551
|
+
logger.info('Will need to run pnpm install manually');
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
// end_aigc
|
|
1555
|
+
|
|
1556
|
+
// ABOUTME: File rendering utilities for template processing
|
|
1557
|
+
// ABOUTME: Handles file content rendering, hook execution, and file writing
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
// start_aigc
|
|
1510
1567
|
/**
|
|
1511
1568
|
* 执行文件渲染钩子
|
|
1512
1569
|
*
|
|
@@ -1552,22 +1609,25 @@ const executeFileRenderHook = async (
|
|
|
1552
1609
|
};
|
|
1553
1610
|
|
|
1554
1611
|
/**
|
|
1555
|
-
*
|
|
1612
|
+
* 准备单个文件的渲染信息(不实际写入)
|
|
1613
|
+
* 用于 dry-run 阶段,收集所有将要写入的文件信息
|
|
1614
|
+
*
|
|
1615
|
+
* @param options - 准备选项
|
|
1616
|
+
* @returns 文件渲染信息,或 null 表示该文件被跳过
|
|
1556
1617
|
*/
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1618
|
+
const prepareFileInfo = async (options
|
|
1559
1619
|
|
|
1560
1620
|
|
|
1561
1621
|
|
|
1562
1622
|
|
|
1563
1623
|
) => {
|
|
1564
|
-
const { file, templatePath,
|
|
1624
|
+
const { file, templatePath, context, templateConfig } = options;
|
|
1565
1625
|
|
|
1566
1626
|
const srcPath = path.join(templatePath, file);
|
|
1567
1627
|
const destFile = convertDotfileName(file);
|
|
1568
1628
|
|
|
1569
1629
|
logger.verbose(
|
|
1570
|
-
` -
|
|
1630
|
+
` - Preparing: ${file}${destFile !== file ? ` -> ${destFile}` : ''}`,
|
|
1571
1631
|
);
|
|
1572
1632
|
|
|
1573
1633
|
// 判断是否为二进制文件
|
|
@@ -1601,38 +1661,195 @@ const processSingleFile = async (options
|
|
|
1601
1661
|
context,
|
|
1602
1662
|
);
|
|
1603
1663
|
|
|
1604
|
-
// 如果返回 null
|
|
1664
|
+
// 如果返回 null,表示该文件被 hook 跳过
|
|
1605
1665
|
if (processedFileInfo === null) {
|
|
1606
1666
|
logger.verbose(' ⊘ Skipped by onFileRender hook');
|
|
1607
|
-
return;
|
|
1667
|
+
return null;
|
|
1608
1668
|
}
|
|
1609
1669
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1670
|
+
return processedFileInfo;
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* 写入渲染后的文件到目标路径
|
|
1675
|
+
*
|
|
1676
|
+
* @param options - 写入选项
|
|
1677
|
+
*/
|
|
1678
|
+
const writeRenderedFile = async (options
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
) => {
|
|
1683
|
+
const { fileInfo, srcPath, destPath } = options;
|
|
1684
|
+
|
|
1685
|
+
logger.verbose(` - Writing: ${fileInfo.destPath}`);
|
|
1612
1686
|
|
|
1613
1687
|
// 确保目标目录存在
|
|
1614
|
-
await ensureDir(path.dirname(
|
|
1688
|
+
await ensureDir(path.dirname(destPath));
|
|
1615
1689
|
|
|
1616
1690
|
// 写入文件
|
|
1617
|
-
if (
|
|
1618
|
-
//
|
|
1619
|
-
|
|
1620
|
-
|
|
1691
|
+
if (fileInfo.isBinary) {
|
|
1692
|
+
// 二进制文件:如果内容是原始 base64(未被 hook 修改),直接复制;否则从 base64 解码写入
|
|
1693
|
+
const buffer = await fs$1.readFile(srcPath);
|
|
1694
|
+
const originalContent = buffer.toString('base64');
|
|
1695
|
+
|
|
1696
|
+
if (fileInfo.content === originalContent) {
|
|
1697
|
+
await fs$1.copyFile(srcPath, destPath);
|
|
1621
1698
|
logger.verbose(' ✓ Copied (binary)');
|
|
1622
1699
|
} else {
|
|
1623
|
-
const
|
|
1624
|
-
await fs$1.writeFile(
|
|
1700
|
+
const modifiedBuffer = Buffer.from(fileInfo.content, 'base64');
|
|
1701
|
+
await fs$1.writeFile(destPath, modifiedBuffer);
|
|
1625
1702
|
logger.verbose(' ✓ Written (binary, modified by hook)');
|
|
1626
1703
|
}
|
|
1627
1704
|
} else {
|
|
1628
1705
|
// 文本文件
|
|
1629
|
-
await fs$1.writeFile(
|
|
1706
|
+
await fs$1.writeFile(destPath, fileInfo.content, 'utf-8');
|
|
1630
1707
|
logger.verbose(' ✓ Rendered and written');
|
|
1631
1708
|
}
|
|
1632
1709
|
};
|
|
1710
|
+
// end_aigc
|
|
1711
|
+
|
|
1712
|
+
// ABOUTME: File conflict detection utilities for template processing
|
|
1713
|
+
// ABOUTME: Provides dry-run file collection and conflict checking
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
// start_aigc
|
|
1722
|
+
/**
|
|
1723
|
+
* 收集所有将要写入的文件路径(dry-run 阶段)
|
|
1724
|
+
*
|
|
1725
|
+
* @param options - 收集选项
|
|
1726
|
+
* @returns 将要写入的文件路径列表
|
|
1727
|
+
*/
|
|
1728
|
+
const collectFilesToRender = async (options
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
) => {
|
|
1734
|
+
const { files, templatePath, context, templateConfig } = options;
|
|
1735
|
+
|
|
1736
|
+
logger.verbose('\nDry-run: Collecting files to render...');
|
|
1737
|
+
|
|
1738
|
+
const fileInfos = await Promise.all(
|
|
1739
|
+
files.map(file =>
|
|
1740
|
+
prepareFileInfo({
|
|
1741
|
+
file,
|
|
1742
|
+
templatePath,
|
|
1743
|
+
context,
|
|
1744
|
+
templateConfig,
|
|
1745
|
+
}),
|
|
1746
|
+
),
|
|
1747
|
+
);
|
|
1748
|
+
|
|
1749
|
+
// 过滤掉被 hook 跳过的文件,收集 destPath
|
|
1750
|
+
const filesToWrite = fileInfos
|
|
1751
|
+
.filter((info) => info !== null)
|
|
1752
|
+
.map(info => info.destPath);
|
|
1753
|
+
|
|
1754
|
+
logger.verbose(` - ${filesToWrite.length} files will be written`);
|
|
1755
|
+
logger.verbose(
|
|
1756
|
+
` - ${fileInfos.length - filesToWrite.length} files skipped by hooks`,
|
|
1757
|
+
);
|
|
1758
|
+
|
|
1759
|
+
return filesToWrite;
|
|
1760
|
+
};
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* 检测文件冲突
|
|
1764
|
+
*
|
|
1765
|
+
* @param outputPath - 输出目录路径
|
|
1766
|
+
* @param filesToWrite - 将要写入的文件路径列表
|
|
1767
|
+
* @returns 冲突的文件路径列表
|
|
1768
|
+
*/
|
|
1769
|
+
const detectFileConflicts = (
|
|
1770
|
+
outputPath,
|
|
1771
|
+
filesToWrite,
|
|
1772
|
+
) => {
|
|
1773
|
+
logger.verbose('\nChecking for file conflicts...');
|
|
1774
|
+
|
|
1775
|
+
const conflicts = [];
|
|
1776
|
+
|
|
1777
|
+
for (const file of filesToWrite) {
|
|
1778
|
+
const fullPath = path.join(outputPath, file);
|
|
1779
|
+
if (fs.existsSync(fullPath)) {
|
|
1780
|
+
conflicts.push(file);
|
|
1781
|
+
logger.verbose(` ⚠ Conflict detected: ${file}`);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
if (conflicts.length === 0) {
|
|
1786
|
+
logger.verbose(' ✓ No conflicts detected');
|
|
1787
|
+
} else {
|
|
1788
|
+
logger.verbose(` ⚠ ${conflicts.length} conflicts detected`);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
return conflicts;
|
|
1792
|
+
};
|
|
1793
|
+
// end_aigc
|
|
1794
|
+
|
|
1795
|
+
// ABOUTME: Main file processing orchestration for template rendering
|
|
1796
|
+
// ABOUTME: Coordinates file system, rendering, and conflict detection layers
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
// start_aigc
|
|
1801
|
+
/**
|
|
1802
|
+
* 处理单个文件(准备 + 写入)
|
|
1803
|
+
*
|
|
1804
|
+
* @param options - 处理选项
|
|
1805
|
+
*/
|
|
1806
|
+
const processSingleFile = async (options
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
) => {
|
|
1813
|
+
const { file, templatePath, outputPath, context, templateConfig } = options;
|
|
1814
|
+
|
|
1815
|
+
const srcPath = path.join(templatePath, file);
|
|
1816
|
+
|
|
1817
|
+
// 准备文件信息
|
|
1818
|
+
const processedFileInfo = await prepareFileInfo({
|
|
1819
|
+
file,
|
|
1820
|
+
templatePath,
|
|
1821
|
+
context,
|
|
1822
|
+
templateConfig,
|
|
1823
|
+
});
|
|
1824
|
+
|
|
1825
|
+
// 如果返回 null,跳过该文件
|
|
1826
|
+
if (processedFileInfo === null) {
|
|
1827
|
+
return;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
// 使用处理后的目标路径
|
|
1831
|
+
const finalDestPath = path.join(outputPath, processedFileInfo.destPath);
|
|
1832
|
+
|
|
1833
|
+
// 写入文件
|
|
1834
|
+
await writeRenderedFile({
|
|
1835
|
+
fileInfo: processedFileInfo,
|
|
1836
|
+
srcPath,
|
|
1837
|
+
destPath: finalDestPath,
|
|
1838
|
+
});
|
|
1839
|
+
};
|
|
1633
1840
|
|
|
1634
1841
|
/**
|
|
1635
1842
|
* 复制并处理模板文件到目标目录
|
|
1843
|
+
*
|
|
1844
|
+
* 流程:
|
|
1845
|
+
* 1. 验证模板目录
|
|
1846
|
+
* 2. 扫描所有模板文件
|
|
1847
|
+
* 3. Dry-run:收集将要写入的文件列表(考虑 hooks 影响)
|
|
1848
|
+
* 4. 冲突检测:检查是否有文件会被覆盖
|
|
1849
|
+
* 5. 实际写入:渲染并写入所有文件
|
|
1850
|
+
* 6. 复制 node_modules(如果存在)
|
|
1851
|
+
*
|
|
1852
|
+
* @param options - 处理选项
|
|
1636
1853
|
*/
|
|
1637
1854
|
const processTemplateFiles = async (options
|
|
1638
1855
|
|
|
@@ -1645,7 +1862,7 @@ const processTemplateFiles = async (options
|
|
|
1645
1862
|
logger.verbose(` - Template path: ${templatePath}`);
|
|
1646
1863
|
logger.verbose(` - Output path: ${outputPath}`);
|
|
1647
1864
|
|
|
1648
|
-
// 验证模板目录是否存在
|
|
1865
|
+
// 阶段 0: 验证模板目录是否存在
|
|
1649
1866
|
try {
|
|
1650
1867
|
const stat = await fs$1.stat(templatePath);
|
|
1651
1868
|
logger.verbose(
|
|
@@ -1661,6 +1878,7 @@ const processTemplateFiles = async (options
|
|
|
1661
1878
|
throw error;
|
|
1662
1879
|
}
|
|
1663
1880
|
|
|
1881
|
+
// 阶段 1: 扫描所有模板文件
|
|
1664
1882
|
const files = await getAllFiles(templatePath);
|
|
1665
1883
|
|
|
1666
1884
|
logger.verbose(` - Found ${files.length} files to process`);
|
|
@@ -1670,6 +1888,29 @@ const processTemplateFiles = async (options
|
|
|
1670
1888
|
return;
|
|
1671
1889
|
}
|
|
1672
1890
|
|
|
1891
|
+
// 阶段 2: Dry-run - 收集所有将要写入的文件
|
|
1892
|
+
const filesToWrite = await collectFilesToRender({
|
|
1893
|
+
files,
|
|
1894
|
+
templatePath,
|
|
1895
|
+
context,
|
|
1896
|
+
templateConfig,
|
|
1897
|
+
});
|
|
1898
|
+
|
|
1899
|
+
// 阶段 3: 冲突检测
|
|
1900
|
+
const conflicts = detectFileConflicts(outputPath, filesToWrite);
|
|
1901
|
+
|
|
1902
|
+
if (conflicts.length > 0) {
|
|
1903
|
+
// 有冲突,抛出详细的错误信息
|
|
1904
|
+
const conflictList = conflicts.map(f => ` - ${f}`).join('\n');
|
|
1905
|
+
throw new Error(
|
|
1906
|
+
`File conflicts detected in output directory: ${outputPath}\n\n` +
|
|
1907
|
+
`The following files already exist and would be overwritten:\n${conflictList}\n\n` +
|
|
1908
|
+
'Please remove these files or use a different output directory.',
|
|
1909
|
+
);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
// 阶段 4: 实际写入文件
|
|
1913
|
+
logger.verbose('\nWriting files...');
|
|
1673
1914
|
await Promise.all(
|
|
1674
1915
|
files.map(file =>
|
|
1675
1916
|
processSingleFile({
|
|
@@ -1684,74 +1925,13 @@ const processTemplateFiles = async (options
|
|
|
1684
1925
|
|
|
1685
1926
|
logger.verbose('✓ All files processed successfully');
|
|
1686
1927
|
|
|
1687
|
-
// 单独处理 node_modules 目录(如果存在)
|
|
1928
|
+
// 阶段 5: 单独处理 node_modules 目录(如果存在)
|
|
1688
1929
|
const sourceNodeModules = path.join(templatePath, 'node_modules');
|
|
1689
1930
|
const targetNodeModules = path.join(outputPath, 'node_modules');
|
|
1690
1931
|
|
|
1691
|
-
|
|
1692
|
-
logger.info('\nCopying node_modules from pre-warmed template...');
|
|
1693
|
-
logger.verbose(` From: ${sourceNodeModules}`);
|
|
1694
|
-
logger.verbose(` To: ${targetNodeModules}`);
|
|
1695
|
-
|
|
1696
|
-
const result = shelljs.exec(`cp -R "${sourceNodeModules}" "${targetNodeModules}"`, {
|
|
1697
|
-
silent: true,
|
|
1698
|
-
});
|
|
1699
|
-
|
|
1700
|
-
if (result.stdout) {
|
|
1701
|
-
process.stdout.write(result.stdout);
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
if (result.stderr) {
|
|
1705
|
-
process.stderr.write(result.stderr);
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
if (result.code === 0) {
|
|
1709
|
-
logger.success('✓ node_modules copied successfully');
|
|
1710
|
-
} else {
|
|
1711
|
-
logger.warn(
|
|
1712
|
-
`Failed to copy node_modules: ${result.stderr || 'unknown error'}`,
|
|
1713
|
-
);
|
|
1714
|
-
logger.info('Will need to run pnpm install manually');
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
};
|
|
1718
|
-
|
|
1719
|
-
/**
|
|
1720
|
-
* 检查输出目录是否为空
|
|
1721
|
-
* 注意:.git 目录会被忽略,允许在已初始化 git 的目录中创建项目
|
|
1722
|
-
*
|
|
1723
|
-
* @param outputPath - 输出目录路径
|
|
1724
|
-
* @returns 是否为空
|
|
1725
|
-
*/
|
|
1726
|
-
const isOutputDirEmpty = async (
|
|
1727
|
-
outputPath,
|
|
1728
|
-
) => {
|
|
1729
|
-
try {
|
|
1730
|
-
const entries = await fs$1.readdir(outputPath);
|
|
1731
|
-
// 过滤掉 .git 目录,允许在已初始化 git 的目录中创建项目
|
|
1732
|
-
const filteredEntries = entries.filter(entry => entry !== '.git');
|
|
1733
|
-
return filteredEntries.length === 0;
|
|
1734
|
-
} catch (e) {
|
|
1735
|
-
// 目录不存在,视为空
|
|
1736
|
-
return true;
|
|
1737
|
-
}
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
/**
|
|
1741
|
-
* 验证输出目录
|
|
1742
|
-
*
|
|
1743
|
-
* @param outputPath - 输出目录路径
|
|
1744
|
-
* @throws 如果目录不为空则抛出错误
|
|
1745
|
-
*/
|
|
1746
|
-
const validateOutputDir = async (outputPath) => {
|
|
1747
|
-
const isEmpty = await isOutputDirEmpty(outputPath);
|
|
1748
|
-
if (!isEmpty) {
|
|
1749
|
-
throw new Error(
|
|
1750
|
-
`Output directory is not empty: ${outputPath}\n` +
|
|
1751
|
-
'Please use an empty directory or remove existing files.',
|
|
1752
|
-
);
|
|
1753
|
-
}
|
|
1932
|
+
copyNodeModules(sourceNodeModules, targetNodeModules);
|
|
1754
1933
|
};
|
|
1934
|
+
// end_aigc
|
|
1755
1935
|
|
|
1756
1936
|
/**
|
|
1757
1937
|
* 模板引擎执行选项
|
|
@@ -1834,9 +2014,9 @@ const executeAfterRenderHook = async (
|
|
|
1834
2014
|
/**
|
|
1835
2015
|
* 准备输出目录
|
|
1836
2016
|
*/
|
|
1837
|
-
const prepareOutputDirectory =
|
|
2017
|
+
const prepareOutputDirectory = (outputPath) => {
|
|
1838
2018
|
const absolutePath = path.resolve(process.cwd(), outputPath);
|
|
1839
|
-
|
|
2019
|
+
// 不再在这里验证目录是否为空,冲突检测已移至 processTemplateFiles 中
|
|
1840
2020
|
return absolutePath;
|
|
1841
2021
|
};
|
|
1842
2022
|
|
|
@@ -1863,7 +2043,7 @@ const execute = async (
|
|
|
1863
2043
|
});
|
|
1864
2044
|
|
|
1865
2045
|
// 5. 准备输出目录
|
|
1866
|
-
const absoluteOutputPath =
|
|
2046
|
+
const absoluteOutputPath = prepareOutputDirectory(outputPath);
|
|
1867
2047
|
|
|
1868
2048
|
// 6. 处理模板文件
|
|
1869
2049
|
await processTemplateFiles({
|
|
@@ -2121,7 +2301,7 @@ const registerCommand = program => {
|
|
|
2121
2301
|
});
|
|
2122
2302
|
};
|
|
2123
2303
|
|
|
2124
|
-
var version = "0.0.1-alpha.
|
|
2304
|
+
var version = "0.0.1-alpha.c47a58";
|
|
2125
2305
|
var packageJson = {
|
|
2126
2306
|
version: version};
|
|
2127
2307
|
|