@nebulr-group/bridge-cli 0.5.2 → 0.6.0-beta.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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -32
- package/dist/cli.js.map +1 -1
- package/dist/commands/app.command.d.ts.map +1 -1
- package/dist/commands/app.command.js +63 -1
- package/dist/commands/app.command.js.map +1 -1
- package/dist/commands/flag-init.command.d.ts.map +1 -1
- package/dist/commands/flag-init.command.js +14 -10
- package/dist/commands/flag-init.command.js.map +1 -1
- package/dist/commands/guide.command.d.ts +13 -0
- package/dist/commands/guide.command.d.ts.map +1 -1
- package/dist/commands/guide.command.js +35 -27
- package/dist/commands/guide.command.js.map +1 -1
- package/dist/commands/integration.command.d.ts +27 -0
- package/dist/commands/integration.command.d.ts.map +1 -0
- package/dist/commands/integration.command.js +201 -0
- package/dist/commands/integration.command.js.map +1 -0
- package/dist/commands/plan.command.d.ts +36 -0
- package/dist/commands/plan.command.d.ts.map +1 -1
- package/dist/commands/plan.command.js +63 -6
- package/dist/commands/plan.command.js.map +1 -1
- package/dist/config.d.ts +22 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +46 -1
- package/dist/config.js.map +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +8 -1
- package/dist/output.js.map +1 -1
- package/dist/program.d.ts +10 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +45 -0
- package/dist/program.js.map +1 -0
- package/dist/prompts/auth-master-integration-prompt.md +5 -3
- package/dist/prompts/billing/master.md +8 -4
- package/dist/prompts/guide-coverage.json +12 -0
- package/dist/prompts/integration-success.md +1 -1
- package/package.json +1 -1
- package/dist/commands/integrate.command.d.ts +0 -3
- package/dist/commands/integrate.command.d.ts.map +0 -1
- package/dist/commands/integrate.command.js +0 -49
- package/dist/commands/integrate.command.js.map +0 -1
- package/dist/prompts/architecture.md +0 -560
package/dist/output.js.map
CHANGED
|
@@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AAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtD,IAAI,GAAG,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG;QACb,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL,IAAI;YACJ,OAAO;YACP,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9C;KACF,CAAC;IACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7D,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* Every command group the CLI has, registered on `program`.
|
|
4
|
+
*
|
|
5
|
+
* Kept apart from `cli.ts` (which reads the package version through
|
|
6
|
+
* `import.meta`) so tests can build the real command tree. The prompts test
|
|
7
|
+
* checks every `bridge …` command the guides name against it (TBP-706).
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerCommands(program: Command): void;
|
|
10
|
+
//# sourceMappingURL=program.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmBvD"}
|
package/dist/program.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { registerAppCommands } from './commands/app.command.js';
|
|
2
|
+
import { registerTenantCommands } from './commands/tenant.command.js';
|
|
3
|
+
import { registerUserCommands } from './commands/user.command.js';
|
|
4
|
+
import { registerRoleCommands } from './commands/role.command.js';
|
|
5
|
+
import { registerPrivilegeCommands } from './commands/privilege.command.js';
|
|
6
|
+
import { registerFlagCommands } from './commands/flag.command.js';
|
|
7
|
+
import { registerAuthCommands } from './commands/auth.command.js';
|
|
8
|
+
import { registerBrandingCommands } from './commands/branding.command.js';
|
|
9
|
+
import { registerPlanCommands } from './commands/plan.command.js';
|
|
10
|
+
import { registerTokenCommands } from './commands/token.command.js';
|
|
11
|
+
import { registerEventCommands } from './commands/event.command.js';
|
|
12
|
+
import { registerSetupCommands } from './commands/setup.command.js';
|
|
13
|
+
import { registerInfoCommands } from './commands/info.command.js';
|
|
14
|
+
import { registerGuideCommands } from './commands/guide.command.js';
|
|
15
|
+
import { registerOpsCommands } from './commands/ops.command.js';
|
|
16
|
+
import { registerStripeCommands } from './commands/stripe.command.js';
|
|
17
|
+
import { registerIntegrationCommands } from './commands/integration.command.js';
|
|
18
|
+
/**
|
|
19
|
+
* Every command group the CLI has, registered on `program`.
|
|
20
|
+
*
|
|
21
|
+
* Kept apart from `cli.ts` (which reads the package version through
|
|
22
|
+
* `import.meta`) so tests can build the real command tree. The prompts test
|
|
23
|
+
* checks every `bridge …` command the guides name against it (TBP-706).
|
|
24
|
+
*/
|
|
25
|
+
export function registerCommands(program) {
|
|
26
|
+
registerAppCommands(program);
|
|
27
|
+
registerTenantCommands(program);
|
|
28
|
+
registerUserCommands(program);
|
|
29
|
+
registerRoleCommands(program);
|
|
30
|
+
registerPrivilegeCommands(program);
|
|
31
|
+
registerFlagCommands(program);
|
|
32
|
+
registerAuthCommands(program);
|
|
33
|
+
registerBrandingCommands(program);
|
|
34
|
+
registerPlanCommands(program);
|
|
35
|
+
registerTokenCommands(program);
|
|
36
|
+
registerEventCommands(program);
|
|
37
|
+
registerSetupCommands(program);
|
|
38
|
+
registerInfoCommands(program);
|
|
39
|
+
registerGuideCommands(program);
|
|
40
|
+
registerOpsCommands(program);
|
|
41
|
+
registerStripeCommands(program);
|
|
42
|
+
// After setup + event: adds `setup status` and `event auth-attempts` to those groups (TBP-541).
|
|
43
|
+
registerIntegrationCommands(program);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=program.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAClC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,gGAAgG;IAChG,2BAA2B,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -162,7 +162,9 @@ bridge app update \
|
|
|
162
162
|
--allowed-origins <frontend-url>
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
`--ui-url` is also where links in Bridge's emails point. When your **backend** calls the Bridge API — inviting a user, triggering a password reset — the request carries no browser origin, so Bridge falls back to this URL to build the link. Leave it unset and those users land on Bridge's hosted sign-in pages instead of your app. The URL must also appear in `--allowed-origins`, or Bridge ignores it and uses the hosted pages.
|
|
166
|
+
|
|
167
|
+
If the hosted sign-in UI is on a different origin (e.g., `http://localhost:3091` in local dev, `https://app.thebridge.dev` in prod), add it to `--allowed-origins` as well:
|
|
166
168
|
|
|
167
169
|
```bash
|
|
168
170
|
bridge app update --allowed-origins <frontend-url>,<hosted-url>
|
|
@@ -179,9 +181,9 @@ For each confirmed project, fetch the framework-specific integration prompt.
|
|
|
179
181
|
| Framework | Hosted (default) | SDK |
|
|
180
182
|
|-----------|-------------------|-----|
|
|
181
183
|
| SvelteKit | `bridge guide svelte` | `bridge guide svelte sdk-auth` |
|
|
182
|
-
| React | `bridge guide react` |
|
|
184
|
+
| React | `bridge guide react` | `bridge guide react sdk-auth` |
|
|
183
185
|
| Next.js | `bridge guide nextjs` | `bridge guide nextjs sdk-auth` |
|
|
184
|
-
| Angular | `bridge guide angular` |
|
|
186
|
+
| Angular | `bridge guide angular` | `bridge guide angular sdk-auth` |
|
|
185
187
|
|
|
186
188
|
**Backend projects:**
|
|
187
189
|
|
|
@@ -190,8 +190,12 @@ By default, a signed-in tenant that hasn't chosen a plan is redirected to a dedi
|
|
|
190
190
|
welcome page and can't use the app until they pick one. **Set this up unless the developer
|
|
191
191
|
opts out** — it's the expected first-run experience.
|
|
192
192
|
|
|
193
|
-
- The per-framework guide (Step 4)
|
|
194
|
-
|
|
193
|
+
- The per-framework guide (Step 4) mounts the plugin's subscription pages, which include a
|
|
194
|
+
default paywall page (on SvelteKit: `/subscription/plan`, served by the subscription
|
|
195
|
+
catch-all). Confirm that part ran. Do **not** create a separate welcome page on your own.
|
|
196
|
+
- A dedicated onboarding page such as `/welcome` is a product choice: **ask the developer**
|
|
197
|
+
whether they want one. Only if they say yes, add it as the per-framework guide shows and
|
|
198
|
+
point `billing.paywallRoute` at it.
|
|
195
199
|
- The app-level flag `paymentsAutoRedirect` drives the redirect and is **`true` by
|
|
196
200
|
default** — there is nothing to switch on.
|
|
197
201
|
|
|
@@ -214,7 +218,7 @@ For each integrated project, the agent verifies — do not hand this to the deve
|
|
|
214
218
|
4. Select a paid plan — Stripe Checkout opens
|
|
215
219
|
5. Complete a test payment — redirected back with the updated plan showing
|
|
216
220
|
6. Cancel a payment — redirected back to the subscription page
|
|
217
|
-
7. Paywall (unless opted out): sign in as a new tenant with no plan — you land on the welcome
|
|
221
|
+
7. Paywall (unless opted out): sign in as a new tenant with no plan — you land on the paywall page (or `/welcome` if the developer chose one) and can't reach the app until a plan is chosen
|
|
218
222
|
|
|
219
223
|
If anything fails, diagnose and fix before moving on.
|
|
220
224
|
|
|
@@ -255,7 +259,7 @@ Fill every `[placeholder]` with real values from the integration:
|
|
|
255
259
|
- `[project-name]` — folder name and/or `package.json` name
|
|
256
260
|
- `[plan-names]` — the plan keys (e.g. `free`, `premium`)
|
|
257
261
|
- `[plan-selector-route]` — route where `<PlanSelector>` is mounted
|
|
258
|
-
- `[paywall-summary]` — e.g. "new users sent to `/
|
|
262
|
+
- `[paywall-summary]` — e.g. "new users sent to `/subscription/plan` to pick a plan" (or "off — `paymentsAutoRedirect false`")
|
|
259
263
|
- `[quota-summary]` — metric keys and limits, or "none"
|
|
260
264
|
- `[what-i-actually-did]` / `[what-i-changed]` — every file created or modified, every command run
|
|
261
265
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Which per-framework guides exist, keyed by the feature names `bridge guide <framework> <feature>` takes (the file stems under mcp/ in each plugin repo). The one copy: `bridge guide list` reads it from the package, and the Bridge MCP server reads it from GitHub (bridge-cli/main/bridge-cli/prompts/guide-coverage.json). Update it when a plugin adds or removes an mcp/*-prompt.md.",
|
|
3
|
+
"aliases": { "flags": "feature-flags" },
|
|
4
|
+
"frameworks": {
|
|
5
|
+
"svelte": ["integration", "sdk-auth", "feature-flags", "billing", "team", "branding"],
|
|
6
|
+
"react": ["integration", "sdk-auth", "feature-flags", "billing", "team", "branding"],
|
|
7
|
+
"angular": ["integration", "sdk-auth", "feature-flags", "billing", "team", "branding"],
|
|
8
|
+
"nextjs": ["integration", "sdk-auth", "feature-flags", "billing", "team"],
|
|
9
|
+
"nestjs": ["integration", "auth", "feature-flags", "billing", "team"],
|
|
10
|
+
"express": ["integration", "auth", "feature-flags", "billing", "team"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
──────────────────────────────────────────────
|
|
28
28
|
The control center gives you even more powers.
|
|
29
29
|
|
|
30
|
-
› Billing Stripe plans & subscriptions → bridge guide [framework]
|
|
30
|
+
› Billing Stripe plans & subscriptions → bridge guide [framework] billing
|
|
31
31
|
› Feature flags Per-user, per-plan toggles → bridge guide flags
|
|
32
32
|
› Team management Invites, roles, orgs → bridge guide [framework] team
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrate.command.d.ts","sourceRoot":"","sources":["../../src/commands/integrate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAY/D"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { join, dirname } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { outputSuccess, outputError } from '../output.js';
|
|
5
|
-
import { AUTH_MASTER_PROMPT_FILENAME, AUTH_MASTER_PROMPT_URL } from '../prompt-urls.js';
|
|
6
|
-
export function registerIntegrateCommand(program) {
|
|
7
|
-
program
|
|
8
|
-
.command('integrate')
|
|
9
|
-
.description('Get the master integration prompt — detects your project and guides you through Bridge setup')
|
|
10
|
-
.action(async () => {
|
|
11
|
-
try {
|
|
12
|
-
const content = await fetchMasterPrompt();
|
|
13
|
-
outputSuccess({ guide: content });
|
|
14
|
-
}
|
|
15
|
-
catch (err) {
|
|
16
|
-
outputError(err);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
async function fetchMasterPrompt() {
|
|
21
|
-
// Local override for development
|
|
22
|
-
const localDir = process.env.BRIDGE_GUIDE_LOCAL_DIR;
|
|
23
|
-
if (localDir) {
|
|
24
|
-
// The master prompt lives alongside the CLI, not in a plugin repo
|
|
25
|
-
const localPath = join(localDir, 'bridge-cli', 'bridge-cli', 'prompts', AUTH_MASTER_PROMPT_FILENAME);
|
|
26
|
-
try {
|
|
27
|
-
return await readFile(localPath, 'utf-8');
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
// Fall through to bundled copy
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// Try bundled copy (relative to dist/)
|
|
34
|
-
try {
|
|
35
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
36
|
-
const bundledPath = join(__dirname, '..', 'prompts', AUTH_MASTER_PROMPT_FILENAME);
|
|
37
|
-
return await readFile(bundledPath, 'utf-8');
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
// Fall through to remote fetch
|
|
41
|
-
}
|
|
42
|
-
// Remote fetch as last resort
|
|
43
|
-
const response = await fetch(AUTH_MASTER_PROMPT_URL);
|
|
44
|
-
if (!response.ok) {
|
|
45
|
-
throw new Error(`Master integration prompt not available (HTTP ${response.status})`);
|
|
46
|
-
}
|
|
47
|
-
return response.text();
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=integrate.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrate.command.js","sourceRoot":"","sources":["../../src/commands/integrate.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAExF,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,OAAO;SACJ,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,8FAA8F,CAAC;SAC3G,MAAM,CAAC,KAAK,IAAI,EAAE;QAC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