@auersperg/flare 0.3.2 → 0.3.5

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.
Files changed (45) hide show
  1. package/README.md +10 -4
  2. package/dist/cli/{chunk-x14smx1y.js → chunk-5s6zv1h9.js} +1 -1
  3. package/dist/cli/{chunk-5cq8wgte.js → chunk-5yg1zj5n.js} +48 -29
  4. package/dist/cli/{chunk-786w6vrj.js → chunk-fv98dfg5.js} +21 -1
  5. package/dist/cli/chunk-r3ceakrn.js +1366 -0
  6. package/dist/cli/flare.js +122 -4
  7. package/dist/platform/admin.js +790 -0
  8. package/dist/platform/dashboard/_astro/auth-view.UTGGCEHc.js +1 -0
  9. package/dist/platform/dashboard/_astro/cli-approval.BZAWmpiR.js +1 -0
  10. package/dist/platform/dashboard/_astro/client.BUUZgEFj.js +1 -0
  11. package/dist/platform/dashboard/_astro/client.Bcl1NrNO.js +1 -0
  12. package/dist/platform/dashboard/_astro/client.BeKNsjPN.js +9 -0
  13. package/dist/platform/dashboard/_astro/common.DPoFQu44.js +1 -0
  14. package/dist/platform/dashboard/_astro/data-view.BgYyTCMN.js +1 -0
  15. package/dist/platform/dashboard/_astro/functions-view.PUkng3T1.js +1 -0
  16. package/dist/platform/dashboard/_astro/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
  17. package/dist/platform/dashboard/_astro/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
  18. package/dist/platform/dashboard/_astro/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
  19. package/dist/platform/dashboard/_astro/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
  20. package/dist/platform/dashboard/_astro/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
  21. package/dist/platform/dashboard/_astro/index.astro_astro_type_script_index_0_lang.BEuO3H0E.js +4 -0
  22. package/dist/platform/dashboard/_astro/index.lobU7uK5.css +2 -0
  23. package/dist/platform/dashboard/_astro/input-group.CJxPRHej.js +1 -0
  24. package/dist/platform/dashboard/_astro/sdk-view.COmbEZrF.js +1 -0
  25. package/dist/platform/dashboard/_astro/services-view.C34dy0dk.js +1 -0
  26. package/dist/platform/dashboard/_astro/settings-view.IuD2r5JW.js +3 -0
  27. package/dist/platform/dashboard/_headers +3 -0
  28. package/dist/platform/dashboard/bootstrap/action.js +263 -0
  29. package/dist/platform/dashboard/bootstrap/api.ts +5 -0
  30. package/dist/platform/dashboard/bootstrap/facet.js +914 -0
  31. package/dist/platform/dashboard/bootstrap/manifest.json +5 -0
  32. package/dist/platform/dashboard/bootstrap/openapi.json +18 -0
  33. package/dist/platform/dashboard/bootstrap/release.json +11 -0
  34. package/dist/platform/dashboard/bootstrap/schema.json +1 -0
  35. package/dist/platform/dashboard/index.html +1 -0
  36. package/dist/platform/manifest.json +195 -0
  37. package/dist/platform/migrations/0001.sql +8 -0
  38. package/dist/platform/migrations/0002_project_aliases.sql +6 -0
  39. package/dist/platform/migrations/0003_cli_login.sql +9 -0
  40. package/dist/platform/migrations/0004_retention.sql +4 -0
  41. package/dist/platform/migrations/0005_project_deletion.sql +11 -0
  42. package/dist/platform/migrations/0006_platform_installation.sql +8 -0
  43. package/dist/platform/runtime.js +9392 -0
  44. package/dist/sdk/client.js +10 -2
  45. package/package.json +1 -1
package/dist/cli/flare.js CHANGED
@@ -1,5 +1,73 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
+ // packages/flare/package.json
4
+ var package_default = {
5
+ name: "@auersperg/flare",
6
+ version: "0.3.5",
7
+ license: "MIT",
8
+ type: "module",
9
+ description: "Flare client, server declarations and development CLI",
10
+ bin: {
11
+ flare: "./dist/cli/flare.js"
12
+ },
13
+ files: [
14
+ "dist",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ exports: {
19
+ ".": {
20
+ types: "./dist/sdk/client.d.ts",
21
+ import: "./dist/sdk/client.js"
22
+ },
23
+ "./server": {
24
+ types: "./dist/sdk/server.d.ts",
25
+ import: "./dist/sdk/server.js"
26
+ },
27
+ "./react": {
28
+ types: "./dist/sdk/react.d.ts",
29
+ import: "./dist/sdk/react.js"
30
+ },
31
+ "./protocol": {
32
+ types: "./dist/sdk/protocol.d.ts",
33
+ import: "./dist/sdk/protocol.js"
34
+ },
35
+ "./cloudflare": {
36
+ types: "./dist/sdk/cloudflare.d.ts",
37
+ import: "./dist/sdk/cloudflare.js"
38
+ }
39
+ },
40
+ dependencies: {
41
+ "@standard-schema/spec": "1.1.0",
42
+ zod: "4.6.5",
43
+ "json-schema-to-typescript": "16.0.0"
44
+ },
45
+ engines: {
46
+ bun: ">=1.4.3"
47
+ },
48
+ repository: {
49
+ type: "git",
50
+ url: "https://github.com/auersperg/flare.git",
51
+ directory: "packages/flare"
52
+ },
53
+ sideEffects: false,
54
+ peerDependencies: {
55
+ react: ">=19"
56
+ },
57
+ peerDependenciesMeta: {
58
+ react: {
59
+ optional: true
60
+ }
61
+ },
62
+ publishConfig: {
63
+ access: "public",
64
+ registry: "https://registry.npmjs.org/",
65
+ tag: "next"
66
+ },
67
+ scripts: {
68
+ prepack: "bun run --cwd ../.. verify"
69
+ }
70
+ };
3
71
 
4
72
  // packages/flare/src/cli/main.mjs
5
73
  if (typeof Bun === "undefined" || !Bun.semver.satisfies(Bun.version, ">=1.4.3")) {
@@ -8,11 +76,18 @@ if (typeof Bun === "undefined" || !Bun.semver.satisfies(Bun.version, ">=1.4.3"))
8
76
  }
9
77
  var [command, ...args] = process.argv.slice(2);
10
78
  if (!command || ["--help", "help"].includes(command))
11
- console.log(`Flare 0.3 private minimum
79
+ console.log(`Flare ${package_default.version} trusted-team preview
12
80
 
13
81
  flare dev Browser login, setup and cloud dev watch
14
82
  flare deploy Confirmed production build and deploy
15
83
 
84
+ Platform lifecycle (Cloudflare account authorization):
85
+ flare platform install
86
+ flare platform adopt --owner <existing owner email>
87
+ flare platform status
88
+ flare platform update --dry-run
89
+ flare platform update
90
+
16
91
  Advanced commands:
17
92
  flare releases --env dev|prod
18
93
  flare promote --hash <dev release hash> [--cmd "bun run build"]
@@ -24,8 +99,51 @@ flare dev --entry <app.ts>
24
99
  flare backup create|list|restore|delete|status --env dev|prod
25
100
  restore --from dev|prod --id <backup ID> (empty target only)
26
101
 
27
- Dashboard is Cloudflare-only. Local tooling does not run a dashboard or backend. CLI authentication uses FLARE_DEPLOY_TOKEN from the online dashboard. Run flare dev with no flags for browser login, project selection and automatic schema/API generation. Run flare deploy with no flags for a confirmed production release. Platform installation is separate.`);
28
- else if ([
102
+ Dashboard is Cloudflare-only. Local tooling does not run a dashboard or backend. Run flare dev for Access-protected browser approval and project-scoped credentials stored outside the application; CI can use FLARE_DEPLOY_TOKEN. Backend dev runs in Cloudflare; start the frontend separately. Production changes require project confirmation. Platform installation is separate.`);
103
+ else if (command === "platform") {
104
+ try {
105
+ const operation = args.shift();
106
+ if (["help", "--help"].includes(operation)) {
107
+ console.log(`flare platform install|status|update|adopt [--account <ID>] [--name <name>]
108
+ install: [--owner <email>] [--dashboard-host <host> --runtime-host <host>] [--subdomain <workers.dev prefix>]
109
+ adopt: --owner <email> (existing standard flare-admin/flare-runtime/flare-catalog; default installation only)
110
+ install/update/adopt: [--dry-run] [--confirm <account ID>] [--resume]
111
+ Uses the platform payload bundled with this CLI release. Never updates applications or runs a local dashboard. Requires separate Cloudflare account permissions; FLARE_DEPLOY_TOKEN is not an account token.`);
112
+ } else {
113
+ if (!["install", "status", "update", "adopt"].includes(operation))
114
+ throw Error("Supported: flare platform install|status|update|adopt; no deployment has occurred.");
115
+ const options = { operation };
116
+ const allowed = operation === "adopt" ? ["account", "name", "owner", "confirm", "dry-run", "resume"] : operation === "install" ? [
117
+ "account",
118
+ "name",
119
+ "owner",
120
+ "dashboard-host",
121
+ "runtime-host",
122
+ "subdomain",
123
+ "confirm",
124
+ "dry-run",
125
+ "resume"
126
+ ] : operation === "update" ? ["account", "name", "confirm", "dry-run", "resume"] : ["account", "name"];
127
+ for (let i = 0;i < args.length; i++) {
128
+ const key = args[i]?.slice(2);
129
+ if (!args[i]?.startsWith("--") || !allowed.includes(key) || key in options)
130
+ throw Error("Expected supported unique platform options; no deployment has occurred.");
131
+ if (["dry-run", "resume"].includes(key))
132
+ options[key] = true;
133
+ else {
134
+ if (!args[i + 1] || args[i + 1].startsWith("--"))
135
+ throw Error("Platform option requires a value; no deployment has occurred.");
136
+ options[key] = args[++i];
137
+ }
138
+ }
139
+ const { platform } = await import("./chunk-r3ceakrn.js");
140
+ console.log(JSON.stringify(await platform(options), null, 2));
141
+ }
142
+ } catch (error) {
143
+ console.error(error instanceof Error ? error.message : "Platform command failed");
144
+ process.exitCode = 1;
145
+ }
146
+ } else if ([
29
147
  "build",
30
148
  "link",
31
149
  "deploy",
@@ -63,7 +181,7 @@ else if ([
63
181
  console.log(`Built immutable release ${x.hash}
64
182
  ${x.outdir}`);
65
183
  } else {
66
- const cloud = await import("./chunk-5cq8wgte.js");
184
+ const cloud = await import("./chunk-5yg1zj5n.js");
67
185
  const x = await cloud[command](options);
68
186
  if (x)
69
187
  console.log(JSON.stringify(x, null, 2));