sh3-core 0.20.3 → 0.21.0

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.
@@ -81,9 +81,9 @@ export interface PackageEntry {
81
81
  /**
82
82
  * A specific published version of a package.
83
83
  *
84
- * Each version ships a self-contained pre-built ESM bundle at `bundleUrl`.
85
- * The `integrity` field is an SRI hash (sha384 recommended) used to verify
86
- * the download before execution.
84
+ * Each version ships a `.sh3pkg` ZIP archive at `archiveUrl`.
85
+ * The archive contains `manifest.json` and at least one of `client.js` / `server.js`.
86
+ * The `integrity` SRI hash verifies the download before execution.
87
87
  */
88
88
  export interface PackageVersion {
89
89
  /**
@@ -98,36 +98,17 @@ export interface PackageVersion {
98
98
  */
99
99
  contractVersion: string;
100
100
  /**
101
- * Absolute or registry-relative URL to the pre-built ESM bundle.
102
- * The client fetches this URL and verifies the download against `integrity`
103
- * before executing. Optional for server-only packages that ship only a
104
- * `serverBundleUrl` — in that case `integrity` must also be omitted.
101
+ * URL to the `.sh3pkg` ZIP archive for this version.
102
+ * Absolute or registry-relative. The archive contains `manifest.json`
103
+ * plus at least one of `client.js` / `server.js`.
105
104
  */
106
- bundleUrl?: string;
105
+ archiveUrl: string;
107
106
  /**
108
- * SRI integrity hash for the bundle file.
107
+ * SRI integrity hash of the archive ZIP.
109
108
  * Format: `"<algorithm>-<base64digest>"` (e.g. `"sha384-abc123..."`).
110
109
  * Algorithms: sha256, sha384 (recommended), sha512.
111
- * See: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
112
- * Omitted when the package has no client bundle.
113
110
  */
114
- integrity?: string;
115
- /**
116
- * Optional URL to the server-side bundle for shards that have a backend
117
- * component. Same resolution rules as `bundleUrl` (absolute or registry-
118
- * relative). Only present when the shard declares `serverBundle` in its
119
- * manifest.
120
- */
121
- serverBundleUrl?: string;
122
- /**
123
- * SRI integrity hash for the server bundle. Same format as `integrity`.
124
- * Optional in contract v1 for back-compat with registries that predate
125
- * server bundles. Will become required when the formal registry spec
126
- * lands (see ADR-015 proposal). When absent, the client skips the SRI
127
- * check at download time and logs a warning — the unverified bundle is
128
- * still installed.
129
- */
130
- serverIntegrity?: string;
111
+ integrity: string;
131
112
  /**
132
113
  * Other shards that must be installed and active before this package
133
114
  * can be loaded. Optional — omit if the package has no dependencies.
@@ -260,9 +241,7 @@ export interface PackageMeta {
260
241
  */
261
242
  sourceRegistry: string;
262
243
  /**
263
- * SRI hash to verify the downloaded bundle against before executing.
264
- * Must match `PackageVersion.integrity`. Omitted for server-only packages
265
- * that ship no client bundle.
244
+ * SRI hash of the archive this package was installed from. Kept for audit purposes.
266
245
  */
267
246
  integrity?: string;
268
247
  /**
@@ -270,14 +249,10 @@ export interface PackageMeta {
270
249
  * Undefined if no dependencies.
271
250
  */
272
251
  requires?: RequiredDependency[];
273
- /**
274
- * SRI hash for the server bundle. Only present when the package has a
275
- * server component.
276
- */
277
- serverIntegrity?: string;
278
- /**
279
- * Whether this package includes a server bundle that needs to be pushed
280
- * to the server after client-side installation.
281
- */
282
- hasServerBundle?: boolean;
252
+ }
253
+ /** Payload sent to the server to trigger a server-side install. */
254
+ export interface RemoteInstallRequest {
255
+ registryUrl: string;
256
+ packageId: string;
257
+ version: string;
283
258
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Auto-generated from package.json — do not edit manually. */
2
- export declare const VERSION = "0.20.3";
2
+ export declare const VERSION = "0.21.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Auto-generated from package.json — do not edit manually. */
2
- export const VERSION = '0.20.3';
2
+ export const VERSION = '0.21.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh3-core",
3
- "version": "0.20.3",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -39,7 +39,8 @@
39
39
  "test:watch": "vitest"
40
40
  },
41
41
  "dependencies": {
42
- "esm-env": "^1.1.0"
42
+ "esm-env": "^1.1.0",
43
+ "fflate": "^0.8.3"
43
44
  },
44
45
  "peerDependencies": {
45
46
  "svelte": "^5.0.0",