flaghoist 0.1.0 → 0.1.1
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 +52 -0
- package/package.json +22 -4
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# flaghoist
|
|
2
|
+
|
|
3
|
+
Feature flags you run yourself. This is the command line tool for setting up a Flaghoist server and
|
|
4
|
+
managing the flags on it.
|
|
5
|
+
|
|
6
|
+
Your whole project is one `flaghoist.toml` file. The CLI turns that into a Cloudflare Worker, or
|
|
7
|
+
hands you the code if you would rather own it.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm create flaghoist@latest team-flags
|
|
11
|
+
cd team-flags
|
|
12
|
+
npx flaghoist deploy
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That gives you an OFREP read API, an admin API, and a dashboard at `/admin`, all from a single
|
|
16
|
+
deploy. On Cloudflare KV, the first deploy also creates the KV namespace for you and writes its id
|
|
17
|
+
into `wrangler.toml`.
|
|
18
|
+
|
|
19
|
+
## Managing flags
|
|
20
|
+
|
|
21
|
+
Point the CLI at your server with `--url` and `--token`, or set `FLAGS_URL` and
|
|
22
|
+
`FLAGS_ADMIN_TOKEN`.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
flaghoist flag list
|
|
26
|
+
flaghoist flag create new-checkout --desc "The redesigned checkout"
|
|
27
|
+
flaghoist flag toggle new-checkout --on
|
|
28
|
+
flaghoist flag rollout new-checkout 25
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Rollouts are sticky. A user who lands inside 25 percent stays inside it as you go to 50, so nobody
|
|
32
|
+
flickers in and out between deploys.
|
|
33
|
+
|
|
34
|
+
## Owning the code
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx flaghoist eject
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Writes `src/index.ts`, `wrangler.toml` and `package.json` into your project. From there it is a
|
|
41
|
+
normal Worker and the CLI steps out of the way.
|
|
42
|
+
|
|
43
|
+
Flags are boolean only. There are no multivariate flags, experiments or scheduled rules, and there
|
|
44
|
+
is no plan to imply otherwise.
|
|
45
|
+
|
|
46
|
+
## Status
|
|
47
|
+
|
|
48
|
+
Pre-alpha, built and maintained by one person. The API can still change without notice, and
|
|
49
|
+
production use is not recommended yet. If you try it and something breaks, an issue is genuinely
|
|
50
|
+
useful.
|
|
51
|
+
|
|
52
|
+
Apache-2.0. Part of [Flaghoist](https://github.com/flaghoist/flaghoist).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flaghoist",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Scaffold, deploy, and manage your Flaghoist feature-flag service from the terminal.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -26,13 +26,31 @@
|
|
|
26
26
|
"smol-toml": "^1.7.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@flaghoist/adapter-memory": "0.1.
|
|
30
|
-
"@flaghoist/core": "0.1.
|
|
31
|
-
"@flaghoist/server": "0.1.
|
|
29
|
+
"@flaghoist/adapter-memory": "0.1.1",
|
|
30
|
+
"@flaghoist/core": "0.1.1",
|
|
31
|
+
"@flaghoist/server": "0.1.1"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"feature-flags",
|
|
38
|
+
"feature-toggles",
|
|
39
|
+
"openfeature",
|
|
40
|
+
"ofrep",
|
|
41
|
+
"cloudflare-workers",
|
|
42
|
+
"self-hosted",
|
|
43
|
+
"cli"
|
|
44
|
+
],
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/flaghoist/flaghoist.git",
|
|
48
|
+
"directory": "packages/cli"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/flaghoist/flaghoist#readme",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/flaghoist/flaghoist/issues"
|
|
53
|
+
},
|
|
36
54
|
"scripts": {
|
|
37
55
|
"build": "tsup src/index.ts src/lib.ts --format esm --dts --clean",
|
|
38
56
|
"test": "vitest run --passWithNoTests",
|