tegami 1.2.3 → 1.2.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.
- package/dist/{_accessExpressionAsString-DW_6Xqcp.js → _accessExpressionAsString-DAz6bHI_.js} +1 -1
- package/dist/{_assertGuard-CFFC1Up9.js → _assertGuard-cQ6dIdMj.js} +2 -2
- package/dist/{_createStandardSchema-CrRqJgaE.js → _createStandardSchema-DFfVlh8x.js} +2 -2
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/index.js +34 -35
- package/dist/{generate-Cgl2G5ea.js → generate-Cip5o2xy.js} +1 -1
- package/dist/generators/simple.d.ts +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -9
- package/dist/{npm-uJA8deYA.js → npm-BHUzBLSi.js} +11 -13
- package/dist/plugins/cargo.d.ts +1 -1
- package/dist/plugins/cargo.js +36 -33
- package/dist/plugins/git.d.ts +1 -2
- package/dist/plugins/git.js +2 -4
- package/dist/plugins/github.d.ts +10 -9
- package/dist/plugins/github.js +109 -199
- package/dist/plugins/gitlab.d.ts +9 -8
- package/dist/plugins/gitlab.js +114 -204
- package/dist/plugins/go.d.ts +2 -6
- package/dist/plugins/go.js +9 -9
- package/dist/providers/npm.d.ts +1 -1
- package/dist/providers/npm.js +1 -1
- package/dist/{publish-BEYIILK5.js → publish-CQifflae.js} +9 -7
- package/dist/{shared-pTOZU5UZ.js → shared-BraxbVVG.js} +2 -2
- package/dist/{types-Kj7Nxbjz.d.ts → types-Cn0Au3Kk.d.ts} +74 -59
- package/dist/utils/index.d.ts +0 -1
- package/dist/{version-request-C89RO85i.js → version-request-CLEmlVnL.js} +136 -46
- package/dist/{version-request-C5vtakPE.d.ts → version-request-DHxFYvna.d.ts} +1 -3
- package/package.json +3 -3
package/dist/plugins/gitlab.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as changelogFilename } from "../generate-Cgl2G5ea.js";
|
|
1
|
+
import { t as changelogFilename } from "../generate-Cip5o2xy.js";
|
|
3
2
|
import { c as joinPath, n as execFailure, o as cached, r as fetchFailure, s as isCI } from "../error-CAsrGb6e.js";
|
|
4
|
-
import { a as createDraft, l as readChangelogEntries } from "../publish-
|
|
3
|
+
import { a as createDraft, l as readChangelogEntries } from "../publish-CQifflae.js";
|
|
5
4
|
import { git } from "./git.js";
|
|
6
|
-
import { n as
|
|
5
|
+
import { i as versionRequestPlugin, n as formatPreview, r as resolveFileCommit, t as createAutoRelease } from "../version-request-CLEmlVnL.js";
|
|
7
6
|
import { readFile, writeFile } from "node:fs/promises";
|
|
8
7
|
import { basename, join, relative, resolve } from "node:path";
|
|
9
8
|
import { x } from "tinyexec";
|
|
@@ -273,209 +272,120 @@ function parsePositiveInt(value, option) {
|
|
|
273
272
|
/** Create GitLab releases for successfully published packages after the whole plan succeeds. */
|
|
274
273
|
function gitlab(options = {}) {
|
|
275
274
|
const { release: releaseOptions = true } = options;
|
|
276
|
-
let
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const groups = /* @__PURE__ */ new Map();
|
|
338
|
-
for (const [id, { preflight, publishResult, git }] of plan.packages) {
|
|
339
|
-
if (!eager && publishResult.type === "failed") return;
|
|
340
|
-
const tag = git?.tag;
|
|
341
|
-
if (!tag || !preflight.shouldPublish) continue;
|
|
342
|
-
const pkg = this.graph.get(id);
|
|
343
|
-
const group = groups.get(tag);
|
|
344
|
-
if (group) group.push(pkg);
|
|
345
|
-
else groups.set(tag, [pkg]);
|
|
346
|
-
}
|
|
347
|
-
await Promise.all(Array.from(groups, async ([tag, packages]) => {
|
|
348
|
-
for (const member of packages) if (plan.packages.get(member.id).publishResult.type === "failed") return;
|
|
349
|
-
if (await releaseExistsByTag(repo, tag, api)) return;
|
|
350
|
-
let release;
|
|
351
|
-
if (packages.length > 1) {
|
|
352
|
-
const overrides = await createGrouped?.call(this, {
|
|
353
|
-
tag,
|
|
354
|
-
packages,
|
|
355
|
-
plan
|
|
356
|
-
}) ?? {};
|
|
357
|
-
release = {
|
|
358
|
-
title: overrides.title ?? tag,
|
|
359
|
-
notes: overrides.notes ?? await defaultGroupedNotes(getRenderer(this), plan, packages)
|
|
360
|
-
};
|
|
361
|
-
} else {
|
|
362
|
-
const pkg = packages[0];
|
|
363
|
-
const overrides = await create?.call(this, {
|
|
364
|
-
tag,
|
|
365
|
-
pkg,
|
|
366
|
-
plan
|
|
367
|
-
}) ?? {};
|
|
368
|
-
const packagePlan = plan.packages.get(pkg.id);
|
|
369
|
-
release = {
|
|
370
|
-
title: overrides.title ?? formatPackageVersion(pkg.name, pkg.version, packagePlan?.npm?.distTag),
|
|
371
|
-
notes: overrides.notes ?? await defaultNotes(getRenderer(this), pkg, packagePlan)
|
|
372
|
-
};
|
|
275
|
+
let autoRelease;
|
|
276
|
+
return [
|
|
277
|
+
git(options),
|
|
278
|
+
{
|
|
279
|
+
name: "gitlab",
|
|
280
|
+
init() {
|
|
281
|
+
const { repo, token, webUrl } = this.gitlab = {
|
|
282
|
+
repo: options.repo ?? process.env.GITLAB_REPOSITORY ?? process.env.CI_PROJECT_PATH,
|
|
283
|
+
token: resolveGitLabToken(options.token),
|
|
284
|
+
apiUrl: options.apiUrl ?? process.env.GITLAB_API_URL ?? process.env.CI_API_V4_URL ?? "https://gitlab.com/api/v4",
|
|
285
|
+
webUrl: options.webUrl ?? process.env.GITLAB_SERVER_URL ?? process.env.CI_SERVER_URL ?? "https://gitlab.com"
|
|
286
|
+
};
|
|
287
|
+
if (repo && token && releaseOptions !== false) {
|
|
288
|
+
const { eager = false, create, createGrouped } = releaseOptions === true ? {} : releaseOptions;
|
|
289
|
+
const api = gitLabApiOptions(this.gitlab);
|
|
290
|
+
const resolveEntryMeta = cached((entry) => entry.id, async (entry) => {
|
|
291
|
+
const commit = await resolveFileCommit(this, entry.filename);
|
|
292
|
+
if (!commit || !repo) return {
|
|
293
|
+
commit,
|
|
294
|
+
mergeRequests: []
|
|
295
|
+
};
|
|
296
|
+
return {
|
|
297
|
+
commit,
|
|
298
|
+
mergeRequests: await listMergeRequestsForCommit(repo, commit, api).catch(() => [])
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
autoRelease = createAutoRelease({
|
|
302
|
+
eager,
|
|
303
|
+
override: create,
|
|
304
|
+
overrideGroup: createGrouped,
|
|
305
|
+
async formatChangelog(entry) {
|
|
306
|
+
const meta = await resolveEntryMeta(entry);
|
|
307
|
+
const commitSuffix = meta.commit ? ` ([${meta.commit.slice(0, 7)}](${joinPath(webUrl, repo, "-/commit", meta.commit)}))` : "";
|
|
308
|
+
const lines = [];
|
|
309
|
+
for (const section of entry.sections) {
|
|
310
|
+
lines.push(`### ${section.title}${commitSuffix}`, "");
|
|
311
|
+
if (section.content) lines.push(section.content, "");
|
|
312
|
+
}
|
|
313
|
+
if (meta.mergeRequests.length > 0) {
|
|
314
|
+
lines.push("<details>", "<summary>Merge request & contributors</summary>", "");
|
|
315
|
+
for (const mr of meta.mergeRequests) {
|
|
316
|
+
let line = `- [!${mr.number} ${mr.title}](${joinPath(webUrl, repo, "-/merge_requests", String(mr.number))})`;
|
|
317
|
+
if (mr.user) line += ` by @${mr.user.login}`;
|
|
318
|
+
lines.push(line);
|
|
319
|
+
}
|
|
320
|
+
lines.push("", "</details>");
|
|
321
|
+
}
|
|
322
|
+
return lines.join("\n").trim();
|
|
323
|
+
},
|
|
324
|
+
create({ input, tag }) {
|
|
325
|
+
return createRelease(repo, {
|
|
326
|
+
tag,
|
|
327
|
+
title: input.title,
|
|
328
|
+
notes: input.notes,
|
|
329
|
+
...api
|
|
330
|
+
});
|
|
331
|
+
},
|
|
332
|
+
releaseExistsByTag(tag) {
|
|
333
|
+
return releaseExistsByTag(repo, tag, api);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
373
336
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
337
|
+
},
|
|
338
|
+
async resolvePlanStatus({ plan }) {
|
|
339
|
+
if (await autoRelease?.hasPending.call(this, plan)) return "pending";
|
|
340
|
+
},
|
|
341
|
+
async afterPublishAll({ plan }) {
|
|
342
|
+
await autoRelease?.create.call(this, plan);
|
|
343
|
+
},
|
|
344
|
+
async initCli(cli) {
|
|
345
|
+
registerMrCli(cli);
|
|
346
|
+
if (!isCI()) return;
|
|
347
|
+
const { repo, token, webUrl } = this.gitlab;
|
|
348
|
+
if (!token || !repo) return;
|
|
349
|
+
const result = await x("git", [
|
|
350
|
+
"remote",
|
|
351
|
+
"set-url",
|
|
352
|
+
"origin",
|
|
353
|
+
gitlabRemoteUrl(repo, token, webUrl)
|
|
354
|
+
], { nodeOptions: { cwd: this.cwd } });
|
|
355
|
+
if (result.exitCode !== 0) throw execFailure("Failed to configure git remote for GitLab CI.", result);
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
versionRequestPlugin({
|
|
359
|
+
name: "gitlab",
|
|
360
|
+
options: options.versionMr,
|
|
361
|
+
canCreate(context) {
|
|
362
|
+
const { repo, token } = context.gitlab ?? {};
|
|
363
|
+
return Boolean(repo && token);
|
|
364
|
+
},
|
|
365
|
+
async upsert(context, request, update) {
|
|
366
|
+
const repo = context.gitlab.repo;
|
|
367
|
+
const api = gitLabApiOptions(context.gitlab);
|
|
368
|
+
const openMr = await findOpenMergeRequest(repo, {
|
|
369
|
+
head: request.head,
|
|
370
|
+
base: request.base,
|
|
378
371
|
...api
|
|
379
372
|
});
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return [git(options), plugin];
|
|
397
|
-
}
|
|
398
|
-
function createChangelogRenderer(context) {
|
|
399
|
-
const { repo, webUrl } = context.gitlab;
|
|
400
|
-
const api = gitLabApiOptions(context.gitlab);
|
|
401
|
-
const resolveFileCommit = cached((filename) => filename, async (filename) => {
|
|
402
|
-
const result = await x("git", [
|
|
403
|
-
"log",
|
|
404
|
-
"--diff-filter=A",
|
|
405
|
-
"-1",
|
|
406
|
-
"--format=%H",
|
|
407
|
-
"--",
|
|
408
|
-
relative(context.cwd, join(context.changelogDir, filename))
|
|
409
|
-
], { nodeOptions: { cwd: context.cwd } });
|
|
410
|
-
if (result.exitCode !== 0) return;
|
|
411
|
-
return result.stdout.trim() || void 0;
|
|
412
|
-
});
|
|
413
|
-
const resolveEntryMeta = cached((entry) => entry.id, async (entry) => {
|
|
414
|
-
const commit = await resolveFileCommit(entry.filename);
|
|
415
|
-
if (!commit || !repo) return {
|
|
416
|
-
commit,
|
|
417
|
-
mergeRequests: []
|
|
418
|
-
};
|
|
419
|
-
return {
|
|
420
|
-
commit,
|
|
421
|
-
mergeRequests: await listMergeRequestsForCommit(repo, commit, api).catch(() => [])
|
|
422
|
-
};
|
|
423
|
-
});
|
|
424
|
-
function formatEntryDetails(meta) {
|
|
425
|
-
if (meta.mergeRequests.length === 0) return;
|
|
426
|
-
const lines = [];
|
|
427
|
-
for (const mr of meta.mergeRequests) {
|
|
428
|
-
let line = repo ? `- [!${mr.number} ${mr.title}](${joinPath(webUrl, repo, "-/merge_requests", String(mr.number))})` : `- #${mr.number} ${mr.title}`;
|
|
429
|
-
if (mr.user) line += ` by @${mr.user.login}`;
|
|
430
|
-
lines.push(line);
|
|
431
|
-
}
|
|
432
|
-
return [
|
|
433
|
-
"<details>",
|
|
434
|
-
"<summary>Merge request & contributors</summary>",
|
|
435
|
-
"",
|
|
436
|
-
...lines,
|
|
437
|
-
"",
|
|
438
|
-
"</details>"
|
|
439
|
-
].join("\n");
|
|
440
|
-
}
|
|
441
|
-
return async (entry) => {
|
|
442
|
-
const meta = await resolveEntryMeta(entry);
|
|
443
|
-
let commitSuffix = "";
|
|
444
|
-
if (meta.commit) {
|
|
445
|
-
const short = meta.commit.slice(0, 7);
|
|
446
|
-
const link = repo ? `[${short}](${joinPath(webUrl, repo, "-/commit", meta.commit)})` : `\`${short}\``;
|
|
447
|
-
commitSuffix += ` (${link})`;
|
|
448
|
-
}
|
|
449
|
-
const lines = [];
|
|
450
|
-
for (const section of entry.sections) {
|
|
451
|
-
lines.push(`### ${section.title}${commitSuffix}`, "");
|
|
452
|
-
if (section.content) lines.push(section.content, "");
|
|
453
|
-
}
|
|
454
|
-
const details = formatEntryDetails(meta);
|
|
455
|
-
if (details) lines.push(details);
|
|
456
|
-
return lines.join("\n").trim();
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
async function defaultNotes(renderer, pkg, packagePlan) {
|
|
460
|
-
if (packagePlan && packagePlan.changelogs.length > 0) return (await Promise.all(packagePlan.changelogs.map(renderer))).join("\n\n");
|
|
461
|
-
return `Published ${formatPackageVersion(pkg.name, pkg.version, packagePlan?.npm?.distTag)}.`;
|
|
462
|
-
}
|
|
463
|
-
async function defaultGroupedNotes(renderer, plan, packages) {
|
|
464
|
-
const changelogs = /* @__PURE__ */ new Map();
|
|
465
|
-
for (const pkg of packages) {
|
|
466
|
-
const packagePlan = plan.packages.get(pkg.id);
|
|
467
|
-
if (!packagePlan) continue;
|
|
468
|
-
for (const entry of packagePlan.changelogs) changelogs.set(entry.id, entry);
|
|
469
|
-
}
|
|
470
|
-
const sections = [packages.map((pkg) => {
|
|
471
|
-
const packagePlan = plan.packages.get(pkg.id);
|
|
472
|
-
return `- ${formatPackageVersion(pkg.name, pkg.version, packagePlan?.npm?.distTag)}`;
|
|
473
|
-
}).join("\n")];
|
|
474
|
-
if (changelogs.size > 0) {
|
|
475
|
-
const notes = await Promise.all(Array.from(changelogs.values(), renderer));
|
|
476
|
-
sections.push("", notes.join("\n\n"));
|
|
477
|
-
}
|
|
478
|
-
return sections.join("\n");
|
|
373
|
+
if (openMr === void 0) await createMergeRequest(repo, {
|
|
374
|
+
title: request.title,
|
|
375
|
+
body: request.body,
|
|
376
|
+
head: request.head,
|
|
377
|
+
base: request.base,
|
|
378
|
+
...api
|
|
379
|
+
});
|
|
380
|
+
else if (update) await updateMergeRequest(repo, openMr, {
|
|
381
|
+
title: request.title,
|
|
382
|
+
body: request.body,
|
|
383
|
+
base: request.base,
|
|
384
|
+
...api
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
})
|
|
388
|
+
];
|
|
479
389
|
}
|
|
480
390
|
function gitLabApiOptions(gitlab) {
|
|
481
391
|
const options = {};
|
package/dist/plugins/go.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { L as BumpType, j as WorkspacePackage, s as TegamiPlugin } from "../types-Cn0Au3Kk.js";
|
|
3
2
|
//#region src/plugins/go.d.ts
|
|
4
3
|
interface GoModFile {
|
|
5
4
|
module: string;
|
|
@@ -44,9 +43,6 @@ interface GoPluginOptions {
|
|
|
44
43
|
* - Version is stored in lock file, normally, it should prefer to store versions in a file like `package.json` & `Cargo.toml`, but for Golang, there is no such file.
|
|
45
44
|
* - Publishing is handed to Git plugin, because Golang uses Git tag for publishing.
|
|
46
45
|
*/
|
|
47
|
-
declare function go({
|
|
48
|
-
updateLockFile,
|
|
49
|
-
bumpDep: getBumpDepType
|
|
50
|
-
}?: GoPluginOptions): TegamiPlugin;
|
|
46
|
+
declare function go({ updateLockFile, bumpDep: getBumpDepType }?: GoPluginOptions): TegamiPlugin;
|
|
51
47
|
//#endregion
|
|
52
48
|
export { GoPackage, GoPluginOptions, go };
|
package/dist/plugins/go.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as isNodeError, n as execFailure, r as fetchFailure } from "../error-CAsrGb6e.js";
|
|
2
|
-
import { n as _validateReport, t as _createStandardSchema } from "../_createStandardSchema-
|
|
2
|
+
import { n as _validateReport, t as _createStandardSchema } from "../_createStandardSchema-DFfVlh8x.js";
|
|
3
3
|
import { n as WorkspacePackage } from "../graph-DaJ28Y4f.js";
|
|
4
4
|
import { relative, resolve } from "node:path";
|
|
5
5
|
import { x } from "tinyexec";
|
|
@@ -287,7 +287,6 @@ function go({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
|
|
|
287
287
|
let active = false;
|
|
288
288
|
return {
|
|
289
289
|
name: "go",
|
|
290
|
-
enforce: "post",
|
|
291
290
|
async resolve() {
|
|
292
291
|
await discoverGoPackages(this.cwd, (pkg) => this.graph.add(pkg));
|
|
293
292
|
active = this.graph.getPackages().some((pkg) => pkg instanceof GoPackage);
|
|
@@ -320,9 +319,9 @@ function go({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
|
|
|
320
319
|
},
|
|
321
320
|
initPublishLock({ lock, draft }) {
|
|
322
321
|
if (!active) return;
|
|
323
|
-
for (const
|
|
322
|
+
for (const id of draft.getPackageDrafts().keys()) {
|
|
324
323
|
const pkg = this.graph.get(id);
|
|
325
|
-
if (!(pkg instanceof GoPackage)
|
|
324
|
+
if (!(pkg instanceof GoPackage)) continue;
|
|
326
325
|
lock.write("go:packages", {
|
|
327
326
|
id,
|
|
328
327
|
version: pkg.version
|
|
@@ -331,17 +330,18 @@ function go({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
|
|
|
331
330
|
},
|
|
332
331
|
initPublishPlan({ lock, plan }) {
|
|
333
332
|
if (!active) return;
|
|
333
|
+
const lockVersions = /* @__PURE__ */ new Map();
|
|
334
334
|
let data;
|
|
335
335
|
while (data = lock.read("go:packages")) {
|
|
336
|
-
const
|
|
337
|
-
if (!
|
|
338
|
-
|
|
339
|
-
const pkg = this.graph.get(parsed.id);
|
|
340
|
-
if (pkg instanceof GoPackage) pkg.setVersion(parsed.version);
|
|
336
|
+
const { success, data: parsed } = validateGoPackageLock(data);
|
|
337
|
+
if (!success) continue;
|
|
338
|
+
lockVersions.set(parsed.id, parsed.version);
|
|
341
339
|
}
|
|
342
340
|
for (const [id, packagePlan] of plan.packages) {
|
|
343
341
|
const pkg = this.graph.get(id);
|
|
344
342
|
if (!(pkg instanceof GoPackage)) continue;
|
|
343
|
+
const version = packagePlan.updated && lockVersions.get(id);
|
|
344
|
+
if (version) pkg.setVersion(version);
|
|
345
345
|
packagePlan.git ??= {};
|
|
346
346
|
packagePlan.git.tag = formatGoTag(this.cwd, pkg.path, pkg.version);
|
|
347
347
|
}
|
package/dist/providers/npm.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as NpmGraph, S as DependencySpec, l as NpmPluginOptions, u as npm, w as NpmPackage } from "../types-
|
|
1
|
+
import { C as NpmGraph, S as DependencySpec, l as NpmPluginOptions, u as npm, w as NpmPackage } from "../types-Cn0Au3Kk.js";
|
|
2
2
|
export { type DependencySpec, type NpmGraph, NpmPackage, NpmPluginOptions, npm };
|
package/dist/providers/npm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NpmPackage, t as npm } from "../npm-
|
|
1
|
+
import { n as NpmPackage, t as npm } from "../npm-BHUzBLSi.js";
|
|
2
2
|
export { NpmPackage, npm };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as maxBump } from "./semver-DrtaCCZK.js";
|
|
2
2
|
import { i as handlePluginError, l as somePromise } from "./error-CAsrGb6e.js";
|
|
3
|
-
import { t as _accessExpressionAsString } from "./_accessExpressionAsString-
|
|
4
|
-
import { n as _validateReport, t as _createStandardSchema } from "./_createStandardSchema-
|
|
5
|
-
import { n as renderChangelog, r as validateChangelogFrontmatter, t as getPackageBumps } from "./shared-
|
|
3
|
+
import { t as _accessExpressionAsString } from "./_accessExpressionAsString-DAz6bHI_.js";
|
|
4
|
+
import { n as _validateReport, t as _createStandardSchema } from "./_createStandardSchema-DFfVlh8x.js";
|
|
5
|
+
import { n as renderChangelog, r as validateChangelogFrontmatter, t as getPackageBumps } from "./shared-BraxbVVG.js";
|
|
6
6
|
import { simpleGenerator } from "./generators/simple.js";
|
|
7
|
-
import { t as _assertGuard } from "./_assertGuard-
|
|
7
|
+
import { t as _assertGuard } from "./_assertGuard-cQ6dIdMj.js";
|
|
8
8
|
import fs, { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
9
9
|
import path, { basename, dirname, join } from "node:path";
|
|
10
10
|
import * as semver$1 from "semver";
|
|
@@ -788,10 +788,12 @@ async function runPreflights(context, plan) {
|
|
|
788
788
|
async function publishPlanStatus(plan, context) {
|
|
789
789
|
for (const plugin of context.plugins) {
|
|
790
790
|
const status = await handlePluginError(plugin, "resolvePlanStatus", () => plugin.resolvePlanStatus?.call(context, { plan }));
|
|
791
|
-
if (Array.isArray(status) && await somePromise(status, (v) => v === "pending")
|
|
792
|
-
|
|
791
|
+
if (Array.isArray(status) && await somePromise(status, (v) => v === "pending") || status === "pending") return {
|
|
792
|
+
status: "pending",
|
|
793
|
+
reason: `Plugin "${plugin.name}" has pending tasks`
|
|
794
|
+
};
|
|
793
795
|
}
|
|
794
|
-
return "success";
|
|
796
|
+
return { status: "success" };
|
|
795
797
|
}
|
|
796
798
|
//#endregion
|
|
797
799
|
export { createDraft as a, parseChangelogFile as c, runPublishPlan as i, readChangelogEntries as l, publishPlanStatus as n, PublishLock as o, runPreflights as r, parsePublishLock as s, initPublishPlan as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as _accessExpressionAsString } from "./_accessExpressionAsString-
|
|
2
|
-
import { n as _validateReport, t as _createStandardSchema } from "./_createStandardSchema-
|
|
1
|
+
import { t as _accessExpressionAsString } from "./_accessExpressionAsString-DAz6bHI_.js";
|
|
2
|
+
import { n as _validateReport, t as _createStandardSchema } from "./_createStandardSchema-DFfVlh8x.js";
|
|
3
3
|
import { stringify } from "yaml";
|
|
4
4
|
//#region src/changelog/shared.ts
|
|
5
5
|
const validateChangelogFrontmatter = (() => {
|