@pulse-compute/cli 0.0.0 → 1.0.0-beta.1
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/API.md +539 -0
- package/CHANGELOG.md +47 -0
- package/README.md +70 -1
- package/bin/pulse.js +15 -0
- package/bin/pulsewasm-extract.js +22 -0
- package/cli-spec.json +575 -0
- package/completions/_pulse +106 -0
- package/completions/pulse.bash +31 -0
- package/completions/pulse.fish +76 -0
- package/docs/README.md +77 -0
- package/docs/architecture/current-contracts.md +381 -0
- package/docs/architecture/overview.md +93 -0
- package/docs/architecture/vision.md +515 -0
- package/docs/concepts/bodies.md +186 -0
- package/docs/concepts/compilation-and-lowering.md +496 -0
- package/docs/concepts/contracts-and-providers.md +158 -0
- package/docs/concepts/effects-and-continuations.md +243 -0
- package/docs/concepts/entities-and-adapters.md +71 -0
- package/docs/concepts/package-owned-lowering.md +175 -0
- package/docs/concepts/targets-and-hosts.md +62 -0
- package/docs/contributing/README.md +38 -0
- package/docs/contributing/adding-core-provider.md +315 -0
- package/docs/contributing/adding-first-party-lowerer.md +327 -0
- package/docs/contributing/entities-lowering.md +91 -0
- package/docs/contributing/package-lowerer-contract.md +383 -0
- package/docs/contributing/pulse-aware-packages.md +149 -0
- package/docs/examples.md +112 -0
- package/docs/fixtures/inspect-fetch-composition.selected.json +181 -0
- package/docs/getting-started.md +128 -0
- package/docs/guides/compatibility-imports.md +60 -0
- package/docs/guides/deploying-fastly.md +188 -0
- package/docs/guides/deploying-node.md +143 -0
- package/docs/guides/events.md +233 -0
- package/docs/guides/fastly-capabilities.md +153 -0
- package/docs/guides/fetching-and-composition.md +101 -0
- package/docs/guides/grip.md +94 -0
- package/docs/guides/json-schemas.md +233 -0
- package/docs/guides/migrating-from-express.md +192 -0
- package/docs/guides/project-lifecycle.md +143 -0
- package/docs/guides/routing.md +184 -0
- package/docs/guides/troubleshooting.md +47 -0
- package/docs/maintainers/README.md +60 -0
- package/docs/maintainers/codex-maintainer.md +71 -0
- package/docs/maintainers/documentation-deployment.md +147 -0
- package/docs/maintainers/documentation-system.md +58 -0
- package/docs/maintainers/documentation-versioning.md +65 -0
- package/docs/maintainers/maintainer-charter.md +84 -0
- package/docs/maintainers/maintenance-policy.json +778 -0
- package/docs/maintainers/maintenance-policy.md +124 -0
- package/docs/maintainers/npm-publishing.md +154 -0
- package/docs/maintainers/plugin-readiness.json +19 -0
- package/docs/maintainers/plugin-readiness.md +31 -0
- package/docs/maintainers/public-site.md +158 -0
- package/docs/maintainers/release-acceptance.md +250 -0
- package/docs/maintainers/release-manifest.md +88 -0
- package/docs/maintainers/repository-setup.md +145 -0
- package/docs/maintainers/scope-policy.md +93 -0
- package/docs/maintainers/support-and-triage.md +74 -0
- package/docs/maintainers/testing.md +288 -0
- package/docs/packages/README.md +59 -0
- package/docs/packages/assets.md +85 -0
- package/docs/packages/cli.md +190 -0
- package/docs/packages/crypto.md +71 -0
- package/docs/packages/entities.md +129 -0
- package/docs/packages/grip.md +82 -0
- package/docs/packages/implementation-packages.md +113 -0
- package/docs/packages/jwt.md +55 -0
- package/docs/packages/provider-fastly.md +217 -0
- package/docs/packages/pulse.md +159 -0
- package/docs/packages/runtime.md +256 -0
- package/docs/preview-scope.md +142 -0
- package/docs/reference/README.md +33 -0
- package/docs/reference/cli-spec.json +575 -0
- package/docs/reference/cli.md +457 -0
- package/docs/reference/compatibility-matrix.md +169 -0
- package/docs/reference/diagnostics.md +1872 -0
- package/docs/reference/documentation-versions.json +14 -0
- package/docs/reference/environment.md +347 -0
- package/docs/reference/handler-authoring.md +264 -0
- package/docs/reference/project-config.md +554 -0
- package/docs/reference/project-config.schema.json +918 -0
- package/docs/reference/release-manifest.json +427 -0
- package/docs/reference/shell-completion.md +23 -0
- package/documentation-site.json +661 -0
- package/documentation-versions.json +14 -0
- package/examples/01-hello-json/.pulse/.gitignore +3 -0
- package/examples/01-hello-json/.pulse/config.ts +16 -0
- package/examples/01-hello-json/README.md +119 -0
- package/examples/01-hello-json/package.json +20 -0
- package/examples/01-hello-json/src/index.ts +9 -0
- package/examples/01-hello-json/tests/pulse.harness.ts +22 -0
- package/examples/01-hello-json/tsconfig.json +14 -0
- package/examples/02-request-schema/.pulse/.gitignore +3 -0
- package/examples/02-request-schema/.pulse/config.ts +17 -0
- package/examples/02-request-schema/README.md +145 -0
- package/examples/02-request-schema/package.json +20 -0
- package/examples/02-request-schema/src/index.ts +18 -0
- package/examples/02-request-schema/src/schemas.ts +20 -0
- package/examples/02-request-schema/tests/pulse.harness.ts +37 -0
- package/examples/02-request-schema/tsconfig.json +14 -0
- package/examples/03-fetch-composition/.pulse/.gitignore +3 -0
- package/examples/03-fetch-composition/.pulse/config.ts +31 -0
- package/examples/03-fetch-composition/README.md +210 -0
- package/examples/03-fetch-composition/package.json +20 -0
- package/examples/03-fetch-composition/src/index.ts +60 -0
- package/examples/03-fetch-composition/tests/pulse.harness.ts +47 -0
- package/examples/03-fetch-composition/tsconfig.json +14 -0
- package/examples/05-fastly-capabilities/.pulse/.gitignore +3 -0
- package/examples/05-fastly-capabilities/.pulse/config.ts +57 -0
- package/examples/05-fastly-capabilities/README.md +257 -0
- package/examples/05-fastly-capabilities/package.json +22 -0
- package/examples/05-fastly-capabilities/src/index.ts +55 -0
- package/examples/05-fastly-capabilities/tests/pulse.harness.ts +66 -0
- package/examples/05-fastly-capabilities/tsconfig.json +14 -0
- package/examples/07-opaque-proxy/.pulse/.gitignore +3 -0
- package/examples/07-opaque-proxy/.pulse/config.ts +38 -0
- package/examples/07-opaque-proxy/README.md +150 -0
- package/examples/07-opaque-proxy/package.json +21 -0
- package/examples/07-opaque-proxy/src/index.ts +9 -0
- package/examples/07-opaque-proxy/tests/pulse.harness.ts +25 -0
- package/examples/07-opaque-proxy/tsconfig.json +14 -0
- package/examples/09-router-lowering/.pulse/.gitignore +3 -0
- package/examples/09-router-lowering/.pulse/config.ts +22 -0
- package/examples/09-router-lowering/README.md +287 -0
- package/examples/09-router-lowering/package.json +22 -0
- package/examples/09-router-lowering/src/index.ts +65 -0
- package/examples/09-router-lowering/tests/pulse.harness.ts +91 -0
- package/examples/09-router-lowering/tsconfig.json +14 -0
- package/examples/10-entities-tools/.pulse/.gitignore +4 -0
- package/examples/10-entities-tools/.pulse/config.ts +23 -0
- package/examples/10-entities-tools/README.md +165 -0
- package/examples/10-entities-tools/package.json +21 -0
- package/examples/10-entities-tools/src/handlers.ts +15 -0
- package/examples/10-entities-tools/src/index.ts +31 -0
- package/examples/10-entities-tools/src/schemas.ts +18 -0
- package/examples/10-entities-tools/tests/pulse.harness.ts +40 -0
- package/examples/10-entities-tools/tools-facade.cjs +158 -0
- package/examples/10-entities-tools/tsconfig.json +14 -0
- package/examples/11-events/.pulse/.gitignore +4 -0
- package/examples/11-events/.pulse/config.ts +24 -0
- package/examples/11-events/README.md +194 -0
- package/examples/11-events/package.json +20 -0
- package/examples/11-events/src/index.ts +27 -0
- package/examples/11-events/src/schemas.ts +19 -0
- package/examples/11-events/tests/pulse.harness.ts +34 -0
- package/examples/11-events/tsconfig.json +15 -0
- package/examples/12-mcp-proxy/.pulse/.gitignore +3 -0
- package/examples/12-mcp-proxy/.pulse/config.ts +25 -0
- package/examples/12-mcp-proxy/README.md +149 -0
- package/examples/12-mcp-proxy/package.json +20 -0
- package/examples/12-mcp-proxy/src/index.ts +17 -0
- package/examples/12-mcp-proxy/tests/pulse.harness.ts +29 -0
- package/examples/12-mcp-proxy/tsconfig.json +14 -0
- package/examples/13-jwt-es256/.pulse/config.ts +19 -0
- package/examples/13-jwt-es256/README.md +195 -0
- package/examples/13-jwt-es256/package.json +21 -0
- package/examples/13-jwt-es256/src/index.ts +21 -0
- package/examples/13-jwt-es256/tests/pulse.harness.ts +54 -0
- package/examples/13-jwt-es256/tsconfig.json +14 -0
- package/examples/README.md +36 -0
- package/package.json +66 -6
- package/project-config.schema.json +918 -0
- package/release-manifest.json +427 -0
- package/src/command-spec.js +279 -0
- package/src/completion.js +113 -0
- package/src/diagnostics.js +350 -0
- package/src/documentation.js +45 -0
- package/src/index.d.ts +133 -0
- package/src/index.js +15 -0
- package/src/internal/command-executor.d.ts +29 -0
- package/src/internal/command-executor.js +143 -0
- package/src/internal/command-plan.d.ts +9 -0
- package/src/internal/command-plan.js +73 -0
- package/src/internal/command-reporter.d.ts +15 -0
- package/src/internal/command-reporter.js +133 -0
- package/src/internal/command-request.d.ts +35 -0
- package/src/internal/command-request.js +154 -0
- package/src/internal/node-http.js +54 -0
- package/src/internal/project-context.d.ts +66 -0
- package/src/internal/project-context.js +175 -0
- package/src/project-config-reference.js +4 -0
- package/src/project-config-schema.d.ts +23 -0
- package/src/project-config-schema.js +271 -0
- package/src/project-config.js +724 -0
- package/src/project-execution.js +2930 -0
- package/src/provider-drivers.js +3 -0
- package/src/target-support.js +3 -0
- package/src/typescript-module-loader.js +269 -0
- package/src/workflow.js +78 -0
- package/src/workspace.js +82 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# Project configuration reference
|
|
2
|
+
|
|
3
|
+
<!-- Generated by wasm/scripts/sync-reference-docs.cjs. Edit the source catalog, not this file. -->
|
|
4
|
+
|
|
5
|
+
## Conventional `.pulse/config.ts`
|
|
6
|
+
|
|
7
|
+
Conventional projects use one deferred, synchronous `defineConfig` factory from `@pulse-compute/pulse`. Every top-level key except `pulse` is a flat profile. The scope exposes symbolic `config` and `secret` references; it never resolves ambient values while the project plan is built.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineConfig } from '@pulse-compute/pulse'
|
|
11
|
+
|
|
12
|
+
export default defineConfig((scope) => ({
|
|
13
|
+
pulse: {
|
|
14
|
+
entry: 'src/index.ts',
|
|
15
|
+
tests: 'tests/pulse.harness.ts',
|
|
16
|
+
defaultProfile: 'local',
|
|
17
|
+
strict: true,
|
|
18
|
+
},
|
|
19
|
+
local: {
|
|
20
|
+
host: 'node',
|
|
21
|
+
target: 'native',
|
|
22
|
+
apiBase: scope.config('API_BASE'),
|
|
23
|
+
apiToken: scope.secret('API_TOKEN'),
|
|
24
|
+
},
|
|
25
|
+
}))
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Project pointers are workspace-relative. Profile selection is explicit and deterministic:
|
|
29
|
+
|
|
30
|
+
1. `--profile`
|
|
31
|
+
2. `PULSE_PROFILE`
|
|
32
|
+
3. `pulse.defaultProfile`
|
|
33
|
+
|
|
34
|
+
Project commands accept one optional positional directory and otherwise start from the current directory. Discovery searches upward only for `.pulse/config.ts`. Public entry, config-file, workspace, provider, and target overrides are not supported.
|
|
35
|
+
|
|
36
|
+
1. Discovery starts at the positional directory or the current working directory and searches upward for .pulse/config.ts.
|
|
37
|
+
2. Profile precedence is --profile, PULSE_PROFILE, then pulse.defaultProfile.
|
|
38
|
+
3. A selected-profile crypto declaration replaces pulse.crypto completely; array and object forms never merge.
|
|
39
|
+
4. Command-line output, host, port, and watch values override the corresponding active-profile field for that command. Entry, provider, and target remain project-configured.
|
|
40
|
+
5. Dedicated harness case inputs replace development inputs for that case; they do not configure deployment resources.
|
|
41
|
+
6. Provider deployment bindings come from the configured provider object; handler source never receives provider SDK objects.
|
|
42
|
+
|
|
43
|
+
## Project and provider selection
|
|
44
|
+
|
|
45
|
+
Select the canonical entry, provider, and build output.
|
|
46
|
+
|
|
47
|
+
### `entry`
|
|
48
|
+
|
|
49
|
+
Project-relative TypeScript handler entry.
|
|
50
|
+
|
|
51
|
+
- **Type:** string
|
|
52
|
+
- **Required/default:** Optional; default `./src/index.ts`.
|
|
53
|
+
- **Allowed values or constraints:** —
|
|
54
|
+
- **Scope:** all project commands
|
|
55
|
+
- **Precedence:** `pulse.entry` in `.pulse/config.ts`.
|
|
56
|
+
- **Security and safety:** Must resolve to an existing file.
|
|
57
|
+
- **Related diagnostics:** [`PULSE_ENTRY_NOT_FOUND`](diagnostics.md#pulse-entry-not-found)
|
|
58
|
+
|
|
59
|
+
### `provider`
|
|
60
|
+
|
|
61
|
+
Selects provider validation, local conformance, and build realization through the provider package toolchain contract.
|
|
62
|
+
|
|
63
|
+
- **Type:** 'node' | 'fastly' | 'none' | scoped package name | provider configuration
|
|
64
|
+
- **Required/default:** Optional; default `node`.
|
|
65
|
+
- **Allowed values or constraints:** `node`, `fastly`, `none`, another bare host id, or an exact scoped package name
|
|
66
|
+
- **Scope:** compile/build/dev/test
|
|
67
|
+
- **Precedence:** Bare host ids resolve to `@pulse-compute/provider-<id>`; scoped package names are loaded exactly from the project.
|
|
68
|
+
- **Security and safety:** Package loading is explicit and limited to the selected package `./toolchain` export; there is no scanning or fallback discovery.
|
|
69
|
+
- **Related diagnostics:** [`PULSE_PROVIDER_PACKAGE_NOT_FOUND`](diagnostics.md#pulse-provider-package-not-found), [`PULSE_PROVIDER_TOOLCHAIN_LOAD_FAILED`](diagnostics.md#pulse-provider-toolchain-load-failed), [`PULSE_PROVIDER_TOOLCHAIN_INVALID`](diagnostics.md#pulse-provider-toolchain-invalid), [`PULSE_PROVIDER_UNSUPPORTED`](diagnostics.md#pulse-provider-unsupported), [`PULSE_PROVIDER_COMPILE_ONLY`](diagnostics.md#pulse-provider-compile-only), [`PULSE_TEST_PROVIDER_REQUIRED`](diagnostics.md#pulse-test-provider-required), [`PULSE_DEV_PROVIDER_UNSUPPORTED`](diagnostics.md#pulse-dev-provider-unsupported)
|
|
70
|
+
|
|
71
|
+
### `outDir`
|
|
72
|
+
|
|
73
|
+
Project-relative artifact output directory.
|
|
74
|
+
|
|
75
|
+
- **Type:** string
|
|
76
|
+
- **Required/default:** Optional; default `./dist`.
|
|
77
|
+
- **Allowed values or constraints:** —
|
|
78
|
+
- **Scope:** compile/build
|
|
79
|
+
- **Precedence:** `--out` overrides this field for the current command.
|
|
80
|
+
- **Security and safety:** Must remain a real child of the project root; absolute, parent-traversal, and symbolic-link traversal outside the project root is rejected.
|
|
81
|
+
- **Related diagnostics:** [`PULSE_BUILD_OUT_UNSAFE`](diagnostics.md#pulse-build-out-unsafe)
|
|
82
|
+
|
|
83
|
+
### `reporting`
|
|
84
|
+
|
|
85
|
+
Resolved synchronous logging threshold after the flat profile override is applied.
|
|
86
|
+
|
|
87
|
+
- **Type:** 'off' | 'error' | 'warn' | 'info' | 'debug'
|
|
88
|
+
- **Required/default:** Optional; default `info`.
|
|
89
|
+
- **Allowed values or constraints:** `off`, `error`, `warn`, `info`, `debug`
|
|
90
|
+
- **Scope:** compile/build/dev/test
|
|
91
|
+
- **Precedence:** Selected-profile `reporting`, then `pulse.reporting`, then `info`.
|
|
92
|
+
- **Security and safety:** Known request-owned secret values are redacted before provider emission.
|
|
93
|
+
- **Related diagnostics:** `PULSE_REPORTING_LEVEL_UNSUPPORTED` (family fallback; reference root)
|
|
94
|
+
|
|
95
|
+
## Cryptographic requirements
|
|
96
|
+
|
|
97
|
+
Declare exact algorithms for the global or selected profile and resolve one target realization without fallback. This surface is part of the synchronized 1.0.0-beta.1 package set.
|
|
98
|
+
|
|
99
|
+
### `pulse.crypto`
|
|
100
|
+
|
|
101
|
+
Declares the complete global algorithm set. Array entries are canonical algorithm names; object entries may pin one exact known realization.
|
|
102
|
+
|
|
103
|
+
- **Type:** readonly ('HS256' | 'ES256')[] | { readonly HS256?: { readonly realization?: PulseCryptoRealization }; readonly ES256?: { readonly realization?: PulseCryptoRealization } }
|
|
104
|
+
- **Required/default:** Optional; default implicit no-crypto declaration.
|
|
105
|
+
- **Allowed values or constraints:** `HS256`, `ES256`; exact pins `runtime-builtin`, `guest-source:pulse-hmac-as`, and `guest-linked:pulse-es256-rustcrypto-p256`
|
|
106
|
+
- **Scope:** global crypto requirement default
|
|
107
|
+
- **Precedence:** Used only when the selected profile omits `crypto`.
|
|
108
|
+
- **Security and safety:** Keys and verification bytes are not configuration values. Target selection is deterministic and never probes or falls back.
|
|
109
|
+
- **Related diagnostics:** `PULSE_CRYPTO_CONFIG_SHAPE_INVALID` (family fallback; reference root), `PULSE_CRYPTO_ALGORITHM_DUPLICATE` (family fallback; reference root), `PULSE_CRYPTO_ALGORITHM_UNKNOWN` (family fallback; reference root), `PULSE_CRYPTO_REALIZATION_UNKNOWN` (family fallback; reference root)
|
|
110
|
+
|
|
111
|
+
### `<profile>.crypto`
|
|
112
|
+
|
|
113
|
+
Replaces the complete global crypto declaration for the selected profile. Arrays and objects never merge with `pulse.crypto`.
|
|
114
|
+
|
|
115
|
+
- **Type:** readonly ('HS256' | 'ES256')[] | { readonly HS256?: { readonly realization?: PulseCryptoRealization }; readonly ES256?: { readonly realization?: PulseCryptoRealization } }
|
|
116
|
+
- **Required/default:** Optional; default inherit `pulse.crypto` when absent.
|
|
117
|
+
- **Allowed values or constraints:** `[]` and `{}` explicitly select no crypto; otherwise `HS256` and/or `ES256`
|
|
118
|
+
- **Scope:** selected profile
|
|
119
|
+
- **Precedence:** Selected-profile declaration replaces `pulse.crypto`; absence inherits it.
|
|
120
|
+
- **Security and safety:** Every declared algorithm must resolve for the selected target before lowering. A failed exact realization cannot select another backend.
|
|
121
|
+
- **Related diagnostics:** `PULSE_CRYPTO_CONFIG_REQUIRED` (family fallback; reference root), `PULSE_CRYPTO_REALIZATION_PIN_INVALID` (family fallback; reference root), `PULSE_CRYPTO_REALIZATION_UNAVAILABLE` (family fallback; reference root)
|
|
122
|
+
|
|
123
|
+
## JSON schema policy
|
|
124
|
+
|
|
125
|
+
Configure bounded schema-body policy. Conventional projects declare registry identity only through pulse.schema.
|
|
126
|
+
|
|
127
|
+
### `schemas`
|
|
128
|
+
|
|
129
|
+
Sets schema body limits and content-type policy. Schema identities come from the module selected by pulse.schema.
|
|
130
|
+
|
|
131
|
+
- **Type:** PulseSchemaConfig
|
|
132
|
+
- **Required/default:** Optional; default `{}`.
|
|
133
|
+
- **Allowed values or constraints:** —
|
|
134
|
+
- **Scope:** compile/dev/test/build
|
|
135
|
+
- **Precedence:** Configuration value.
|
|
136
|
+
- **Security and safety:** Structured bodies are bounded before decoding.
|
|
137
|
+
- **Related diagnostics:** [`PULSE_SCHEMA_COMPILE_FAILED`](diagnostics.md#pulse-schema-compile-failed)
|
|
138
|
+
|
|
139
|
+
### `schemas.contentTypePolicy`
|
|
140
|
+
|
|
141
|
+
Controls whether a JSON content type is mandatory.
|
|
142
|
+
|
|
143
|
+
- **Type:** 'accept-json-or-missing' | 'require-json'
|
|
144
|
+
- **Required/default:** Optional; default `accept-json-or-missing`.
|
|
145
|
+
- **Allowed values or constraints:** `accept-json-or-missing`, `require-json`
|
|
146
|
+
- **Scope:** request and fetched-body schema decode
|
|
147
|
+
- **Precedence:** Configuration value.
|
|
148
|
+
- **Security and safety:** No special handling.
|
|
149
|
+
- **Related diagnostics:** `PULSE_SCHEMA_CONTENT_TYPE_POLICY_INVALID` (family fallback; reference root), [`PULSE_SCHEMA_DECODE`](diagnostics.md#pulse-schema-decode)
|
|
150
|
+
|
|
151
|
+
### `schemas.maxBytes`
|
|
152
|
+
|
|
153
|
+
Maximum buffered bytes accepted by schema decoding.
|
|
154
|
+
|
|
155
|
+
- **Type:** positive safe integer
|
|
156
|
+
- **Required/default:** Optional; default `65_536`.
|
|
157
|
+
- **Allowed values or constraints:** —
|
|
158
|
+
- **Scope:** structured schema decode
|
|
159
|
+
- **Precedence:** Configuration value.
|
|
160
|
+
- **Security and safety:** Raise deliberately; this is a memory and request-amplification boundary.
|
|
161
|
+
- **Related diagnostics:** `PULSE_SCHEMA_BODY_LIMIT_INVALID` (family fallback; reference root), [`PULSE_BODY_TOO_LARGE`](diagnostics.md#pulse-body-too-large)
|
|
162
|
+
|
|
163
|
+
## Local development
|
|
164
|
+
|
|
165
|
+
Configure the foreground local server and local-only provider inputs.
|
|
166
|
+
|
|
167
|
+
### `dev`
|
|
168
|
+
|
|
169
|
+
Development listener and local fixture inputs.
|
|
170
|
+
|
|
171
|
+
- **Type:** object
|
|
172
|
+
- **Required/default:** Optional; default `{}`.
|
|
173
|
+
- **Allowed values or constraints:** —
|
|
174
|
+
- **Scope:** pulse dev and local conformance
|
|
175
|
+
- **Precedence:** Configuration value.
|
|
176
|
+
- **Security and safety:** No special handling.
|
|
177
|
+
- **Related diagnostics:** None specific.
|
|
178
|
+
|
|
179
|
+
### `dev.host`
|
|
180
|
+
|
|
181
|
+
Listener host.
|
|
182
|
+
|
|
183
|
+
- **Type:** string
|
|
184
|
+
- **Required/default:** Optional; default `127.0.0.1`.
|
|
185
|
+
- **Allowed values or constraints:** —
|
|
186
|
+
- **Scope:** pulse dev
|
|
187
|
+
- **Precedence:** `--host` overrides this field.
|
|
188
|
+
- **Security and safety:** Binding a non-loopback address exposes the local development server.
|
|
189
|
+
- **Related diagnostics:** `PULSE_DEV_HOST_INVALID` (family fallback; reference root)
|
|
190
|
+
|
|
191
|
+
### `dev.port`
|
|
192
|
+
|
|
193
|
+
Listener port.
|
|
194
|
+
|
|
195
|
+
- **Type:** integer
|
|
196
|
+
- **Required/default:** Optional; default `8787`.
|
|
197
|
+
- **Allowed values or constraints:** `0`–`65535`; `0` requests an ephemeral port
|
|
198
|
+
- **Scope:** pulse dev
|
|
199
|
+
- **Precedence:** `--port` overrides this field.
|
|
200
|
+
- **Security and safety:** No special handling.
|
|
201
|
+
- **Related diagnostics:** `PULSE_DEV_PORT_INVALID` (family fallback; reference root)
|
|
202
|
+
|
|
203
|
+
### `dev.watch`
|
|
204
|
+
|
|
205
|
+
Watches the entry and schema dependency graph.
|
|
206
|
+
|
|
207
|
+
- **Type:** boolean
|
|
208
|
+
- **Required/default:** Optional; default `true`.
|
|
209
|
+
- **Allowed values or constraints:** —
|
|
210
|
+
- **Scope:** pulse dev
|
|
211
|
+
- **Precedence:** `--watch` or `--no-watch` overrides this field.
|
|
212
|
+
- **Security and safety:** Configuration-file changes still require a restart.
|
|
213
|
+
- **Related diagnostics:** None specific.
|
|
214
|
+
|
|
215
|
+
### `dev.maxBodyBytes`
|
|
216
|
+
|
|
217
|
+
Maximum request body accepted by the local development server.
|
|
218
|
+
|
|
219
|
+
- **Type:** positive safe integer
|
|
220
|
+
- **Required/default:** Optional; default `65_536`.
|
|
221
|
+
- **Allowed values or constraints:** —
|
|
222
|
+
- **Scope:** incoming local requests
|
|
223
|
+
- **Precedence:** Configuration value.
|
|
224
|
+
- **Security and safety:** Raise deliberately; this is a memory and request-amplification boundary.
|
|
225
|
+
- **Related diagnostics:** `PULSE_DEV_BODY_LIMIT_INVALID` (family fallback; reference root), [`PULSE_REQUEST_BODY_TOO_LARGE`](diagnostics.md#pulse-request-body-too-large)
|
|
226
|
+
|
|
227
|
+
### `dev.networkFetch`
|
|
228
|
+
|
|
229
|
+
Allows unmatched local fetches to use the network.
|
|
230
|
+
|
|
231
|
+
- **Type:** boolean
|
|
232
|
+
- **Required/default:** Optional; default selected provider default.
|
|
233
|
+
- **Allowed values or constraints:** —
|
|
234
|
+
- **Scope:** local fetch realization
|
|
235
|
+
- **Precedence:** This explicit field overrides the selected provider local default.
|
|
236
|
+
- **Security and safety:** Keep disabled for deterministic or untrusted test inputs.
|
|
237
|
+
- **Related diagnostics:** [`PULSE_FETCH_IMPLEMENTATION_UNAVAILABLE`](diagnostics.md#pulse-fetch-implementation-unavailable), [`PULSE_FETCH_NETWORK`](diagnostics.md#pulse-fetch-network)
|
|
238
|
+
|
|
239
|
+
### `dev.config`
|
|
240
|
+
|
|
241
|
+
Local configuration-store values.
|
|
242
|
+
|
|
243
|
+
- **Type:** Readonly<Record<string, string>>
|
|
244
|
+
- **Required/default:** Optional; default `{}`.
|
|
245
|
+
- **Allowed values or constraints:** —
|
|
246
|
+
- **Scope:** local config capability
|
|
247
|
+
- **Precedence:** Configuration value.
|
|
248
|
+
- **Security and safety:** Development input only; it does not configure deployed provider stores.
|
|
249
|
+
- **Related diagnostics:** None specific.
|
|
250
|
+
|
|
251
|
+
### `dev.secrets`
|
|
252
|
+
|
|
253
|
+
Local secret-store values.
|
|
254
|
+
|
|
255
|
+
- **Type:** Readonly<Record<string, string>>
|
|
256
|
+
- **Required/default:** Optional; default `{}`.
|
|
257
|
+
- **Allowed values or constraints:** —
|
|
258
|
+
- **Scope:** local secret capability
|
|
259
|
+
- **Precedence:** Configuration value.
|
|
260
|
+
- **Security and safety:** Raw values are omitted from project JSON, diagnostics, and runtime error details; do not commit real production secrets.
|
|
261
|
+
- **Related diagnostics:** None specific.
|
|
262
|
+
|
|
263
|
+
### `dev.kv`
|
|
264
|
+
|
|
265
|
+
Local KV stores keyed by configured logical store name.
|
|
266
|
+
|
|
267
|
+
- **Type:** Readonly<Record<string, Readonly<Record<string, unknown>>>>
|
|
268
|
+
- **Required/default:** Optional; default `{}`.
|
|
269
|
+
- **Allowed values or constraints:** —
|
|
270
|
+
- **Scope:** local KV capability
|
|
271
|
+
- **Precedence:** Configuration value.
|
|
272
|
+
- **Security and safety:** Development input only; it is not deployed.
|
|
273
|
+
- **Related diagnostics:** None specific.
|
|
274
|
+
|
|
275
|
+
### `dev.fetches`
|
|
276
|
+
|
|
277
|
+
Deterministic fetch fixtures resolved before optional live network fetch.
|
|
278
|
+
|
|
279
|
+
- **Type:** Readonly<Record<string, unknown>>
|
|
280
|
+
- **Required/default:** Optional; default `{}`.
|
|
281
|
+
- **Allowed values or constraints:** —
|
|
282
|
+
- **Scope:** local fetch capability
|
|
283
|
+
- **Precedence:** Configuration value.
|
|
284
|
+
- **Security and safety:** Prefer fixtures for deterministic tests and offline development.
|
|
285
|
+
- **Related diagnostics:** None specific.
|
|
286
|
+
|
|
287
|
+
## Fastly provider options
|
|
288
|
+
|
|
289
|
+
Options passed to fastly(...) from @pulse-compute/provider-fastly.
|
|
290
|
+
|
|
291
|
+
### `fastly.configStore`
|
|
292
|
+
|
|
293
|
+
Fastly Config Store resource name.
|
|
294
|
+
|
|
295
|
+
- **Type:** string
|
|
296
|
+
- **Required/default:** Optional; default `pulse_config`.
|
|
297
|
+
- **Allowed values or constraints:** —
|
|
298
|
+
- **Scope:** Fastly config capability
|
|
299
|
+
- **Precedence:** Configuration value.
|
|
300
|
+
- **Security and safety:** No special handling.
|
|
301
|
+
- **Related diagnostics:** None specific.
|
|
302
|
+
|
|
303
|
+
### `fastly.secretStore`
|
|
304
|
+
|
|
305
|
+
Fastly Secret Store resource name.
|
|
306
|
+
|
|
307
|
+
- **Type:** string
|
|
308
|
+
- **Required/default:** Optional; default `pulse_secrets`.
|
|
309
|
+
- **Allowed values or constraints:** —
|
|
310
|
+
- **Scope:** Fastly secret capability
|
|
311
|
+
- **Precedence:** Configuration value.
|
|
312
|
+
- **Security and safety:** The name is build metadata; secret values are never embedded by this option.
|
|
313
|
+
- **Related diagnostics:** None specific.
|
|
314
|
+
|
|
315
|
+
### `fastly.kv`
|
|
316
|
+
|
|
317
|
+
Maps logical ctx.kv names to Fastly KV Store resource names.
|
|
318
|
+
|
|
319
|
+
- **Type:** Readonly<Record<string, string>>
|
|
320
|
+
- **Required/default:** Optional; default `{}`.
|
|
321
|
+
- **Allowed values or constraints:** —
|
|
322
|
+
- **Scope:** Fastly KV capability
|
|
323
|
+
- **Precedence:** Configuration value.
|
|
324
|
+
- **Security and safety:** No special handling.
|
|
325
|
+
- **Related diagnostics:** [`PULSE_FASTLY_KV_BINDINGS_INVALID`](diagnostics.md#pulse-fastly-kv-bindings-invalid)
|
|
326
|
+
|
|
327
|
+
### `fastly.backends`
|
|
328
|
+
|
|
329
|
+
Maps static absolute origin URLs to named Fastly backends.
|
|
330
|
+
|
|
331
|
+
- **Type:** Readonly<Record<string, string>>
|
|
332
|
+
- **Required/default:** Optional; default `{}`.
|
|
333
|
+
- **Allowed values or constraints:** —
|
|
334
|
+
- **Scope:** Fastly fetch capability
|
|
335
|
+
- **Precedence:** Configuration value.
|
|
336
|
+
- **Security and safety:** Prefer explicit backends over dynamic origin authority.
|
|
337
|
+
- **Related diagnostics:** [`PULSE_FASTLY_BACKEND_BINDINGS_INVALID`](diagnostics.md#pulse-fastly-backend-bindings-invalid), [`PULSE_FASTLY_BACKEND_REQUIRED`](diagnostics.md#pulse-fastly-backend-required)
|
|
338
|
+
|
|
339
|
+
### `fastly.dynamicBackends`
|
|
340
|
+
|
|
341
|
+
Allows undeclared outbound origins to use dynamic backends.
|
|
342
|
+
|
|
343
|
+
- **Type:** boolean
|
|
344
|
+
- **Required/default:** Optional; default `false`.
|
|
345
|
+
- **Allowed values or constraints:** —
|
|
346
|
+
- **Scope:** Fastly fetch capability
|
|
347
|
+
- **Precedence:** Configuration value.
|
|
348
|
+
- **Security and safety:** Opt in deliberately because it broadens outbound authority.
|
|
349
|
+
- **Related diagnostics:** [`PULSE_FASTLY_BACKEND_REQUIRED`](diagnostics.md#pulse-fastly-backend-required)
|
|
350
|
+
|
|
351
|
+
### `fastly.grip`
|
|
352
|
+
|
|
353
|
+
Provider-owned bindings used by package-owned GRIP compatibility and canonical broadcast effects.
|
|
354
|
+
|
|
355
|
+
- **Type:** object
|
|
356
|
+
- **Required/default:** Optional; default omitted.
|
|
357
|
+
- **Allowed values or constraints:** —
|
|
358
|
+
- **Scope:** Fastly GRIP capability
|
|
359
|
+
- **Precedence:** Configuration value.
|
|
360
|
+
- **Security and safety:** No special handling.
|
|
361
|
+
- **Related diagnostics:** None specific.
|
|
362
|
+
|
|
363
|
+
### `fastly.grip.fanoutBackend`
|
|
364
|
+
|
|
365
|
+
Named Fastly Fanout backend.
|
|
366
|
+
|
|
367
|
+
- **Type:** string
|
|
368
|
+
- **Required/default:** Optional; default omitted.
|
|
369
|
+
- **Allowed values or constraints:** —
|
|
370
|
+
- **Scope:** GRIP hold
|
|
371
|
+
- **Precedence:** Configuration value.
|
|
372
|
+
- **Security and safety:** No special handling.
|
|
373
|
+
- **Related diagnostics:** [`PULSE_FASTLY_GRIP_FANOUT_BACKEND_REQUIRED`](diagnostics.md#pulse-fastly-grip-fanout-backend-required)
|
|
374
|
+
|
|
375
|
+
### `fastly.grip.publishEndpoint`
|
|
376
|
+
|
|
377
|
+
Provider-owned absolute publish/control endpoint; distinct from public gateway and ingress URLs.
|
|
378
|
+
|
|
379
|
+
- **Type:** string
|
|
380
|
+
- **Required/default:** Optional; default omitted.
|
|
381
|
+
- **Allowed values or constraints:** —
|
|
382
|
+
- **Scope:** GRIP broadcast
|
|
383
|
+
- **Precedence:** Configuration value.
|
|
384
|
+
- **Security and safety:** No special handling.
|
|
385
|
+
- **Related diagnostics:** [`PULSE_FASTLY_GRIP_PUBLISH_BINDING_REQUIRED`](diagnostics.md#pulse-fastly-grip-publish-binding-required)
|
|
386
|
+
|
|
387
|
+
### `fastly.grip.publishUrl`
|
|
388
|
+
|
|
389
|
+
Absolute publish endpoint URL.
|
|
390
|
+
|
|
391
|
+
- **Type:** string
|
|
392
|
+
- **Required/default:** Optional; default omitted.
|
|
393
|
+
- **Allowed values or constraints:** —
|
|
394
|
+
- **Scope:** GRIP publish
|
|
395
|
+
- **Precedence:** Configuration value.
|
|
396
|
+
- **Security and safety:** No special handling.
|
|
397
|
+
- **Related diagnostics:** [`PULSE_FASTLY_GRIP_PUBLISH_BINDING_REQUIRED`](diagnostics.md#pulse-fastly-grip-publish-binding-required)
|
|
398
|
+
|
|
399
|
+
### `fastly.grip.publishBackend`
|
|
400
|
+
|
|
401
|
+
Named backend for the provider publish endpoint.
|
|
402
|
+
|
|
403
|
+
- **Type:** string
|
|
404
|
+
- **Required/default:** Optional; default omitted.
|
|
405
|
+
- **Allowed values or constraints:** —
|
|
406
|
+
- **Scope:** GRIP broadcast/publish
|
|
407
|
+
- **Precedence:** Configuration value.
|
|
408
|
+
- **Security and safety:** No special handling.
|
|
409
|
+
- **Related diagnostics:** [`PULSE_FASTLY_GRIP_PUBLISH_BINDING_REQUIRED`](diagnostics.md#pulse-fastly-grip-publish-binding-required)
|
|
410
|
+
|
|
411
|
+
### `fastly.grip.authentication`
|
|
412
|
+
|
|
413
|
+
Authentication metadata containing references only; no credential value is accepted here.
|
|
414
|
+
|
|
415
|
+
- **Type:** object
|
|
416
|
+
- **Required/default:** Optional; default omitted.
|
|
417
|
+
- **Allowed values or constraints:** —
|
|
418
|
+
- **Scope:** GRIP broadcast authentication
|
|
419
|
+
- **Precedence:** Configuration value.
|
|
420
|
+
- **Security and safety:** Store the value in Fastly Secret Store and configure only secretRef.
|
|
421
|
+
- **Related diagnostics:** None specific.
|
|
422
|
+
|
|
423
|
+
### `fastly.grip.authentication.scheme`
|
|
424
|
+
|
|
425
|
+
Provider authentication scheme.
|
|
426
|
+
|
|
427
|
+
- **Type:** 'bearer'
|
|
428
|
+
- **Required/default:** Optional; default `bearer`.
|
|
429
|
+
- **Allowed values or constraints:** —
|
|
430
|
+
- **Scope:** GRIP broadcast authentication
|
|
431
|
+
- **Precedence:** Configuration value.
|
|
432
|
+
- **Security and safety:** No special handling.
|
|
433
|
+
- **Related diagnostics:** `PULSE_FASTLY_NATIVE_GRIP_AUTH_SCHEME_UNSUPPORTED` (family fallback; reference root)
|
|
434
|
+
|
|
435
|
+
### `fastly.grip.authentication.secretRef`
|
|
436
|
+
|
|
437
|
+
Named Fastly Secret Store key used for the bearer token.
|
|
438
|
+
|
|
439
|
+
- **Type:** string
|
|
440
|
+
- **Required/default:** Optional; default omitted.
|
|
441
|
+
- **Allowed values or constraints:** —
|
|
442
|
+
- **Scope:** GRIP broadcast authentication
|
|
443
|
+
- **Precedence:** Configuration value.
|
|
444
|
+
- **Security and safety:** The secret value is resolved only at request execution and is redacted from traces.
|
|
445
|
+
- **Related diagnostics:** `PULSE_FASTLY_NATIVE_GRIP_SECRET_REFERENCE_MISSING` (family fallback; reference root)
|
|
446
|
+
|
|
447
|
+
### `fastly.grip.directHold`
|
|
448
|
+
|
|
449
|
+
Enables the direct host-owned hold response realization.
|
|
450
|
+
|
|
451
|
+
- **Type:** boolean
|
|
452
|
+
- **Required/default:** Optional; default `true`.
|
|
453
|
+
- **Allowed values or constraints:** —
|
|
454
|
+
- **Scope:** GRIP hold
|
|
455
|
+
- **Precedence:** Configuration value.
|
|
456
|
+
- **Security and safety:** No special handling.
|
|
457
|
+
- **Related diagnostics:** None specific.
|
|
458
|
+
|
|
459
|
+
### `fastly.name`
|
|
460
|
+
|
|
461
|
+
Generated Fastly package name.
|
|
462
|
+
|
|
463
|
+
- **Type:** string
|
|
464
|
+
- **Required/default:** Optional; default `pulse-app`.
|
|
465
|
+
- **Allowed values or constraints:** —
|
|
466
|
+
- **Scope:** Fastly package metadata
|
|
467
|
+
- **Precedence:** Configuration value.
|
|
468
|
+
- **Security and safety:** No special handling.
|
|
469
|
+
- **Related diagnostics:** None specific.
|
|
470
|
+
|
|
471
|
+
### `fastly.description`
|
|
472
|
+
|
|
473
|
+
Generated Fastly package description.
|
|
474
|
+
|
|
475
|
+
- **Type:** string
|
|
476
|
+
- **Required/default:** Optional; default `Pulse application`.
|
|
477
|
+
- **Allowed values or constraints:** —
|
|
478
|
+
- **Scope:** Fastly package metadata
|
|
479
|
+
- **Precedence:** Configuration value.
|
|
480
|
+
- **Security and safety:** No special handling.
|
|
481
|
+
- **Related diagnostics:** None specific.
|
|
482
|
+
|
|
483
|
+
### `fastly.authors`
|
|
484
|
+
|
|
485
|
+
Generated Fastly package authors.
|
|
486
|
+
|
|
487
|
+
- **Type:** readonly string[]
|
|
488
|
+
- **Required/default:** Optional; default `[]`.
|
|
489
|
+
- **Allowed values or constraints:** —
|
|
490
|
+
- **Scope:** Fastly package metadata
|
|
491
|
+
- **Precedence:** Configuration value.
|
|
492
|
+
- **Security and safety:** No special handling.
|
|
493
|
+
- **Related diagnostics:** None specific.
|
|
494
|
+
|
|
495
|
+
### `fastly.local`
|
|
496
|
+
|
|
497
|
+
Local-only behavior; it does not alter the deployed target.
|
|
498
|
+
|
|
499
|
+
- **Type:** object
|
|
500
|
+
- **Required/default:** Optional; default `{}`.
|
|
501
|
+
- **Allowed values or constraints:** —
|
|
502
|
+
- **Scope:** local Fastly conformance
|
|
503
|
+
- **Precedence:** Configuration value.
|
|
504
|
+
- **Security and safety:** No special handling.
|
|
505
|
+
- **Related diagnostics:** None specific.
|
|
506
|
+
|
|
507
|
+
### `fastly.local.networkFetch`
|
|
508
|
+
|
|
509
|
+
Allows unmatched local Fastly fetches to use the network.
|
|
510
|
+
|
|
511
|
+
- **Type:** boolean
|
|
512
|
+
- **Required/default:** Optional; default `false`.
|
|
513
|
+
- **Allowed values or constraints:** —
|
|
514
|
+
- **Scope:** local Fastly fetch realization
|
|
515
|
+
- **Precedence:** `dev.networkFetch` overrides this value when explicitly set.
|
|
516
|
+
- **Security and safety:** Keep disabled for deterministic tests and offline development.
|
|
517
|
+
- **Related diagnostics:** None specific.
|
|
518
|
+
|
|
519
|
+
## Fastly profile example
|
|
520
|
+
|
|
521
|
+
```ts
|
|
522
|
+
local: {
|
|
523
|
+
host: 'fastly',
|
|
524
|
+
target: 'native',
|
|
525
|
+
fastly: {
|
|
526
|
+
bindings: {
|
|
527
|
+
configStore: 'pulse_config',
|
|
528
|
+
secretStore: 'pulse_secrets',
|
|
529
|
+
kv: { sessions: 'sessions' },
|
|
530
|
+
backends: { 'https://api.example.com': 'api_backend' },
|
|
531
|
+
dynamicBackends: false,
|
|
532
|
+
grip: {
|
|
533
|
+
fanoutBackend: 'fanout',
|
|
534
|
+
publishUrl: 'https://publisher.example.com/publish',
|
|
535
|
+
publishBackend: 'publisher',
|
|
536
|
+
directHold: true,
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
build: { name: 'pulse-app', authors: ['Team'] },
|
|
540
|
+
local: { networkFetch: false },
|
|
541
|
+
},
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Deployment resource names configure provider bindings; local `dev.config`, `dev.secrets`, `dev.kv`, and `dev.fetches` values never create or populate deployed resources.
|
|
546
|
+
|
|
547
|
+
## Safety invariants
|
|
548
|
+
|
|
549
|
+
- Output directories must remain real descendants of the project root.
|
|
550
|
+
- Structured request and schema bodies are bounded before decoding.
|
|
551
|
+
- Live local network fetch is explicit for Fastly and can be disabled for Node.
|
|
552
|
+
- Raw secret values are redacted from public JSON, diagnostics, and runtime error detail.
|
|
553
|
+
- Provider SDK objects and provider-specific namespaces never enter canonical handler scope.
|
|
554
|
+
- `none` is compile-only; it cannot execute `pulse dev` or `pulse test`.
|