@jxsuite/connector 0.5.4 → 0.5.6

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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -6,14 +6,14 @@
6
6
 
7
7
  `@jxsuite/connector` is the Jx extension bridging sites to live databases. It contributes two
8
8
  project.json sections and serves them over the canonical `/_jx/data` wire contract
9
- (specs/extensions.md §11–§12):
9
+ (specs/extensions.md §11 and §12):
10
10
 
11
- - **`connections`** — named database connections. Entries carry identifiers and env-var _names_
11
+ - **`connections`**: named database connections. Entries carry identifiers and env-var _names_
12
12
  only (`binding`, `databaseId`, `urlEnv`, `hyperdriveId`); secret values live in `.dev.vars`
13
13
  locally and the platform secret store in production. Providers: Cloudflare **D1**, **Supabase**
14
14
  (postgres over postgres-js/Hyperdrive), and file-backed **Sqlite** (bun:sqlite).
15
- - **`data`** — dynamic tables. Each entry names its connection, a column `schema` (plain Jx field
16
- schemas plus relationship refs — see specs/relationships.md), an `id` strategy
15
+ - **`data`**: dynamic tables. Each entry names its connection, a column `schema` (plain Jx field
16
+ schemas plus relationship refs; see specs/relationships.md), an `id` strategy
17
17
  (`"uuid"` | `"integer"`), `timestamps`, `indexes`, `permissions`
18
18
  (`public | none | authenticated | owner | role:<r>`), and an optional `ownerField`.
19
19
 
@@ -41,19 +41,19 @@ sqlite, on Workers, Bun, and node.
41
41
  ```
42
42
 
43
43
  Then `jx schema` (regenerates the project schemas) and `jx db push [--dry-run]` (additive-only
44
- schema sync — tables and columns are created, never dropped or retyped). In dev, the server
44
+ schema sync: tables and columns are created, never dropped or retyped). In dev, the server
45
45
  stands D1 connections in with local SQLite at `.jx/data/<connection>.sqlite`, auto-synced on
46
46
  first touch.
47
47
 
48
48
  ## State classes
49
49
 
50
- - `TableQuery` / `TableEntry` — rows (content filter grammar: `filter`, `sort`, `limit`,
50
+ - `TableQuery` / `TableEntry`: rows (content filter grammar: `filter`, `sort`, `limit`,
51
51
  `offset`, `include`) and single rows by id (`#/$params/<name>` refs resolve against the route).
52
- - `TableInsert` / `TableUpdate` / `TableDelete` — form-friendly write actions
52
+ - `TableInsert` / `TableUpdate` / `TableDelete`: form-friendly write actions
53
53
  (`"onsubmit": { "$ref": "#/state/addComment" }` reads the form's FormData).
54
54
 
55
55
  In compiled sites these **lower** to core defs (specs/extensions.md §8.3): queries become plain
56
- `Request` fetches against `/_jx/data`, actions become inline `Function` handlers — no extension
56
+ `Request` fetches against `/_jx/data`, actions become inline `Function` handlers, so no extension
57
57
  code ships to the browser. Read-after-write rides the `_v` convention: lowered queries append
58
58
  `_v=${(state._v || 0)}` to their URL and successful writes bump `state._v`, re-running every
59
59
  query effect on the page.
@@ -61,18 +61,18 @@ query effect on the page.
61
61
  ## Permissions (fail-closed)
62
62
 
63
63
  `public` rules pass without auth; `none` always denies; every other rule requires the auth
64
- extension's hooks on the shared server context — absent auth means 401. Defaults: read `public`,
64
+ extension's hooks on the shared server context, so absent auth means 401. Defaults: read `public`,
65
65
  writes `none`. Owner rules scope reads/writes via `ownerField`.
66
66
 
67
67
  ## Field-union extras
68
68
 
69
69
  Table columns are plain core field schemas plus relationship refs, so this package ships **no**
70
- `schemas.fields` fragment — the manifest convention (a fragment whose `$defs` members join the
70
+ `schemas.fields` fragment. That manifest convention (a fragment whose `$defs` members join the
71
71
  per-project field union) exists for extensions that need shapes beyond the core union.
72
72
 
73
73
  ## Versioning
74
74
 
75
- Published to npm as `@jxsuite/connector` — TypeScript source, like every `@jxsuite` package,
75
+ Published to npm as `@jxsuite/connector`, TypeScript source like every `@jxsuite` package,
76
76
  following the monorepo's release train. Extensions may depend on core packages
77
77
  (`@jxsuite/schema`) but never the reverse; the auth extension builds on this package's
78
78
  `resolveDialect` seam and permission types (`@jxsuite/connector/types`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/connector",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Jx database connections and dynamic data tables served over /_jx/data",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -54,19 +54,19 @@
54
54
  "scripts": {
55
55
  "test": "bun test --isolate",
56
56
  "test:coverage": "bun test --isolate --coverage",
57
- "upgrade": "bunx npm-check-updates -u && bun install"
57
+ "upgrade": "bun update --latest && bun install"
58
58
  },
59
59
  "dependencies": {
60
- "@jxsuite/schema": "^1.8.1",
60
+ "@jxsuite/schema": "^2.0.0",
61
61
  "kysely": "^0.29.5",
62
62
  "kysely-d1": "^0.4.0",
63
63
  "kysely-postgres-js": "^4.0.0",
64
64
  "postgres": "^3.4.9"
65
65
  },
66
66
  "devDependencies": {
67
- "@cloudflare/workers-types": "^5.20260823.1",
67
+ "@cloudflare/workers-types": "^5.20260826.1",
68
68
  "ajv": "^8.20.0",
69
- "hono": "^4.13.4"
69
+ "hono": "^4.13.5"
70
70
  },
71
71
  "jx": "./jx-extension.json"
72
72
  }