@geejay/use-feature-flags 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -20,7 +20,7 @@ yarn add use-feature-flags
20
20
  import { useFeatureFlags } from 'use-feature-flags';
21
21
 
22
22
  export default function MyComponent() {
23
- const { isActive, loading } = useFeatureFlags();
23
+ const { isActive, loading } = useFeatureFlags("YOUR-API-KEY"); //API param only needed on the first useFeatureFlags call
24
24
 
25
25
  if (loading) return null;
26
26
 
@@ -28,25 +28,14 @@ export default function MyComponent() {
28
28
  }
29
29
  ```
30
30
 
31
- By default the hook connects to the Supabase instance defined in `DEFAULT_SUPABASE_URL`, `DEFAULT_SUPABASE_KEY` and `DEFAULT_TENANT_ID`. Update these constants in `useFeatureFlags.ts` if you need different defaults.
32
31
 
33
- ## Building
34
32
 
35
- Run the following inside the package directory:
33
+ ## Flag Management
36
34
 
37
- ```
38
- npm run build
39
- ```
40
-
41
- This compiles the TypeScript sources to the `dist` folder.
42
-
43
- ## Publishing
44
-
45
- After building, you can publish the package to npm:
46
-
47
- ```
48
- npm publish --access public
49
- ```
50
-
51
- Make sure you have configured your npm credentials before publishing.
35
+ visit https://featureflags-ai.netlify.app/ to get an API key and manage your feature flags from the web.
36
+ - one-step install for your react/react-native/react-native-web apps
37
+ - toggles features on/off WITHOUT reload of your REACT app
38
+ - supports multiple environments/ subdomains from one UI
39
+ - supports multiple tenants
40
+ - bi-directional creation of flags and more!
52
41
 
package/dist/store.d.ts CHANGED
@@ -14,4 +14,4 @@ export declare const featureFlagsAtom: import("jotai").PrimitiveAtom<{
14
14
  };
15
15
  };
16
16
  export declare function setApiKey(key: string): void;
17
- export declare function getApiKey(): string | null;
17
+ export declare function getApiKey(): string;
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "@geejay/use-feature-flags",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "React hook for feature flag management using Supabase",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
- "files": ["dist", "README.md"],
7
+ "files": [
8
+ "dist",
9
+ "README.md"
10
+ ],
8
11
  "scripts": {
9
- "build": "tsc"
10
- },
12
+ "build": "rm -rf dist && tsc -p tsconfig.build.json"
13
+ },
14
+
11
15
  "keywords": ["feature flags", "supabase", "react", "hooks"],
12
16
  "repository": {
13
17
  "type": "git",