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 +1 -1
- package/dist/{chunk-BESGTEVY.js → chunk-NJEKNSX4.js} +4 -4
- package/dist/{chunk-2CAZCVUW.js → chunk-YSCPONSJ.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.js +2 -2
- package/dist/vite.js +1 -1
- package/package.json +1 -1
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 →
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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
|
|
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
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.
|
|
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
package/dist/main.js
CHANGED
package/dist/vite.js
CHANGED