@teardown/cli 1.2.38 → 2.0.41

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.
Files changed (182) hide show
  1. package/bin/teardown.js +11 -1
  2. package/package.json +77 -57
  3. package/src/cli/commands/init.ts +254 -0
  4. package/src/cli/commands/plugins.ts +93 -0
  5. package/src/cli/commands/prebuild.ts +168 -0
  6. package/src/cli/commands/run.ts +727 -0
  7. package/src/cli/commands/start.ts +87 -0
  8. package/src/cli/commands/validate.ts +62 -0
  9. package/src/cli/index.ts +59 -0
  10. package/src/config/index.ts +45 -0
  11. package/src/config/loader.ts +366 -0
  12. package/src/config/schema.ts +235 -0
  13. package/src/config/types.ts +322 -0
  14. package/src/index.ts +177 -0
  15. package/src/pipeline/cache.ts +179 -0
  16. package/src/pipeline/index.ts +10 -0
  17. package/src/pipeline/stages.ts +692 -0
  18. package/src/plugins/base.ts +370 -0
  19. package/src/plugins/capabilities/biometrics.ts +64 -0
  20. package/src/plugins/capabilities/bluetooth.ts +86 -0
  21. package/src/plugins/capabilities/calendar.ts +57 -0
  22. package/src/plugins/capabilities/camera.ts +77 -0
  23. package/src/plugins/capabilities/contacts.ts +57 -0
  24. package/src/plugins/capabilities/deep-linking.ts +124 -0
  25. package/src/plugins/capabilities/firebase.ts +138 -0
  26. package/src/plugins/capabilities/index.ts +96 -0
  27. package/src/plugins/capabilities/location.ts +87 -0
  28. package/src/plugins/capabilities/photo-library.ts +80 -0
  29. package/src/plugins/capabilities/push-notifications.ts +98 -0
  30. package/src/plugins/capabilities/sign-in-with-apple.ts +53 -0
  31. package/src/plugins/context.ts +220 -0
  32. package/src/plugins/index.ts +26 -0
  33. package/src/plugins/resolver.ts +321 -0
  34. package/src/templates/generator.ts +507 -0
  35. package/src/templates/index.ts +9 -0
  36. package/src/templates/paths.ts +25 -0
  37. package/src/transformers/android/gradle.ts +400 -0
  38. package/src/transformers/android/index.ts +19 -0
  39. package/src/transformers/android/manifest.ts +506 -0
  40. package/src/transformers/index.ts +39 -0
  41. package/src/transformers/ios/entitlements.ts +283 -0
  42. package/src/transformers/ios/index.ts +10 -0
  43. package/src/transformers/ios/pbxproj.ts +267 -0
  44. package/src/transformers/ios/plist.ts +198 -0
  45. package/src/utils/fs.ts +429 -0
  46. package/src/utils/index.ts +21 -0
  47. package/src/utils/logger.ts +203 -0
  48. package/templates/.gitignore +63 -0
  49. package/templates/Gemfile +3 -0
  50. package/templates/android/app/build.gradle.kts +97 -0
  51. package/templates/android/app/proguard-rules.pro +10 -0
  52. package/templates/android/app/src/main/AndroidManifest.xml +26 -0
  53. package/templates/android/app/src/main/java/com/appname/MainActivity.kt +22 -0
  54. package/templates/android/app/src/main/java/com/appname/MainApplication.kt +44 -0
  55. package/templates/android/app/src/main/res/values/strings.xml +3 -0
  56. package/templates/android/app/src/main/res/values/styles.xml +7 -0
  57. package/templates/android/build.gradle.kts +44 -0
  58. package/templates/android/gradle.properties +39 -0
  59. package/templates/android/settings.gradle.kts +12 -0
  60. package/templates/babel.config.js +15 -0
  61. package/templates/index.js +7 -0
  62. package/templates/ios/.xcode.env +11 -0
  63. package/templates/ios/AppName/AppDelegate.swift +25 -0
  64. package/templates/ios/AppName/AppName-Bridging-Header.h +4 -0
  65. package/templates/ios/AppName/AppName.entitlements +6 -0
  66. package/templates/ios/AppName/Images.xcassets/AppIcon.appiconset/Contents.json +35 -0
  67. package/templates/ios/AppName/Images.xcassets/Contents.json +6 -0
  68. package/templates/ios/AppName/Info.plist +49 -0
  69. package/templates/ios/AppName/LaunchScreen.storyboard +38 -0
  70. package/templates/ios/AppName.xcodeproj/project.pbxproj +402 -0
  71. package/templates/ios/AppName.xcodeproj/xcshareddata/xcschemes/AppName.xcscheme +78 -0
  72. package/templates/ios/Podfile +35 -0
  73. package/templates/metro.config.js +41 -0
  74. package/templates/package.json +57 -0
  75. package/templates/react-native.config.js +8 -0
  76. package/templates/src/app/index.tsx +34 -0
  77. package/templates/src/assets/fonts/.gitkeep +1 -0
  78. package/templates/src/assets/images/.gitkeep +1 -0
  79. package/templates/src/components/ui/accordion.tsx +114 -0
  80. package/templates/src/components/ui/avatar.tsx +75 -0
  81. package/templates/src/components/ui/button.tsx +93 -0
  82. package/templates/src/components/ui/card.tsx +120 -0
  83. package/templates/src/components/ui/checkbox.tsx +133 -0
  84. package/templates/src/components/ui/chip.tsx +95 -0
  85. package/templates/src/components/ui/dialog.tsx +134 -0
  86. package/templates/src/components/ui/divider.tsx +67 -0
  87. package/templates/src/components/ui/error-view.tsx +82 -0
  88. package/templates/src/components/ui/form-field.tsx +101 -0
  89. package/templates/src/components/ui/index.ts +100 -0
  90. package/templates/src/components/ui/popover.tsx +92 -0
  91. package/templates/src/components/ui/pressable-feedback.tsx +88 -0
  92. package/templates/src/components/ui/radio-group.tsx +153 -0
  93. package/templates/src/components/ui/scroll-shadow.tsx +108 -0
  94. package/templates/src/components/ui/select.tsx +165 -0
  95. package/templates/src/components/ui/skeleton-group.tsx +97 -0
  96. package/templates/src/components/ui/skeleton.tsx +87 -0
  97. package/templates/src/components/ui/spinner.tsx +87 -0
  98. package/templates/src/components/ui/surface.tsx +95 -0
  99. package/templates/src/components/ui/switch.tsx +124 -0
  100. package/templates/src/components/ui/tabs.tsx +154 -0
  101. package/templates/src/components/ui/text-field.tsx +106 -0
  102. package/templates/src/components/ui/toast.tsx +129 -0
  103. package/templates/src/contexts/.gitkeep +2 -0
  104. package/templates/src/core/clients/api/api.client.ts +113 -0
  105. package/templates/src/core/clients/api/index.ts +1 -0
  106. package/templates/src/core/clients/storage/index.ts +1 -0
  107. package/templates/src/core/clients/storage/storage.client.ts +121 -0
  108. package/templates/src/core/constants/index.ts +19 -0
  109. package/templates/src/core/core.ts +40 -0
  110. package/templates/src/core/index.ts +10 -0
  111. package/templates/src/global.css +87 -0
  112. package/templates/src/hooks/index.ts +6 -0
  113. package/templates/src/hooks/use-debounce.ts +23 -0
  114. package/templates/src/hooks/use-mounted.ts +21 -0
  115. package/templates/src/index.ts +28 -0
  116. package/templates/src/lib/index.ts +5 -0
  117. package/templates/src/lib/utils.ts +115 -0
  118. package/templates/src/modules/.gitkeep +6 -0
  119. package/templates/src/navigation/index.ts +8 -0
  120. package/templates/src/navigation/navigation-provider.tsx +36 -0
  121. package/templates/src/navigation/router.tsx +137 -0
  122. package/templates/src/providers/app.provider.tsx +29 -0
  123. package/templates/src/providers/index.ts +5 -0
  124. package/templates/src/routes/(tabs)/_layout.tsx +42 -0
  125. package/templates/src/routes/(tabs)/explore.tsx +161 -0
  126. package/templates/src/routes/(tabs)/home.tsx +138 -0
  127. package/templates/src/routes/(tabs)/profile.tsx +151 -0
  128. package/templates/src/routes/_layout.tsx +18 -0
  129. package/templates/src/routes/settings.tsx +194 -0
  130. package/templates/src/screens/auth/index.ts +6 -0
  131. package/templates/src/screens/auth/login.tsx +165 -0
  132. package/templates/src/screens/auth/register.tsx +203 -0
  133. package/templates/src/screens/home.tsx +204 -0
  134. package/templates/src/screens/index.ts +17 -0
  135. package/templates/src/screens/profile.tsx +210 -0
  136. package/templates/src/screens/settings.tsx +216 -0
  137. package/templates/src/screens/welcome.tsx +101 -0
  138. package/templates/src/styles/index.ts +103 -0
  139. package/templates/src/types/common.ts +71 -0
  140. package/templates/src/types/index.ts +5 -0
  141. package/templates/tsconfig.json +14 -0
  142. package/README.md +0 -15
  143. package/assets/favicon.ico +0 -0
  144. package/dist/commands/dev/dev.js +0 -55
  145. package/dist/commands/init/init-teardown.js +0 -26
  146. package/dist/index.js +0 -20
  147. package/dist/modules/dev/dev-menu/keyboard-handler.js +0 -138
  148. package/dist/modules/dev/dev-menu/open-debugger-keyboard-handler.js +0 -105
  149. package/dist/modules/dev/dev-server/cdp/cdp.adapter.js +0 -12
  150. package/dist/modules/dev/dev-server/cdp/index.js +0 -18
  151. package/dist/modules/dev/dev-server/cdp/types.js +0 -2
  152. package/dist/modules/dev/dev-server/dev-server-checker.js +0 -72
  153. package/dist/modules/dev/dev-server/dev-server.js +0 -269
  154. package/dist/modules/dev/dev-server/inspector/device.event-reporter.js +0 -165
  155. package/dist/modules/dev/dev-server/inspector/device.js +0 -577
  156. package/dist/modules/dev/dev-server/inspector/inspector.js +0 -204
  157. package/dist/modules/dev/dev-server/inspector/types.js +0 -2
  158. package/dist/modules/dev/dev-server/inspector/wss/servers/debugger-connection.server.js +0 -61
  159. package/dist/modules/dev/dev-server/inspector/wss/servers/device-connection.server.js +0 -64
  160. package/dist/modules/dev/dev-server/plugins/devtools.plugin.js +0 -50
  161. package/dist/modules/dev/dev-server/plugins/favicon.plugin.js +0 -19
  162. package/dist/modules/dev/dev-server/plugins/multipart.plugin.js +0 -62
  163. package/dist/modules/dev/dev-server/plugins/systrace.plugin.js +0 -28
  164. package/dist/modules/dev/dev-server/plugins/types.js +0 -2
  165. package/dist/modules/dev/dev-server/plugins/wss/index.js +0 -19
  166. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-api.server.js +0 -66
  167. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-debugger.server.js +0 -128
  168. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-dev-client.server.js +0 -75
  169. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-events.server.js +0 -198
  170. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-hmr.server.js +0 -120
  171. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-message.server.js +0 -357
  172. package/dist/modules/dev/dev-server/plugins/wss/types.js +0 -2
  173. package/dist/modules/dev/dev-server/plugins/wss/web-socket-router.js +0 -57
  174. package/dist/modules/dev/dev-server/plugins/wss/web-socket-server-adapter.js +0 -26
  175. package/dist/modules/dev/dev-server/plugins/wss/web-socket-server.js +0 -46
  176. package/dist/modules/dev/dev-server/plugins/wss/wss.plugin.js +0 -55
  177. package/dist/modules/dev/dev-server/sybmolicate/sybmolicate.plugin.js +0 -36
  178. package/dist/modules/dev/dev-server/sybmolicate/types.js +0 -2
  179. package/dist/modules/dev/terminal/base.terminal.reporter.js +0 -78
  180. package/dist/modules/dev/terminal/terminal.reporter.js +0 -76
  181. package/dist/modules/dev/types.js +0 -2
  182. package/dist/modules/dev/utils/log.js +0 -73
@@ -0,0 +1,235 @@
1
+ import { z } from "zod";
2
+
3
+ /**
4
+ * iOS-specific configuration schema
5
+ */
6
+ export const iOSConfigSchema = z.object({
7
+ /** Bundle identifier in reverse domain notation */
8
+ bundleIdentifier: z
9
+ .string()
10
+ .regex(
11
+ /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$/i,
12
+ "Bundle identifier must be reverse domain notation (e.g., com.example.myapp)"
13
+ ),
14
+
15
+ /** Build number for App Store */
16
+ buildNumber: z.number().int().positive().optional().default(1),
17
+
18
+ /** Minimum iOS deployment target */
19
+ deploymentTarget: z
20
+ .string()
21
+ .regex(/^\d+\.\d+$/, "Deployment target must be in format X.Y (e.g., 15.0)")
22
+ .optional()
23
+ .default("15.0"),
24
+
25
+ /** Additional Info.plist entries */
26
+ infoPlist: z.record(z.string(), z.unknown()).optional(),
27
+
28
+ /** Additional entitlements */
29
+ entitlements: z.record(z.string(), z.unknown()).optional(),
30
+
31
+ /** Development team ID */
32
+ developmentTeamId: z.string().optional(),
33
+
34
+ /** Code signing style */
35
+ codeSigningStyle: z.enum(["Automatic", "Manual"]).optional().default("Automatic"),
36
+
37
+ /** Provisioning profile name (for manual signing) */
38
+ provisioningProfile: z.string().optional(),
39
+ });
40
+
41
+ /**
42
+ * Android-specific configuration schema
43
+ */
44
+ export const AndroidConfigSchema = z.object({
45
+ /** Android package name */
46
+ packageName: z
47
+ .string()
48
+ .regex(
49
+ /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$/i,
50
+ "Package name must be reverse domain notation (e.g., com.example.myapp)"
51
+ ),
52
+
53
+ /** Version code for Play Store */
54
+ versionCode: z.number().int().positive().optional().default(1),
55
+
56
+ /** Minimum SDK version */
57
+ minSdkVersion: z.number().int().min(21).max(35).optional().default(23),
58
+
59
+ /** Target SDK version */
60
+ targetSdkVersion: z.number().int().min(21).max(35).optional().default(34),
61
+
62
+ /** Compile SDK version */
63
+ compileSdkVersion: z.number().int().min(21).max(35).optional().default(34),
64
+
65
+ /** Manifest placeholders */
66
+ manifestPlaceholders: z.record(z.string(), z.string()).optional(),
67
+
68
+ /** Enable Jetifier for AndroidX migration */
69
+ enableJetifier: z.boolean().optional().default(true),
70
+
71
+ /** Enable R8 minification */
72
+ enableR8: z.boolean().optional().default(true),
73
+
74
+ /** ProGuard rules file */
75
+ proguardRules: z.string().optional(),
76
+
77
+ /** Signing configuration */
78
+ signingConfig: z
79
+ .object({
80
+ storeFile: z.string(),
81
+ storePassword: z.string().optional(),
82
+ keyAlias: z.string(),
83
+ keyPassword: z.string().optional(),
84
+ })
85
+ .optional(),
86
+ });
87
+
88
+ /**
89
+ * Splash screen configuration schema
90
+ */
91
+ export const SplashConfigSchema = z.object({
92
+ /** Path to splash image */
93
+ image: z.string(),
94
+
95
+ /** Background color in hex format */
96
+ backgroundColor: z.string().regex(/^#[0-9A-Fa-f]{6}$/, "Background color must be hex format (e.g., #FFFFFF)"),
97
+
98
+ /** Resize mode for the image */
99
+ resizeMode: z.enum(["contain", "cover", "native"]).optional().default("contain"),
100
+ });
101
+
102
+ /**
103
+ * Plugin entry schema - supports string names or [Plugin, config] tuples
104
+ */
105
+ export const PluginEntrySchema = z.union([
106
+ z.string(),
107
+ z.tuple([z.any(), z.record(z.string(), z.unknown())]),
108
+ z.tuple([z.any()]),
109
+ ]);
110
+
111
+ /**
112
+ * Main Teardown configuration schema
113
+ */
114
+ export const TeardownConfigSchema = z.object({
115
+ /** App display name */
116
+ name: z.string().min(1, "App name is required"),
117
+
118
+ /** URL-safe slug for the app */
119
+ slug: z.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with dashes"),
120
+
121
+ /** Semantic version */
122
+ version: z.string().regex(/^\d+\.\d+\.\d+$/, "Version must be semver format (e.g., 1.0.0)"),
123
+
124
+ /** iOS-specific configuration */
125
+ ios: iOSConfigSchema.optional(),
126
+
127
+ /** Android-specific configuration */
128
+ android: AndroidConfigSchema.optional(),
129
+
130
+ /** Path to app icon */
131
+ icon: z.string().optional(),
132
+
133
+ /** Splash screen configuration */
134
+ splash: SplashConfigSchema.optional(),
135
+
136
+ /** Plugin configurations */
137
+ plugins: z.array(PluginEntrySchema).optional().default([]),
138
+
139
+ /** Custom scheme for deep linking (legacy support) */
140
+ scheme: z.string().optional(),
141
+
142
+ /** App orientation */
143
+ orientation: z.enum(["portrait", "landscape", "default"]).optional().default("default"),
144
+
145
+ /** User interface style */
146
+ userInterfaceStyle: z.enum(["light", "dark", "automatic"]).optional().default("automatic"),
147
+
148
+ /** Additional native modules to include */
149
+ nativeModules: z.array(z.string()).optional(),
150
+
151
+ /** Environment variables to inject */
152
+ env: z.record(z.string(), z.string()).optional(),
153
+ });
154
+
155
+ /**
156
+ * Validation error with suggestions
157
+ */
158
+ export interface ValidationError {
159
+ path: string;
160
+ message: string;
161
+ suggestion?: string;
162
+ }
163
+
164
+ /**
165
+ * Format Zod validation errors into human-readable messages
166
+ */
167
+ export function formatValidationErrors(error: z.ZodError): ValidationError[] {
168
+ return error.issues.map((issue) => {
169
+ const path = issue.path.join(".");
170
+ const suggestion = getSuggestion(issue);
171
+
172
+ return {
173
+ path,
174
+ message: issue.message,
175
+ suggestion,
176
+ };
177
+ });
178
+ }
179
+
180
+ /**
181
+ * Get helpful suggestions for common validation errors
182
+ */
183
+ function getSuggestion(issue: z.ZodIssue): string | undefined {
184
+ const path = issue.path.join(".");
185
+
186
+ if (path === "ios.bundleIdentifier" || path === "android.packageName") {
187
+ return 'Use reverse domain notation like "com.yourcompany.appname"';
188
+ }
189
+
190
+ if (path === "version") {
191
+ return 'Use semantic versioning like "1.0.0"';
192
+ }
193
+
194
+ if (path === "slug") {
195
+ return 'Use lowercase letters, numbers, and dashes only like "my-app"';
196
+ }
197
+
198
+ if (path === "splash.backgroundColor") {
199
+ return 'Use hex color format like "#FFFFFF"';
200
+ }
201
+
202
+ if (issue.code === "invalid_type") {
203
+ return "Expected a different type";
204
+ }
205
+
206
+ return undefined;
207
+ }
208
+
209
+ /**
210
+ * Validate configuration and return detailed errors
211
+ */
212
+ export function validateConfig(config: unknown): {
213
+ success: boolean;
214
+ data?: z.infer<typeof TeardownConfigSchema>;
215
+ errors?: ValidationError[];
216
+ } {
217
+ const result = TeardownConfigSchema.safeParse(config);
218
+
219
+ if (result.success) {
220
+ return { success: true, data: result.data };
221
+ }
222
+
223
+ return {
224
+ success: false,
225
+ errors: formatValidationErrors(result.error),
226
+ };
227
+ }
228
+
229
+ /**
230
+ * Helper to create type-safe config (for defineConfig function)
231
+ */
232
+ export function defineConfig(config: z.input<typeof TeardownConfigSchema>): z.infer<typeof TeardownConfigSchema> {
233
+ const result = TeardownConfigSchema.parse(config);
234
+ return result;
235
+ }
@@ -0,0 +1,322 @@
1
+ import type { z } from "zod";
2
+ import type { BasePlugin } from "../plugins/base";
3
+ import type { AndroidConfigSchema, iOSConfigSchema, TeardownConfigSchema } from "./schema";
4
+
5
+ /**
6
+ * Unified permission status across platforms
7
+ */
8
+ export type PermissionStatus =
9
+ | "unavailable" // Feature not available on device
10
+ | "denied" // User denied, can request again
11
+ | "limited" // iOS 14+ limited photo access
12
+ | "granted" // Full permission granted
13
+ | "blocked"; // User denied with "don't ask again"
14
+
15
+ /**
16
+ * Permission mapping interface for cross-platform abstraction
17
+ */
18
+ export interface PermissionMapping {
19
+ capability: string;
20
+ ios: {
21
+ infoPlistKey: string;
22
+ entitlement?: string;
23
+ framework?: string;
24
+ };
25
+ android: {
26
+ permissions: string[];
27
+ protectionLevel: "normal" | "dangerous" | "signature";
28
+ minSdk?: number;
29
+ };
30
+ }
31
+
32
+ /**
33
+ * iOS-specific configuration
34
+ */
35
+ export type iOSConfig = z.infer<typeof iOSConfigSchema>;
36
+
37
+ /**
38
+ * Android-specific configuration
39
+ */
40
+ export type AndroidConfig = z.infer<typeof AndroidConfigSchema>;
41
+
42
+ /**
43
+ * Main Teardown configuration type
44
+ */
45
+ export type TeardownConfig = z.infer<typeof TeardownConfigSchema>;
46
+
47
+ /**
48
+ * Splash screen configuration
49
+ */
50
+ export interface SplashConfig {
51
+ image: string;
52
+ backgroundColor: string;
53
+ resizeMode?: "contain" | "cover" | "native";
54
+ }
55
+
56
+ /**
57
+ * Plugin entry - can be a string name or tuple with config
58
+ */
59
+ export type PluginEntry<TConfig = unknown> = string | [new () => BasePlugin<TConfig>, TConfig];
60
+
61
+ /**
62
+ * Build configuration for native projects
63
+ */
64
+ export interface BuildConfig {
65
+ ios?: {
66
+ scheme?: string;
67
+ configuration?: "Debug" | "Release";
68
+ destination?: string;
69
+ };
70
+ android?: {
71
+ variant?: string;
72
+ flavor?: string;
73
+ };
74
+ }
75
+
76
+ /**
77
+ * App configuration after plugin processing
78
+ */
79
+ export interface ProcessedAppConfig extends TeardownConfig {
80
+ /**
81
+ * Resolved iOS Info.plist entries
82
+ */
83
+ resolvedInfoPlist: Record<string, unknown>;
84
+
85
+ /**
86
+ * Resolved iOS entitlements
87
+ */
88
+ resolvedEntitlements: Record<string, unknown>;
89
+
90
+ /**
91
+ * Resolved Android manifest permissions
92
+ */
93
+ resolvedAndroidPermissions: string[];
94
+
95
+ /**
96
+ * Resolved Android manifest features
97
+ */
98
+ resolvedAndroidFeatures: string[];
99
+
100
+ /**
101
+ * Resolved Android manifest metadata
102
+ */
103
+ resolvedAndroidMetadata: Record<string, string>;
104
+
105
+ /**
106
+ * Resolved Gradle dependencies
107
+ */
108
+ resolvedGradleDependencies: string[];
109
+
110
+ /**
111
+ * Resolved frameworks for iOS
112
+ */
113
+ resolvedFrameworks: string[];
114
+
115
+ /**
116
+ * Resolved CocoaPods dependencies
117
+ */
118
+ resolvedPodDependencies: Array<{ name: string; version?: string; options?: Record<string, unknown> }>;
119
+
120
+ /**
121
+ * iOS background modes
122
+ */
123
+ resolvedBackgroundModes: string[];
124
+
125
+ /**
126
+ * iOS URL schemes
127
+ */
128
+ resolvedUrlSchemes: string[];
129
+
130
+ /**
131
+ * Android intent filters
132
+ */
133
+ resolvedIntentFilters: AndroidIntentFilter[];
134
+ }
135
+
136
+ /**
137
+ * Android intent filter configuration
138
+ */
139
+ export interface AndroidIntentFilter {
140
+ actions: string[];
141
+ categories: string[];
142
+ data?: {
143
+ scheme?: string;
144
+ host?: string;
145
+ pathPrefix?: string;
146
+ }[];
147
+ autoVerify?: boolean;
148
+ }
149
+
150
+ /**
151
+ * File change operation for dry-run mode
152
+ */
153
+ export interface FileChange {
154
+ path: string;
155
+ operation: "create" | "modify" | "delete";
156
+ before?: string;
157
+ after: string;
158
+ diff?: string;
159
+ }
160
+
161
+ /**
162
+ * Warning during prebuild process
163
+ */
164
+ export interface PrebuildWarning {
165
+ code: string;
166
+ message: string;
167
+ plugin?: string;
168
+ file?: string;
169
+ suggestion?: string;
170
+ }
171
+
172
+ /**
173
+ * Error during prebuild process
174
+ */
175
+ export interface PrebuildError {
176
+ code: string;
177
+ message: string;
178
+ plugin?: string;
179
+ file?: string;
180
+ stack?: string;
181
+ }
182
+
183
+ /**
184
+ * Dry run result
185
+ */
186
+ export interface DryRunResult {
187
+ changes: FileChange[];
188
+ warnings: PrebuildWarning[];
189
+ errors: PrebuildError[];
190
+ }
191
+
192
+ /**
193
+ * Prebuild options
194
+ */
195
+ export interface PrebuildOptions {
196
+ /** Target platform */
197
+ platform: "ios" | "android" | "all";
198
+
199
+ /** Clean native directories before prebuild */
200
+ clean?: boolean;
201
+
202
+ /** Dry run mode - preview changes without applying */
203
+ dryRun?: boolean;
204
+
205
+ /** Project root directory */
206
+ projectRoot?: string;
207
+
208
+ /** Skip plugin validation */
209
+ skipValidation?: boolean;
210
+
211
+ /** Verbose logging */
212
+ verbose?: boolean;
213
+ }
214
+
215
+ /**
216
+ * Template context for rendering
217
+ */
218
+ export interface TemplateContext {
219
+ APP_NAME: string;
220
+ BUNDLE_IDENTIFIER: string;
221
+ PACKAGE_NAME: string;
222
+ VERSION: string;
223
+ BUILD_NUMBER: number;
224
+ PERMISSIONS: Record<string, PermissionConfig>;
225
+ ENTITLEMENTS: string[];
226
+ BACKGROUND_MODES: string[];
227
+ [key: string]: unknown;
228
+ }
229
+
230
+ /**
231
+ * Permission configuration for templates
232
+ */
233
+ export interface PermissionConfig {
234
+ key: string;
235
+ description: string;
236
+ required?: boolean;
237
+ }
238
+
239
+ /**
240
+ * Health data types for HealthKit
241
+ */
242
+ export type HealthKitDataType =
243
+ | "steps"
244
+ | "distance"
245
+ | "calories"
246
+ | "heart_rate"
247
+ | "sleep"
248
+ | "workout"
249
+ | "weight"
250
+ | "height"
251
+ | "blood_glucose"
252
+ | "blood_pressure"
253
+ | "body_fat"
254
+ | "respiratory_rate";
255
+
256
+ /**
257
+ * Health data types for Health Connect (Android)
258
+ */
259
+ export type HealthConnectDataType =
260
+ | "Steps"
261
+ | "Distance"
262
+ | "TotalCaloriesBurned"
263
+ | "HeartRate"
264
+ | "SleepSession"
265
+ | "ExerciseSession"
266
+ | "Weight"
267
+ | "Height"
268
+ | "BloodGlucose"
269
+ | "BloodPressure"
270
+ | "BodyFat"
271
+ | "RespiratoryRate";
272
+
273
+ /**
274
+ * Widget definition for iOS
275
+ */
276
+ export interface WidgetDefinition {
277
+ name: string;
278
+ displayName: string;
279
+ description: string;
280
+ supportedFamilies: (
281
+ | "systemSmall"
282
+ | "systemMedium"
283
+ | "systemLarge"
284
+ | "accessoryCircular"
285
+ | "accessoryRectangular"
286
+ | "accessoryInline"
287
+ )[];
288
+ }
289
+
290
+ /**
291
+ * Widget definition for Android
292
+ */
293
+ export interface AndroidWidgetDefinition {
294
+ name: string;
295
+ label: string;
296
+ minWidth: number;
297
+ minHeight: number;
298
+ updatePeriodMillis?: number;
299
+ previewImage?: string;
300
+ resizeMode?: "horizontal" | "vertical" | "both" | "none";
301
+ }
302
+
303
+ /**
304
+ * Intent definition for Siri Shortcuts
305
+ */
306
+ export interface IntentDefinition {
307
+ identifier: string;
308
+ title: string;
309
+ description: string;
310
+ category: "generic" | "order" | "buy" | "search";
311
+ parameters?: IntentParameter[];
312
+ }
313
+
314
+ /**
315
+ * Intent parameter definition
316
+ */
317
+ export interface IntentParameter {
318
+ name: string;
319
+ type: "string" | "integer" | "boolean" | "url";
320
+ displayName: string;
321
+ required?: boolean;
322
+ }