@supatype/cli 0.1.0-alpha.6
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/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test.log +7 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/bin/dev-entry.ts +2 -0
- package/bin/supatype.js +5 -0
- package/dist/app/framework.d.ts +44 -0
- package/dist/app/framework.d.ts.map +1 -0
- package/dist/app/framework.js +200 -0
- package/dist/app/framework.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +55 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/admin.d.ts +4 -0
- package/dist/commands/admin.d.ts.map +1 -0
- package/dist/commands/admin.js +270 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/commands/app.d.ts +3 -0
- package/dist/commands/app.d.ts.map +1 -0
- package/dist/commands/app.js +235 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/cloud.d.ts +3 -0
- package/dist/commands/cloud.d.ts.map +1 -0
- package/dist/commands/cloud.js +256 -0
- package/dist/commands/cloud.js.map +1 -0
- package/dist/commands/db.d.ts +8 -0
- package/dist/commands/db.d.ts.map +1 -0
- package/dist/commands/db.js +123 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/deploy-types.d.ts +14 -0
- package/dist/commands/deploy-types.d.ts.map +1 -0
- package/dist/commands/deploy-types.js +38 -0
- package/dist/commands/deploy-types.js.map +1 -0
- package/dist/commands/deploy.d.ts +14 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +295 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dev.d.ts +3 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +428 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/diff.d.ts +3 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +39 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/engine.d.ts +9 -0
- package/dist/commands/engine.d.ts.map +1 -0
- package/dist/commands/engine.js +99 -0
- package/dist/commands/engine.js.map +1 -0
- package/dist/commands/functions.d.ts +3 -0
- package/dist/commands/functions.d.ts.map +1 -0
- package/dist/commands/functions.js +762 -0
- package/dist/commands/functions.js.map +1 -0
- package/dist/commands/generate.d.ts +3 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +28 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +515 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/keys.d.ts +4 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +57 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/logs.d.ts +6 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +52 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/migrate.d.ts +3 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +71 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/plugins.d.ts +3 -0
- package/dist/commands/plugins.d.ts.map +1 -0
- package/dist/commands/plugins.js +431 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/pull.d.ts +3 -0
- package/dist/commands/pull.d.ts.map +1 -0
- package/dist/commands/pull.js +73 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/push.d.ts +3 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +87 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/seed.d.ts +3 -0
- package/dist/commands/seed.d.ts.map +1 -0
- package/dist/commands/seed.js +22 -0
- package/dist/commands/seed.js.map +1 -0
- package/dist/commands/self-host.d.ts +3 -0
- package/dist/commands/self-host.d.ts.map +1 -0
- package/dist/commands/self-host.js +796 -0
- package/dist/commands/self-host.js.map +1 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +69 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/config.d.ts +106 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +66 -0
- package/dist/config.js.map +1 -0
- package/dist/engine/cache.d.ts +37 -0
- package/dist/engine/cache.d.ts.map +1 -0
- package/dist/engine/cache.js +121 -0
- package/dist/engine/cache.js.map +1 -0
- package/dist/engine/download.d.ts +19 -0
- package/dist/engine/download.d.ts.map +1 -0
- package/dist/engine/download.js +108 -0
- package/dist/engine/download.js.map +1 -0
- package/dist/engine/platform.d.ts +24 -0
- package/dist/engine/platform.d.ts.map +1 -0
- package/dist/engine/platform.js +50 -0
- package/dist/engine/platform.js.map +1 -0
- package/dist/engine/resolve.d.ts +37 -0
- package/dist/engine/resolve.d.ts.map +1 -0
- package/dist/engine/resolve.js +133 -0
- package/dist/engine/resolve.js.map +1 -0
- package/dist/engine/update-notify.d.ts +11 -0
- package/dist/engine/update-notify.d.ts.map +1 -0
- package/dist/engine/update-notify.js +43 -0
- package/dist/engine/update-notify.js.map +1 -0
- package/dist/engine/verify.d.ts +50 -0
- package/dist/engine/verify.d.ts.map +1 -0
- package/dist/engine/verify.js +161 -0
- package/dist/engine/verify.js.map +1 -0
- package/dist/engine-version.d.ts +35 -0
- package/dist/engine-version.d.ts.map +1 -0
- package/dist/engine-version.js +35 -0
- package/dist/engine-version.js.map +1 -0
- package/dist/engine.d.ts +34 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +76 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/jwt.d.ts +3 -0
- package/dist/jwt.d.ts.map +1 -0
- package/dist/jwt.js +13 -0
- package/dist/jwt.js.map +1 -0
- package/dist/pull-utils.d.ts +16 -0
- package/dist/pull-utils.d.ts.map +1 -0
- package/dist/pull-utils.js +65 -0
- package/dist/pull-utils.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +12 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +31 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/tsx-runner.d.ts +18 -0
- package/dist/tsx-runner.d.ts.map +1 -0
- package/dist/tsx-runner.js +62 -0
- package/dist/tsx-runner.js.map +1 -0
- package/package.json +36 -0
- package/src/app/framework.ts +249 -0
- package/src/cli.ts +58 -0
- package/src/commands/admin.ts +371 -0
- package/src/commands/app.ts +261 -0
- package/src/commands/cloud.ts +326 -0
- package/src/commands/db.ts +145 -0
- package/src/commands/deploy-types.ts +49 -0
- package/src/commands/deploy.ts +366 -0
- package/src/commands/dev.ts +477 -0
- package/src/commands/diff.ts +61 -0
- package/src/commands/engine.ts +133 -0
- package/src/commands/functions.ts +919 -0
- package/src/commands/generate.ts +31 -0
- package/src/commands/init.ts +532 -0
- package/src/commands/keys.ts +66 -0
- package/src/commands/logs.ts +58 -0
- package/src/commands/migrate.ts +83 -0
- package/src/commands/plugins.ts +508 -0
- package/src/commands/pull.ts +96 -0
- package/src/commands/push.ts +119 -0
- package/src/commands/seed.ts +26 -0
- package/src/commands/self-host.ts +932 -0
- package/src/commands/status.ts +83 -0
- package/src/config.ts +190 -0
- package/src/engine/cache.ts +135 -0
- package/src/engine/download.ts +143 -0
- package/src/engine/platform.ts +66 -0
- package/src/engine/resolve.ts +197 -0
- package/src/engine/update-notify.ts +50 -0
- package/src/engine/verify.ts +206 -0
- package/src/engine-version.ts +39 -0
- package/src/engine.ts +99 -0
- package/src/index.ts +19 -0
- package/src/jwt.ts +14 -0
- package/src/pull-utils.ts +57 -0
- package/src/scripts/postinstall.ts +40 -0
- package/src/tsx-runner.ts +79 -0
- package/tests/cli-help.test.ts +107 -0
- package/tests/config.test.ts +117 -0
- package/tests/engine-distribution.test.ts +418 -0
- package/tests/init.test.ts +184 -0
- package/tests/keys.test.ts +160 -0
- package/tests/pull-utils.test.ts +115 -0
- package/tests/tsx-runner.test.ts +66 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform detection for engine binary downloads.
|
|
3
|
+
* Maps Node.js platform/arch to the binary naming convention.
|
|
4
|
+
*/
|
|
5
|
+
export interface PlatformInfo {
|
|
6
|
+
os: "linux" | "darwin" | "win";
|
|
7
|
+
arch: "x64" | "arm64";
|
|
8
|
+
binaryName: string;
|
|
9
|
+
ext: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Detect the current platform and return the binary info.
|
|
13
|
+
* Throws on unsupported platforms with a helpful message.
|
|
14
|
+
*/
|
|
15
|
+
export declare function detectPlatform(): PlatformInfo;
|
|
16
|
+
/**
|
|
17
|
+
* Build the artifact filename for a given version and platform.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getArtifactName(version: string, platform: PlatformInfo): string;
|
|
20
|
+
/**
|
|
21
|
+
* Build the CDN download URL for a given version and artifact.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getCdnUrl(baseUrl: string, version: string, filename: string): string;
|
|
24
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/engine/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAC9B,IAAI,EAAE,KAAK,GAAG,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;CACZ;AAkBD;;;GAGG;AACH,wBAAgB,cAAc,IAAI,YAAY,CAmB7C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAE/E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform detection for engine binary downloads.
|
|
3
|
+
* Maps Node.js platform/arch to the binary naming convention.
|
|
4
|
+
*/
|
|
5
|
+
const PLATFORM_MAP = {
|
|
6
|
+
"darwin-arm64": { os: "darwin", arch: "arm64" },
|
|
7
|
+
"darwin-x64": { os: "darwin", arch: "x64" },
|
|
8
|
+
"linux-arm64": { os: "linux", arch: "arm64" },
|
|
9
|
+
"linux-x64": { os: "linux", arch: "x64" },
|
|
10
|
+
"win32-x64": { os: "win", arch: "x64" },
|
|
11
|
+
};
|
|
12
|
+
const SUPPORTED_PLATFORMS = [
|
|
13
|
+
"linux-x64",
|
|
14
|
+
"linux-arm64",
|
|
15
|
+
"darwin-x64",
|
|
16
|
+
"darwin-arm64",
|
|
17
|
+
"win-x64",
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Detect the current platform and return the binary info.
|
|
21
|
+
* Throws on unsupported platforms with a helpful message.
|
|
22
|
+
*/
|
|
23
|
+
export function detectPlatform() {
|
|
24
|
+
const key = `${process.platform}-${process.arch}`;
|
|
25
|
+
const mapped = PLATFORM_MAP[key];
|
|
26
|
+
if (!mapped) {
|
|
27
|
+
throw new Error(`Supatype engine is not available for ${process.platform}-${process.arch}.\n` +
|
|
28
|
+
`Supported platforms: ${SUPPORTED_PLATFORMS.join(", ")}`);
|
|
29
|
+
}
|
|
30
|
+
const ext = mapped.os === "win" ? ".exe" : "";
|
|
31
|
+
return {
|
|
32
|
+
os: mapped.os,
|
|
33
|
+
arch: mapped.arch,
|
|
34
|
+
binaryName: `supatype-engine${ext}`,
|
|
35
|
+
ext,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Build the artifact filename for a given version and platform.
|
|
40
|
+
*/
|
|
41
|
+
export function getArtifactName(version, platform) {
|
|
42
|
+
return `supatype-engine-${version}-${platform.os}-${platform.arch}${platform.ext}`;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build the CDN download URL for a given version and artifact.
|
|
46
|
+
*/
|
|
47
|
+
export function getCdnUrl(baseUrl, version, filename) {
|
|
48
|
+
return `${baseUrl}/v${version}/${filename}`;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/engine/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,YAAY,GAA2E;IAC3F,cAAc,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IAC/C,YAAY,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;IAC3C,aAAa,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7C,WAAW,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE;IACzC,WAAW,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;CACxC,CAAA;AAED,MAAM,mBAAmB,GAAG;IAC1B,WAAW;IACX,aAAa;IACb,YAAY;IACZ,cAAc;IACd,SAAS;CACV,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAA;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;IAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,wCAAwC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK;YAC7E,wBAAwB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACzD,CAAA;IACH,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IAE7C,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,UAAU,EAAE,kBAAkB,GAAG,EAAE;QACnC,GAAG;KACJ,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,QAAsB;IACrE,OAAO,mBAAmB,OAAO,IAAI,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAA;AACpF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe,EAAE,OAAe,EAAE,QAAgB;IAC1E,OAAO,GAAG,OAAO,KAAK,OAAO,IAAI,QAAQ,EAAE,CAAA;AAC7C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engine resolver — orchestrates binary download, verification, and caching.
|
|
3
|
+
*
|
|
4
|
+
* Resolution flow:
|
|
5
|
+
* 1. Check local cache for the pinned version
|
|
6
|
+
* 2. If cached and valid, return cached path
|
|
7
|
+
* 3. If not cached, download from CDN (with GitHub Releases fallback)
|
|
8
|
+
* 4. Verify signature + checksum
|
|
9
|
+
* 5. Cache the verified binary
|
|
10
|
+
* 6. Return the cached path
|
|
11
|
+
*/
|
|
12
|
+
export interface ResolveResult {
|
|
13
|
+
binaryPath: string;
|
|
14
|
+
version: string;
|
|
15
|
+
fromCache: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the engine binary path, downloading if necessary.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveEngine(version?: string): Promise<ResolveResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Check for the latest engine version from CDN.
|
|
23
|
+
*/
|
|
24
|
+
export interface LatestVersionInfo {
|
|
25
|
+
version: string;
|
|
26
|
+
date: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function checkLatestVersion(): Promise<LatestVersionInfo | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Check version compatibility.
|
|
31
|
+
* Engine and CLI must share the same major version.
|
|
32
|
+
*/
|
|
33
|
+
export declare function checkVersionCompatibility(engineVersion: string, expectedVersion: string): {
|
|
34
|
+
compatible: boolean;
|
|
35
|
+
message?: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/engine/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,GAAE,MAAuB,GAC/B,OAAO,CAAC,aAAa,CAAC,CAgFxB;AA0CD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAEjF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAc3C"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engine resolver — orchestrates binary download, verification, and caching.
|
|
3
|
+
*
|
|
4
|
+
* Resolution flow:
|
|
5
|
+
* 1. Check local cache for the pinned version
|
|
6
|
+
* 2. If cached and valid, return cached path
|
|
7
|
+
* 3. If not cached, download from CDN (with GitHub Releases fallback)
|
|
8
|
+
* 4. Verify signature + checksum
|
|
9
|
+
* 5. Cache the verified binary
|
|
10
|
+
* 6. Return the cached path
|
|
11
|
+
*/
|
|
12
|
+
import { chmodSync, existsSync } from "node:fs";
|
|
13
|
+
import { rename } from "node:fs/promises";
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
import { detectPlatform, getArtifactName, getCdnUrl } from "./platform.js";
|
|
16
|
+
import { getCachedBinaryPath, hasCachedBinary, ensureCacheDir } from "./cache.js";
|
|
17
|
+
import { downloadFile, fetchJson } from "./download.js";
|
|
18
|
+
import { verifyBinary, verifyChecksumOnly } from "./verify.js";
|
|
19
|
+
import { ENGINE_VERSION, CDN_BASE_URL, GITHUB_RELEASES_FALLBACK_URL, } from "../engine-version.js";
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the engine binary path, downloading if necessary.
|
|
22
|
+
*/
|
|
23
|
+
export async function resolveEngine(version = ENGINE_VERSION) {
|
|
24
|
+
const platform = detectPlatform();
|
|
25
|
+
// Check cache first
|
|
26
|
+
if (hasCachedBinary(version, platform)) {
|
|
27
|
+
return {
|
|
28
|
+
binaryPath: getCachedBinaryPath(version, platform),
|
|
29
|
+
version,
|
|
30
|
+
fromCache: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Not cached — need to download
|
|
34
|
+
const artifactName = getArtifactName(version, platform);
|
|
35
|
+
const cacheDir = ensureCacheDir(version);
|
|
36
|
+
const binaryDest = getCachedBinaryPath(version, platform);
|
|
37
|
+
const tempBinary = `${binaryDest}.tmp`;
|
|
38
|
+
const checksumDest = join(cacheDir, "checksums.sha256");
|
|
39
|
+
const signatureDest = join(cacheDir, "checksums.sha256.minisig");
|
|
40
|
+
// Try CDN first, then GitHub Releases fallback
|
|
41
|
+
let downloaded = false;
|
|
42
|
+
try {
|
|
43
|
+
downloaded = await downloadFromSource(CDN_BASE_URL, version, artifactName, tempBinary, checksumDest, signatureDest);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// CDN failed, try fallback
|
|
47
|
+
}
|
|
48
|
+
if (!downloaded) {
|
|
49
|
+
try {
|
|
50
|
+
downloaded = await downloadFromSource(GITHUB_RELEASES_FALLBACK_URL, version, artifactName, tempBinary, checksumDest, signatureDest);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
// Fallback also failed
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (!downloaded) {
|
|
57
|
+
throw new Error("Cannot download Supatype engine. Check your internet connection.\n" +
|
|
58
|
+
"If this persists, report at https://github.com/supatype/supatype/issues");
|
|
59
|
+
}
|
|
60
|
+
// Verify the downloaded binary
|
|
61
|
+
if (existsSync(signatureDest)) {
|
|
62
|
+
// Full two-step verification: signature + checksum
|
|
63
|
+
await verifyBinary(tempBinary, checksumDest, signatureDest, artifactName);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// Checksum-only verification (GitHub Releases may not have .minisig)
|
|
67
|
+
await verifyChecksumOnly(tempBinary, checksumDest, artifactName);
|
|
68
|
+
}
|
|
69
|
+
// Move verified binary to final location
|
|
70
|
+
await rename(tempBinary, binaryDest);
|
|
71
|
+
// Set executable permission on Unix
|
|
72
|
+
if (process.platform !== "win32") {
|
|
73
|
+
chmodSync(binaryDest, 0o755);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
binaryPath: binaryDest,
|
|
77
|
+
version,
|
|
78
|
+
fromCache: false,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
async function downloadFromSource(baseUrl, version, artifactName, binaryDest, checksumDest, signatureDest) {
|
|
82
|
+
const binaryUrl = getCdnUrl(baseUrl, version, artifactName);
|
|
83
|
+
const checksumUrl = getCdnUrl(baseUrl, version, "checksums.sha256");
|
|
84
|
+
const signatureUrl = getCdnUrl(baseUrl, version, "checksums.sha256.minisig");
|
|
85
|
+
// Download binary with progress
|
|
86
|
+
await downloadFile({
|
|
87
|
+
url: binaryUrl,
|
|
88
|
+
dest: binaryDest,
|
|
89
|
+
showProgress: true,
|
|
90
|
+
label: `Downloading Supatype engine v${version} for ${detectPlatform().os}-${detectPlatform().arch}`,
|
|
91
|
+
});
|
|
92
|
+
// Download checksum file
|
|
93
|
+
await downloadFile({
|
|
94
|
+
url: checksumUrl,
|
|
95
|
+
dest: checksumDest,
|
|
96
|
+
});
|
|
97
|
+
// Try to download signature file (may not exist for GitHub Releases)
|
|
98
|
+
try {
|
|
99
|
+
await downloadFile({
|
|
100
|
+
url: signatureUrl,
|
|
101
|
+
dest: signatureDest,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Signature file optional for fallback sources
|
|
106
|
+
// But for CDN, we require it — verifyBinary will enforce this
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
export async function checkLatestVersion() {
|
|
111
|
+
return fetchJson(`${CDN_BASE_URL}/latest.json`);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Check version compatibility.
|
|
115
|
+
* Engine and CLI must share the same major version.
|
|
116
|
+
*/
|
|
117
|
+
export function checkVersionCompatibility(engineVersion, expectedVersion) {
|
|
118
|
+
const engineMajor = parseMajor(engineVersion);
|
|
119
|
+
const expectedMajor = parseMajor(expectedVersion);
|
|
120
|
+
if (engineMajor !== expectedMajor) {
|
|
121
|
+
return {
|
|
122
|
+
compatible: false,
|
|
123
|
+
message: `Engine version ${engineVersion} is not compatible with CLI version ${expectedVersion}.\n` +
|
|
124
|
+
`Run: npm update @supatype/cli`,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return { compatible: true };
|
|
128
|
+
}
|
|
129
|
+
function parseMajor(version) {
|
|
130
|
+
const match = version.match(/^(\d+)/);
|
|
131
|
+
return match ? parseInt(match[1], 10) : 0;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/engine/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAoB,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,4BAA4B,GAC7B,MAAM,sBAAsB,CAAA;AAQ7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,UAAkB,cAAc;IAEhC,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAA;IAEjC,oBAAoB;IACpB,IAAI,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;QACvC,OAAO;YACL,UAAU,EAAE,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC;YAClD,OAAO;YACP,SAAS,EAAE,IAAI;SAChB,CAAA;IACH,CAAC;IAED,gCAAgC;IAChC,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACvD,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,UAAU,GAAG,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AAM,WAAW,GAAG,UAAU,CAAC,aAAa,CAAC,CAAA;IAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAEjD,IAAI,WAAW,KAAK,aAAa,EAAE,CAAC;QAClC,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,OAAO,EACL,kBAAkB,aAAa,uCAAuC,eAAe,KAAK;gBAC1F,+BAA+B;SAClC,CAAA;IACH,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AAC7B,CAAC;AAED,SAAS,UAAU,CAAC,OAAe;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IACrC,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-blocking update notification shown after CLI commands.
|
|
3
|
+
* Checks once per 24 hours. Skips in CI environments.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Show an update notification if a newer engine version is available.
|
|
7
|
+
* This runs after every CLI command, but only actually checks the network
|
|
8
|
+
* once per 24 hours (throttled via ~/.supatype/update-check.json).
|
|
9
|
+
*/
|
|
10
|
+
export declare function showUpdateNotification(): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=update-notify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-notify.d.ts","sourceRoot":"","sources":["../../src/engine/update-notify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;;GAIG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAuB5D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-blocking update notification shown after CLI commands.
|
|
3
|
+
* Checks once per 24 hours. Skips in CI environments.
|
|
4
|
+
*/
|
|
5
|
+
import { ENGINE_VERSION } from "../engine-version.js";
|
|
6
|
+
import { shouldCheckForUpdates, saveUpdateCheck, getLastKnownLatestVersion, } from "./cache.js";
|
|
7
|
+
import { checkLatestVersion } from "./resolve.js";
|
|
8
|
+
/**
|
|
9
|
+
* Show an update notification if a newer engine version is available.
|
|
10
|
+
* This runs after every CLI command, but only actually checks the network
|
|
11
|
+
* once per 24 hours (throttled via ~/.supatype/update-check.json).
|
|
12
|
+
*/
|
|
13
|
+
export async function showUpdateNotification() {
|
|
14
|
+
try {
|
|
15
|
+
const shouldCheck = await shouldCheckForUpdates();
|
|
16
|
+
if (shouldCheck) {
|
|
17
|
+
// Perform network check
|
|
18
|
+
const latest = await checkLatestVersion();
|
|
19
|
+
if (latest) {
|
|
20
|
+
await saveUpdateCheck(latest.version);
|
|
21
|
+
if (latest.version !== ENGINE_VERSION) {
|
|
22
|
+
printNotification(latest.version);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// Use cached info from last check
|
|
28
|
+
const cachedLatest = await getLastKnownLatestVersion();
|
|
29
|
+
if (cachedLatest && cachedLatest !== ENGINE_VERSION) {
|
|
30
|
+
printNotification(cachedLatest);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Never fail the CLI command because of update check
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function printNotification(latestVersion) {
|
|
39
|
+
console.log();
|
|
40
|
+
console.log(`Supatype engine v${latestVersion} is available. ` +
|
|
41
|
+
`Run: npm update @supatype/cli`);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=update-notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-notify.js","sourceRoot":"","sources":["../../src/engine/update-notify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,yBAAyB,GAC1B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,qBAAqB,EAAE,CAAA;QAEjD,IAAI,WAAW,EAAE,CAAC;YAChB,wBAAwB;YACxB,MAAM,MAAM,GAAG,MAAM,kBAAkB,EAAE,CAAA;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;gBACrC,IAAI,MAAM,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;oBACtC,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,kCAAkC;YAClC,MAAM,YAAY,GAAG,MAAM,yBAAyB,EAAE,CAAA;YACtD,IAAI,YAAY,IAAI,YAAY,KAAK,cAAc,EAAE,CAAC;gBACpD,iBAAiB,CAAC,YAAY,CAAC,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qDAAqD;IACvD,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,aAAqB;IAC9C,OAAO,CAAC,GAAG,EAAE,CAAA;IACb,OAAO,CAAC,GAAG,CACT,oBAAoB,aAAa,iBAAiB;QAClD,+BAA+B,CAChC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checksum and signature verification for engine binaries.
|
|
3
|
+
*
|
|
4
|
+
* Two-step verification:
|
|
5
|
+
* 1. Verify minisign signature on checksums.sha256 file
|
|
6
|
+
* 2. Verify SHA256 hash of binary against signed checksum file
|
|
7
|
+
*
|
|
8
|
+
* Both steps MUST pass before the CLI executes the binary.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Embedded minisign public key.
|
|
12
|
+
*
|
|
13
|
+
* This key is used to verify the signature on the checksum file.
|
|
14
|
+
* It ensures the checksum file was produced by Supatype's CI,
|
|
15
|
+
* not by an attacker who compromised the CDN.
|
|
16
|
+
*
|
|
17
|
+
* Generated with: minisign -G
|
|
18
|
+
* The corresponding private key is stored as a GitHub Actions secret.
|
|
19
|
+
*
|
|
20
|
+
* TODO: Replace with actual public key once generated.
|
|
21
|
+
*/
|
|
22
|
+
export declare const MINISIGN_PUBLIC_KEY = "RWS0000000000000000000000000000000000000000000000000";
|
|
23
|
+
/**
|
|
24
|
+
* Verify the minisign signature on a checksum file.
|
|
25
|
+
*
|
|
26
|
+
* Uses a pure-JS minisign verification (Ed25519).
|
|
27
|
+
* Returns true if the signature is valid, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
export declare function verifySignature(checksumPath: string, signaturePath: string, publicKey?: string): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Verify the SHA256 checksum of a binary against a signed checksum file.
|
|
32
|
+
*
|
|
33
|
+
* The checksum file format follows sha256sum output:
|
|
34
|
+
* <hash> <filename>
|
|
35
|
+
*/
|
|
36
|
+
export declare function verifyChecksum(binaryPath: string, checksumPath: string, expectedFilename: string): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Run the full two-step verification pipeline.
|
|
39
|
+
* Deletes the binary if verification fails.
|
|
40
|
+
*
|
|
41
|
+
* Step 1: Verify minisign signature on checksums.sha256
|
|
42
|
+
* Step 2: Verify SHA256 hash of binary against signed checksum
|
|
43
|
+
*/
|
|
44
|
+
export declare function verifyBinary(binaryPath: string, checksumPath: string, signaturePath: string, artifactName: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Simple checksum-only verification (no signature).
|
|
47
|
+
* Used as a fallback when signature files are not available.
|
|
48
|
+
*/
|
|
49
|
+
export declare function verifyChecksumOnly(binaryPath: string, checksumPath: string, artifactName: string): Promise<void>;
|
|
50
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/engine/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,yDAAyD,CAAA;AAEzF;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,SAAS,GAAE,MAA4B,GACtC,OAAO,CAAC,OAAO,CAAC,CAkElB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAUf"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checksum and signature verification for engine binaries.
|
|
3
|
+
*
|
|
4
|
+
* Two-step verification:
|
|
5
|
+
* 1. Verify minisign signature on checksums.sha256 file
|
|
6
|
+
* 2. Verify SHA256 hash of binary against signed checksum file
|
|
7
|
+
*
|
|
8
|
+
* Both steps MUST pass before the CLI executes the binary.
|
|
9
|
+
*/
|
|
10
|
+
import { createHash } from "node:crypto";
|
|
11
|
+
import { readFile, unlink } from "node:fs/promises";
|
|
12
|
+
/**
|
|
13
|
+
* Embedded minisign public key.
|
|
14
|
+
*
|
|
15
|
+
* This key is used to verify the signature on the checksum file.
|
|
16
|
+
* It ensures the checksum file was produced by Supatype's CI,
|
|
17
|
+
* not by an attacker who compromised the CDN.
|
|
18
|
+
*
|
|
19
|
+
* Generated with: minisign -G
|
|
20
|
+
* The corresponding private key is stored as a GitHub Actions secret.
|
|
21
|
+
*
|
|
22
|
+
* TODO: Replace with actual public key once generated.
|
|
23
|
+
*/
|
|
24
|
+
export const MINISIGN_PUBLIC_KEY = "RWS0000000000000000000000000000000000000000000000000";
|
|
25
|
+
/**
|
|
26
|
+
* Verify the minisign signature on a checksum file.
|
|
27
|
+
*
|
|
28
|
+
* Uses a pure-JS minisign verification (Ed25519).
|
|
29
|
+
* Returns true if the signature is valid, false otherwise.
|
|
30
|
+
*/
|
|
31
|
+
export async function verifySignature(checksumPath, signaturePath, publicKey = MINISIGN_PUBLIC_KEY) {
|
|
32
|
+
// Minisign signature format:
|
|
33
|
+
// Line 1: untrusted comment
|
|
34
|
+
// Line 2: base64-encoded signature
|
|
35
|
+
// Line 3 (optional): trusted comment
|
|
36
|
+
// Line 4 (optional): base64-encoded global signature
|
|
37
|
+
try {
|
|
38
|
+
const sigContent = await readFile(signaturePath, "utf8");
|
|
39
|
+
const checksumContent = await readFile(checksumPath);
|
|
40
|
+
const sigLines = sigContent.trim().split("\n");
|
|
41
|
+
if (sigLines.length < 2)
|
|
42
|
+
return false;
|
|
43
|
+
// Parse the signature (line 2 is the base64-encoded signature)
|
|
44
|
+
const sigBase64 = sigLines[1].trim();
|
|
45
|
+
const sigBytes = Buffer.from(sigBase64, "base64");
|
|
46
|
+
// Minisign signature: 2 bytes algorithm + 8 bytes key ID + 64 bytes Ed25519 sig
|
|
47
|
+
if (sigBytes.length < 74)
|
|
48
|
+
return false;
|
|
49
|
+
const algorithm = sigBytes.subarray(0, 2);
|
|
50
|
+
const keyId = sigBytes.subarray(2, 10);
|
|
51
|
+
const signature = sigBytes.subarray(10, 74);
|
|
52
|
+
// Parse public key
|
|
53
|
+
const pkBytes = Buffer.from(publicKey.slice(2), "base64"); // Skip "RW" prefix
|
|
54
|
+
if (pkBytes.length < 42)
|
|
55
|
+
return false;
|
|
56
|
+
// Public key: 2 bytes algorithm + 8 bytes key ID + 32 bytes Ed25519 pubkey
|
|
57
|
+
const pkKeyId = pkBytes.subarray(2, 10);
|
|
58
|
+
const pk = pkBytes.subarray(10, 42);
|
|
59
|
+
// Verify key IDs match
|
|
60
|
+
if (!keyId.equals(pkKeyId))
|
|
61
|
+
return false;
|
|
62
|
+
// Verify Ed25519 signature using Node.js crypto
|
|
63
|
+
const { verify, createPublicKey } = await import("node:crypto");
|
|
64
|
+
const publicKeyObj = createPublicKey({
|
|
65
|
+
key: Buffer.concat([
|
|
66
|
+
// Ed25519 public key DER prefix
|
|
67
|
+
Buffer.from("302a300506032b6570032100", "hex"),
|
|
68
|
+
pk,
|
|
69
|
+
]),
|
|
70
|
+
format: "der",
|
|
71
|
+
type: "spki",
|
|
72
|
+
});
|
|
73
|
+
const isValid = verify(null, checksumContent, publicKeyObj, signature);
|
|
74
|
+
// If there's a trusted comment (line 3-4), verify the global signature too
|
|
75
|
+
if (sigLines.length >= 4 && isValid) {
|
|
76
|
+
const trustedComment = sigLines[2]?.replace(/^trusted comment: ?/, "") || "";
|
|
77
|
+
const globalSigBase64 = sigLines[3].trim();
|
|
78
|
+
const globalSig = Buffer.from(globalSigBase64, "base64");
|
|
79
|
+
const globalMessage = Buffer.concat([signature, Buffer.from(trustedComment)]);
|
|
80
|
+
const globalValid = verify(null, globalMessage, publicKeyObj, globalSig);
|
|
81
|
+
return globalValid;
|
|
82
|
+
}
|
|
83
|
+
return isValid;
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Verify the SHA256 checksum of a binary against a signed checksum file.
|
|
91
|
+
*
|
|
92
|
+
* The checksum file format follows sha256sum output:
|
|
93
|
+
* <hash> <filename>
|
|
94
|
+
*/
|
|
95
|
+
export async function verifyChecksum(binaryPath, checksumPath, expectedFilename) {
|
|
96
|
+
const checksumContent = await readFile(checksumPath, "utf8");
|
|
97
|
+
// Find the line matching our filename
|
|
98
|
+
const lines = checksumContent.trim().split("\n");
|
|
99
|
+
let expectedHash;
|
|
100
|
+
for (const line of lines) {
|
|
101
|
+
// Format: "<hash> <filename>" (two spaces)
|
|
102
|
+
const parts = line.trim().split(/\s+/);
|
|
103
|
+
if (parts.length >= 2 && parts[1] === expectedFilename) {
|
|
104
|
+
expectedHash = parts[0].toLowerCase();
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (!expectedHash) {
|
|
109
|
+
throw new Error(`No checksum found for ${expectedFilename} in checksum file`);
|
|
110
|
+
}
|
|
111
|
+
const binaryData = await readFile(binaryPath);
|
|
112
|
+
const actualHash = createHash("sha256").update(binaryData).digest("hex");
|
|
113
|
+
return actualHash === expectedHash;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Run the full two-step verification pipeline.
|
|
117
|
+
* Deletes the binary if verification fails.
|
|
118
|
+
*
|
|
119
|
+
* Step 1: Verify minisign signature on checksums.sha256
|
|
120
|
+
* Step 2: Verify SHA256 hash of binary against signed checksum
|
|
121
|
+
*/
|
|
122
|
+
export async function verifyBinary(binaryPath, checksumPath, signaturePath, artifactName) {
|
|
123
|
+
// Step 1: Verify signature
|
|
124
|
+
const sigValid = await verifySignature(checksumPath, signaturePath);
|
|
125
|
+
if (!sigValid) {
|
|
126
|
+
await safeDelete(binaryPath);
|
|
127
|
+
throw new Error("Engine checksum signature verification failed.\n" +
|
|
128
|
+
"The checksum file may have been tampered with.\n" +
|
|
129
|
+
"If this persists, report at https://github.com/supatype/supatype/issues");
|
|
130
|
+
}
|
|
131
|
+
// Step 2: Verify checksum
|
|
132
|
+
const checksumValid = await verifyChecksum(binaryPath, checksumPath, artifactName);
|
|
133
|
+
if (!checksumValid) {
|
|
134
|
+
await safeDelete(binaryPath);
|
|
135
|
+
throw new Error("Engine binary checksum mismatch.\n" +
|
|
136
|
+
"This could indicate a corrupt download or a tampered binary.\n" +
|
|
137
|
+
"Try again or report at https://github.com/supatype/supatype/issues");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Simple checksum-only verification (no signature).
|
|
142
|
+
* Used as a fallback when signature files are not available.
|
|
143
|
+
*/
|
|
144
|
+
export async function verifyChecksumOnly(binaryPath, checksumPath, artifactName) {
|
|
145
|
+
const valid = await verifyChecksum(binaryPath, checksumPath, artifactName);
|
|
146
|
+
if (!valid) {
|
|
147
|
+
await safeDelete(binaryPath);
|
|
148
|
+
throw new Error("Engine binary checksum mismatch.\n" +
|
|
149
|
+
"This could indicate a corrupt download or a tampered binary.\n" +
|
|
150
|
+
"Try again or report at https://github.com/supatype/supatype/issues");
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async function safeDelete(path) {
|
|
154
|
+
try {
|
|
155
|
+
await unlink(path);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// Ignore deletion errors
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/engine/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sDAAsD,CAAA;AAEzF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,YAAoB,EACpB,aAAqB,EACrB,YAAoB,mBAAmB;IAEvC,6BAA6B;IAC7B,4BAA4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AA;QAC5B,MAAM,IAAI,KAAK,CACb,kDAAkD;YAClD,kDAAkD;YAClD,yEAAyE,CAC1E,CAAA;IACH,CAAC;IAED,0BAA0B;IAC1B,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;IAClF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,UAAU,CAAC,UAAU,CAAC,CAAA;QAC5B,MAAM,IAAI,KAAK,CACb,oCAAoC;YACpC,gEAAgE;YAChE,oEAAoE,CACrE,CAAA;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAAkB,EAClB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;IAC1E,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,UAAU,CAAC,UAAU,CAAC,CAAA;QAC5B,MAAM,IAAI,KAAK,CACb,oCAAoC;YACpC,gEAAgE;YAChE,oEAAoE,CACrE,CAAA;IACH,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IAAC,MAAM,CAAC;QACP,yBAAyB;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine binary version this CLI package expects.
|
|
3
|
+
* Update this whenever a new engine binary is released.
|
|
4
|
+
*
|
|
5
|
+
* The CLI always downloads and uses this exact version.
|
|
6
|
+
* Upgrading the CLI (npm update) may bump the pinned engine version.
|
|
7
|
+
* This ensures CLI and engine are always compatible.
|
|
8
|
+
*
|
|
9
|
+
* Versioning policy:
|
|
10
|
+
* 0.x.y-alpha.N — alpha
|
|
11
|
+
* 0.x.y-beta.N — beta
|
|
12
|
+
* 0.x.y — stable pre-1.0
|
|
13
|
+
* 1.0.0 — cloud launch
|
|
14
|
+
* Major bumps (1.0 → 2.0) indicate breaking changes to the schema AST format.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ENGINE_VERSION = "0.1.0";
|
|
17
|
+
/**
|
|
18
|
+
* Primary CDN for engine binary distribution.
|
|
19
|
+
* Hetzner Object Storage behind Cloudflare edge caching.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CDN_BASE_URL = "https://releases.supatype.io/engine";
|
|
22
|
+
/**
|
|
23
|
+
* Fallback: GitHub Releases on the public engine-releases repo.
|
|
24
|
+
* Used when the primary CDN is unavailable.
|
|
25
|
+
* Contains only binaries — no source code.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ENGINE_RELEASES_REPO = "supatype/engine-releases";
|
|
28
|
+
export declare const GITHUB_RELEASES_FALLBACK_URL = "https://github.com/supatype/engine-releases/releases/download";
|
|
29
|
+
/**
|
|
30
|
+
* Legacy: GitHub repository for direct engine releases (before CDN).
|
|
31
|
+
* Kept for backwards compatibility with existing downloads.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ENGINE_REPO = "supatype/schema-engine";
|
|
34
|
+
export declare const ENGINE_DOWNLOAD_BASE = "https://github.com/supatype/schema-engine/releases/download/v0.1.0";
|
|
35
|
+
//# sourceMappingURL=engine-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-version.d.ts","sourceRoot":"","sources":["../src/engine-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,UAAU,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,YAAY,wCAAwC,CAAA;AAEjE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,6BAA6B,CAAA;AAC9D,eAAO,MAAM,4BAA4B,kEACuB,CAAA;AAEhE;;;GAGG;AACH,eAAO,MAAM,WAAW,2BAA2B,CAAA;AACnD,eAAO,MAAM,oBAAoB,uEACyC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine binary version this CLI package expects.
|
|
3
|
+
* Update this whenever a new engine binary is released.
|
|
4
|
+
*
|
|
5
|
+
* The CLI always downloads and uses this exact version.
|
|
6
|
+
* Upgrading the CLI (npm update) may bump the pinned engine version.
|
|
7
|
+
* This ensures CLI and engine are always compatible.
|
|
8
|
+
*
|
|
9
|
+
* Versioning policy:
|
|
10
|
+
* 0.x.y-alpha.N — alpha
|
|
11
|
+
* 0.x.y-beta.N — beta
|
|
12
|
+
* 0.x.y — stable pre-1.0
|
|
13
|
+
* 1.0.0 — cloud launch
|
|
14
|
+
* Major bumps (1.0 → 2.0) indicate breaking changes to the schema AST format.
|
|
15
|
+
*/
|
|
16
|
+
export const ENGINE_VERSION = "0.1.0";
|
|
17
|
+
/**
|
|
18
|
+
* Primary CDN for engine binary distribution.
|
|
19
|
+
* Hetzner Object Storage behind Cloudflare edge caching.
|
|
20
|
+
*/
|
|
21
|
+
export const CDN_BASE_URL = "https://releases.supatype.io/engine";
|
|
22
|
+
/**
|
|
23
|
+
* Fallback: GitHub Releases on the public engine-releases repo.
|
|
24
|
+
* Used when the primary CDN is unavailable.
|
|
25
|
+
* Contains only binaries — no source code.
|
|
26
|
+
*/
|
|
27
|
+
export const ENGINE_RELEASES_REPO = "supatype/engine-releases";
|
|
28
|
+
export const GITHUB_RELEASES_FALLBACK_URL = `https://github.com/${ENGINE_RELEASES_REPO}/releases/download`;
|
|
29
|
+
/**
|
|
30
|
+
* Legacy: GitHub repository for direct engine releases (before CDN).
|
|
31
|
+
* Kept for backwards compatibility with existing downloads.
|
|
32
|
+
*/
|
|
33
|
+
export const ENGINE_REPO = "supatype/schema-engine";
|
|
34
|
+
export const ENGINE_DOWNLOAD_BASE = `https://github.com/${ENGINE_REPO}/releases/download/v${ENGINE_VERSION}`;
|
|
35
|
+
//# sourceMappingURL=engine-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-version.js","sourceRoot":"","sources":["../src/engine-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,qCAAqC,CAAA;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAA;AAC9D,MAAM,CAAC,MAAM,4BAA4B,GACvC,sBAAsB,oBAAoB,oBAAoB,CAAA;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAA;AACnD,MAAM,CAAC,MAAM,oBAAoB,GAC/B,sBAAsB,WAAW,uBAAuB,cAAc,EAAE,CAAA"}
|