@reliableapp/frontend-cli 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +6 -10
  2. package/dist/index.js +2 -12
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -35,13 +35,13 @@ In the Reliable dashboard, generate an API token for your frontend project:
35
35
 
36
36
  > Project → Frontend Project → Settings → API Tokens → **Create token**
37
37
 
38
- Copy the `rl_fpt_...` value (shown once). Set it as a secret in your CI / deploy platform alongside the project IDs:
38
+ Copy the `rl_fpt_...` value (shown once) and set it as a secret in your CI / deploy platform:
39
39
 
40
40
  | Variable | Description |
41
41
  |---|---|
42
42
  | `RELIABLE_TOKEN` | The `rl_fpt_...` token. **Mark as secret.** |
43
- | `RELIABLE_PROJECT_ID` | Master project UUID (from dashboard URL) |
44
- | `RELIABLE_FRONTEND_PROJECT_ID` | Frontend project UUID (from dashboard URL) |
43
+
44
+ That's the only thing you need the token already names the frontend project to upload to.
45
45
 
46
46
  ## Usage
47
47
 
@@ -50,9 +50,7 @@ Copy the `rl_fpt_...` value (shown once). Set it as a secret in your CI / deploy
50
50
  ```yaml
51
51
  - name: Upload sourcemaps
52
52
  env:
53
- RELIABLE_TOKEN: ${{ secrets.RELIABLE_TOKEN }}
54
- RELIABLE_PROJECT_ID: ${{ vars.RELIABLE_PROJECT_ID }}
55
- RELIABLE_FRONTEND_PROJECT_ID: ${{ vars.RELIABLE_FRONTEND_PROJECT_ID }}
53
+ RELIABLE_TOKEN: ${{ secrets.RELIABLE_TOKEN }}
56
54
  run: |
57
55
  npx @reliableapp/frontend-cli sourcemaps upload \
58
56
  --dist=./dist \
@@ -71,7 +69,7 @@ PaaS platforms that auto-build don't have CI step injection — chain the CLI in
71
69
  }
72
70
  ```
73
71
 
74
- Set `RELIABLE_TOKEN`, `RELIABLE_PROJECT_ID`, `RELIABLE_FRONTEND_PROJECT_ID` in the platform's environment variables UI. The CLI auto-detects the commit SHA from the platform's own env vars (no `--release` needed).
72
+ Set `RELIABLE_TOKEN` in the platform's environment variables UI. The CLI auto-detects the commit SHA from the platform's own env vars (no `--release` needed).
75
73
 
76
74
  ## Required SDK config
77
75
 
@@ -92,9 +90,7 @@ Without `release`, events arrive but the resolver has no way to find the right m
92
90
 
93
91
  | Flag | Default | Description |
94
92
  |---|---|---|
95
- | `--token <token>` | `$RELIABLE_TOKEN` | API token (`rl_fpt_...`) |
96
- | `--project <id>` | `$RELIABLE_PROJECT_ID` | Master project UUID |
97
- | `--frontend-project <id>` | `$RELIABLE_FRONTEND_PROJECT_ID` | Frontend project UUID |
93
+ | `--token <token>` | `$RELIABLE_TOKEN` | API token (`rl_fpt_...`). The token names the frontend project — no other IDs needed. |
98
94
  | `--release <id>` | auto | Release identifier. Auto-detected on supported platforms |
99
95
  | `--dist <path>` | required | Local path to the build output folder |
100
96
  | `--url-prefix <url>` | required | Browser-visible URL prefix that maps to `--dist` root |
package/dist/index.js CHANGED
@@ -67,7 +67,7 @@ async function uploadSourcemap(input) {
67
67
  form.append("environment", input.environment);
68
68
  form.append("asset_url", input.assetUrl);
69
69
  form.append("sourcemap", blob, path2.basename(input.mapPath));
70
- const url = `${input.api.replace(/\/+$/, "")}/v1/projects/${input.masterProjectId}/frontend-projects/${input.frontendProjectUuid}/sourcemaps`;
70
+ const url = `${input.api.replace(/\/+$/, "")}/v1/sourcemaps`;
71
71
  const res = await fetch(url, {
72
72
  method: "POST",
73
73
  headers: { Authorization: `Bearer ${input.token}` },
@@ -186,8 +186,6 @@ async function sourcemapsUpload(opts) {
186
186
  await uploadSourcemap({
187
187
  api: opts.api,
188
188
  token: opts.token,
189
- masterProjectId: opts.project,
190
- frontendProjectUuid: opts.frontendProject,
191
189
  release,
192
190
  environment: opts.environment,
193
191
  assetUrl,
@@ -224,16 +222,8 @@ program.name("reliableapp-frontend").description("Reliable frontend CLI \u2014 s
224
222
  var sourcemaps = program.command("sourcemaps").description("Sourcemap operations");
225
223
  sourcemaps.command("upload").description("Upload sourcemaps for a release to the Reliable backend").requiredOption(
226
224
  "--token <token>",
227
- "API token (rl_fpt_...). Falls back to $RELIABLE_TOKEN.",
225
+ "API token (rl_fpt_...). Falls back to $RELIABLE_TOKEN. The token already names which frontend project to upload to \u2014 no other IDs needed.",
228
226
  process.env.RELIABLE_TOKEN
229
- ).requiredOption(
230
- "--project <id>",
231
- "Master project UUID. Falls back to $RELIABLE_PROJECT_ID.",
232
- process.env.RELIABLE_PROJECT_ID
233
- ).requiredOption(
234
- "--frontend-project <id>",
235
- "Frontend project UUID. Falls back to $RELIABLE_FRONTEND_PROJECT_ID.",
236
- process.env.RELIABLE_FRONTEND_PROJECT_ID
237
227
  ).option(
238
228
  "--release <id>",
239
229
  "Release identifier. Auto-detected from common platform env vars if omitted (GITHUB_SHA, VERCEL_GIT_COMMIT_SHA, RAILWAY_GIT_COMMIT_SHA, RENDER_GIT_COMMIT, etc.)."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reliableapp/frontend-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Reliable frontend CLI — upload sourcemaps and manage frontend releases from CI. Built by Ziloris · https://ziloris.com",
5
5
  "homepage": "https://reliable.ziloris.com/docs",
6
6
  "bugs": {