@pulse-compute/s3 1.0.0-beta.3 → 1.0.0-beta.5

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/s3`<br>
8
8
  > **Stability:** The package root supports head, getText and putText on Node Native, Node JavaScript and Fastly Native. Fastly JavaScript is ineligible. Provider and lowering subpaths are toolchain-only; live origin acceptance is separate.<br>
9
9
  > **npm:** [`@pulse-compute/s3`](https://www.npmjs.com/package/@pulse-compute/s3)<br>
10
- > **Canonical documentation:** [Package guide](https://pulsecompute.io/v1.0.0-beta.3/packages/s3/)
10
+ > **Canonical documentation:** [Package guide](https://pulsecompute.io/v1.0.0-beta.5/packages/s3/)
11
11
  >
12
- > This release-status block is generated from the synchronized `Pulse 1.0.0-beta.3` package policy.
12
+ > This release-status block is generated from the synchronized `Pulse 1.0.0-beta.5` package policy.
13
13
  <!-- pulse-package-status:end -->
14
14
 
15
15
  This package provides bounded, exact-key `head`, `getText` and `putText` effects for
@@ -31,7 +31,7 @@ Put mappings under `<profile>.node.bindings.s3` or
31
31
  | `bucket`, `region` | Explicit bucket and signing region |
32
32
  | `accessKeyIdSecret`, `secretAccessKeySecret` | Named provider secret references |
33
33
  | `sessionTokenSecret` | Optional named session-token reference |
34
- | `maxTextBytes` | 1–32768; default 32768 |
34
+ | `maxTextBytes` | 1–2097152; default 32768 |
35
35
  | `timeoutMs` | 1–30000; default 10000 |
36
36
  | `backend` | Fastly-only named static backend |
37
37
 
@@ -65,19 +65,23 @@ Native targets compose Crypto's AssemblyScript primitives. Fastly JavaScript S3
65
65
  is ineligible because its SDK projects raw headers and loses required metadata
66
66
  information. This target exclusion does not gate supported targets.
67
67
 
68
- For a JSON request carrying the maximum text consisting of escaped control
69
- characters, configure the existing `schemas.maxBytes` request envelope to
70
- 262144; the object itself remains bounded to 32768 UTF-8 bytes. The acceptance
68
+ Select `maxTextBytes: 2097152` per binding for 2 MiB objects; the default remains
69
+ 32768. Request/schema limits are independent. Use `schemas.maxBytes: 2097152`
70
+ for a 2 MiB encoded object, and explicitly size larger transport envelopes when
71
+ JSON escaping requires it. The S3/text effect envelope is 12,648,448 bytes.
72
+ Local HTTP ingress also uses `dev.maxBodyBytes`, default 65536. Primary-memory
73
+ Native digest/S3 modules enforce a 256 MiB Wasm maximum; fixed-memory linked
74
+ guests retain their separate ABI. KV values, HMAC and JWT do not grow with S3. The acceptance
71
75
  consumer uses generic JSON responses (`strict: false`) to compare the complete
72
76
  result unions. Applications using strict JSON must declare response schemas.
73
77
 
74
78
  The package root is the supported application API in the synchronized
75
- `1.0.0-beta.3` release candidate. Provider, manifest, compiler and Native
79
+ `1.0.0-beta.5` release candidate. Provider, manifest, compiler and Native
76
80
  subpaths are trusted toolchain integration, not application imports. Install
77
81
  S3 with the exact compatible Pulse, CLI and provider candidate set; candidate
78
82
  preparation does not imply npm publication.
79
83
 
80
- See the [S3 guide](https://pulsecompute.io/v1.0.0-beta.3/packages/s3/) for the
84
+ See the [S3 guide](https://pulsecompute.io/v1.0.0-beta.5/packages/s3/) for the
81
85
  lowering contract, support matrix and acceptance boundaries. Local acceptance
82
86
  executes Node Native, Node JavaScript and compiled Fastly Native Wasm against
83
87
  controlled origins. Live Object Storage evidence follows infrastructure setup.
@@ -10,4 +10,4 @@ metadata limits, truncation, deadlines, write uncertainty and secret redaction.
10
10
  Fastly Native executes compiled Wasm against host ABI fixtures. These checks
11
11
  do not establish live origin behavior; that evidence follows infrastructure
12
12
  setup. Fastly JavaScript is ineligible for S3 because its SDK loses raw header
13
- metadata. See the [S3 guide](https://pulsecompute.io/v1.0.0-beta.3/packages/s3/).
13
+ metadata. See the [S3 guide](https://pulsecompute.io/v1.0.0-beta.5/packages/s3/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulse-compute/s3",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.5",
4
4
  "license": "Apache-2.0",
5
5
  "engines": {
6
6
  "node": "^22.14.0 || ^24.0.0"
@@ -39,8 +39,8 @@
39
39
  "manifest": "./pulsewasm.manifest.cjs"
40
40
  },
41
41
  "dependencies": {
42
- "@pulse-compute/runtime": "1.0.0-beta.3",
43
- "@pulse-compute/wasm-contracts": "1.0.0-beta.3"
42
+ "@pulse-compute/runtime": "1.0.0-beta.5",
43
+ "@pulse-compute/wasm-contracts": "1.0.0-beta.5"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
@@ -50,7 +50,7 @@
50
50
  "url": "git+https://github.com/pulse-compute/pulse.git",
51
51
  "directory": "packages/s3"
52
52
  },
53
- "homepage": "https://pulsecompute.io/v1.0.0-beta.3/packages/s3/",
53
+ "homepage": "https://pulsecompute.io/v1.0.0-beta.5/packages/s3/",
54
54
  "bugs": {
55
55
  "url": "https://github.com/pulse-compute/pulse/issues"
56
56
  }
package/src/index.js CHANGED
@@ -1,10 +1,15 @@
1
1
  'use strict';
2
2
  const { createPackageRuntime } = require('@pulse-compute/runtime/package');
3
- const { S3_PACKAGE, S3_CONTRACT_ID, S3_OPERATIONS } = require('@pulse-compute/wasm-contracts/s3/contracts');
3
+ const { S3_PACKAGE, S3_CONTRACT_ID, S3_OPERATIONS, S3_LIMITS } = require('@pulse-compute/wasm-contracts/s3/contracts');
4
4
  const { normalizeResult, normalizePutOptions } = require('./provider.js');
5
5
  const runtime = createPackageRuntime({ package: S3_PACKAGE, contractId: S3_CONTRACT_ID, providerKind: 's3', operations: S3_OPERATIONS });
6
6
  exports.s3 = Object.freeze({
7
7
  head(ctx, binding, key) { return runtime.effect(ctx, 'head', { binding, key }, (result) => normalizeResult('head', result)); },
8
8
  getText(ctx, binding, key) { return runtime.effect(ctx, 'getText', { binding, key }, (result) => normalizeResult('getText', result)); },
9
- putText(ctx, binding, key, text, options) { return runtime.effect(ctx, 'putText', { binding, key, text, ...normalizePutOptions(options) }, (result) => normalizeResult('putText', result)); }
9
+ putText(ctx, binding, key, text, options) {
10
+ // Retain an over-limit sentinel without copying an unbounded string into
11
+ // the effect envelope. Providers reject it before encoding or dispatch.
12
+ const boundedText = typeof text === 'string' ? text.slice(0, S3_LIMITS.textBytes + 1) : null;
13
+ return runtime.effect(ctx, 'putText', { binding, key, text: boundedText, ...normalizePutOptions(options) }, (result) => normalizeResult('putText', result));
14
+ }
10
15
  });
package/src/provider.js CHANGED
@@ -26,7 +26,7 @@ function normalizeBinding(value) {
26
26
  if (field === 'sessionTokenSecret' && input[field] === undefined) continue;
27
27
  if (typeof input[field] !== 'string' || !namePattern.test(input[field])) throw new TypeError('S3 credentials must be valid named secret references.');
28
28
  }
29
- const maxTextBytes = input.maxTextBytes === undefined ? S3_LIMITS.textBytes : input.maxTextBytes;
29
+ const maxTextBytes = input.maxTextBytes === undefined ? S3_LIMITS.defaultTextBytes : input.maxTextBytes;
30
30
  const timeoutMs = input.timeoutMs === undefined ? 10000 : input.timeoutMs;
31
31
  if (!Number.isInteger(maxTextBytes) || maxTextBytes < 1 || maxTextBytes > S3_LIMITS.textBytes || !Number.isInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 30000) throw new TypeError('S3 limits are outside the bounded subset.');
32
32
  return Object.freeze({ ...input, endpoint: url.origin, maxTextBytes, timeoutMs });