shiplane 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{budget-C8_aayQk.js → budget-CTjB1v-Z.js} +70 -27
- package/dist/budget-CTjB1v-Z.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-oKnmZ8qV.d.ts +245 -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 +12 -5
- package/dist/plugin.js +8 -7
- package/dist/{readStatus-D5YVR5ZC.js → readStatus-Bo7hpUT3.js} +1397 -520
- package/dist/readStatus-Bo7hpUT3.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-CGASfBy2.js.map +1 -0
- package/dist/{index-QneBUiDD.d.ts → static-hosting.port-mknLsxwR.d.ts} +61 -244
- package/dist/testing.d.ts +60 -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/src-Dlr2Sgs8.js.map +0 -1
- package/dist/tags-DL74ni09.d.ts +0 -19
- package/dist/web-app.module-Bw-npC4Z.js.map +0 -1
package/dist/{shell-server-hosting.adapter-Bgl6-IWw.js → shell-server-hosting.adapter-DobfDqFm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as perEnv } from "./perEnv-B7AiYnW_.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/adapters/defineDelivery.ts
|
|
4
4
|
const widen = (port) => port;
|
|
@@ -46,4 +46,4 @@ const shellServerHosting = () => defineServerHosting({
|
|
|
46
46
|
//#endregion
|
|
47
47
|
export { defineStaticHosting as a, defineServerHosting as i, defineMobileDistribution as n, definePackageRegistry as r, shellServerHosting as t };
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=shell-server-hosting.adapter-
|
|
49
|
+
//# sourceMappingURL=shell-server-hosting.adapter-DobfDqFm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-server-hosting.adapter-
|
|
1
|
+
{"version":3,"file":"shell-server-hosting.adapter-DobfDqFm.js","names":[],"sources":["../src/adapters/defineDelivery.ts","../src/adapters/server-hosting/shell-server-hosting.adapter.ts"],"sourcesContent":["import type { z } from \"zod\";\n\nimport type { DeliveryAdapter } from \"../ports/adapter.port\";\nimport type { Resolved } from \"../ports/delivery.port\";\nimport type { MobileDistributionPort } from \"../ports/mobile-distribution.port\";\nimport type { PackageRegistryPort } from \"../ports/package-registry.port\";\nimport type { ServerHostingPort } from \"../ports/server-hosting.port\";\nimport type { StaticHostingPort } from \"../ports/static-hosting.port\";\n\n/**\n * What an adapter author writes in one object: the recipe's static parts (name, settings, what init\n * and doctor ask) and the port's members, which read the settings typed.\n */\ntype Authored<Port extends { capability: string }, Schema extends z.ZodObject> = Omit<\n Port,\n \"capability\"\n> &\n Omit<DeliveryAdapter<Port>, \"create\" | \"settings\" | \"capability\"> & {\n readonly settings: Schema;\n };\n\ntype Typed<Schema extends z.ZodObject> = Resolved<z.output<Schema>>;\n\n// Its members take the settings its schema parses; the release flow only ever passes those.\nconst widen = <Port>(port: object): Port => port as Port;\n\nconst recipe = <Port extends { capability: string }>(\n {\n name,\n settings,\n typicalMinutes,\n decidedBy,\n detect,\n questions,\n requirements,\n ...port\n }: Omit<DeliveryAdapter<Port>, \"create\" | \"capability\">,\n capability: Port[\"capability\"],\n): DeliveryAdapter<Port> => ({\n name,\n capability,\n settings,\n typicalMinutes,\n decidedBy,\n detect,\n questions,\n requirements,\n create: () => widen({ ...port, capability }),\n});\n\nexport const defineServerHosting = <const Schema extends z.ZodObject>(\n adapter: Authored<ServerHostingPort<Typed<Schema>>, Schema>,\n): DeliveryAdapter<ServerHostingPort> => recipe<ServerHostingPort>(adapter, \"server-hosting\");\n\nexport const defineStaticHosting = <const Schema extends z.ZodObject>(\n adapter: Authored<StaticHostingPort<Typed<Schema>>, Schema>,\n): DeliveryAdapter<StaticHostingPort> => recipe<StaticHostingPort>(adapter, \"static-hosting\");\n\nexport const defineMobileDistribution = <const Schema extends z.ZodObject>(\n adapter: Authored<MobileDistributionPort<Typed<Schema>>, Schema> &\n Required<Pick<DeliveryAdapter<MobileDistributionPort>, \"decidedBy\">>,\n): DeliveryAdapter<MobileDistributionPort> =>\n recipe<MobileDistributionPort>(adapter, \"mobile-distribution\");\n\nexport const definePackageRegistry = <const Schema extends z.ZodObject>(\n adapter: Authored<PackageRegistryPort<Typed<Schema>>, Schema>,\n): DeliveryAdapter<PackageRegistryPort> => recipe<PackageRegistryPort>(adapter, \"package-registry\");\n","import { z } from \"zod\";\n\nimport type { DeliveryAdapter } from \"../../ports/adapter.port\";\nimport type { ServerHostingPort } from \"../../ports/server-hosting.port\";\nimport { perEnv } from \"../../application/config/perEnv\";\nimport { defineServerHosting } from \"../defineDelivery\";\n\nconst ShellOptions = z.object({\n deploy: perEnv(z.array(z.string()).min(1)).describe(\n \"The command that ships it, run from the root, as a list: [npx, my-tool, deploy]\",\n ),\n url: perEnv(z.string()).optional().describe(\"Where it answers, for other units to read\"),\n});\n\n/** Anything a command ships: the escape hatch until a host has its own adapter. */\nexport type ShellServerHostingAdapter = DeliveryAdapter<ServerHostingPort>;\n\nexport const shellServerHosting = (): ShellServerHostingAdapter =>\n defineServerHosting({\n name: \"shell\",\n settings: ShellOptions,\n describe: ({ options }) => options.deploy.join(\" \"),\n jobs: ({ tag, environment, options }) => {\n const [command = \"true\", ...args] = options.deploy;\n return [\n {\n label: `ship ${tag}: ${options.deploy.join(\" \")}`,\n local: [{ command, args }],\n ci: { ref: tag },\n record: true,\n },\n ];\n },\n });\n"],"mappings":";;;AAwBA,MAAM,SAAe,SAAuB;AAE5C,MAAM,UACJ,EACE,MACA,UACA,gBACA,WACA,QACA,WACA,cACA,GAAG,QAEL,gBAC2B;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,cAAc,MAAM;EAAE,GAAG;EAAM;EAAY,CAAC;CAC7C;AAED,MAAa,uBACX,YACuC,OAA0B,SAAS,iBAAiB;AAE7F,MAAa,uBACX,YACuC,OAA0B,SAAS,iBAAiB;AAE7F,MAAa,4BACX,YAGA,OAA+B,SAAS,sBAAsB;AAEhE,MAAa,yBACX,YACyC,OAA4B,SAAS,mBAAmB;;;AC3DnG,MAAM,eAAe,EAAE,OAAO;CAC5B,QAAQ,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,SACzC,kFACD;CACD,KAAK,OAAO,EAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,SAAS,4CAA4C;CACzF,CAAC;AAKF,MAAa,2BACX,oBAAoB;CAClB,MAAM;CACN,UAAU;CACV,WAAW,EAAE,cAAc,QAAQ,OAAO,KAAK,IAAI;CACnD,OAAO,EAAE,KAAK,aAAa,cAAc;EACvC,MAAM,CAAC,UAAU,QAAQ,GAAG,QAAQ,QAAQ;AAC5C,SAAO,CACL;GACE,OAAO,QAAQ,IAAI,IAAI,QAAQ,OAAO,KAAK,IAAI;GAC/C,OAAO,CAAC;IAAE;IAAS;IAAM,CAAC;GAC1B,IAAI,EAAE,KAAK,KAAK;GAChB,QAAQ;GACT,CACF;;CAEJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./shell-server-hosting.adapter-
|
|
1
|
+
import "./perEnv-B7AiYnW_.js";
|
|
2
|
+
import "./shell-server-hosting.adapter-DobfDqFm.js";
|
|
3
3
|
import { z, z as z$1 } from "zod";
|
|
4
4
|
//#region src/application/config/defineRelease.ts
|
|
5
5
|
const defineRelease = (config) => config;
|
|
@@ -29,4 +29,4 @@ const internalTool = ({ name = "internal-tool" } = {}) => ({
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { internalTool as n, defineRelease as r, z$1 as t };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=src-
|
|
32
|
+
//# sourceMappingURL=src-CGASfBy2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-CGASfBy2.js","names":[],"sources":["../src/application/config/defineRelease.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 /**\n * A unit whose folder changed with no changeset naming it: `\"ignore\"` (the default, as changesets\n * does) leaves it, `\"release\"` offers it with a changelog from its commits.\n */\n commitsWithoutChangeset?: \"release\" | \"ignore\";\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 { 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":";;;;AA2BA,MAAa,iBAAiB,WAAyC;;;;;;;AClBvE,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"}
|
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import { z
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/domain/environment.d.ts
|
|
4
4
|
/** Where a unit runs, in promotion order: production ships what preview validated. */
|
|
5
5
|
declare const ENVIRONMENTS: readonly ["preview", "production"];
|
|
6
6
|
type Environment = (typeof ENVIRONMENTS)[number];
|
|
7
7
|
//#endregion
|
|
8
|
+
//#region src/domain/display.d.ts
|
|
9
|
+
declare const MOODS: readonly ["thinking", "working", "waiting", "happy", "worried", "resting"];
|
|
10
|
+
/** What the mascot shows beside the release: reading, running, waiting on a person, done, failed, idle. */
|
|
11
|
+
type Mood = (typeof MOODS)[number];
|
|
12
|
+
/** `done` of `total` as a bar `width` characters wide. */
|
|
13
|
+
declare const progressBar: (done: number, total: number, width: number) => string;
|
|
14
|
+
/** What is happening when the mascot is drawn. */
|
|
15
|
+
interface MascotMoment {
|
|
16
|
+
mood: Mood;
|
|
17
|
+
/** Its animation frame, from 0; always 0 when motion is off. */
|
|
18
|
+
tick: number;
|
|
19
|
+
/** What runs right now, such as "build 3 apps" or "deploy api@1.2.0 to production". */
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A mascot of your own: frames per mood, looped as it animates, or a function drawing each moment.
|
|
24
|
+
* Plain text: shiplane colours it by mood, pads it to one width, and takes any mood a set of frames
|
|
25
|
+
* leaves out from the hedgehog.
|
|
26
|
+
*/
|
|
27
|
+
type Mascot = Partial<Record<Mood, readonly string[]>> | ((moment: MascotMoment) => string);
|
|
28
|
+
/** How much the release says while it runs, as `shiplane.config.ts` or a flag asks. */
|
|
29
|
+
interface DisplayChoice {
|
|
30
|
+
/** Says each thing it reads and runs, with a progress bar. */
|
|
31
|
+
verbose?: boolean;
|
|
32
|
+
/** The mascot beside what is happening: the hedgehog (true), none (false), or your own. */
|
|
33
|
+
mascot?: boolean | Mascot;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
8
36
|
//#region src/domain/unit.d.ts
|
|
9
37
|
/** Something with a version that ships somewhere: an app, a published package, this CLI. */
|
|
10
38
|
interface ReleaseUnit {
|
|
@@ -18,34 +46,14 @@ interface ReleaseUnit {
|
|
|
18
46
|
version: string;
|
|
19
47
|
/** The module that ships it, as its unit file names it. */
|
|
20
48
|
module: string;
|
|
49
|
+
/** Its `buildCommand:`, when its unit file says one; else its package.json "build" script. */
|
|
50
|
+
buildCommand?: string;
|
|
21
51
|
/** As written: per-environment maps and references are resolved by `optionsFor`. */
|
|
22
52
|
options: Record<string, unknown>;
|
|
23
53
|
/** Units whose values it reads: they are dispatched before it. */
|
|
24
54
|
after: string[];
|
|
25
55
|
}
|
|
26
56
|
//#endregion
|
|
27
|
-
//#region src/application/config/perEnv.d.ts
|
|
28
|
-
/** A value that is the same everywhere, or written once per environment. */
|
|
29
|
-
declare const perEnv: <Value extends z.ZodType>(value: Value) => z.ZodUnion<readonly [Value, z.ZodObject<{
|
|
30
|
-
preview: Value;
|
|
31
|
-
production: Value;
|
|
32
|
-
}, z.core.$strict>]>;
|
|
33
|
-
type PerEnv<Value> = Value | Record<Environment, Value>;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/domain/display.d.ts
|
|
36
|
-
declare const MOODS: readonly ["thinking", "working", "waiting", "happy", "worried", "resting"];
|
|
37
|
-
/** What the mascot shows beside the release: reading, running, waiting on a person, done, failed, idle. */
|
|
38
|
-
type Mood = (typeof MOODS)[number];
|
|
39
|
-
/** `done` of `total` as a bar `width` characters wide. */
|
|
40
|
-
declare const progressBar: (done: number, total: number, width: number) => string;
|
|
41
|
-
/** How much the release says while it runs, as `shiplane.config.ts` or a flag asks. */
|
|
42
|
-
interface DisplayChoice {
|
|
43
|
-
/** Says each thing it reads and runs, with a progress bar. */
|
|
44
|
-
verbose?: boolean;
|
|
45
|
-
/** The mascot beside what is happening. */
|
|
46
|
-
mascot?: boolean;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
57
|
//#region src/domain/changes.d.ts
|
|
50
58
|
/** A unit as changesets know it: its name here, its package name there. */
|
|
51
59
|
interface UnitRef {
|
|
@@ -106,6 +114,30 @@ interface UnreleasedApp {
|
|
|
106
114
|
commits: string[];
|
|
107
115
|
}
|
|
108
116
|
//#endregion
|
|
117
|
+
//#region src/domain/releasePr.d.ts
|
|
118
|
+
interface OpenPr {
|
|
119
|
+
number: number;
|
|
120
|
+
url: string;
|
|
121
|
+
/** The commit the PR's branch stands on, when the host says: main moving past it makes the PR stale. */
|
|
122
|
+
head?: string;
|
|
123
|
+
}
|
|
124
|
+
/** Whether a release PR merges from the terminal, or waits for someone else to approve it. */
|
|
125
|
+
type Approval = "none" | "required";
|
|
126
|
+
type MergeMethod = "--squash" | "--merge" | "--rebase";
|
|
127
|
+
/** What the pull request page offers: the methods the repository allows, and the one it preselects. */
|
|
128
|
+
interface MergeMethods {
|
|
129
|
+
allowed: MergeMethod[];
|
|
130
|
+
preselected: MergeMethod | null;
|
|
131
|
+
}
|
|
132
|
+
type ReleaseStep = {
|
|
133
|
+
step: "wait-merge";
|
|
134
|
+
prs: OpenPr[];
|
|
135
|
+
} | {
|
|
136
|
+
step: "release-pr";
|
|
137
|
+
} | {
|
|
138
|
+
step: "ship";
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
109
141
|
//#region src/domain/scope.d.ts
|
|
110
142
|
/** A unit whose live state its own platform knows, not GitHub Deployments: EAS for a mobile app. */
|
|
111
143
|
interface DecidedBy {
|
|
@@ -162,26 +194,6 @@ declare const issueName: ({
|
|
|
162
194
|
number
|
|
163
195
|
}: IssueRef) => string;
|
|
164
196
|
//#endregion
|
|
165
|
-
//#region src/domain/releasePr.d.ts
|
|
166
|
-
interface OpenPr {
|
|
167
|
-
number: number;
|
|
168
|
-
url: string;
|
|
169
|
-
}
|
|
170
|
-
type MergeMethod = "--squash" | "--merge" | "--rebase";
|
|
171
|
-
/** What the pull request page offers: the methods the repository allows, and the one it preselects. */
|
|
172
|
-
interface MergeMethods {
|
|
173
|
-
allowed: MergeMethod[];
|
|
174
|
-
preselected: MergeMethod | null;
|
|
175
|
-
}
|
|
176
|
-
type ReleaseStep = {
|
|
177
|
-
step: "wait-merge";
|
|
178
|
-
prs: OpenPr[];
|
|
179
|
-
} | {
|
|
180
|
-
step: "release-pr";
|
|
181
|
-
} | {
|
|
182
|
-
step: "ship";
|
|
183
|
-
};
|
|
184
|
-
//#endregion
|
|
185
197
|
//#region src/ports/code-host.port.d.ts
|
|
186
198
|
interface Deploy {
|
|
187
199
|
/** The run title every deploy records: `Deploy <tag> to <environment>`. */
|
|
@@ -312,7 +324,10 @@ interface SourceControlPort {
|
|
|
312
324
|
tags: () => Promise<Set<string>>;
|
|
313
325
|
createBranch: (name: string) => Promise<void>;
|
|
314
326
|
switchTo: (branch: string) => Promise<void>;
|
|
315
|
-
|
|
327
|
+
/** `skipHooks` commits without the repository's hooks: a release title longer than they allow. */
|
|
328
|
+
commit: (files: string[], title: string, body?: string, options?: {
|
|
329
|
+
skipHooks?: boolean;
|
|
330
|
+
}) => Promise<void>;
|
|
316
331
|
push: (branch: string) => Promise<void>;
|
|
317
332
|
pull: () => Promise<void>;
|
|
318
333
|
tag: (name: string, sha: string, message: string) => Promise<void>;
|
|
@@ -618,119 +633,6 @@ interface VersioningPort {
|
|
|
618
633
|
changelogFile: (dir: string) => string;
|
|
619
634
|
}
|
|
620
635
|
//#endregion
|
|
621
|
-
//#region src/modules/module.d.ts
|
|
622
|
-
/** What a module's per-app stages are told: the app, its tag, its settings for that environment. */
|
|
623
|
-
type AppInput = JobInput<Record<string, unknown>>;
|
|
624
|
-
/** Where a tag lands, as a person reads it, and the jobs that ship it there. */
|
|
625
|
-
interface ShipPlan {
|
|
626
|
-
where: string;
|
|
627
|
-
jobs: Job[];
|
|
628
|
-
}
|
|
629
|
-
/** An app a ship just triggered on an environment. */
|
|
630
|
-
interface Shipped {
|
|
631
|
-
unit: ReleaseUnit;
|
|
632
|
-
tag: string;
|
|
633
|
-
environment: Environment;
|
|
634
|
-
}
|
|
635
|
-
/** One thing done once apps ship, as data: a ship runs it, a plan only lists it. */
|
|
636
|
-
interface FollowUp {
|
|
637
|
-
label: string;
|
|
638
|
-
run: () => Promise<void>;
|
|
639
|
-
}
|
|
640
|
-
/** Creates the port an adapter gives, for this repository. */
|
|
641
|
-
type Open = <Port>(adapter: Adapter<Port>) => Port;
|
|
642
|
-
/** What a feature is told once apps ship. */
|
|
643
|
-
interface AfterShipContext {
|
|
644
|
-
/** Subjects of the commits after `from` up to `to` whose files can reach what an app ships. */
|
|
645
|
-
subjectsReaching: (unit: ReleaseUnit, from: string, to: string) => Promise<string[]>;
|
|
646
|
-
open: Open;
|
|
647
|
-
/** How a tag names a version, such as `{name}@{version}`. */
|
|
648
|
-
tagFormat: string;
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* What gets released: the apps whose unit file names it. Every stage is optional; the release flow
|
|
652
|
-
* owns their order, and the order of `modules` is the release order.
|
|
653
|
-
*/
|
|
654
|
-
interface ReleaseModule {
|
|
655
|
-
readonly type: "module";
|
|
656
|
-
/** What an app's unit file names: its kind, or a name the config gives it. */
|
|
657
|
-
readonly name: string;
|
|
658
|
-
/** "backend-service", "mobile-app". */
|
|
659
|
-
readonly kind: string;
|
|
660
|
-
/** The provider its apps ship with, as output names it: "fly". */
|
|
661
|
-
readonly provider: string;
|
|
662
|
-
/** What its apps' unit files hold besides `module`. */
|
|
663
|
-
readonly settings: z.ZodObject;
|
|
664
|
-
/** The adapters it was given. */
|
|
665
|
-
readonly adapters: readonly Adapter<unknown>[];
|
|
666
|
-
/** Set when its own platform, not deploy records, knows what is live. */
|
|
667
|
-
readonly decidedBy?: DecidedBy;
|
|
668
|
-
/** Set when nothing deploys its apps: a release versions and tags them, nothing more. */
|
|
669
|
-
readonly releaseOnly?: boolean;
|
|
670
|
-
/** Billed minutes of a CI deploy, used until a run has been measured. */
|
|
671
|
-
readonly typicalMinutes?: number;
|
|
672
|
-
/** Tools and sign-ins it needs, given the apps that name it. */
|
|
673
|
-
readonly requirements?: (apps: readonly ReleaseUnit[]) => Requirement[];
|
|
674
|
-
/** Files a release may change after a tag without changing what ships. Relative to the root. */
|
|
675
|
-
readonly versionFiles?: (unit: ReleaseUnit, units: readonly ReleaseUnit[], open: Open) => string[];
|
|
676
|
-
/** Adds to the release PR, given the app's bump in it when there is one. */
|
|
677
|
-
readonly version?: (context: DecideContext, input: AppInput & {
|
|
678
|
-
bump: AppBump | undefined;
|
|
679
|
-
chosen?: string;
|
|
680
|
-
}) => Promise<VersionContribution>;
|
|
681
|
-
/** The tagged version runs on the environment, read from its platform; else deploy records say. */
|
|
682
|
-
readonly live?: (context: DecideContext, input: AppInput) => Promise<boolean>;
|
|
683
|
-
/** Decides what an app needs; without it, deploy records decide and `ship` runs. */
|
|
684
|
-
readonly decide?: (context: DecideContext, input: AppInput) => Promise<Decision>;
|
|
685
|
-
/** Where a tag lands and the jobs that ship it: data, never run by the module itself. */
|
|
686
|
-
readonly ship: (context: DecideContext, input: AppInput) => ShipPlan;
|
|
687
|
-
/** How the tagged version does on preview, read before promoting it. Null when nothing says. */
|
|
688
|
-
readonly health?: (context: DecideContext, input: AppInput) => Promise<Health | null>;
|
|
689
|
-
/** What `status --json` shows for an app, read from its platform. */
|
|
690
|
-
readonly inspect?: (context: DecideContext, input: AppInput) => Promise<unknown>;
|
|
691
|
-
}
|
|
692
|
-
/** What happens around a release, after the ship, such as telling issues what shipped. */
|
|
693
|
-
interface Feature {
|
|
694
|
-
readonly type: "feature";
|
|
695
|
-
readonly name: string;
|
|
696
|
-
/** The adapters it was given, for doctor to check. */
|
|
697
|
-
readonly adapters: readonly Adapter<unknown>[];
|
|
698
|
-
readonly requirements?: () => Requirement[];
|
|
699
|
-
/** What to do once apps ship: it only reads, a ship runs each one, a plan lists them. */
|
|
700
|
-
readonly afterShip: (context: AfterShipContext, shipped: readonly Shipped[]) => Promise<FollowUp[]>;
|
|
701
|
-
}
|
|
702
|
-
/** How the release itself runs: versions, tags, the release PR, GitHub releases, CI. */
|
|
703
|
-
interface ReleaseFlow {
|
|
704
|
-
readonly type: "flow";
|
|
705
|
-
readonly sourceControl: ServiceAdapter<SourceControlPort>;
|
|
706
|
-
readonly codeHost: ServiceAdapter<CodeHostPort>;
|
|
707
|
-
readonly ciPipeline: ServiceAdapter<CiPipelinePort>;
|
|
708
|
-
readonly versioning: ServiceAdapter<VersioningPort>;
|
|
709
|
-
}
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region src/application/config/defineRelease.d.ts
|
|
712
|
-
/** How a repository releases: the flow, what gets released in order, and what happens around it. */
|
|
713
|
-
interface ReleaseConfig {
|
|
714
|
-
/** Folders to look in, `dir/*` or exact. Without it, the workspace file decides. */
|
|
715
|
-
units?: string[];
|
|
716
|
-
/** How the release itself runs: an adapter per port, each from its plugin. */
|
|
717
|
-
flow: ReleaseFlow;
|
|
718
|
-
/** What gets released, in this order. The first app is the repository's Latest release. */
|
|
719
|
-
modules: ReleaseModule[];
|
|
720
|
-
/** What happens around a release, after the ship, in this order. */
|
|
721
|
-
features?: Feature[];
|
|
722
|
-
/** How a tag names a version: `{name}@{version}` when absent, or e.g. `v{version}`, `{name}--v{version}`. */
|
|
723
|
-
tag?: string;
|
|
724
|
-
/**
|
|
725
|
-
* A unit whose folder changed with no changeset naming it: `"ignore"` (the default, as changesets
|
|
726
|
-
* does) leaves it, `"release"` offers it with a changelog from its commits.
|
|
727
|
-
*/
|
|
728
|
-
commitsWithoutChangeset?: "release" | "ignore";
|
|
729
|
-
/** How much the release says while it runs; `--verbose` and `--mascot` (or `--no-…`) override. */
|
|
730
|
-
display?: DisplayChoice;
|
|
731
|
-
}
|
|
732
|
-
declare const defineRelease: (config: ReleaseConfig) => ReleaseConfig;
|
|
733
|
-
//#endregion
|
|
734
636
|
//#region src/ports/mobile-distribution.port.d.ts
|
|
735
637
|
/**
|
|
736
638
|
* Ships a mobile app to the stores or over the air: EAS today. Its own platform knows what is live,
|
|
@@ -778,90 +680,5 @@ interface StaticHostingPort<Options = Record<string, unknown>> extends Delivery<
|
|
|
778
680
|
readonly capability: "static-hosting";
|
|
779
681
|
}
|
|
780
682
|
//#endregion
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
* What an adapter author writes in one object: the recipe's static parts (name, settings, what init
|
|
784
|
-
* and doctor ask) and the port's members, which read the settings typed.
|
|
785
|
-
*/
|
|
786
|
-
type Authored<Port extends {
|
|
787
|
-
capability: string;
|
|
788
|
-
}, Schema extends z.ZodObject> = Omit<Port, "capability"> & Omit<DeliveryAdapter<Port>, "create" | "settings" | "capability"> & {
|
|
789
|
-
readonly settings: Schema;
|
|
790
|
-
};
|
|
791
|
-
type Typed<Schema extends z.ZodObject> = Resolved<z.output<Schema>>;
|
|
792
|
-
declare const defineServerHosting: <const Schema extends z.ZodObject>(adapter: Authored<ServerHostingPort<Typed<Schema>>, Schema>) => DeliveryAdapter<ServerHostingPort>;
|
|
793
|
-
declare const defineStaticHosting: <const Schema extends z.ZodObject>(adapter: Authored<StaticHostingPort<Typed<Schema>>, Schema>) => DeliveryAdapter<StaticHostingPort>;
|
|
794
|
-
declare const defineMobileDistribution: <const Schema extends z.ZodObject>(adapter: Authored<MobileDistributionPort<Typed<Schema>>, Schema> & Required<Pick<DeliveryAdapter<MobileDistributionPort>, "decidedBy">>) => DeliveryAdapter<MobileDistributionPort>;
|
|
795
|
-
declare const definePackageRegistry: <const Schema extends z.ZodObject>(adapter: Authored<PackageRegistryPort<Typed<Schema>>, Schema>) => DeliveryAdapter<PackageRegistryPort>;
|
|
796
|
-
//#endregion
|
|
797
|
-
//#region src/application/releaseFlow.d.ts
|
|
798
|
-
/** How the release itself runs, given an adapter for each port it runs on. */
|
|
799
|
-
declare const releaseFlow: (ports: {
|
|
800
|
-
sourceControl: ServiceAdapter<SourceControlPort>;
|
|
801
|
-
codeHost: ServiceAdapter<CodeHostPort>;
|
|
802
|
-
ciPipeline: ServiceAdapter<CiPipelinePort>;
|
|
803
|
-
versioning: ServiceAdapter<VersioningPort>;
|
|
804
|
-
}) => ReleaseFlow;
|
|
805
|
-
//#endregion
|
|
806
|
-
//#region src/modules/deliveryModule.d.ts
|
|
807
|
-
/** What every module of apps takes besides its adapter: a name, when two of a kind sit side by side. */
|
|
808
|
-
interface Named {
|
|
809
|
-
/** What an app's unit file names; the module's kind by default. */
|
|
810
|
-
name?: string;
|
|
811
|
-
}
|
|
812
|
-
//#endregion
|
|
813
|
-
//#region src/modules/backend-service/backend-service.module.d.ts
|
|
814
|
-
/** A long-lived service, such as an API: deployed from its tag, recorded with the code host. */
|
|
815
|
-
declare const backendService: ({
|
|
816
|
-
name,
|
|
817
|
-
serverHosting
|
|
818
|
-
}: Named & {
|
|
819
|
-
serverHosting: DeliveryAdapter<ServerHostingPort>;
|
|
820
|
-
}) => ReleaseModule;
|
|
821
|
-
//#endregion
|
|
822
|
-
//#region src/modules/internal-tool/internal-tool.module.d.ts
|
|
823
|
-
/**
|
|
824
|
-
* An app nothing deploys, such as a CLI run from the repository: a release versions it, tags it and
|
|
825
|
-
* publishes its notes, and every environment counts it as shipped once tagged.
|
|
826
|
-
*/
|
|
827
|
-
declare const internalTool: ({
|
|
828
|
-
name
|
|
829
|
-
}?: Named) => ReleaseModule;
|
|
830
|
-
//#endregion
|
|
831
|
-
//#region src/modules/mobile-app/mobile-app.module.d.ts
|
|
832
|
-
/**
|
|
833
|
-
* A mobile app: its distribution decides between a store build and an over-the-air update, adds to
|
|
834
|
-
* the release PR, and says how a version does before it is promoted.
|
|
835
|
-
*/
|
|
836
|
-
declare const mobileApp: ({
|
|
837
|
-
name,
|
|
838
|
-
mobileDistribution
|
|
839
|
-
}: Named & {
|
|
840
|
-
mobileDistribution: DeliveryAdapter<MobileDistributionPort>;
|
|
841
|
-
}) => ReleaseModule;
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/modules/published-package/published-package.module.d.ts
|
|
844
|
-
/** A package others install: its registry, not deploy records, knows what is out. */
|
|
845
|
-
declare const publishedPackage: ({
|
|
846
|
-
name,
|
|
847
|
-
packageRegistry
|
|
848
|
-
}: Named & {
|
|
849
|
-
packageRegistry: DeliveryAdapter<PackageRegistryPort>;
|
|
850
|
-
}) => ReleaseModule;
|
|
851
|
-
//#endregion
|
|
852
|
-
//#region src/modules/web-app/web-app.module.d.ts
|
|
853
|
-
/** A static site, built against the environment it ships to. */
|
|
854
|
-
declare const webApp: ({
|
|
855
|
-
name,
|
|
856
|
-
staticHosting
|
|
857
|
-
}: Named & {
|
|
858
|
-
staticHosting: DeliveryAdapter<StaticHostingPort>;
|
|
859
|
-
}) => ReleaseModule;
|
|
860
|
-
//#endregion
|
|
861
|
-
//#region src/adapters/server-hosting/shell-server-hosting.adapter.d.ts
|
|
862
|
-
/** Anything a command ships: the escape hatch until a host has its own adapter. */
|
|
863
|
-
type ShellServerHostingAdapter = DeliveryAdapter<ServerHostingPort>;
|
|
864
|
-
declare const shellServerHosting: () => ShellServerHostingAdapter;
|
|
865
|
-
//#endregion
|
|
866
|
-
export { CommandFailed as $, ServiceAdapter as A, PerEnv as At, Resolved as B, ReleaseFlow as C, UnitRef as Ct, Adapter as D, DisplayChoice as Dt, VersioningPort as E, splitChangesets as Et, Health as F, Output as G, VersionContribution as H, Job as I, StepPlace as J, Progress as K, JobInput as L, DecideContext as M, ReleaseUnit as Mt, Decision as N, Environment as Nt, AdapterContext as O, Mood as Ot, Delivery as P, yesAllowed as Q, Refusal as R, Open as S, StatusPlan as St, Shipped as T, appBumps as Tt, Choice as U, VersionChoice as V, Clock as W, GitPosition as X, SourceControlPort as Y, releaseSource as Z, ReleaseConfig as _, deployRunTitle as _t, mobileApp as a, Deploy as at, Feature as b, AppBump as bt, releaseFlow as c, OpenPr as ct, defineServerHosting as d, LinkedPr as dt, RunOptions as et, defineStaticHosting as f, issueName as ft, MobileDistributionPort as g, DeployPath as gt, PackageRegistryPort as h, billedMinutes as ht, publishedPackage as i, CodeHostPort as it, Command as j, perEnv as jt, DeliveryAdapter as k, progressBar as kt, defineMobileDistribution as l, ReleaseStep as lt, ServerHostingPort as m, actionsMinutes as mt, shellServerHosting as n, ShellResult as nt, internalTool as o, MergeMethod as ot, StaticHostingPort as p, ActionsMinutes as pt, Prompter as q, webApp as r, CiPipelinePort as rt, backendService as s, MergeMethods as st, z$1 as t, Shell as tt, definePackageRegistry as u, IssueRef as ut, defineRelease as v, deployState as vt, ReleaseModule as w, UnreleasedApp as wt, FollowUp as x, PlannedChangeset as xt, AfterShipContext as y, onlyVersionFiles as yt, Requirement as z };
|
|
867
|
-
//# sourceMappingURL=index-QneBUiDD.d.ts.map
|
|
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, UnreleasedApp 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, UnitRef as it, yesAllowed as j, GitPosition as k, ServiceAdapter as l, DisplayChoice as lt, Health as m, Environment as mt, ServerHostingPort as n, PlannedChangeset as nt, Adapter as o, appBumps as ot, Delivery as p, progressBar as pt, deployState as q, PackageRegistryPort as r, StatusPlan 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 };
|
|
684
|
+
//# sourceMappingURL=static-hosting.port-mknLsxwR.d.ts.map
|