@pulse-compute/provider-fastly 1.0.0-beta.2 → 1.0.0-beta.3

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/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  > **Supported entry points:** `@pulse-compute/provider-fastly`, `@pulse-compute/provider-fastly/contract`, `@pulse-compute/provider-fastly/toolchain`, `@pulse-compute/provider-fastly/config-schema`, `@pulse-compute/provider-fastly/runtime/canonical-api-runtime`, `@pulse-compute/provider-fastly/build/canonical-target`, `@pulse-compute/provider-fastly/testing/fastly-cli`<br>
8
8
  > **Stability:** The listed entry points are supported for the Beta; all other exported subpaths are implementation-only.<br>
9
9
  > **npm:** [`@pulse-compute/provider-fastly`](https://www.npmjs.com/package/@pulse-compute/provider-fastly)<br>
10
- > **Canonical documentation:** [Package guide](https://pulsecompute.io/v1.0.0-beta.2/packages/provider-fastly/)
10
+ > **Canonical documentation:** [Package guide](https://pulsecompute.io/v1.0.0-beta.3/packages/provider-fastly/)
11
11
  >
12
- > This release-status block is generated from the synchronized `Pulse 1.0.0-beta.2` package policy.
12
+ > This release-status block is generated from the synchronized `Pulse 1.0.0-beta.3` package policy.
13
13
  <!-- pulse-package-status:end -->
14
14
 
15
15
  Fastly provider configuration, canonical capability lowering, local conformance execution, Compute target generation, and explicit external-tool boundaries.
@@ -49,7 +49,7 @@ trusted wall-clock authority. It does not fall back to Node execution.
49
49
 
50
50
  ## Documentation
51
51
 
52
- - [Fastly package guide](https://pulsecompute.io/v1.0.0-beta.2/packages/provider-fastly/)
53
- - [Project configuration](https://pulsecompute.io/v1.0.0-beta.2/reference/project-config/#fastly-provider-options)
54
- - [Fastly capabilities guide](https://pulsecompute.io/v1.0.0-beta.2/guides/fastly-capabilities/)
55
- - [Environment variables](https://pulsecompute.io/v1.0.0-beta.2/reference/environment/#pulse-fastly-bin)
52
+ - [Fastly package guide](https://pulsecompute.io/v1.0.0-beta.3/packages/provider-fastly/)
53
+ - [Project configuration](https://pulsecompute.io/v1.0.0-beta.3/reference/project-config/#fastly-provider-options)
54
+ - [Fastly capabilities guide](https://pulsecompute.io/v1.0.0-beta.3/guides/fastly-capabilities/)
55
+ - [Environment variables](https://pulsecompute.io/v1.0.0-beta.3/reference/environment/#pulse-fastly-bin)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulse-compute/provider-fastly",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "license": "Apache-2.0",
5
5
  "engines": {
6
6
  "node": "^22.14.0 || ^24.0.0"
@@ -59,15 +59,15 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@pulse-compute/crypto": "1.0.0-beta.2",
63
- "@pulse-compute/jwt": "1.0.0-beta.2",
64
- "@pulse-compute/runtime": "1.0.0-beta.2",
65
- "@pulse-compute/s3": "1.0.0-beta.2",
66
- "@pulse-compute/wasm-build-support": "1.0.0-beta.2",
67
- "@pulse-compute/wasm-contracts": "1.0.0-beta.2",
68
- "@pulse-compute/wasm-guest-link": "1.0.0-beta.2",
69
- "@pulse-compute/wasm-host-runtime": "1.0.0-beta.2",
70
- "@pulse-compute/wasm-runtime-core-as": "1.0.0-beta.2",
62
+ "@pulse-compute/crypto": "1.0.0-beta.3",
63
+ "@pulse-compute/jwt": "1.0.0-beta.3",
64
+ "@pulse-compute/runtime": "1.0.0-beta.3",
65
+ "@pulse-compute/s3": "1.0.0-beta.3",
66
+ "@pulse-compute/wasm-build-support": "1.0.0-beta.3",
67
+ "@pulse-compute/wasm-contracts": "1.0.0-beta.3",
68
+ "@pulse-compute/wasm-guest-link": "1.0.0-beta.3",
69
+ "@pulse-compute/wasm-host-runtime": "1.0.0-beta.3",
70
+ "@pulse-compute/wasm-runtime-core-as": "1.0.0-beta.3",
71
71
  "esbuild": "0.28.1"
72
72
  },
73
73
  "types": "./dist/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  "url": "git+https://github.com/pulse-compute/pulse.git",
88
88
  "directory": "packages/provider-fastly"
89
89
  },
90
- "homepage": "https://pulsecompute.io/v1.0.0-beta.2/packages/provider-fastly/",
90
+ "homepage": "https://pulsecompute.io/v1.0.0-beta.3/packages/provider-fastly/",
91
91
  "bugs": {
92
92
  "url": "https://github.com/pulse-compute/pulse/issues"
93
93
  },
@@ -242,6 +242,7 @@ function createDriver() {
242
242
  javascript: FASTLY_JAVASCRIPT_TARGET_DESCRIPTOR
243
243
  }),
244
244
  execute: fastlyRuntime.executeCanonicalProgram,
245
+ prepareNativeExecution: require('./native-execution.js').prepareFastlyNativeExecution,
245
246
  createLoweringPlan(metadata, providerConfig = {}) {
246
247
  return createFastlyLoweringPlan(metadata, providerConfig.bindings || {});
247
248
  },
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ const { inspectFastlyCanonicalTarget } = require('../build/canonical-target.js');
4
+ const { executeFastlyNativePlatformCapabilities } = require('../testing/native-platform-capabilities-host.js');
5
+ const { createConditionalKvAuthority } = require('../testing/conditional-kv-host.js');
6
+
7
+ // Execute the provider artifact against the existing fixture ABI. This is local
8
+ // conformance evidence, never Viceroy or deployed Fastly acceptance.
9
+ function prepareFastlyNativeExecution(invocation) {
10
+ const bindings = invocation.providerConfig.bindings;
11
+ const { native } = inspectFastlyCanonicalTarget({
12
+ plan: invocation.applicationPlan,
13
+ providerConfig: invocation.providerConfig,
14
+ projectRoot: invocation.project.root,
15
+ profile: invocation.project.profile,
16
+ targetDescriptor: invocation.selectedTarget,
17
+ synchronizedPackages: invocation.synchronizedPackages,
18
+ realizationArtifacts: invocation.nativeArtifact.realizationArtifacts,
19
+ guestUnits: invocation.nativeArtifact.guestUnits,
20
+ nativeOptimization: invocation.optimization,
21
+ compileTimeoutMs: invocation.timeoutMs || undefined
22
+ });
23
+ const evidence = Object.freeze({
24
+ kind: 'fastly-native-fixture-abi',
25
+ provider: 'fastly',
26
+ target: 'fastly-compute-native',
27
+ wasmSha256: native.manifest.wasm.sha256,
28
+ providerRealityValidated: false,
29
+ effectObservations: 'unavailable'
30
+ });
31
+ return (options = {}) => {
32
+ if (options.liveFetch === true) throw new TypeError('Fastly Native fixture execution cannot perform live fetches.');
33
+ const kvStores = {};
34
+ for (const [logical, physical] of Object.entries(bindings.kv || {})) {
35
+ kvStores[physical] = { ...kvStores[physical], ...(options.kv && options.kv[logical] || {}) };
36
+ }
37
+ const authority = createConditionalKvAuthority();
38
+ for (const [store, values] of Object.entries(kvStores)) {
39
+ authority.stores.set(store, new Map());
40
+ for (const [key, value] of Object.entries(values)) {
41
+ authority.seed(store, key, Buffer.from(JSON.stringify({ __pulseKv: 1, value })));
42
+ }
43
+ }
44
+ const execution = executeFastlyNativePlatformCapabilities(native, {
45
+ request: options.request,
46
+ fixtures: options.fetches,
47
+ configStore: bindings.configStore,
48
+ config: options.config,
49
+ secretStore: bindings.secretStore,
50
+ secrets: options.secrets,
51
+ kvStores,
52
+ conditionalKv: { authority }
53
+ });
54
+ const contentType = execution.response.headers.find(([name]) => name.toLowerCase() === 'content-type');
55
+ const type = String(contentType && contentType[1] || '').toLowerCase();
56
+ return Object.freeze({
57
+ response: Object.freeze({
58
+ ...execution.response,
59
+ kind: type.includes('application/json') || type.includes('+json') ? 'json' : type.startsWith('text/') ? 'text' : 'response',
60
+ bodyClass: execution.response.origin === true ? 'opaque' : 'structured'
61
+ }),
62
+ // The fixture ABI has hostcall traces, not canonical continuation telemetry.
63
+ effectCount: null,
64
+ continuations: Object.freeze([]),
65
+ resolutionOrder: Object.freeze([]),
66
+ evidence
67
+ });
68
+ };
69
+ }
70
+
71
+ module.exports = { prepareFastlyNativeExecution };