bugwatch-cli 0.3.0 → 0.3.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 CHANGED
@@ -25,7 +25,7 @@ npm install --save-dev bugwatch-cli
25
25
  tokens (owners and managers), for all projects or chosen ones. It is
26
26
  shown once; store it as a CI secret named `BUGWATCH_UPLOAD_TOKEN`.
27
27
  Never commit it. Then set **`BUGWATCH_PROJECT`** to the project id
28
- (project → Settings → Source maps). One token can serve several
28
+ (project → Source maps). One token can serve several
29
29
  projects; each upload names its project.
30
30
 
31
31
  Older per-project upload tokens (`bwu_…`) still work without
@@ -26,7 +26,7 @@ function formatSummary(summary, { dryRun, release, files }) {
26
26
  }
27
27
 
28
28
  // src/version.ts
29
- var VERSION = "0.3.0";
29
+ var VERSION = "0.3.1";
30
30
 
31
31
  // src/upload.ts
32
32
  import { open, readdir, readFile, stat, unlink } from "fs/promises";
@@ -44,10 +44,10 @@ function isCiToken(token) {
44
44
  function isDeprecatedUploadToken(token) {
45
45
  return typeof token === "string" && token.startsWith("bwu_");
46
46
  }
47
- var UPLOAD_TOKEN_DEPRECATED = "Upload tokens (bwu_\u2026) are deprecated. Create an org CI token in Bugwatch (organization \u2192 CI tokens), store it as BUGWATCH_UPLOAD_TOKEN, and set BUGWATCH_PROJECT to the project id (project \u2192 Settings \u2192 Source maps).";
47
+ var UPLOAD_TOKEN_DEPRECATED = "Upload tokens (bwu_\u2026) are deprecated. Create an org CI token in Bugwatch (organization \u2192 CI tokens), store it as BUGWATCH_UPLOAD_TOKEN, and set BUGWATCH_PROJECT to the project id (project \u2192 Source maps).";
48
48
  function projectProblem(project) {
49
49
  if (project === void 0 || project === "") return null;
50
- return /^[0-9a-f]{24}$/i.test(project) ? null : "The project must be a project id: 24 hex characters, from the project's Settings \u2192 Source maps";
50
+ return /^[0-9a-f]{24}$/i.test(project) ? null : "The project must be a project id: 24 hex characters, from the project's Source maps page";
51
51
  }
52
52
  var STOP_CODES = /* @__PURE__ */ new Set(["SOURCEMAPS_DISABLED", "SOURCEMAP_PLAN_LIMIT"]);
53
53
  var UsageError = class extends Error {
@@ -252,7 +252,7 @@ async function uploadSourceMaps(options) {
252
252
  if (projectError) throw new UsageError(projectError);
253
253
  if (!options.dryRun && isCiToken(options.token) && !options.project) {
254
254
  throw new UsageError(
255
- "A CI token (bwc_\u2026) needs the project id: set BUGWATCH_PROJECT (from the project's Settings \u2192 Source maps)"
255
+ "A CI token (bwc_\u2026) needs the project id: set BUGWATCH_PROJECT (from the project's Source maps page)"
256
256
  );
257
257
  }
258
258
  const dir = resolve(options.dir);
@@ -9,7 +9,7 @@ import {
9
9
  isCiToken,
10
10
  isDeprecatedUploadToken,
11
11
  uploadSourceMaps
12
- } from "./chunk-BESGTEVY.js";
12
+ } from "./chunk-NJEKNSX4.js";
13
13
 
14
14
  // src/main.ts
15
15
  import { parseArgs } from "util";
@@ -24,7 +24,7 @@ Options:
24
24
  --api-url <url> Bugwatch API (default: $BUGWATCH_API_URL or ${DEFAULT_API_URL})
25
25
  --token <token> Org CI token, bwc_\u2026 (default: $BUGWATCH_UPLOAD_TOKEN; prefer the variable)
26
26
  --project <id> Project id, required with a CI token (default: $BUGWATCH_PROJECT;
27
- shown in the project's Settings \u2192 Source maps)
27
+ shown on the project's Source maps page)
28
28
  --delete-after-upload Delete the local .map files after every upload succeeded
29
29
  --dry-run List what would be uploaded; uploads and deletes nothing
30
30
  -h, --help Show this help
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "./chunk-2CAZCVUW.js";
5
- import "./chunk-BESGTEVY.js";
4
+ } from "./chunk-YSCPONSJ.js";
5
+ import "./chunk-NJEKNSX4.js";
6
6
 
7
7
  // src/cli.ts
8
8
  main(process.argv.slice(2)).then((code) => {
package/dist/index.d.ts CHANGED
@@ -140,6 +140,6 @@ declare function formatSummary(summary: UploadSummary, { dryRun, release, files
140
140
  }): string;
141
141
 
142
142
  /** Keep in sync with package.json (a test checks it). */
143
- declare const VERSION = "0.3.0";
143
+ declare const VERSION = "0.3.1";
144
144
 
145
145
  export { CONCURRENCY, DEFAULT_API_URL, DEFAULT_URL_PREFIX, type FileResult, MAX_MAP_BYTES, MAX_RETRIES, type Outcome, type PlannedUpload, STOP_CODES, UPLOAD_TOKEN_DEPRECATED, type UploadOptions, type UploadReport, type UploadSummary, UsageError, VERSION, findMapOwners, findSourceMaps, formatBytes, formatResult, formatSummary, isCiToken, isCssMap, isDeprecatedUploadToken, mapName, planUploads, projectProblem, releaseProblem, sendableMapFile, sourceMappingUrlOf, uploadSourceMaps, urlPrefixProblem };
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  sourceMappingUrlOf,
25
25
  uploadSourceMaps,
26
26
  urlPrefixProblem
27
- } from "./chunk-BESGTEVY.js";
27
+ } from "./chunk-NJEKNSX4.js";
28
28
  export {
29
29
  CONCURRENCY,
30
30
  DEFAULT_API_URL,
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  main
3
- } from "./chunk-2CAZCVUW.js";
4
- import "./chunk-BESGTEVY.js";
3
+ } from "./chunk-YSCPONSJ.js";
4
+ import "./chunk-NJEKNSX4.js";
5
5
  export {
6
6
  main
7
7
  };
package/dist/vite.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  isCiToken,
8
8
  isDeprecatedUploadToken,
9
9
  uploadSourceMaps
10
- } from "./chunk-BESGTEVY.js";
10
+ } from "./chunk-NJEKNSX4.js";
11
11
 
12
12
  // src/vite.ts
13
13
  import { resolve } from "path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugwatch-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Upload source maps to Bugwatch from CI (CLI and Vite plugin)",
5
5
  "type": "module",
6
6
  "bin": {