veryfront 0.1.1055 → 0.1.1059

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.
Files changed (105) hide show
  1. package/esm/cli/commands/eval/command-help.d.ts.map +1 -1
  2. package/esm/cli/commands/eval/command-help.js +20 -0
  3. package/esm/cli/commands/eval/command.d.ts +2 -0
  4. package/esm/cli/commands/eval/command.d.ts.map +1 -1
  5. package/esm/cli/commands/eval/command.js +23 -2
  6. package/esm/cli/commands/eval/handler.d.ts +10 -0
  7. package/esm/cli/commands/eval/handler.d.ts.map +1 -1
  8. package/esm/cli/commands/eval/handler.js +16 -0
  9. package/esm/deno.js +1 -1
  10. package/esm/extensions/ext-bundler-esbuild/src/binary.d.ts +7 -0
  11. package/esm/extensions/ext-bundler-esbuild/src/binary.d.ts.map +1 -0
  12. package/esm/extensions/ext-bundler-esbuild/src/binary.js +143 -0
  13. package/esm/extensions/ext-bundler-esbuild/src/es-module-lexer.d.ts +17 -0
  14. package/esm/extensions/ext-bundler-esbuild/src/es-module-lexer.d.ts.map +1 -0
  15. package/esm/extensions/ext-bundler-esbuild/src/es-module-lexer.js +29 -0
  16. package/esm/extensions/ext-bundler-esbuild/src/esbuild-bundler.d.ts +25 -0
  17. package/esm/extensions/ext-bundler-esbuild/src/esbuild-bundler.d.ts.map +1 -0
  18. package/esm/extensions/ext-bundler-esbuild/src/esbuild-bundler.js +408 -0
  19. package/esm/extensions/ext-bundler-esbuild/src/index.d.ts +19 -0
  20. package/esm/extensions/ext-bundler-esbuild/src/index.d.ts.map +1 -0
  21. package/esm/extensions/ext-bundler-esbuild/src/index.js +40 -0
  22. package/esm/extensions/ext-bundler-esbuild/src/plugin-adapter.d.ts +16 -0
  23. package/esm/extensions/ext-bundler-esbuild/src/plugin-adapter.d.ts.map +1 -0
  24. package/esm/extensions/ext-bundler-esbuild/src/plugin-adapter.js +55 -0
  25. package/esm/extensions/ext-bundler-esbuild/src/runtime.d.ts +4 -0
  26. package/esm/extensions/ext-bundler-esbuild/src/runtime.d.ts.map +1 -0
  27. package/esm/extensions/ext-bundler-esbuild/src/runtime.js +43 -0
  28. package/esm/src/config/define-config.d.ts +2 -0
  29. package/esm/src/config/define-config.d.ts.map +1 -1
  30. package/esm/src/config/define-config.js +2 -0
  31. package/esm/src/config/index.d.ts +1 -1
  32. package/esm/src/config/index.d.ts.map +1 -1
  33. package/esm/src/config/index.js +1 -1
  34. package/esm/src/eval/baseline.d.ts +2 -2
  35. package/esm/src/eval/baseline.d.ts.map +1 -1
  36. package/esm/src/eval/baseline.js +62 -8
  37. package/esm/src/eval/index.d.ts +2 -2
  38. package/esm/src/eval/index.d.ts.map +1 -1
  39. package/esm/src/eval/index.js +1 -1
  40. package/esm/src/eval/metrics.d.ts +3 -1
  41. package/esm/src/eval/metrics.d.ts.map +1 -1
  42. package/esm/src/eval/metrics.js +220 -0
  43. package/esm/src/eval/report.d.ts +6 -1
  44. package/esm/src/eval/report.d.ts.map +1 -1
  45. package/esm/src/eval/report.js +46 -0
  46. package/esm/src/eval/runner.d.ts +1 -0
  47. package/esm/src/eval/runner.d.ts.map +1 -1
  48. package/esm/src/eval/runner.js +57 -14
  49. package/esm/src/eval/types.d.ts +64 -0
  50. package/esm/src/eval/types.d.ts.map +1 -1
  51. package/esm/src/extensions/eval/eval-report-exporter.d.ts +7 -1
  52. package/esm/src/extensions/eval/eval-report-exporter.d.ts.map +1 -1
  53. package/esm/src/extensions/eval/eval-report-exporter.js +45 -2
  54. package/esm/src/index.d.ts +1 -1
  55. package/esm/src/index.d.ts.map +1 -1
  56. package/esm/src/index.js +1 -1
  57. package/esm/src/release-assets/build-executor.d.ts +7 -20
  58. package/esm/src/release-assets/build-executor.d.ts.map +1 -1
  59. package/esm/src/release-assets/build-executor.js +142 -8
  60. package/esm/src/release-assets/css-compile.d.ts +7 -3
  61. package/esm/src/release-assets/css-compile.d.ts.map +1 -1
  62. package/esm/src/release-assets/css-compile.js +3 -3
  63. package/esm/src/rendering/cache/cache-coordinator.d.ts +4 -1
  64. package/esm/src/rendering/cache/cache-coordinator.d.ts.map +1 -1
  65. package/esm/src/rendering/cache/cache-coordinator.js +19 -1
  66. package/esm/src/rendering/cache/stores/api-store.d.ts +1 -0
  67. package/esm/src/rendering/cache/stores/api-store.d.ts.map +1 -1
  68. package/esm/src/rendering/cache/stores/api-store.js +11 -1
  69. package/esm/src/rendering/cache/types.d.ts +1 -0
  70. package/esm/src/rendering/cache/types.d.ts.map +1 -1
  71. package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
  72. package/esm/src/rendering/orchestrator/html.js +10 -13
  73. package/esm/src/rendering/renderer.d.ts +3 -0
  74. package/esm/src/rendering/renderer.d.ts.map +1 -1
  75. package/esm/src/rendering/renderer.js +53 -1
  76. package/esm/src/rendering/shared/context-aware-cache.d.ts +4 -0
  77. package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
  78. package/esm/src/rendering/shared/context-aware-cache.js +34 -1
  79. package/esm/src/server/context/cache-invalidation.d.ts.map +1 -1
  80. package/esm/src/server/context/cache-invalidation.js +7 -0
  81. package/esm/src/server/dev-server/middleware.d.ts +7 -0
  82. package/esm/src/server/dev-server/middleware.d.ts.map +1 -1
  83. package/esm/src/server/dev-server/middleware.js +22 -14
  84. package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
  85. package/esm/src/server/handlers/dev/files/esbuild-plugins.js +11 -6
  86. package/esm/src/server/handlers/dev/styles-css.handler.d.ts +1 -0
  87. package/esm/src/server/handlers/dev/styles-css.handler.d.ts.map +1 -1
  88. package/esm/src/server/handlers/dev/styles-css.handler.js +11 -2
  89. package/esm/src/server/handlers/request/api/project-discovery.d.ts.map +1 -1
  90. package/esm/src/server/handlers/request/api/project-discovery.js +63 -4
  91. package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
  92. package/esm/src/server/handlers/request/project-run-execute.handler.js +0 -7
  93. package/esm/src/server/production-server.d.ts.map +1 -1
  94. package/esm/src/server/production-server.js +25 -4
  95. package/esm/src/server/project-env/index.d.ts +1 -1
  96. package/esm/src/server/project-env/index.d.ts.map +1 -1
  97. package/esm/src/server/project-env/index.js +1 -1
  98. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  99. package/esm/src/server/runtime-handler/index.js +7 -1
  100. package/esm/src/server/runtime-handler/project-middleware.d.ts +28 -0
  101. package/esm/src/server/runtime-handler/project-middleware.d.ts.map +1 -0
  102. package/esm/src/server/runtime-handler/project-middleware.js +136 -0
  103. package/esm/src/utils/version-constant.d.ts +1 -1
  104. package/esm/src/utils/version-constant.js +1 -1
  105. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WA2EtB,CAAC"}
1
+ {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WA+FtB,CAAC"}
@@ -32,6 +32,26 @@ export const evalHelp = {
32
32
  flag: "--write-baseline <path>",
33
33
  description: "Write the eval report JSON as the next baseline",
34
34
  },
35
+ {
36
+ flag: "--baseline-pass-rate-drop-threshold <fraction>",
37
+ description: "Allow this aggregate pass-rate drop before a baseline regression fails",
38
+ },
39
+ {
40
+ flag: "--baseline-metric-pass-rate-drop-threshold <fraction>",
41
+ description: "Allow this per-metric pass-rate drop before a baseline regression fails",
42
+ },
43
+ {
44
+ flag: "--baseline-failed-delta-threshold <count>",
45
+ description: "Allow this failed-result count increase before a baseline regression fails",
46
+ },
47
+ {
48
+ flag: "--baseline-usage-increase-threshold <fraction>",
49
+ description: "Fail when reported usage or cost increases beyond this baseline fraction",
50
+ },
51
+ {
52
+ flag: "--baseline-latency-increase-threshold <fraction>",
53
+ description: "Fail when p95 latency increases beyond this baseline fraction",
54
+ },
35
55
  {
36
56
  flag: "--export <ids>",
37
57
  description: "Export the report through registered eval exporters",
@@ -25,10 +25,12 @@ type EvalModelArtifactPaths = EvalArtifactPaths & {
25
25
  };
26
26
  type EvalSummaryArtifact = {
27
27
  kind: "eval-summary";
28
+ schemaVersion: number;
28
29
  runId: string;
29
30
  definitionId: string;
30
31
  targetKind: EvalReport["targetKind"];
31
32
  target: string;
33
+ dataset?: EvalReport["dataset"];
32
34
  startedAt: string;
33
35
  endedAt: string;
34
36
  summary: EvalReport["summary"];
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/command.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EACV,cAAc,EAGd,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EAEb,MAAM,4BAA4B,CAAC;AA0BpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,WAAY,SAAQ,QAAQ;CAAG;AAEhD,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,MAAM,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MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AA8LF,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA0JrE"}
@@ -4,7 +4,7 @@
4
4
  import * as dntShim from "../../../_dnt.shims.js";
5
5
  import { dirname, isAbsolute, join, relative, resolve } from "../../../deps/jsr.io/@std/path/1.1.4/mod.js";
6
6
  import { createProjectDiscoveryConfig, discoverAll } from "../../../src/discovery/index.js";
7
- import { compareEvalModelReports, compareEvalReports, createEvalModelComparisonMarkdown, createEvalRunId, discoverEvals, exportEvalReport, resolveEvalRunProvenance, runEval, } from "../../../src/eval/index.js";
7
+ import { compareEvalModelReports, compareEvalReports, createEvalModelComparisonMarkdown, createEvalRunId, discoverEvals, EVAL_REPORT_SCHEMA_VERSION, exportEvalReport, resolveEvalRunProvenance, runEval, } from "../../../src/eval/index.js";
8
8
  import { getCurrentVeryfrontCloudContext, getVeryfrontCloudBootstrap, runWithVeryfrontCloudContextAsync, } from "../../../src/provider/index.js";
9
9
  import { applyRuntimeAuthContext } from "../../shared/runtime-auth.js";
10
10
  import { cliLogger, exitProcess, VERSION } from "../../utils/index.js";
@@ -153,10 +153,12 @@ export function summarizeReportForCli(report) {
153
153
  export function createSummaryArtifact(report, baseline) {
154
154
  return {
155
155
  kind: "eval-summary",
156
+ schemaVersion: report.schemaVersion ?? EVAL_REPORT_SCHEMA_VERSION,
156
157
  runId: report.runId,
157
158
  definitionId: report.definitionId,
158
159
  targetKind: report.targetKind,
159
160
  target: report.target,
161
+ ...(report.dataset ? { dataset: report.dataset } : {}),
160
162
  startedAt: report.startedAt,
161
163
  endedAt: report.endedAt,
162
164
  summary: report.summary,
@@ -165,6 +167,25 @@ export function createSummaryArtifact(report, baseline) {
165
167
  ...(baseline ? { baseline } : {}),
166
168
  };
167
169
  }
170
+ function createEvalBaselineComparisonPolicy(options) {
171
+ return {
172
+ ...(options.baselinePassRateDropThreshold !== undefined
173
+ ? { passRateDropThreshold: options.baselinePassRateDropThreshold }
174
+ : {}),
175
+ ...(options.baselineMetricPassRateDropThreshold !== undefined
176
+ ? { metricPassRateDropThreshold: options.baselineMetricPassRateDropThreshold }
177
+ : {}),
178
+ ...(options.baselineFailedDeltaThreshold !== undefined
179
+ ? { failedDeltaThreshold: options.baselineFailedDeltaThreshold }
180
+ : {}),
181
+ ...(options.baselineUsageIncreaseThreshold !== undefined
182
+ ? { usageIncreaseThreshold: options.baselineUsageIncreaseThreshold }
183
+ : {}),
184
+ ...(options.baselineLatencyIncreaseThreshold !== undefined
185
+ ? { latencyIncreaseThreshold: options.baselineLatencyIncreaseThreshold }
186
+ : {}),
187
+ };
188
+ }
168
189
  function isRecord(value) {
169
190
  return value !== null && typeof value === "object" && !Array.isArray(value);
170
191
  }
@@ -1003,7 +1024,7 @@ export async function evalCommand(options) {
1003
1024
  }));
1004
1025
  const report = await exportEvalReportForCli(finalizedReport, exportConfig);
1005
1026
  const baseline = options.baseline
1006
- ? compareEvalReports(report, await readEvalReport(options.baseline))
1027
+ ? compareEvalReports(report, await readEvalReport(options.baseline), createEvalBaselineComparisonPolicy(options))
1007
1028
  : undefined;
1008
1029
  await writeEvalArtifacts(report, artifactPaths, baseline);
1009
1030
  if (options.report) {
@@ -9,6 +9,11 @@ declare const getEvalArgsSchema: () => import("../../../src/internal-agents/sche
9
9
  junit: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
10
10
  baseline: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
11
11
  writeBaseline: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
12
+ baselinePassRateDropThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
13
+ baselineMetricPassRateDropThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
14
+ baselineFailedDeltaThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
15
+ baselineUsageIncreaseThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
16
+ baselineLatencyIncreaseThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
12
17
  exporters: import("../../../src/internal-agents/schema.js").Schema<string[]>;
13
18
  debug: import("../../../src/internal-agents/schema.js").Schema<boolean>;
14
19
  model: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
@@ -27,6 +32,11 @@ export declare const parseEvalArgs: (args: ParsedArgs) => import("../../shared/a
27
32
  junit: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
28
33
  baseline: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
29
34
  writeBaseline: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
35
+ baselinePassRateDropThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
36
+ baselineMetricPassRateDropThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
37
+ baselineFailedDeltaThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
38
+ baselineUsageIncreaseThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
39
+ baselineLatencyIncreaseThreshold: import("../../../src/internal-agents/schema.js").Schema<number | undefined>;
30
40
  exporters: import("../../../src/internal-agents/schema.js").Schema<string[]>;
31
41
  debug: import("../../../src/internal-agents/schema.js").Schema<boolean>;
32
42
  model: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;GAkBtB,CAAC;AAIF,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;GAgBxB,CAAC;AAEH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;GAuBtB,CAAC;AAIF,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;GA2BxB,CAAC;AAEH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE"}
@@ -9,6 +9,11 @@ const getEvalArgsSchema = defineSchema((v) => v.object({
9
9
  junit: v.string().optional(),
10
10
  baseline: v.string().optional(),
11
11
  writeBaseline: v.string().optional(),
12
+ baselinePassRateDropThreshold: v.number().min(0).optional(),
13
+ baselineMetricPassRateDropThreshold: v.number().min(0).optional(),
14
+ baselineFailedDeltaThreshold: v.number().min(0).optional(),
15
+ baselineUsageIncreaseThreshold: v.number().min(0).optional(),
16
+ baselineLatencyIncreaseThreshold: v.number().min(0).optional(),
12
17
  exporters: v.array(v.string()).default([]),
13
18
  debug: v.boolean().default(false),
14
19
  model: v.string().optional(),
@@ -27,6 +32,17 @@ export const parseEvalArgs = createArgParser(EvalArgsSchema, {
27
32
  junit: { keys: ["junit"], type: "string" },
28
33
  baseline: { keys: ["baseline"], type: "string" },
29
34
  writeBaseline: { keys: ["write-baseline"], type: "string" },
35
+ baselinePassRateDropThreshold: { keys: ["baseline-pass-rate-drop-threshold"], type: "number" },
36
+ baselineMetricPassRateDropThreshold: {
37
+ keys: ["baseline-metric-pass-rate-drop-threshold"],
38
+ type: "number",
39
+ },
40
+ baselineFailedDeltaThreshold: { keys: ["baseline-failed-delta-threshold"], type: "number" },
41
+ baselineUsageIncreaseThreshold: { keys: ["baseline-usage-increase-threshold"], type: "number" },
42
+ baselineLatencyIncreaseThreshold: {
43
+ keys: ["baseline-latency-increase-threshold"],
44
+ type: "number",
45
+ },
30
46
  exporters: { keys: ["export"], type: "array" },
31
47
  debug: { keys: ["debug"], type: "boolean" },
32
48
  model: { keys: ["model"], type: "string" },
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1055",
3
+ "version": "0.1.1059",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Idempotent one-shot setup — copies the esbuild binary out of the VFS (if
3
+ * running in `deno compile`) and sets ESBUILD_BINARY_PATH. No-op on normal
4
+ * Deno or when the env var is already set.
5
+ */
6
+ export declare function ensureEsbuildBinary(): Promise<void>;
7
+ //# sourceMappingURL=binary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-bundler-esbuild/src/binary.ts"],"names":[],"mappings":"AAmHA;;;;GAIG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAiCzD"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Binary extraction for `deno compile` VFS.
3
+ *
4
+ * Ported from src/platform/compat/esbuild.ts + esbuild-shared.ts. When the
5
+ * framework runs as a compiled Deno binary, the esbuild native binary lives
6
+ * inside the VFS and must be copied to a writable path before esbuild's
7
+ * child-process spawn can find it.
8
+ *
9
+ * On normal Deno (not `deno compile`) or when ESBUILD_BINARY_PATH is already
10
+ * set, `ensureEsbuildBinary()` is a no-op.
11
+ *
12
+ * @module extensions/ext-bundler-esbuild/binary
13
+ */
14
+ import * as dntShim from "../../../_dnt.shims.js";
15
+ import { isDenoCompiled } from "./runtime.js";
16
+ const ESBUILD_VERSION = "0.28.1";
17
+ function getTempDir() {
18
+ try {
19
+ return (dntShim.Deno.env.get("TMPDIR") ?? dntShim.Deno.env.get("TEMP") ?? dntShim.Deno.env.get("TMP") ?? "/tmp");
20
+ }
21
+ catch {
22
+ return "/tmp";
23
+ }
24
+ }
25
+ function getEsbuildBinaryName() {
26
+ const archMap = { x86_64: "x64", aarch64: "arm64" };
27
+ const arch = archMap[dntShim.Deno.build.arch] ?? dntShim.Deno.build.arch;
28
+ return `@esbuild/${dntShim.Deno.build.os}-${arch}`;
29
+ }
30
+ function getVFSBasePath(filePath, tempDir) {
31
+ const denoCompileMatch = filePath.match(/^(.*\/deno-compile-[^/]+)\//);
32
+ if (denoCompileMatch?.[1])
33
+ return denoCompileMatch[1];
34
+ const parts = filePath.split("/");
35
+ const srcIndex = parts.lastIndexOf("src");
36
+ if (srcIndex > 0)
37
+ return parts.slice(0, srcIndex).join("/");
38
+ return `${tempDir}/deno-compile-veryfront`;
39
+ }
40
+ async function isFile(path) {
41
+ try {
42
+ const stat = await dntShim.Deno.stat(path);
43
+ return stat.isFile;
44
+ }
45
+ catch {
46
+ return false;
47
+ }
48
+ }
49
+ async function findEsbuildInVFS() {
50
+ const binaryName = getEsbuildBinaryName();
51
+ const vfsBase = getVFSBasePath(new URL(globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url).pathname, getTempDir());
52
+ const possiblePaths = [
53
+ `${vfsBase}/node_modules/${binaryName}/bin/esbuild`,
54
+ `${vfsBase}/node_modules/.deno/${binaryName}@${ESBUILD_VERSION}/node_modules/${binaryName}/bin/esbuild`,
55
+ `${vfsBase}/node_modules/.deno/esbuild@${ESBUILD_VERSION}/node_modules/${binaryName}/bin/esbuild`,
56
+ `${vfsBase}/node_modules/esbuild/bin/esbuild`,
57
+ `${vfsBase}/node_modules/.package/esbuild@${ESBUILD_VERSION}/bin/esbuild`,
58
+ `${vfsBase}/node_modules/.package/${binaryName}@${ESBUILD_VERSION}/bin/esbuild`,
59
+ ];
60
+ for (const p of possiblePaths) {
61
+ if (await isFile(p))
62
+ return p;
63
+ }
64
+ try {
65
+ const nodeModulesPath = `${vfsBase}/node_modules`;
66
+ for await (const entry of dntShim.Deno.readDir(nodeModulesPath)) {
67
+ if (entry.name !== binaryName && !entry.name.startsWith("@esbuild"))
68
+ continue;
69
+ const binPath = `${nodeModulesPath}/${entry.name}/bin/esbuild`;
70
+ if (await isFile(binPath))
71
+ return binPath;
72
+ }
73
+ }
74
+ catch {
75
+ /* node_modules not readable in VFS */
76
+ }
77
+ return null;
78
+ }
79
+ async function extractEsbuildBinary() {
80
+ const cacheDir = `${getTempDir()}/veryfront-esbuild`;
81
+ const targetPath = `${cacheDir}/esbuild-${ESBUILD_VERSION}`;
82
+ try {
83
+ const stat = await dntShim.Deno.stat(targetPath);
84
+ if (stat.isFile && stat.mode && (stat.mode & 0o111))
85
+ return targetPath;
86
+ }
87
+ catch {
88
+ /* cache miss */
89
+ }
90
+ const vfsPath = await findEsbuildInVFS();
91
+ if (!vfsPath) {
92
+ throw new Error(`[ext-bundler-esbuild] Could not find esbuild binary in deno compile VFS. ` +
93
+ `Platform: ${getEsbuildBinaryName()}. ` +
94
+ `Ensure esbuild is in dependencies and deno compile includes node_modules.`);
95
+ }
96
+ await dntShim.Deno.mkdir(cacheDir, { recursive: true });
97
+ const binary = await dntShim.Deno.readFile(vfsPath);
98
+ await dntShim.Deno.writeFile(targetPath, binary, { mode: 0o755 });
99
+ return targetPath;
100
+ }
101
+ let setupComplete = false;
102
+ let setupPromise = null;
103
+ /**
104
+ * Idempotent one-shot setup — copies the esbuild binary out of the VFS (if
105
+ * running in `deno compile`) and sets ESBUILD_BINARY_PATH. No-op on normal
106
+ * Deno or when the env var is already set.
107
+ */
108
+ export async function ensureEsbuildBinary() {
109
+ if (setupComplete)
110
+ return;
111
+ if (setupPromise) {
112
+ await setupPromise;
113
+ return;
114
+ }
115
+ setupPromise = (async () => {
116
+ try {
117
+ if (dntShim.Deno.env.get("ESBUILD_BINARY_PATH") || !isDenoCompiled) {
118
+ setupComplete = true;
119
+ return;
120
+ }
121
+ try {
122
+ const binaryPath = await extractEsbuildBinary();
123
+ dntShim.Deno.env.set("ESBUILD_BINARY_PATH", binaryPath);
124
+ // esbuild reads process.env (not Deno.env) on some code paths.
125
+ const proc = dntShim.dntGlobalThis.process;
126
+ if (proc?.env)
127
+ proc.env.ESBUILD_BINARY_PATH = binaryPath;
128
+ }
129
+ catch (err) {
130
+ console.error("[ext-bundler-esbuild] Binary extraction failed:", err);
131
+ }
132
+ }
133
+ finally {
134
+ setupComplete = true;
135
+ }
136
+ })();
137
+ try {
138
+ await setupPromise;
139
+ }
140
+ finally {
141
+ setupPromise = null;
142
+ }
143
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * es-module-lexer-backed implementation of the {@link ModuleLexer} contract.
3
+ *
4
+ * es-module-lexer@2 exports `init` as a Promise in its ESM build but older
5
+ * typings expect a function. We tolerate both shapes (as the in-tree
6
+ * src/transforms/esm/lexer.ts did).
7
+ *
8
+ * @module extensions/ext-bundler-esbuild/es-module-lexer
9
+ */
10
+ import type { ImportSpecifier, ModuleLexer } from "../../../src/extensions/bundler/index.js";
11
+ /** es-module-lexer-backed {@link ModuleLexer} implementation. */
12
+ export declare class EsModuleLexer implements ModuleLexer {
13
+ private initPromise;
14
+ init(): Promise<void>;
15
+ parse(code: string): readonly ImportSpecifier[];
16
+ }
17
+ //# sourceMappingURL=es-module-lexer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-module-lexer.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-bundler-esbuild/src/es-module-lexer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAG7F,iEAAiE;AACjE,qBAAa,aAAc,YAAW,WAAW;IAC/C,OAAO,CAAC,WAAW,CAA8B;IAE3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,eAAe,EAAE;CAIhD"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * es-module-lexer-backed implementation of the {@link ModuleLexer} contract.
3
+ *
4
+ * es-module-lexer@2 exports `init` as a Promise in its ESM build but older
5
+ * typings expect a function. We tolerate both shapes (as the in-tree
6
+ * src/transforms/esm/lexer.ts did).
7
+ *
8
+ * @module extensions/ext-bundler-esbuild/es-module-lexer
9
+ */
10
+ import { init, parse } from "es-module-lexer";
11
+ /** es-module-lexer-backed {@link ModuleLexer} implementation. */
12
+ export class EsModuleLexer {
13
+ initPromise = null;
14
+ async init() {
15
+ if (this.initPromise) {
16
+ await this.initPromise;
17
+ return;
18
+ }
19
+ const anyInit = init;
20
+ this.initPromise = typeof anyInit === "function"
21
+ ? anyInit()
22
+ : anyInit;
23
+ await this.initPromise;
24
+ }
25
+ parse(code) {
26
+ const [imports] = parse(code);
27
+ return imports;
28
+ }
29
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * esbuild-backed implementation of the {@link Bundler} contract.
3
+ *
4
+ * Lazy-initializes the esbuild binary (including `deno compile` VFS
5
+ * extraction) on first use. All options pass through to esbuild unchanged
6
+ * because the {@link BundleOptions} shape was designed to be esbuild-compatible;
7
+ * the only translation is converting {@link BundlerPlugin}s into esbuild
8
+ * plugins via {@link toEsbuildPlugin}.
9
+ *
10
+ * @module extensions/ext-bundler-esbuild/esbuild-bundler
11
+ */
12
+ import type { BuildContext, BundleOptions, Bundler, BundleResult, TransformOptions, TransformResult } from "../../../src/extensions/bundler/index.js";
13
+ /**
14
+ * esbuild-backed {@link Bundler} implementation.
15
+ *
16
+ * Every instance coordinates through one module-wide service lifecycle. Raw
17
+ * asynchronous esbuild calls must not share the same module in this process.
18
+ */
19
+ export declare class EsbuildBundler implements Bundler {
20
+ bundle(options: BundleOptions): Promise<BundleResult>;
21
+ transform(options: TransformOptions): Promise<TransformResult>;
22
+ context(options: BundleOptions): Promise<BuildContext>;
23
+ stop(): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=esbuild-bundler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild-bundler.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-bundler-esbuild/src/esbuild-bundler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAEb,OAAO,EACP,YAAY,EAGZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,0CAA0C,CAAC;AAwTlD;;;;;GAKG;AACH,qBAAa,cAAe,YAAW,OAAO;IACtC,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAkBrD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAa9D,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAiCtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiF5B"}