react-native-config-ultimate 0.0.6 → 0.0.7

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,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-config-ultimate",
3
3
  "title": "React Native Config Ultimate",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "description": "Config that works. A community-maintained fork of react-native-ultimate-config.",
6
6
  "main": "index.js",
7
7
  "module": "index.js",
@@ -24,6 +24,7 @@
24
24
  "index.web.js",
25
25
  "src/*.js",
26
26
  "!src/*.spec.js",
27
+ "src/NativeUltimateConfig.ts",
27
28
  "src/templates",
28
29
  "override.js",
29
30
  "ios/UltimateConfig.{h,mm}",
@@ -0,0 +1,21 @@
1
+ /**
2
+ * TurboModule spec for react-native-config-ultimate
3
+ * This file is read by React Native Codegen to generate native bindings.
4
+ * Do not rename or move this file - Codegen relies on the "Native" prefix.
5
+ *
6
+ * NOTE: We use getAll(): string instead of getConstants(): {} because:
7
+ * - Codegen requires getConstants() to have a concrete return type with named fields
8
+ * - Config keys are dynamic (generated from .env at build time), so a fixed type is impossible
9
+ * - getAll() returns all config values as a JSON-encoded string, which Codegen handles perfectly
10
+ * - This gives us a working TurboModule binding for New Architecture
11
+ */
12
+ import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
13
+ import { TurboModuleRegistry } from 'react-native';
14
+
15
+ export interface Spec extends TurboModule {
16
+ // Returns all config values as a JSON-encoded string.
17
+ // Using string avoids Codegen limitations with dynamic/indexed object types.
18
+ readonly getAll: () => string;
19
+ }
20
+
21
+ export default TurboModuleRegistry.get<Spec>('UltimateConfig');