@mrepol742/launch-kit 0.1.2 → 0.1.3
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 +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Control who gets access to what, and when.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install
|
|
6
|
+
npm install @mrepol742/launch-kit
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
import { createLaunch } from "
|
|
10
|
+
import { createLaunch } from "@mrepol742/launch-kit";
|
|
11
11
|
|
|
12
12
|
const launch = createLaunch({
|
|
13
13
|
phases: {
|
|
@@ -24,11 +24,11 @@ const decision = await launch.canAccess({ id: "usr_123", roles: ["tester"] });
|
|
|
24
24
|
// { allowed: true, reason: "ALLOWED", message: "Access granted.", phase: "beta", ... }
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
## What is
|
|
27
|
+
## What is Launch-Kit?
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Launch-Kit is a small, framework-independent TypeScript evaluation engine for product launches,
|
|
30
30
|
private betas, early access, staged rollouts, and separately launched features. Your application
|
|
31
|
-
owns authentication, users, persistence, and invite storage;
|
|
31
|
+
owns authentication, users, persistence, and invite storage; Launch-Kit evaluates your rules.
|
|
32
32
|
|
|
33
33
|
The core has no production dependencies, telemetry, network calls, database, or framework imports.
|
|
34
34
|
It runs anywhere modern server-side JavaScript runs, including Node.js, Next.js, Nuxt, Express,
|
|
@@ -36,16 +36,16 @@ Fastify, NestJS, and serverless functions.
|
|
|
36
36
|
|
|
37
37
|
## Installation
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Launch-Kit is ESM-first and requires Node.js 20 or newer.
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
npm install
|
|
42
|
+
npm install @mrepol742/launch-kit
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## Quick Start
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
|
-
import { createLaunch } from "
|
|
48
|
+
import { createLaunch } from "@mrepol742/launch-kit";
|
|
49
49
|
|
|
50
50
|
const launch = createLaunch({
|
|
51
51
|
id: "acme-launch",
|
|
@@ -91,7 +91,7 @@ const launch = createLaunch(config, {
|
|
|
91
91
|
|
|
92
92
|
## User Access
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Launch-Kit accepts your user object; it does not authenticate anyone. Direct phase criteria are
|
|
95
95
|
combined with AND semantics, while values inside an array use OR semantics.
|
|
96
96
|
|
|
97
97
|
```ts
|
|
@@ -144,7 +144,7 @@ Unknown cohort references fail immediately with a `LaunchConfigurationError`.
|
|
|
144
144
|
## Percentage Rollouts
|
|
145
145
|
|
|
146
146
|
Rollouts assign each eligible user to a stable bucket from 0 through 99 using the launch id, phase
|
|
147
|
-
name, and user id.
|
|
147
|
+
name, and user id. Launch-Kit never uses `Math.random()`.
|
|
148
148
|
|
|
149
149
|
```ts
|
|
150
150
|
earlyAccess: { allow: ["paid"], rollout: 25 }
|
|
@@ -168,7 +168,7 @@ Steps must be chronological and percentages cannot decrease.
|
|
|
168
168
|
|
|
169
169
|
## Invite Codes
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
Launch-Kit coordinates validation but does not store invite codes. Supply trusted application logic:
|
|
172
172
|
|
|
173
173
|
```ts
|
|
174
174
|
const launch = createLaunch({
|
|
@@ -200,7 +200,7 @@ const launch = createLaunch({
|
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
Every listed rule must pass. A false result returns `CUSTOM_RULE_DENIED`; thrown errors are wrapped
|
|
203
|
-
in `LaunchRuleEvaluationError`.
|
|
203
|
+
in `LaunchRuleEvaluationError`. Launch-Kit never executes rules from JSON or remote configuration.
|
|
204
204
|
|
|
205
205
|
## Feature Launches
|
|
206
206
|
|
|
@@ -228,7 +228,7 @@ may hide a beta button, but it is not a security boundary. Re-check access in th
|
|
|
228
228
|
action, function, or service that serves the protected operation or data.
|
|
229
229
|
|
|
230
230
|
Treat invite codes, user fields, request context, and all other client-provided values as untrusted.
|
|
231
|
-
Keep secrets out of
|
|
231
|
+
Keep secrets out of Launch-Kit configuration. Validate invites through trusted server-side logic.
|
|
232
232
|
|
|
233
233
|
## TypeScript
|
|
234
234
|
|
|
@@ -274,7 +274,7 @@ Use `npm run check` to run the complete verification pipeline.
|
|
|
274
274
|
|
|
275
275
|
## Privacy
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
Launch-Kit contains no telemetry or analytics, collects no user information, sends no configuration
|
|
278
278
|
anywhere, and makes no external requests. Access evaluation is local and deterministic except for
|
|
279
279
|
the custom functions your application explicitly supplies.
|
|
280
280
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrepol742/launch-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A small, framework-independent TypeScript evaluation engine for product launches, private betas, early access, staged rollouts, and separately launched features.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|