@molecule/app-http 1.5.6 → 1.5.8

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
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-06T22:35:11.084Z
6
+ Generated: 2026-11-07T19:13:01.570Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-http
@@ -23,6 +23,12 @@ key is `data`, finds none of the fields it validates, and answers
23
23
  `skipAuthGate`) is the THIRD argument. Only `request({ method, url, data, … })` takes `data`
24
24
  inside an options object, because there that object IS the config.
25
25
 
26
+ **Response helpers preserve API-specific field names.** `unwrapSingle<T>(response)` peels
27
+ transport and `data` envelopes. It does not select a named resource such as `{ record: T }`.
28
+ For that body, read `unwrapSingle<{ record: RecordType }>(response)?.record`, or
29
+ `response.data.record` with a typed client call. For a bare resource body, keep the resource
30
+ directly. The generic is a type assertion, not runtime validation of the server's schema.
31
+
26
32
  > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
27
33
  > It is written to be read by coding agents as much as by people, and is generated from this
28
34
  > package's source — edit `src/index.ts` JSDoc, not this file.
@@ -873,7 +879,10 @@ function unwrapList<T>(res: unknown): T[]
873
879
 
874
880
  #### `unwrapSingle(res)`
875
881
 
876
- Normalize an unknown response body into a single typed resource.
882
+ Normalize a response's transport/data envelopes into a typed object.
883
+ Named API fields remain intact: `{ record: value }` stays `{ record: value }`.
884
+ Select that field explicitly, e.g. `unwrapSingle<{ record: Item }>(res)?.record`.
885
+ The generic asserts the body's type; it does not validate its schema at runtime.
877
886
 
878
887
  Accepts:
879
888
 
package/dist/index.d.ts CHANGED
@@ -14,6 +14,12 @@
14
14
  * `skipAuthGate`) is the THIRD argument. Only `request({ method, url, data, … })` takes `data`
15
15
  * inside an options object, because there that object IS the config.
16
16
  *
17
+ * **Response helpers preserve API-specific field names.** `unwrapSingle<T>(response)` peels
18
+ * transport and `data` envelopes. It does not select a named resource such as `{ record: T }`.
19
+ * For that body, read `unwrapSingle<{ record: RecordType }>(response)?.record`, or
20
+ * `response.data.record` with a typed client call. For a bare resource body, keep the resource
21
+ * directly. The generic is a type assertion, not runtime validation of the server's schema.
22
+ *
17
23
  * @example
18
24
  * ```tsx
19
25
  * // In a React component, get the configured client from context and call it.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8HG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -14,6 +14,12 @@
14
14
  * `skipAuthGate`) is the THIRD argument. Only `request({ method, url, data, … })` takes `data`
15
15
  * inside an options object, because there that object IS the config.
16
16
  *
17
+ * **Response helpers preserve API-specific field names.** `unwrapSingle<T>(response)` peels
18
+ * transport and `data` envelopes. It does not select a named resource such as `{ record: T }`.
19
+ * For that body, read `unwrapSingle<{ record: RecordType }>(response)?.record`, or
20
+ * `response.data.record` with a typed client call. For a bare resource body, keep the resource
21
+ * directly. The generic is a type assertion, not runtime validation of the server's schema.
22
+ *
17
23
  * @example
18
24
  * ```tsx
19
25
  * // In a React component, get the configured client from context and call it.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8HG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA"}
package/dist/unwrap.d.ts CHANGED
@@ -48,7 +48,10 @@
48
48
  */
49
49
  export declare function unwrapList<T>(res: unknown): T[];
50
50
  /**
51
- * Normalize an unknown response body into a single typed resource.
51
+ * Normalize a response's transport/data envelopes into a typed object.
52
+ * Named API fields remain intact: `{ record: value }` stays `{ record: value }`.
53
+ * Select that field explicitly, e.g. `unwrapSingle<{ record: Item }>(res)?.record`.
54
+ * The generic asserts the body's type; it does not validate its schema at runtime.
52
55
  *
53
56
  * Accepts:
54
57
  * - a non-empty plain object → returned as-is (cast)
@@ -1 +1 @@
1
- {"version":3,"file":"unwrap.d.ts","sourceRoot":"","sources":["../src/unwrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,CAmC/C;AAyED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI,CAmDtD"}
1
+ {"version":3,"file":"unwrap.d.ts","sourceRoot":"","sources":["../src/unwrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,CAmC/C;AAyED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI,CAmDtD"}
package/dist/unwrap.js CHANGED
@@ -151,7 +151,10 @@ function isHttpResponseLike(res) {
151
151
  typeof res.status === 'number');
152
152
  }
153
153
  /**
154
- * Normalize an unknown response body into a single typed resource.
154
+ * Normalize a response's transport/data envelopes into a typed object.
155
+ * Named API fields remain intact: `{ record: value }` stays `{ record: value }`.
156
+ * Select that field explicitly, e.g. `unwrapSingle<{ record: Item }>(res)?.record`.
157
+ * The generic asserts the body's type; it does not validate its schema at runtime.
155
158
  *
156
159
  * Accepts:
157
160
  * - a non-empty plain object → returned as-is (cast)
@@ -1 +1 @@
1
- {"version":3,"file":"unwrap.js","sourceRoot":"","sources":["../src/unwrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,UAAU,CAAI,GAAY;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,GAAU,CAAA;IACzC,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,KAAK,GAAI,GAAyB,CAAC,IAAI,CAAA;QAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,KAAY,CAAA;QAC7C,0EAA0E;QAC1E,yEAAyE;QACzE,yEAAyE;QACzE,yEAAyE;QACzE,yEAAyE;QACzE,IACE,kBAAkB,CAAC,GAAG,CAAC;YACvB,KAAK;YACL,OAAO,KAAK,KAAK,QAAQ;YACzB,4EAA4E;YAC5E,kEAAkE;YAClE,sEAAsE;YACtE,wDAAwD;YACxD,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC,MAAM,KAAK,CAAC;YACzC,MAAM,IAAI,KAAK;YACf,KAAK,CAAC,OAAO,CAAE,KAA2B,CAAC,IAAI,CAAC,EAChD,CAAC;YACD,OAAQ,KAAuB,CAAC,I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O,IAAI,CAAA;AACb,CAAC"}
package/dist/utilities.js CHANGED
@@ -30,8 +30,8 @@ let unbondedFallback = null;
30
30
  * or null.
31
31
  *
32
32
  * `setClient` installs it, which is the only moment that can reach a client created AFTER
33
- * the auth setup ran — the scaffold wires auth before http, so the auth bond's initial
34
- * token had no client to land on (`createDefaultAuthClientWithHttpSync` in
33
+ * the auth setup ran — when auth is wired before http, the auth bond's initial token has
34
+ * no client to land on (`createDefaultAuthClientWithHttpSync` in
35
35
  * `@molecule/app-bonds-default-react`). The client then reads the source itself for each
36
36
  * request instead of holding a token copied at bond time: a session adopted mid-page —
37
37
  * `setSession()`, the OAuth callback's `setAccessToken()` — changes the token with no auth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-http",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "description": "Client HTTP interface for molecule.dev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@molecule/app-bond": "1.0.5",
37
37
  "@molecule/app-i18n": "1.1.2",
38
- "@molecule/app-logger": "1.0.5",
38
+ "@molecule/app-logger": "1.0.6",
39
39
  "@types/node": "26.6.5",
40
40
  "typescript": "6.0.3",
41
41
  "vitest": "4.1.12"