@feltdb/feltkit 0.3.14 → 0.3.15
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/appboundry/runtime.d.ts +5 -0
- package/dist/appboundry/runtime.js +5 -0
- package/dist/appboundry/runtime.js.map +1 -1
- package/dist/cli/deploy-appboundry-self-hosted.d.ts +16 -0
- package/dist/cli/deploy-appboundry-self-hosted.js +200 -0
- package/dist/cli/deploy-appboundry-self-hosted.js.map +1 -0
- package/dist/cli/deploy-appboundry.d.ts +106 -0
- package/dist/cli/deploy-appboundry.js +226 -0
- package/dist/cli/deploy-appboundry.js.map +1 -0
- package/dist/cli/main.js +98 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +2 -1
- package/dist/docs.js.map +1 -1
- package/docs/APPBOUNDRY-DEPLOY-CONTRACT.md +116 -0
- package/docs/APPBOUNDRY.md +46 -0
- package/docs/README.md +4 -3
- package/package.json +2 -2
- package/skills/.claude-plugin/marketplace.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
|
@@ -5,6 +5,11 @@ export declare const MINIMUM_APPBOUNDRY = "1.3.0";
|
|
|
5
5
|
export declare const MIGRATIONS_APPBOUNDRY = "1.4.0";
|
|
6
6
|
/** The first release that provides ctx.db.sequence and ctx.afterCommit (host interface transactions@1). */
|
|
7
7
|
export declare const TRANSACTIONS_APPBOUNDRY = "1.5.0";
|
|
8
|
+
/**
|
|
9
|
+
* The release `feltkit deploy --target appboundry` installs in the image it writes: pinned, so a
|
|
10
|
+
* deployment is reproducible, and the newest release FeltKit's AppBoundry end-to-end tests run.
|
|
11
|
+
*/
|
|
12
|
+
export declare const APPBOUNDRY_DEPLOY_VERSION = "1.7.3";
|
|
8
13
|
/** What to install: any 1.x from the minimum. */
|
|
9
14
|
export declare const APPBOUNDRY_RANGE = ">=1.3.0 <2.0.0";
|
|
10
15
|
export interface AppBoundryReport {
|
|
@@ -29,6 +29,11 @@ export const MINIMUM_APPBOUNDRY = "1.3.0";
|
|
|
29
29
|
export const MIGRATIONS_APPBOUNDRY = "1.4.0";
|
|
30
30
|
/** The first release that provides ctx.db.sequence and ctx.afterCommit (host interface transactions@1). */
|
|
31
31
|
export const TRANSACTIONS_APPBOUNDRY = "1.5.0";
|
|
32
|
+
/**
|
|
33
|
+
* The release `feltkit deploy --target appboundry` installs in the image it writes: pinned, so a
|
|
34
|
+
* deployment is reproducible, and the newest release FeltKit's AppBoundry end-to-end tests run.
|
|
35
|
+
*/
|
|
36
|
+
export const APPBOUNDRY_DEPLOY_VERSION = "1.7.3";
|
|
32
37
|
/** What to install: any 1.x from the minimum. */
|
|
33
38
|
export const APPBOUNDRY_RANGE = `>=${MINIMUM_APPBOUNDRY} <2.0.0`;
|
|
34
39
|
function newer(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/appboundry/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AACxD,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,0FAA0F;AAC1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAC7C,2GAA2G;AAC3G,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AAC/C,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,kBAAkB,SAAS,CAAC;AAgBjE,SAAS,KAAK,CAAC,CAAS,EAAE,CAAS;IACjC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CA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,MAAM,CAAqB,CAAC;QACtD,IAAI,OAAO,MAAM,EAAE,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACrG,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,YAAY,CAAC,eAAe,EAAE,qBAAqB,GAAG,0HAA0H,kBAAkB,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IACrP,CAAC;AACH,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,oBAAoB,CAAC,MAAwB,EAAE,KAA2B;IACxF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,YAAY,CAAC,eAAe,EAAE,GAAG,MAAM,CAAC,IAAI,IAAI,kBAAkB,IAAI,MAAM,CAAC,OAAO,8BAA8B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IAC/K,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,6CAA6C,kBAAkB,KAAK,gBAAgB,yBAAyB,kBAAkB,KAAK,kBAAkB,mBAAmB,CAAC;AACnL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ArtifactManifest } from "../appboundry/build.js";
|
|
2
|
+
export declare const APPBOUNDRY_SELF_HOSTED_TITLE = "Self-hosted AppBoundry runtime: the artifact in one Docker container you operate; data on a volume";
|
|
3
|
+
export interface AppBoundrySelfHostedResult {
|
|
4
|
+
dir: string;
|
|
5
|
+
artifact: string;
|
|
6
|
+
application: string;
|
|
7
|
+
manifest: ArtifactManifest;
|
|
8
|
+
omitted: string[];
|
|
9
|
+
runtime: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function deployAppBoundrySelfHosted(options: {
|
|
12
|
+
projectDir: string;
|
|
13
|
+
out?: string;
|
|
14
|
+
}): Promise<AppBoundrySelfHostedResult>;
|
|
15
|
+
/** The commands that give a person access, as the CLI prints them and DEPLOY.md lists them. */
|
|
16
|
+
export declare function accessCommands(composeFile: string, user?: string, role?: string): string[];
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `feltkit deploy --target appboundry-self-hosted`: the AppBoundry artifact with the published AppBoundry
|
|
3
|
+
* runtime in one Docker container, for people who operate their own execution environment.
|
|
4
|
+
*
|
|
5
|
+
* This is NOT how AppBoundry deploys. `feltkit deploy --target appboundry` (deploy-appboundry.ts) sends
|
|
6
|
+
* the artifact to the AppBoundry control plane, which owns execution; the developer never sees a
|
|
7
|
+
* container. This target exists for self-hosting, and its Docker files are its contract, nobody else's.
|
|
8
|
+
*
|
|
9
|
+
* The other targets ship this project's production build, run by FeltKit. This one ships the
|
|
10
|
+
* artifact `feltkit build --target appboundry` compiles (manifest.json, module.wasm that imports
|
|
11
|
+
* nothing, the frontend), run by the published AppBoundry runtime (@appport/appboundry). Nothing of
|
|
12
|
+
* FeltKit runs in the deployment, and nothing here is new runtime code: the Dockerfile installs the
|
|
13
|
+
* pinned runtime, and the entrypoint is the one AppBoundry's own artifact runner uses
|
|
14
|
+
* (rkendel1/appboundry deploy/artifact-runner): it refuses any module but the one this deployment
|
|
15
|
+
* was built with, verifies the whole artifact, bootstraps the operator on first start, then runs it.
|
|
16
|
+
*
|
|
17
|
+
* Written to .feltkit/deploy (replaced on every deploy; state lives in the Docker volume, never here):
|
|
18
|
+
* <name>.app/ the artifact, unchanged
|
|
19
|
+
* Dockerfile node:22 + @appport/appboundry@APPBOUNDRY_DEPLOY_VERSION + the artifact
|
|
20
|
+
* entrypoint.sh identity check, verify, first-start bootstrap, run
|
|
21
|
+
* docker-compose.yml port 3000, state on the `data` volume
|
|
22
|
+
* deploy.json what was deployed: application, module SHA-256, runtime version
|
|
23
|
+
* DEPLOY.md the target's contract: identity, access, state, upgrades, limits
|
|
24
|
+
*/
|
|
25
|
+
import { cpSync, existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
26
|
+
import { basename, join, resolve } from "node:path";
|
|
27
|
+
import { FeltKitError } from "../errors.js";
|
|
28
|
+
import { SDK_VERSION, build } from "../server/project.js";
|
|
29
|
+
import { buildAppBoundry } from "../appboundry/build.js";
|
|
30
|
+
import { APPBOUNDRY_DEPLOY_VERSION, APPBOUNDRY_PACKAGE } from "../appboundry/runtime.js";
|
|
31
|
+
import { DEPLOY_DIR } from "../runtime/deployment.js";
|
|
32
|
+
export const APPBOUNDRY_SELF_HOSTED_TITLE = "Self-hosted AppBoundry runtime: the artifact in one Docker container you operate; data on a volume";
|
|
33
|
+
const PORT = 3000;
|
|
34
|
+
export async function deployAppBoundrySelfHosted(options) {
|
|
35
|
+
const projectDir = resolve(options.projectDir);
|
|
36
|
+
const target = resolve(options.out ?? join(projectDir, DEPLOY_DIR));
|
|
37
|
+
if (options.out && existsSync(target))
|
|
38
|
+
throw new FeltKitError("CONFIGURATION", `${target} already exists; choose another --out.`);
|
|
39
|
+
const dir = options.out ? target : `${target}.next`;
|
|
40
|
+
rmSync(dir, { recursive: true, force: true });
|
|
41
|
+
mkdirSync(dir, { recursive: true });
|
|
42
|
+
// The same build and artifact as `feltkit build --target appboundry`: the module is loaded in the
|
|
43
|
+
// guest engine and must define exactly the functions the build does, or nothing is written.
|
|
44
|
+
const built = await build(projectDir);
|
|
45
|
+
const artifact = await buildAppBoundry(projectDir, { bundle: built.bundle, client: built.client, producerVersion: SDK_VERSION, outDir: dir });
|
|
46
|
+
const m = artifact.manifest;
|
|
47
|
+
const name = basename(artifact.path);
|
|
48
|
+
const application = m.application.name;
|
|
49
|
+
const moduleSha = m.module.sha256;
|
|
50
|
+
writeFileSync(join(dir, "Dockerfile"), dockerfile(name));
|
|
51
|
+
writeFileSync(join(dir, "entrypoint.sh"), ENTRYPOINT, { mode: 0o755 });
|
|
52
|
+
writeFileSync(join(dir, ".dockerignore"), "data\nnode_modules\n");
|
|
53
|
+
writeFileSync(join(dir, "docker-compose.yml"), compose(application, moduleSha));
|
|
54
|
+
writeFileSync(join(dir, "deploy.json"), JSON.stringify({ target: "appboundry-self-hosted", application, artifact: name, format: m.format, module: { sha256: moduleSha, size: m.module.size }, runtime: { package: APPBOUNDRY_PACKAGE, version: APPBOUNDRY_DEPLOY_VERSION }, producer: `feltkit ${SDK_VERSION}` }, null, 2) + "\n");
|
|
55
|
+
writeFileSync(join(dir, "DEPLOY.md"), deployMd({ application, name, manifest: m, omitted: artifact.omitted }));
|
|
56
|
+
if (!options.out) {
|
|
57
|
+
rmSync(target, { recursive: true, force: true });
|
|
58
|
+
renameSync(dir, target);
|
|
59
|
+
}
|
|
60
|
+
return { dir: target, artifact: join(target, name), application, manifest: m, omitted: artifact.omitted, runtime: APPBOUNDRY_DEPLOY_VERSION };
|
|
61
|
+
}
|
|
62
|
+
/** The commands that give a person access, as the CLI prints them and DEPLOY.md lists them. */
|
|
63
|
+
export function accessCommands(composeFile, user = "ada", role = "member") {
|
|
64
|
+
const exec = `docker compose -f ${composeFile} exec -u node app appboundry admin`;
|
|
65
|
+
return [`${exec} users add ${user} --role ${role} --state /data/state`, `${exec} sessions issue --user ${user} --state /data/state`];
|
|
66
|
+
}
|
|
67
|
+
function dockerfile(name) {
|
|
68
|
+
return `# Written by \`feltkit deploy --target appboundry-self-hosted\` (FeltKit ${SDK_VERSION}); replaced on every deploy.
|
|
69
|
+
# The published AppBoundry runtime running one artifact. No FeltKit code is in this image.
|
|
70
|
+
FROM node:22-bookworm-slim
|
|
71
|
+
ENV NODE_ENV=production
|
|
72
|
+
WORKDIR /app
|
|
73
|
+
ARG APPBOUNDRY_VERSION=${APPBOUNDRY_DEPLOY_VERSION}
|
|
74
|
+
RUN npm install --omit=dev --no-audit --no-fund ${APPBOUNDRY_PACKAGE}@\${APPBOUNDRY_VERSION} \\
|
|
75
|
+
&& ln -s /app/node_modules/.bin/appboundry /usr/local/bin/appboundry \\
|
|
76
|
+
&& npm cache clean --force
|
|
77
|
+
COPY entrypoint.sh /app/entrypoint.sh
|
|
78
|
+
COPY ${name} /app/artifact.app
|
|
79
|
+
RUN chmod 0755 /app/entrypoint.sh && mkdir -p /data && chown node:node /data
|
|
80
|
+
ENV ARTIFACT=/app/artifact.app STATE=/data/state OPERATOR_TOKEN_FILE=/data/operator-token.txt PORT=${PORT}
|
|
81
|
+
EXPOSE ${PORT}
|
|
82
|
+
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
// The entrypoint of AppBoundry's artifact runner (rkendel1/appboundry deploy/artifact-runner), unchanged
|
|
86
|
+
// in behaviour: identity check (exit 78), full verification, first-start bootstrap, run in production.
|
|
87
|
+
const ENTRYPOINT = `#!/bin/sh
|
|
88
|
+
# Starts one artifact, and refuses to if it is not the artifact this deployment asked for.
|
|
89
|
+
# EXPECTED_MODULE_SHA256 the module SHA-256 this deployment was built with (docker-compose.yml)
|
|
90
|
+
set -eu
|
|
91
|
+
ARTIFACT=\${ARTIFACT:-/app/artifact.app}
|
|
92
|
+
STATE=\${STATE:-/data/state}
|
|
93
|
+
|
|
94
|
+
# Volumes are mounted root-owned; drop to the unprivileged user before touching anything else.
|
|
95
|
+
if [ "$(id -u)" = 0 ]; then
|
|
96
|
+
chown node:node /data
|
|
97
|
+
exec runuser -u node -- "$0" "$@"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
: "\${EXPECTED_MODULE_SHA256:?set the module SHA-256 this deployment must run}"
|
|
101
|
+
actual=$(node -e 'process.stdout.write(JSON.parse(require("fs").readFileSync(process.argv[1] + "/manifest.json", "utf8")).module.sha256)' "$ARTIFACT")
|
|
102
|
+
if [ "$actual" != "$EXPECTED_MODULE_SHA256" ]; then
|
|
103
|
+
echo "refusing to start: the artifact's module is sha256:$actual, the deployment asked for sha256:$EXPECTED_MODULE_SHA256" >&2
|
|
104
|
+
exit 78
|
|
105
|
+
fi
|
|
106
|
+
# Full verification (manifest, module, program section, every asset, program matches the manifest).
|
|
107
|
+
appboundry artifact verify "$ARTIFACT"
|
|
108
|
+
|
|
109
|
+
if [ ! -e "$STATE" ]; then
|
|
110
|
+
# First start: bind the new state to production and create the operator. The operator token is
|
|
111
|
+
# shown once; it is left in a 0600 file for the person doing the deployment to collect and delete.
|
|
112
|
+
umask 077
|
|
113
|
+
TOKEN_FILE=\${OPERATOR_TOKEN_FILE:-/data/operator-token.txt}
|
|
114
|
+
appboundry admin bootstrap --artifact "$ARTIFACT" --state "$STATE" --operator ops > "$TOKEN_FILE" 2>&1
|
|
115
|
+
echo "first start: operator created; collect and delete $TOKEN_FILE"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
exec appboundry run "$ARTIFACT" --state "$STATE" --bind 0.0.0.0 --port "\${PORT:-${PORT}}" --environment production
|
|
119
|
+
`;
|
|
120
|
+
function compose(application, moduleSha) {
|
|
121
|
+
return `# Written by \`feltkit deploy --target appboundry-self-hosted\`; replaced on every deploy. State is on the \`data\` volume.
|
|
122
|
+
services:
|
|
123
|
+
app:
|
|
124
|
+
build: .
|
|
125
|
+
image: ${application}-appboundry
|
|
126
|
+
environment:
|
|
127
|
+
# The deployment request: the container refuses to start any other module (exit 78).
|
|
128
|
+
EXPECTED_MODULE_SHA256: "${moduleSha}"
|
|
129
|
+
ports:
|
|
130
|
+
- "${PORT}:${PORT}"
|
|
131
|
+
volumes:
|
|
132
|
+
- data:/data
|
|
133
|
+
restart: unless-stopped
|
|
134
|
+
healthcheck:
|
|
135
|
+
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:${PORT}/_appboundry/health').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"]
|
|
136
|
+
interval: 10s
|
|
137
|
+
timeout: 3s
|
|
138
|
+
retries: 3
|
|
139
|
+
volumes:
|
|
140
|
+
data:
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
function deployMd(o) {
|
|
144
|
+
const m = o.manifest;
|
|
145
|
+
const [add, issue] = accessCommands(".feltkit/deploy/docker-compose.yml", "<id>", "<role>");
|
|
146
|
+
const roles = Object.keys(m.identity.roles ?? {});
|
|
147
|
+
return `# ${o.application} on a self-hosted AppBoundry runtime
|
|
148
|
+
|
|
149
|
+
Written by \`feltkit deploy --target appboundry-self-hosted\` (FeltKit ${SDK_VERSION}). This directory is replaced on every deploy.
|
|
150
|
+
|
|
151
|
+
## What runs
|
|
152
|
+
|
|
153
|
+
| | |
|
|
154
|
+
|---|---|
|
|
155
|
+
| Artifact | \`${o.name}\` (${m.format}), built from this project by \`feltkit build --target appboundry\` |
|
|
156
|
+
| Module | \`sha256:${m.module.sha256}\` (${(m.module.size / 1024 / 1024).toFixed(1)} MB, imports nothing) |
|
|
157
|
+
| Runtime | ${APPBOUNDRY_PACKAGE} ${APPBOUNDRY_DEPLOY_VERSION}, installed in the image. No FeltKit code runs in the deployment. |
|
|
158
|
+
| Host access | collections ${m.permissions.collections.read.join(", ") || "none"}; services ${m.permissions.services.join(", ") || "none"}; network none; filesystem none |
|
|
159
|
+
| State | FeltDB on the \`data\` volume (\`/data/state\`) |
|
|
160
|
+
|
|
161
|
+
## Run it
|
|
162
|
+
|
|
163
|
+
\`\`\`bash
|
|
164
|
+
docker compose -f .feltkit/deploy/docker-compose.yml up --build
|
|
165
|
+
\`\`\`
|
|
166
|
+
|
|
167
|
+
The container refuses to start a module other than \`sha256:${m.module.sha256.slice(0, 16)}…\` (exit 78), verifies
|
|
168
|
+
the manifest, module, program and every frontend file, and on first start creates the state and an operator
|
|
169
|
+
(\`ops\`, token in \`/data/operator-token.txt\`, 0600: collect it and delete it). Then open http://localhost:${PORT}.
|
|
170
|
+
\`GET /_appboundry/health\` reports the module it is running.
|
|
171
|
+
|
|
172
|
+
## Give someone access
|
|
173
|
+
|
|
174
|
+
Production has no development sign-in. An operator adds a user with one of the app's roles (${roles.join(", ") || "none declared"}) and issues
|
|
175
|
+
their session; they paste it into the app's sign-in screen.
|
|
176
|
+
|
|
177
|
+
\`\`\`bash
|
|
178
|
+
${add}
|
|
179
|
+
${issue}
|
|
180
|
+
\`\`\`
|
|
181
|
+
|
|
182
|
+
## Upgrades
|
|
183
|
+
|
|
184
|
+
Deploy again and rebuild the image. AppBoundry installs the new version's state contract only if every stored
|
|
185
|
+
record satisfies it, after running the artifact's pending migrations once; otherwise it refuses to start
|
|
186
|
+
(\`SCHEMA_INCOMPATIBLE\`) and the previous image keeps working on the same data.
|
|
187
|
+
|
|
188
|
+
## Not in the artifact
|
|
189
|
+
|
|
190
|
+
${o.omitted.map((note) => `- ${note}`).join("\n") || "- Nothing."}
|
|
191
|
+
|
|
192
|
+
## Limits
|
|
193
|
+
|
|
194
|
+
- One container per application. Containers share the host's kernel: this is not isolation for untrusted tenants.
|
|
195
|
+
- Backups: \`appboundry admin export\` and \`appboundry admin restore\` (1.7.3 fixed restoring apps with indexed
|
|
196
|
+
collections). Test a restore before relying on it.
|
|
197
|
+
- To have AppBoundry deploy and operate the artifact instead, with no container to manage: \`feltkit deploy --target appboundry\`.
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=deploy-appboundry-self-hosted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-appboundry-self-hosted.js","sourceRoot":"","sources":["../../src/cli/deploy-appboundry-self-hosted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,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ACvG,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IACrB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC,oCAAoC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5F,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC,CAAC,WAAW;;yEAE8C,WAAW;;;;;;iBAMnE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM;sBAChB,CAAC,CAAC,MAAM,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;cACtE,kBAAkB,IAAI,yBAAyB;8BAC/B,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,cAAc,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM;;;;;;;;;8DAS5E,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;;+GAEqB,IAAI;;;;;8FAKrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,eAAe;;;;EAI/H,GAAG;EACH,KAAK;;;;;;;;;;;EAWL,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,YAAY;;;;;;;;CAQhE,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type ArtifactManifest } from "../appboundry/build.js";
|
|
2
|
+
export declare const APPBOUNDRY_TARGET_TITLE = "AppBoundry: send the verified artifact to AppBoundry, which deploys and operates it";
|
|
3
|
+
/** Where the deployment request's result is recorded, for `feltkit status`. */
|
|
4
|
+
export declare const APPBOUNDRY_RECORD: string;
|
|
5
|
+
export interface AppBoundryConnection {
|
|
6
|
+
/** The AppBoundry portal origin, e.g. https://appboundry.com (APPBOUNDRY_URL). */
|
|
7
|
+
portal: string;
|
|
8
|
+
/** A credential the portal accepts as `Authorization: Bearer` (APPBOUNDRY_TOKEN). Never printed or written. */
|
|
9
|
+
token: string;
|
|
10
|
+
/** The execution host (APPBOUNDRY_HOST). M1a needs one; once AppBoundry places deployments it is optional (docs/APPBOUNDRY-DEPLOY-CONTRACT.md). */
|
|
11
|
+
hostId?: string;
|
|
12
|
+
}
|
|
13
|
+
export type DeploymentState = "Requested" | "Starting" | "Running" | "Failed" | "Stopped" | "Superseded";
|
|
14
|
+
export interface PortalDeployment {
|
|
15
|
+
deploymentId: string;
|
|
16
|
+
applicationId: string;
|
|
17
|
+
hostId: string;
|
|
18
|
+
artifactId: string;
|
|
19
|
+
moduleSha256: string;
|
|
20
|
+
state: DeploymentState;
|
|
21
|
+
desired?: string;
|
|
22
|
+
attempt?: number;
|
|
23
|
+
runtime?: {
|
|
24
|
+
package: string;
|
|
25
|
+
version: string;
|
|
26
|
+
};
|
|
27
|
+
evidence?: {
|
|
28
|
+
hostId: string;
|
|
29
|
+
observedModuleSha256: string;
|
|
30
|
+
health: "ready";
|
|
31
|
+
startedAt: string;
|
|
32
|
+
observedAt: string;
|
|
33
|
+
} | null;
|
|
34
|
+
failure?: {
|
|
35
|
+
code: string;
|
|
36
|
+
message: string;
|
|
37
|
+
at: string;
|
|
38
|
+
} | null;
|
|
39
|
+
requestedAt?: string;
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface AppBoundryDeployResult {
|
|
43
|
+
portal: string;
|
|
44
|
+
applicationId: string;
|
|
45
|
+
artifact: {
|
|
46
|
+
path: string;
|
|
47
|
+
artifactId: string;
|
|
48
|
+
moduleSha256: string;
|
|
49
|
+
archiveSha256: string;
|
|
50
|
+
created: boolean;
|
|
51
|
+
};
|
|
52
|
+
deployment: PortalDeployment;
|
|
53
|
+
/** Running with evidence naming this build's module; or pending (still starting when we stopped waiting); or failed. */
|
|
54
|
+
outcome: "running" | "pending" | "failed";
|
|
55
|
+
manifest: ArtifactManifest;
|
|
56
|
+
}
|
|
57
|
+
type Fetch = typeof fetch;
|
|
58
|
+
/** Read the connection from options, then the environment. Refuses http except to loopback. */
|
|
59
|
+
export declare function appboundryConnection(options?: {
|
|
60
|
+
portal?: string;
|
|
61
|
+
hostId?: string;
|
|
62
|
+
env?: NodeJS.ProcessEnv;
|
|
63
|
+
}): AppBoundryConnection;
|
|
64
|
+
/**
|
|
65
|
+
* The artifact folder as a deterministic ustar .tar.gz: files at the root, sorted, fixed modes and times,
|
|
66
|
+
* so the same artifact always has the same archive digest. This is the format the portal ingests.
|
|
67
|
+
*/
|
|
68
|
+
export declare function artifactArchive(dir: string): Buffer;
|
|
69
|
+
/** Running counts only with evidence that names the module this build produced. */
|
|
70
|
+
export declare function verifiedRunning(deployment: PortalDeployment, moduleSha256: string): boolean;
|
|
71
|
+
export declare function deployToAppBoundry(options: {
|
|
72
|
+
projectDir: string;
|
|
73
|
+
connection: AppBoundryConnection;
|
|
74
|
+
fetch?: Fetch;
|
|
75
|
+
/** How long to wait for the runtime's evidence before reporting "pending" (default 5 minutes). */
|
|
76
|
+
waitMs?: number;
|
|
77
|
+
pollMs?: number;
|
|
78
|
+
onProgress?: (event: {
|
|
79
|
+
step: "built" | "uploaded" | "requested" | "state";
|
|
80
|
+
detail: string;
|
|
81
|
+
}) => void;
|
|
82
|
+
}): Promise<AppBoundryDeployResult>;
|
|
83
|
+
interface DeploymentNote {
|
|
84
|
+
portal: string;
|
|
85
|
+
hostId?: string;
|
|
86
|
+
applicationId: string;
|
|
87
|
+
artifactId: string;
|
|
88
|
+
archiveSha256: string;
|
|
89
|
+
moduleSha256: string;
|
|
90
|
+
deploymentId: string;
|
|
91
|
+
requestedAt: string;
|
|
92
|
+
feltkit: string;
|
|
93
|
+
}
|
|
94
|
+
export declare function readAppBoundryRecord(projectDir: string): DeploymentNote | null;
|
|
95
|
+
/** `feltkit status`: what AppBoundry says about the last deployment requested from this project. */
|
|
96
|
+
export declare function appboundryStatus(options: {
|
|
97
|
+
projectDir: string;
|
|
98
|
+
connection?: Partial<AppBoundryConnection>;
|
|
99
|
+
fetch?: Fetch;
|
|
100
|
+
env?: NodeJS.ProcessEnv;
|
|
101
|
+
}): Promise<{
|
|
102
|
+
note: DeploymentNote;
|
|
103
|
+
deployment: PortalDeployment;
|
|
104
|
+
verified: boolean;
|
|
105
|
+
} | null>;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `feltkit deploy --target appboundry`: hand the application's artifact to the AppBoundry control plane.
|
|
3
|
+
*
|
|
4
|
+
* FeltKit builds the application and its immutable artifact. AppBoundry registers, deploys, executes and
|
|
5
|
+
* operates it. FeltKit never generates or manages the execution environment: whether an AppBoundry host
|
|
6
|
+
* runs the artifact in Docker, Podman, a microVM or something else is AppBoundry's business, and nothing
|
|
7
|
+
* here depends on it. (For running the AppBoundry runtime yourself, see deploy-appboundry-self-hosted.ts.)
|
|
8
|
+
*
|
|
9
|
+
* Three outputs, three owners:
|
|
10
|
+
* application artifact FeltKit build .feltkit/appboundry/<name>.app (immutable)
|
|
11
|
+
* deployment request FeltKit -> AppBoundry upload + deployment intent, over the portal API
|
|
12
|
+
* execution environment AppBoundry never visible here
|
|
13
|
+
*
|
|
14
|
+
* The contract is AppBoundry's managed-hosting API (rkendel1/appboundry apps/cloud-portal, M1a):
|
|
15
|
+
* GET /api/applications/{id}/hosting registered? artifacts, deployments, hosts
|
|
16
|
+
* POST /api/applications/{id}/artifacts the artifact as .tar.gz, x-archive-sha256; verified there, stored immutably
|
|
17
|
+
* POST /api/applications/{id}/deployments { artifactId, hostId? }, Idempotency-Key
|
|
18
|
+
* The full contract, including what AppBoundry still has to add (deploy tokens, registration from the artifact,
|
|
19
|
+
* placement, an address): docs/APPBOUNDRY-DEPLOY-CONTRACT.md.
|
|
20
|
+
* GET /api/applications/{id}/deployments/{deployment} state, and the runtime's own evidence
|
|
21
|
+
*
|
|
22
|
+
* A deployment is reported Running only when AppBoundry says so AND the evidence it holds names the module
|
|
23
|
+
* this build produced (the runtime reports its module SHA-256; the portal only records it). Nothing is
|
|
24
|
+
* inferred from an upload or a request being accepted.
|
|
25
|
+
*/
|
|
26
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
27
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
28
|
+
import { join, relative, resolve } from "node:path";
|
|
29
|
+
import { gzipSync } from "node:zlib";
|
|
30
|
+
import { FeltKitError } from "../errors.js";
|
|
31
|
+
import { SDK_VERSION, build } from "../server/project.js";
|
|
32
|
+
import { buildAppBoundry } from "../appboundry/build.js";
|
|
33
|
+
export const APPBOUNDRY_TARGET_TITLE = "AppBoundry: send the verified artifact to AppBoundry, which deploys and operates it";
|
|
34
|
+
/** Where the deployment request's result is recorded, for `feltkit status`. */
|
|
35
|
+
export const APPBOUNDRY_RECORD = join(".feltkit", "appboundry", "deployment.json");
|
|
36
|
+
/** Read the connection from options, then the environment. Refuses http except to loopback. */
|
|
37
|
+
export function appboundryConnection(options = {}) {
|
|
38
|
+
const env = options.env ?? process.env;
|
|
39
|
+
const portal = (options.portal ?? env.APPBOUNDRY_URL ?? "").replace(/\/+$/, "");
|
|
40
|
+
const token = env.APPBOUNDRY_TOKEN ?? "";
|
|
41
|
+
const hostId = options.hostId ?? env.APPBOUNDRY_HOST ?? "";
|
|
42
|
+
const missing = [!portal && "APPBOUNDRY_URL (the AppBoundry portal)", !token && "APPBOUNDRY_TOKEN (an AppBoundry deploy token)"].filter(Boolean);
|
|
43
|
+
if (missing.length)
|
|
44
|
+
throw new FeltKitError("CONFIGURATION", `Deploying to AppBoundry needs ${missing.join(", ")}.`, { hint: "Set them in the environment (or pass --portal and --host). The token is read from the environment only and is never printed or stored." });
|
|
45
|
+
let url;
|
|
46
|
+
try {
|
|
47
|
+
url = new URL(portal);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
throw new FeltKitError("CONFIGURATION", `APPBOUNDRY_URL is not a URL: ${portal}`);
|
|
51
|
+
}
|
|
52
|
+
const loopback = ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
|
|
53
|
+
if (url.protocol !== "https:" && !(url.protocol === "http:" && loopback))
|
|
54
|
+
throw new FeltKitError("CONFIGURATION", "APPBOUNDRY_URL must be https (http only for a portal on this machine).");
|
|
55
|
+
return { portal: url.origin, token, ...(hostId ? { hostId } : {}) };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The artifact folder as a deterministic ustar .tar.gz: files at the root, sorted, fixed modes and times,
|
|
59
|
+
* so the same artifact always has the same archive digest. This is the format the portal ingests.
|
|
60
|
+
*/
|
|
61
|
+
export function artifactArchive(dir) {
|
|
62
|
+
const files = [];
|
|
63
|
+
const walk = (current) => {
|
|
64
|
+
for (const name of readdirSync(current).sort()) {
|
|
65
|
+
const path = join(current, name);
|
|
66
|
+
if (statSync(path).isDirectory())
|
|
67
|
+
walk(path);
|
|
68
|
+
else
|
|
69
|
+
files.push(path);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
walk(dir);
|
|
73
|
+
const parts = [];
|
|
74
|
+
for (const file of files) {
|
|
75
|
+
const name = relative(dir, file).split("\\").join("/");
|
|
76
|
+
const content = readFileSync(file);
|
|
77
|
+
const block = Buffer.alloc(512);
|
|
78
|
+
const encoded = Buffer.from(name);
|
|
79
|
+
if (encoded.length <= 100)
|
|
80
|
+
encoded.copy(block, 0);
|
|
81
|
+
else {
|
|
82
|
+
const cut = name.lastIndexOf("/");
|
|
83
|
+
const prefix = name.slice(0, cut), base = name.slice(cut + 1);
|
|
84
|
+
if (Buffer.byteLength(base) > 100 || Buffer.byteLength(prefix) > 155)
|
|
85
|
+
throw new FeltKitError("CONFIGURATION", `An artifact path is too long to archive: ${name}`);
|
|
86
|
+
block.write(base, 0);
|
|
87
|
+
block.write(prefix, 345);
|
|
88
|
+
}
|
|
89
|
+
block.write("0000644\0", 100);
|
|
90
|
+
block.write("0000000\0", 108);
|
|
91
|
+
block.write("0000000\0", 116);
|
|
92
|
+
block.write(`${content.length.toString(8).padStart(11, "0")}\0`, 124);
|
|
93
|
+
block.write("00000000000\0", 136);
|
|
94
|
+
block.write(" ", 148);
|
|
95
|
+
block.write("0", 156);
|
|
96
|
+
block.write("ustar\0", 257);
|
|
97
|
+
block.write("00", 263);
|
|
98
|
+
let sum = 0;
|
|
99
|
+
for (const byte of block)
|
|
100
|
+
sum += byte;
|
|
101
|
+
block.write(`${sum.toString(8).padStart(6, "0")}\0 `, 148);
|
|
102
|
+
parts.push(block, content);
|
|
103
|
+
const pad = (512 - (content.length % 512)) % 512;
|
|
104
|
+
if (pad)
|
|
105
|
+
parts.push(Buffer.alloc(pad));
|
|
106
|
+
}
|
|
107
|
+
parts.push(Buffer.alloc(1024));
|
|
108
|
+
return gzipSync(Buffer.concat(parts), { level: 9 });
|
|
109
|
+
}
|
|
110
|
+
/** One portal call, with the portal's own error codes surfaced as FeltKit errors that say what to do. */
|
|
111
|
+
async function call(conn, fetchImpl, path, init = {}) {
|
|
112
|
+
let response;
|
|
113
|
+
try {
|
|
114
|
+
response = await fetchImpl(`${conn.portal}${path}`, {
|
|
115
|
+
method: init.method ?? "GET",
|
|
116
|
+
headers: { authorization: `Bearer ${conn.token}`, accept: "application/json", "user-agent": `feltkit/${SDK_VERSION}`, ...(init.headers ?? {}) },
|
|
117
|
+
...(init.body !== undefined ? { body: typeof init.body === "string" ? init.body : new Uint8Array(init.body) } : {}),
|
|
118
|
+
redirect: "error",
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
throw new FeltKitError("UNAVAILABLE", `The AppBoundry portal at ${conn.portal} could not be reached: ${error.message}`);
|
|
123
|
+
}
|
|
124
|
+
const text = await response.text();
|
|
125
|
+
let body = {};
|
|
126
|
+
try {
|
|
127
|
+
body = text ? JSON.parse(text) : {};
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
body = { error: text.slice(0, 300) };
|
|
131
|
+
}
|
|
132
|
+
if (response.ok)
|
|
133
|
+
return { status: response.status, body: body };
|
|
134
|
+
const code = String(body?.code ?? "");
|
|
135
|
+
const message = String(body?.error ?? `HTTP ${response.status}`);
|
|
136
|
+
if (response.status === 401 || response.status === 403) {
|
|
137
|
+
throw new FeltKitError("UNAUTHORIZED", `AppBoundry refused the credential (${code || response.status}): ${message}`, {
|
|
138
|
+
hint: "APPBOUNDRY_TOKEN must be a credential the portal accepts for deployments. The M1a portal accepts only a signed-in platform owner's browser session, so a CLI credential needs AppBoundry's deploy tokens (docs/APPBOUNDRY.md, \"Deploying through AppBoundry\").",
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (code === "APPLICATION_NOT_REGISTERED") {
|
|
142
|
+
throw new FeltKitError("NOT_FOUND", message, { hint: "This token may not register applications. Register it once in the AppBoundry portal, or use a token whose scope allows registration (docs/APPBOUNDRY-DEPLOY-CONTRACT.md §3.2)." });
|
|
143
|
+
}
|
|
144
|
+
throw new FeltKitError(response.status >= 500 ? "UNAVAILABLE" : "FAILED_PRECONDITION", `AppBoundry: ${message}${code ? ` (${code})` : ""}`);
|
|
145
|
+
}
|
|
146
|
+
const sleep = (ms) => new Promise((ok) => setTimeout(ok, ms));
|
|
147
|
+
const terminal = (state) => state === "Running" || state === "Failed" || state === "Stopped" || state === "Superseded";
|
|
148
|
+
/** Running counts only with evidence that names the module this build produced. */
|
|
149
|
+
export function verifiedRunning(deployment, moduleSha256) {
|
|
150
|
+
return deployment.state === "Running" && deployment.moduleSha256 === moduleSha256 && deployment.evidence?.health === "ready" && deployment.evidence.observedModuleSha256 === moduleSha256;
|
|
151
|
+
}
|
|
152
|
+
export async function deployToAppBoundry(options) {
|
|
153
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
154
|
+
const conn = options.connection;
|
|
155
|
+
const projectDir = resolve(options.projectDir);
|
|
156
|
+
const progress = options.onProgress ?? (() => { });
|
|
157
|
+
// 1. The artifact: the same build and checks as `feltkit build --target appboundry`.
|
|
158
|
+
const outDir = join(projectDir, ".feltkit", "appboundry");
|
|
159
|
+
mkdirSync(outDir, { recursive: true });
|
|
160
|
+
const built = await build(projectDir);
|
|
161
|
+
const artifact = await buildAppBoundry(projectDir, { bundle: built.bundle, client: built.client, producerVersion: SDK_VERSION, outDir });
|
|
162
|
+
const m = artifact.manifest;
|
|
163
|
+
const applicationId = m.application.id;
|
|
164
|
+
const archive = artifactArchive(artifact.path);
|
|
165
|
+
const archiveSha256 = createHash("sha256").update(archive).digest("hex");
|
|
166
|
+
progress({ step: "built", detail: `${relative(projectDir, artifact.path)} module sha256:${m.module.sha256}` });
|
|
167
|
+
// 2. Checks the credential before uploading, and whether AppBoundry already knows the application.
|
|
168
|
+
const hosting = await call(conn, fetchImpl, `/api/applications/${encodeURIComponent(applicationId)}/hosting`);
|
|
169
|
+
// 3. Upload: AppBoundry verifies the artifact itself, stores it immutably, and registers the application from
|
|
170
|
+
// it when it is new and the token's scope allows (contract §3.2). Same bytes, same artifact.
|
|
171
|
+
const uploaded = await call(conn, fetchImpl, `/api/applications/${encodeURIComponent(applicationId)}/artifacts`, {
|
|
172
|
+
method: "POST", body: archive, headers: { "content-type": "application/gzip", "x-archive-sha256": archiveSha256 },
|
|
173
|
+
});
|
|
174
|
+
const artifactId = uploaded.body.artifact.artifactId;
|
|
175
|
+
if (uploaded.body.artifact.module.sha256 !== m.module.sha256) {
|
|
176
|
+
throw new FeltKitError("FAILED_PRECONDITION", `AppBoundry recorded module sha256:${uploaded.body.artifact.module.sha256} for the upload, but this build produced sha256:${m.module.sha256}. Nothing was deployed.`);
|
|
177
|
+
}
|
|
178
|
+
progress({ step: "uploaded", detail: `artifact ${artifactId}${uploaded.body.created ? "" : " (already stored)"}${uploaded.body.registeredNow || !hosting.body.registered ? "; application registered" : ""}` });
|
|
179
|
+
// 4. The deployment request. One idempotency key per run: a retried request cannot create a second deployment.
|
|
180
|
+
const idempotencyKey = `feltkit.${artifactId.slice(0, 16)}.${randomBytes(8).toString("hex")}`;
|
|
181
|
+
const requested = await call(conn, fetchImpl, `/api/applications/${encodeURIComponent(applicationId)}/deployments`, {
|
|
182
|
+
method: "POST", body: JSON.stringify({ artifactId, ...(conn.hostId ? { hostId: conn.hostId } : {}) }), headers: { "content-type": "application/json", "idempotency-key": idempotencyKey },
|
|
183
|
+
});
|
|
184
|
+
let deployment = requested.body.deployment;
|
|
185
|
+
progress({ step: "requested", detail: `deployment ${deployment.deploymentId}${deployment.hostId ? ` on ${deployment.hostId}` : ""}` });
|
|
186
|
+
record(projectDir, conn, { applicationId, artifactId, archiveSha256, moduleSha256: m.module.sha256, deploymentId: deployment.deploymentId });
|
|
187
|
+
// 5. Wait for AppBoundry's answer: Running with the runtime's evidence, or a failure.
|
|
188
|
+
const deadline = Date.now() + (options.waitMs ?? 5 * 60_000);
|
|
189
|
+
let last = deployment.state;
|
|
190
|
+
while (!terminal(deployment.state) && Date.now() < deadline) {
|
|
191
|
+
await sleep(options.pollMs ?? 2000);
|
|
192
|
+
deployment = (await call(conn, fetchImpl, `/api/applications/${encodeURIComponent(applicationId)}/deployments/${encodeURIComponent(deployment.deploymentId)}`)).body.deployment;
|
|
193
|
+
if (deployment.state !== last)
|
|
194
|
+
progress({ step: "state", detail: deployment.state });
|
|
195
|
+
last = deployment.state;
|
|
196
|
+
}
|
|
197
|
+
const outcome = verifiedRunning(deployment, m.module.sha256) ? "running" : terminal(deployment.state) ? "failed" : "pending";
|
|
198
|
+
return { portal: conn.portal, applicationId, artifact: { path: artifact.path, artifactId, moduleSha256: m.module.sha256, archiveSha256, created: uploaded.body.created }, deployment, outcome, manifest: m };
|
|
199
|
+
}
|
|
200
|
+
function record(projectDir, conn, fields) {
|
|
201
|
+
const note = { portal: conn.portal, ...(conn.hostId ? { hostId: conn.hostId } : {}), ...fields, requestedAt: new Date().toISOString(), feltkit: SDK_VERSION };
|
|
202
|
+
mkdirSync(join(projectDir, ".feltkit", "appboundry"), { recursive: true });
|
|
203
|
+
// What was requested, never the credential. AppBoundry stays the authority on what is running.
|
|
204
|
+
writeFileSync(join(projectDir, APPBOUNDRY_RECORD), JSON.stringify(note, null, 2) + "\n");
|
|
205
|
+
}
|
|
206
|
+
export function readAppBoundryRecord(projectDir) {
|
|
207
|
+
const path = join(resolve(projectDir), APPBOUNDRY_RECORD);
|
|
208
|
+
if (!existsSync(path))
|
|
209
|
+
return null;
|
|
210
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
211
|
+
}
|
|
212
|
+
/** `feltkit status`: what AppBoundry says about the last deployment requested from this project. */
|
|
213
|
+
export async function appboundryStatus(options) {
|
|
214
|
+
const note = readAppBoundryRecord(options.projectDir);
|
|
215
|
+
if (!note)
|
|
216
|
+
return null;
|
|
217
|
+
const env = options.env ?? process.env;
|
|
218
|
+
const token = options.connection?.token ?? env.APPBOUNDRY_TOKEN ?? "";
|
|
219
|
+
if (!token)
|
|
220
|
+
throw new FeltKitError("CONFIGURATION", "APPBOUNDRY_TOKEN is needed to ask AppBoundry for the deployment's status.");
|
|
221
|
+
const conn = { portal: options.connection?.portal ?? note.portal, token, ...(note.hostId ? { hostId: note.hostId } : {}) };
|
|
222
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
223
|
+
const { body } = await call(conn, fetchImpl, `/api/applications/${encodeURIComponent(note.applicationId)}/deployments/${encodeURIComponent(note.deploymentId)}`);
|
|
224
|
+
return { note, deployment: body.deployment, verified: verifiedRunning(body.deployment, note.moduleSha256) };
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=deploy-appboundry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-appboundry.js","sourceRo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