@symbo.ls/fetch 3.14.402 → 3.14.403

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @symbo.ls/fetch
2
2
 
3
+ ## 3.14.403
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
3
9
  ## 3.14.402
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -4,17 +4,17 @@ Declarative data fetching for DOMQL with pluggable adapters. Supports caching, s
4
4
 
5
5
  ## Setup
6
6
 
7
- Add `db` to `config.js`:
7
+ Add `fetch` to `config.js` — this is the connection/adapter config (distinct from the per-element `fetch` query declaration; the runtime resolves it onto `context.fetch`):
8
8
 
9
9
  ```js
10
10
  // Supabase
11
- db: { adapter: 'supabase', projectId: '...', key: '...' }
11
+ fetch: { adapter: 'supabase', projectId: '...', key: '...' }
12
12
 
13
13
  // Supabase — config from state
14
- db: { adapter: 'supabase', state: 'supabase' } // merges root state.supabase
14
+ fetch: { adapter: 'supabase', state: 'supabase' } // merges root state.supabase
15
15
 
16
16
  // REST
17
- db: {
17
+ fetch: {
18
18
  adapter: 'rest',
19
19
  url: 'https://api.example.com',
20
20
  headers: { Authorization: 'Bearer token' },
@@ -28,9 +28,14 @@ db: {
28
28
  }
29
29
 
30
30
  // Local
31
- db: { adapter: 'local', data: { articles: [] }, persist: true }
31
+ fetch: { adapter: 'local', data: { articles: [] }, persist: true }
32
+
33
+ // Custom/registered adapter (see Registering a named adapter)
34
+ fetch: { adapter: 'sdk', sdk: getSDK() }
32
35
  ```
33
36
 
37
+ > `db` is **not** a config key — it's the local name for the resolved adapter you get from `await this.getDB()` (`db.select(...)`, `db.insert(...)`, …).
38
+
34
39
  ## Declarative `fetch`
35
40
 
36
41
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/fetch",
3
- "version": "3.14.402",
3
+ "version": "3.14.403",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "module": "./dist/esm/index.js",