File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,13 +12,19 @@ export interface StallionPluginProps {
1212 * Main plugin function that applies Stallion configuration to both Android and iOS
1313 */
1414export const withStallion : ConfigPlugin < StallionPluginProps > = ( config , props ) => {
15- // Validate required props
16- if ( ! props . projectId ) {
17- throw new Error ( 'expo-stallion-plugin: projectId is required' ) ;
18- }
19- if ( ! props . appToken ) {
20- throw new Error ( 'expo-stallion-plugin: appToken is required' ) ;
15+ // If required props are missing, skip plugin gracefully.
16+ // This allows commands like `eas env:pull` to work before
17+ // environment variables have been pulled down.
18+ if ( ! props . projectId || ! props . appToken ) {
19+ console . warn (
20+ 'expo-stallion-plugin: projectId and appToken are not set — skipping native configuration. ' +
21+ 'This is expected during commands like `eas env:pull`. ' +
22+ 'Make sure these values are set before running a build.'
23+ ) ;
24+ return config ;
2125 }
26+
27+ // Validate prop format (only when values are actually provided)
2228 if ( ! props . appToken . startsWith ( 'spb_' ) ) {
2329 throw new Error ( 'expo-stallion-plugin: appToken must start with "spb_"' ) ;
2430 }
Original file line number Diff line number Diff line change 33 "target" : " ES2020" ,
44 "module" : " commonjs" ,
55 "lib" : [" ES2020" ],
6+ "types" : [" node" ],
67 "declaration" : true ,
78 "outDir" : " ./build" ,
89 "rootDir" : " ./src" ,
You can’t perform that action at this time.
0 commit comments