@ebay-dt/bonfire-node 0.1.0-alpha.0 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -4
- package/dist/agent-service.d.ts +42 -0
- package/dist/agent-service.d.ts.map +1 -0
- package/dist/agent-service.js +116 -0
- package/dist/agent-service.js.map +1 -0
- package/dist/claude.d.ts +50 -0
- package/dist/claude.d.ts.map +1 -0
- package/dist/claude.js +119 -0
- package/dist/claude.js.map +1 -0
- package/dist/cursor.d.ts +30 -0
- package/dist/cursor.d.ts.map +1 -0
- package/dist/cursor.js +57 -0
- package/dist/cursor.js.map +1 -0
- package/dist/deployment-provider.d.ts +32 -0
- package/dist/deployment-provider.d.ts.map +1 -0
- package/dist/deployment-provider.js +167 -0
- package/dist/deployment-provider.js.map +1 -0
- package/dist/duplicate.d.ts +3 -2
- package/dist/duplicate.d.ts.map +1 -1
- package/dist/duplicate.js +18 -18
- package/dist/duplicate.js.map +1 -1
- package/dist/executable.d.ts +16 -0
- package/dist/executable.d.ts.map +1 -0
- package/dist/executable.js +65 -0
- package/dist/executable.js.map +1 -0
- package/dist/github-cli.d.ts.map +1 -1
- package/dist/github-cli.js +23 -3
- package/dist/github-cli.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/owned-destination.d.ts +2 -2
- package/dist/internal/owned-destination.d.ts.map +1 -1
- package/dist/internal/owned-destination.js +2 -2
- package/dist/internal/owned-destination.js.map +1 -1
- package/dist/internal/prototype-templates.d.ts +3 -2
- package/dist/internal/prototype-templates.d.ts.map +1 -1
- package/dist/internal/prototype-templates.js +13 -8
- package/dist/internal/prototype-templates.js.map +1 -1
- package/dist/internal/utils.d.ts +2 -0
- package/dist/internal/utils.d.ts.map +1 -1
- package/dist/internal/utils.js +6 -0
- package/dist/internal/utils.js.map +1 -1
- package/dist/lifecycle/local-prototype-lifecycle.d.ts +22 -10
- package/dist/lifecycle/local-prototype-lifecycle.d.ts.map +1 -1
- package/dist/lifecycle/local-prototype-lifecycle.js +255 -6
- package/dist/lifecycle/local-prototype-lifecycle.js.map +1 -1
- package/dist/preferences.d.ts +19 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +182 -0
- package/dist/preferences.js.map +1 -0
- package/dist/prototype-catalog.d.ts.map +1 -1
- package/dist/prototype-catalog.js +18 -7
- package/dist/prototype-catalog.js.map +1 -1
- package/dist/prototype-paths.d.ts +2 -0
- package/dist/prototype-paths.d.ts.map +1 -1
- package/dist/prototype-paths.js.map +1 -1
- package/dist/scaffold.d.ts +4 -2
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +7 -12
- package/dist/scaffold.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owned-destination.d.ts","sourceRoot":"","sources":["../../src/internal/owned-destination.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"owned-destination.d.ts","sourceRoot":"","sources":["../../src/internal/owned-destination.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAY/B,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,uBAAuB,CAAC;IACjC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,cAGC;CACF;AAkCD,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAiBnC;AA6DD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAOf;AAsCD,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,uBAAuB,EAChC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,GAAG,EAAE,YAAY,EACjB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAqF5B"}
|
|
@@ -149,7 +149,7 @@ async function validateTree(path) {
|
|
|
149
149
|
await validateTree(join(path, name));
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
export async function validateOwnedDestination(receipt, expectedFiles, ref) {
|
|
152
|
+
export async function validateOwnedDestination(receipt, expectedFiles, ref, themeRegistry) {
|
|
153
153
|
const root = await currentOwnedRoot(receipt);
|
|
154
154
|
if (root === null)
|
|
155
155
|
throw new OwnedDestinationError();
|
|
@@ -217,7 +217,7 @@ export async function validateOwnedDestination(receipt, expectedFiles, ref) {
|
|
|
217
217
|
}
|
|
218
218
|
let parsed;
|
|
219
219
|
try {
|
|
220
|
-
parsed = parsePrototypeMetadata(metadata);
|
|
220
|
+
parsed = parsePrototypeMetadata(metadata, { themeRegistry });
|
|
221
221
|
}
|
|
222
222
|
catch {
|
|
223
223
|
throw new OwnedDestinationError();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owned-destination.js","sourceRoot":"","sources":["../../src/internal/owned-destination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EA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IAAI,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,qBAAqB,EAAE,CAAC;QACpC,CAAC;IACH,CAAC;IACD,IACE,WAAW,KAAK,IAAI;QACpB,WAAW,KAAK,SAAS;QACzB,CAAC,WAAW,CAAC,MAAM,EAAE,EACrB,CAAC;QACD,MAAM,IAAI,qBAAqB,EAAE,CAAC;IACpC,CAAC;IAED,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC;QACH,QAAQ,GAAG,IAAI,CAAC,KAAK,CACnB,MAAM,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAC3D,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,qBAAqB,EAAE,CAAC;IACpC,CAAC;IACD,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,sBAAsB,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,qBAAqB,EAAE,CAAC;IACpC,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,KAAK,GAAG,CAAC,KAAK;QAAE,MAAM,IAAI,qBAAqB,EAAE,CAAC;IACxE,IAAI,CAAC,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/C,MAAM,IAAI,qBAAqB,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { PrototypeMetadata, PrototypeRef } from "@ebay-dt/bonfire-core";
|
|
1
2
|
export declare const GENERATED_FILES: readonly ["page.tsx", "app.tsx", "app.module.css", "components/.gitkeep", "metadata.json", "tsconfig.json", "css-modules.d.ts"];
|
|
2
3
|
export declare const COPYABLE_IMPLEMENTATION_FILES: readonly ["page.tsx", "app.tsx", "app.module.css"];
|
|
3
4
|
export declare function buildPageTsx(): string;
|
|
4
|
-
export declare function buildAppTsx(title: string, description: string | null): string;
|
|
5
|
+
export declare function buildAppTsx(title: string, description: string | null, ref: PrototypeRef): string;
|
|
5
6
|
export declare function buildAppCss(): string;
|
|
6
|
-
export declare function buildMetadataJson(title: string, description: string | null, authorLogin: string, authorName: string | null, timestamp: string): string;
|
|
7
|
+
export declare function buildMetadataJson(title: string, description: string | null, authorLogin: string, authorName: string | null, timestamp: string, theme?: PrototypeMetadata["theme"]): string;
|
|
7
8
|
export declare function buildTsConfig(repositoryRoot: string, destination: string): string;
|
|
8
9
|
export declare function buildCssModulesDeclaration(): string;
|
|
9
10
|
//# sourceMappingURL=prototype-templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prototype-templates.d.ts","sourceRoot":"","sources":["../../src/internal/prototype-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prototype-templates.d.ts","sourceRoot":"","sources":["../../src/internal/prototype-templates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE7E,eAAO,MAAM,eAAe,YAC1B,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,kBAAkB,CACV,CAAC;AAEX,eAAO,MAAM,6BAA6B,YACxC,UAAU,EACV,SAAS,EACT,gBAAgB,CACR,CAAC;AAEX,wBAAgB,YAAY,WAO3B;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,GAAG,EAAE,YAAY,UAsBlB;AAED,wBAAgB,WAAW,WAS1B;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,UAanC;AAED,wBAAgB,aAAa,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAMxE;AAED,wBAAgB,0BAA0B,WAMzC"}
|
|
@@ -21,19 +21,23 @@ export default function Page() {
|
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
23
|
}
|
|
24
|
-
export function buildAppTsx(title, description) {
|
|
25
|
-
const descriptionMarkup = description === null
|
|
26
|
-
? ""
|
|
27
|
-
: `
|
|
28
|
-
<p>{${JSON.stringify(description)}}</p>`;
|
|
24
|
+
export function buildAppTsx(title, description, ref) {
|
|
29
25
|
return `"use client";
|
|
30
26
|
|
|
27
|
+
import { PrototypeOnboardingCard } from "@ebay-dt/bonfire-react";
|
|
31
28
|
import styles from "./app.module.css";
|
|
32
29
|
|
|
33
30
|
export default function App() {
|
|
34
31
|
return (
|
|
35
32
|
<main className={styles.container}>
|
|
36
|
-
<
|
|
33
|
+
<PrototypeOnboardingCard
|
|
34
|
+
title={${JSON.stringify(title)}}
|
|
35
|
+
description={${JSON.stringify(description)}}
|
|
36
|
+
prototypeRef={{
|
|
37
|
+
login: ${JSON.stringify(ref.login)},
|
|
38
|
+
slug: ${JSON.stringify(ref.slug)},
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
37
41
|
</main>
|
|
38
42
|
);
|
|
39
43
|
}
|
|
@@ -43,13 +47,13 @@ export function buildAppCss() {
|
|
|
43
47
|
return `.container {
|
|
44
48
|
display: grid;
|
|
45
49
|
gap: 1rem;
|
|
46
|
-
min-
|
|
50
|
+
min-block-size: calc(100svh - var(--app-header-block-size, 0));
|
|
47
51
|
place-content: center;
|
|
48
52
|
padding: 2rem;
|
|
49
53
|
}
|
|
50
54
|
`;
|
|
51
55
|
}
|
|
52
|
-
export function buildMetadataJson(title, description, authorLogin, authorName, timestamp) {
|
|
56
|
+
export function buildMetadataJson(title, description, authorLogin, authorName, timestamp, theme) {
|
|
53
57
|
const metadata = {
|
|
54
58
|
title,
|
|
55
59
|
description,
|
|
@@ -58,6 +62,7 @@ export function buildMetadataJson(title, description, authorLogin, authorName, t
|
|
|
58
62
|
createdAt: timestamp,
|
|
59
63
|
updatedAt: timestamp,
|
|
60
64
|
previewUrl: null,
|
|
65
|
+
...(theme === undefined ? {} : { theme }),
|
|
61
66
|
};
|
|
62
67
|
return `${JSON.stringify(metadata, null, 2)}\n`;
|
|
63
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prototype-templates.js","sourceRoot":"","sources":["../../src/internal/prototype-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,SAAS;IACT,gBAAgB;IAChB,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,UAAU;IACV,SAAS;IACT,gBAAgB;CACR,CAAC;AAEX,MAAM,UAAU,YAAY;IAC1B,OAAO;;;;;CAKR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,WAAW,
|
|
1
|
+
{"version":3,"file":"prototype-templates.js","sourceRoot":"","sources":["../../src/internal/prototype-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,SAAS;IACT,gBAAgB;IAChB,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,UAAU;IACV,SAAS;IACT,gBAAgB;CACR,CAAC;AAEX,MAAM,UAAU,YAAY;IAC1B,OAAO;;;;;CAKR,CAAC;AACF,CAAC;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,0BAA0B;IACxC,OAAO;;;;CAIR,CAAC;AACF,CAAC"}
|
package/dist/internal/utils.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type ProcessFailure = {
|
|
|
6
6
|
message?: unknown;
|
|
7
7
|
};
|
|
8
8
|
export declare function isRecord(value: unknown): value is UnknownRecord;
|
|
9
|
+
export declare function hasErrorCode(value: unknown, code: string): boolean;
|
|
10
|
+
export declare function isFileNotFound(value: unknown): boolean;
|
|
9
11
|
export declare function isNonEmptyString(value: unknown): value is string;
|
|
10
12
|
export declare function asFailure(value: unknown): ProcessFailure;
|
|
11
13
|
export declare function isPositiveInteger(value: number): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEhE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAExD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAE/D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAElE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEhE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAExD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
package/dist/internal/utils.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export function isRecord(value) {
|
|
2
2
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3
3
|
}
|
|
4
|
+
export function hasErrorCode(value, code) {
|
|
5
|
+
return isRecord(value) && "code" in value && value.code === code;
|
|
6
|
+
}
|
|
7
|
+
export function isFileNotFound(value) {
|
|
8
|
+
return hasErrorCode(value, "ENOENT");
|
|
9
|
+
}
|
|
4
10
|
export function isNonEmptyString(value) {
|
|
5
11
|
return typeof value === "string" && value.length > 0;
|
|
6
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU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C,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { type BranchPreparationValue, type CreatePrototypeInput, type CreatePrototypeValue, type
|
|
1
|
+
import { type BranchPreparationValue, type CreatePrototypeInput, type CreatePrototypeValue, type DeletePrototypeValue, type DeploymentValue, type DirtyObservationValue, type DiscardPrototypeValue, type DuplicatePrototypeInput, type DuplicatePrototypeValue, type EditPrototypeInput, type EditPrototypeValue, type LifecycleResult, type BonfireIdentity, type PrototypeCommandInput, type SavePrototypeValue, type ThemeRegistry } from "@ebay-dt/bonfire-core";
|
|
2
2
|
import { type PrototypeCatalogLike } from "../prototype-catalog.js";
|
|
3
3
|
import type { PreparePrototypeFiles } from "../prepare-prototype-files.js";
|
|
4
|
-
|
|
4
|
+
import { type DeploymentProvider } from "../deployment-provider.js";
|
|
5
|
+
type LifecycleMethod<Input, Value> = (identity: BonfireIdentity, input: Input) => Promise<LifecycleResult<Value>>;
|
|
6
|
+
export type PrototypeLifecycle = {
|
|
5
7
|
prepareBranch(identity: BonfireIdentity): Promise<LifecycleResult<BranchPreparationValue>>;
|
|
6
|
-
create
|
|
7
|
-
duplicate
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
create: LifecycleMethod<CreatePrototypeInput, CreatePrototypeValue>;
|
|
9
|
+
duplicate: LifecycleMethod<DuplicatePrototypeInput, DuplicatePrototypeValue>;
|
|
10
|
+
edit: LifecycleMethod<EditPrototypeInput, EditPrototypeValue>;
|
|
11
|
+
delete: LifecycleMethod<PrototypeCommandInput, DeletePrototypeValue>;
|
|
12
|
+
getDirtyState: LifecycleMethod<PrototypeCommandInput, DirtyObservationValue>;
|
|
13
|
+
save: LifecycleMethod<PrototypeCommandInput, SavePrototypeValue>;
|
|
14
|
+
discard: LifecycleMethod<PrototypeCommandInput, DiscardPrototypeValue>;
|
|
15
|
+
deploy: LifecycleMethod<PrototypeCommandInput, DeploymentValue>;
|
|
16
|
+
};
|
|
12
17
|
export type LocalPrototypeLifecycleOptions = {
|
|
13
18
|
repositoryRoot: string;
|
|
14
19
|
prototypeRoot?: string;
|
|
@@ -21,15 +26,22 @@ export type LocalPrototypeLifecycleOptions = {
|
|
|
21
26
|
};
|
|
22
27
|
catalog?: PrototypeCatalogLike;
|
|
23
28
|
preparePrototypeFiles?: PreparePrototypeFiles;
|
|
29
|
+
deploymentProvider?: DeploymentProvider;
|
|
30
|
+
applicationId?: string;
|
|
31
|
+
themeRegistry?: ThemeRegistry;
|
|
24
32
|
};
|
|
25
33
|
export declare class LocalPrototypeLifecycle implements PrototypeLifecycle {
|
|
26
34
|
#private;
|
|
27
35
|
constructor(options: LocalPrototypeLifecycleOptions);
|
|
28
36
|
prepareBranch(identity: BonfireIdentity): Promise<LifecycleResult<BranchPreparationValue>>;
|
|
29
37
|
create(identity: BonfireIdentity, input: CreatePrototypeInput): Promise<LifecycleResult<CreatePrototypeValue>>;
|
|
38
|
+
edit(identity: BonfireIdentity, input: EditPrototypeInput): Promise<LifecycleResult<EditPrototypeValue>>;
|
|
39
|
+
delete(identity: BonfireIdentity, input: PrototypeCommandInput): Promise<LifecycleResult<DeletePrototypeValue>>;
|
|
30
40
|
getDirtyState(identity: BonfireIdentity, input: PrototypeCommandInput): Promise<LifecycleResult<DirtyObservationValue>>;
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
deploy(identity: BonfireIdentity, input: PrototypeCommandInput): Promise<LifecycleResult<DeploymentValue>>;
|
|
42
|
+
save(identity: BonfireIdentity, input: PrototypeCommandInput): Promise<LifecycleResult<SavePrototypeValue>>;
|
|
43
|
+
discard(identity: BonfireIdentity, input: PrototypeCommandInput): Promise<LifecycleResult<DiscardPrototypeValue>>;
|
|
33
44
|
duplicate(identity: BonfireIdentity, input: DuplicatePrototypeInput): Promise<LifecycleResult<DuplicatePrototypeValue>>;
|
|
34
45
|
}
|
|
46
|
+
export {};
|
|
35
47
|
//# sourceMappingURL=local-prototype-lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-prototype-lifecycle.d.ts","sourceRoot":"","sources":["../../src/lifecycle/local-prototype-lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-prototype-lifecycle.d.ts","sourceRoot":"","sources":["../../src/lifecycle/local-prototype-lifecycle.ts"],"names":[],"mappings":"AAIA,OAAO,EAcL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAU/B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,+BAA+B,CAAC;AAUvC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,eAAe,CAAC,KAAK,EAAE,KAAK,IAAI,CACnC,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,KAAK,KACT,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AAErC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,CACX,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACpD,MAAM,EAAE,eAAe,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;IACpE,SAAS,EAAE,eAAe,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;IAC7E,IAAI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AAQ,EAAE,eAAe,EACzB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,CA8C9C;IAEK,MAAM,CACV,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAuBhD;IAEK,aAAa,CACjB,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAWjD;IAEK,MAAM,CACV,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAkF3C;IAEK,IAAI,CACR,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAW9C;IAEK,OAAO,CACX,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAWjD;IAEK,SAAS,CACb,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC,CA8DnD;CACF"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { constants } from "node:fs";
|
|
2
|
+
import { lstat, open, rename, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
1
4
|
import { join, relative, sep } from "node:path";
|
|
2
|
-
import { definePrototypeRef, getPrototypeUrl, LifecycleInputError, lifecycleFailure, lifecycleSuccess, parseCreatePrototypeInput, parseDuplicatePrototypeInput, parseBonfireIdentity, parsePrototypeCommandInput, slugifyPrototypeTitle, PrototypeRefError, } from "@ebay-dt/bonfire-core";
|
|
5
|
+
import { definePrototypeRef, getPrototypeUrl, LifecycleInputError, lifecycleFailure, lifecycleSuccess, parseCreatePrototypeInput, parseDuplicatePrototypeInput, parseEditPrototypeInput, parseBonfireIdentity, parsePrototypeCommandInput, parsePrototypeMetadata, slugifyPrototypeTitle, PrototypeRefError, } from "@ebay-dt/bonfire-core";
|
|
3
6
|
import { commitPath, discardPath, GitRepositoryError, prepareIdentityBranch, pushBranch, } from "../git-repository.js";
|
|
4
7
|
import { duplicatePrototype, PrototypeDuplicateError } from "../duplicate.js";
|
|
5
8
|
import { PrototypeCatalog, } from "../prototype-catalog.js";
|
|
@@ -7,6 +10,7 @@ import { PrototypeScaffoldError, scaffoldPrototype } from "../scaffold.js";
|
|
|
7
10
|
import { createPrototypeLifecycleRuntime, } from "./runtime-context.js";
|
|
8
11
|
import { cleanupOwnedDestination, validateOwnedDestination, } from "../internal/owned-destination.js";
|
|
9
12
|
import { RepositoryBusyError, withRepositoryOperation, } from "./operation-gate.js";
|
|
13
|
+
import { DeploymentProviderError, } from "../deployment-provider.js";
|
|
10
14
|
function repositoryRelativePath(runtime, ref) {
|
|
11
15
|
const absolutePath = join(runtime.prototypeRoot, ref.login, ref.slug);
|
|
12
16
|
return relative(runtime.repositoryRoot, absolutePath).split(sep).join("/");
|
|
@@ -21,11 +25,120 @@ class PrototypeNotFoundError extends Error {
|
|
|
21
25
|
}
|
|
22
26
|
class PrototypeOwnershipError extends Error {
|
|
23
27
|
}
|
|
28
|
+
class PrototypeMetadataFileError extends Error {
|
|
29
|
+
}
|
|
30
|
+
class DeploymentUnavailableError extends Error {
|
|
31
|
+
}
|
|
32
|
+
function metadataPath(runtime, ref) {
|
|
33
|
+
return join(runtime.prototypeRoot, ref.login, ref.slug, "metadata.json");
|
|
34
|
+
}
|
|
35
|
+
async function assertPrototypeDirectory(runtime, ref) {
|
|
36
|
+
const paths = [
|
|
37
|
+
runtime.prototypeRoot,
|
|
38
|
+
join(runtime.prototypeRoot, ref.login),
|
|
39
|
+
join(runtime.prototypeRoot, ref.login, ref.slug),
|
|
40
|
+
];
|
|
41
|
+
try {
|
|
42
|
+
for (const path of paths) {
|
|
43
|
+
const stats = await lstat(path);
|
|
44
|
+
if (stats.isSymbolicLink() || !stats.isDirectory()) {
|
|
45
|
+
throw new PrototypeMetadataFileError();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (error instanceof PrototypeMetadataFileError)
|
|
51
|
+
throw error;
|
|
52
|
+
throw new PrototypeMetadataFileError();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function readMetadataDocument(runtime, ref, themeRegistry) {
|
|
56
|
+
const path = metadataPath(runtime, ref);
|
|
57
|
+
try {
|
|
58
|
+
const file = await open(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
59
|
+
try {
|
|
60
|
+
const source = await file.readFile("utf8");
|
|
61
|
+
const document = JSON.parse(source);
|
|
62
|
+
parsePrototypeMetadata(document, { themeRegistry });
|
|
63
|
+
if (typeof document !== "object" ||
|
|
64
|
+
document === null ||
|
|
65
|
+
Array.isArray(document)) {
|
|
66
|
+
throw new PrototypeMetadataFileError();
|
|
67
|
+
}
|
|
68
|
+
return { ...document };
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
await file.close();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error instanceof PrototypeMetadataFileError)
|
|
76
|
+
throw error;
|
|
77
|
+
throw new PrototypeMetadataFileError();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function removePrototypeDirectory(runtime, ref) {
|
|
81
|
+
await assertPrototypeDirectory(runtime, ref);
|
|
82
|
+
try {
|
|
83
|
+
await rm(join(runtime.prototypeRoot, ref.login, ref.slug), {
|
|
84
|
+
force: false,
|
|
85
|
+
recursive: true,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
throw new PrototypeMetadataFileError();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async function writeMetadataDocument(runtime, ref, document) {
|
|
93
|
+
const path = metadataPath(runtime, ref);
|
|
94
|
+
const temporaryPath = `${path}.${randomUUID()}.tmp`;
|
|
95
|
+
try {
|
|
96
|
+
const stats = await lstat(path);
|
|
97
|
+
if (stats.isSymbolicLink() || !stats.isFile()) {
|
|
98
|
+
throw new PrototypeMetadataFileError();
|
|
99
|
+
}
|
|
100
|
+
await writeFile(temporaryPath, `${JSON.stringify(document, null, 2)}\n`, {
|
|
101
|
+
encoding: "utf8",
|
|
102
|
+
flag: "wx",
|
|
103
|
+
});
|
|
104
|
+
await rename(temporaryPath, path);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (error instanceof PrototypeMetadataFileError)
|
|
108
|
+
throw error;
|
|
109
|
+
throw new PrototypeMetadataFileError();
|
|
110
|
+
}
|
|
111
|
+
finally {
|
|
112
|
+
await rm(temporaryPath, { force: true }).catch(() => undefined);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function mergeIdentityBranchToPrimary(repository, options) {
|
|
116
|
+
if (options.branch === options.primaryBranch)
|
|
117
|
+
return;
|
|
118
|
+
const hasRemote = (await repository.remotes()).some((remote) => remote.name === options.remote);
|
|
119
|
+
if (!hasRemote)
|
|
120
|
+
return;
|
|
121
|
+
await repository.checkout([options.primaryBranch]);
|
|
122
|
+
try {
|
|
123
|
+
await repository.merge([
|
|
124
|
+
options.branch,
|
|
125
|
+
"--no-ff",
|
|
126
|
+
"-m",
|
|
127
|
+
`merge: ${options.branch}`,
|
|
128
|
+
]);
|
|
129
|
+
await repository.push(options.remote, options.primaryBranch);
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
await repository.checkout([options.branch]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
24
135
|
function mapError(error) {
|
|
25
136
|
if (error instanceof PrototypeNotFoundError)
|
|
26
137
|
return "not-found";
|
|
27
138
|
if (error instanceof PrototypeOwnershipError)
|
|
28
139
|
return "forbidden";
|
|
140
|
+
if (error instanceof PrototypeMetadataFileError)
|
|
141
|
+
return "filesystem-failure";
|
|
29
142
|
if (error instanceof RepositoryBusyError)
|
|
30
143
|
return "repository-busy";
|
|
31
144
|
if (error instanceof PrototypeRefError ||
|
|
@@ -57,6 +170,12 @@ function mapError(error) {
|
|
|
57
170
|
return "invalid-input";
|
|
58
171
|
return "filesystem-failure";
|
|
59
172
|
}
|
|
173
|
+
if (error instanceof DeploymentUnavailableError) {
|
|
174
|
+
return "deployment-unavailable";
|
|
175
|
+
}
|
|
176
|
+
if (error instanceof DeploymentProviderError) {
|
|
177
|
+
return error.kind === "timeout" ? "timeout" : "deployment-failure";
|
|
178
|
+
}
|
|
60
179
|
return "unexpected-failure";
|
|
61
180
|
}
|
|
62
181
|
function resultFrom(operation) {
|
|
@@ -69,16 +188,31 @@ export class LocalPrototypeLifecycle {
|
|
|
69
188
|
#catalog;
|
|
70
189
|
#repository;
|
|
71
190
|
#preparePrototypeFiles;
|
|
191
|
+
#deploymentProvider;
|
|
192
|
+
#applicationId;
|
|
193
|
+
#themeRegistry;
|
|
72
194
|
constructor(options) {
|
|
73
195
|
const internalOptions = options;
|
|
74
196
|
this.#runtime =
|
|
75
197
|
internalOptions.runtime ??
|
|
76
198
|
createPrototypeLifecycleRuntime(internalOptions);
|
|
199
|
+
this.#themeRegistry = options.themeRegistry;
|
|
77
200
|
this.#catalog =
|
|
78
|
-
internalOptions.catalog ??
|
|
201
|
+
internalOptions.catalog ??
|
|
202
|
+
new PrototypeCatalog({
|
|
203
|
+
...this.#runtime,
|
|
204
|
+
themeRegistry: this.#themeRegistry,
|
|
205
|
+
});
|
|
79
206
|
this.#repository = this.#runtime.gitRepository;
|
|
80
207
|
this.#preparePrototypeFiles =
|
|
81
208
|
internalOptions.preparePrototypeFiles ?? (() => undefined);
|
|
209
|
+
this.#deploymentProvider = internalOptions.deploymentProvider;
|
|
210
|
+
this.#applicationId = internalOptions.applicationId;
|
|
211
|
+
if (this.#deploymentProvider &&
|
|
212
|
+
(typeof this.#applicationId !== "string" ||
|
|
213
|
+
this.#applicationId.length === 0)) {
|
|
214
|
+
throw new TypeError("applicationId must be provided when deploymentProvider is configured");
|
|
215
|
+
}
|
|
82
216
|
}
|
|
83
217
|
async #verifiedIdentity(identity) {
|
|
84
218
|
return parseBonfireIdentity(identity);
|
|
@@ -96,12 +230,14 @@ export class LocalPrototypeLifecycle {
|
|
|
96
230
|
if (normalizedInput.ref.login !== verifiedIdentity.login) {
|
|
97
231
|
throw new PrototypeOwnershipError();
|
|
98
232
|
}
|
|
99
|
-
|
|
233
|
+
const summary = await this.#catalog.getSummary(normalizedInput.ref);
|
|
234
|
+
if (!summary) {
|
|
100
235
|
throw new PrototypeNotFoundError();
|
|
101
236
|
}
|
|
102
237
|
return {
|
|
103
238
|
ref: normalizedInput.ref,
|
|
104
239
|
path: repositoryRelativePath(this.#runtime, normalizedInput.ref),
|
|
240
|
+
summary,
|
|
105
241
|
};
|
|
106
242
|
}
|
|
107
243
|
async #prepareMutationBranch(login) {
|
|
@@ -126,7 +262,7 @@ export class LocalPrototypeLifecycle {
|
|
|
126
262
|
: {}),
|
|
127
263
|
});
|
|
128
264
|
await this.#preparePrototypeFiles(frozenRequest);
|
|
129
|
-
await validateOwnedDestination(receipt, expectedFiles, request.ref);
|
|
265
|
+
await validateOwnedDestination(receipt, expectedFiles, request.ref, this.#themeRegistry);
|
|
130
266
|
}
|
|
131
267
|
catch {
|
|
132
268
|
try {
|
|
@@ -158,7 +294,7 @@ export class LocalPrototypeLifecycle {
|
|
|
158
294
|
async create(identity, input) {
|
|
159
295
|
return resultFrom(async () => {
|
|
160
296
|
const verifiedIdentity = await this.#verifiedIdentity(identity);
|
|
161
|
-
const normalizedInput = parseCreatePrototypeInput(input);
|
|
297
|
+
const normalizedInput = parseCreatePrototypeInput(input, this.#themeRegistry);
|
|
162
298
|
const ref = destinationRef(verifiedIdentity, normalizedInput.title);
|
|
163
299
|
return withRepositoryOperation(this.#runtime.repositoryRealPath, async () => {
|
|
164
300
|
if (await this.#catalog.getSummary(ref)) {
|
|
@@ -171,6 +307,8 @@ export class LocalPrototypeLifecycle {
|
|
|
171
307
|
title: normalizedInput.title,
|
|
172
308
|
description: normalizedInput.description,
|
|
173
309
|
authorName: verifiedIdentity.name,
|
|
310
|
+
theme: normalizedInput.theme,
|
|
311
|
+
themeRegistry: this.#themeRegistry,
|
|
174
312
|
});
|
|
175
313
|
await this.#prepareDestination(prepared.receipt, prepared.expectedFiles, {
|
|
176
314
|
operation: "create",
|
|
@@ -192,15 +330,125 @@ export class LocalPrototypeLifecycle {
|
|
|
192
330
|
});
|
|
193
331
|
});
|
|
194
332
|
}
|
|
333
|
+
async edit(identity, input) {
|
|
334
|
+
return resultFrom(async () => {
|
|
335
|
+
const verifiedIdentity = await this.#verifiedIdentity(identity);
|
|
336
|
+
const normalizedInput = parseEditPrototypeInput(input, this.#themeRegistry);
|
|
337
|
+
return withRepositoryOperation(this.#runtime.repositoryRealPath, async () => {
|
|
338
|
+
const { ref, path } = await this.#ownedPrototype(verifiedIdentity, {
|
|
339
|
+
ref: normalizedInput.ref,
|
|
340
|
+
});
|
|
341
|
+
const branch = await this.#prepareMutationBranch(verifiedIdentity.login);
|
|
342
|
+
await assertPrototypeDirectory(this.#runtime, ref);
|
|
343
|
+
const document = await readMetadataDocument(this.#runtime, ref, this.#themeRegistry);
|
|
344
|
+
const metadata = parsePrototypeMetadata(document, {
|
|
345
|
+
themeRegistry: this.#themeRegistry,
|
|
346
|
+
});
|
|
347
|
+
if (metadata.authorLogin !== ref.login) {
|
|
348
|
+
throw new PrototypeNotFoundError();
|
|
349
|
+
}
|
|
350
|
+
await writeMetadataDocument(this.#runtime, ref, {
|
|
351
|
+
...document,
|
|
352
|
+
title: normalizedInput.title,
|
|
353
|
+
description: normalizedInput.description,
|
|
354
|
+
updatedAt: new Date().toISOString(),
|
|
355
|
+
...(normalizedInput.theme === undefined
|
|
356
|
+
? {}
|
|
357
|
+
: { theme: normalizedInput.theme }),
|
|
358
|
+
});
|
|
359
|
+
await commitPath(this.#repository, path, `edit: ${ref.slug}`);
|
|
360
|
+
await pushBranch(this.#repository, this.#runtime.remote, branch);
|
|
361
|
+
return { edited: true, ref };
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
async delete(identity, input) {
|
|
366
|
+
return resultFrom(async () => {
|
|
367
|
+
const verifiedIdentity = await this.#verifiedIdentity(identity);
|
|
368
|
+
const normalizedInput = parsePrototypeCommandInput(input);
|
|
369
|
+
return withRepositoryOperation(this.#runtime.repositoryRealPath, async () => {
|
|
370
|
+
const { ref, path } = await this.#ownedPrototype(verifiedIdentity, normalizedInput);
|
|
371
|
+
const branch = await this.#prepareMutationBranch(verifiedIdentity.login);
|
|
372
|
+
await removePrototypeDirectory(this.#runtime, ref);
|
|
373
|
+
await commitPath(this.#repository, path, `delete: ${ref.slug}`);
|
|
374
|
+
await pushBranch(this.#repository, this.#runtime.remote, branch);
|
|
375
|
+
return { deleted: true, ref };
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
}
|
|
195
379
|
async getDirtyState(identity, input) {
|
|
196
380
|
return resultFrom(async () => {
|
|
197
|
-
const { path } = await this.#ownedPrototype(identity, input);
|
|
381
|
+
const { path, summary } = await this.#ownedPrototype(identity, input);
|
|
198
382
|
const status = await this.#repository.status([path]);
|
|
199
383
|
return {
|
|
200
384
|
status: status.files.length > 0 ? "dirty" : "clean",
|
|
385
|
+
...(summary.previewUrl !== undefined
|
|
386
|
+
? { previewUrl: summary.previewUrl }
|
|
387
|
+
: {}),
|
|
201
388
|
};
|
|
202
389
|
});
|
|
203
390
|
}
|
|
391
|
+
async deploy(identity, input) {
|
|
392
|
+
return resultFrom(async () => {
|
|
393
|
+
const verifiedIdentity = await this.#verifiedIdentity(identity);
|
|
394
|
+
const normalizedInput = parsePrototypeCommandInput(input);
|
|
395
|
+
if (!this.#deploymentProvider) {
|
|
396
|
+
throw new DeploymentUnavailableError();
|
|
397
|
+
}
|
|
398
|
+
return withRepositoryOperation(this.#runtime.repositoryRealPath, async () => {
|
|
399
|
+
const { ref, path } = await this.#ownedPrototype(verifiedIdentity, normalizedInput);
|
|
400
|
+
const branch = await this.#prepareMutationBranch(verifiedIdentity.login);
|
|
401
|
+
await assertPrototypeDirectory(this.#runtime, ref);
|
|
402
|
+
const document = await readMetadataDocument(this.#runtime, ref, this.#themeRegistry);
|
|
403
|
+
const metadata = parsePrototypeMetadata(document, {
|
|
404
|
+
themeRegistry: this.#themeRegistry,
|
|
405
|
+
});
|
|
406
|
+
if (metadata.authorLogin !== ref.login) {
|
|
407
|
+
throw new PrototypeNotFoundError();
|
|
408
|
+
}
|
|
409
|
+
await commitPath(this.#repository, path, `deploy: ${ref.slug}`);
|
|
410
|
+
await pushBranch(this.#repository, this.#runtime.remote, branch);
|
|
411
|
+
const deployment = await this.#deploymentProvider.deploy({
|
|
412
|
+
applicationId: this.#applicationId,
|
|
413
|
+
login: verifiedIdentity.login,
|
|
414
|
+
});
|
|
415
|
+
const previewUrl = new URL(getPrototypeUrl(ref).slice(1), `${deployment.url.replace(/\/+$/, "")}/`).toString();
|
|
416
|
+
let warning;
|
|
417
|
+
try {
|
|
418
|
+
await writeMetadataDocument(this.#runtime, ref, {
|
|
419
|
+
...document,
|
|
420
|
+
previewUrl,
|
|
421
|
+
updatedAt: new Date().toISOString(),
|
|
422
|
+
});
|
|
423
|
+
await commitPath(this.#repository, path, `deploy: ${ref.slug} (metadata)`);
|
|
424
|
+
await pushBranch(this.#repository, this.#runtime.remote, branch);
|
|
425
|
+
}
|
|
426
|
+
catch {
|
|
427
|
+
warning = "metadata-persistence-failed";
|
|
428
|
+
}
|
|
429
|
+
if (warning === undefined) {
|
|
430
|
+
try {
|
|
431
|
+
await mergeIdentityBranchToPrimary(this.#repository, {
|
|
432
|
+
branch,
|
|
433
|
+
primaryBranch: this.#runtime.primaryBranch,
|
|
434
|
+
remote: this.#runtime.remote,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
catch {
|
|
438
|
+
warning = "primary-merge-failed";
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return {
|
|
442
|
+
deployed: true,
|
|
443
|
+
ref,
|
|
444
|
+
previewUrl,
|
|
445
|
+
deploymentId: deployment.deploymentId,
|
|
446
|
+
readyState: deployment.readyState,
|
|
447
|
+
warning,
|
|
448
|
+
};
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
}
|
|
204
452
|
async save(identity, input) {
|
|
205
453
|
return resultFrom(async () => {
|
|
206
454
|
const { ref, path } = await this.#ownedPrototype(identity, input);
|
|
@@ -239,6 +487,7 @@ export class LocalPrototypeLifecycle {
|
|
|
239
487
|
title: normalizedInput.title,
|
|
240
488
|
description: normalizedInput.description,
|
|
241
489
|
authorName: verifiedIdentity.name,
|
|
490
|
+
themeRegistry: this.#themeRegistry,
|
|
242
491
|
});
|
|
243
492
|
await this.#prepareDestination(prepared.receipt, prepared.expectedFiles, {
|
|
244
493
|
operation: "duplicate",
|