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.
- package/dist/{budget-C8_aayQk.js → budget-BqtW-Ekk.js} +53 -26
- package/dist/budget-BqtW-Ekk.js.map +1 -0
- package/dist/cli.js +81 -36
- package/dist/cli.js.map +1 -1
- package/dist/display-IqkJ6uCw.js +96 -0
- package/dist/display-IqkJ6uCw.js.map +1 -0
- package/dist/index-D4qsXAis.d.ts +214 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -3
- package/dist/{issues-C5fKq1Jv.js → issues-TcWtMTv5.js} +1 -1
- package/dist/{issues-C5fKq1Jv.js.map → issues-TcWtMTv5.js.map} +1 -1
- package/dist/memory.d.ts +2 -0
- package/dist/memory.js +2 -0
- package/dist/package-registry.fake-CC37ptzf.d.ts +444 -0
- package/dist/package-registry.fake-Ciqc4ujx.js +633 -0
- package/dist/package-registry.fake-Ciqc4ujx.js.map +1 -0
- package/dist/perEnv-B7AiYnW_.js +11 -0
- package/dist/perEnv-B7AiYnW_.js.map +1 -0
- package/dist/plugin.d.ts +13 -5
- package/dist/plugin.js +7 -6
- package/dist/{readStatus-D5YVR5ZC.js → readStatus-YTZXH_Hh.js} +1387 -519
- package/dist/readStatus-YTZXH_Hh.js.map +1 -0
- package/dist/{shell-server-hosting.adapter-Bgl6-IWw.js → shell-server-hosting.adapter-DobfDqFm.js} +2 -2
- package/dist/{shell-server-hosting.adapter-Bgl6-IWw.js.map → shell-server-hosting.adapter-DobfDqFm.js.map} +1 -1
- package/dist/{src-Dlr2Sgs8.js → src-CGASfBy2.js} +3 -3
- package/dist/{src-Dlr2Sgs8.js.map → src-CGASfBy2.js.map} +1 -1
- package/dist/{index-QneBUiDD.d.ts → static-hosting.port-mknLsxwR.d.ts} +61 -244
- package/dist/{tags-DL74ni09.d.ts → tags-Bn3JrgPI.d.ts} +1 -1
- package/dist/testing.d.ts +61 -468
- package/dist/testing.js +11 -625
- package/dist/testing.js.map +1 -1
- package/dist/{web-app.module-Bw-npC4Z.js → web-app.module-6KrXIU7j.js} +4 -11
- package/dist/web-app.module-6KrXIU7j.js.map +1 -0
- package/package.json +6 -1
- package/dist/budget-C8_aayQk.js.map +0 -1
- package/dist/display-DM0xtQbT.js +0 -55
- package/dist/display-DM0xtQbT.js.map +0 -1
- package/dist/readStatus-D5YVR5ZC.js.map +0 -1
- package/dist/web-app.module-Bw-npC4Z.js.map +0 -1
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { $ as OpenPr, B as LinkedPr, H as ActionsMinutes, I as CiPipelinePort, L as CodeHostPort, O as SourceControlPort, Q as MergeMethods, R as Deploy, Z as MergeMethod, a as VersioningPort, c as DeliveryAdapter, d as DecideContext, g as JobInput, h as Job, i as MobileDistributionPort, k as GitPosition, l as ServiceAdapter, m as Health, mt as Environment, n as ServerHostingPort, nt as PlannedChangeset, r as PackageRegistryPort, rt as StatusPlan, t as StaticHostingPort, v as Requirement, z as IssueRef } from "./static-hosting.port-mknLsxwR.js";
|
|
2
|
+
|
|
3
|
+
//#region src/adapters/source-control/__fakes__/source-control.fake.d.ts
|
|
4
|
+
interface SourceState {
|
|
5
|
+
position: GitPosition;
|
|
6
|
+
clean: boolean;
|
|
7
|
+
/** Tag name → the commit it points at. */
|
|
8
|
+
tags: Record<string, string>;
|
|
9
|
+
/** `<dir>@<version>` → the commit that brought that version. */
|
|
10
|
+
versionCommits: Record<string, {
|
|
11
|
+
sha: string;
|
|
12
|
+
subject: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** `<sha>:<dir>` → subjects of the commits since, newest first. */
|
|
15
|
+
subjects: Record<string, string[]>;
|
|
16
|
+
/** `<ref>:<file>` → its text at that ref. */
|
|
17
|
+
files: Record<string, string>;
|
|
18
|
+
/** `<from>..<to>` → the files that differ. */
|
|
19
|
+
diffs: Record<string, string[]>;
|
|
20
|
+
/** `<from>..<to>` → the commits after `from` up to `to`, newest first. */
|
|
21
|
+
commits: Record<string, {
|
|
22
|
+
subject: string;
|
|
23
|
+
files: string[];
|
|
24
|
+
}[]>;
|
|
25
|
+
changed: string[];
|
|
26
|
+
}
|
|
27
|
+
type SourceEvent = {
|
|
28
|
+
type: "branch";
|
|
29
|
+
name: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: "switch";
|
|
32
|
+
branch: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: "commit";
|
|
35
|
+
files: string[];
|
|
36
|
+
title: string;
|
|
37
|
+
body?: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "push";
|
|
40
|
+
branch: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: "pull";
|
|
43
|
+
} | {
|
|
44
|
+
type: "tag";
|
|
45
|
+
name: string;
|
|
46
|
+
sha: string;
|
|
47
|
+
message: string;
|
|
48
|
+
} | {
|
|
49
|
+
type: "push-tags";
|
|
50
|
+
names: string[];
|
|
51
|
+
} | {
|
|
52
|
+
type: "discard";
|
|
53
|
+
files: string[];
|
|
54
|
+
} | {
|
|
55
|
+
type: "delete-branch";
|
|
56
|
+
name: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "delete-remote";
|
|
59
|
+
branch: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: "delete-tag";
|
|
62
|
+
name: string;
|
|
63
|
+
};
|
|
64
|
+
/** A repository held in memory: seed what it contains, read back what it received. */
|
|
65
|
+
declare class SourceControlFake implements SourceControlPort {
|
|
66
|
+
private state;
|
|
67
|
+
readonly received: SourceEvent[];
|
|
68
|
+
private failures;
|
|
69
|
+
seed(state: Partial<SourceState>): this;
|
|
70
|
+
/** The `nth` call of this kind throws `error`, after it is recorded. */
|
|
71
|
+
failAt(type: SourceEvent["type"], nth: number, error: Error): this;
|
|
72
|
+
private record;
|
|
73
|
+
position: () => Promise<GitPosition>;
|
|
74
|
+
isClean: () => Promise<boolean>;
|
|
75
|
+
tagCommit: (tag: string) => Promise<string>;
|
|
76
|
+
versionCommit: (dir: string, _manifest: string, version: string) => Promise<{
|
|
77
|
+
sha: string;
|
|
78
|
+
subject: string;
|
|
79
|
+
}>;
|
|
80
|
+
subjectsSince: (sha: string, dir: string) => Promise<string[]>;
|
|
81
|
+
changedFiles: () => Promise<string[]>;
|
|
82
|
+
diffNames: (from: string, to: string) => Promise<string[]>;
|
|
83
|
+
commitsBetween: (from: string, to: string) => Promise<{
|
|
84
|
+
subject: string;
|
|
85
|
+
files: string[];
|
|
86
|
+
}[]>;
|
|
87
|
+
fileAt: (ref: string, file: string) => Promise<string>;
|
|
88
|
+
tags: () => Promise<Set<string>>;
|
|
89
|
+
createBranch: (name: string) => Promise<void>;
|
|
90
|
+
switchTo: (branch: string) => Promise<void>;
|
|
91
|
+
commit: (files: string[], title: string, body?: string, {
|
|
92
|
+
skipHooks
|
|
93
|
+
}?: {
|
|
94
|
+
skipHooks?: boolean;
|
|
95
|
+
}) => Promise<void>;
|
|
96
|
+
push: (branch: string) => Promise<void>;
|
|
97
|
+
pull: () => Promise<void>;
|
|
98
|
+
tag: (name: string, sha: string, message: string) => Promise<void>;
|
|
99
|
+
pushTags: (names: string[]) => Promise<void>;
|
|
100
|
+
discard: (files: string[]) => Promise<void>;
|
|
101
|
+
deleteBranch: (name: string) => Promise<void>;
|
|
102
|
+
deleteRemoteBranch: (branch: string) => Promise<void>;
|
|
103
|
+
deleteTag: (name: string) => Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
106
|
+
declare const sourceControlFake: (fake?: SourceControlFake) => ServiceAdapter<SourceControlPort> & {
|
|
107
|
+
fake: SourceControlFake;
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/adapters/code-host/__fakes__/code-host.fake.d.ts
|
|
111
|
+
interface HostState {
|
|
112
|
+
openPrs: {
|
|
113
|
+
branch: string;
|
|
114
|
+
pr: OpenPr;
|
|
115
|
+
}[];
|
|
116
|
+
/** States a pull request goes through, one per poll; the last one stays. */
|
|
117
|
+
prStates: Record<number, ("OPEN" | "MERGED" | "CLOSED")[]>;
|
|
118
|
+
/** The merge methods the repository allows, and the one its pull request page preselects. */
|
|
119
|
+
merges: MergeMethods;
|
|
120
|
+
releasedTags: string[];
|
|
121
|
+
deployments: Deploy[];
|
|
122
|
+
nextPrNumber: number;
|
|
123
|
+
/** Merged pull requests by number, as a release reads their linked issues. */
|
|
124
|
+
pullRequests: Record<number, LinkedPr>;
|
|
125
|
+
/** `owner/name#123` → the text of its comments. */
|
|
126
|
+
comments: Record<string, string[]>;
|
|
127
|
+
}
|
|
128
|
+
type HostEvent = {
|
|
129
|
+
type: "pr";
|
|
130
|
+
pr: OpenPr;
|
|
131
|
+
base: string;
|
|
132
|
+
head: string;
|
|
133
|
+
title: string;
|
|
134
|
+
body: string;
|
|
135
|
+
label: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "merge";
|
|
138
|
+
pr: OpenPr;
|
|
139
|
+
method: MergeMethod;
|
|
140
|
+
} | {
|
|
141
|
+
type: "close";
|
|
142
|
+
pr: OpenPr;
|
|
143
|
+
comment: string;
|
|
144
|
+
} | {
|
|
145
|
+
type: "release";
|
|
146
|
+
tag: string;
|
|
147
|
+
notes: string;
|
|
148
|
+
latest: boolean;
|
|
149
|
+
} | {
|
|
150
|
+
type: "record";
|
|
151
|
+
ref: string;
|
|
152
|
+
environment: Environment;
|
|
153
|
+
} | {
|
|
154
|
+
type: "comment";
|
|
155
|
+
issue: string;
|
|
156
|
+
body: string;
|
|
157
|
+
};
|
|
158
|
+
/** A code host held in memory: seed its pull requests and deploys, read back what it received. */
|
|
159
|
+
declare class CodeHostFake implements CodeHostPort {
|
|
160
|
+
private state;
|
|
161
|
+
readonly received: HostEvent[];
|
|
162
|
+
/** Each pull request number, once per state check. */
|
|
163
|
+
readonly polled: number[];
|
|
164
|
+
/** Each batched read of pull requests or comments, in order. */
|
|
165
|
+
readonly reads: ("pull-requests" | "comments")[];
|
|
166
|
+
seed(state: Partial<HostState>): this;
|
|
167
|
+
openPrsFrom: (branchPrefix: string) => Promise<OpenPr[]>;
|
|
168
|
+
private createError;
|
|
169
|
+
/** Every pull request open throws `error`. */
|
|
170
|
+
failCreate(error: Error): this;
|
|
171
|
+
createPr: (pr: {
|
|
172
|
+
base: string;
|
|
173
|
+
head: string;
|
|
174
|
+
title: string;
|
|
175
|
+
body: string;
|
|
176
|
+
label: string;
|
|
177
|
+
}) => Promise<{
|
|
178
|
+
number: number;
|
|
179
|
+
url: string;
|
|
180
|
+
head: string;
|
|
181
|
+
}>;
|
|
182
|
+
private closeError;
|
|
183
|
+
/** Every pull request close throws `error`. */
|
|
184
|
+
failClose(error: Error): this;
|
|
185
|
+
closePr: (pr: OpenPr, comment: string) => Promise<void>;
|
|
186
|
+
prState: (pr: OpenPr) => Promise<"OPEN" | "MERGED" | "CLOSED">;
|
|
187
|
+
mergeMethods: () => Promise<MergeMethods>;
|
|
188
|
+
merge: (pr: OpenPr, method: MergeMethod) => Promise<void>;
|
|
189
|
+
showDiff: () => Promise<void>;
|
|
190
|
+
openInBrowser: () => Promise<void>;
|
|
191
|
+
releasedTags: () => Promise<Set<string>>;
|
|
192
|
+
private releaseError;
|
|
193
|
+
/** Every release notes publish throws `error`. */
|
|
194
|
+
failRelease(error: Error): this;
|
|
195
|
+
createRelease: (tag: string, notes: string, latest: boolean) => Promise<void>;
|
|
196
|
+
deployments: () => Promise<Deploy[]>;
|
|
197
|
+
recordDeployment: (ref: string, environment: Environment) => Promise<void>;
|
|
198
|
+
pullRequests: (numbers: readonly number[]) => Promise<LinkedPr[]>;
|
|
199
|
+
comments: (on: readonly IssueRef[]) => Promise<string[][]>;
|
|
200
|
+
private commentError;
|
|
201
|
+
/** Every comment throws `error`. */
|
|
202
|
+
failComment(error: Error): this;
|
|
203
|
+
comment: (on: IssueRef, body: string) => Promise<void>;
|
|
204
|
+
}
|
|
205
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
206
|
+
declare const codeHostFake: (fake?: CodeHostFake) => ServiceAdapter<CodeHostPort> & {
|
|
207
|
+
fake: CodeHostFake;
|
|
208
|
+
};
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/adapters/ci-pipeline/__fakes__/ci-pipeline.fake.d.ts
|
|
211
|
+
interface PipelineState {
|
|
212
|
+
workflowRuns: Record<string, Deploy[]>;
|
|
213
|
+
minutes: ActionsMinutes | null;
|
|
214
|
+
measured: Record<string, number[]>;
|
|
215
|
+
}
|
|
216
|
+
interface Dispatched {
|
|
217
|
+
type: "dispatch";
|
|
218
|
+
workflow: string;
|
|
219
|
+
ref: string;
|
|
220
|
+
inputs: Record<string, string>;
|
|
221
|
+
}
|
|
222
|
+
/** A CI pipeline held in memory: seed its runs and minutes, read back what was dispatched. */
|
|
223
|
+
declare class CiPipelineFake implements CiPipelinePort {
|
|
224
|
+
readonly shipWorkflow: string;
|
|
225
|
+
private state;
|
|
226
|
+
readonly received: Dispatched[];
|
|
227
|
+
constructor(shipWorkflow?: string);
|
|
228
|
+
seed(state: Partial<PipelineState>): this;
|
|
229
|
+
workflowRuns: (workflow: string) => Promise<Deploy[]>;
|
|
230
|
+
dispatch: (workflow: string, ref: string, inputs: Record<string, string>) => Promise<void>;
|
|
231
|
+
minutes: () => Promise<ActionsMinutes | null>;
|
|
232
|
+
measuredMinutes: (workflow: string) => Promise<number[]>;
|
|
233
|
+
}
|
|
234
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
235
|
+
declare const ciPipelineFake: (fake?: CiPipelineFake) => ServiceAdapter<CiPipelinePort> & {
|
|
236
|
+
fake: CiPipelineFake;
|
|
237
|
+
};
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/adapters/versioning/__fakes__/versioning.fake.d.ts
|
|
240
|
+
type PlanOf = (added: PlannedChangeset[], held: PlannedChangeset[]) => StatusPlan;
|
|
241
|
+
interface VersioningState {
|
|
242
|
+
pending: {
|
|
243
|
+
id: string;
|
|
244
|
+
text: string;
|
|
245
|
+
}[];
|
|
246
|
+
/** What `changeset status` would answer, given what the release adds and holds back. */
|
|
247
|
+
plan: PlanOf;
|
|
248
|
+
dependencies: Record<string, string[]>;
|
|
249
|
+
folders: Record<string, string>;
|
|
250
|
+
}
|
|
251
|
+
/** Versioning held in memory: seed the pending changes and the plan, read back what it received. */
|
|
252
|
+
declare class VersioningFake implements VersioningPort {
|
|
253
|
+
private state;
|
|
254
|
+
readonly applied: {
|
|
255
|
+
added: PlannedChangeset[];
|
|
256
|
+
held: PlannedChangeset[];
|
|
257
|
+
}[];
|
|
258
|
+
readonly written: PlannedChangeset[];
|
|
259
|
+
seed(state: Partial<VersioningState>): this;
|
|
260
|
+
pending: () => Promise<{
|
|
261
|
+
id: string;
|
|
262
|
+
text: string;
|
|
263
|
+
}[]>;
|
|
264
|
+
plan: (added: PlannedChangeset[], held: PlannedChangeset[]) => Promise<StatusPlan>;
|
|
265
|
+
dependencies: () => Promise<Record<string, string[]>>;
|
|
266
|
+
folders: () => Promise<Record<string, string>>;
|
|
267
|
+
apply: (added: PlannedChangeset[], held: PlannedChangeset[]) => Promise<void>;
|
|
268
|
+
write: (changeset: PlannedChangeset) => Promise<void>;
|
|
269
|
+
changesetFile: (id: string) => string;
|
|
270
|
+
changelogFile: (dir: string) => string;
|
|
271
|
+
}
|
|
272
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
273
|
+
declare const versioningFake: (fake?: VersioningFake) => ServiceAdapter<VersioningPort> & {
|
|
274
|
+
fake: VersioningFake;
|
|
275
|
+
};
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/adapters/server-hosting/__fakes__/server-hosting.fake.d.ts
|
|
278
|
+
/** A deploy a module asked for. */
|
|
279
|
+
interface Asked$3 {
|
|
280
|
+
tag: string;
|
|
281
|
+
environment: Environment;
|
|
282
|
+
service: string;
|
|
283
|
+
}
|
|
284
|
+
/** A server host held in memory: it deploys nothing, and records each deploy it was asked for. */
|
|
285
|
+
declare class ServerHostingFake implements ServerHostingPort {
|
|
286
|
+
readonly capability = "server-hosting";
|
|
287
|
+
private needs;
|
|
288
|
+
readonly received: Asked$3[];
|
|
289
|
+
/** What doctor checks for each app it ships. */
|
|
290
|
+
seed({
|
|
291
|
+
requirements
|
|
292
|
+
}: {
|
|
293
|
+
requirements: Requirement[];
|
|
294
|
+
}): this;
|
|
295
|
+
describe: ({
|
|
296
|
+
options
|
|
297
|
+
}: JobInput<Record<string, unknown>>) => string;
|
|
298
|
+
jobs: ({
|
|
299
|
+
tag,
|
|
300
|
+
environment,
|
|
301
|
+
options
|
|
302
|
+
}: JobInput<Record<string, unknown>>) => Job[];
|
|
303
|
+
requirements: () => Requirement[];
|
|
304
|
+
}
|
|
305
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
306
|
+
declare const serverHostingFake: (fake?: ServerHostingFake) => DeliveryAdapter<ServerHostingPort> & {
|
|
307
|
+
fake: ServerHostingFake;
|
|
308
|
+
};
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/adapters/static-hosting/__fakes__/static-hosting.fake.d.ts
|
|
311
|
+
/** An upload a module asked for. */
|
|
312
|
+
interface Asked$2 {
|
|
313
|
+
tag: string;
|
|
314
|
+
environment: Environment;
|
|
315
|
+
site: string;
|
|
316
|
+
}
|
|
317
|
+
/** A static host held in memory: it uploads nothing, and records each upload it was asked for. */
|
|
318
|
+
declare class StaticHostingFake implements StaticHostingPort {
|
|
319
|
+
readonly capability = "static-hosting";
|
|
320
|
+
private needs;
|
|
321
|
+
readonly received: Asked$2[];
|
|
322
|
+
/** What doctor checks for each app it ships. */
|
|
323
|
+
seed({
|
|
324
|
+
requirements
|
|
325
|
+
}: {
|
|
326
|
+
requirements: Requirement[];
|
|
327
|
+
}): this;
|
|
328
|
+
describe: ({
|
|
329
|
+
options,
|
|
330
|
+
environment
|
|
331
|
+
}: JobInput<Record<string, unknown>>) => string;
|
|
332
|
+
jobs: ({
|
|
333
|
+
tag,
|
|
334
|
+
environment,
|
|
335
|
+
options
|
|
336
|
+
}: JobInput<Record<string, unknown>>) => Job[];
|
|
337
|
+
requirements: () => Requirement[];
|
|
338
|
+
}
|
|
339
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
340
|
+
declare const staticHostingFake: (fake?: StaticHostingFake) => DeliveryAdapter<StaticHostingPort> & {
|
|
341
|
+
fake: StaticHostingFake;
|
|
342
|
+
};
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/adapters/mobile-distribution/__fakes__/mobile-distribution.fake.d.ts
|
|
345
|
+
interface MobileState {
|
|
346
|
+
/** The version each environment runs. */
|
|
347
|
+
live: Partial<Record<Environment, string>>;
|
|
348
|
+
/** How each tag does where it runs. */
|
|
349
|
+
health: Record<string, Health>;
|
|
350
|
+
requirements: Requirement[];
|
|
351
|
+
}
|
|
352
|
+
/** What a module asked of it. */
|
|
353
|
+
interface Asked$1 {
|
|
354
|
+
stage: "jobs" | "decide" | "health" | "inspect";
|
|
355
|
+
tag: string;
|
|
356
|
+
environment: Environment;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* A mobile platform held in memory: seed what each environment runs and how a tag does; a version
|
|
360
|
+
* not live yet ships as an update.
|
|
361
|
+
*/
|
|
362
|
+
declare class MobileDistributionFake implements MobileDistributionPort {
|
|
363
|
+
readonly capability = "mobile-distribution";
|
|
364
|
+
private state;
|
|
365
|
+
readonly received: Asked$1[];
|
|
366
|
+
seed(state: Partial<MobileState>): this;
|
|
367
|
+
private ask;
|
|
368
|
+
describe: ({
|
|
369
|
+
options,
|
|
370
|
+
environment
|
|
371
|
+
}: JobInput<Record<string, unknown>>) => string;
|
|
372
|
+
jobs: (input: JobInput<Record<string, unknown>>) => Job[];
|
|
373
|
+
decide: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
|
|
374
|
+
action: "ship";
|
|
375
|
+
kind: "build" | "submit" | "publish" | "update" | "deploy";
|
|
376
|
+
jobs: Job[];
|
|
377
|
+
notLocal?: string;
|
|
378
|
+
} | {
|
|
379
|
+
action: "none";
|
|
380
|
+
status: string;
|
|
381
|
+
}>;
|
|
382
|
+
health: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<Health>;
|
|
383
|
+
inspect: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
|
|
384
|
+
live: string | null;
|
|
385
|
+
}>;
|
|
386
|
+
requirements: () => Requirement[];
|
|
387
|
+
}
|
|
388
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
389
|
+
declare const mobileDistributionFake: (fake?: MobileDistributionFake) => DeliveryAdapter<MobileDistributionPort> & {
|
|
390
|
+
fake: MobileDistributionFake;
|
|
391
|
+
};
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/adapters/package-registry/__fakes__/package-registry.fake.d.ts
|
|
394
|
+
/** What a module asked of it. */
|
|
395
|
+
interface Asked {
|
|
396
|
+
stage: "jobs" | "decide";
|
|
397
|
+
tag: string;
|
|
398
|
+
environment: Environment;
|
|
399
|
+
}
|
|
400
|
+
/** A package registry held in memory: seed what is published, a version not there yet publishes. */
|
|
401
|
+
declare class PackageRegistryFake implements PackageRegistryPort {
|
|
402
|
+
readonly capability = "package-registry";
|
|
403
|
+
/** `<package>@<version>` already published. */
|
|
404
|
+
private published;
|
|
405
|
+
private needs;
|
|
406
|
+
readonly received: Asked[];
|
|
407
|
+
seed({
|
|
408
|
+
published,
|
|
409
|
+
requirements
|
|
410
|
+
}: {
|
|
411
|
+
published?: string[];
|
|
412
|
+
requirements?: Requirement[];
|
|
413
|
+
}): this;
|
|
414
|
+
describe: ({
|
|
415
|
+
unit,
|
|
416
|
+
options
|
|
417
|
+
}: JobInput<Record<string, unknown>>) => string;
|
|
418
|
+
jobs: ({
|
|
419
|
+
unit,
|
|
420
|
+
tag,
|
|
421
|
+
environment,
|
|
422
|
+
options
|
|
423
|
+
}: JobInput<Record<string, unknown>>) => Job[];
|
|
424
|
+
decide: (_context: DecideContext, input: JobInput<Record<string, unknown>>) => Promise<{
|
|
425
|
+
action: "ship";
|
|
426
|
+
kind: "build" | "submit" | "publish" | "update" | "deploy";
|
|
427
|
+
jobs: Job[];
|
|
428
|
+
notLocal?: string;
|
|
429
|
+
} | {
|
|
430
|
+
action: "none";
|
|
431
|
+
status: string;
|
|
432
|
+
}>;
|
|
433
|
+
live: (_context: DecideContext, {
|
|
434
|
+
unit
|
|
435
|
+
}: JobInput<Record<string, unknown>>) => Promise<boolean>;
|
|
436
|
+
requirements: () => Requirement[];
|
|
437
|
+
}
|
|
438
|
+
/** The Fake as a config holds an adapter; `.fake` is what a test seeds and reads. */
|
|
439
|
+
declare const packageRegistryFake: (fake?: PackageRegistryFake) => DeliveryAdapter<PackageRegistryPort> & {
|
|
440
|
+
fake: PackageRegistryFake;
|
|
441
|
+
};
|
|
442
|
+
//#endregion
|
|
443
|
+
export { VersioningFake as a, ciPipelineFake as c, codeHostFake as d, SourceControlFake as f, serverHostingFake as i, CodeHostFake as l, mobileDistributionFake as n, versioningFake as o, sourceControlFake as p, staticHostingFake as r, CiPipelineFake as s, packageRegistryFake as t, HostEvent as u };
|
|
444
|
+
//# sourceMappingURL=package-registry.fake-CC37ptzf.d.ts.map
|