@bluestep-systems/b6p-core-bsjs-git 0.2.0 → 0.3.0

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.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The BSJS build manifest, contract v1: a file under the script's output folder that records the git blob SHA-1 of every
3
- * source file a build was made from. A git-managed script publishes its `draft` branch exactly as committed, without
4
- * recompiling, so the server refuses a publish whose sources no longer match the manifest. Whoever builds writes the
5
- * manifest in the same commit as the build output.
3
+ * source file a build was made from. A git-managed script publishes its `draft` branch exactly as committed, so the
4
+ * server refuses a publish whose sources no longer match the manifest. The platform's build (`ScriptRepo.compileDraft`)
5
+ * writes it in its build commit; nothing here writes one. These are the contract's layout rules, for reading.
6
6
  *
7
7
  * Everything here is pure (no file system, no Node built-ins): paths are as they appear in the git tree, relative to
8
8
  * its root, `/`-separated.
@@ -13,11 +13,6 @@
13
13
  * @lastreviewed null
14
14
  */
15
15
  export declare const BUILD_MANIFEST_NAME = ".b6p-build.json";
16
- /**
17
- * Written to the manifest's informational `builder` field.
18
- * @lastreviewed null
19
- */
20
- export declare const BUILD_MANIFEST_BUILDER = "bsjs-git/0.2.0";
21
16
  /**
22
17
  * Parses JSON that allows `//` and `/* *\/` comments, trailing commas and a byte order mark, the way a tsconfig is
23
18
  * read. Resolves `undefined` when it does not parse.
@@ -59,40 +54,30 @@ export declare function isTypeScriptSource(path: string, folder: string): boolea
59
54
  */
60
55
  export declare function hasNoTsconfig(paths: Iterable<string>): boolean;
61
56
  /**
62
- * The git blob id of some bytes: `sha1("blob <length>\0" + bytes)` as 40 lowercase hex digits, what `git hash-object`
63
- * prints.
64
- * @lastreviewed null
65
- */
66
- export declare function gitBlobSha1(bytes: Uint8Array): Promise<string>;
67
- /**
68
- * The manifest's text: version 1, keys sorted, two-space indent, a final newline.
69
- * @param sources Source path to blob id
57
+ * The config files that make a tree's build projects, by the platform's rule: every `tsconfig.json` at any depth, plus
58
+ * the root `jsconfig.json` when there is no root `tsconfig.json`. Sorted.
59
+ * @param paths Every file path of the tree (`/`-separated)
70
60
  * @lastreviewed null
71
61
  */
72
- export declare function formatBuildManifest(sources: Readonly<Record<string, string>>, builder?: string): string;
62
+ export declare function buildConfigPaths(paths: Iterable<string>): string[];
73
63
  /**
74
- * What {@link planBuildManifest} decided.
64
+ * The output folders of a tree's build projects, the one resolver the platform, core and the BSJS editor share: for
65
+ * each config ({@link buildConfigPaths}), `<config dir>/` + its {@link buildOutputFolder} (`.build` by default). A
66
+ * project whose folder is empty (output in place) or leaves the tree contributes nothing. Sorted, without repeats.
67
+ * @param configs Each config file's path and text
75
68
  * @lastreviewed null
76
69
  */
77
- export interface BuildManifestPlan {
78
- /** Where the manifest goes. */
70
+ export declare function buildOutputFolders(configs: Iterable<{
79
71
  readonly path: string;
80
- /** Its text. */
81
- readonly content: string;
82
- }
72
+ readonly text: string;
73
+ }>): string[];
83
74
  /**
84
- * The manifest for the tree a commit will hold, or `undefined` when none is to be written: the script is externally
85
- * built, or no file in the tree is named `tsconfig.json`, or the tree has no TypeScript source outside the output folder ({@link isTypeScriptSource}).
86
- *
87
- * @param tree Every file of the tree as committed: path and git blob id. The manifest itself may be among them (it is
88
- * not a source)
89
- * @param readConfig The bytes of a root file by path (`tsconfig.json`, `jsconfig.json`), `undefined` when absent
90
- * @param options.externallyBuilt A bundler builds this script, so its inputs are unknowable here: no manifest
75
+ * Rule 3 of the platform's build-commit rule (web `UserCodeScriptHelper`, `bsjs-git-snapshot-design.md`), exactly:
76
+ * every path the commit adds, changes or removes (complete tree entries) must be under the output folder of some build
77
+ * project at the parent ({@link buildOutputFolders}), i.e. start with `<folder>/`; a manifest in a folder is covered.
78
+ * With no folders at all, no commit is a build.
79
+ * @param changedPaths Every path whose tree entry differs between the commit and its parent
80
+ * @param folders The parent's output folders ({@link buildOutputFolders})
91
81
  * @lastreviewed null
92
82
  */
93
- export declare function planBuildManifest(tree: readonly {
94
- readonly path: string;
95
- readonly oid: string;
96
- }[], readConfig: (path: string) => Promise<Uint8Array | undefined>, options?: {
97
- readonly externallyBuilt?: boolean;
98
- }): Promise<BuildManifestPlan | undefined>;
83
+ export declare function changesOnlyBuildOutput(changedPaths: Iterable<string>, folders: readonly string[]): boolean;
@@ -1,35 +1,30 @@
1
1
  "use strict";
2
2
  /**
3
3
  * The BSJS build manifest, contract v1: a file under the script's output folder that records the git blob SHA-1 of every
4
- * source file a build was made from. A git-managed script publishes its `draft` branch exactly as committed, without
5
- * recompiling, so the server refuses a publish whose sources no longer match the manifest. Whoever builds writes the
6
- * manifest in the same commit as the build output.
4
+ * source file a build was made from. A git-managed script publishes its `draft` branch exactly as committed, so the
5
+ * server refuses a publish whose sources no longer match the manifest. The platform's build (`ScriptRepo.compileDraft`)
6
+ * writes it in its build commit; nothing here writes one. These are the contract's layout rules, for reading.
7
7
  *
8
8
  * Everything here is pure (no file system, no Node built-ins): paths are as they appear in the git tree, relative to
9
9
  * its root, `/`-separated.
10
10
  * @lastreviewed null
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.BUILD_MANIFEST_BUILDER = exports.BUILD_MANIFEST_NAME = void 0;
13
+ exports.BUILD_MANIFEST_NAME = void 0;
14
14
  exports.parseJsonc = parseJsonc;
15
15
  exports.buildOutputFolder = buildOutputFolder;
16
16
  exports.buildManifestPath = buildManifestPath;
17
17
  exports.isBuildSource = isBuildSource;
18
18
  exports.isTypeScriptSource = isTypeScriptSource;
19
19
  exports.hasNoTsconfig = hasNoTsconfig;
20
- exports.gitBlobSha1 = gitBlobSha1;
21
- exports.formatBuildManifest = formatBuildManifest;
22
- exports.planBuildManifest = planBuildManifest;
20
+ exports.buildConfigPaths = buildConfigPaths;
21
+ exports.buildOutputFolders = buildOutputFolders;
22
+ exports.changesOnlyBuildOutput = changesOnlyBuildOutput;
23
23
  /**
24
24
  * The manifest's file name.
25
25
  * @lastreviewed null
26
26
  */
27
27
  exports.BUILD_MANIFEST_NAME = ".b6p-build.json";
28
- /**
29
- * Written to the manifest's informational `builder` field.
30
- * @lastreviewed null
31
- */
32
- exports.BUILD_MANIFEST_BUILDER = "bsjs-git/0.2.0";
33
28
  const SOURCE_EXTENSIONS = new Set(["ts", "tsx", "mts", "cts", "js", "jsx", "mjs", "cjs", "json", "jsonc"]);
34
29
  const TYPESCRIPT_EXTENSIONS = new Set(["ts", "tsx", "mts", "cts"]);
35
30
  const DEFAULT_OUT_DIR = ".build";
@@ -196,56 +191,56 @@ function hasNoTsconfig(paths) {
196
191
  return true;
197
192
  }
198
193
  /**
199
- * The git blob id of some bytes: `sha1("blob <length>\0" + bytes)` as 40 lowercase hex digits, what `git hash-object`
200
- * prints.
194
+ * The config files that make a tree's build projects, by the platform's rule: every `tsconfig.json` at any depth, plus
195
+ * the root `jsconfig.json` when there is no root `tsconfig.json`. Sorted.
196
+ * @param paths Every file path of the tree (`/`-separated)
201
197
  * @lastreviewed null
202
198
  */
203
- async function gitBlobSha1(bytes) {
204
- const header = new TextEncoder().encode(`blob ${bytes.length}\0`);
205
- const all = new Uint8Array(header.length + bytes.length);
206
- all.set(header, 0);
207
- all.set(bytes, header.length);
208
- const digest = new Uint8Array(await globalThis.crypto.subtle.digest("SHA-1", all));
209
- return Array.from(digest, (b) => b.toString(16).padStart(2, "0")).join("");
199
+ function buildConfigPaths(paths) {
200
+ const all = [...paths];
201
+ const configs = all.filter((p) => p === "tsconfig.json" || p.endsWith("/tsconfig.json"));
202
+ if (!all.includes("tsconfig.json") && all.includes("jsconfig.json")) {
203
+ configs.push("jsconfig.json");
204
+ }
205
+ return configs.sort();
210
206
  }
211
207
  /**
212
- * The manifest's text: version 1, keys sorted, two-space indent, a final newline.
213
- * @param sources Source path to blob id
208
+ * The output folders of a tree's build projects, the one resolver the platform, core and the BSJS editor share: for
209
+ * each config ({@link buildConfigPaths}), `<config dir>/` + its {@link buildOutputFolder} (`.build` by default). A
210
+ * project whose folder is empty (output in place) or leaves the tree contributes nothing. Sorted, without repeats.
211
+ * @param configs Each config file's path and text
214
212
  * @lastreviewed null
215
213
  */
216
- function formatBuildManifest(sources, builder = exports.BUILD_MANIFEST_BUILDER) {
217
- const sorted = {};
218
- for (const key of Object.keys(sources).sort()) {
219
- sorted[key] = sources[key];
214
+ function buildOutputFolders(configs) {
215
+ const folders = new Set();
216
+ for (const config of configs) {
217
+ const folder = buildOutputFolder(config.text);
218
+ if (folder === "") {
219
+ continue;
220
+ }
221
+ const slash = config.path.lastIndexOf("/");
222
+ folders.add(slash < 0 ? folder : `${config.path.slice(0, slash)}/${folder}`);
220
223
  }
221
- return `${JSON.stringify({ builder, sources: sorted, version: 1 }, null, 2)}\n`;
224
+ return [...folders].sort();
222
225
  }
223
226
  /**
224
- * The manifest for the tree a commit will hold, or `undefined` when none is to be written: the script is externally
225
- * built, or no file in the tree is named `tsconfig.json`, or the tree has no TypeScript source outside the output folder ({@link isTypeScriptSource}).
226
- *
227
- * @param tree Every file of the tree as committed: path and git blob id. The manifest itself may be among them (it is
228
- * not a source)
229
- * @param readConfig The bytes of a root file by path (`tsconfig.json`, `jsconfig.json`), `undefined` when absent
230
- * @param options.externallyBuilt A bundler builds this script, so its inputs are unknowable here: no manifest
227
+ * Rule 3 of the platform's build-commit rule (web `UserCodeScriptHelper`, `bsjs-git-snapshot-design.md`), exactly:
228
+ * every path the commit adds, changes or removes (complete tree entries) must be under the output folder of some build
229
+ * project at the parent ({@link buildOutputFolders}), i.e. start with `<folder>/`; a manifest in a folder is covered.
230
+ * With no folders at all, no commit is a build.
231
+ * @param changedPaths Every path whose tree entry differs between the commit and its parent
232
+ * @param folders The parent's output folders ({@link buildOutputFolders})
231
233
  * @lastreviewed null
232
234
  */
233
- async function planBuildManifest(tree, readConfig, options = {}) {
234
- if (options.externallyBuilt || hasNoTsconfig(tree.map((f) => f.path))) {
235
- return undefined;
236
- }
237
- const config = (await readConfig("tsconfig.json")) ?? (await readConfig("jsconfig.json"));
238
- const folder = buildOutputFolder(config === undefined ? undefined : new TextDecoder().decode(config));
239
- if (!tree.some((file) => isTypeScriptSource(file.path, folder))) {
240
- // Its JavaScript runs as written: there is no build to be stale.
241
- return undefined;
235
+ function changesOnlyBuildOutput(changedPaths, folders) {
236
+ if (folders.length === 0) {
237
+ return false;
242
238
  }
243
- const sources = {};
244
- for (const file of tree) {
245
- if (isBuildSource(file.path, folder)) {
246
- sources[file.path] = file.oid;
239
+ for (const path of changedPaths) {
240
+ if (!folders.some((folder) => path.startsWith(`${folder}/`))) {
241
+ return false;
247
242
  }
248
243
  }
249
- return { path: buildManifestPath(folder), content: formatBuildManifest(sources) };
244
+ return true;
250
245
  }
251
246
  //# sourceMappingURL=buildManifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildManifest.js","sourceRoot":"","sources":["../src/buildManifest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAuBH,gCA6DC;AAUD,8CA4BC;AAMD,8CAEC;AASD,sCAUC;AAQD,gDAQC;AAMD,sCAOC;AAOD,kCAOC;AAOD,kDASC;AAuBD,8CAqBC;AA1PD;;;GAGG;AACU,QAAA,mBAAmB,GAAG,iBAAiB,CAAC;AAErD;;;GAGG;AACU,QAAA,sBAAsB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC3G,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACnE,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEjC;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACpC,IAAI,GAAG,GAAG,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.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * The first group mirrors what the platform's git proxy answers; the rest are this package's own.
5
5
  * @lastreviewed null
6
6
  */
7
- export type BsjsGitErrorCode = "AUTH_REQUIRED" | "PERMISSION_DENIED" | "PUSH_NOT_ENABLED" | "CODE_LOCKED" | "REPO_NOT_FOUND" | "UNSUPPORTED_REQUEST" | "SERVER_ERROR" | "TRANSPORT" | "PUSH_REJECTED" | "NOT_FAST_FORWARD" | "IDENTITY_REQUIRED" | "UNPUSHED_CHANGES" | "PUBLISH_REFUSED" | "PUBLISH_FAILED" | "GIT_MODE_FAILED" | "UNKNOWN_SCRIPT_TYPE" | "LEGACY_HISTORY" | "BAD_SAVE_STATE";
7
+ export type BsjsGitErrorCode = "AUTH_REQUIRED" | "PERMISSION_DENIED" | "PUSH_NOT_ENABLED" | "CODE_LOCKED" | "REPO_NOT_FOUND" | "UNSUPPORTED_REQUEST" | "SERVER_ERROR" | "TRANSPORT" | "PUSH_REJECTED" | "NOT_FAST_FORWARD" | "IDENTITY_REQUIRED" | "UNPUSHED_CHANGES" | "PUBLISH_REFUSED" | "PUBLISH_FAILED" | "BUILD_FAILED" | "BUILD_FAST_FORWARD_BLOCKED" | "PUBLISH_PIN_MISMATCH" | "GIT_MODE_FAILED" | "UNKNOWN_SCRIPT_TYPE" | "LEGACY_HISTORY" | "BAD_SAVE_STATE";
8
8
  /**
9
9
  * Base class of every error this package throws deliberately.
10
10
  * @lastreviewed null
@@ -129,6 +129,90 @@ export declare class PublishFailedError extends BsjsGitError {
129
129
  cause?: unknown;
130
130
  });
131
131
  }
132
+ /**
133
+ * Every `DraftBuildRefusalReason` the platform refuses a build with (`PRECONDITION`, `extensions.reason`; web
134
+ * `errors.graphqls`): the draft moved after the push, the build's outcome is unknown, the draft is over the build's
135
+ * size limit, the repo or its draft branch is missing. Nothing is retried on any of them.
136
+ * @lastreviewed null
137
+ */
138
+ export declare const DRAFT_BUILD_REFUSAL_REASONS: readonly ["DRAFT_MOVED", "BUILD_OUTCOME_UNKNOWN", "DRAFT_TOO_LARGE", "REPO_MISSING", "DRAFT_BRANCH_MISSING"];
139
+ /**
140
+ * One of {@link DRAFT_BUILD_REFUSAL_REASONS}.
141
+ * @lastreviewed null
142
+ */
143
+ export type DraftBuildRefusalReason = (typeof DRAFT_BUILD_REFUSAL_REASONS)[number];
144
+ /**
145
+ * The reason text as a known {@link DraftBuildRefusalReason}, or `null`.
146
+ * @lastreviewed null
147
+ */
148
+ export declare function draftBuildRefusalReasonOf(raw: unknown): DraftBuildRefusalReason | null;
149
+ /**
150
+ * The platform's build of the draft (`compileDraft`) failed without an outcome to report: a refusal (`reason`, one of
151
+ * {@link DRAFT_BUILD_REFUSAL_REASONS}, with nothing built), another GraphQL error (for example the caller may not edit
152
+ * the script; `reason` null, `rawReason` whatever the error carried), an unreadable answer, or a request that failed
153
+ * twice (`networkFailure`: it may or may not have run). The pushed draft is on the platform either way.
154
+ * @lastreviewed null
155
+ */
156
+ export declare class DraftBuildFailedError extends BsjsGitError {
157
+ readonly messages: readonly string[];
158
+ readonly networkFailure: boolean;
159
+ /** The platform's refusal reason, when it is a known one. @lastreviewed null */
160
+ readonly reason: DraftBuildRefusalReason | null;
161
+ /** `extensions.reason` exactly as sent, `null` when none. @lastreviewed null */
162
+ readonly rawReason: string | null;
163
+ constructor(message: string, messages?: readonly string[], networkFailure?: boolean, options?: {
164
+ cause?: unknown;
165
+ reason?: string | null;
166
+ });
167
+ }
168
+ /**
169
+ * The build was refused because the platform's draft is no longer the commit this client pushed (`DRAFT_MOVED`):
170
+ * someone pushed in between. Nothing was built; fetch the draft and check it again.
171
+ * @lastreviewed null
172
+ */
173
+ export declare class DraftBuildMovedError extends DraftBuildFailedError {
174
+ readonly details: unknown;
175
+ constructor(details: unknown, message: string);
176
+ }
177
+ /**
178
+ * The platform's `DraftBuildRefusalReason` for a build whose push to the forge it could not confirm: the build commit
179
+ * may or may not be on the draft branch.
180
+ * @lastreviewed null
181
+ */
182
+ export declare const BUILD_OUTCOME_UNKNOWN_REASON = "BUILD_OUTCOME_UNKNOWN";
183
+ /**
184
+ * The platform could not tell whether its build commit landed ({@link BUILD_OUTCOME_UNKNOWN_REASON}). Not retried: a
185
+ * second request could build again. {@link ScriptRepo.compileDraft} turns it into `outcomeUnknown` after reading the
186
+ * draft back; it reaches a caller only from a lower-level request.
187
+ * @lastreviewed null
188
+ */
189
+ export declare class DraftBuildOutcomeUnknownError extends DraftBuildFailedError {
190
+ readonly details: unknown;
191
+ constructor(details: unknown, message: string);
192
+ }
193
+ /**
194
+ * A pinned publish ({@link ScriptRepo.publish} with `at`) was refused before asking the platform: the local draft is
195
+ * neither the commit asked for nor a build of it (for example a later save moved it), so publishing it would publish
196
+ * something other than what was built and checked. Nothing was sent.
197
+ * @lastreviewed null
198
+ */
199
+ export declare class PublishPinMismatchError extends BsjsGitError {
200
+ readonly at: string;
201
+ readonly local: string;
202
+ constructor(at: string, local: string);
203
+ }
204
+ /**
205
+ * The platform built the draft, but the local draft could not be moved to its build commit because local files are in
206
+ * the way: each path in `paths` is one the build changes whose local copy matches neither the pushed commit nor the
207
+ * build (a local edit, or an untracked or ignored file). Nothing was changed here: the local draft branch, index and
208
+ * working tree are as they were.
209
+ * @lastreviewed null
210
+ */
211
+ export declare class GitBuildFastForwardBlockedError extends BsjsGitError {
212
+ readonly buildCommitSha: string;
213
+ readonly paths: readonly string[];
214
+ constructor(buildCommitSha: string, paths: readonly string[]);
215
+ }
132
216
  /**
133
217
  * The script's class id has no known publish mutation.
134
218
  * @lastreviewed null
package/dist/errors.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PublishBuildManifestInvalidError = exports.PublishBuildManifestMissingError = exports.PublishBuildStaleError = exports.PublishBuildError = exports.PublishDraftMovedError = exports.DRAFT_MOVED_REASON = exports.GitModeError = exports.BadSaveStateError = exports.LegacyHistoryError = exports.UnknownScriptTypeError = exports.PublishFailedError = exports.PublishRefusedError = exports.GitUnpushedChangesError = exports.GitIdentityError = exports.GitNotFastForwardError = exports.GitPushRejectedError = exports.GitTransportError = exports.GitServerError = exports.GitUnsupportedRequestError = exports.GitRepoNotFoundError = exports.GitCodeLockedError = exports.GitPushNotEnabledError = exports.GitPermissionError = exports.GitAuthError = exports.BsjsGitError = void 0;
3
+ exports.PublishBuildManifestInvalidError = exports.PublishBuildManifestMissingError = exports.PublishBuildStaleError = exports.PublishBuildError = exports.PublishDraftMovedError = exports.DRAFT_MOVED_REASON = exports.GitModeError = exports.BadSaveStateError = exports.LegacyHistoryError = exports.UnknownScriptTypeError = exports.GitBuildFastForwardBlockedError = exports.PublishPinMismatchError = exports.DraftBuildOutcomeUnknownError = exports.BUILD_OUTCOME_UNKNOWN_REASON = exports.DraftBuildMovedError = exports.DraftBuildFailedError = exports.DRAFT_BUILD_REFUSAL_REASONS = exports.PublishFailedError = exports.PublishRefusedError = exports.GitUnpushedChangesError = exports.GitIdentityError = exports.GitNotFastForwardError = exports.GitPushRejectedError = exports.GitTransportError = exports.GitServerError = exports.GitUnsupportedRequestError = exports.GitRepoNotFoundError = exports.GitCodeLockedError = exports.GitPushNotEnabledError = exports.GitPermissionError = exports.GitAuthError = exports.BsjsGitError = void 0;
4
+ exports.draftBuildRefusalReasonOf = draftBuildRefusalReasonOf;
4
5
  /**
5
6
  * Base class of every error this package throws deliberately.
6
7
  * @lastreviewed null
@@ -182,6 +183,118 @@ class PublishFailedError extends BsjsGitError {
182
183
  }
183
184
  }
184
185
  exports.PublishFailedError = PublishFailedError;
186
+ /**
187
+ * Every `DraftBuildRefusalReason` the platform refuses a build with (`PRECONDITION`, `extensions.reason`; web
188
+ * `errors.graphqls`): the draft moved after the push, the build's outcome is unknown, the draft is over the build's
189
+ * size limit, the repo or its draft branch is missing. Nothing is retried on any of them.
190
+ * @lastreviewed null
191
+ */
192
+ exports.DRAFT_BUILD_REFUSAL_REASONS = [
193
+ "DRAFT_MOVED",
194
+ "BUILD_OUTCOME_UNKNOWN",
195
+ "DRAFT_TOO_LARGE",
196
+ "REPO_MISSING",
197
+ "DRAFT_BRANCH_MISSING",
198
+ ];
199
+ /**
200
+ * The reason text as a known {@link DraftBuildRefusalReason}, or `null`.
201
+ * @lastreviewed null
202
+ */
203
+ function draftBuildRefusalReasonOf(raw) {
204
+ return typeof raw === "string" && exports.DRAFT_BUILD_REFUSAL_REASONS.includes(raw)
205
+ ? raw
206
+ : null;
207
+ }
208
+ /**
209
+ * The platform's build of the draft (`compileDraft`) failed without an outcome to report: a refusal (`reason`, one of
210
+ * {@link DRAFT_BUILD_REFUSAL_REASONS}, with nothing built), another GraphQL error (for example the caller may not edit
211
+ * the script; `reason` null, `rawReason` whatever the error carried), an unreadable answer, or a request that failed
212
+ * twice (`networkFailure`: it may or may not have run). The pushed draft is on the platform either way.
213
+ * @lastreviewed null
214
+ */
215
+ class DraftBuildFailedError extends BsjsGitError {
216
+ messages;
217
+ networkFailure;
218
+ /** The platform's refusal reason, when it is a known one. @lastreviewed null */
219
+ reason;
220
+ /** `extensions.reason` exactly as sent, `null` when none. @lastreviewed null */
221
+ rawReason;
222
+ constructor(message, messages = [], networkFailure = false, options) {
223
+ super("BUILD_FAILED", `Draft build failed: ${message}`, options);
224
+ this.messages = messages;
225
+ this.networkFailure = networkFailure;
226
+ this.rawReason = options?.reason ?? null;
227
+ this.reason = draftBuildRefusalReasonOf(this.rawReason);
228
+ }
229
+ }
230
+ exports.DraftBuildFailedError = DraftBuildFailedError;
231
+ /**
232
+ * The build was refused because the platform's draft is no longer the commit this client pushed (`DRAFT_MOVED`):
233
+ * someone pushed in between. Nothing was built; fetch the draft and check it again.
234
+ * @lastreviewed null
235
+ */
236
+ class DraftBuildMovedError extends DraftBuildFailedError {
237
+ details;
238
+ constructor(details, message) {
239
+ super(message, [message], false, { reason: "DRAFT_MOVED" });
240
+ this.details = details;
241
+ }
242
+ }
243
+ exports.DraftBuildMovedError = DraftBuildMovedError;
244
+ /**
245
+ * The platform's `DraftBuildRefusalReason` for a build whose push to the forge it could not confirm: the build commit
246
+ * may or may not be on the draft branch.
247
+ * @lastreviewed null
248
+ */
249
+ exports.BUILD_OUTCOME_UNKNOWN_REASON = "BUILD_OUTCOME_UNKNOWN";
250
+ /**
251
+ * The platform could not tell whether its build commit landed ({@link BUILD_OUTCOME_UNKNOWN_REASON}). Not retried: a
252
+ * second request could build again. {@link ScriptRepo.compileDraft} turns it into `outcomeUnknown` after reading the
253
+ * draft back; it reaches a caller only from a lower-level request.
254
+ * @lastreviewed null
255
+ */
256
+ class DraftBuildOutcomeUnknownError extends DraftBuildFailedError {
257
+ details;
258
+ constructor(details, message) {
259
+ super(message, [message], false, { reason: exports.BUILD_OUTCOME_UNKNOWN_REASON });
260
+ this.details = details;
261
+ }
262
+ }
263
+ exports.DraftBuildOutcomeUnknownError = DraftBuildOutcomeUnknownError;
264
+ /**
265
+ * A pinned publish ({@link ScriptRepo.publish} with `at`) was refused before asking the platform: the local draft is
266
+ * neither the commit asked for nor a build of it (for example a later save moved it), so publishing it would publish
267
+ * something other than what was built and checked. Nothing was sent.
268
+ * @lastreviewed null
269
+ */
270
+ class PublishPinMismatchError extends BsjsGitError {
271
+ at;
272
+ local;
273
+ constructor(at, local) {
274
+ super("PUBLISH_PIN_MISMATCH", `The publish was pinned to ${at}, but the local draft is at ${local}, which is neither that commit nor a build of it`);
275
+ this.at = at;
276
+ this.local = local;
277
+ }
278
+ }
279
+ exports.PublishPinMismatchError = PublishPinMismatchError;
280
+ /**
281
+ * The platform built the draft, but the local draft could not be moved to its build commit because local files are in
282
+ * the way: each path in `paths` is one the build changes whose local copy matches neither the pushed commit nor the
283
+ * build (a local edit, or an untracked or ignored file). Nothing was changed here: the local draft branch, index and
284
+ * working tree are as they were.
285
+ * @lastreviewed null
286
+ */
287
+ class GitBuildFastForwardBlockedError extends BsjsGitError {
288
+ buildCommitSha;
289
+ paths;
290
+ constructor(buildCommitSha, paths) {
291
+ super("BUILD_FAST_FORWARD_BLOCKED", `The draft folder was not moved to the platform's build commit ${buildCommitSha}: ${paths.length} local ` +
292
+ `file(s) the build changes differ from both the pushed commit and the build: ${paths.join(", ")}`);
293
+ this.buildCommitSha = buildCommitSha;
294
+ this.paths = paths;
295
+ }
296
+ }
297
+ exports.GitBuildFastForwardBlockedError = GitBuildFastForwardBlockedError;
185
298
  /**
186
299
  * The script's class id has no known publish mutation.
187
300
  * @lastreviewed null
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AA0BA;;;GAGG;AACH,MAAa,YAAa,SAAQ,KAAK;IAE1B;IADX,YACW,IAAsB,EAC/B,OAAe,EACf,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAJf,SAAI,GAAJ,IAAI,CAAkB;QAK/B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF;AATD,oCASC;AAED;;;GAGG;AACH,MAAa,YAAa,SAAQ,YAAY;IAC5C,YAAY,OAAO,GAAG,kDAAkD;QACtE,KAAK,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;CACF;AAJD,oCAIC;AAED;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,YAAY;IAEvC;IADX,YACW,MAAc,EACvB,OAAiE,mBAAmB;QAEpF,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,4BAA4B,MAAM,EAAE,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC;QAHzF,WAAM,GAAN,MAAM,CAAQ;IAIzB,CAAC;CACF;AAPD,gDAOC;AAED;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACpC,CAAC;CACF;AAJD,wDAIC;AAED;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,kBAA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AE;oBAC3B,IAAI,EAAE,IAA4B;iBACnC,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,0BAAiB,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3E,CAAC;YACD,MAAM,OAAO,GAA2B,EAAE,CAAC;YAC3C,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBACtC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACvB,CAAC,CAAC,CAAC;YACH,OAAO;gBACL,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,UAAU,EAAE,QAAQ,CAAC,MAAM;gBAC3B,aAAa,EAAE,QAAQ,CAAC,UAAU;gBAClC,OAAO;gBACP,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;aACxD,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,10 +4,11 @@
4
4
  * @lastreviewed null
5
5
  */
6
6
  import "./bufferShim";
7
- export { ScriptRepo, DRAFT_BRANCH, PUBLISHED_BRANCH, decodeText, type CloneOptions, type CommitOptions, type CommitInfo, type LogPage, type FileChange, type GitIdentity, type LogOptions, type PublishResult, type PushOutcome, type ScriptRepoOptions, type TreeFile, type WorkingChange, } from "./ScriptRepo";
7
+ export { ScriptRepo, DRAFT_BRANCH, PUBLISHED_BRANCH, decodeText, type BuildFastForward, type BuildFastForwardState, type CloneOptions, type CommitOptions, type CommitInfo, type CompileDraftOptions, type DraftBuildResult, type LogPage, type FileChange, type GitIdentity, type LogOptions, type PublishOptions, type PublishResult, type PushOutcome, type ScriptRepoOptions, type TreeFile, type WorkingChange, } from "./ScriptRepo";
8
8
  export { LegacyHistoryClient, parseSaveState, treeFiles, type HistoryTree, type HistoryTreeEntry, type LegacyHistoryClientOptions, type LegacyHistoryEntry, type LegacyListOptions, } from "./legacy";
9
9
  export { compoundId, parseCompoundId, publishMutationFor, SCRIPT_PUBLISH_TYPES, type PublishMutation, type ScriptRef, } from "./scriptKey";
10
+ export { BUILD_COMMIT_SUBJECT, BUILD_OF_TRAILER, buildSourceOf, COMPILE_RETRY, KNOWN_DRAFT_COMPILE_STATUSES, PUBLISHABLE_COMPILE_STATUSES, compileAllowsPublish, parseDraftBuildCommit, parseDraftCompileOutcome, type CompileDiagnostic, type DraftBuildCommit, type DraftCompileOutcome, type DraftCompileStatus, type GateProblem, type GateReport, type RetryPolicy, } from "./serverBuild";
10
11
  export { CsrfFetch, type ScriptAuth } from "./csrf";
11
12
  export { basicTokenFetch, createProxyHttp, gitAuthHeader, refusalFor, type FetchLike } from "./http";
12
13
  export * from "./errors";
13
- export { BUILD_MANIFEST_BUILDER, BUILD_MANIFEST_NAME, buildManifestPath, buildOutputFolder, formatBuildManifest, gitBlobSha1, hasNoTsconfig, isBuildSource, isTypeScriptSource, parseJsonc, planBuildManifest, type BuildManifestPlan, } from "./buildManifest";
14
+ export { BUILD_MANIFEST_NAME, buildManifestPath, buildOutputFolder, buildConfigPaths, buildOutputFolders, changesOnlyBuildOutput, hasNoTsconfig, isBuildSource, isTypeScriptSource, parseJsonc, } from "./buildManifest";