@absolutejs/deploy 0.18.0 → 0.19.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/managedPreview.d.ts +61 -0
- package/dist/managedPreview.js +172 -0
- package/dist/managedPreview.js.map +10 -0
- package/package.json +11 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable, transport-neutral preview lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* Unlike `createPreviewFleet`, this surface does not assume that the caller can
|
|
5
|
+
* construct a Deployer for the destination. It is intended for control planes
|
|
6
|
+
* that stream an immutable artifact to a remote fleet agent and own routing in
|
|
7
|
+
* a separate edge service.
|
|
8
|
+
*/
|
|
9
|
+
export type ManagedPreviewStatus = "provisioning" | "running" | "failed" | "deleting";
|
|
10
|
+
export type ManagedPreviewRecord<Context = Record<string, unknown>, Output = unknown> = {
|
|
11
|
+
previewId: string;
|
|
12
|
+
runtimeId: string;
|
|
13
|
+
status: ManagedPreviewStatus;
|
|
14
|
+
context: Context;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
updatedAt: number;
|
|
17
|
+
expiresAt?: number;
|
|
18
|
+
releaseId?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
output?: Output;
|
|
21
|
+
error?: string;
|
|
22
|
+
};
|
|
23
|
+
export type ManagedPreviewStore<Context = Record<string, unknown>, Output = unknown> = {
|
|
24
|
+
list: () => Promise<ManagedPreviewRecord<Context, Output>[]>;
|
|
25
|
+
get: (previewId: string) => Promise<ManagedPreviewRecord<Context, Output> | null>;
|
|
26
|
+
put: (record: ManagedPreviewRecord<Context, Output>) => Promise<void>;
|
|
27
|
+
remove: (previewId: string) => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
export type ManagedPreviewPublication<Output = unknown> = {
|
|
30
|
+
releaseId: string;
|
|
31
|
+
url: string;
|
|
32
|
+
output?: Output;
|
|
33
|
+
};
|
|
34
|
+
export type CreateManagedPreviewInput<Context> = {
|
|
35
|
+
previewId: string;
|
|
36
|
+
context: Context;
|
|
37
|
+
runtimeId?: string;
|
|
38
|
+
expiresAt?: number;
|
|
39
|
+
};
|
|
40
|
+
export type ManagedPreviewFleetOptions<Context, Output> = {
|
|
41
|
+
store: ManagedPreviewStore<Context, Output>;
|
|
42
|
+
publish: (record: ManagedPreviewRecord<Context, Output>) => Promise<ManagedPreviewPublication<Output>>;
|
|
43
|
+
destroy: (record: ManagedPreviewRecord<Context, Output>) => Promise<void>;
|
|
44
|
+
createRuntimeId?: () => string;
|
|
45
|
+
clock?: () => number;
|
|
46
|
+
};
|
|
47
|
+
export type ManagedPreviewFleet<Context, Output> = {
|
|
48
|
+
create: (input: CreateManagedPreviewInput<Context>) => Promise<ManagedPreviewRecord<Context, Output>>;
|
|
49
|
+
resume: (previewId: string) => Promise<ManagedPreviewRecord<Context, Output>>;
|
|
50
|
+
teardown: (previewId: string) => Promise<void>;
|
|
51
|
+
list: () => Promise<ManagedPreviewRecord<Context, Output>[]>;
|
|
52
|
+
get: (previewId: string) => Promise<ManagedPreviewRecord<Context, Output> | null>;
|
|
53
|
+
gc: () => Promise<{
|
|
54
|
+
removed: string[];
|
|
55
|
+
errors: {
|
|
56
|
+
previewId: string;
|
|
57
|
+
error: Error;
|
|
58
|
+
}[];
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
export declare const createManagedPreviewFleet: <Context, Output = unknown>(options: ManagedPreviewFleetOptions<Context, Output>) => ManagedPreviewFleet<Context, Output>;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
for (let key of __getOwnPropNames(mod))
|
|
23
|
+
if (!__hasOwnProp.call(to, key))
|
|
24
|
+
__defProp(to, key, {
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
26
|
+
enumerable: true
|
|
27
|
+
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __require = import.meta.require;
|
|
34
|
+
|
|
35
|
+
// src/managedPreview.ts
|
|
36
|
+
var errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
37
|
+
var createManagedPreviewFleet = (options) => {
|
|
38
|
+
const clock = options.clock ?? Date.now;
|
|
39
|
+
const createRuntimeId = options.createRuntimeId ?? (() => crypto.randomUUID());
|
|
40
|
+
const operations = new Map;
|
|
41
|
+
const exclusive = async (previewId, operation) => {
|
|
42
|
+
const prior = operations.get(previewId) ?? Promise.resolve();
|
|
43
|
+
let release = () => {
|
|
44
|
+
return;
|
|
45
|
+
};
|
|
46
|
+
const current = new Promise((resolve) => {
|
|
47
|
+
release = resolve;
|
|
48
|
+
});
|
|
49
|
+
const queued = prior.then(() => current);
|
|
50
|
+
operations.set(previewId, queued);
|
|
51
|
+
await prior;
|
|
52
|
+
try {
|
|
53
|
+
return await operation();
|
|
54
|
+
} finally {
|
|
55
|
+
release();
|
|
56
|
+
if (operations.get(previewId) === queued)
|
|
57
|
+
operations.delete(previewId);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const publish = async (record) => {
|
|
61
|
+
const provisioning = {
|
|
62
|
+
...record,
|
|
63
|
+
status: "provisioning",
|
|
64
|
+
updatedAt: clock()
|
|
65
|
+
};
|
|
66
|
+
delete provisioning.error;
|
|
67
|
+
await options.store.put(provisioning);
|
|
68
|
+
try {
|
|
69
|
+
const publication = await options.publish(provisioning);
|
|
70
|
+
const running = {
|
|
71
|
+
...provisioning,
|
|
72
|
+
releaseId: publication.releaseId,
|
|
73
|
+
url: publication.url,
|
|
74
|
+
status: "running",
|
|
75
|
+
updatedAt: clock(),
|
|
76
|
+
...publication.output === undefined ? {} : { output: publication.output }
|
|
77
|
+
};
|
|
78
|
+
await options.store.put(running);
|
|
79
|
+
return running;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
const failed = {
|
|
82
|
+
...provisioning,
|
|
83
|
+
error: errorMessage(error),
|
|
84
|
+
status: "failed",
|
|
85
|
+
updatedAt: clock()
|
|
86
|
+
};
|
|
87
|
+
await options.store.put(failed);
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const create = async (input) => exclusive(input.previewId, async () => {
|
|
92
|
+
const existing = await options.store.get(input.previewId);
|
|
93
|
+
const now = clock();
|
|
94
|
+
const record = {
|
|
95
|
+
...existing ?? {
|
|
96
|
+
createdAt: now,
|
|
97
|
+
runtimeId: input.runtimeId ?? createRuntimeId()
|
|
98
|
+
},
|
|
99
|
+
context: input.context,
|
|
100
|
+
previewId: input.previewId,
|
|
101
|
+
status: "provisioning",
|
|
102
|
+
updatedAt: now,
|
|
103
|
+
...input.expiresAt === undefined ? existing?.expiresAt === undefined ? {} : { expiresAt: existing.expiresAt } : { expiresAt: input.expiresAt }
|
|
104
|
+
};
|
|
105
|
+
return publish(record);
|
|
106
|
+
});
|
|
107
|
+
const resume = async (previewId) => exclusive(previewId, async () => {
|
|
108
|
+
const record = await options.store.get(previewId);
|
|
109
|
+
if (record === null) {
|
|
110
|
+
throw new Error(`managed-preview: unknown preview ${previewId}`);
|
|
111
|
+
}
|
|
112
|
+
if (record.status === "deleting") {
|
|
113
|
+
throw new Error(`managed-preview: preview ${previewId} is deleting`);
|
|
114
|
+
}
|
|
115
|
+
return publish(record);
|
|
116
|
+
});
|
|
117
|
+
const teardown = async (previewId) => exclusive(previewId, async () => {
|
|
118
|
+
const record = await options.store.get(previewId);
|
|
119
|
+
if (record === null)
|
|
120
|
+
return;
|
|
121
|
+
const deleting = {
|
|
122
|
+
...record,
|
|
123
|
+
status: "deleting",
|
|
124
|
+
updatedAt: clock()
|
|
125
|
+
};
|
|
126
|
+
await options.store.put(deleting);
|
|
127
|
+
try {
|
|
128
|
+
await options.destroy(deleting);
|
|
129
|
+
await options.store.remove(previewId);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
await options.store.put({
|
|
132
|
+
...deleting,
|
|
133
|
+
error: errorMessage(error),
|
|
134
|
+
status: "failed",
|
|
135
|
+
updatedAt: clock()
|
|
136
|
+
});
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const gc = async () => {
|
|
141
|
+
const now = clock();
|
|
142
|
+
const expired = (await options.store.list()).filter((record) => record.expiresAt !== undefined && record.expiresAt <= now);
|
|
143
|
+
const removed = [];
|
|
144
|
+
const errors = [];
|
|
145
|
+
for (const record of expired) {
|
|
146
|
+
try {
|
|
147
|
+
await teardown(record.previewId);
|
|
148
|
+
removed.push(record.previewId);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
errors.push({
|
|
151
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
152
|
+
previewId: record.previewId
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return { errors, removed };
|
|
157
|
+
};
|
|
158
|
+
return {
|
|
159
|
+
create,
|
|
160
|
+
gc,
|
|
161
|
+
get: (previewId) => options.store.get(previewId),
|
|
162
|
+
list: () => options.store.list(),
|
|
163
|
+
resume,
|
|
164
|
+
teardown
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
export {
|
|
168
|
+
createManagedPreviewFleet
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
//# debugId=24BCDEC5036EDB5064756E2164756E21
|
|
172
|
+
//# sourceMappingURL=managedPreview.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/managedPreview.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Durable, transport-neutral preview lifecycle.\n *\n * Unlike `createPreviewFleet`, this surface does not assume that the caller can\n * construct a Deployer for the destination. It is intended for control planes\n * that stream an immutable artifact to a remote fleet agent and own routing in\n * a separate edge service.\n */\n\nexport type ManagedPreviewStatus =\n | \"provisioning\"\n | \"running\"\n | \"failed\"\n | \"deleting\";\n\nexport type ManagedPreviewRecord<\n Context = Record<string, unknown>,\n Output = unknown,\n> = {\n previewId: string;\n runtimeId: string;\n status: ManagedPreviewStatus;\n context: Context;\n createdAt: number;\n updatedAt: number;\n expiresAt?: number;\n releaseId?: string;\n url?: string;\n output?: Output;\n error?: string;\n};\n\nexport type ManagedPreviewStore<\n Context = Record<string, unknown>,\n Output = unknown,\n> = {\n list: () => Promise<ManagedPreviewRecord<Context, Output>[]>;\n get: (\n previewId: string,\n ) => Promise<ManagedPreviewRecord<Context, Output> | null>;\n put: (record: ManagedPreviewRecord<Context, Output>) => Promise<void>;\n remove: (previewId: string) => Promise<void>;\n};\n\nexport type ManagedPreviewPublication<Output = unknown> = {\n releaseId: string;\n url: string;\n output?: Output;\n};\n\nexport type CreateManagedPreviewInput<Context> = {\n previewId: string;\n context: Context;\n runtimeId?: string;\n expiresAt?: number;\n};\n\nexport type ManagedPreviewFleetOptions<Context, Output> = {\n store: ManagedPreviewStore<Context, Output>;\n publish: (\n record: ManagedPreviewRecord<Context, Output>,\n ) => Promise<ManagedPreviewPublication<Output>>;\n destroy: (record: ManagedPreviewRecord<Context, Output>) => Promise<void>;\n createRuntimeId?: () => string;\n clock?: () => number;\n};\n\nexport type ManagedPreviewFleet<Context, Output> = {\n create: (\n input: CreateManagedPreviewInput<Context>,\n ) => Promise<ManagedPreviewRecord<Context, Output>>;\n resume: (previewId: string) => Promise<ManagedPreviewRecord<Context, Output>>;\n teardown: (previewId: string) => Promise<void>;\n list: () => Promise<ManagedPreviewRecord<Context, Output>[]>;\n get: (\n previewId: string,\n ) => Promise<ManagedPreviewRecord<Context, Output> | null>;\n gc: () => Promise<{\n removed: string[];\n errors: { previewId: string; error: Error }[];\n }>;\n};\n\nconst errorMessage = (error: unknown): string =>\n error instanceof Error ? error.message : String(error);\n\nexport const createManagedPreviewFleet = <Context, Output = unknown>(\n options: ManagedPreviewFleetOptions<Context, Output>,\n): ManagedPreviewFleet<Context, Output> => {\n const clock = options.clock ?? Date.now;\n const createRuntimeId =\n options.createRuntimeId ?? (() => crypto.randomUUID());\n const operations = new Map<string, Promise<void>>();\n\n const exclusive = async <Result>(\n previewId: string,\n operation: () => Promise<Result>,\n ): Promise<Result> => {\n const prior = operations.get(previewId) ?? Promise.resolve();\n let release: () => void = () => undefined;\n const current = new Promise<void>((resolve) => {\n release = resolve;\n });\n const queued = prior.then(() => current);\n operations.set(previewId, queued);\n await prior;\n try {\n return await operation();\n } finally {\n release();\n if (operations.get(previewId) === queued) operations.delete(previewId);\n }\n };\n\n const publish = async (\n record: ManagedPreviewRecord<Context, Output>,\n ): Promise<ManagedPreviewRecord<Context, Output>> => {\n const provisioning: ManagedPreviewRecord<Context, Output> = {\n ...record,\n status: \"provisioning\",\n updatedAt: clock(),\n };\n delete provisioning.error;\n await options.store.put(provisioning);\n\n try {\n const publication = await options.publish(provisioning);\n const running: ManagedPreviewRecord<Context, Output> = {\n ...provisioning,\n releaseId: publication.releaseId,\n url: publication.url,\n status: \"running\",\n updatedAt: clock(),\n ...(publication.output === undefined\n ? {}\n : { output: publication.output }),\n };\n await options.store.put(running);\n return running;\n } catch (error) {\n const failed: ManagedPreviewRecord<Context, Output> = {\n ...provisioning,\n error: errorMessage(error),\n status: \"failed\",\n updatedAt: clock(),\n };\n await options.store.put(failed);\n throw error;\n }\n };\n\n const create = async (\n input: CreateManagedPreviewInput<Context>,\n ): Promise<ManagedPreviewRecord<Context, Output>> =>\n exclusive(input.previewId, async () => {\n const existing = await options.store.get(input.previewId);\n const now = clock();\n const record: ManagedPreviewRecord<Context, Output> = {\n ...(existing ?? {\n createdAt: now,\n runtimeId: input.runtimeId ?? createRuntimeId(),\n }),\n context: input.context,\n previewId: input.previewId,\n status: \"provisioning\",\n updatedAt: now,\n ...(input.expiresAt === undefined\n ? existing?.expiresAt === undefined\n ? {}\n : { expiresAt: existing.expiresAt }\n : { expiresAt: input.expiresAt }),\n };\n return publish(record);\n });\n\n const resume = async (\n previewId: string,\n ): Promise<ManagedPreviewRecord<Context, Output>> =>\n exclusive(previewId, async () => {\n const record = await options.store.get(previewId);\n if (record === null) {\n throw new Error(`managed-preview: unknown preview ${previewId}`);\n }\n if (record.status === \"deleting\") {\n throw new Error(`managed-preview: preview ${previewId} is deleting`);\n }\n return publish(record);\n });\n\n const teardown = async (previewId: string): Promise<void> =>\n exclusive(previewId, async () => {\n const record = await options.store.get(previewId);\n if (record === null) return;\n const deleting: ManagedPreviewRecord<Context, Output> = {\n ...record,\n status: \"deleting\",\n updatedAt: clock(),\n };\n await options.store.put(deleting);\n try {\n await options.destroy(deleting);\n await options.store.remove(previewId);\n } catch (error) {\n await options.store.put({\n ...deleting,\n error: errorMessage(error),\n status: \"failed\",\n updatedAt: clock(),\n });\n throw error;\n }\n });\n\n const gc = async (): Promise<{\n removed: string[];\n errors: { previewId: string; error: Error }[];\n }> => {\n const now = clock();\n const expired = (await options.store.list()).filter(\n (record) => record.expiresAt !== undefined && record.expiresAt <= now,\n );\n const removed: string[] = [];\n const errors: { previewId: string; error: Error }[] = [];\n for (const record of expired) {\n try {\n await teardown(record.previewId);\n removed.push(record.previewId);\n } catch (error) {\n errors.push({\n error: error instanceof Error ? error : new Error(String(error)),\n previewId: record.previewId,\n });\n }\n }\n return { errors, removed };\n };\n\n return {\n create,\n gc,\n get: (previewId) => options.store.get(previewId),\n list: () => options.store.list(),\n resume,\n teardown,\n };\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,IAAM,eAAe,CAAC,UACpB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAEhD,IAAM,4BAA4B,CACvC,YACyC;AAAA,EACzC,MAAM,QAAQ,QAAQ,SAAS,KAAK;AAAA,EACpC,MAAM,kBACJ,QAAQ,oBAAoB,MAAM,OAAO,WAAW;AAAA,EACtD,MAAM,aAAa,IAAI;AAAA,EAEvB,MAAM,YAAY,OAChB,WACA,cACoB;AAAA,IACpB,MAAM,QAAQ,WAAW,IAAI,SAAS,KAAK,QAAQ,QAAQ;AAAA,IAC3D,IAAI,UAAsB,MAAG;AAAA,MAAG;AAAA;AAAA,IAChC,MAAM,UAAU,IAAI,QAAc,CAAC,YAAY;AAAA,MAC7C,UAAU;AAAA,KACX;AAAA,IACD,MAAM,SAAS,MAAM,KAAK,MAAM,OAAO;AAAA,IACvC,WAAW,IAAI,WAAW,MAAM;AAAA,IAChC,MAAM;AAAA,IACN,IAAI;AAAA,MACF,OAAO,MAAM,UAAU;AAAA,cACvB;AAAA,MACA,QAAQ;AAAA,MACR,IAAI,WAAW,IAAI,SAAS,MAAM;AAAA,QAAQ,WAAW,OAAO,SAAS;AAAA;AAAA;AAAA,EAIzE,MAAM,UAAU,OACd,WACmD;AAAA,IACnD,MAAM,eAAsD;AAAA,SACvD;AAAA,MACH,QAAQ;AAAA,MACR,WAAW,M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AAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AAAA,UAC/D,WAAW,OAAO;AAAA,QACpB,CAAC;AAAA;AAAA,IAEL;AAAA,IACA,OAAO,EAAE,QAAQ,QAAQ;AAAA;AAAA,EAG3B,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,KAAK,CAAC,cAAc,QAAQ,MAAM,IAAI,SAAS;AAAA,IAC/C,MAAM,MAAM,QAAQ,MAAM,KAAK;AAAA,IAC/B;AAAA,IACA;AAAA,EACF;AAAA;",
|
|
8
|
+
"debugId": "24BCDEC5036EDB5064756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/deploy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Generic Bun-project deploy pipeline. A Target (localTarget / sshTarget) is anywhere you can exec + upload — DigitalOcean droplets, Linode, Hetzner, Vultr, your own boxes. Bundled pipeline: prepare → upload → install → build → link → restart → verify. Atomic symlink swap, release history, prune, hooks. SSH shells out to system ssh/rsync — zero ssh2 deps.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"release"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "rm -rf dist && bun build src/index.ts src/releaseArtifact.ts src/infrastructure.ts src/edgeIngress.ts src/digitalocean.ts src/digitaloceanInfrastructure.ts src/digitaloceanIngress.ts src/gcp.ts src/gcpIngress.ts src/hetzner.ts src/hetznerInfrastructure.ts src/linode.ts src/linodeInfrastructure.ts src/vultr.ts src/vultrInfrastructure.ts src/dns.ts src/cloudflare.ts src/digitaloceanDns.ts src/hetznerDns.ts src/route53.ts src/tls.ts src/env.ts src/preview.ts --outdir dist --root src --sourcemap --target=bun && tsc --project tsconfig.build.json",
|
|
33
|
+
"build": "rm -rf dist && bun build src/index.ts src/releaseArtifact.ts src/infrastructure.ts src/edgeIngress.ts src/digitalocean.ts src/digitaloceanInfrastructure.ts src/digitaloceanIngress.ts src/gcp.ts src/gcpIngress.ts src/hetzner.ts src/hetznerInfrastructure.ts src/linode.ts src/linodeInfrastructure.ts src/vultr.ts src/vultrInfrastructure.ts src/dns.ts src/cloudflare.ts src/digitaloceanDns.ts src/hetznerDns.ts src/route53.ts src/tls.ts src/env.ts src/preview.ts src/managedPreview.ts --outdir dist --root src --sourcemap --target=bun && tsc --project tsconfig.build.json",
|
|
34
34
|
"test": "bun test tests/",
|
|
35
35
|
"typecheck": "tsc --noEmit",
|
|
36
36
|
"format": "prettier --write \"./**/*.{ts,json,md}\"",
|
|
@@ -163,7 +163,15 @@
|
|
|
163
163
|
"types": "./dist/preview.d.ts",
|
|
164
164
|
"import": "./dist/preview.js",
|
|
165
165
|
"default": "./dist/preview.js"
|
|
166
|
+
},
|
|
167
|
+
"./managed-preview": {
|
|
168
|
+
"types": "./dist/managedPreview.d.ts",
|
|
169
|
+
"import": "./dist/managedPreview.js",
|
|
170
|
+
"default": "./dist/managedPreview.js"
|
|
166
171
|
}
|
|
167
172
|
},
|
|
168
|
-
"files": [
|
|
173
|
+
"files": [
|
|
174
|
+
"dist",
|
|
175
|
+
"README.md"
|
|
176
|
+
]
|
|
169
177
|
}
|