@teardown/cli 2.0.67 → 2.0.68
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teardown/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.68",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"import": "./src/config/index.ts",
|
|
26
26
|
"default": "./src/config/index.ts"
|
|
27
27
|
},
|
|
28
|
+
"./config/schema": {
|
|
29
|
+
"types": "./src/config/schema.ts",
|
|
30
|
+
"import": "./src/config/schema.ts",
|
|
31
|
+
"default": "./src/config/schema.ts"
|
|
32
|
+
},
|
|
28
33
|
"./plugins": {
|
|
29
34
|
"types": "./src/plugins/index.ts",
|
|
30
35
|
"import": "./src/plugins/index.ts",
|
|
@@ -71,7 +76,7 @@
|
|
|
71
76
|
},
|
|
72
77
|
"devDependencies": {
|
|
73
78
|
"@biomejs/biome": "2.3.11",
|
|
74
|
-
"@teardown/tsconfig": "2.0.
|
|
79
|
+
"@teardown/tsconfig": "2.0.68",
|
|
75
80
|
"@types/bun": "1.3.5",
|
|
76
81
|
"@types/ejs": "^3.1.5",
|
|
77
82
|
"typescript": "5.9.3"
|
package/src/config/schema.ts
CHANGED
|
@@ -233,3 +233,11 @@ export function defineConfig(config: z.input<typeof TeardownConfigSchema>): z.in
|
|
|
233
233
|
const result = TeardownConfigSchema.parse(config);
|
|
234
234
|
return result;
|
|
235
235
|
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Inferred types from schemas for React Native-safe imports
|
|
239
|
+
*/
|
|
240
|
+
export type TeardownConfig = z.infer<typeof TeardownConfigSchema>;
|
|
241
|
+
export type iOSConfig = z.infer<typeof iOSConfigSchema>;
|
|
242
|
+
export type AndroidConfig = z.infer<typeof AndroidConfigSchema>;
|
|
243
|
+
export type SplashConfig = z.infer<typeof SplashConfigSchema>;
|
|
@@ -4,38 +4,22 @@
|
|
|
4
4
|
* Wraps the app with NavigationContainer and linking configuration.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import type { LinkingOptions } from "@react-navigation/native";
|
|
8
8
|
import { NavigationContainer } from "@react-navigation/native";
|
|
9
|
-
import
|
|
9
|
+
import type React from "react";
|
|
10
|
+
import { defaultPrefixes, generatedLinkingConfig } from "@/.teardown/linking.generated";
|
|
10
11
|
|
|
11
12
|
interface NavigationProviderProps {
|
|
12
13
|
children: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
/**
|
|
16
|
-
* Get the deep link scheme from config.
|
|
17
|
-
* Uses `scheme` if specified, otherwise falls back to `slug`.
|
|
18
|
-
*/
|
|
19
|
-
const scheme = config.scheme ?? config.slug;
|
|
20
|
-
|
|
21
16
|
/**
|
|
22
17
|
* Linking configuration for deep links.
|
|
23
18
|
* Routes are automatically generated by @teardown/navigation-metro.
|
|
24
19
|
*/
|
|
25
|
-
const linking = {
|
|
26
|
-
prefixes:
|
|
27
|
-
config:
|
|
28
|
-
screens: {
|
|
29
|
-
"(tabs)": {
|
|
30
|
-
screens: {
|
|
31
|
-
home: "home",
|
|
32
|
-
explore: "explore",
|
|
33
|
-
profile: "profile",
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
settings: "settings",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
20
|
+
const linking: LinkingOptions<object> = {
|
|
21
|
+
prefixes: defaultPrefixes,
|
|
22
|
+
config: generatedLinkingConfig,
|
|
39
23
|
};
|
|
40
24
|
|
|
41
25
|
export function NavigationProvider({ children }: NavigationProviderProps): React.JSX.Element {
|