@xanots/sdk 0.0.11 → 0.0.12
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 +16 -0
- package/README.md +11 -6
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-QNKN5RYD.js → agent-file-refresh-GQWAAOBV.js} +4 -4
- package/dist/bin.js +11 -11
- package/dist/{branch-commands-2BLOC2GR.js → branch-commands-5KMPAAZV.js} +7 -7
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +2 -2
- package/dist/{capture-4WVJY4DQ.js → capture-YLUVAITI.js} +2 -2
- package/dist/chunk-2VTJSI6X.js +192 -0
- package/dist/{chunk-5XZ744TS.js → chunk-2ZCUO2UG.js} +1 -1
- package/dist/{chunk-XEOX6AM7.js → chunk-3LQGF2WS.js} +2 -2
- package/dist/{chunk-WP4OZZV4.js → chunk-3VFCKHOB.js} +2 -2
- package/dist/{chunk-XHEXOES3.js → chunk-5YDINUAP.js} +1 -1
- package/dist/{chunk-LU7TRWMC.js → chunk-6VNRMKFJ.js} +2 -2
- package/dist/{chunk-CTD5ZCV6.js → chunk-7WRJPKGK.js} +2 -2
- package/dist/{chunk-3INK4Y4E.js → chunk-AE3PDSDS.js} +1 -1
- package/dist/{chunk-22TKBSDV.js → chunk-AG5GCZDD.js} +2 -2
- package/dist/{chunk-DBFU47BJ.js → chunk-AOFFKSJC.js} +2 -2
- package/dist/{chunk-TCFIPDB3.js → chunk-AVGDL6RB.js} +1 -1
- package/dist/{chunk-BC2C5GVI.js → chunk-DCMANKMX.js} +1 -1
- package/dist/{chunk-WHOJWOSV.js → chunk-EETVJZAZ.js} +1 -1
- package/dist/{chunk-4Q7ZOHH7.js → chunk-ELK7UALJ.js} +3 -3
- package/dist/{chunk-VNQM3V2C.js → chunk-EXENFOWE.js} +2 -2
- package/dist/{chunk-UOZMSF4C.js → chunk-GSP2BY4F.js} +5 -5
- package/dist/{chunk-AIZKXUNP.js → chunk-IMLYGQK6.js} +2 -2
- package/dist/{chunk-QK7ZQJLP.js → chunk-N74KDCBD.js} +39 -25
- package/dist/{chunk-3IGNIP6R.js → chunk-NDP7OUPS.js} +1 -1
- package/dist/{chunk-EQW3YT5U.js → chunk-P6PVBQL6.js} +2 -2
- package/dist/{chunk-HYBN4H3F.js → chunk-PLE5QQOZ.js} +27 -20
- package/dist/{chunk-BSK7ELHU.js → chunk-PR7OXHGZ.js} +1 -1
- package/dist/{chunk-OWGCOGKK.js → chunk-QYSQ3UDO.js} +8 -8
- package/dist/{chunk-ZQ2PKR6R.js → chunk-RQ3FXV4K.js} +2 -2
- package/dist/{chunk-Q77KNEUL.js → chunk-RQNMTDXD.js} +1703 -2
- package/dist/{chunk-QKM4U5UK.js → chunk-TJS2AF5Y.js} +2 -2
- package/dist/{chunk-DIA7CT7J.js → chunk-V5Y7D4LH.js} +11 -2
- package/dist/{chunk-KA6G2L7U.js → chunk-VK26K7AY.js} +3 -3
- package/dist/{chunk-4IF54NU5.js → chunk-VPAWRBK5.js} +12 -16
- package/dist/{chunk-QYMAZRAU.js → chunk-VRNZ2NVV.js} +5 -5
- package/dist/{chunk-RCT7UX7B.js → chunk-XT3XQ4PF.js} +32 -27
- package/dist/{chunk-VAF6A3YD.js → chunk-XWFRNJMQ.js} +1 -1
- package/dist/{chunk-7ZYW652H.js → chunk-YHS6VVLJ.js} +2 -2
- package/dist/{chunk-G4EJMQLD.js → chunk-YX22LKQE.js} +2 -2
- package/dist/{chunk-F6CYJ7TN.js → chunk-Z2ZIE5CO.js} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +10 -10
- package/dist/codegen-command-Y2SPMAUW.js +47 -0
- package/dist/codegen.d.ts +5 -5
- package/dist/codegen.js +2 -2
- package/dist/{completion-WF46272M.js → completion-HJU5QEFB.js} +2 -2
- package/dist/{deploy-command-IP7V7GT4.js → deploy-command-XHS5PKPV.js} +19 -19
- package/dist/{ephemeral-command-U4AQ3TXX.js → ephemeral-command-2NKPEXUU.js} +8 -8
- package/dist/index.d.ts +88 -104
- package/dist/index.js +9 -9
- package/dist/init-command-23FFNUFT.js +32 -0
- package/dist/internal.d.ts +10 -16
- package/dist/internal.js +26 -26
- package/dist/{io-P2H75UV2.js → io-UBDMMDH6.js} +3 -3
- package/dist/{live-diff-IXKBVG4K.js → live-diff-HCOTN5WC.js} +3 -3
- package/dist/{lock-46FWYE4D.js → lock-HQ4KARU2.js} +2 -2
- package/dist/{lock-commands-ZZKZ4LZJ.js → lock-commands-WCRC56ME.js} +11 -11
- package/dist/{login-command-Z6CHTA57.js → login-command-P7LXD5TE.js} +6 -6
- package/dist/{loop-D5NPL4VH.js → loop-IC5ISSYB.js} +3 -3
- package/dist/{marketplace-command-P4IPLJ6J.js → marketplace-command-T6JCHW7J.js} +4 -4
- package/dist/{meta-client-K2J4XH64.js → meta-client-LKRKR3L2.js} +4 -4
- package/dist/node.d.ts +6 -6
- package/dist/node.js +14 -14
- package/dist/{preflight-command-K346GPTY.js → preflight-command-TZWPHBXY.js} +16 -16
- package/dist/{profile-command-LJSBDV2L.js → profile-command-WBNSMQSI.js} +3 -3
- package/dist/{release-command-IMNTIVWK.js → release-command-WEFYRTCI.js} +26 -26
- package/dist/{response-BQVQ24l1.d.ts → response-D6xGLEIn.d.ts} +18 -23
- package/dist/{routes-manifest-PWZHDOI5.js → routes-manifest-5ZFKUQWA.js} +2 -2
- package/dist/{runtime-V4C3AC3A.js → runtime-LSLIDALK.js} +1 -1
- package/dist/scaffold.d.ts +16 -8
- package/dist/scaffold.js +7 -11
- package/dist/{static-host-3WMV7IZO.js → static-host-4JDQCHUW.js} +1 -1
- package/dist/{status-command-AL47VG7H.js → status-command-VARULAR5.js} +4 -4
- package/dist/{store-BLyNeQ8S.d.ts → store-DAnUIi1T.d.ts} +81 -86
- package/dist/{test-command-YAZLKLGQ.js → test-command-YCAR4O35.js} +7 -7
- package/dist/{upgrade-command-BN3EHAOI.js → upgrade-command-GYEIMJBG.js} +15 -16
- package/dist/{workspace-2COHDBM3.js → workspace-33KHFLX3.js} +2 -2
- package/dist/{workspace-command-MNK7Y7MQ.js → workspace-command-2ZTGT26W.js} +26 -28
- package/dist/{workspace-export-DURY5WYL.js → workspace-export-MLYTYZS5.js} +3 -3
- package/dist/{xdo-BjJj5W_E.d.ts → xdo-ODuJklk6.d.ts} +27 -23
- package/guides/authoring.md +11 -2
- package/guides/typed-frontend.md +4 -4
- package/llms/statements-data.md +3 -2
- package/llms/values.md +1 -1
- package/llms-full.txt +18 -18
- package/llms.txt +14 -15
- package/manifest.json +6 -2
- package/package.json +1 -1
- package/dist/chunk-ANUDXFEX.js +0 -881
- package/dist/chunk-JGCWTCA7.js +0 -95
- package/dist/chunk-YBC3IKMF.js +0 -845
- package/dist/codegen-command-FUT2KJB6.js +0 -49
- package/dist/init-command-NPVL32L6.js +0 -34
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# xanots v0.0.
|
|
1
|
+
# xanots v0.0.12
|
|
2
2
|
|
|
3
3
|
> TypeScript SDK that compiles a typed Xano workspace into the importable packageExport JSON bundle.
|
|
4
4
|
|
|
@@ -16,27 +16,26 @@ caller, `c.*` a constant — resolved at request time; JS operators over them do
|
|
|
16
16
|
compute (see Gotchas). Requests share no memory — state persists in tables or redis.
|
|
17
17
|
|
|
18
18
|
Coverage: object kinds 25/31, statement surfaces 214/214, filters 226 (226 typed).
|
|
19
|
-
Not authorable here: branch, market_item, realtime_channel, run.job, run.service, tablemap — these cannot be authored and do not survive a pull;
|
|
19
|
+
Not authorable here: branch, market_item, realtime_channel, run.job, run.service, tablemap — these cannot be authored and do not survive a pull; reasons in `coverage.objectKinds.unmodeled`.
|
|
20
20
|
|
|
21
21
|
This file is the whole always-read surface: the mental model, the deploy contract,
|
|
22
22
|
every gotcha, and control flow. Per-surface detail lives in the topic files listed
|
|
23
|
-
below — open the one whose condition matches the task,
|
|
24
|
-
exhaustive per-entry detail in NEITHER — a statement's
|
|
25
|
-
defaults, a filter's
|
|
26
|
-
|
|
27
|
-
`@xanots/sdk/manifest.json`,
|
|
28
|
-
|
|
29
|
-
it is ~65k tokens, so never read it whole). Its top-level keys are `name`, `version`, `description`, `coverage`, `values`, `objectKinds`, `fieldTypes`, `statements`, `filters`, `cli`, `cliGlobalFlags`. `statements` and `filters` are ARRAYS, not maps — SELECT, do not index:
|
|
23
|
+
below — open the one whose condition matches the task, skip the rest. For
|
|
24
|
+
exhaustive per-entry detail in NEITHER — a statement's field schema with engine
|
|
25
|
+
defaults, a filter's full argument list, the `storedName` mapping — do a TARGETED
|
|
26
|
+
lookup in the shipped `manifest.json` (a program imports it as
|
|
27
|
+
`@xanots/sdk/manifest.json`, needing `with { type: "json" }` in Node ESM;
|
|
28
|
+
it is ~60k tokens, so never read it whole). Its top-level keys are `name`, `version`, `description`, `coverage`, `values`, `objectKinds`, `fieldTypes`, `statements`, `filters`, `cli`, `cliGlobalFlags`. `statements` and `filters` are ARRAYS, not maps — SELECT, do not index:
|
|
30
29
|
jq '.statements[] | select(.sPath=="db.get")' manifest.json
|
|
31
30
|
jq '.filters[] | select(.name=="json_decode")' manifest.json
|
|
31
|
+
⚠ `fields` is null on the 65 `declarative: false` statements (`db.get`, …): typed wrappers whose arguments are the factory's `.d.ts` signature. Null ≠ missing.
|
|
32
32
|
Select a statement on `sPath` (the `s.*` path you write), NOT `surface` (the XanoScript term): 24 of 214 differ — `var`→`set_var`, `break`→`foreach_break`, `foreach.remove`→`foreach_remove`, and every `expect.*`.
|
|
33
33
|
|
|
34
34
|
## Topic files
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`llms-full.txt` is everything concatenated — one fetch, for a reader that cannot open files.
|
|
36
|
+
Paths are relative to this file (`node_modules/@xanots/sdk/` once installed), so a
|
|
37
|
+
plain file read resolves them at the version you have.
|
|
38
|
+
`llms-full.txt` is everything concatenated — one fetch for a reader that cannot open files.
|
|
40
39
|
|
|
41
40
|
- [Object kinds](llms/object-kinds.md): Read when deciding WHAT to build — every authorable primitive (tables, endpoints, functions, tasks, agents, MCP, realtime, microservices, …), what each is, and which factory + register method build it. Read it too when a `register*` call will not typecheck because the array was built by `.flatMap()`/`.concat()` across modules.
|
|
42
41
|
- [Core def shapes](llms/kinds-core.md): Read when authoring a function, query, api group, task, workflow test, middleware, or tool — and for the `response` and `expr` shapes every one of them uses.
|
|
@@ -336,9 +335,9 @@ Non-obvious authoring rules:
|
|
|
336
335
|
no Node built-ins, so a bundler drops unused SDK exports. But importing a **def** for its
|
|
337
336
|
`getPath()`/`verb`/`getUrl()`/`getChannel()` also pulls whatever its `stack` references:
|
|
338
337
|
the `s.*`/`c.*` factory CALLS run at module load to BUILD it. Types are free.
|
|
339
|
-
⚠ A FLOOR — **~
|
|
338
|
+
⚠ A FLOOR — **~267 kB minified (~65 kB gzipped)** for the FIRST def; splitting modules
|
|
340
339
|
never removes it. The floor is the RUNTIME, not the def: a second def, or a much richer
|
|
341
|
-
one, adds ~
|
|
340
|
+
one, adds ~2 kB — so reducing what a def does will not reduce it.
|
|
342
341
|
Fix: `xanots routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) — verbs, paths, and sockets as
|
|
343
342
|
plain data importing NOTHING, still compile-checked: `routePath("blog/{slug}", { slug })`,
|
|
344
343
|
`channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base
|
package/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xanots",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "TypeScript SDK that compiles a typed Xano workspace into the importable packageExport JSON bundle.",
|
|
5
5
|
"coverage": {
|
|
6
6
|
"objectKinds": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
{
|
|
104
104
|
"name": "obj",
|
|
105
105
|
"signature": "(fields: Record<string, Value | nested>) => ObjValue<typeof fields>",
|
|
106
|
-
"description": "Dynamic object value → tag \"const:expr2\" (an object-literal expression string). The dynamic sibling of c.obj: members may be inp/ref/auth/col values, env()/setting()/sys.*, c.now(), c.* constants, nested records, or arrays — and each member may carry a FILTER CHAIN (withFilters + fl.*), which renders as the expression pipe `$var.row|get:\"a.b\"`. That matters most for the null-safe drill: db.get binds null on a miss, so ref(path, { safe: true }) inside an obj() is the normal shape, not a workaround — you do NOT need a preceding s.set_var to hoist it. The member record rides the return type, so InferResponse resolves each member the way it resolves a top-level response key — `response: { user: obj({ id: ref(\"row.id\") }) }` derives `{ user: { id: Col | null } }`, and a raw nested object literal (`response: { user: { id: ref(\"row.id\") } }`, auto-wrapped through this) derives the same. A constant record or list has two spellings that both work and render identically: bare (`{ a: 1 }`, `[]`) or `c.obj(...)`/`c.array([...])` —
|
|
106
|
+
"description": "Dynamic object value → tag \"const:expr2\" (an object-literal expression string). The dynamic sibling of c.obj: members may be inp/ref/auth/col values, env()/setting()/sys.*, c.now(), c.* constants, nested records, or arrays — and each member may carry a FILTER CHAIN (withFilters + fl.*), which renders as the expression pipe `$var.row|get:\"a.b\"`. That matters most for the null-safe drill: db.get binds null on a miss, so ref(path, { safe: true }) inside an obj() is the normal shape, not a workaround — you do NOT need a preceding s.set_var to hoist it. The member record rides the return type, so InferResponse resolves each member the way it resolves a top-level response key — `response: { user: obj({ id: ref(\"row.id\") }) }` derives `{ user: { id: Col | null } }`, and a raw nested object literal (`response: { user: { id: ref(\"row.id\") } }`, auto-wrapped through this) derives the same. A constant record or list has two spellings that both work and render identically: bare (`{ a: 1 }`, `[]`) or `c.obj(...)`/`c.array([...])` — prefer the bare form. NEST WITH A RAW RECORD, not an inner obj() call: an inner call yields a const:expr2 value, which the expression serializer has no spelling for and THROWS. The legacy blank `c.obj(null)` is refused here (it evaluates to null, not {}) — write c.null() or c.obj(). Still rejected: a filter ARGUMENT that carries its own chain or is a c.now() (a trailing | binds to the whole value, not one argument, and c.now() needs one), a DISABLED filter (an expression string cannot record that), and the output/response/toolset/reg tags — build those in a prior step and ref() them. Use for e.g. s.ai.agent.run args."
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "ref",
|
|
@@ -9393,6 +9393,10 @@
|
|
|
9393
9393
|
"flag": "--json",
|
|
9394
9394
|
"description": "Force JSON on stdout (default: whenever stdout is not a terminal)"
|
|
9395
9395
|
},
|
|
9396
|
+
{
|
|
9397
|
+
"flag": "--no-refresh",
|
|
9398
|
+
"description": "Do not refresh the managed block in CLAUDE.md / AGENTS.md / the Cursor rule"
|
|
9399
|
+
},
|
|
9396
9400
|
{
|
|
9397
9401
|
"flag": "--help, -h",
|
|
9398
9402
|
"description": "Show help for the command and exit"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xanots/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "XanoTS — your Xano backend as TypeScript. `xanots deploy` ships your typed workspace (and an optional static frontend) to a live, auto-expiring ephemeral environment and prints its URL. init → deploy → URL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xanots",
|