shiplane 0.4.0 → 0.4.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/dist/{budget-CTjB1v-Z.js → budget-BTnKtGF6.js} +9 -28
- package/dist/budget-BTnKtGF6.js.map +1 -0
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/{index-Cb8R0RIA.d.ts → index-CxyLUqKJ.d.ts} +2 -7
- package/dist/index.d.ts +2 -2
- package/dist/memory.d.ts +1 -1
- package/dist/memory.js +1 -1
- package/dist/{package-registry.fake-Ciqc4ujx.js → package-registry.fake-D6e0c_iA.js} +6 -6
- package/dist/package-registry.fake-D6e0c_iA.js.map +1 -0
- package/dist/{package-registry.fake-CC37ptzf.d.ts → package-registry.fake-DOI4N4yu.d.ts} +8 -9
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.js +1 -1
- package/dist/{readStatus-DmT61axf.js → readStatus-Dd_pBt-6.js} +254 -94
- package/dist/readStatus-Dd_pBt-6.js.map +1 -0
- package/dist/src-Dqo5lgrW.js.map +1 -1
- package/dist/{static-hosting.port-mknLsxwR.d.ts → static-hosting.port-DaIJfr1x.d.ts} +13 -15
- package/dist/testing.d.ts +20 -14
- package/dist/testing.js +15 -16
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/budget-CTjB1v-Z.js.map +0 -1
- package/dist/package-registry.fake-Ciqc4ujx.js.map +0 -1
- package/dist/readStatus-DmT61axf.js.map +0 -1
package/dist/src-Dqo5lgrW.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"src-Dqo5lgrW.js","names":[],"sources":["../src/application/config/defineRelease.ts","../src/modules/agent-plugin/agent-plugin.module.ts","../src/modules/internal-tool/internal-tool.module.ts"],"sourcesContent":["import type { DisplayChoice } from \"../../domain/display\";\nimport type { TagFormatName } from \"../../domain/tags\";\nimport type { Feature, ReleaseFlow, ReleaseModule } from \"../../modules/module\";\n\n/** How a repository releases: the flow, what gets released in order, and what happens around it. */\nexport interface ReleaseConfig {\n /** Folders to look in, `dir/*` or exact. Without it, the workspace file decides. */\n units?: string[];\n /** How the release itself runs: an adapter per port, each from its plugin. */\n flow: ReleaseFlow;\n /** What gets released, in this order. The first app is the repository's Latest release. */\n modules: ReleaseModule[];\n /** What happens around a release, after the ship, in this order. */\n features?: Feature[];\n /**\n * How a tag names a version: `\"package\"` (`{name}@{version}`, the default), `\"plugin\"` (`{name}--v{version}`), `\"single\"` (`v{version}`, one unit only), `\"module\"` (`{name}/v{version}`), or a format of your own.\n */\n tag?: TagFormatName | (string & {});\n
|
|
1
|
+
{"version":3,"file":"src-Dqo5lgrW.js","names":[],"sources":["../src/application/config/defineRelease.ts","../src/modules/agent-plugin/agent-plugin.module.ts","../src/modules/internal-tool/internal-tool.module.ts"],"sourcesContent":["import type { DisplayChoice } from \"../../domain/display\";\nimport type { TagFormatName } from \"../../domain/tags\";\nimport type { Feature, ReleaseFlow, ReleaseModule } from \"../../modules/module\";\n\n/** How a repository releases: the flow, what gets released in order, and what happens around it. */\nexport interface ReleaseConfig {\n /** Folders to look in, `dir/*` or exact. Without it, the workspace file decides. */\n units?: string[];\n /** How the release itself runs: an adapter per port, each from its plugin. */\n flow: ReleaseFlow;\n /** What gets released, in this order. The first app is the repository's Latest release. */\n modules: ReleaseModule[];\n /** What happens around a release, after the ship, in this order. */\n features?: Feature[];\n /**\n * How a tag names a version: `\"package\"` (`{name}@{version}`, the default), `\"plugin\"` (`{name}--v{version}`), `\"single\"` (`v{version}`, one unit only), `\"module\"` (`{name}/v{version}`), or a format of your own.\n */\n tag?: TagFormatName | (string & {});\n /** How much the release says while it runs; `--verbose` and `--mascot` (or `--no-…`) override. */\n display?: DisplayChoice;\n}\n\nexport const defineRelease = (config: ReleaseConfig): ReleaseConfig => config;\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { z } from \"zod\";\n\nimport type { Named } from \"../deliveryModule\";\nimport type { ReleaseModule } from \"../module\";\n\n/**\n * Where each agent reads a plugin's version, relative to the plugin's folder: Claude Code and\n * Copilot CLI, Codex, Cursor, then Gemini CLI.\n */\nexport const AGENT_MANIFESTS = [\n \".claude-plugin/plugin.json\",\n \".codex-plugin/plugin.json\",\n \".cursor-plugin/plugin.json\",\n \"gemini-extension.json\",\n] as const;\n\nconst Versioned = z.object({ version: z.string() });\n\n/** A manifest's version, or null when the file is missing or holds no top-level version. */\nconst versionIn = (file: string) => {\n if (!fs.existsSync(file)) return null;\n const parsed = Versioned.safeParse(JSON.parse(fs.readFileSync(file, \"utf8\")));\n return parsed.success ? parsed.data.version : null;\n};\n\nconst literal = (text: string) => text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/** Moves only the version's value, so the release PR shows one changed line per manifest. */\nconst setVersion = (file: string, from: string, to: string) => {\n const text = fs.readFileSync(file, \"utf8\");\n const moved = text.replace(\n new RegExp(`(\"version\"\\\\s*:\\\\s*)\"${literal(from)}\"`),\n `$1${JSON.stringify(to)}`,\n );\n // The first such value may sit under another key: then the file is written whole instead.\n const top = Versioned.safeParse(JSON.parse(moved));\n const json = JSON.parse(text) as Record<string, unknown>;\n fs.writeFileSync(\n file,\n top.success && top.data.version === to\n ? moved\n : `${JSON.stringify({ ...json, version: to }, null, 2)}\\n`,\n );\n};\n\n/**\n * A plugin for coding agents, such as a Claude Code, Codex or Cursor plugin: a release versions it,\n * writes the version into each agent's manifest in the release PR, tags it and publishes its notes.\n * Nothing deploys it: agents install it from the repository, so merging the release PR ships it.\n */\nexport const agentPlugin = ({ name = \"agent-plugin\" }: Named = {}): ReleaseModule => ({\n type: \"module\",\n name,\n kind: \"agent-plugin\",\n provider: \"marketplace\",\n settings: z.object({}),\n adapters: [],\n releaseOnly: true,\n version: ({ root }, { unit, bump }) => {\n if (!bump) return Promise.resolve({ added: [], writes: [], summary: [], onMerge: \"\" });\n const manifests = AGENT_MANIFESTS.map((file) => path.posix.join(unit.dir, file)).flatMap(\n (file) => {\n const from = versionIn(path.join(root, file));\n return from === null ? [] : [{ file, from }];\n },\n );\n return Promise.resolve({\n added: [],\n writes: manifests.map(({ file, from }) => ({\n label: `${file} → ${bump.to}`,\n run: () => {\n setVersion(path.join(root, file), from, bump.to);\n return Promise.resolve();\n },\n })),\n summary: [],\n onMerge: \"Agents update to it: merging ships it\",\n });\n },\n ship: () => ({\n where: \"its tag and release notes; agents install it from the repository\",\n jobs: [],\n }),\n decide: () =>\n Promise.resolve({ action: \"none\", status: \"released, agents install it from the repository\" }),\n});\n","import { z } from \"zod\";\n\nimport type { Named } from \"../deliveryModule\";\nimport type { ReleaseModule } from \"../module\";\n\n/**\n * An app nothing deploys, such as a CLI run from the repository: a release versions it, tags it and\n * publishes its notes, and every environment counts it as shipped once tagged.\n */\nexport const internalTool = ({ name = \"internal-tool\" }: Named = {}): ReleaseModule => ({\n type: \"module\",\n name,\n kind: \"internal-tool\",\n // What output named it before modules: the release PR and status keep saying it.\n provider: \"release-only\",\n settings: z.object({}),\n adapters: [],\n releaseOnly: true,\n ship: () => ({ where: \"its tag and release notes, nothing deploys it\", jobs: [] }),\n decide: () => Promise.resolve({ action: \"none\", status: \"released, nothing deploys it\" }),\n});\n"],"mappings":";;;;;;AAsBA,MAAa,iBAAiB,WAAyC;;;;;;;ACXvE,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACD;AAED,MAAM,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;;AAGnD,MAAM,aAAa,SAAiB;AAClC,KAAI,CAAC,GAAG,WAAW,KAAK,CAAE,QAAO;CACjC,MAAM,SAAS,UAAU,UAAU,KAAK,MAAM,GAAG,aAAa,MAAM,OAAO,CAAC,CAAC;AAC7E,QAAO,OAAO,UAAU,OAAO,KAAK,UAAU;;AAGhD,MAAM,WAAW,SAAiB,KAAK,QAAQ,uBAAuB,OAAO;;AAG7E,MAAM,cAAc,MAAc,MAAc,OAAe;CAC7D,MAAM,OAAO,GAA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AAE;EACT;CACD,cACE,QAAQ,QAAQ;EAAE,QAAQ;EAAQ,QAAQ;EAAmD,CAAC;CACjG;;;;;;;AC9ED,MAAa,gBAAgB,EAAE,OAAO,oBAA2B,EAAE,MAAqB;CACtF,MAAM;CACN;CACA,MAAM;CAEN,UAAU;CACV,UAAU,EAAE,OAAO,EAAE,CAAC;CACtB,UAAU,EAAE;CACZ,aAAa;CACb,aAAa;EAAE,OAAO;EAAiD,MAAM,EAAE;EAAE;CACjF,cAAc,QAAQ,QAAQ;EAAE,QAAQ;EAAQ,QAAQ;EAAgC,CAAC;CAC1F"}
|
|
@@ -61,6 +61,8 @@ interface UnitRef {
|
|
|
61
61
|
packageName: string;
|
|
62
62
|
}
|
|
63
63
|
type BumpType = "major" | "minor" | "patch" | "none";
|
|
64
|
+
/** A bump that moves a version. */
|
|
65
|
+
type BumpLevel = Exclude<BumpType, "none">;
|
|
64
66
|
/** One changeset, as `changeset status --output` lists it. */
|
|
65
67
|
interface PlannedChangeset {
|
|
66
68
|
id: string;
|
|
@@ -106,13 +108,6 @@ declare const splitChangesets: (changesets: PlannedChangeset[], held: readonly s
|
|
|
106
108
|
ships: PlannedChangeset[];
|
|
107
109
|
waits: PlannedChangeset[];
|
|
108
110
|
};
|
|
109
|
-
interface UnreleasedApp {
|
|
110
|
-
/** The unit's name. */
|
|
111
|
-
app: string;
|
|
112
|
-
version: string;
|
|
113
|
-
/** Subjects of the commits that touched it since its current version, newest first. */
|
|
114
|
-
commits: string[];
|
|
115
|
-
}
|
|
116
111
|
//#endregion
|
|
117
112
|
//#region src/domain/releasePr.d.ts
|
|
118
113
|
interface OpenPr {
|
|
@@ -310,8 +305,6 @@ interface SourceControlPort {
|
|
|
310
305
|
sha: string;
|
|
311
306
|
subject: string;
|
|
312
307
|
} | null>;
|
|
313
|
-
/** Subjects of the commits that touched a folder since a commit, newest first, `ignore` aside. */
|
|
314
|
-
subjectsSince: (sha: string, dir: string, ignore?: readonly string[]) => Promise<string[]>;
|
|
315
308
|
/** The commits after `from` up to `to`, newest first: each subject and the files it touched. */
|
|
316
309
|
commitsBetween: (from: string, to: string) => Promise<{
|
|
317
310
|
subject: string;
|
|
@@ -612,15 +605,20 @@ interface DeliveryAdapter<Port extends {
|
|
|
612
605
|
//#region src/ports/versioning.port.d.ts
|
|
613
606
|
/** The intent to release: changesets today. */
|
|
614
607
|
interface VersioningPort {
|
|
608
|
+
/** What a person does to queue a release, as they read it: "pnpm changeset". */
|
|
609
|
+
readonly nextChange: string;
|
|
615
610
|
/** Pending change files, by id, with their raw text. */
|
|
616
611
|
pending: () => Promise<{
|
|
617
612
|
id: string;
|
|
618
613
|
text: string;
|
|
619
614
|
}[]>;
|
|
620
|
-
/**
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
615
|
+
/**
|
|
616
|
+
* What versioning would move, with these added and the `waits` held back, writing nothing. With
|
|
617
|
+
* a `ceiling`, nothing moves by more than that level, whatever a change says.
|
|
618
|
+
*/
|
|
619
|
+
plan: (added: PlannedChangeset[], held: PlannedChangeset[], ceiling?: BumpLevel) => Promise<StatusPlan>;
|
|
620
|
+
/** Writes `added`, versions everything but `held` up to `ceiling`, and leaves `held` pending. */
|
|
621
|
+
apply: (added: PlannedChangeset[], held: PlannedChangeset[], ceiling?: BumpLevel) => Promise<void>;
|
|
624
622
|
/** Adds one pending changeset, as a person would with `pnpm changeset`. */
|
|
625
623
|
write: (changeset: PlannedChangeset) => Promise<void>;
|
|
626
624
|
/** Each workspace package's runtime workspace dependencies, by package name. */
|
|
@@ -680,5 +678,5 @@ interface StaticHostingPort<Options = Record<string, unknown>> extends Delivery<
|
|
|
680
678
|
readonly capability: "static-hosting";
|
|
681
679
|
}
|
|
682
680
|
//#endregion
|
|
683
|
-
export { OpenPr as $, releaseSource as A, LinkedPr as B, Clock as C, StepPlace as D, Prompter as E, ShellResult as F, DeployPath as G, ActionsMinutes as H, CiPipelinePort as I, onlyVersionFiles as J, deployRunTitle as K, CodeHostPort as L, CommandFailed as M, RunOptions as N, SourceControlPort as O, Shell as P, MergeMethods as Q, Deploy as R, Choice as S, Progress as T, actionsMinutes as U, issueName as V, billedMinutes as W, Approval as X, DecidedBy as Y, MergeMethod as Z, Refusal as _, VersioningPort as a,
|
|
684
|
-
//# sourceMappingURL=static-hosting.port-
|
|
681
|
+
export { OpenPr as $, releaseSource as A, LinkedPr as B, Clock as C, StepPlace as D, Prompter as E, ShellResult as F, DeployPath as G, ActionsMinutes as H, CiPipelinePort as I, onlyVersionFiles as J, deployRunTitle as K, CodeHostPort as L, CommandFailed as M, RunOptions as N, SourceControlPort as O, Shell as P, MergeMethods as Q, Deploy as R, Choice as S, Progress as T, actionsMinutes as U, issueName as V, billedMinutes as W, Approval as X, DecidedBy as Y, MergeMethod as Z, Refusal as _, VersioningPort as a, UnitRef as at, VersionChoice as b, DeliveryAdapter as c, ReleaseUnit as ct, DecideContext as d, MascotMoment as dt, ReleaseStep as et, Decision as f, Mood as ft, JobInput as g, Job as h, MobileDistributionPort as i, StatusPlan as it, yesAllowed as j, GitPosition as k, ServiceAdapter as l, DisplayChoice as lt, Health as m, Environment as mt, ServerHostingPort as n, BumpLevel as nt, Adapter as o, appBumps as ot, Delivery as p, progressBar as pt, deployState as q, PackageRegistryPort as r, PlannedChangeset as rt, AdapterContext as s, splitChangesets as st, StaticHostingPort as t, AppBump as tt, Command as u, Mascot as ut, Requirement as v, Output as w, VersionContribution as x, Resolved as y, IssueRef as z };
|
|
682
|
+
//# sourceMappingURL=static-hosting.port-DaIJfr1x.d.ts.map
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as OpenPr, C as Clock, D as StepPlace, E as Prompter, F as ShellResult, G as DeployPath, I as CiPipelinePort, L as CodeHostPort, N as RunOptions, O as SourceControlPort, P as Shell, S as Choice, T as Progress, X as Approval, a as VersioningPort, at as
|
|
2
|
-
import { _ as Feature, b as ReleaseFlow, w as ReleaseTag, x as ReleaseModule, y as Open } from "./index-
|
|
3
|
-
import { a as VersioningFake, c as ciPipelineFake, d as codeHostFake, f as SourceControlFake, i as serverHostingFake, l as CodeHostFake, n as mobileDistributionFake, o as versioningFake, p as sourceControlFake, r as staticHostingFake, s as CiPipelineFake, t as packageRegistryFake, u as HostEvent } from "./package-registry.fake-
|
|
1
|
+
import { $ as OpenPr, C as Clock, D as StepPlace, E as Prompter, F as ShellResult, G as DeployPath, I as CiPipelinePort, L as CodeHostPort, N as RunOptions, O as SourceControlPort, P as Shell, S as Choice, T as Progress, X as Approval, a as VersioningPort, at as UnitRef, c as DeliveryAdapter, ct as ReleaseUnit, et as ReleaseStep, ft as Mood, i as MobileDistributionPort, it as StatusPlan, l as ServiceAdapter, lt as DisplayChoice, mt as Environment, n as ServerHostingPort, nt as BumpLevel, p as Delivery, r as PackageRegistryPort, rt as PlannedChangeset, st as splitChangesets, t as StaticHostingPort, tt as AppBump, w as Output, x as VersionContribution, z as IssueRef } from "./static-hosting.port-DaIJfr1x.js";
|
|
2
|
+
import { _ as Feature, b as ReleaseFlow, w as ReleaseTag, x as ReleaseModule, y as Open } from "./index-CxyLUqKJ.js";
|
|
3
|
+
import { a as VersioningFake, c as ciPipelineFake, d as codeHostFake, f as SourceControlFake, i as serverHostingFake, l as CodeHostFake, n as mobileDistributionFake, o as versioningFake, p as sourceControlFake, r as staticHostingFake, s as CiPipelineFake, t as packageRegistryFake, u as HostEvent } from "./package-registry.fake-DOI4N4yu.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import * as _$vitest from "vitest";
|
|
6
6
|
|
|
@@ -195,8 +195,6 @@ interface Release {
|
|
|
195
195
|
problems: ConfigProblem[];
|
|
196
196
|
/** How a tag names a version, such as `{name}@{version}`. */
|
|
197
197
|
tagFormat: string;
|
|
198
|
-
/** Commits no changeset names release their unit, with a changelog from them. */
|
|
199
|
-
releasesCommits?: boolean;
|
|
200
198
|
/** How much the release says while it runs, as the config asks. */
|
|
201
199
|
display?: DisplayChoice;
|
|
202
200
|
/** Files still under their name from before shiplane. */
|
|
@@ -315,15 +313,26 @@ interface Companion {
|
|
|
315
313
|
why: string;
|
|
316
314
|
}
|
|
317
315
|
//#endregion
|
|
316
|
+
//#region src/domain/versionChoice.d.ts
|
|
317
|
+
/** A version a person chose over the computed one. */
|
|
318
|
+
interface ForcedVersion {
|
|
319
|
+
/** Nothing in the release ships above it. */
|
|
320
|
+
level: BumpLevel;
|
|
321
|
+
/** Moves the release up to that level, and carries why into its notes. */
|
|
322
|
+
changeset: PlannedChangeset;
|
|
323
|
+
}
|
|
324
|
+
//#endregion
|
|
318
325
|
//#region src/application/prepareRelease.d.ts
|
|
319
326
|
type Split = ReturnType<typeof splitChangesets>;
|
|
320
327
|
interface Prepared {
|
|
328
|
+
/** The units the person picked. */
|
|
329
|
+
scope: ReadonlySet<string>;
|
|
330
|
+
/** The version the person chose over the computed one, when they did. */
|
|
331
|
+
forced?: ForcedVersion;
|
|
321
332
|
/** Changesets this release ships, the ones it writes included. */
|
|
322
333
|
pending: number;
|
|
323
334
|
/** Units the person left out: their changesets stay pending. */
|
|
324
335
|
held: string[];
|
|
325
|
-
/** Changed units the person left out: no changeset ships them. */
|
|
326
|
-
unreleased: UnreleasedApp[];
|
|
327
336
|
split: Split;
|
|
328
337
|
bumps: AppBump[];
|
|
329
338
|
/** Units the person did not pick that move anyway, with the package that drags each. */
|
|
@@ -338,7 +347,7 @@ interface Prepared {
|
|
|
338
347
|
contributions: Record<string, VersionContribution>;
|
|
339
348
|
}
|
|
340
349
|
/** What a release PR covering `scope` would version, computed without writing anything. */
|
|
341
|
-
declare const prepareRelease: (context: ReleaseContext, scope: ReadonlySet<string>, known?: Readonly<Record<string, VersionContribution
|
|
350
|
+
declare const prepareRelease: (context: ReleaseContext, scope: ReadonlySet<string>, known?: Readonly<Record<string, VersionContribution>>, forced?: ForcedVersion) => Promise<Prepared>;
|
|
342
351
|
//#endregion
|
|
343
352
|
//#region src/application/openReleasePr.d.ts
|
|
344
353
|
/**
|
|
@@ -369,7 +378,6 @@ interface UnitStatus {
|
|
|
369
378
|
tag: string;
|
|
370
379
|
tagged: boolean;
|
|
371
380
|
changesets: number;
|
|
372
|
-
commits: number;
|
|
373
381
|
/** Something to release to this environment. */
|
|
374
382
|
pending: boolean;
|
|
375
383
|
hint: string;
|
|
@@ -447,9 +455,9 @@ declare const inSandbox: (args: string[]) => string;
|
|
|
447
455
|
//#region src/testing/plans.d.ts
|
|
448
456
|
/**
|
|
449
457
|
* What `changeset status` answers for these pending changesets, plus the ones a release adds, minus
|
|
450
|
-
* the lines it holds back: every named package moves once, by its biggest bump
|
|
458
|
+
* the lines it holds back: every named package moves once, by its biggest bump, up to `ceiling`.
|
|
451
459
|
*/
|
|
452
|
-
declare const planFrom: (pending: PlannedChangeset[], versions: Record<string, string>) => (added: PlannedChangeset[], held: PlannedChangeset[]) => StatusPlan;
|
|
460
|
+
declare const planFrom: (pending: PlannedChangeset[], versions: Record<string, string>) => (added: PlannedChangeset[], held: PlannedChangeset[], ceiling?: BumpLevel) => StatusPlan;
|
|
453
461
|
//#endregion
|
|
454
462
|
//#region src/adapters/terminal/__fakes__/progress.fake.d.ts
|
|
455
463
|
interface ProgressEvent {
|
|
@@ -489,7 +497,6 @@ declare const testContext: ({
|
|
|
489
497
|
interactive,
|
|
490
498
|
root,
|
|
491
499
|
tagFormat,
|
|
492
|
-
commitsWithoutChangeset,
|
|
493
500
|
approval
|
|
494
501
|
}: {
|
|
495
502
|
units: ReleaseUnit[];
|
|
@@ -498,8 +505,7 @@ declare const testContext: ({
|
|
|
498
505
|
yes?: boolean;
|
|
499
506
|
interactive?: boolean;
|
|
500
507
|
root?: string;
|
|
501
|
-
tagFormat?: string; /**
|
|
502
|
-
commitsWithoutChangeset?: "release" | "ignore"; /** Whether someone else approves the release PR; the config default when absent. */
|
|
508
|
+
tagFormat?: string; /** Whether someone else approves the release PR; the config default when absent. */
|
|
503
509
|
approval?: Approval;
|
|
504
510
|
}) => {
|
|
505
511
|
context: ReleaseContext;
|
package/dist/testing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as releaseFlow } from "./web-app.module-6KrXIU7j.js";
|
|
2
|
-
import { C as refreshEditorSchema,
|
|
3
|
-
import {
|
|
4
|
-
import { a as versioningFake, c as sourceControlFake, i as serverHostingFake, n as mobileDistributionFake, o as ciPipelineFake, r as staticHostingFake, s as codeHostFake, t as packageRegistryFake } from "./package-registry.fake-
|
|
2
|
+
import { C as refreshEditorSchema, E as ENVIRONMENTS, O as nodeFiles, T as optionsFor, _ as loadRelease, a as releaseToPreview, b as initRelease, c as promote, f as openReleasePr, h as docsFor, i as setup, l as shipTo, m as newAdapter, n as systemShell, p as prepareRelease, t as readStatus, u as planShips, v as addUnit, x as doctor, y as removeUnit } from "./readStatus-Dd_pBt-6.js";
|
|
3
|
+
import { _ as nextVersion, b as DEFAULT_TAG_FORMAT } from "./budget-BTnKtGF6.js";
|
|
4
|
+
import { a as versioningFake, c as sourceControlFake, i as serverHostingFake, n as mobileDistributionFake, o as ciPipelineFake, r as staticHostingFake, s as codeHostFake, t as packageRegistryFake } from "./package-registry.fake-D6e0c_iA.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -172,7 +172,7 @@ const testUnit = (name, overrides = {}) => ({
|
|
|
172
172
|
* A release over a Fake of every port the flow runs on, answered by a scripted person. The apps are
|
|
173
173
|
* in release order as given: the first is the Latest release.
|
|
174
174
|
*/
|
|
175
|
-
const testContext = ({ units, modules = [], features = [], yes = false, interactive = true, root = "/repo", tagFormat = DEFAULT_TAG_FORMAT,
|
|
175
|
+
const testContext = ({ units, modules = [], features = [], yes = false, interactive = true, root = "/repo", tagFormat = DEFAULT_TAG_FORMAT, approval }) => {
|
|
176
176
|
const sourceControl = sourceControlFake();
|
|
177
177
|
const codeHost = codeHostFake();
|
|
178
178
|
const ciPipeline = ciPipelineFake();
|
|
@@ -197,8 +197,7 @@ const testContext = ({ units, modules = [], features = [], yes = false, interact
|
|
|
197
197
|
features: typeof features === "function" ? features(fakes) : features,
|
|
198
198
|
units,
|
|
199
199
|
problems: [],
|
|
200
|
-
tagFormat
|
|
201
|
-
releasesCommits: commitsWithoutChangeset === "release"
|
|
200
|
+
tagFormat
|
|
202
201
|
};
|
|
203
202
|
return {
|
|
204
203
|
context: {
|
|
@@ -467,6 +466,10 @@ const versioningContract = (name, subject) => describe(`${name}, as versioning`,
|
|
|
467
466
|
expect(pending.map(({ id }) => id)).toContain("contract-change");
|
|
468
467
|
expect(pending.find(({ id }) => id === "contract-change")?.text).toContain(`"${workspace.name}": minor`);
|
|
469
468
|
});
|
|
469
|
+
it("given a person with nothing queued, when they are told what to do, then the port says it", async () => {
|
|
470
|
+
const { port } = await subject();
|
|
471
|
+
expect(port.nextChange).not.toBe("");
|
|
472
|
+
});
|
|
470
473
|
it("given a workspace package, when the folders are read, then it is found in its folder", async () => {
|
|
471
474
|
const { port, workspace } = await subject();
|
|
472
475
|
expect(await port.folders()).toMatchObject({ [workspace.name]: workspace.folder });
|
|
@@ -511,17 +514,11 @@ const inSandbox = (args) => execFileSync("git", args, {
|
|
|
511
514
|
}).trim();
|
|
512
515
|
//#endregion
|
|
513
516
|
//#region src/testing/plans.ts
|
|
514
|
-
const bump = (version, type) => {
|
|
515
|
-
const [major = 0, minor = 0] = version.split(".").map(Number);
|
|
516
|
-
if (type === "major") return `${major + 1}.0.0`;
|
|
517
|
-
if (type === "minor") return `${major}.${minor + 1}.0`;
|
|
518
|
-
return nextPatch(version);
|
|
519
|
-
};
|
|
520
517
|
/**
|
|
521
518
|
* What `changeset status` answers for these pending changesets, plus the ones a release adds, minus
|
|
522
|
-
* the lines it holds back: every named package moves once, by its biggest bump
|
|
519
|
+
* the lines it holds back: every named package moves once, by its biggest bump, up to `ceiling`.
|
|
523
520
|
*/
|
|
524
|
-
const planFrom = (pending, versions) => (added, held) => {
|
|
521
|
+
const planFrom = (pending, versions) => (added, held, ceiling) => {
|
|
525
522
|
const heldLines = new Set(held.flatMap(({ id, releases }) => releases.map(({ name }) => `${id}:${name}`)));
|
|
526
523
|
const changesets = [...pending, ...added].map((changeset) => ({
|
|
527
524
|
...changeset,
|
|
@@ -532,17 +529,19 @@ const planFrom = (pending, versions) => (added, held) => {
|
|
|
532
529
|
"minor",
|
|
533
530
|
"patch"
|
|
534
531
|
];
|
|
532
|
+
const capped = ceiling ? order.slice(order.indexOf(ceiling)) : order;
|
|
535
533
|
return {
|
|
536
534
|
changesets,
|
|
537
535
|
releases: [...new Set(changesets.flatMap(({ releases }) => releases.map(({ name }) => name)))].map((name) => {
|
|
538
536
|
const lines = changesets.filter(({ releases }) => releases.some((line) => line.name === name));
|
|
539
|
-
const
|
|
537
|
+
const named = order.find((candidate) => lines.some(({ releases }) => releases.some((line) => line.name === name && line.type === candidate))) ?? "patch";
|
|
538
|
+
const type = capped.includes(named) ? named : ceiling ?? named;
|
|
540
539
|
const oldVersion = versions[name] ?? "0.1.0";
|
|
541
540
|
return {
|
|
542
541
|
name,
|
|
543
542
|
type,
|
|
544
543
|
oldVersion,
|
|
545
|
-
newVersion:
|
|
544
|
+
newVersion: nextVersion(oldVersion, type),
|
|
546
545
|
changesets: lines.map(({ id }) => id)
|
|
547
546
|
};
|
|
548
547
|
})
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","names":[],"sources":["../src/adapters/shell/__fakes__/shell.fake.ts","../src/adapters/terminal/__fakes__/progress.fake.ts","../src/adapters/terminal/__fakes__/terminal.fake.ts","../src/testing/releaseContext.ts","../src/testing/deliveryContract.ts","../src/adapters/server-hosting/server-hosting.contract.ts","../src/adapters/static-hosting/static-hosting.contract.ts","../src/adapters/mobile-distribution/mobile-distribution.contract.ts","../src/adapters/package-registry/package-registry.contract.ts","../src/adapters/source-control/source-control.contract.ts","../src/adapters/code-host/code-host.contract.ts","../src/adapters/ci-pipeline/ci-pipeline.contract.ts","../src/adapters/versioning/versioning.contract.ts","../src/testing/sample.ts","../src/testing/live.ts","../src/testing/plans.ts","../src/testing/consumer.ts","../src/testing/workspace.ts"],"sourcesContent":["import type { RunOptions, Shell, ShellResult } from \"../../../ports/shell.port\";\n\nexport interface ShellCall {\n command: string;\n args: string[];\n cwd?: string;\n env?: Record<string, string>;\n}\n\n/** A shell that runs nothing: it keeps every call and answers from what was seeded. */\nexport class RecordingShell implements Shell {\n readonly calls: ShellCall[] = [];\n private answers: { prefix: string; result: Partial<ShellResult>; once?: boolean }[] = [];\n private variables: Record<string, string> = {};\n\n seedEnv(variables: Record<string, string>) {\n this.variables = { ...this.variables, ...variables };\n return this;\n }\n\n env = (name: string) => this.variables[name];\n\n /** Answers every call whose `command args` line starts with `prefix`. */\n seed(prefix: string, result: Partial<ShellResult>) {\n this.answers.push({ prefix, result });\n return this;\n }\n\n /** Answers the next call starting with `prefix` only, ahead of what `seed` answers. */\n seedOnce(prefix: string, result: Partial<ShellResult>) {\n this.answers.unshift({ prefix, result, once: true });\n return this;\n }\n\n private answer(command: string, args: readonly string[], options: RunOptions): ShellResult {\n this.calls.push({ command, args: [...args], cwd: options.cwd, env: options.env });\n const line = [command, ...args].join(\" \");\n const found = this.answers.find(({ prefix }) => line.startsWith(prefix));\n if (found?.once) this.answers.splice(this.answers.indexOf(found), 1);\n return { status: 0, stdout: \"\", stderr: \"\", ...found?.result };\n }\n\n capture = (command: string, args: readonly string[], options: RunOptions = {}) =>\n Promise.resolve(this.answer(command, args, options));\n\n attach = (command: string, args: readonly string[], options: RunOptions = {}) =>\n Promise.resolve(this.answer(command, args, options).status);\n}\n","import type { Mood } from \"../../../domain/display\";\nimport type { Output, Progress, StepPlace } from \"../../../ports/terminal.port\";\n\nexport interface ProgressEvent {\n kind: \"stage\" | \"during\" | \"say\";\n text: string;\n mood?: Mood;\n step?: StepPlace;\n}\n\n/** Progress kept as events; what it says also goes to the output, as a terminal would print it. */\nexport class RecordingProgress implements Progress {\n readonly events: ProgressEvent[] = [];\n\n constructor(private readonly output: Output) {}\n\n stage = (stages: readonly string[], index: number) => {\n this.events.push({\n kind: \"stage\",\n text: stages[index] ?? \"\",\n step: { index, total: stages.length },\n });\n };\n\n during = <T>(label: string, mood: Mood, work: () => Promise<T>, step?: StepPlace) => {\n this.events.push({ kind: \"during\", mood, text: label, ...(step ? { step } : {}) });\n return work();\n };\n\n say = (mood: Mood, text: string) => {\n this.events.push({ kind: \"say\", mood, text });\n this.output.line(text);\n };\n}\n","import type { Choice, Clock, Output, Prompter } from \"../../../ports/terminal.port\";\n\n/** Everything the CLI printed, in order, without colours. */\nexport class MemoryOutput implements Output {\n readonly lines: string[] = [];\n\n line = (text = \"\") => {\n // eslint-disable-next-line no-control-regex\n this.lines.push(text.replace(/\\u001B\\[[0-9;]*m/g, \"\"));\n };\n\n get text() {\n return this.lines.join(\"\\n\");\n }\n}\n\ntype Answer = boolean | string | string[] | null;\n\n/** A person who answers from a script, in order; every question asked is kept. */\nexport class ScriptedPrompter implements Prompter {\n readonly asked: string[] = [];\n /** The answer each choice question offered first, by question. */\n readonly initials: Record<string, unknown> = {};\n /** The choices each select question offered, by question. */\n readonly choices: Record<string, Choice<string>[]> = {};\n private answers: Answer[] = [];\n\n constructor(readonly interactive = true) {}\n\n answer(...answers: Answer[]) {\n this.answers.push(...answers);\n return this;\n }\n\n private next(question: string): Answer {\n this.asked.push(question);\n if (this.answers.length === 0) throw new Error(`Unexpected question: ${question}`);\n return this.answers.shift() ?? null;\n }\n\n confirm = (question: string, initial = false) => {\n this.initials[question] = initial;\n return Promise.resolve(this.next(question) === true);\n };\n\n typed = (question: string, word: string) => Promise.resolve(this.next(question) === word);\n\n select = <Value extends string>(message: string, choices: Choice<Value>[], initial?: Value) => {\n this.initials[message] = initial;\n this.choices[message] = choices;\n return Promise.resolve(this.next(message) as Value | null);\n };\n\n multiselect = <Value extends string>(message: string, _choices: Choice<Value>[]) =>\n Promise.resolve(this.next(message) as Value[] | null);\n\n text = (message: string) => Promise.resolve(this.next(message) as string | null);\n\n /** No key is ever pressed: every wait times out, unless keys were queued with `press`. */\n private keys: string[] = [];\n\n press(...keys: string[]) {\n this.keys.push(...keys);\n return this;\n }\n\n waitForKey = () => Promise.resolve(this.keys.shift() ?? null);\n}\n\n/** A clock fixed at one moment, whose waits return at once. */\nexport class FixedClock implements Clock {\n constructor(private readonly at: Date) {}\n\n now = () => this.at;\n sleep = () => Promise.resolve();\n}\n","import type { Release } from \"../application/config/loadRelease\";\nimport type { ReleaseContext } from \"../application/context\";\nimport type { Approval } from \"../domain/releasePr\";\nimport type { ReleaseUnit } from \"../domain/unit\";\nimport type { Feature, ReleaseModule } from \"../modules/module\";\nimport { ciPipelineFake } from \"../adapters/ci-pipeline/__fakes__/ci-pipeline.fake\";\nimport { codeHostFake } from \"../adapters/code-host/__fakes__/code-host.fake\";\nimport { RecordingShell } from \"../adapters/shell/__fakes__/shell.fake\";\nimport { sourceControlFake } from \"../adapters/source-control/__fakes__/source-control.fake\";\nimport { RecordingProgress } from \"../adapters/terminal/__fakes__/progress.fake\";\nimport {\n FixedClock,\n MemoryOutput,\n ScriptedPrompter,\n} from \"../adapters/terminal/__fakes__/terminal.fake\";\nimport { versioningFake } from \"../adapters/versioning/__fakes__/versioning.fake\";\nimport { releaseFlow } from \"../application/releaseFlow\";\nimport { DEFAULT_TAG_FORMAT } from \"../domain/tags\";\n\nexport const testUnit = (name: string, overrides: Partial<ReleaseUnit> = {}): ReleaseUnit => ({\n name,\n dir: `apps/${name}`,\n file: `apps/${name}/shiplane.unit.yml`,\n packageName: `@acme/${name}`,\n version: \"0.1.0\",\n module: \"web-app\",\n options: {},\n after: [],\n ...overrides,\n});\n\n/** The flow's Fakes, as adapters a config would hold. */\ninterface FlowFakes {\n sourceControl: ReturnType<typeof sourceControlFake>;\n codeHost: ReturnType<typeof codeHostFake>;\n ciPipeline: ReturnType<typeof ciPipelineFake>;\n versioning: ReturnType<typeof versioningFake>;\n}\n\n/**\n * A release over a Fake of every port the flow runs on, answered by a scripted person. The apps are\n * in release order as given: the first is the Latest release.\n */\nexport const testContext = ({\n units,\n modules = [],\n features = [],\n yes = false,\n interactive = true,\n root = \"/repo\",\n tagFormat = DEFAULT_TAG_FORMAT,\n commitsWithoutChangeset = \"release\",\n approval,\n}: {\n units: ReleaseUnit[];\n modules?: ReleaseModule[];\n /** The features, or how to make them from the flow's Fakes they share. */\n features?: Feature[] | ((flow: FlowFakes) => Feature[]);\n yes?: boolean;\n interactive?: boolean;\n root?: string;\n tagFormat?: string;\n /** A release skips commits no changeset names; the config default ignores them. */\n commitsWithoutChangeset?: \"release\" | \"ignore\";\n /** Whether someone else approves the release PR; the config default when absent. */\n approval?: Approval;\n}) => {\n const sourceControl = sourceControlFake();\n const codeHost = codeHostFake();\n const ciPipeline = ciPipelineFake();\n const versioning = versioningFake();\n const prompter = new ScriptedPrompter(interactive);\n const output = new MemoryOutput();\n const progress = new RecordingProgress(output);\n const shell = new RecordingShell();\n const fakes = { sourceControl, codeHost, ciPipeline, versioning };\n const flow = releaseFlow({ ...fakes, approval });\n const release: Release = {\n root,\n flow,\n modules,\n features: typeof features === \"function\" ? features(fakes) : features,\n units,\n problems: [],\n tagFormat,\n releasesCommits: commitsWithoutChangeset === \"release\",\n };\n const context: ReleaseContext = {\n release,\n load: () => Promise.resolve(release),\n services: {\n sourceControl: sourceControl.fake,\n codeHost: codeHost.fake,\n ciPipeline: ciPipeline.fake,\n versioning: versioning.fake,\n },\n open: (adapter) => adapter.create({ root, shell }),\n prompter,\n output,\n progress,\n clock: new FixedClock(new Date(\"2026-10-12T09:00:00Z\")),\n shell,\n options: { yes, ci: false },\n };\n return {\n context,\n flow: fakes,\n source: sourceControl.fake,\n host: codeHost.fake,\n ci: ciPipeline.fake,\n versioning: versioning.fake,\n prompter,\n output,\n progress,\n shell,\n };\n};\n\nexport const changesetText = (packages: Record<string, string>, summary: string) =>\n `---\\n${Object.entries(packages)\n .map(([name, type]) => `\"${name}\": ${type}`)\n .join(\"\\n\")}\\n---\\n\\n${summary}\\n`;\n","import { describe, expect, it } from \"vitest\";\n\nimport type { Environment } from \"../domain/environment\";\nimport type { DeliveryAdapter } from \"../ports/adapter.port\";\nimport type { Delivery, FolderView } from \"../ports/delivery.port\";\nimport { RecordingShell } from \"../adapters/shell/__fakes__/shell.fake\";\nimport { optionsFor } from \"../application/config/optionsFor\";\nimport { ENVIRONMENTS } from \"../domain/environment\";\nimport { testUnit } from \"./releaseContext\";\n\n/** One adapter of a port, with settings an app's unit file could hold for it. */\nexport interface ContractCase<Port extends Delivery & { capability: string }> {\n adapter: DeliveryAdapter<Port>;\n settings: Record<string, unknown>;\n}\n\nconst EMPTY_FOLDER: FolderView = {\n dir: \"apps/empty\",\n name: \"empty\",\n files: [],\n has: () => false,\n read: () => null,\n};\n\n/** What every adapter of a delivery port must do, whatever its provider; `more` adds the port's own. */\nexport const deliveryContract = <Port extends Delivery & { capability: string }>(\n kind: string,\n cases: ContractCase<Port>[],\n more: (adapter: DeliveryAdapter<Port>, port: Port) => void = () => undefined,\n) =>\n describe.each(cases.map((entry) => [entry.adapter.name, entry] as const))(\n `%s, as ${kind}`,\n (_name, { adapter, settings }) => {\n const port = adapter.create({ root: \"/repo\", shell: new RecordingShell() });\n const unit = testUnit(\"app\", { module: \"app\", options: settings });\n const inputFor = (environment: Environment) => ({\n unit,\n tag: \"app@0.1.0\",\n environment,\n options: optionsFor({ ...unit, options: adapter.settings.parse(settings) }, environment, [\n unit,\n ]),\n commit: \"abc1234\",\n });\n\n it(\"given an app's settings, when its unit file is read, then the adapter's schema takes them\", () => {\n expect(adapter.settings.safeParse(settings).success).toBe(true);\n });\n\n it(\"given a tag on each environment, when it says where the tag lands, then a person can read it\", () => {\n ENVIRONMENTS.forEach((environment) =>\n expect(port.describe(inputFor(environment)).trim()).not.toBe(\"\"),\n );\n });\n\n it(\"given a tag on each environment, when its jobs are built, then each says what it does and what it runs\", () => {\n ENVIRONMENTS.forEach((environment) =>\n port.jobs(inputFor(environment)).forEach((job) => {\n expect(job.label.trim()).not.toBe(\"\");\n expect(job.local.length).toBeGreaterThan(0);\n job.local.forEach(({ command }) => expect(command.trim()).not.toBe(\"\"));\n }),\n );\n });\n\n it(\"given a folder with nothing in it, when init looks at it, then the adapter recognises nothing\", () => {\n expect(adapter.detect?.(EMPTY_FOLDER) ?? null).toBeNull();\n });\n\n it(\"given an app it ships, when doctor asks what it needs, then each need has a name and a check\", () => {\n (adapter.requirements?.(unit) ?? []).forEach(({ label, check }) => {\n expect(label.trim()).not.toBe(\"\");\n expect(check.command.trim()).not.toBe(\"\");\n });\n });\n\n more(adapter, port);\n },\n );\n","import { expect, it } from \"vitest\";\n\nimport type { ServerHostingPort } from \"../../ports/server-hosting.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every server host does, whatever its provider. */\nexport const serverHostingContract = (cases: ContractCase<ServerHostingPort>[]) =>\n deliveryContract(\"server hosting\", cases, (_adapter, port) => {\n it(\"given a server host, when its kind is read, then it hosts servers\", () => {\n expect(port.capability).toBe(\"server-hosting\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { StaticHostingPort } from \"../../ports/static-hosting.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every static host does, whatever its provider. */\nexport const staticHostingContract = (cases: ContractCase<StaticHostingPort>[]) =>\n deliveryContract(\"static hosting\", cases, (_adapter, port) => {\n it(\"given a static host, when its kind is read, then it hosts static sites\", () => {\n expect(port.capability).toBe(\"static-hosting\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { MobileDistributionPort } from \"../../ports/mobile-distribution.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every mobile distribution does, whatever its provider. */\nexport const mobileDistributionContract = (cases: ContractCase<MobileDistributionPort>[]) =>\n deliveryContract(\"mobile distribution\", cases, (adapter, port) => {\n it(\"given a mobile distribution, when status asks who decides, then its platform is named\", () => {\n expect(port.capability).toBe(\"mobile-distribution\");\n expect(adapter.decidedBy?.platform.trim() ?? \"\").not.toBe(\"\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { PackageRegistryPort } from \"../../ports/package-registry.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every package registry does, whatever its provider. */\nexport const packageRegistryContract = (cases: ContractCase<PackageRegistryPort>[]) =>\n deliveryContract(\"a package registry\", cases, (_adapter, port) => {\n it(\"given a package registry, when its kind is read, then it publishes packages\", () => {\n expect(port.capability).toBe(\"package-registry\");\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { SourceControlPort } from \"../../ports/source-control.port\";\n\n/** A repository on main with one commit, and the ways a test arranges it beyond the port. */\nexport interface SourceControlSubject {\n port: SourceControlPort;\n /** The commit main is on. */\n head: () => Promise<string>;\n /** Writes a file the repository does not track yet. */\n change: (file: string, text: string) => Promise<void>;\n}\n\n/** What every source control does, whatever its provider. */\nexport const sourceControlContract = (name: string, subject: () => Promise<SourceControlSubject>) =>\n describe(`${name}, as source control`, () => {\n it(\"given a fresh checkout, when its position is read, then it is on main with nothing to commit\", async () => {\n const { port } = await subject();\n\n expect((await port.position()).branch).toBe(\"main\");\n expect(await port.isClean()).toBe(true);\n });\n\n it(\"given a commit tagged, when the tags are read, then the tag is there and names that commit\", async () => {\n const { port, head } = await subject();\n const sha = await head();\n\n await port.tag(\"app@1.0.0\", sha, \"app 1.0.0\");\n\n expect(await port.tags()).toContain(\"app@1.0.0\");\n expect(await port.tagCommit(\"app@1.0.0\")).toBe(sha);\n });\n\n it(\"given tags in every format a config names, when the tags are read, then each one is there\", async () => {\n const { port, head } = await subject();\n const sha = await head();\n for (const tag of [\"arnaud-zg--v0.2.1\", \"v1.0.0\", \"app@1.0.0\"]) {\n await port.tag(tag, sha, tag);\n }\n\n expect([...(await port.tags())].sort()).toEqual([\"app@1.0.0\", \"arnaud-zg--v0.2.1\", \"v1.0.0\"]);\n });\n\n it(\"given a tag deleted, when the tags are read, then it is gone and names no commit\", async () => {\n const { port, head } = await subject();\n await port.tag(\"app@1.0.0\", await head(), \"app 1.0.0\");\n\n await port.deleteTag(\"app@1.0.0\");\n\n expect(await port.tags()).not.toContain(\"app@1.0.0\");\n expect(await port.tagCommit(\"app@1.0.0\")).toBeNull();\n });\n\n it(\"given a branch created, when the position is read, then it is on it, and switching back returns to main\", async () => {\n const { port } = await subject();\n\n await port.createBranch(\"release/next\");\n const onBranch = (await port.position()).branch;\n await port.switchTo(\"main\");\n\n expect(onBranch).toBe(\"release/next\");\n expect((await port.position()).branch).toBe(\"main\");\n });\n\n it(\"given a new file committed, when the changes are read, then it is no longer among them\", async () => {\n const { port, change } = await subject();\n await change(\"notes.md\", \"notes\\n\");\n const before = await port.changedFiles();\n\n await port.commit([\"notes.md\"], \"docs: notes\");\n\n expect(before).toContain(\"notes.md\");\n expect(await port.changedFiles()).not.toContain(\"notes.md\");\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { IssueRef } from \"../../domain/issues\";\nimport type { CodeHostPort } from \"../../ports/code-host.port\";\n\n/** A repository on a code host, and the ways a test arranges it beyond the port. */\nexport interface CodeHostSubject {\n port: CodeHostPort;\n /** A branch the host can open a pull request from, pushed with one commit on it. */\n branch: (name: string) => Promise<string>;\n /** A tag the host can publish release notes for. */\n tag: () => Promise<string>;\n /** An issue or pull request comments can go on. */\n issue: IssueRef;\n}\n\n/** What every code host does, whatever its provider. */\nexport const codeHostContract = (name: string, subject: () => Promise<CodeHostSubject>) =>\n describe(`${name}, as a code host`, () => {\n it(\"given a pull request opened, when the open ones are read, then it is there and open\", async () => {\n const { port, branch } = await subject();\n const head = await branch(\"release/contract-open\");\n\n const pr = await port.createPr({\n base: \"main\",\n head,\n title: \"chore: contract\",\n body: \"Opened by the contract suite.\",\n label: \"release\",\n });\n\n expect(pr.head).toEqual(expect.any(String));\n expect(await port.openPrsFrom(\"release/contract-open\")).toContainEqual(pr);\n expect(await port.prState(pr)).toBe(\"OPEN\");\n });\n\n it(\"given a pull request closed, when the open ones are read, then it is gone and closed\", async () => {\n const { port, branch } = await subject();\n const head = await branch(\"release/contract-close\");\n const pr = await port.createPr({\n base: \"main\",\n head,\n title: \"chore: contract\",\n body: \"Opened by the contract suite.\",\n label: \"release\",\n });\n\n await port.closePr(pr, \"Closed by the contract suite.\");\n\n expect(await port.openPrsFrom(\"release/contract-close\")).not.toContainEqual(pr);\n expect(await port.prState(pr)).toBe(\"CLOSED\");\n });\n\n it(\"given release notes published for a tag, when the released tags are read, then it is among them\", async () => {\n const { port, tag } = await subject();\n const name = await tag();\n\n await port.createRelease(name, \"Published by the contract suite.\", false);\n\n expect(await port.releasedTags()).toContain(name);\n });\n\n it(\"given a deploy recorded, when the deploys are read, then it is there and done\", async () => {\n const { port, tag } = await subject();\n const name = await tag();\n\n await port.recordDeployment(name, \"preview\");\n\n expect(await port.deployments()).toContainEqual({\n title: `Deploy ${name} to preview`,\n state: \"done\",\n });\n });\n\n it(\"given a comment posted, when the comments are read, then it is among them\", async () => {\n const { port, issue } = await subject();\n const body = `Posted by the contract suite at ${new Date().toISOString()}.`;\n\n await port.comment(issue, body);\n\n expect((await port.comments([issue])).flat()).toContain(body);\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { CiPipelinePort } from \"../../ports/ci-pipeline.port\";\n\n/** A CI pipeline, and the ways a test reads it beyond the port. */\nexport interface CiPipelineSubject {\n port: CiPipelinePort;\n /** A workflow that exists and has never run. */\n idle: string;\n}\n\n/** What every CI pipeline does, whatever its provider. */\nexport const ciPipelineContract = (name: string, subject: () => Promise<CiPipelineSubject>) =>\n describe(`${name}, as a CI pipeline`, () => {\n it(\"given a workflow that never ran, when its runs are read, then there are none\", async () => {\n const { port, idle } = await subject();\n\n expect(await port.workflowRuns(idle)).toEqual([]);\n });\n\n it(\"given a workflow that never succeeded, when its billed minutes are read, then none are measured\", async () => {\n const { port, idle } = await subject();\n\n expect(await port.measuredMinutes(idle)).toEqual([]);\n });\n\n it(\"given this month's budget, when it is read, then what is left is never more than included\", async () => {\n const { port } = await subject();\n\n const minutes = await port.minutes();\n\n if (minutes) expect(minutes.left).toBeLessThanOrEqual(minutes.included);\n else expect(minutes).toBeNull();\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { VersioningPort } from \"../../ports/versioning.port\";\n\n/** A workspace with one package, and the ways a test arranges it beyond the port. */\nexport interface VersioningSubject {\n port: VersioningPort;\n /** The package the workspace holds, and its folder. */\n workspace: { name: string; folder: string };\n}\n\n/** What every versioning does, whatever its provider. */\nexport const versioningContract = (name: string, subject: () => Promise<VersioningSubject>) =>\n describe(`${name}, as versioning`, () => {\n it(\"given a change written, when the pending changes are read, then it is there naming its package and bump\", async () => {\n const { port, workspace } = await subject();\n\n await port.write({\n id: \"contract-change\",\n releases: [{ name: workspace.name, type: \"minor\" }],\n summary: \"Written by the contract suite.\",\n });\n\n const pending = await port.pending();\n expect(pending.map(({ id }) => id)).toContain(\"contract-change\");\n expect(pending.find(({ id }) => id === \"contract-change\")?.text).toContain(\n `\"${workspace.name}\": minor`,\n );\n });\n\n it(\"given a workspace package, when the folders are read, then it is found in its folder\", async () => {\n const { port, workspace } = await subject();\n\n expect(await port.folders()).toMatchObject({ [workspace.name]: workspace.folder });\n });\n\n it(\"given a change and a folder, when their files are named, then they sit where a person looks\", async () => {\n const { port, workspace } = await subject();\n\n expect(port.changesetFile(\"contract-change\")).toBe(\".changeset/contract-change.md\");\n expect(port.changelogFile(workspace.folder)).toBe(`${workspace.folder}/CHANGELOG.md`);\n });\n });\n","import type { UnitRef } from \"../domain/changes\";\nimport type { DecidedBy } from \"../domain/scope\";\n\n/** This repository's four shipping units, as the rule tests were written against them. */\nexport const SAMPLE_UNITS: UnitRef[] = [\"expo\", \"api\", \"admin\", \"landing\"].map((name) => ({\n name,\n packageName: `@acme/${name}`,\n}));\n\nexport const SAMPLE_VERSION_FILES = new Set([\n \"apps/expo/app-version.json\",\n \"apps/api/public/app-version.preview.json\",\n \"apps/api/public/app-version.production.json\",\n]);\n\n// Billed minutes per deploy with no successful run to measure: the api validates before deploying.\nexport const SAMPLE_TYPICAL_MINUTES: Record<string, number> = {\n api: 13,\n admin: 5,\n landing: 4,\n expo: 8,\n};\n\nexport const EAS_DECIDES: DecidedBy = {\n platform: \"EAS\",\n choice: \"build or update\",\n check: \"shiplane status\",\n};\n","import { execFileSync } from \"node:child_process\";\nimport { z } from \"zod\";\n\nimport { systemShell } from \"../adapters/shell/system-shell.adapter\";\n\n/**\n * Contract suites against hosted services run only with RELEASE_CONTRACT_LIVE=1, on a sandbox\n * repository checked out at RELEASE_CONTRACT_REPO: they open pull requests, publish releases and\n * dispatch workflows there.\n */\nexport const LIVE = systemShell.env(\"RELEASE_CONTRACT_LIVE\") === \"1\";\n\n/** The sandbox checkout, refused when unset so a live run never touches this repository. */\nexport const sandbox = () =>\n z\n .string({ message: \"RELEASE_CONTRACT_REPO names a sandbox checkout for live contracts\" })\n .min(1)\n .parse(systemShell.env(\"RELEASE_CONTRACT_REPO\"));\n\n/** Runs git in the sandbox and returns what it printed. */\nexport const inSandbox = (args: string[]) =>\n execFileSync(\"git\", args, { cwd: sandbox(), encoding: \"utf8\" }).trim();\n","import type { PlannedChangeset, StatusPlan } from \"../domain/changes\";\nimport { nextPatch } from \"../domain/versions\";\n\nconst bump = (version: string, type: string) => {\n const [major = 0, minor = 0] = version.split(\".\").map(Number);\n if (type === \"major\") return `${major + 1}.0.0`;\n if (type === \"minor\") return `${major}.${minor + 1}.0`;\n return nextPatch(version);\n};\n\n/**\n * What `changeset status` answers for these pending changesets, plus the ones a release adds, minus\n * the lines it holds back: every named package moves once, by its biggest bump.\n */\nexport const planFrom =\n (pending: PlannedChangeset[], versions: Record<string, string>) =>\n (added: PlannedChangeset[], held: PlannedChangeset[]): StatusPlan => {\n const heldLines = new Set(\n held.flatMap(({ id, releases }) => releases.map(({ name }) => `${id}:${name}`)),\n );\n const changesets = [...pending, ...added]\n .map((changeset) => ({\n ...changeset,\n releases: changeset.releases.filter(\n ({ name }) => !heldLines.has(`${changeset.id}:${name}`),\n ),\n }))\n .filter(({ releases }) => releases.length > 0);\n const order = [\"major\", \"minor\", \"patch\"];\n const names = [\n ...new Set(changesets.flatMap(({ releases }) => releases.map(({ name }) => name))),\n ];\n return {\n changesets,\n releases: names.map((name) => {\n const lines = changesets.filter(({ releases }) =>\n releases.some((line) => line.name === name),\n );\n const type =\n order.find((candidate) =>\n lines.some(({ releases }) =>\n releases.some((line) => line.name === name && line.type === candidate),\n ),\n ) ?? \"patch\";\n const oldVersion = versions[name] ?? \"0.1.0\";\n return {\n name,\n type: type as \"patch\",\n oldVersion,\n newVersion: bump(oldVersion, type),\n changesets: lines.map(({ id }) => id),\n };\n }),\n };\n };\n","import { execFileSync, spawnSync } from \"node:child_process\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { systemShell } from \"../adapters/shell/system-shell.adapter\";\n\n/** What the built CLI printed and the code it exited with. */\nexport interface CliRun {\n status: number;\n output: string;\n}\n\nexport interface ConsumerRepository {\n root: string;\n /** The bare repository the checkout pushes to, standing in for GitHub. */\n origin: string;\n write: (file: string, text: string) => void;\n read: (file: string) => string;\n /** Runs git in the checkout, or in the bare origin with `{ in: \"origin\" }`. */\n git: (args: string[], where?: { in: \"origin\" }) => string;\n /** Commits every file as it stands and pushes the branch to the origin. */\n commitAndPush: (title: string) => void;\n /** Runs the built `shiplane` CLI in the checkout, as a person types it. */\n shiplane: (args: string[]) => CliRun;\n remove: () => void;\n}\n\nconst CORE = \"shiplane\";\n\nconst coreDir = (from: string): string => {\n const manifest = path.join(from, \"package.json\");\n if (fs.existsSync(manifest)) {\n const { name } = JSON.parse(fs.readFileSync(manifest, \"utf8\")) as { name?: string };\n if (name === CORE) return from;\n }\n const parent = path.dirname(from);\n if (parent === from) throw new Error(`${CORE} not found above ${import.meta.dirname}`);\n return coreDir(parent);\n};\n\n/** The built CLI, as `pnpm add shiplane` installs it. */\nexport const builtCli = (): string => {\n const cli = path.join(coreDir(import.meta.dirname), \"dist\", \"cli.js\");\n if (!fs.existsSync(cli)) {\n throw new Error(`shiplane is not built: run pnpm turbo run build --filter=${CORE}`);\n }\n return cli;\n};\n\n// No global git config, signing key, token or CI marker leaks in: a run sees only this repository.\nconst LEAKS = new Set([\"GITHUB_ACTIONS\", \"CI\", \"GITHUB_TOKEN\", \"GH_TOKEN\"]);\n\nconst hermeticEnv = (home: string, bin: string): NodeJS.ProcessEnv => ({\n ...Object.fromEntries(Object.entries(process.env).filter(([name]) => !LEAKS.has(name))),\n PATH: [bin, systemShell.env(\"PATH\") ?? \"\"].join(path.delimiter),\n HOME: home,\n GIT_CONFIG_GLOBAL: path.join(home, \".gitconfig\"),\n GIT_CONFIG_NOSYSTEM: \"1\",\n NO_COLOR: \"1\",\n // A fixed date makes each commit's hash depend on its files only, so docs can quote a run.\n GIT_AUTHOR_DATE: \"2026-01-01T00:00:00Z\",\n GIT_COMMITTER_DATE: \"2026-01-01T00:00:00Z\",\n});\n\n// The tools that reach a platform answer offline, so a run that would call one fails at once.\nconst OFFLINE = [\"gh\", \"npm\", \"flyctl\"];\n\nconst offlineTools = (bin: string) => {\n fs.mkdirSync(bin);\n OFFLINE.forEach((tool) => {\n const file = path.join(bin, tool);\n fs.writeFileSync(file, `#!/bin/sh\\necho \"${tool}: offline in this repository\" >&2\\nexit 1\\n`);\n fs.chmodSync(file, 0o755);\n });\n};\n\n/**\n * A repository as a consumer has it: its files, the packages it installed linked in its\n * node_modules, one commit pushed to a local bare origin. gh, npm and flyctl answer offline.\n */\nexport const consumerRepository = ({\n files,\n packages = {},\n branch = \"main\",\n}: {\n files: Record<string, string>;\n /** The branch releases start from, created first and pushed. */\n branch?: string;\n /** Package name to the folder it installs from, such as a plugin's workspace folder. */\n packages?: Record<string, string>;\n}): ConsumerRepository => {\n const dir = fs.mkdtempSync(path.join(os.tmpdir(), \"shiplane-consumer-\"));\n const root = path.join(dir, \"checkout\");\n const origin = path.join(dir, \"origin.git\");\n const home = path.join(dir, \"home\");\n fs.mkdirSync(home);\n fs.writeFileSync(\n path.join(home, \".gitconfig\"),\n \"[user]\\n\\tname = Shiplane Consumer\\n\\temail = consumer@example.com\\n\" +\n \"[commit]\\n\\tgpgsign = false\\n[tag]\\n\\tgpgsign = false\\n[core]\\n\\thooksPath = /dev/null\\n\",\n );\n const bin = path.join(dir, \"bin\");\n offlineTools(bin);\n const env = hermeticEnv(home, bin);\n const git = (args: string[], where?: { in: \"origin\" }) =>\n execFileSync(\"git\", args, {\n cwd: where ? origin : root,\n env,\n stdio: \"pipe\",\n encoding: \"utf8\",\n }).trim();\n const write = (file: string, text: string) => {\n const target = path.join(root, file);\n fs.mkdirSync(path.dirname(target), { recursive: true });\n fs.writeFileSync(target, text);\n };\n\n fs.mkdirSync(root);\n execFileSync(\"git\", [\"init\", \"--quiet\", \"--bare\", `--initial-branch=${branch}`, origin], { env });\n git([\"init\", \"--quiet\", `--initial-branch=${branch}`]);\n git([\"remote\", \"add\", \"origin\", origin]);\n write(\".gitignore\", \"node_modules\\n\");\n Object.entries(files).forEach(([file, text]) => write(file, text));\n Object.entries({ [CORE]: coreDir(import.meta.dirname), ...packages }).forEach(([name, from]) => {\n const link = path.join(root, \"node_modules\", name);\n fs.mkdirSync(path.dirname(link), { recursive: true });\n fs.symlinkSync(from, link, \"dir\");\n });\n const commitAndPush = (title: string) => {\n git([\"add\", \"--all\"]);\n git([\"commit\", \"--quiet\", \"-m\", title]);\n git([\"push\", \"--quiet\", \"origin\", branch]);\n };\n commitAndPush(\"chore: start\");\n\n const cli = builtCli();\n return {\n root,\n origin,\n write,\n read: (file) => fs.readFileSync(path.join(root, file), \"utf8\"),\n git,\n commitAndPush,\n shiplane: (args) => {\n const run = spawnSync(process.execPath, [cli, ...args], {\n cwd: root,\n env,\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n return { status: run.status ?? 1, output: `${run.stdout}${run.stderr}` };\n },\n remove: () => fs.rmSync(dir, { recursive: true, force: true }),\n };\n};\n","import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n/** The public API a test config imports, resolved to source since tests run before any build. */\nexport const SOURCE_ALIASES: Record<string, string> = {\n shiplane: path.resolve(import.meta.dirname, \"../index.ts\"),\n \"shiplane/plugin\": path.resolve(import.meta.dirname, \"../plugin.ts\"),\n \"shiplane/testing\": path.resolve(import.meta.dirname, \"public.ts\"),\n};\n\nexport interface Workspace {\n root: string;\n write: (file: string, text: string) => void;\n read: (file: string) => string;\n exists: (file: string) => boolean;\n remove: () => void;\n}\n\n/** A throwaway repository on disk, one entry per file, removed by `remove()`. */\nexport const createWorkspace = (files: Record<string, string>): Workspace => {\n const root = fs.mkdtempSync(path.join(os.tmpdir(), \"release-workspace-\"));\n const write = (file: string, text: string) => {\n const target = path.join(root, file);\n fs.mkdirSync(path.dirname(target), { recursive: true });\n fs.writeFileSync(target, text);\n };\n Object.entries(files).forEach(([file, text]) => write(file, text));\n return {\n root,\n write,\n read: (file) => fs.readFileSync(path.join(root, file), \"utf8\"),\n exists: (file) => fs.existsSync(path.join(root, file)),\n remove: () => fs.rmSync(root, { recursive: true, force: true }),\n };\n};\n\nexport const packageJson = (name: string, version = \"1.0.0\", extra: object = {}) =>\n JSON.stringify({ name, version, ...extra }, null, 2);\n"],"mappings":";;;;;;;;;;;;AAUA,IAAa,iBAAb,MAA6C;CAC3C,QAA8B,EAAE;CAChC,UAAsF,EAAE;CACxF,YAA4C,EAAE;CAE9C,QAAQ,WAAmC;AACzC,OAAK,YAAY;GAAE,GAAG,KAAK;GAAW,GAAG;GAAW;AACpD,SAAO;;CAGT,OAAO,SAAiB,KAAK,UAAU;;CAGvC,KAAK,QAAgB,QAA8B;AACjD,OAAK,QAAQ,KAAK;GAAE;GAAQ;GAAQ,CAAC;AAC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AK;;AAEhC,QAAO,QAAQ,MAAM,CAAC,SAAS,CAAC,MAAM,UAAU,MAAM,MAAM,KAAK,CAAC;AAClE,QAAO;EACL;EACA;EACA,OAAO,SAAS,GAAG,aAAa,KAAK,KAAK,MAAM,KAAK,EAAE,OAAO;EAC9D,SAAS,SAAS,GAAG,WAAW,KAAK,KAAK,MAAM,KAAK,CAAC;EACtD,cAAc,GAAG,OAAO,MAAM;GAAE,WAAW;GAAM,OAAO;GAAM,CAAC;EAChE;;AAGH,MAAa,eAAe,MAAc,UAAU,SAAS,QAAgB,EAAE,KAC7E,KAAK,UAAU;CAAE;CAAM;CAAS,GAAG;CAAO,EAAE,MAAM,EAAE"}
|
|
1
|
+
{"version":3,"file":"testing.js","names":[],"sources":["../src/adapters/shell/__fakes__/shell.fake.ts","../src/adapters/terminal/__fakes__/progress.fake.ts","../src/adapters/terminal/__fakes__/terminal.fake.ts","../src/testing/releaseContext.ts","../src/testing/deliveryContract.ts","../src/adapters/server-hosting/server-hosting.contract.ts","../src/adapters/static-hosting/static-hosting.contract.ts","../src/adapters/mobile-distribution/mobile-distribution.contract.ts","../src/adapters/package-registry/package-registry.contract.ts","../src/adapters/source-control/source-control.contract.ts","../src/adapters/code-host/code-host.contract.ts","../src/adapters/ci-pipeline/ci-pipeline.contract.ts","../src/adapters/versioning/versioning.contract.ts","../src/testing/sample.ts","../src/testing/live.ts","../src/testing/plans.ts","../src/testing/consumer.ts","../src/testing/workspace.ts"],"sourcesContent":["import type { RunOptions, Shell, ShellResult } from \"../../../ports/shell.port\";\n\nexport interface ShellCall {\n command: string;\n args: string[];\n cwd?: string;\n env?: Record<string, string>;\n}\n\n/** A shell that runs nothing: it keeps every call and answers from what was seeded. */\nexport class RecordingShell implements Shell {\n readonly calls: ShellCall[] = [];\n private answers: { prefix: string; result: Partial<ShellResult>; once?: boolean }[] = [];\n private variables: Record<string, string> = {};\n\n seedEnv(variables: Record<string, string>) {\n this.variables = { ...this.variables, ...variables };\n return this;\n }\n\n env = (name: string) => this.variables[name];\n\n /** Answers every call whose `command args` line starts with `prefix`. */\n seed(prefix: string, result: Partial<ShellResult>) {\n this.answers.push({ prefix, result });\n return this;\n }\n\n /** Answers the next call starting with `prefix` only, ahead of what `seed` answers. */\n seedOnce(prefix: string, result: Partial<ShellResult>) {\n this.answers.unshift({ prefix, result, once: true });\n return this;\n }\n\n private answer(command: string, args: readonly string[], options: RunOptions): ShellResult {\n this.calls.push({ command, args: [...args], cwd: options.cwd, env: options.env });\n const line = [command, ...args].join(\" \");\n const found = this.answers.find(({ prefix }) => line.startsWith(prefix));\n if (found?.once) this.answers.splice(this.answers.indexOf(found), 1);\n return { status: 0, stdout: \"\", stderr: \"\", ...found?.result };\n }\n\n capture = (command: string, args: readonly string[], options: RunOptions = {}) =>\n Promise.resolve(this.answer(command, args, options));\n\n attach = (command: string, args: readonly string[], options: RunOptions = {}) =>\n Promise.resolve(this.answer(command, args, options).status);\n}\n","import type { Mood } from \"../../../domain/display\";\nimport type { Output, Progress, StepPlace } from \"../../../ports/terminal.port\";\n\nexport interface ProgressEvent {\n kind: \"stage\" | \"during\" | \"say\";\n text: string;\n mood?: Mood;\n step?: StepPlace;\n}\n\n/** Progress kept as events; what it says also goes to the output, as a terminal would print it. */\nexport class RecordingProgress implements Progress {\n readonly events: ProgressEvent[] = [];\n\n constructor(private readonly output: Output) {}\n\n stage = (stages: readonly string[], index: number) => {\n this.events.push({\n kind: \"stage\",\n text: stages[index] ?? \"\",\n step: { index, total: stages.length },\n });\n };\n\n during = <T>(label: string, mood: Mood, work: () => Promise<T>, step?: StepPlace) => {\n this.events.push({ kind: \"during\", mood, text: label, ...(step ? { step } : {}) });\n return work();\n };\n\n say = (mood: Mood, text: string) => {\n this.events.push({ kind: \"say\", mood, text });\n this.output.line(text);\n };\n}\n","import type { Choice, Clock, Output, Prompter } from \"../../../ports/terminal.port\";\n\n/** Everything the CLI printed, in order, without colours. */\nexport class MemoryOutput implements Output {\n readonly lines: string[] = [];\n\n line = (text = \"\") => {\n // eslint-disable-next-line no-control-regex\n this.lines.push(text.replace(/\\u001B\\[[0-9;]*m/g, \"\"));\n };\n\n get text() {\n return this.lines.join(\"\\n\");\n }\n}\n\ntype Answer = boolean | string | string[] | null;\n\n/** A person who answers from a script, in order; every question asked is kept. */\nexport class ScriptedPrompter implements Prompter {\n readonly asked: string[] = [];\n /** The answer each choice question offered first, by question. */\n readonly initials: Record<string, unknown> = {};\n /** The choices each select question offered, by question. */\n readonly choices: Record<string, Choice<string>[]> = {};\n private answers: Answer[] = [];\n\n constructor(readonly interactive = true) {}\n\n answer(...answers: Answer[]) {\n this.answers.push(...answers);\n return this;\n }\n\n private next(question: string): Answer {\n this.asked.push(question);\n if (this.answers.length === 0) throw new Error(`Unexpected question: ${question}`);\n return this.answers.shift() ?? null;\n }\n\n confirm = (question: string, initial = false) => {\n this.initials[question] = initial;\n return Promise.resolve(this.next(question) === true);\n };\n\n typed = (question: string, word: string) => Promise.resolve(this.next(question) === word);\n\n select = <Value extends string>(message: string, choices: Choice<Value>[], initial?: Value) => {\n this.initials[message] = initial;\n this.choices[message] = choices;\n return Promise.resolve(this.next(message) as Value | null);\n };\n\n multiselect = <Value extends string>(message: string, _choices: Choice<Value>[]) =>\n Promise.resolve(this.next(message) as Value[] | null);\n\n text = (message: string) => Promise.resolve(this.next(message) as string | null);\n\n /** No key is ever pressed: every wait times out, unless keys were queued with `press`. */\n private keys: string[] = [];\n\n press(...keys: string[]) {\n this.keys.push(...keys);\n return this;\n }\n\n waitForKey = () => Promise.resolve(this.keys.shift() ?? null);\n}\n\n/** A clock fixed at one moment, whose waits return at once. */\nexport class FixedClock implements Clock {\n constructor(private readonly at: Date) {}\n\n now = () => this.at;\n sleep = () => Promise.resolve();\n}\n","import type { Release } from \"../application/config/loadRelease\";\nimport type { ReleaseContext } from \"../application/context\";\nimport type { Approval } from \"../domain/releasePr\";\nimport type { ReleaseUnit } from \"../domain/unit\";\nimport type { Feature, ReleaseModule } from \"../modules/module\";\nimport { ciPipelineFake } from \"../adapters/ci-pipeline/__fakes__/ci-pipeline.fake\";\nimport { codeHostFake } from \"../adapters/code-host/__fakes__/code-host.fake\";\nimport { RecordingShell } from \"../adapters/shell/__fakes__/shell.fake\";\nimport { sourceControlFake } from \"../adapters/source-control/__fakes__/source-control.fake\";\nimport { RecordingProgress } from \"../adapters/terminal/__fakes__/progress.fake\";\nimport {\n FixedClock,\n MemoryOutput,\n ScriptedPrompter,\n} from \"../adapters/terminal/__fakes__/terminal.fake\";\nimport { versioningFake } from \"../adapters/versioning/__fakes__/versioning.fake\";\nimport { releaseFlow } from \"../application/releaseFlow\";\nimport { DEFAULT_TAG_FORMAT } from \"../domain/tags\";\n\nexport const testUnit = (name: string, overrides: Partial<ReleaseUnit> = {}): ReleaseUnit => ({\n name,\n dir: `apps/${name}`,\n file: `apps/${name}/shiplane.unit.yml`,\n packageName: `@acme/${name}`,\n version: \"0.1.0\",\n module: \"web-app\",\n options: {},\n after: [],\n ...overrides,\n});\n\n/** The flow's Fakes, as adapters a config would hold. */\ninterface FlowFakes {\n sourceControl: ReturnType<typeof sourceControlFake>;\n codeHost: ReturnType<typeof codeHostFake>;\n ciPipeline: ReturnType<typeof ciPipelineFake>;\n versioning: ReturnType<typeof versioningFake>;\n}\n\n/**\n * A release over a Fake of every port the flow runs on, answered by a scripted person. The apps are\n * in release order as given: the first is the Latest release.\n */\nexport const testContext = ({\n units,\n modules = [],\n features = [],\n yes = false,\n interactive = true,\n root = \"/repo\",\n tagFormat = DEFAULT_TAG_FORMAT,\n approval,\n}: {\n units: ReleaseUnit[];\n modules?: ReleaseModule[];\n /** The features, or how to make them from the flow's Fakes they share. */\n features?: Feature[] | ((flow: FlowFakes) => Feature[]);\n yes?: boolean;\n interactive?: boolean;\n root?: string;\n tagFormat?: string;\n /** Whether someone else approves the release PR; the config default when absent. */\n approval?: Approval;\n}) => {\n const sourceControl = sourceControlFake();\n const codeHost = codeHostFake();\n const ciPipeline = ciPipelineFake();\n const versioning = versioningFake();\n const prompter = new ScriptedPrompter(interactive);\n const output = new MemoryOutput();\n const progress = new RecordingProgress(output);\n const shell = new RecordingShell();\n const fakes = { sourceControl, codeHost, ciPipeline, versioning };\n const flow = releaseFlow({ ...fakes, approval });\n const release: Release = {\n root,\n flow,\n modules,\n features: typeof features === \"function\" ? features(fakes) : features,\n units,\n problems: [],\n tagFormat,\n };\n const context: ReleaseContext = {\n release,\n load: () => Promise.resolve(release),\n services: {\n sourceControl: sourceControl.fake,\n codeHost: codeHost.fake,\n ciPipeline: ciPipeline.fake,\n versioning: versioning.fake,\n },\n open: (adapter) => adapter.create({ root, shell }),\n prompter,\n output,\n progress,\n clock: new FixedClock(new Date(\"2026-10-12T09:00:00Z\")),\n shell,\n options: { yes, ci: false },\n };\n return {\n context,\n flow: fakes,\n source: sourceControl.fake,\n host: codeHost.fake,\n ci: ciPipeline.fake,\n versioning: versioning.fake,\n prompter,\n output,\n progress,\n shell,\n };\n};\n\nexport const changesetText = (packages: Record<string, string>, summary: string) =>\n `---\\n${Object.entries(packages)\n .map(([name, type]) => `\"${name}\": ${type}`)\n .join(\"\\n\")}\\n---\\n\\n${summary}\\n`;\n","import { describe, expect, it } from \"vitest\";\n\nimport type { Environment } from \"../domain/environment\";\nimport type { DeliveryAdapter } from \"../ports/adapter.port\";\nimport type { Delivery, FolderView } from \"../ports/delivery.port\";\nimport { RecordingShell } from \"../adapters/shell/__fakes__/shell.fake\";\nimport { optionsFor } from \"../application/config/optionsFor\";\nimport { ENVIRONMENTS } from \"../domain/environment\";\nimport { testUnit } from \"./releaseContext\";\n\n/** One adapter of a port, with settings an app's unit file could hold for it. */\nexport interface ContractCase<Port extends Delivery & { capability: string }> {\n adapter: DeliveryAdapter<Port>;\n settings: Record<string, unknown>;\n}\n\nconst EMPTY_FOLDER: FolderView = {\n dir: \"apps/empty\",\n name: \"empty\",\n files: [],\n has: () => false,\n read: () => null,\n};\n\n/** What every adapter of a delivery port must do, whatever its provider; `more` adds the port's own. */\nexport const deliveryContract = <Port extends Delivery & { capability: string }>(\n kind: string,\n cases: ContractCase<Port>[],\n more: (adapter: DeliveryAdapter<Port>, port: Port) => void = () => undefined,\n) =>\n describe.each(cases.map((entry) => [entry.adapter.name, entry] as const))(\n `%s, as ${kind}`,\n (_name, { adapter, settings }) => {\n const port = adapter.create({ root: \"/repo\", shell: new RecordingShell() });\n const unit = testUnit(\"app\", { module: \"app\", options: settings });\n const inputFor = (environment: Environment) => ({\n unit,\n tag: \"app@0.1.0\",\n environment,\n options: optionsFor({ ...unit, options: adapter.settings.parse(settings) }, environment, [\n unit,\n ]),\n commit: \"abc1234\",\n });\n\n it(\"given an app's settings, when its unit file is read, then the adapter's schema takes them\", () => {\n expect(adapter.settings.safeParse(settings).success).toBe(true);\n });\n\n it(\"given a tag on each environment, when it says where the tag lands, then a person can read it\", () => {\n ENVIRONMENTS.forEach((environment) =>\n expect(port.describe(inputFor(environment)).trim()).not.toBe(\"\"),\n );\n });\n\n it(\"given a tag on each environment, when its jobs are built, then each says what it does and what it runs\", () => {\n ENVIRONMENTS.forEach((environment) =>\n port.jobs(inputFor(environment)).forEach((job) => {\n expect(job.label.trim()).not.toBe(\"\");\n expect(job.local.length).toBeGreaterThan(0);\n job.local.forEach(({ command }) => expect(command.trim()).not.toBe(\"\"));\n }),\n );\n });\n\n it(\"given a folder with nothing in it, when init looks at it, then the adapter recognises nothing\", () => {\n expect(adapter.detect?.(EMPTY_FOLDER) ?? null).toBeNull();\n });\n\n it(\"given an app it ships, when doctor asks what it needs, then each need has a name and a check\", () => {\n (adapter.requirements?.(unit) ?? []).forEach(({ label, check }) => {\n expect(label.trim()).not.toBe(\"\");\n expect(check.command.trim()).not.toBe(\"\");\n });\n });\n\n more(adapter, port);\n },\n );\n","import { expect, it } from \"vitest\";\n\nimport type { ServerHostingPort } from \"../../ports/server-hosting.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every server host does, whatever its provider. */\nexport const serverHostingContract = (cases: ContractCase<ServerHostingPort>[]) =>\n deliveryContract(\"server hosting\", cases, (_adapter, port) => {\n it(\"given a server host, when its kind is read, then it hosts servers\", () => {\n expect(port.capability).toBe(\"server-hosting\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { StaticHostingPort } from \"../../ports/static-hosting.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every static host does, whatever its provider. */\nexport const staticHostingContract = (cases: ContractCase<StaticHostingPort>[]) =>\n deliveryContract(\"static hosting\", cases, (_adapter, port) => {\n it(\"given a static host, when its kind is read, then it hosts static sites\", () => {\n expect(port.capability).toBe(\"static-hosting\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { MobileDistributionPort } from \"../../ports/mobile-distribution.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every mobile distribution does, whatever its provider. */\nexport const mobileDistributionContract = (cases: ContractCase<MobileDistributionPort>[]) =>\n deliveryContract(\"mobile distribution\", cases, (adapter, port) => {\n it(\"given a mobile distribution, when status asks who decides, then its platform is named\", () => {\n expect(port.capability).toBe(\"mobile-distribution\");\n expect(adapter.decidedBy?.platform.trim() ?? \"\").not.toBe(\"\");\n });\n });\n","import { expect, it } from \"vitest\";\n\nimport type { PackageRegistryPort } from \"../../ports/package-registry.port\";\nimport type { ContractCase } from \"../../testing/deliveryContract\";\nimport { deliveryContract } from \"../../testing/deliveryContract\";\n\n/** What every package registry does, whatever its provider. */\nexport const packageRegistryContract = (cases: ContractCase<PackageRegistryPort>[]) =>\n deliveryContract(\"a package registry\", cases, (_adapter, port) => {\n it(\"given a package registry, when its kind is read, then it publishes packages\", () => {\n expect(port.capability).toBe(\"package-registry\");\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { SourceControlPort } from \"../../ports/source-control.port\";\n\n/** A repository on main with one commit, and the ways a test arranges it beyond the port. */\nexport interface SourceControlSubject {\n port: SourceControlPort;\n /** The commit main is on. */\n head: () => Promise<string>;\n /** Writes a file the repository does not track yet. */\n change: (file: string, text: string) => Promise<void>;\n}\n\n/** What every source control does, whatever its provider. */\nexport const sourceControlContract = (name: string, subject: () => Promise<SourceControlSubject>) =>\n describe(`${name}, as source control`, () => {\n it(\"given a fresh checkout, when its position is read, then it is on main with nothing to commit\", async () => {\n const { port } = await subject();\n\n expect((await port.position()).branch).toBe(\"main\");\n expect(await port.isClean()).toBe(true);\n });\n\n it(\"given a commit tagged, when the tags are read, then the tag is there and names that commit\", async () => {\n const { port, head } = await subject();\n const sha = await head();\n\n await port.tag(\"app@1.0.0\", sha, \"app 1.0.0\");\n\n expect(await port.tags()).toContain(\"app@1.0.0\");\n expect(await port.tagCommit(\"app@1.0.0\")).toBe(sha);\n });\n\n it(\"given tags in every format a config names, when the tags are read, then each one is there\", async () => {\n const { port, head } = await subject();\n const sha = await head();\n for (const tag of [\"arnaud-zg--v0.2.1\", \"v1.0.0\", \"app@1.0.0\"]) {\n await port.tag(tag, sha, tag);\n }\n\n expect([...(await port.tags())].sort()).toEqual([\"app@1.0.0\", \"arnaud-zg--v0.2.1\", \"v1.0.0\"]);\n });\n\n it(\"given a tag deleted, when the tags are read, then it is gone and names no commit\", async () => {\n const { port, head } = await subject();\n await port.tag(\"app@1.0.0\", await head(), \"app 1.0.0\");\n\n await port.deleteTag(\"app@1.0.0\");\n\n expect(await port.tags()).not.toContain(\"app@1.0.0\");\n expect(await port.tagCommit(\"app@1.0.0\")).toBeNull();\n });\n\n it(\"given a branch created, when the position is read, then it is on it, and switching back returns to main\", async () => {\n const { port } = await subject();\n\n await port.createBranch(\"release/next\");\n const onBranch = (await port.position()).branch;\n await port.switchTo(\"main\");\n\n expect(onBranch).toBe(\"release/next\");\n expect((await port.position()).branch).toBe(\"main\");\n });\n\n it(\"given a new file committed, when the changes are read, then it is no longer among them\", async () => {\n const { port, change } = await subject();\n await change(\"notes.md\", \"notes\\n\");\n const before = await port.changedFiles();\n\n await port.commit([\"notes.md\"], \"docs: notes\");\n\n expect(before).toContain(\"notes.md\");\n expect(await port.changedFiles()).not.toContain(\"notes.md\");\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { IssueRef } from \"../../domain/issues\";\nimport type { CodeHostPort } from \"../../ports/code-host.port\";\n\n/** A repository on a code host, and the ways a test arranges it beyond the port. */\nexport interface CodeHostSubject {\n port: CodeHostPort;\n /** A branch the host can open a pull request from, pushed with one commit on it. */\n branch: (name: string) => Promise<string>;\n /** A tag the host can publish release notes for. */\n tag: () => Promise<string>;\n /** An issue or pull request comments can go on. */\n issue: IssueRef;\n}\n\n/** What every code host does, whatever its provider. */\nexport const codeHostContract = (name: string, subject: () => Promise<CodeHostSubject>) =>\n describe(`${name}, as a code host`, () => {\n it(\"given a pull request opened, when the open ones are read, then it is there and open\", async () => {\n const { port, branch } = await subject();\n const head = await branch(\"release/contract-open\");\n\n const pr = await port.createPr({\n base: \"main\",\n head,\n title: \"chore: contract\",\n body: \"Opened by the contract suite.\",\n label: \"release\",\n });\n\n expect(pr.head).toEqual(expect.any(String));\n expect(await port.openPrsFrom(\"release/contract-open\")).toContainEqual(pr);\n expect(await port.prState(pr)).toBe(\"OPEN\");\n });\n\n it(\"given a pull request closed, when the open ones are read, then it is gone and closed\", async () => {\n const { port, branch } = await subject();\n const head = await branch(\"release/contract-close\");\n const pr = await port.createPr({\n base: \"main\",\n head,\n title: \"chore: contract\",\n body: \"Opened by the contract suite.\",\n label: \"release\",\n });\n\n await port.closePr(pr, \"Closed by the contract suite.\");\n\n expect(await port.openPrsFrom(\"release/contract-close\")).not.toContainEqual(pr);\n expect(await port.prState(pr)).toBe(\"CLOSED\");\n });\n\n it(\"given release notes published for a tag, when the released tags are read, then it is among them\", async () => {\n const { port, tag } = await subject();\n const name = await tag();\n\n await port.createRelease(name, \"Published by the contract suite.\", false);\n\n expect(await port.releasedTags()).toContain(name);\n });\n\n it(\"given a deploy recorded, when the deploys are read, then it is there and done\", async () => {\n const { port, tag } = await subject();\n const name = await tag();\n\n await port.recordDeployment(name, \"preview\");\n\n expect(await port.deployments()).toContainEqual({\n title: `Deploy ${name} to preview`,\n state: \"done\",\n });\n });\n\n it(\"given a comment posted, when the comments are read, then it is among them\", async () => {\n const { port, issue } = await subject();\n const body = `Posted by the contract suite at ${new Date().toISOString()}.`;\n\n await port.comment(issue, body);\n\n expect((await port.comments([issue])).flat()).toContain(body);\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { CiPipelinePort } from \"../../ports/ci-pipeline.port\";\n\n/** A CI pipeline, and the ways a test reads it beyond the port. */\nexport interface CiPipelineSubject {\n port: CiPipelinePort;\n /** A workflow that exists and has never run. */\n idle: string;\n}\n\n/** What every CI pipeline does, whatever its provider. */\nexport const ciPipelineContract = (name: string, subject: () => Promise<CiPipelineSubject>) =>\n describe(`${name}, as a CI pipeline`, () => {\n it(\"given a workflow that never ran, when its runs are read, then there are none\", async () => {\n const { port, idle } = await subject();\n\n expect(await port.workflowRuns(idle)).toEqual([]);\n });\n\n it(\"given a workflow that never succeeded, when its billed minutes are read, then none are measured\", async () => {\n const { port, idle } = await subject();\n\n expect(await port.measuredMinutes(idle)).toEqual([]);\n });\n\n it(\"given this month's budget, when it is read, then what is left is never more than included\", async () => {\n const { port } = await subject();\n\n const minutes = await port.minutes();\n\n if (minutes) expect(minutes.left).toBeLessThanOrEqual(minutes.included);\n else expect(minutes).toBeNull();\n });\n });\n","import { describe, expect, it } from \"vitest\";\n\nimport type { VersioningPort } from \"../../ports/versioning.port\";\n\n/** A workspace with one package, and the ways a test arranges it beyond the port. */\nexport interface VersioningSubject {\n port: VersioningPort;\n /** The package the workspace holds, and its folder. */\n workspace: { name: string; folder: string };\n}\n\n/** What every versioning does, whatever its provider. */\nexport const versioningContract = (name: string, subject: () => Promise<VersioningSubject>) =>\n describe(`${name}, as versioning`, () => {\n it(\"given a change written, when the pending changes are read, then it is there naming its package and bump\", async () => {\n const { port, workspace } = await subject();\n\n await port.write({\n id: \"contract-change\",\n releases: [{ name: workspace.name, type: \"minor\" }],\n summary: \"Written by the contract suite.\",\n });\n\n const pending = await port.pending();\n expect(pending.map(({ id }) => id)).toContain(\"contract-change\");\n expect(pending.find(({ id }) => id === \"contract-change\")?.text).toContain(\n `\"${workspace.name}\": minor`,\n );\n });\n\n it(\"given a person with nothing queued, when they are told what to do, then the port says it\", async () => {\n const { port } = await subject();\n\n expect(port.nextChange).not.toBe(\"\");\n });\n\n it(\"given a workspace package, when the folders are read, then it is found in its folder\", async () => {\n const { port, workspace } = await subject();\n\n expect(await port.folders()).toMatchObject({ [workspace.name]: workspace.folder });\n });\n\n it(\"given a change and a folder, when their files are named, then they sit where a person looks\", async () => {\n const { port, workspace } = await subject();\n\n expect(port.changesetFile(\"contract-change\")).toBe(\".changeset/contract-change.md\");\n expect(port.changelogFile(workspace.folder)).toBe(`${workspace.folder}/CHANGELOG.md`);\n });\n });\n","import type { UnitRef } from \"../domain/changes\";\nimport type { DecidedBy } from \"../domain/scope\";\n\n/** This repository's four shipping units, as the rule tests were written against them. */\nexport const SAMPLE_UNITS: UnitRef[] = [\"expo\", \"api\", \"admin\", \"landing\"].map((name) => ({\n name,\n packageName: `@acme/${name}`,\n}));\n\nexport const SAMPLE_VERSION_FILES = new Set([\n \"apps/expo/app-version.json\",\n \"apps/api/public/app-version.preview.json\",\n \"apps/api/public/app-version.production.json\",\n]);\n\n// Billed minutes per deploy with no successful run to measure: the api validates before deploying.\nexport const SAMPLE_TYPICAL_MINUTES: Record<string, number> = {\n api: 13,\n admin: 5,\n landing: 4,\n expo: 8,\n};\n\nexport const EAS_DECIDES: DecidedBy = {\n platform: \"EAS\",\n choice: \"build or update\",\n check: \"shiplane status\",\n};\n","import { execFileSync } from \"node:child_process\";\nimport { z } from \"zod\";\n\nimport { systemShell } from \"../adapters/shell/system-shell.adapter\";\n\n/**\n * Contract suites against hosted services run only with RELEASE_CONTRACT_LIVE=1, on a sandbox\n * repository checked out at RELEASE_CONTRACT_REPO: they open pull requests, publish releases and\n * dispatch workflows there.\n */\nexport const LIVE = systemShell.env(\"RELEASE_CONTRACT_LIVE\") === \"1\";\n\n/** The sandbox checkout, refused when unset so a live run never touches this repository. */\nexport const sandbox = () =>\n z\n .string({ message: \"RELEASE_CONTRACT_REPO names a sandbox checkout for live contracts\" })\n .min(1)\n .parse(systemShell.env(\"RELEASE_CONTRACT_REPO\"));\n\n/** Runs git in the sandbox and returns what it printed. */\nexport const inSandbox = (args: string[]) =>\n execFileSync(\"git\", args, { cwd: sandbox(), encoding: \"utf8\" }).trim();\n","import type { BumpLevel, PlannedChangeset, StatusPlan } from \"../domain/changes\";\nimport { nextVersion } from \"../domain/versions\";\n\n/**\n * What `changeset status` answers for these pending changesets, plus the ones a release adds, minus\n * the lines it holds back: every named package moves once, by its biggest bump, up to `ceiling`.\n */\nexport const planFrom =\n (pending: PlannedChangeset[], versions: Record<string, string>) =>\n (added: PlannedChangeset[], held: PlannedChangeset[], ceiling?: BumpLevel): StatusPlan => {\n const heldLines = new Set(\n held.flatMap(({ id, releases }) => releases.map(({ name }) => `${id}:${name}`)),\n );\n const changesets = [...pending, ...added]\n .map((changeset) => ({\n ...changeset,\n releases: changeset.releases.filter(\n ({ name }) => !heldLines.has(`${changeset.id}:${name}`),\n ),\n }))\n .filter(({ releases }) => releases.length > 0);\n const order: BumpLevel[] = [\"major\", \"minor\", \"patch\"];\n const capped = ceiling ? order.slice(order.indexOf(ceiling)) : order;\n const names = [\n ...new Set(changesets.flatMap(({ releases }) => releases.map(({ name }) => name))),\n ];\n return {\n changesets,\n releases: names.map((name) => {\n const lines = changesets.filter(({ releases }) =>\n releases.some((line) => line.name === name),\n );\n const named =\n order.find((candidate) =>\n lines.some(({ releases }) =>\n releases.some((line) => line.name === name && line.type === candidate),\n ),\n ) ?? \"patch\";\n const type = capped.includes(named) ? named : (ceiling ?? named);\n const oldVersion = versions[name] ?? \"0.1.0\";\n return {\n name,\n type,\n oldVersion,\n newVersion: nextVersion(oldVersion, type),\n changesets: lines.map(({ id }) => id),\n };\n }),\n };\n };\n","import { execFileSync, spawnSync } from \"node:child_process\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { systemShell } from \"../adapters/shell/system-shell.adapter\";\n\n/** What the built CLI printed and the code it exited with. */\nexport interface CliRun {\n status: number;\n output: string;\n}\n\nexport interface ConsumerRepository {\n root: string;\n /** The bare repository the checkout pushes to, standing in for GitHub. */\n origin: string;\n write: (file: string, text: string) => void;\n read: (file: string) => string;\n /** Runs git in the checkout, or in the bare origin with `{ in: \"origin\" }`. */\n git: (args: string[], where?: { in: \"origin\" }) => string;\n /** Commits every file as it stands and pushes the branch to the origin. */\n commitAndPush: (title: string) => void;\n /** Runs the built `shiplane` CLI in the checkout, as a person types it. */\n shiplane: (args: string[]) => CliRun;\n remove: () => void;\n}\n\nconst CORE = \"shiplane\";\n\nconst coreDir = (from: string): string => {\n const manifest = path.join(from, \"package.json\");\n if (fs.existsSync(manifest)) {\n const { name } = JSON.parse(fs.readFileSync(manifest, \"utf8\")) as { name?: string };\n if (name === CORE) return from;\n }\n const parent = path.dirname(from);\n if (parent === from) throw new Error(`${CORE} not found above ${import.meta.dirname}`);\n return coreDir(parent);\n};\n\n/** The built CLI, as `pnpm add shiplane` installs it. */\nexport const builtCli = (): string => {\n const cli = path.join(coreDir(import.meta.dirname), \"dist\", \"cli.js\");\n if (!fs.existsSync(cli)) {\n throw new Error(`shiplane is not built: run pnpm turbo run build --filter=${CORE}`);\n }\n return cli;\n};\n\n// No global git config, signing key, token or CI marker leaks in: a run sees only this repository.\nconst LEAKS = new Set([\"GITHUB_ACTIONS\", \"CI\", \"GITHUB_TOKEN\", \"GH_TOKEN\"]);\n\nconst hermeticEnv = (home: string, bin: string): NodeJS.ProcessEnv => ({\n ...Object.fromEntries(Object.entries(process.env).filter(([name]) => !LEAKS.has(name))),\n PATH: [bin, systemShell.env(\"PATH\") ?? \"\"].join(path.delimiter),\n HOME: home,\n GIT_CONFIG_GLOBAL: path.join(home, \".gitconfig\"),\n GIT_CONFIG_NOSYSTEM: \"1\",\n NO_COLOR: \"1\",\n // A fixed date makes each commit's hash depend on its files only, so docs can quote a run.\n GIT_AUTHOR_DATE: \"2026-01-01T00:00:00Z\",\n GIT_COMMITTER_DATE: \"2026-01-01T00:00:00Z\",\n});\n\n// The tools that reach a platform answer offline, so a run that would call one fails at once.\nconst OFFLINE = [\"gh\", \"npm\", \"flyctl\"];\n\nconst offlineTools = (bin: string) => {\n fs.mkdirSync(bin);\n OFFLINE.forEach((tool) => {\n const file = path.join(bin, tool);\n fs.writeFileSync(file, `#!/bin/sh\\necho \"${tool}: offline in this repository\" >&2\\nexit 1\\n`);\n fs.chmodSync(file, 0o755);\n });\n};\n\n/**\n * A repository as a consumer has it: its files, the packages it installed linked in its\n * node_modules, one commit pushed to a local bare origin. gh, npm and flyctl answer offline.\n */\nexport const consumerRepository = ({\n files,\n packages = {},\n branch = \"main\",\n}: {\n files: Record<string, string>;\n /** The branch releases start from, created first and pushed. */\n branch?: string;\n /** Package name to the folder it installs from, such as a plugin's workspace folder. */\n packages?: Record<string, string>;\n}): ConsumerRepository => {\n const dir = fs.mkdtempSync(path.join(os.tmpdir(), \"shiplane-consumer-\"));\n const root = path.join(dir, \"checkout\");\n const origin = path.join(dir, \"origin.git\");\n const home = path.join(dir, \"home\");\n fs.mkdirSync(home);\n fs.writeFileSync(\n path.join(home, \".gitconfig\"),\n \"[user]\\n\\tname = Shiplane Consumer\\n\\temail = consumer@example.com\\n\" +\n \"[commit]\\n\\tgpgsign = false\\n[tag]\\n\\tgpgsign = false\\n[core]\\n\\thooksPath = /dev/null\\n\",\n );\n const bin = path.join(dir, \"bin\");\n offlineTools(bin);\n const env = hermeticEnv(home, bin);\n const git = (args: string[], where?: { in: \"origin\" }) =>\n execFileSync(\"git\", args, {\n cwd: where ? origin : root,\n env,\n stdio: \"pipe\",\n encoding: \"utf8\",\n }).trim();\n const write = (file: string, text: string) => {\n const target = path.join(root, file);\n fs.mkdirSync(path.dirname(target), { recursive: true });\n fs.writeFileSync(target, text);\n };\n\n fs.mkdirSync(root);\n execFileSync(\"git\", [\"init\", \"--quiet\", \"--bare\", `--initial-branch=${branch}`, origin], { env });\n git([\"init\", \"--quiet\", `--initial-branch=${branch}`]);\n git([\"remote\", \"add\", \"origin\", origin]);\n write(\".gitignore\", \"node_modules\\n\");\n Object.entries(files).forEach(([file, text]) => write(file, text));\n Object.entries({ [CORE]: coreDir(import.meta.dirname), ...packages }).forEach(([name, from]) => {\n const link = path.join(root, \"node_modules\", name);\n fs.mkdirSync(path.dirname(link), { recursive: true });\n fs.symlinkSync(from, link, \"dir\");\n });\n const commitAndPush = (title: string) => {\n git([\"add\", \"--all\"]);\n git([\"commit\", \"--quiet\", \"-m\", title]);\n git([\"push\", \"--quiet\", \"origin\", branch]);\n };\n commitAndPush(\"chore: start\");\n\n const cli = builtCli();\n return {\n root,\n origin,\n write,\n read: (file) => fs.readFileSync(path.join(root, file), \"utf8\"),\n git,\n commitAndPush,\n shiplane: (args) => {\n const run = spawnSync(process.execPath, [cli, ...args], {\n cwd: root,\n env,\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n return { status: run.status ?? 1, output: `${run.stdout}${run.stderr}` };\n },\n remove: () => fs.rmSync(dir, { recursive: true, force: true }),\n };\n};\n","import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n/** The public API a test config imports, resolved to source since tests run before any build. */\nexport const SOURCE_ALIASES: Record<string, string> = {\n shiplane: path.resolve(import.meta.dirname, \"../index.ts\"),\n \"shiplane/plugin\": path.resolve(import.meta.dirname, \"../plugin.ts\"),\n \"shiplane/testing\": path.resolve(import.meta.dirname, \"public.ts\"),\n};\n\nexport interface Workspace {\n root: string;\n write: (file: string, text: string) => void;\n read: (file: string) => string;\n exists: (file: string) => boolean;\n remove: () => void;\n}\n\n/** A throwaway repository on disk, one entry per file, removed by `remove()`. */\nexport const createWorkspace = (files: Record<string, string>): Workspace => {\n const root = fs.mkdtempSync(path.join(os.tmpdir(), \"release-workspace-\"));\n const write = (file: string, text: string) => {\n const target = path.join(root, file);\n fs.mkdirSync(path.dirname(target), { recursive: true });\n fs.writeFileSync(target, text);\n };\n Object.entries(files).forEach(([file, text]) => write(file, text));\n return {\n root,\n write,\n read: (file) => fs.readFileSync(path.join(root, file), \"utf8\"),\n exists: (file) => fs.existsSync(path.join(root, file)),\n remove: () => fs.rmSync(root, { recursive: true, force: true }),\n };\n};\n\nexport const packageJson = (name: string, version = \"1.0.0\", extra: object = {}) =>\n JSON.stringify({ name, version, ...extra }, null, 2);\n"],"mappings":";;;;;;;;;;;;AAUA,IAAa,iBAAb,MAA6C;CAC3C,QAA8B,EAAE;CAChC,UAAsF,EAAE;CACxF,YAA4C,EAAE;CAE9C,QAAQ,WAAmC;AACzC,OAAK,YAAY;GAAE,GAAG,KAAK;GAAW,GAAG;GAAW;AACpD,SAAO;;CAGT,OAAO,SAAiB,KAAK,UAAU;;CAGvC,KAAK,QAAgB,QAA8B;AACjD,OAAK,QAAQ,KAAK;GAAE;GAAQ;GAAQ,CAAC;AACrC,SAAO;;;CAIT,SAAS,QAAgB,QAA8B;AACrD,OAAK,QAAQ,QAAQ;GAAE;GAAQ;GAAQ,MAAM;GAAM,CAAC;AACpD,SAAO;;CAGT,OAAe,SAAiB,MAAyB,SAAkC;AACzF,OAAK,MAAM,KAAK;GAAE;GAAS,MAAM,CAAC,GAAG,KAAK;GAAE,KAAK,QAAQ;GAAK,KAAK,QAAQ;GAAK,CAAC;EACjF,MAAM,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,IAAI;EACzC,MAAM,QAAQ,KAAK,QAAQ,MAAM,EAAE,aAAa,KAAK,WAAW,OAAO,CAAC;AACxE,MAAI,OAAO,KAAM,MAAK,QAAQ,OAAO,KAAK,QAAQ,QAAQ,MAAM,EAAE,EA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0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "The shiplane CLI: detects what changed, versions it and triggers each app's deploy through the plugins its config composes.",
|
|
5
5
|
"homepage": "https://github.com/arnaud-zg/packages/tree/main/packages/shiplane#readme",
|
|
6
6
|
"bugs": {
|