chore: import upstream snapshot with attribution
regression / regression-shards (style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr, shard-4) (push) Has been cancelled
regression / regression-shards (style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression, shard-5) (push) Has been cancelled
regression / regression-shards (style-7-prod style-8-prod style-10-prod css-spinner-render-compat webm-transparency mp4-h264-sdr webm-vp9, shard-3) (push) Has been cancelled
regression / regression-shards (sub-composition-video style-18-prod raf-ball-render-compat font-variant-numeric sub-comp-t0 sub-comp-id-selector, shard-7) (push) Has been cancelled
Windows render verification / Detect changes (push) Has been cancelled
Windows render verification / Preflight (lint + format) (push) Has been cancelled
Windows render verification / Render on windows-latest (push) Has been cancelled
Windows render verification / Tests on windows-latest (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Fallow audit (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Producer: integration tests (push) Has been cancelled
CI / Producer: unit tests (push) Has been cancelled
CI / File size check (push) Has been cancelled
CI / Test: skills (push) Has been cancelled
CI / Skills: manifest in sync (push) Has been cancelled
CI / CLI: npx shim (macos-latest) (push) Has been cancelled
CI / CLI: npx shim (ubuntu-latest) (push) Has been cancelled
CI / CLI: npx shim (windows-latest) (push) Has been cancelled
CI / SDK: unit + contract + smoke (push) Has been cancelled
CI / Test: runtime contract (push) Has been cancelled
CI / Studio: load smoke (push) Has been cancelled
CI / Smoke: global install (push) Has been cancelled
CI / CLI smoke (required) (push) Has been cancelled
CI / Semantic PR title (push) Has been cancelled
Player perf / Detect changes (push) Has been cancelled
Player perf / Preflight (lint + format) (push) Has been cancelled
Player perf / player-perf (push) Has been cancelled
Player perf / Perf: drift (push) Has been cancelled
Player perf / Perf: fps (push) Has been cancelled
Player perf / Perf: parity (push) Has been cancelled
Player perf / Perf: scrub (push) Has been cancelled
Player perf / Perf: load (push) Has been cancelled
preview-regression / Detect changes (push) Has been cancelled
preview-regression / Preflight (lint + format) (push) Has been cancelled
preview-regression / Preview parity (push) Has been cancelled
preview-regression / preview-regression (push) Has been cancelled
regression / regression (push) Has been cancelled
regression / Detect changes (push) Has been cancelled
regression / Preflight (lint + format) (push) Has been cancelled
regression / regression-shards (hdr-regression style-5-prod style-3-prod mov-prores, shard-1) (push) Has been cancelled
regression / regression-shards (overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence portrait-edge-bleed, shard-6) (push) Has been cancelled
regression / regression-shards (style-13-prod style-6-prod vignelli-stacking gsap-letters-render-compat audio-mux-parity, shard-8) (push) Has been cancelled
regression / regression-shards (style-15-prod hdr-hlg-regression style-1-prod many-cuts vfr-screen-recording render-symlinked-assets, shard-2) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docs / Validate docs (push) Has been cancelled
Sync skills to ClawHub / Publish changed skills (push) Has been cancelled
regression / regression-shards (style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr, shard-4) (push) Has been cancelled
regression / regression-shards (style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression, shard-5) (push) Has been cancelled
regression / regression-shards (style-7-prod style-8-prod style-10-prod css-spinner-render-compat webm-transparency mp4-h264-sdr webm-vp9, shard-3) (push) Has been cancelled
regression / regression-shards (sub-composition-video style-18-prod raf-ball-render-compat font-variant-numeric sub-comp-t0 sub-comp-id-selector, shard-7) (push) Has been cancelled
Windows render verification / Detect changes (push) Has been cancelled
Windows render verification / Preflight (lint + format) (push) Has been cancelled
Windows render verification / Render on windows-latest (push) Has been cancelled
Windows render verification / Tests on windows-latest (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Fallow audit (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Producer: integration tests (push) Has been cancelled
CI / Producer: unit tests (push) Has been cancelled
CI / File size check (push) Has been cancelled
CI / Test: skills (push) Has been cancelled
CI / Skills: manifest in sync (push) Has been cancelled
CI / CLI: npx shim (macos-latest) (push) Has been cancelled
CI / CLI: npx shim (ubuntu-latest) (push) Has been cancelled
CI / CLI: npx shim (windows-latest) (push) Has been cancelled
CI / SDK: unit + contract + smoke (push) Has been cancelled
CI / Test: runtime contract (push) Has been cancelled
CI / Studio: load smoke (push) Has been cancelled
CI / Smoke: global install (push) Has been cancelled
CI / CLI smoke (required) (push) Has been cancelled
CI / Semantic PR title (push) Has been cancelled
Player perf / Detect changes (push) Has been cancelled
Player perf / Preflight (lint + format) (push) Has been cancelled
Player perf / player-perf (push) Has been cancelled
Player perf / Perf: drift (push) Has been cancelled
Player perf / Perf: fps (push) Has been cancelled
Player perf / Perf: parity (push) Has been cancelled
Player perf / Perf: scrub (push) Has been cancelled
Player perf / Perf: load (push) Has been cancelled
preview-regression / Detect changes (push) Has been cancelled
preview-regression / Preflight (lint + format) (push) Has been cancelled
preview-regression / Preview parity (push) Has been cancelled
preview-regression / preview-regression (push) Has been cancelled
regression / regression (push) Has been cancelled
regression / Detect changes (push) Has been cancelled
regression / Preflight (lint + format) (push) Has been cancelled
regression / regression-shards (hdr-regression style-5-prod style-3-prod mov-prores, shard-1) (push) Has been cancelled
regression / regression-shards (overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence portrait-edge-bleed, shard-6) (push) Has been cancelled
regression / regression-shards (style-13-prod style-6-prod vignelli-stacking gsap-letters-render-compat audio-mux-parity, shard-8) (push) Has been cancelled
regression / regression-shards (style-15-prod hdr-hlg-regression style-1-prod many-cuts vfr-screen-recording render-symlinked-assets, shard-2) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docs / Validate docs (push) Has been cancelled
Sync skills to ClawHub / Publish changed skills (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import { defineConfig } from "tsup";
|
||||
import { resolve } from "node:path";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const pkg = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf-8")) as {
|
||||
version: string;
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
entry: {
|
||||
cli: "src/cli.ts",
|
||||
shaderTransitionWorker: "../producer/src/services/shaderTransitionWorker.ts",
|
||||
},
|
||||
format: ["esm"],
|
||||
outDir: "dist",
|
||||
target: "node22",
|
||||
platform: "node",
|
||||
bundle: true,
|
||||
splitting: false,
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
banner: {
|
||||
js: `import { createRequire as __hf_createRequire } from "node:module";
|
||||
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
||||
import { dirname as __hf_dirname } from "node:path";
|
||||
var require = __hf_createRequire(import.meta.url);
|
||||
var __filename = __hf_fileURLToPath(import.meta.url);
|
||||
var __dirname = __hf_dirname(__filename);`,
|
||||
},
|
||||
external: [
|
||||
"puppeteer-core",
|
||||
"puppeteer",
|
||||
"@puppeteer/browsers",
|
||||
// Native module — its platform binary (@img/sharp-<os>-<arch>) must be
|
||||
// resolved from node_modules at runtime, never bundled. Loaded lazily by
|
||||
// the capture pipeline; runtime resolution comes from the `dependencies`
|
||||
// entry in package.json.
|
||||
"sharp",
|
||||
"open",
|
||||
"hono",
|
||||
"hono/*",
|
||||
"@hono/node-server",
|
||||
"adm-zip",
|
||||
"esbuild",
|
||||
"giget",
|
||||
"postcss",
|
||||
// aws-lambda transitively pulls @aws-sdk/* + @smithy/* which include
|
||||
// .browser.js conditional exports esbuild can't bundle cleanly into
|
||||
// a node binary. Keep it external; the lambda subverb files dynamic-
|
||||
// import it only when the user runs `hyperframes lambda *`, so the
|
||||
// CLI's cold start doesn't load it. Runtime resolution comes from
|
||||
// @hyperframes/aws-lambda being a `dependencies` entry in package.json.
|
||||
"@hyperframes/aws-lambda",
|
||||
"@hyperframes/aws-lambda/sdk",
|
||||
// Same treatment for the GCP adapter: the cloudrun subverb files
|
||||
// dynamic-import `@hyperframes/gcp-cloud-run/sdk` only when the user runs
|
||||
// `hyperframes cloudrun *`. Keep it external; runtime resolution comes
|
||||
// from the `dependencies`/workspace entry, not the bundled CLI.
|
||||
"@hyperframes/gcp-cloud-run",
|
||||
"@hyperframes/gcp-cloud-run/sdk",
|
||||
],
|
||||
noExternal: [
|
||||
"@hyperframes/core",
|
||||
"@hyperframes/parsers",
|
||||
"@hyperframes/studio-server",
|
||||
"@hyperframes/lint",
|
||||
"@hyperframes/producer",
|
||||
"@hyperframes/engine",
|
||||
"@clack/prompts",
|
||||
"@clack/core",
|
||||
"picocolors",
|
||||
"linkedom",
|
||||
"sisteransi",
|
||||
"is-unicode-supported",
|
||||
"citty",
|
||||
],
|
||||
define: {
|
||||
__CLI_VERSION__: JSON.stringify(pkg.version),
|
||||
},
|
||||
esbuildOptions(options) {
|
||||
options.alias = {
|
||||
"@hyperframes/producer": resolve(__dirname, "../producer/src/index.ts"),
|
||||
// esbuild's alias map treats `@hyperframes/producer` as a file path
|
||||
// and would otherwise resolve `@hyperframes/producer/distributed`
|
||||
// to `../producer/src/index.ts/distributed` (treating the file as a
|
||||
// directory). Adding an explicit alias for every subpath we import
|
||||
// avoids the prefix-substitution misfire.
|
||||
"@hyperframes/producer/distributed": resolve(__dirname, "../producer/src/distributed.ts"),
|
||||
// Same reason: the lambda CLI imports `@hyperframes/aws-lambda/sdk`,
|
||||
// which would resolve to `../aws-lambda/src/index.ts/sdk` without
|
||||
// an explicit subpath alias. The SDK subpath has its own barrel.
|
||||
"@hyperframes/aws-lambda/sdk": resolve(__dirname, "../aws-lambda/src/sdk/index.ts"),
|
||||
// Same for the GCP adapter's SDK subpath barrel.
|
||||
"@hyperframes/gcp-cloud-run/sdk": resolve(__dirname, "../gcp-cloud-run/src/sdk/index.ts"),
|
||||
// hf#677 follow-up: the shader-blend worker imports from
|
||||
// `@hyperframes/engine/shader-transitions` (subpath export) — a
|
||||
// standalone TS file with zero internal imports that survives the
|
||||
// worker_thread loader boundary.
|
||||
"@hyperframes/engine/shader-transitions": resolve(
|
||||
__dirname,
|
||||
"../engine/src/utils/shaderTransitions.ts",
|
||||
),
|
||||
};
|
||||
options.loader = { ...options.loader, ".browser.js": "text" };
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user