shiplane 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{budget-C8_aayQk.js → budget-BqtW-Ekk.js} +53 -26
  2. package/dist/budget-BqtW-Ekk.js.map +1 -0
  3. package/dist/cli.js +81 -36
  4. package/dist/cli.js.map +1 -1
  5. package/dist/display-IqkJ6uCw.js +96 -0
  6. package/dist/display-IqkJ6uCw.js.map +1 -0
  7. package/dist/index-D4qsXAis.d.ts +214 -0
  8. package/dist/index.d.ts +3 -2
  9. package/dist/index.js +4 -3
  10. package/dist/{issues-C5fKq1Jv.js → issues-TcWtMTv5.js} +1 -1
  11. package/dist/{issues-C5fKq1Jv.js.map → issues-TcWtMTv5.js.map} +1 -1
  12. package/dist/memory.d.ts +2 -0
  13. package/dist/memory.js +2 -0
  14. package/dist/package-registry.fake-CC37ptzf.d.ts +444 -0
  15. package/dist/package-registry.fake-Ciqc4ujx.js +633 -0
  16. package/dist/package-registry.fake-Ciqc4ujx.js.map +1 -0
  17. package/dist/perEnv-B7AiYnW_.js +11 -0
  18. package/dist/perEnv-B7AiYnW_.js.map +1 -0
  19. package/dist/plugin.d.ts +13 -5
  20. package/dist/plugin.js +7 -6
  21. package/dist/{readStatus-D5YVR5ZC.js → readStatus-YTZXH_Hh.js} +1387 -519
  22. package/dist/readStatus-YTZXH_Hh.js.map +1 -0
  23. package/dist/{shell-server-hosting.adapter-Bgl6-IWw.js → shell-server-hosting.adapter-DobfDqFm.js} +2 -2
  24. package/dist/{shell-server-hosting.adapter-Bgl6-IWw.js.map → shell-server-hosting.adapter-DobfDqFm.js.map} +1 -1
  25. package/dist/{src-Dlr2Sgs8.js → src-CGASfBy2.js} +3 -3
  26. package/dist/{src-Dlr2Sgs8.js.map → src-CGASfBy2.js.map} +1 -1
  27. package/dist/{index-QneBUiDD.d.ts → static-hosting.port-mknLsxwR.d.ts} +61 -244
  28. package/dist/{tags-DL74ni09.d.ts → tags-Bn3JrgPI.d.ts} +1 -1
  29. package/dist/testing.d.ts +61 -468
  30. package/dist/testing.js +11 -625
  31. package/dist/testing.js.map +1 -1
  32. package/dist/{web-app.module-Bw-npC4Z.js → web-app.module-6KrXIU7j.js} +4 -11
  33. package/dist/web-app.module-6KrXIU7j.js.map +1 -0
  34. package/package.json +6 -1
  35. package/dist/budget-C8_aayQk.js.map +0 -1
  36. package/dist/display-DM0xtQbT.js +0 -55
  37. package/dist/display-DM0xtQbT.js.map +0 -1
  38. package/dist/readStatus-D5YVR5ZC.js.map +0 -1
  39. package/dist/web-app.module-Bw-npC4Z.js.map +0 -1
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import { A as ServiceAdapter, C as ReleaseFlow, Ct as UnitRef, Dt as DisplayChoice, E as VersioningPort, Et as splitChangesets, F as Health, G as Output, H as VersionContribution, I as Job, J as StepPlace, K as Progress, L as JobInput, M as DecideContext, Mt as ReleaseUnit, Nt as Environment, Ot as Mood, P as Delivery, S as Open, St as StatusPlan, U as Choice, W as Clock, X as GitPosition, Y as SourceControlPort, at as Deploy, b as Feature, bt as AppBump, ct as OpenPr, dt as LinkedPr, et as RunOptions, g as MobileDistributionPort, gt as DeployPath, h as PackageRegistryPort, it as CodeHostPort, k as DeliveryAdapter, lt as ReleaseStep, m as ServerHostingPort, nt as ShellResult, ot as MergeMethod, p as StaticHostingPort, pt as ActionsMinutes, q as Prompter, rt as CiPipelinePort, st as MergeMethods, tt as Shell, ut as IssueRef, w as ReleaseModule, wt as UnreleasedApp, xt as PlannedChangeset, z as Requirement } from "./index-QneBUiDD.js";
2
- import { n as ReleaseTag } from "./tags-DL74ni09.js";
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 UnreleasedApp, c as DeliveryAdapter, ct as ReleaseUnit, et as ReleaseStep, ft as Mood, i as MobileDistributionPort, it as UnitRef, l as ServiceAdapter, lt as DisplayChoice, mt as Environment, n as ServerHostingPort, nt as PlannedChangeset, p as Delivery, r as PackageRegistryPort, rt as StatusPlan, st as splitChangesets, t as StaticHostingPort, tt as AppBump, w as Output, x as VersionContribution, z as IssueRef } from "./static-hosting.port-mknLsxwR.js";
2
+ import { b as ReleaseModule, g as Feature, v as Open, y as ReleaseFlow } from "./index-D4qsXAis.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-CC37ptzf.js";
4
+ import { n as ReleaseTag } from "./tags-Bn3JrgPI.js";
3
5
  import { z } from "zod";
4
6
  import * as _$vitest from "vitest";
5
7
 
@@ -77,438 +79,6 @@ interface VersioningSubject {
77
79
  /** What every versioning does, whatever its provider. */
78
80
  declare const versioningContract: (name: string, subject: () => Promise<VersioningSubject>) => _$vitest.SuiteCollector<object>;
79
81
  //#endregion
80
- //#region src/adapters/server-hosting/__fakes__/server-hosting.fake.d.ts
81
- /** A deploy a module asked for. */
82
- interface Asked$3 {
83
- tag: string;
84
- environment: Environment;
85
- service: string;
86
- }
87
- /** A server host held in memory: it deploys nothing, and records each deploy it was asked for. */
88
- declare class ServerHostingFake implements ServerHostingPort {
89
- readonly capability = "server-hosting";
90
- private needs;
91
- readonly received: Asked$3[];
92
- /** What doctor checks for each app it ships. */
93
- seed({
94
- requirements
95
- }: {
96
- requirements: Requirement[];
97
- }): this;
98
- describe: ({
99
- options
100
- }: JobInput<Record<string, unknown>>) => string;
101
- jobs: ({
102
- tag,
103
- environment,
104
- options
105
- }: JobInput<Record<string, unknown>>) => Job[];
106
- requirements: () => Requirement[];
107
- }
108
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
109
- declare const serverHostingFake: (fake?: ServerHostingFake) => DeliveryAdapter<ServerHostingPort> & {
110
- fake: ServerHostingFake;
111
- };
112
- //#endregion
113
- //#region src/adapters/static-hosting/__fakes__/static-hosting.fake.d.ts
114
- /** An upload a module asked for. */
115
- interface Asked$2 {
116
- tag: string;
117
- environment: Environment;
118
- site: string;
119
- }
120
- /** A static host held in memory: it uploads nothing, and records each upload it was asked for. */
121
- declare class StaticHostingFake implements StaticHostingPort {
122
- readonly capability = "static-hosting";
123
- private needs;
124
- readonly received: Asked$2[];
125
- /** What doctor checks for each app it ships. */
126
- seed({
127
- requirements
128
- }: {
129
- requirements: Requirement[];
130
- }): this;
131
- describe: ({
132
- options,
133
- environment
134
- }: JobInput<Record<string, unknown>>) => string;
135
- jobs: ({
136
- tag,
137
- environment,
138
- options
139
- }: JobInput<Record<string, unknown>>) => Job[];
140
- requirements: () => Requirement[];
141
- }
142
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
143
- declare const staticHostingFake: (fake?: StaticHostingFake) => DeliveryAdapter<StaticHostingPort> & {
144
- fake: StaticHostingFake;
145
- };
146
- //#endregion
147
- //#region src/adapters/mobile-distribution/__fakes__/mobile-distribution.fake.d.ts
148
- interface MobileState {
149
- /** The version each environment runs. */
150
- live: Partial<Record<Environment, string>>;
151
- /** How each tag does where it runs. */
152
- health: Record<string, Health>;
153
- requirements: Requirement[];
154
- }
155
- /** What a module asked of it. */
156
- interface Asked$1 {
157
- stage: "jobs" | "decide" | "health" | "inspect";
158
- tag: string;
159
- environment: Environment;
160
- }
161
- /**
162
- * A mobile platform held in memory: seed what each environment runs and how a tag does; a version
163
- * not live yet ships as an update.
164
- */
165
- declare class MobileDistributionFake implements MobileDistributionPort {
166
- readonly capability = "mobile-distribution";
167
- private state;
168
- readonly received: Asked$1[];
169
- seed(state: Partial<MobileState>): this;
170
- private ask;
171
- describe: ({
172
- options,
173
- environment
174
- }: JobInput<Record<string, unknown>>) => string;
175
- jobs: (input: JobInput<Record<string, unknown>>) => Job[];
176
- decide: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
177
- action: "ship";
178
- kind: "build" | "submit" | "publish" | "update" | "deploy";
179
- jobs: Job[];
180
- notLocal?: string;
181
- } | {
182
- action: "none";
183
- status: string;
184
- }>;
185
- health: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<Health>;
186
- inspect: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
187
- live: string | null;
188
- }>;
189
- requirements: () => Requirement[];
190
- }
191
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
192
- declare const mobileDistributionFake: (fake?: MobileDistributionFake) => DeliveryAdapter<MobileDistributionPort> & {
193
- fake: MobileDistributionFake;
194
- };
195
- //#endregion
196
- //#region src/adapters/package-registry/__fakes__/package-registry.fake.d.ts
197
- /** What a module asked of it. */
198
- interface Asked {
199
- stage: "jobs" | "decide";
200
- tag: string;
201
- environment: Environment;
202
- }
203
- /** A package registry held in memory: seed what is published, a version not there yet publishes. */
204
- declare class PackageRegistryFake implements PackageRegistryPort {
205
- readonly capability = "package-registry";
206
- /** `<package>@<version>` already published. */
207
- private published;
208
- private needs;
209
- readonly received: Asked[];
210
- seed({
211
- published,
212
- requirements
213
- }: {
214
- published?: string[];
215
- requirements?: Requirement[];
216
- }): this;
217
- describe: ({
218
- unit,
219
- options
220
- }: JobInput<Record<string, unknown>>) => string;
221
- jobs: ({
222
- unit,
223
- tag,
224
- environment,
225
- options
226
- }: JobInput<Record<string, unknown>>) => Job[];
227
- decide: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
228
- action: "ship";
229
- kind: "build" | "submit" | "publish" | "update" | "deploy";
230
- jobs: Job[];
231
- notLocal?: string;
232
- } | {
233
- action: "none";
234
- status: string;
235
- }>;
236
- live: (_context: DecideContext, {
237
- unit
238
- }: JobInput<Record<string, unknown>>) => Promise<boolean>;
239
- requirements: () => Requirement[];
240
- }
241
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
242
- declare const packageRegistryFake: (fake?: PackageRegistryFake) => DeliveryAdapter<PackageRegistryPort> & {
243
- fake: PackageRegistryFake;
244
- };
245
- //#endregion
246
- //#region src/adapters/source-control/__fakes__/source-control.fake.d.ts
247
- interface SourceState {
248
- position: GitPosition;
249
- clean: boolean;
250
- /** Tag name → the commit it points at. */
251
- tags: Record<string, string>;
252
- /** `<dir>@<version>` → the commit that brought that version. */
253
- versionCommits: Record<string, {
254
- sha: string;
255
- subject: string;
256
- }>;
257
- /** `<sha>:<dir>` → subjects of the commits since, newest first. */
258
- subjects: Record<string, string[]>;
259
- /** `<ref>:<file>` → its text at that ref. */
260
- files: Record<string, string>;
261
- /** `<from>..<to>` → the files that differ. */
262
- diffs: Record<string, string[]>;
263
- /** `<from>..<to>` → the commits after `from` up to `to`, newest first. */
264
- commits: Record<string, {
265
- subject: string;
266
- files: string[];
267
- }[]>;
268
- changed: string[];
269
- }
270
- type SourceEvent = {
271
- type: "branch";
272
- name: string;
273
- } | {
274
- type: "switch";
275
- branch: string;
276
- } | {
277
- type: "commit";
278
- files: string[];
279
- title: string;
280
- body?: string;
281
- } | {
282
- type: "push";
283
- branch: string;
284
- } | {
285
- type: "pull";
286
- } | {
287
- type: "tag";
288
- name: string;
289
- sha: string;
290
- message: string;
291
- } | {
292
- type: "push-tags";
293
- names: string[];
294
- } | {
295
- type: "discard";
296
- files: string[];
297
- } | {
298
- type: "delete-branch";
299
- name: string;
300
- } | {
301
- type: "delete-remote";
302
- branch: string;
303
- } | {
304
- type: "delete-tag";
305
- name: string;
306
- };
307
- /** A repository held in memory: seed what it contains, read back what it received. */
308
- declare class SourceControlFake implements SourceControlPort {
309
- private state;
310
- readonly received: SourceEvent[];
311
- private failures;
312
- seed(state: Partial<SourceState>): this;
313
- /** The `nth` call of this kind throws `error`, after it is recorded. */
314
- failAt(type: SourceEvent["type"], nth: number, error: Error): this;
315
- private record;
316
- position: () => Promise<GitPosition>;
317
- isClean: () => Promise<boolean>;
318
- tagCommit: (tag: string) => Promise<string>;
319
- versionCommit: (dir: string, _manifest: string, version: string) => Promise<{
320
- sha: string;
321
- subject: string;
322
- }>;
323
- subjectsSince: (sha: string, dir: string) => Promise<string[]>;
324
- changedFiles: () => Promise<string[]>;
325
- diffNames: (from: string, to: string) => Promise<string[]>;
326
- commitsBetween: (from: string, to: string) => Promise<{
327
- subject: string;
328
- files: string[];
329
- }[]>;
330
- fileAt: (ref: string, file: string) => Promise<string>;
331
- tags: () => Promise<Set<string>>;
332
- createBranch: (name: string) => Promise<void>;
333
- switchTo: (branch: string) => Promise<void>;
334
- commit: (files: string[], title: string, body?: string) => Promise<void>;
335
- push: (branch: string) => Promise<void>;
336
- pull: () => Promise<void>;
337
- tag: (name: string, sha: string, message: string) => Promise<void>;
338
- pushTags: (names: string[]) => Promise<void>;
339
- discard: (files: string[]) => Promise<void>;
340
- deleteBranch: (name: string) => Promise<void>;
341
- deleteRemoteBranch: (branch: string) => Promise<void>;
342
- deleteTag: (name: string) => Promise<void>;
343
- }
344
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
345
- declare const sourceControlFake: (fake?: SourceControlFake) => ServiceAdapter<SourceControlPort> & {
346
- fake: SourceControlFake;
347
- };
348
- //#endregion
349
- //#region src/adapters/code-host/__fakes__/code-host.fake.d.ts
350
- interface HostState {
351
- openPrs: {
352
- branch: string;
353
- pr: OpenPr;
354
- }[];
355
- /** States a pull request goes through, one per poll; the last one stays. */
356
- prStates: Record<number, ("OPEN" | "MERGED" | "CLOSED")[]>;
357
- /** The merge methods the repository allows, and the one its pull request page preselects. */
358
- merges: MergeMethods;
359
- releasedTags: string[];
360
- deployments: Deploy[];
361
- nextPrNumber: number;
362
- /** Merged pull requests by number, as a release reads their linked issues. */
363
- pullRequests: Record<number, LinkedPr>;
364
- /** `owner/name#123` → the text of its comments. */
365
- comments: Record<string, string[]>;
366
- }
367
- type HostEvent = {
368
- type: "pr";
369
- pr: OpenPr;
370
- base: string;
371
- head: string;
372
- title: string;
373
- body: string;
374
- label: string;
375
- } | {
376
- type: "merge";
377
- pr: OpenPr;
378
- method: MergeMethod;
379
- } | {
380
- type: "close";
381
- pr: OpenPr;
382
- comment: string;
383
- } | {
384
- type: "release";
385
- tag: string;
386
- notes: string;
387
- latest: boolean;
388
- } | {
389
- type: "record";
390
- ref: string;
391
- environment: Environment;
392
- } | {
393
- type: "comment";
394
- issue: string;
395
- body: string;
396
- };
397
- /** A code host held in memory: seed its pull requests and deploys, read back what it received. */
398
- declare class CodeHostFake implements CodeHostPort {
399
- private state;
400
- readonly received: HostEvent[];
401
- /** Each pull request number, once per state check. */
402
- readonly polled: number[];
403
- /** Each batched read of pull requests or comments, in order. */
404
- readonly reads: ("pull-requests" | "comments")[];
405
- seed(state: Partial<HostState>): this;
406
- openPrsFrom: (branchPrefix: string) => Promise<OpenPr[]>;
407
- createPr: (pr: {
408
- base: string;
409
- head: string;
410
- title: string;
411
- body: string;
412
- label: string;
413
- }) => Promise<{
414
- number: number;
415
- url: string;
416
- }>;
417
- private closeError;
418
- /** Every pull request close throws `error`. */
419
- failClose(error: Error): this;
420
- closePr: (pr: OpenPr, comment: string) => Promise<void>;
421
- prState: (pr: OpenPr) => Promise<"OPEN" | "MERGED" | "CLOSED">;
422
- mergeMethods: () => Promise<MergeMethods>;
423
- merge: (pr: OpenPr, method: MergeMethod) => Promise<void>;
424
- showDiff: () => Promise<void>;
425
- openInBrowser: () => Promise<void>;
426
- releasedTags: () => Promise<Set<string>>;
427
- private releaseError;
428
- /** Every release notes publish throws `error`. */
429
- failRelease(error: Error): this;
430
- createRelease: (tag: string, notes: string, latest: boolean) => Promise<void>;
431
- deployments: () => Promise<Deploy[]>;
432
- recordDeployment: (ref: string, environment: Environment) => Promise<void>;
433
- pullRequests: (numbers: readonly number[]) => Promise<LinkedPr[]>;
434
- comments: (on: readonly IssueRef[]) => Promise<string[][]>;
435
- private commentError;
436
- /** Every comment throws `error`. */
437
- failComment(error: Error): this;
438
- comment: (on: IssueRef, body: string) => Promise<void>;
439
- }
440
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
441
- declare const codeHostFake: (fake?: CodeHostFake) => ServiceAdapter<CodeHostPort> & {
442
- fake: CodeHostFake;
443
- };
444
- //#endregion
445
- //#region src/adapters/ci-pipeline/__fakes__/ci-pipeline.fake.d.ts
446
- interface PipelineState {
447
- workflowRuns: Record<string, Deploy[]>;
448
- minutes: ActionsMinutes | null;
449
- measured: Record<string, number[]>;
450
- }
451
- interface Dispatched {
452
- type: "dispatch";
453
- workflow: string;
454
- ref: string;
455
- inputs: Record<string, string>;
456
- }
457
- /** A CI pipeline held in memory: seed its runs and minutes, read back what was dispatched. */
458
- declare class CiPipelineFake implements CiPipelinePort {
459
- readonly shipWorkflow: string;
460
- private state;
461
- readonly received: Dispatched[];
462
- constructor(shipWorkflow?: string);
463
- seed(state: Partial<PipelineState>): this;
464
- workflowRuns: (workflow: string) => Promise<Deploy[]>;
465
- dispatch: (workflow: string, ref: string, inputs: Record<string, string>) => Promise<void>;
466
- minutes: () => Promise<ActionsMinutes | null>;
467
- measuredMinutes: (workflow: string) => Promise<number[]>;
468
- }
469
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
470
- declare const ciPipelineFake: (fake?: CiPipelineFake) => ServiceAdapter<CiPipelinePort> & {
471
- fake: CiPipelineFake;
472
- };
473
- //#endregion
474
- //#region src/adapters/versioning/__fakes__/versioning.fake.d.ts
475
- type PlanOf = (added: PlannedChangeset[], held: PlannedChangeset[]) => StatusPlan;
476
- interface VersioningState {
477
- pending: {
478
- id: string;
479
- text: string;
480
- }[];
481
- /** What `changeset status` would answer, given what the release adds and holds back. */
482
- plan: PlanOf;
483
- dependencies: Record<string, string[]>;
484
- folders: Record<string, string>;
485
- }
486
- /** Versioning held in memory: seed the pending changes and the plan, read back what it received. */
487
- declare class VersioningFake implements VersioningPort {
488
- private state;
489
- readonly applied: {
490
- added: PlannedChangeset[];
491
- held: PlannedChangeset[];
492
- }[];
493
- readonly written: PlannedChangeset[];
494
- seed(state: Partial<VersioningState>): this;
495
- pending: () => Promise<{
496
- id: string;
497
- text: string;
498
- }[]>;
499
- plan: (added: PlannedChangeset[], held: PlannedChangeset[]) => Promise<StatusPlan>;
500
- dependencies: () => Promise<Record<string, string[]>>;
501
- folders: () => Promise<Record<string, string>>;
502
- apply: (added: PlannedChangeset[], held: PlannedChangeset[]) => Promise<void>;
503
- write: (changeset: PlannedChangeset) => Promise<void>;
504
- changesetFile: (id: string) => string;
505
- changelogFile: (dir: string) => string;
506
- }
507
- /** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
508
- declare const versioningFake: (fake?: VersioningFake) => ServiceAdapter<VersioningPort> & {
509
- fake: VersioningFake;
510
- };
511
- //#endregion
512
82
  //#region src/adapters/shell/__fakes__/shell.fake.d.ts
513
83
  interface ShellCall {
514
84
  command: string;
@@ -572,6 +142,8 @@ interface Files {
572
142
  remove: (file: string) => void;
573
143
  /** Entries directly in a folder; empty when it does not exist. */
574
144
  list: (dir: string) => string[];
145
+ /** The folders directly in a folder, by name; empty when it does not exist. */
146
+ folders: (dir: string) => string[];
575
147
  }
576
148
  //#endregion
577
149
  //#region src/adapters/files/node-files.adapter.d.ts
@@ -642,6 +214,35 @@ interface LoadOptions {
642
214
  */
643
215
  declare const loadRelease: (root: string, options?: LoadOptions) => Promise<Release>;
644
216
  //#endregion
217
+ //#region src/application/context.d.ts
218
+ /** Everything a use case reads and drives: the release as written, its services, the person. */
219
+ interface ReleaseContext {
220
+ release: Release;
221
+ /** Reads the release from disk again: a pull moves the versions a merged release PR brought. */
222
+ load: () => Promise<Release>;
223
+ services: Services;
224
+ /** Creates the port an adapter gives, for this repository. */
225
+ open: Open;
226
+ prompter: Prompter;
227
+ output: Output;
228
+ /** Where the release is: its stage, what it reads or runs, the mascot's mood. */
229
+ progress: Progress;
230
+ clock: Clock;
231
+ /** Runs the jobs plugins return, when they run from this machine. */
232
+ shell: Shell;
233
+ options: {
234
+ /** Answers yes to every confirmation; production never accepts it. */yes: boolean; /** Running inside GitHub Actions: a ship runs on this runner, never dispatching another. */
235
+ ci: boolean;
236
+ };
237
+ }
238
+ /** The ports the release flow runs on. */
239
+ interface Services {
240
+ sourceControl: SourceControlPort;
241
+ codeHost: CodeHostPort;
242
+ ciPipeline: CiPipelinePort;
243
+ versioning: VersioningPort;
244
+ }
245
+ //#endregion
645
246
  //#region src/application/setupContext.d.ts
646
247
  /** What setting a release up needs: the repository, the person, the adapters init can offer. */
647
248
  interface SetupContext {
@@ -654,6 +255,10 @@ interface SetupContext {
654
255
  adapters: AnyDeliveryAdapter[];
655
256
  /** Loads the release as the files now say. */
656
257
  load: () => Promise<Release>;
258
+ /** Spinners while setup waits; plain steps when absent. */
259
+ progress?: Progress;
260
+ /** A release's context, for the rehearsal's plan; without it, the plan is not rehearsed. */
261
+ compose?: (release: Release) => ReleaseContext;
657
262
  }
658
263
  //#endregion
659
264
  //#region src/application/addUnit.d.ts
@@ -699,35 +304,6 @@ declare const initRelease: (context: SetupContext, {
699
304
  */
700
305
  declare const newAdapter: (context: SetupContext, name: string) => Promise<boolean>;
701
306
  //#endregion
702
- //#region src/application/context.d.ts
703
- /** Everything a use case reads and drives: the release as written, its services, the person. */
704
- interface ReleaseContext {
705
- release: Release;
706
- /** Reads the release from disk again: a pull moves the versions a merged release PR brought. */
707
- load: () => Promise<Release>;
708
- services: Services;
709
- /** Creates the port an adapter gives, for this repository. */
710
- open: Open;
711
- prompter: Prompter;
712
- output: Output;
713
- /** Where the release is: its stage, what it reads or runs, the mascot's mood. */
714
- progress: Progress;
715
- clock: Clock;
716
- /** Runs the jobs plugins return, when they run from this machine. */
717
- shell: Shell;
718
- options: {
719
- /** Answers yes to every confirmation; production never accepts it. */yes: boolean; /** Running inside GitHub Actions: a ship runs on this runner, never dispatching another. */
720
- ci: boolean;
721
- };
722
- }
723
- /** The ports the release flow runs on. */
724
- interface Services {
725
- sourceControl: SourceControlPort;
726
- codeHost: CodeHostPort;
727
- ciPipeline: CiPipelinePort;
728
- versioning: VersioningPort;
729
- }
730
- //#endregion
731
307
  //#region src/domain/companions.d.ts
732
308
  /** A unit that goes out with the picked ones without being picked, and why. */
733
309
  interface Companion {
@@ -763,14 +339,16 @@ interface Prepared {
763
339
  contributions: Record<string, VersionContribution>;
764
340
  }
765
341
  /** What a release PR covering `scope` would version, computed without writing anything. */
766
- declare const prepareRelease: (context: ReleaseContext, scope: ReadonlySet<string>) => Promise<Prepared>;
342
+ declare const prepareRelease: (context: ReleaseContext, scope: ReadonlySet<string>, known?: Readonly<Record<string, VersionContribution>>) => Promise<Prepared>;
767
343
  //#endregion
768
344
  //#region src/application/openReleasePr.d.ts
769
345
  /**
770
346
  * Versions what `prepared` covers on one branch from main, opens its PR, and goes back to main.
771
347
  * Null, with what to do, when it must not run.
772
348
  */
773
- declare const openReleasePr: (context: ReleaseContext, prepared: Prepared) => Promise<OpenPr[] | null>;
349
+ declare const openReleasePr: (context: ReleaseContext, prepared: Prepared, /** Release PRs this one takes the place of, named at the top of its description. */
350
+
351
+ replaces?: readonly OpenPr[]) => Promise<OpenPr[] | null>;
774
352
  //#endregion
775
353
  //#region src/application/planShips.d.ts
776
354
  /**
@@ -816,6 +394,19 @@ declare const readStatus: (context: ReleaseContext, environment: Environment) =>
816
394
  */
817
395
  declare const releaseToPreview: (context: ReleaseContext) => Promise<boolean>;
818
396
  //#endregion
397
+ //#region src/application/setup.d.ts
398
+ /**
399
+ * `shiplane setup`: the one command to set releases up and keep them right. It reads the
400
+ * repository, takes what it can prove, asks only the rest, then rehearses a release (builds, plan,
401
+ * sign-ins) with nothing pushed or deployed. Files are kept only when the rehearsal passes. Run
402
+ * again, it says all is set or offers what changed.
403
+ */
404
+ declare const setup: (context: SetupContext, {
405
+ yes
406
+ }: {
407
+ yes: boolean;
408
+ }) => Promise<boolean>;
409
+ //#endregion
819
410
  //#region src/application/setupFiles.d.ts
820
411
  /**
821
412
  * Writes the editor schema when it no longer matches the composed modules. It is generated, never
@@ -899,7 +490,8 @@ declare const testContext: ({
899
490
  interactive,
900
491
  root,
901
492
  tagFormat,
902
- commitsWithoutChangeset
493
+ commitsWithoutChangeset,
494
+ approval
903
495
  }: {
904
496
  units: ReleaseUnit[];
905
497
  modules?: ReleaseModule[]; /** The features, or how to make them from the flow's Fakes they share. */
@@ -908,7 +500,8 @@ declare const testContext: ({
908
500
  interactive?: boolean;
909
501
  root?: string;
910
502
  tagFormat?: string; /** A release skips commits no changeset names; the config default ignores them. */
911
- commitsWithoutChangeset?: "release" | "ignore";
503
+ commitsWithoutChangeset?: "release" | "ignore"; /** Whether someone else approves the release PR; the config default when absent. */
504
+ approval?: Approval;
912
505
  }) => {
913
506
  context: ReleaseContext;
914
507
  flow: {
@@ -988,5 +581,5 @@ interface Workspace {
988
581
  declare const createWorkspace: (files: Record<string, string>) => Workspace;
989
582
  declare const packageJson: (name: string, version?: string, extra?: object) => string;
990
583
  //#endregion
991
- export { type CliRun, type ConsumerRepository, type HostEvent, LIVE, MemoryOutput, RecordingShell, SAMPLE_UNITS, SAMPLE_VERSION_FILES, SOURCE_ALIASES, ScriptedPrompter, type SetupContext, type Workspace, addUnit, builtCli, changesetText, ciPipelineContract, ciPipelineFake, codeHostContract, codeHostFake, consumerRepository, createWorkspace, docsFor, doctor, inSandbox, initRelease, loadRelease, mobileDistributionContract, mobileDistributionFake, newAdapter, nodeFiles, openReleasePr, packageJson, packageRegistryContract, packageRegistryFake, planFrom, planShips, prepareRelease, promote, readStatus, refreshEditorSchema, releaseToPreview, removeUnit, sandbox, serverHostingContract, serverHostingFake, shipTo, sourceControlContract, sourceControlFake, staticHostingContract, staticHostingFake, systemShell, testContext, testUnit, versioningContract, versioningFake };
584
+ export { type CliRun, type ConsumerRepository, type HostEvent, LIVE, MemoryOutput, RecordingShell, SAMPLE_UNITS, SAMPLE_VERSION_FILES, SOURCE_ALIASES, ScriptedPrompter, type SetupContext, type Workspace, addUnit, builtCli, changesetText, ciPipelineContract, ciPipelineFake, codeHostContract, codeHostFake, consumerRepository, createWorkspace, docsFor, doctor, inSandbox, initRelease, loadRelease, mobileDistributionContract, mobileDistributionFake, newAdapter, nodeFiles, openReleasePr, packageJson, packageRegistryContract, packageRegistryFake, planFrom, planShips, prepareRelease, promote, readStatus, refreshEditorSchema, releaseToPreview, removeUnit, sandbox, serverHostingContract, serverHostingFake, setup, shipTo, sourceControlContract, sourceControlFake, staticHostingContract, staticHostingFake, systemShell, testContext, testUnit, versioningContract, versioningFake };
992
585
  //# sourceMappingURL=testing.d.ts.map