shiplane 0.0.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.
@@ -0,0 +1,96 @@
1
+ //#region src/domain/display.ts
2
+ const MOODS = [
3
+ "thinking",
4
+ "working",
5
+ "waiting",
6
+ "happy",
7
+ "worried",
8
+ "resting"
9
+ ];
10
+ const UP = "/\\/\\/";
11
+ const DOWN = "\\/\\/\\";
12
+ const FRAMES = {
13
+ thinking: [
14
+ `${UP}(•ω•) ? `,
15
+ `${UP}(•ω•) ?`,
16
+ `${DOWN}(•ω•) ? `,
17
+ `${DOWN}(•ω•) `
18
+ ],
19
+ working: [
20
+ `${UP}(•ω•)/ `,
21
+ `${UP}(•ω•)- `,
22
+ `${DOWN}(•ω•)\\ `,
23
+ `${DOWN}(•ω•)| `
24
+ ],
25
+ waiting: [
26
+ `${UP}(-ω-) z `,
27
+ `${UP}(-ω-) zz`,
28
+ `${UP}(•ω•) `,
29
+ `${UP}(-ω-) zZ`
30
+ ],
31
+ happy: [
32
+ `${UP}(^ω^) ✦ `,
33
+ `${DOWN}(^ω^) ✧ `,
34
+ `${UP}(^ω^)✦ ✧`,
35
+ `${DOWN}(^ω^) ✧ `
36
+ ],
37
+ worried: [`${UP}(°ω°) ; `, `${DOWN}(°ω°) ;;`],
38
+ resting: [`${UP}(-ω-) zZ`, `${UP}(-ω-) z`]
39
+ };
40
+ /** `done` of `total` as a bar `width` characters wide. */
41
+ const progressBar = (done, total, width) => {
42
+ const filled = total <= 0 ? width : Math.round(width * Math.min(done, total) / total);
43
+ return `${"█".repeat(filled)}${"░".repeat(width - filled)}`;
44
+ };
45
+ const columns = (text) => [...text].length;
46
+ const pad = (text, width) => text + " ".repeat(Math.max(0, width - columns(text)));
47
+ /** Any mascot as a drawing: frames merged over the hedgehog's, a function sampled for its width. */
48
+ const drawingOf = (mascot) => {
49
+ if (typeof mascot === "function") {
50
+ const sample = MOODS.flatMap((mood) => [
51
+ 0,
52
+ 1,
53
+ 2,
54
+ 3
55
+ ].map((tick) => columns(mascot({
56
+ mood,
57
+ tick,
58
+ label: ""
59
+ }))));
60
+ const width = Math.max(0, ...sample);
61
+ return {
62
+ hedgehog: false,
63
+ width,
64
+ frames: () => 4,
65
+ draw: (moment) => pad(mascot(moment), width)
66
+ };
67
+ }
68
+ const own = mascot === true ? {} : mascot;
69
+ const frames = Object.fromEntries(MOODS.map((mood) => {
70
+ const given = own[mood];
71
+ return [mood, given && given.length > 0 ? given : FRAMES[mood]];
72
+ }));
73
+ const width = Math.max(...Object.values(frames).flat().map(columns));
74
+ return {
75
+ hedgehog: mascot === true,
76
+ width,
77
+ frames: (mood) => frames[mood].length,
78
+ draw: ({ mood, tick }) => pad(frames[mood][tick % frames[mood].length] ?? "", width)
79
+ };
80
+ };
81
+ /** A flag wins over the config, which wins over the default: verbose, with the mascot. */
82
+ const resolveDisplay = (config, flags, terminal) => {
83
+ const verbose = flags.verbose ?? config.verbose ?? true;
84
+ const configured = config.mascot ?? true;
85
+ const chosen = flags.mascot === void 0 ? configured : flags.mascot !== false && (configured === false ? true : configured);
86
+ const mascot = chosen === false ? null : drawingOf(chosen);
87
+ return {
88
+ verbose,
89
+ mascot,
90
+ motion: mascot !== null && terminal.tty && !terminal.ci && !terminal.noMotion
91
+ };
92
+ };
93
+ //#endregion
94
+ export { resolveDisplay as n, progressBar as t };
95
+
96
+ //# sourceMappingURL=display-IqkJ6uCw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-IqkJ6uCw.js","names":[],"sources":["../src/domain/display.ts"],"sourcesContent":["export const MOODS = [\"thinking\", \"working\", \"waiting\", \"happy\", \"worried\", \"resting\"] as const;\n\n/** What the mascot shows beside the release: reading, running, waiting on a person, done, failed, idle. */\nexport type Mood = (typeof MOODS)[number];\n\n// Spines that rise and fall, a face, then what he holds: every frame is 13 characters wide.\nconst UP = \"/\\\\/\\\\/\";\nconst DOWN = \"\\\\/\\\\/\\\\\";\n\nconst FRAMES: Record<Mood, readonly string[]> = {\n thinking: [`${UP}(•ω•) ? `, `${UP}(•ω•) ?`, `${DOWN}(•ω•) ? `, `${DOWN}(•ω•) `],\n working: [`${UP}(•ω•)/ `, `${UP}(•ω•)- `, `${DOWN}(•ω•)\\\\ `, `${DOWN}(•ω•)| `],\n waiting: [`${UP}(-ω-) z `, `${UP}(-ω-) zz`, `${UP}(•ω•) `, `${UP}(-ω-) zZ`],\n happy: [`${UP}(^ω^) ✦ `, `${DOWN}(^ω^) ✧ `, `${UP}(^ω^)✦ ✧`, `${DOWN}(^ω^) ✧ `],\n worried: [`${UP}(°ω°) ; `, `${DOWN}(°ω°) ;;`],\n resting: [`${UP}(-ω-) zZ`, `${UP}(-ω-) z`],\n};\n\nexport const mascotFrames = (mood: Mood) => FRAMES[mood];\n\n/** The mascot at a tick of his animation, looping. */\nexport const mascotFrame = (mood: Mood, tick: number) => {\n const frames = FRAMES[mood];\n return frames[tick % frames.length] ?? \"\";\n};\n\n/** `done` of `total` as a bar `width` characters wide. */\nexport const progressBar = (done: number, total: number, width: number) => {\n const filled = total <= 0 ? width : Math.round((width * Math.min(done, total)) / total);\n return `${\"█\".repeat(filled)}${\"░\".repeat(width - filled)}`;\n};\n\n/** What is happening when the mascot is drawn. */\nexport interface MascotMoment {\n mood: Mood;\n /** Its animation frame, from 0; always 0 when motion is off. */\n tick: number;\n /** What runs right now, such as \"build 3 apps\" or \"deploy api@1.2.0 to production\". */\n label: string;\n}\n\n/**\n * A mascot of your own: frames per mood, looped as it animates, or a function drawing each moment.\n * Plain text: shiplane colours it by mood, pads it to one width, and takes any mood a set of frames\n * leaves out from the hedgehog.\n */\nexport type Mascot = Partial<Record<Mood, readonly string[]>> | ((moment: MascotMoment) => string);\n\n/** A mascot ready to draw: every mood, one width. */\nexport interface MascotDrawing {\n /** True for the built-in hedgehog, coloured part by part. */\n readonly hedgehog: boolean;\n /** Columns every frame takes. */\n readonly width: number;\n /** How many frames a mood loops through. */\n frames: (mood: Mood) => number;\n draw: (moment: MascotMoment) => string;\n}\n\nconst columns = (text: string) => [...text].length;\nconst pad = (text: string, width: number) => text + \" \".repeat(Math.max(0, width - columns(text)));\n\n/** Any mascot as a drawing: frames merged over the hedgehog's, a function sampled for its width. */\nexport const drawingOf = (mascot: Mascot | true): MascotDrawing => {\n if (typeof mascot === \"function\") {\n const sample = MOODS.flatMap((mood) =>\n [0, 1, 2, 3].map((tick) => columns(mascot({ mood, tick, label: \"\" }))),\n );\n const width = Math.max(0, ...sample);\n return {\n hedgehog: false,\n width,\n frames: () => 4,\n draw: (moment) => pad(mascot(moment), width),\n };\n }\n const own = mascot === true ? {} : mascot;\n const frames = Object.fromEntries(\n MOODS.map((mood) => {\n const given = own[mood];\n return [mood, given && given.length > 0 ? given : FRAMES[mood]];\n }),\n ) as Record<Mood, readonly string[]>;\n const width = Math.max(...Object.values(frames).flat().map(columns));\n return {\n hedgehog: mascot === true,\n width,\n frames: (mood) => frames[mood].length,\n draw: ({ mood, tick }) => pad(frames[mood][tick % frames[mood].length] ?? \"\", width),\n };\n};\n\n/** How much the release says while it runs, as `shiplane.config.ts` or a flag asks. */\nexport interface DisplayChoice {\n /** Says each thing it reads and runs, with a progress bar. */\n verbose?: boolean;\n /** The mascot beside what is happening: the hedgehog (true), none (false), or your own. */\n mascot?: boolean | Mascot;\n}\n\nexport interface Display {\n verbose: boolean;\n /** The mascot to draw, or null for none. */\n mascot: MascotDrawing | null;\n /** The mascot animates: only in a terminal, never in a CI log or under NO_MOTION. */\n motion: boolean;\n}\n\n/** A flag wins over the config, which wins over the default: verbose, with the mascot. */\nexport const resolveDisplay = (\n config: DisplayChoice,\n flags: DisplayChoice,\n terminal: { tty: boolean; ci: boolean; noMotion: boolean },\n): Display => {\n const verbose = flags.verbose ?? config.verbose ?? true;\n // A flag turns it on or off; which mascot comes from the config, the hedgehog when it says none.\n const configured = config.mascot ?? true;\n const chosen =\n flags.mascot === undefined\n ? configured\n : flags.mascot !== false && (configured === false ? true : configured);\n const mascot = chosen === false ? null : drawingOf(chosen);\n return {\n verbose,\n mascot,\n motion: mascot !== null && terminal.tty && !terminal.ci && !terminal.noMotion,\n };\n};\n"],"mappings":";AAAA,MAAa,QAAQ;CAAC;CAAY;CAAW;CAAW;CAAS;CAAW;CAAU;AAMtF,MAAM,KAAK;AACX,MAAM,OAAO;AAEb,MAAM,SAA0C;CAC9C,UAAU;EAAC,GAAG,GAAG;EAAW,GAAG,GAAG;EAAW,GAAG,KAAK;EAAW,GAAG,KAAK;EAAU;CAClF,SAAS;EAAC,GAAG,GAAG;EAAW,GAAG,GAAG;EAAW,GAAG,KAAK;EAAY,GAAG,KAAK;EAAU;CAClF,SAAS;EAAC,GAAG,GAAG;EAAW,GAAG,GAAG;EAAW,GAAG,GAAG;EAAW,GAAG,GAAG;EAAU;CAC7E,OAAO;EAAC,GAAG,GAAG;EAAW,GAAG,KAAK;EAAW,GAAG,GAAG;EAAW,GAAG,KAAK;EAAU;CAC/E,SAAS,CAAC,GAAG,GAAG,WAAW,GAAG,KAAK,UAAU;CAC7C,SAAS,CAAC,GAAG,GAAG,WAAW,GAAG,GAAG,UAAU;CAC5C;;AAWD,MAAa,eAAe,MAAc,OAAe,UAAkB;CACzE,MAAM,SAAS,SAAS,IAAI,QAAQ,KAAK,MAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,GAAI,MAAM;AACvF,QAAO,GAAG,IAAI,OAAO,OAAO,GAAG,IAAI,OAAO,QAAQ,OAAO;;AA8B3D,MAAM,WAAW,SAAiB,CAAC,GAAG,KAAK,CAAC;AAC5C,MAAM,OAAO,MAAc,UAAkB,OAAO,IAAI,OAAO,KAAK,IAAI,GAAG,QAAQ,QAAQ,KAAK,CAAC,CAAC;;AAGlG,MAAa,aAAa,WAAyC;AACjE,KAAI,OAAO,WAAW,YAAY;EAChC,MAAM,SAAS,MAAM,SAAS,SAC5B;GAAC;GAAG;GAAG;GAAG;GAAE,CAAC,KAAK,SAAS,QAAQ,OAAO;GAAE;GAAM;GAAM,OAAO;GAAI,CAAC,CAAC,CAAC,CACvE;EACD,MAAM,QAAQ,KAAK,IAAI,GAAG,GAAG,OAAO;AACpC,SAAO;GACL,UAAU;GACV;GACA,cAAc;GACd,OAAO,WAAW,IAAI,OAAO,OAAO,EAAE,MAAM;GAC7C;;CAEH,MAAM,MAAM,WAAW,OAAO,EAAE,GAAG;CACnC,MAAM,SAAS,OAAO,YACpB,MAAM,KAAK,SAAS;EAClB,MAAM,QAAQ,IAAI;AAClB,SAAO,CAAC,MAAM,SAAS,MAAM,SAAS,IAAI,QAAQ,OAAO,MAAM;GAC/D,CACH;CACD,MAAM,QAAQ,KAAK,IAAI,GAAG,OAAO,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC;AACpE,QAAO;EACL,UAAU,WAAW;EACrB;EACA,SAAS,SAAS,OAAO,MAAM;EAC/B,OAAO,EAAE,MAAM,WAAW,IAAI,OAAO,MAAM,OAAO,OAAO,MAAM,WAAW,IAAI,MAAM;EACrF;;;AAoBH,MAAa,kBACX,QACA,OACA,aACY;CACZ,MAAM,UAAU,MAAM,WAAW,OAAO,WAAW;CAEnD,MAAM,aAAa,OAAO,UAAU;CACpC,MAAM,SACJ,MAAM,WAAW,KAAA,IACb,aACA,MAAM,WAAW,UAAU,eAAe,QAAQ,OAAO;CAC/D,MAAM,SAAS,WAAW,QAAQ,OAAO,UAAU,OAAO;AAC1D,QAAO;EACL;EACA;EACA,QAAQ,WAAW,QAAQ,SAAS,OAAO,CAAC,SAAS,MAAM,CAAC,SAAS;EACtE"}
@@ -0,0 +1,214 @@
1
+ import { I as CiPipelinePort, L as CodeHostPort, O as SourceControlPort, X as Approval, Y as DecidedBy, a as VersioningPort, c as DeliveryAdapter, ct as ReleaseUnit, d as DecideContext, f as Decision, g as JobInput, h as Job, i as MobileDistributionPort, l as ServiceAdapter, lt as DisplayChoice, m as Health, mt as Environment, n as ServerHostingPort, o as Adapter, r as PackageRegistryPort, t as StaticHostingPort, tt as AppBump, v as Requirement, x as VersionContribution, y as Resolved } from "./static-hosting.port-mknLsxwR.js";
2
+ import { z, z as z$1 } from "zod";
3
+
4
+ //#region src/application/config/perEnv.d.ts
5
+ /** A value that is the same everywhere, or written once per environment. */
6
+ declare const perEnv: <Value extends z.ZodType>(value: Value) => z.ZodUnion<readonly [Value, z.ZodObject<{
7
+ preview: Value;
8
+ production: Value;
9
+ }, z.core.$strict>]>;
10
+ type PerEnv<Value> = Value | Record<Environment, Value>;
11
+ //#endregion
12
+ //#region src/modules/module.d.ts
13
+ /** What a module's per-app stages are told: the app, its tag, its settings for that environment. */
14
+ type AppInput = JobInput<Record<string, unknown>>;
15
+ /** Where a tag lands, as a person reads it, and the jobs that ship it there. */
16
+ interface ShipPlan {
17
+ where: string;
18
+ jobs: Job[];
19
+ }
20
+ /** An app a ship just triggered on an environment. */
21
+ interface Shipped {
22
+ unit: ReleaseUnit;
23
+ tag: string;
24
+ environment: Environment;
25
+ }
26
+ /** One thing done once apps ship, as data: a ship runs it, a plan only lists it. */
27
+ interface FollowUp {
28
+ label: string;
29
+ run: () => Promise<void>;
30
+ }
31
+ /** Creates the port an adapter gives, for this repository. */
32
+ type Open = <Port>(adapter: Adapter<Port>) => Port;
33
+ /** What a feature is told once apps ship. */
34
+ interface AfterShipContext {
35
+ /** Subjects of the commits after `from` up to `to` whose files can reach what an app ships. */
36
+ subjectsReaching: (unit: ReleaseUnit, from: string, to: string) => Promise<string[]>;
37
+ open: Open;
38
+ /** How a tag names a version, such as `{name}@{version}`. */
39
+ tagFormat: string;
40
+ }
41
+ /**
42
+ * What gets released: the apps whose unit file names it. Every stage is optional; the release flow
43
+ * owns their order, and the order of `modules` is the release order.
44
+ */
45
+ interface ReleaseModule {
46
+ readonly type: "module";
47
+ /** What an app's unit file names: its kind, or a name the config gives it. */
48
+ readonly name: string;
49
+ /** "backend-service", "mobile-app". */
50
+ readonly kind: string;
51
+ /** The provider its apps ship with, as output names it: "fly". */
52
+ readonly provider: string;
53
+ /** What its apps' unit files hold besides `module`. */
54
+ readonly settings: z.ZodObject;
55
+ /** The adapters it was given. */
56
+ readonly adapters: readonly Adapter<unknown>[];
57
+ /** Set when its own platform, not deploy records, knows what is live. */
58
+ readonly decidedBy?: DecidedBy;
59
+ /** Set when nothing deploys its apps: a release versions and tags them, nothing more. */
60
+ readonly releaseOnly?: boolean;
61
+ /** Billed minutes of a CI deploy, used until a run has been measured. */
62
+ readonly typicalMinutes?: number;
63
+ /** Tools and sign-ins it needs, given the apps that name it. */
64
+ readonly requirements?: (apps: readonly ReleaseUnit[]) => Requirement[];
65
+ /** Files a release may change after a tag without changing what ships. Relative to the root. */
66
+ readonly versionFiles?: (unit: ReleaseUnit, units: readonly ReleaseUnit[], open: Open) => string[];
67
+ /** Adds to the release PR, given the app's bump in it when there is one. */
68
+ readonly version?: (context: DecideContext, input: AppInput & {
69
+ bump: AppBump | undefined;
70
+ chosen?: string;
71
+ }) => Promise<VersionContribution>;
72
+ /** The tagged version runs on the environment, read from its platform; else deploy records say. */
73
+ readonly live?: (context: DecideContext, input: AppInput) => Promise<boolean>;
74
+ /** Decides what an app needs; without it, deploy records decide and `ship` runs. */
75
+ readonly decide?: (context: DecideContext, input: AppInput) => Promise<Decision>;
76
+ /** Where a tag lands and the jobs that ship it: data, never run by the module itself. */
77
+ readonly ship: (context: DecideContext, input: AppInput) => ShipPlan;
78
+ /** How the tagged version does on preview, read before promoting it. Null when nothing says. */
79
+ readonly health?: (context: DecideContext, input: AppInput) => Promise<Health | null>;
80
+ /** What `status --json` shows for an app, read from its platform. */
81
+ readonly inspect?: (context: DecideContext, input: AppInput) => Promise<unknown>;
82
+ }
83
+ /** What happens around a release, after the ship, such as telling issues what shipped. */
84
+ interface Feature {
85
+ readonly type: "feature";
86
+ readonly name: string;
87
+ /** The adapters it was given, for doctor to check. */
88
+ readonly adapters: readonly Adapter<unknown>[];
89
+ readonly requirements?: () => Requirement[];
90
+ /** What to do once apps ship: it only reads, a ship runs each one, a plan lists them. */
91
+ readonly afterShip: (context: AfterShipContext, shipped: readonly Shipped[]) => Promise<FollowUp[]>;
92
+ }
93
+ /** How the release itself runs: versions, tags, the release PR, GitHub releases, CI. */
94
+ interface ReleaseFlow {
95
+ readonly type: "flow";
96
+ readonly sourceControl: ServiceAdapter<SourceControlPort>;
97
+ readonly codeHost: ServiceAdapter<CodeHostPort>;
98
+ readonly ciPipeline: ServiceAdapter<CiPipelinePort>;
99
+ readonly versioning: ServiceAdapter<VersioningPort>;
100
+ /** "required": someone else approves the release PR, so shiplane never merges it itself. */
101
+ readonly approval: Approval;
102
+ }
103
+ //#endregion
104
+ //#region src/application/config/defineRelease.d.ts
105
+ /** How a repository releases: the flow, what gets released in order, and what happens around it. */
106
+ interface ReleaseConfig {
107
+ /** Folders to look in, `dir/*` or exact. Without it, the workspace file decides. */
108
+ units?: string[];
109
+ /** How the release itself runs: an adapter per port, each from its plugin. */
110
+ flow: ReleaseFlow;
111
+ /** What gets released, in this order. The first app is the repository's Latest release. */
112
+ modules: ReleaseModule[];
113
+ /** What happens around a release, after the ship, in this order. */
114
+ features?: Feature[];
115
+ /** How a tag names a version: `{name}@{version}` when absent, or e.g. `v{version}`, `{name}--v{version}`. */
116
+ tag?: string;
117
+ /**
118
+ * A unit whose folder changed with no changeset naming it: `"ignore"` (the default, as changesets
119
+ * does) leaves it, `"release"` offers it with a changelog from its commits.
120
+ */
121
+ commitsWithoutChangeset?: "release" | "ignore";
122
+ /** How much the release says while it runs; `--verbose` and `--mascot` (or `--no-…`) override. */
123
+ display?: DisplayChoice;
124
+ }
125
+ declare const defineRelease: (config: ReleaseConfig) => ReleaseConfig;
126
+ //#endregion
127
+ //#region src/adapters/defineDelivery.d.ts
128
+ /**
129
+ * What an adapter author writes in one object: the recipe's static parts (name, settings, what init
130
+ * and doctor ask) and the port's members, which read the settings typed.
131
+ */
132
+ type Authored<Port extends {
133
+ capability: string;
134
+ }, Schema extends z.ZodObject> = Omit<Port, "capability"> & Omit<DeliveryAdapter<Port>, "create" | "settings" | "capability"> & {
135
+ readonly settings: Schema;
136
+ };
137
+ type Typed<Schema extends z.ZodObject> = Resolved<z.output<Schema>>;
138
+ declare const defineServerHosting: <const Schema extends z.ZodObject>(adapter: Authored<ServerHostingPort<Typed<Schema>>, Schema>) => DeliveryAdapter<ServerHostingPort>;
139
+ declare const defineStaticHosting: <const Schema extends z.ZodObject>(adapter: Authored<StaticHostingPort<Typed<Schema>>, Schema>) => DeliveryAdapter<StaticHostingPort>;
140
+ declare const defineMobileDistribution: <const Schema extends z.ZodObject>(adapter: Authored<MobileDistributionPort<Typed<Schema>>, Schema> & Required<Pick<DeliveryAdapter<MobileDistributionPort>, "decidedBy">>) => DeliveryAdapter<MobileDistributionPort>;
141
+ declare const definePackageRegistry: <const Schema extends z.ZodObject>(adapter: Authored<PackageRegistryPort<Typed<Schema>>, Schema>) => DeliveryAdapter<PackageRegistryPort>;
142
+ //#endregion
143
+ //#region src/application/releaseFlow.d.ts
144
+ /** How the release itself runs, given an adapter for each port it runs on. */
145
+ declare const releaseFlow: (ports: {
146
+ sourceControl: ServiceAdapter<SourceControlPort>;
147
+ codeHost: ServiceAdapter<CodeHostPort>;
148
+ ciPipeline: ServiceAdapter<CiPipelinePort>;
149
+ versioning: ServiceAdapter<VersioningPort>; /** "required" when someone else approves the release PR; "none", the default, merges it here. */
150
+ approval?: Approval;
151
+ }) => ReleaseFlow;
152
+ //#endregion
153
+ //#region src/modules/deliveryModule.d.ts
154
+ /** What every module of apps takes besides its adapter: a name, when two of a kind sit side by side. */
155
+ interface Named {
156
+ /** What an app's unit file names; the module's kind by default. */
157
+ name?: string;
158
+ }
159
+ //#endregion
160
+ //#region src/modules/backend-service/backend-service.module.d.ts
161
+ /** A long-lived service, such as an API: deployed from its tag, recorded with the code host. */
162
+ declare const backendService: ({
163
+ name,
164
+ serverHosting
165
+ }: Named & {
166
+ serverHosting: DeliveryAdapter<ServerHostingPort>;
167
+ }) => ReleaseModule;
168
+ //#endregion
169
+ //#region src/modules/internal-tool/internal-tool.module.d.ts
170
+ /**
171
+ * An app nothing deploys, such as a CLI run from the repository: a release versions it, tags it and
172
+ * publishes its notes, and every environment counts it as shipped once tagged.
173
+ */
174
+ declare const internalTool: ({
175
+ name
176
+ }?: Named) => ReleaseModule;
177
+ //#endregion
178
+ //#region src/modules/mobile-app/mobile-app.module.d.ts
179
+ /**
180
+ * A mobile app: its distribution decides between a store build and an over-the-air update, adds to
181
+ * the release PR, and says how a version does before it is promoted.
182
+ */
183
+ declare const mobileApp: ({
184
+ name,
185
+ mobileDistribution
186
+ }: Named & {
187
+ mobileDistribution: DeliveryAdapter<MobileDistributionPort>;
188
+ }) => ReleaseModule;
189
+ //#endregion
190
+ //#region src/modules/published-package/published-package.module.d.ts
191
+ /** A package others install: its registry, not deploy records, knows what is out. */
192
+ declare const publishedPackage: ({
193
+ name,
194
+ packageRegistry
195
+ }: Named & {
196
+ packageRegistry: DeliveryAdapter<PackageRegistryPort>;
197
+ }) => ReleaseModule;
198
+ //#endregion
199
+ //#region src/modules/web-app/web-app.module.d.ts
200
+ /** A static site, built against the environment it ships to. */
201
+ declare const webApp: ({
202
+ name,
203
+ staticHosting
204
+ }: Named & {
205
+ staticHosting: DeliveryAdapter<StaticHostingPort>;
206
+ }) => ReleaseModule;
207
+ //#endregion
208
+ //#region src/adapters/server-hosting/shell-server-hosting.adapter.d.ts
209
+ /** Anything a command ships: the escape hatch until a host has its own adapter. */
210
+ type ShellServerHostingAdapter = DeliveryAdapter<ServerHostingPort>;
211
+ declare const shellServerHosting: () => ShellServerHostingAdapter;
212
+ //#endregion
213
+ export { perEnv as C, PerEnv as S, FollowUp as _, mobileApp as a, ReleaseModule as b, releaseFlow as c, defineServerHosting as d, defineStaticHosting as f, Feature as g, AfterShipContext as h, publishedPackage as i, defineMobileDistribution as l, defineRelease as m, shellServerHosting as n, internalTool as o, ReleaseConfig as p, webApp as r, backendService as s, z$1 as t, definePackageRegistry as u, Open as v, Shipped as x, ReleaseFlow as y };
214
+ //# sourceMappingURL=index-D4qsXAis.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { I as CiPipelinePort, L as CodeHostPort, O as SourceControlPort, a as VersioningPort, c as DeliveryAdapter, ct as ReleaseUnit, dt as MascotMoment, i as MobileDistributionPort, l as ServiceAdapter, mt as Environment, n as ServerHostingPort, o as Adapter, r as PackageRegistryPort, s as AdapterContext, t as StaticHostingPort, ut as Mascot } from "./static-hosting.port-mknLsxwR.js";
2
+ import { C as perEnv, S as PerEnv, a as mobileApp, b as ReleaseModule, c as releaseFlow, d as defineServerHosting, f as defineStaticHosting, g as Feature, i as publishedPackage, l as defineMobileDistribution, m as defineRelease, n as shellServerHosting, o as internalTool, p as ReleaseConfig, r as webApp, s as backendService, t as z, u as definePackageRegistry, y as ReleaseFlow } from "./index-D4qsXAis.js";
3
+ export { Adapter, AdapterContext, CiPipelinePort, CodeHostPort, DeliveryAdapter, Environment, Feature, Mascot, MascotMoment, MobileDistributionPort, PackageRegistryPort, PerEnv, ReleaseConfig, ReleaseFlow, ReleaseModule, ReleaseUnit, ServerHostingPort, ServiceAdapter, SourceControlPort, StaticHostingPort, VersioningPort, backendService, defineMobileDistribution, definePackageRegistry, defineRelease, defineServerHosting, defineStaticHosting, internalTool, mobileApp, perEnv, publishedPackage, releaseFlow, shellServerHosting, webApp, z };
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import { t as perEnv } from "./perEnv-B7AiYnW_.js";
2
+ import { n as internalTool, r as defineRelease, t as z } from "./src-CGASfBy2.js";
3
+ import { a as defineStaticHosting, i as defineServerHosting, n as defineMobileDistribution, r as definePackageRegistry, t as shellServerHosting } from "./shell-server-hosting.adapter-DobfDqFm.js";
4
+ import { a as releaseFlow, i as backendService, n as publishedPackage, r as mobileApp, t as webApp } from "./web-app.module-6KrXIU7j.js";
5
+ export { backendService, defineMobileDistribution, definePackageRegistry, defineRelease, defineServerHosting, defineStaticHosting, internalTool, mobileApp, perEnv, publishedPackage, releaseFlow, shellServerHosting, webApp, z };
@@ -0,0 +1,6 @@
1
+ //#region src/domain/issues.ts
2
+ const issueName = ({ repository, number }) => `${repository}#${number}`;
3
+ //#endregion
4
+ export { issueName as t };
5
+
6
+ //# sourceMappingURL=issues-TcWtMTv5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-TcWtMTv5.js","names":[],"sources":["../src/domain/issues.ts"],"sourcesContent":["/** An issue or pull request, by repository: `owner/name` and its number. */\nexport interface IssueRef {\n repository: string;\n number: number;\n}\n\n/** A merged pull request, as a release reads which issues it relates to. */\nexport interface LinkedPr extends IssueRef {\n body: string;\n /** The issues GitHub says it closes. */\n closes: IssueRef[];\n}\n\nexport const issueName = ({ repository, number }: IssueRef) => `${repository}#${number}`;\n"],"mappings":";AAaA,MAAa,aAAa,EAAE,YAAY,aAAuB,GAAG,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ import { c as ciPipelineFake, d as codeHostFake, i as serverHostingFake, n as mobileDistributionFake, o as versioningFake, p as sourceControlFake, r as staticHostingFake, t as packageRegistryFake } from "./package-registry.fake-CC37ptzf.js";
2
+ export { ciPipelineFake as ciPipelineMemory, codeHostFake as codeHostMemory, mobileDistributionFake as mobileDistributionMemory, packageRegistryFake as packageRegistryMemory, serverHostingFake as serverHostingMemory, sourceControlFake as sourceControlMemory, staticHostingFake as staticHostingMemory, versioningFake as versioningMemory };
package/dist/memory.js ADDED
@@ -0,0 +1,2 @@
1
+ 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-Ciqc4ujx.js";
2
+ export { ciPipelineFake as ciPipelineMemory, codeHostFake as codeHostMemory, mobileDistributionFake as mobileDistributionMemory, packageRegistryFake as packageRegistryMemory, serverHostingFake as serverHostingMemory, sourceControlFake as sourceControlMemory, staticHostingFake as staticHostingMemory, versioningFake as versioningMemory };