@xano/developer-mcp 1.0.54 → 1.0.57
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 +42 -10
- package/dist/cli_docs/index.d.ts +10 -0
- package/dist/cli_docs/index.js +10 -0
- package/dist/index.js +2 -18
- package/dist/lib.d.ts +2 -2
- package/dist/lib.js +1 -1
- package/dist/meta_api_docs/index.d.ts +10 -0
- package/dist/meta_api_docs/index.js +10 -0
- package/dist/tools/cli_docs.js +1 -0
- package/dist/tools/index.d.ts +138 -2
- package/dist/tools/index.js +60 -8
- package/dist/tools/index.test.d.ts +1 -0
- package/dist/tools/index.test.js +179 -0
- package/dist/tools/mcp_version.d.ts +10 -0
- package/dist/tools/mcp_version.js +13 -1
- package/dist/tools/meta_api_docs.js +1 -0
- package/dist/tools/types.d.ts +15 -6
- package/dist/tools/types.js +10 -4
- package/dist/tools/validate_xanoscript.d.ts +14 -0
- package/dist/tools/validate_xanoscript.js +22 -5
- package/dist/tools/xanoscript_docs.d.ts +32 -1
- package/dist/tools/xanoscript_docs.js +69 -5
- package/dist/tools/xanoscript_docs.test.d.ts +1 -0
- package/dist/tools/xanoscript_docs.test.js +197 -0
- package/dist/xanoscript.d.ts +17 -1
- package/dist/xanoscript.js +99 -179
- package/dist/xanoscript.test.js +84 -8
- package/dist/xanoscript_docs/README.md +7 -7
- package/dist/xanoscript_docs/cheatsheet.md +4 -1
- package/dist/xanoscript_docs/database.md +2 -2
- package/dist/xanoscript_docs/docs_index.json +186 -108
- package/dist/xanoscript_docs/essentials.md +665 -0
- package/dist/xanoscript_docs/functions.md +1 -1
- package/dist/xanoscript_docs/middleware.md +5 -18
- package/dist/xanoscript_docs/quickstart.md +15 -6
- package/dist/xanoscript_docs/security.md +18 -43
- package/dist/xanoscript_docs/syntax/array-filters.md +238 -0
- package/dist/xanoscript_docs/syntax/functions.md +136 -0
- package/dist/xanoscript_docs/syntax/string-filters.md +188 -0
- package/dist/xanoscript_docs/syntax.md +92 -900
- package/dist/xanoscript_docs/triggers.md +1 -1
- package/dist/xanoscript_docs/types.md +1 -1
- package/package.json +1 -1
package/dist/xanoscript.test.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { join, dirname } from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
|
-
import { XANOSCRIPT_DOCS_V2, getDocsForFilePath, extractQuickReference, getXanoscriptDocsVersion, readXanoscriptDocsV2, getTopicNames, getTopicDescriptions, } from "./xanoscript.js";
|
|
4
|
+
import { XANOSCRIPT_DOCS_V2, getDocsForFilePath, extractQuickReference, getXanoscriptDocsVersion, readXanoscriptDocsV2, readXanoscriptDocsStructured, getTopicNames, getTopicDescriptions, } from "./xanoscript.js";
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = dirname(__filename);
|
|
7
7
|
const DOCS_PATH = join(__dirname, "xanoscript_docs");
|
|
@@ -10,9 +10,11 @@ describe("xanoscript module", () => {
|
|
|
10
10
|
it("should have all expected topics", () => {
|
|
11
11
|
const expectedTopics = [
|
|
12
12
|
"readme",
|
|
13
|
-
"
|
|
13
|
+
"essentials",
|
|
14
14
|
"syntax",
|
|
15
|
-
"
|
|
15
|
+
"syntax/string-filters",
|
|
16
|
+
"syntax/array-filters",
|
|
17
|
+
"syntax/functions",
|
|
16
18
|
"types",
|
|
17
19
|
"tables",
|
|
18
20
|
"functions",
|
|
@@ -155,10 +157,10 @@ describe("xanoscript module", () => {
|
|
|
155
157
|
const result = getDocsForFilePath("apis/test.xs");
|
|
156
158
|
expect(result).not.toContain("readme");
|
|
157
159
|
});
|
|
158
|
-
it("should include syntax and
|
|
160
|
+
it("should include syntax and essentials for .xs files", () => {
|
|
159
161
|
const result = getDocsForFilePath("some/random/file.xs");
|
|
160
162
|
expect(result).toContain("syntax");
|
|
161
|
-
expect(result).toContain("
|
|
163
|
+
expect(result).toContain("essentials");
|
|
162
164
|
});
|
|
163
165
|
});
|
|
164
166
|
describe("extractQuickReference", () => {
|
|
@@ -296,24 +298,48 @@ Even more content.
|
|
|
296
298
|
it("should support exclude_topics with file_path", () => {
|
|
297
299
|
const result = readXanoscriptDocsV2(DOCS_PATH, {
|
|
298
300
|
file_path: "apis/users/create.xs",
|
|
299
|
-
exclude_topics: ["syntax", "
|
|
301
|
+
exclude_topics: ["syntax", "essentials"],
|
|
300
302
|
});
|
|
301
303
|
expect(result).toContain("Matched topics:");
|
|
302
304
|
expect(result).not.toContain("Matched topics: syntax");
|
|
303
305
|
// Verify excluded topics are not in the matched list
|
|
304
306
|
const matchLine = result.split("\n").find((l) => l.startsWith("Matched topics:"));
|
|
305
307
|
expect(matchLine).not.toContain("syntax");
|
|
306
|
-
expect(matchLine).not.toContain("
|
|
308
|
+
expect(matchLine).not.toContain("essentials");
|
|
307
309
|
});
|
|
308
310
|
it("should throw when all topics are excluded via exclude_topics", () => {
|
|
309
311
|
expect(() => readXanoscriptDocsV2(DOCS_PATH, {
|
|
310
312
|
file_path: "branch.xs",
|
|
311
|
-
exclude_topics: ["syntax", "
|
|
313
|
+
exclude_topics: ["syntax", "essentials", "debugging", "branch"],
|
|
312
314
|
})).toThrow("No documentation found");
|
|
313
315
|
});
|
|
314
316
|
it("should throw for invalid docs path", () => {
|
|
315
317
|
expect(() => readXanoscriptDocsV2("/nonexistent/path", { topic: "syntax" })).toThrow();
|
|
316
318
|
});
|
|
319
|
+
it("should return compact index with mode: index", () => {
|
|
320
|
+
const result = readXanoscriptDocsV2(DOCS_PATH, { mode: "index" });
|
|
321
|
+
expect(result).toContain("# XanoScript Documentation Index");
|
|
322
|
+
expect(result).toContain("Version:");
|
|
323
|
+
expect(result).toContain("Topics:");
|
|
324
|
+
expect(result).toContain("| Topic | Description | Size |");
|
|
325
|
+
// Should contain some known topics
|
|
326
|
+
expect(result).toContain("| syntax |");
|
|
327
|
+
expect(result).toContain("| essentials |");
|
|
328
|
+
expect(result).toContain("| database |");
|
|
329
|
+
// Should contain KB size indicators
|
|
330
|
+
expect(result).toContain("KB |");
|
|
331
|
+
});
|
|
332
|
+
it("should return index mode without requiring topic or file_path", () => {
|
|
333
|
+
const result = readXanoscriptDocsV2(DOCS_PATH, { mode: "index" });
|
|
334
|
+
// Index mode ignores topic/file_path — just returns the listing
|
|
335
|
+
expect(result).toContain("# XanoScript Documentation Index");
|
|
336
|
+
});
|
|
337
|
+
it("should return index that is significantly smaller than full docs", () => {
|
|
338
|
+
const index = readXanoscriptDocsV2(DOCS_PATH, { mode: "index" });
|
|
339
|
+
const full = readXanoscriptDocsV2(DOCS_PATH, { topic: "syntax", mode: "full" });
|
|
340
|
+
// Index should be compact — smaller than even a single full topic
|
|
341
|
+
expect(index.length).toBeLessThan(full.length);
|
|
342
|
+
});
|
|
317
343
|
});
|
|
318
344
|
describe("getTopicNames", () => {
|
|
319
345
|
it("should return all topic names", () => {
|
|
@@ -345,4 +371,54 @@ Even more content.
|
|
|
345
371
|
expect(descriptions).toContain("Expressions, operators");
|
|
346
372
|
});
|
|
347
373
|
});
|
|
374
|
+
describe("readXanoscriptDocsStructured", () => {
|
|
375
|
+
it("should return array of TopicDoc objects", () => {
|
|
376
|
+
const result = readXanoscriptDocsStructured(DOCS_PATH, {
|
|
377
|
+
file_path: "apis/users/create.xs",
|
|
378
|
+
});
|
|
379
|
+
expect(Array.isArray(result)).toBe(true);
|
|
380
|
+
expect(result.length).toBeGreaterThan(0);
|
|
381
|
+
for (const doc of result) {
|
|
382
|
+
expect(doc).toHaveProperty("topic");
|
|
383
|
+
expect(doc).toHaveProperty("content");
|
|
384
|
+
expect(typeof doc.topic).toBe("string");
|
|
385
|
+
expect(typeof doc.content).toBe("string");
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
it("should match the same topics as getDocsForFilePath", () => {
|
|
389
|
+
const filePath = "apis/users/create.xs";
|
|
390
|
+
const expected = getDocsForFilePath(filePath);
|
|
391
|
+
const result = readXanoscriptDocsStructured(DOCS_PATH, { file_path: filePath });
|
|
392
|
+
const resultTopics = result.map((d) => d.topic);
|
|
393
|
+
expect(resultTopics).toEqual(expected);
|
|
394
|
+
});
|
|
395
|
+
it("should respect exclude_topics", () => {
|
|
396
|
+
const result = readXanoscriptDocsStructured(DOCS_PATH, {
|
|
397
|
+
file_path: "apis/users/create.xs",
|
|
398
|
+
exclude_topics: ["syntax", "essentials"],
|
|
399
|
+
});
|
|
400
|
+
const topics = result.map((d) => d.topic);
|
|
401
|
+
expect(topics).not.toContain("syntax");
|
|
402
|
+
expect(topics).not.toContain("essentials");
|
|
403
|
+
});
|
|
404
|
+
it("should throw when all topics are excluded", () => {
|
|
405
|
+
expect(() => readXanoscriptDocsStructured(DOCS_PATH, {
|
|
406
|
+
file_path: "branch.xs",
|
|
407
|
+
exclude_topics: ["syntax", "essentials", "debugging", "branch"],
|
|
408
|
+
})).toThrow("No documentation found");
|
|
409
|
+
});
|
|
410
|
+
it("should use quick_reference mode by default", () => {
|
|
411
|
+
const quickResult = readXanoscriptDocsStructured(DOCS_PATH, {
|
|
412
|
+
file_path: "tables/users.xs",
|
|
413
|
+
});
|
|
414
|
+
const fullResult = readXanoscriptDocsStructured(DOCS_PATH, {
|
|
415
|
+
file_path: "tables/users.xs",
|
|
416
|
+
mode: "full",
|
|
417
|
+
});
|
|
418
|
+
// Quick reference content should be shorter than full
|
|
419
|
+
const quickTotal = quickResult.reduce((sum, d) => sum + d.content.length, 0);
|
|
420
|
+
const fullTotal = fullResult.reduce((sum, d) => sum + d.content.length, 0);
|
|
421
|
+
expect(quickTotal).toBeLessThanOrEqual(fullTotal);
|
|
422
|
+
});
|
|
423
|
+
});
|
|
348
424
|
});
|
|
@@ -111,7 +111,7 @@ $db.table.field // Database field reference (in queries)
|
|
|
111
111
|
$this // Current item in loops/maps
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
**Reserved Variables:** The following cannot be used as variable names: `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`, `$index`.
|
|
114
|
+
**Reserved Variables:** The following cannot be used as variable names: `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`, `$index`. See `xanoscript_docs({ topic: "essentials" })` for detailed variable access rules.
|
|
115
115
|
|
|
116
116
|
### Type Names
|
|
117
117
|
|
|
@@ -162,7 +162,7 @@ This helps AI tools apply the correct documentation based on the file being edit
|
|
|
162
162
|
|
|
163
163
|
For common patterns and quick examples, use:
|
|
164
164
|
```
|
|
165
|
-
xanoscript_docs({ topic: "
|
|
165
|
+
xanoscript_docs({ topic: "essentials" })
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
This includes:
|
|
@@ -182,8 +182,8 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
|
|
|
182
182
|
|
|
183
183
|
| Topic | Description | Key Sections |
|
|
184
184
|
| ------------ | ---------------------------------------------------- | ------------ |
|
|
185
|
-
| `
|
|
186
|
-
| `syntax` | Expressions, operators, filters, system variables | Filters
|
|
185
|
+
| `essentials` | Common patterns, quick examples, mistakes to avoid | Patterns, Common Mistakes |
|
|
186
|
+
| `syntax` | Expressions, operators, filters, system variables | Filters, Error Handling |
|
|
187
187
|
| `types` | Data types, validation, input blocks | Validation Filters, Input Blocks |
|
|
188
188
|
| `functions` | Reusable function stacks, async, loops | Loops, Async Patterns |
|
|
189
189
|
| `schema` | Runtime schema parsing and validation | parse.object, parse.array |
|
|
@@ -193,7 +193,7 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
|
|
|
193
193
|
| Topic | Description | Key Sections |
|
|
194
194
|
| ----------- | ---------------------------------------------------------- | ------------ |
|
|
195
195
|
| `tables` | Database schema definitions with indexes and relationships | Indexes, Foreign Keys |
|
|
196
|
-
| `database` | All db.\* operations: query, get, add, edit, patch, delete | Decision Tree
|
|
196
|
+
| `database` | All db.\* operations: query, get, add, edit, patch, delete | Decision Tree, Bulk Ops |
|
|
197
197
|
| `addons` | Reusable subqueries for fetching related data | Usage Patterns |
|
|
198
198
|
| `streaming` | Streaming data from files, requests, and responses | File Streams, API Streams |
|
|
199
199
|
|
|
@@ -201,7 +201,7 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
|
|
|
201
201
|
|
|
202
202
|
| Topic | Description | Key Sections |
|
|
203
203
|
| ---------- | --------------------------------------------------------------- | ------------ |
|
|
204
|
-
| `apis` | HTTP endpoint definitions with authentication and CRUD patterns | Decision Tree
|
|
204
|
+
| `apis` | HTTP endpoint definitions with authentication and CRUD patterns | Decision Tree, CRUD Examples |
|
|
205
205
|
| `tasks` | Scheduled and cron jobs | Cron Syntax, Input Handling |
|
|
206
206
|
| `triggers` | Event-driven handlers (table, realtime, workspace, agent, MCP) | Predefined Inputs, Event Types |
|
|
207
207
|
| `realtime` | Real-time channels and events for push updates | Channels, Events |
|
|
@@ -287,4 +287,4 @@ function "call_external_api" {
|
|
|
287
287
|
}
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
For more patterns, see `xanoscript_docs({ topic: "
|
|
290
|
+
For more patterns, see `xanoscript_docs({ topic: "essentials" })` or `xanoscript_docs({ topic: "integrations" })`.
|
|
@@ -613,7 +613,7 @@ try_catch {
|
|
|
613
613
|
conditional {
|
|
614
614
|
if ($error.name == "DeadlockError") {
|
|
615
615
|
// Retry logic
|
|
616
|
-
util.sleep { value =
|
|
616
|
+
util.sleep { value = 1 } // value = seconds
|
|
617
617
|
function.run "retry_transaction" { input = $input }
|
|
618
618
|
}
|
|
619
619
|
else {
|
|
@@ -646,6 +646,6 @@ Explore more with `xanoscript_docs({ topic: "<topic>" })`:
|
|
|
646
646
|
|-------|-------------|
|
|
647
647
|
| `tables` | Database schema definitions with indexes and relationships |
|
|
648
648
|
| `syntax` | Query filters, operators, and expressions |
|
|
649
|
-
| `
|
|
649
|
+
| `essentials` | Common CRUD patterns and examples |
|
|
650
650
|
| `addons` | Reusable subqueries for fetching related data |
|
|
651
651
|
| `performance` | Query optimization best practices |
|
|
@@ -3,145 +3,225 @@
|
|
|
3
3
|
"description": "Machine-readable index for XanoScript documentation",
|
|
4
4
|
|
|
5
5
|
"topics": {
|
|
6
|
-
"
|
|
7
|
-
"file": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"aliases": ["
|
|
6
|
+
"readme": {
|
|
7
|
+
"file": "README.md",
|
|
8
|
+
"description": "XanoScript overview, workspace structure, and quick reference",
|
|
9
|
+
"applyTo": [],
|
|
10
|
+
"aliases": ["overview", "intro", "index"]
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
"file": "
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"essentials": {
|
|
13
|
+
"file": "essentials.md",
|
|
14
|
+
"description": "Common patterns, quick reference, and common mistakes to avoid",
|
|
15
|
+
"applyTo": ["**/*.xs"],
|
|
16
|
+
"priority": 1,
|
|
17
|
+
"aliases": ["quick", "common", "basics", "start", "cheatsheet", "quickstart", "patterns", "mistakes"]
|
|
17
18
|
},
|
|
18
19
|
"syntax": {
|
|
19
20
|
"file": "syntax.md",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
21
|
+
"description": "Expressions, operators, and filters for all XanoScript code",
|
|
22
|
+
"applyTo": ["**/*.xs"],
|
|
23
|
+
"priority": 2,
|
|
22
24
|
"aliases": ["filters", "operators", "expressions"]
|
|
23
25
|
},
|
|
26
|
+
"syntax/string-filters": {
|
|
27
|
+
"file": "syntax/string-filters.md",
|
|
28
|
+
"description": "String filters, regex, encoding, security filters, text functions",
|
|
29
|
+
"applyTo": [],
|
|
30
|
+
"aliases": ["string", "regex", "encoding", "security-filters"]
|
|
31
|
+
},
|
|
32
|
+
"syntax/array-filters": {
|
|
33
|
+
"file": "syntax/array-filters.md",
|
|
34
|
+
"description": "Array filters, functional operations, and array functions",
|
|
35
|
+
"applyTo": [],
|
|
36
|
+
"aliases": ["array", "map", "filter", "reduce", "sort"]
|
|
37
|
+
},
|
|
38
|
+
"syntax/functions": {
|
|
39
|
+
"file": "syntax/functions.md",
|
|
40
|
+
"description": "Math filters/functions, object functions, bitwise operations",
|
|
41
|
+
"applyTo": [],
|
|
42
|
+
"aliases": ["math", "object", "bitwise"]
|
|
43
|
+
},
|
|
24
44
|
"types": {
|
|
25
45
|
"file": "types.md",
|
|
26
|
-
"
|
|
46
|
+
"description": "Data types, input blocks, and validation",
|
|
47
|
+
"applyTo": ["functions/**/*.xs", "apis/**/*.xs", "tools/**/*.xs", "agents/**/*.xs"],
|
|
27
48
|
"priority": 4,
|
|
28
49
|
"aliases": ["validation", "input", "data-types"]
|
|
29
50
|
},
|
|
30
|
-
"database": {
|
|
31
|
-
"file": "database.md",
|
|
32
|
-
"purpose": "All db.* operations",
|
|
33
|
-
"priority": 5,
|
|
34
|
-
"aliases": ["db", "crud", "query", "sql"]
|
|
35
|
-
},
|
|
36
51
|
"tables": {
|
|
37
52
|
"file": "tables.md",
|
|
38
|
-
"
|
|
53
|
+
"description": "Database schema definitions with indexes and relationships",
|
|
54
|
+
"applyTo": ["tables/*.xs"],
|
|
39
55
|
"aliases": ["schema", "fields", "indexes"]
|
|
40
56
|
},
|
|
57
|
+
"functions": {
|
|
58
|
+
"file": "functions.md",
|
|
59
|
+
"description": "Reusable function stacks with inputs and responses",
|
|
60
|
+
"applyTo": ["functions/**/*.xs"],
|
|
61
|
+
"aliases": ["fn", "reusable", "stack"]
|
|
62
|
+
},
|
|
41
63
|
"apis": {
|
|
42
64
|
"file": "apis.md",
|
|
43
|
-
"
|
|
65
|
+
"description": "HTTP endpoint definitions with authentication and CRUD patterns",
|
|
66
|
+
"applyTo": ["apis/**/*.xs"],
|
|
44
67
|
"aliases": ["endpoints", "http", "rest", "query"]
|
|
45
68
|
},
|
|
46
|
-
"
|
|
47
|
-
"file": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
69
|
+
"tasks": {
|
|
70
|
+
"file": "tasks.md",
|
|
71
|
+
"description": "Scheduled and cron jobs",
|
|
72
|
+
"applyTo": ["tasks/*.xs"],
|
|
73
|
+
"aliases": ["scheduled", "jobs", "cron"]
|
|
50
74
|
},
|
|
51
75
|
"triggers": {
|
|
52
76
|
"file": "triggers.md",
|
|
53
|
-
"
|
|
77
|
+
"description": "Event-driven handlers (table, realtime, workspace, agent, MCP)",
|
|
78
|
+
"applyTo": ["triggers/**/*.xs"],
|
|
54
79
|
"aliases": ["events", "hooks", "handlers"]
|
|
55
80
|
},
|
|
81
|
+
"database": {
|
|
82
|
+
"file": "database.md",
|
|
83
|
+
"description": "All db.* operations: query, get, add, edit, patch, delete",
|
|
84
|
+
"applyTo": ["functions/**/*.xs", "apis/**/*.xs", "tasks/*.xs", "tools/**/*.xs"],
|
|
85
|
+
"priority": 5,
|
|
86
|
+
"aliases": ["db", "crud", "query", "sql"]
|
|
87
|
+
},
|
|
56
88
|
"agents": {
|
|
57
89
|
"file": "agents.md",
|
|
58
|
-
"
|
|
90
|
+
"description": "AI agent configuration with LLM providers and tools",
|
|
91
|
+
"applyTo": ["agents/**/*.xs"],
|
|
59
92
|
"aliases": ["ai", "llm", "chatbot"]
|
|
60
93
|
},
|
|
61
94
|
"tools": {
|
|
62
95
|
"file": "tools.md",
|
|
63
|
-
"
|
|
96
|
+
"description": "AI tools for agents and MCP servers",
|
|
97
|
+
"applyTo": ["tools/**/*.xs"],
|
|
64
98
|
"aliases": ["ai-tools", "agent-tools"]
|
|
65
99
|
},
|
|
100
|
+
"mcp-servers": {
|
|
101
|
+
"file": "mcp-servers.md",
|
|
102
|
+
"description": "MCP server definitions exposing tools",
|
|
103
|
+
"applyTo": ["mcp_servers/**/*.xs"],
|
|
104
|
+
"aliases": ["mcp", "model-context-protocol"]
|
|
105
|
+
},
|
|
106
|
+
"unit-testing": {
|
|
107
|
+
"file": "unit-testing.md",
|
|
108
|
+
"description": "Unit tests, mocks, and assertions within functions, APIs, and middleware",
|
|
109
|
+
"applyTo": ["functions/**/*.xs", "apis/**/*.xs", "middleware/**/*.xs"],
|
|
110
|
+
"aliases": ["tests", "unit-tests", "mocks", "assertions"]
|
|
111
|
+
},
|
|
112
|
+
"workflow-tests": {
|
|
113
|
+
"file": "workflow-tests.md",
|
|
114
|
+
"description": "End-to-end workflow tests with data source selection and tags",
|
|
115
|
+
"applyTo": ["workflow_test/**/*.xs"],
|
|
116
|
+
"aliases": ["e2e", "workflow", "integration-tests"]
|
|
117
|
+
},
|
|
66
118
|
"integrations": {
|
|
67
119
|
"file": "integrations.md",
|
|
68
|
-
"
|
|
120
|
+
"description": "External service integrations index - see sub-topics for details",
|
|
121
|
+
"applyTo": [],
|
|
69
122
|
"aliases": ["external", "services", "cloud"]
|
|
70
123
|
},
|
|
71
124
|
"integrations/cloud-storage": {
|
|
72
125
|
"file": "integrations/cloud-storage.md",
|
|
73
|
-
"
|
|
126
|
+
"description": "AWS S3, Azure Blob, and GCP Storage operations",
|
|
127
|
+
"applyTo": [],
|
|
74
128
|
"aliases": ["s3", "azure", "gcp", "files", "upload"]
|
|
75
129
|
},
|
|
76
130
|
"integrations/search": {
|
|
77
131
|
"file": "integrations/search.md",
|
|
78
|
-
"
|
|
132
|
+
"description": "Elasticsearch, OpenSearch, and Algolia search operations",
|
|
133
|
+
"applyTo": [],
|
|
79
134
|
"aliases": ["elasticsearch", "algolia", "full-text"]
|
|
80
135
|
},
|
|
81
136
|
"integrations/redis": {
|
|
82
137
|
"file": "integrations/redis.md",
|
|
83
|
-
"
|
|
138
|
+
"description": "Redis caching, rate limiting, and queue operations",
|
|
139
|
+
"applyTo": [],
|
|
84
140
|
"aliases": ["cache", "rate-limit", "queue"]
|
|
85
141
|
},
|
|
86
142
|
"integrations/external-apis": {
|
|
87
143
|
"file": "integrations/external-apis.md",
|
|
88
|
-
"
|
|
144
|
+
"description": "HTTP requests with api.request patterns",
|
|
145
|
+
"applyTo": [],
|
|
89
146
|
"aliases": ["http", "api", "request", "fetch"]
|
|
90
147
|
},
|
|
91
148
|
"integrations/utilities": {
|
|
92
149
|
"file": "integrations/utilities.md",
|
|
93
|
-
"
|
|
150
|
+
"description": "Local storage, email, zip, and Lambda utilities",
|
|
151
|
+
"applyTo": [],
|
|
94
152
|
"aliases": ["email", "zip", "lambda", "archive"]
|
|
95
153
|
},
|
|
96
|
-
"
|
|
97
|
-
"file": "
|
|
98
|
-
"
|
|
99
|
-
"
|
|
154
|
+
"frontend": {
|
|
155
|
+
"file": "frontend.md",
|
|
156
|
+
"description": "Static frontend development and deployment",
|
|
157
|
+
"applyTo": ["static/**/*"],
|
|
158
|
+
"aliases": ["static", "html", "css", "web"]
|
|
159
|
+
},
|
|
160
|
+
"run": {
|
|
161
|
+
"file": "run.md",
|
|
162
|
+
"description": "Run job and service configurations for the Xano Job Runner",
|
|
163
|
+
"applyTo": ["run/**/*.xs"],
|
|
164
|
+
"aliases": ["jobs", "runner", "services"]
|
|
165
|
+
},
|
|
166
|
+
"addons": {
|
|
167
|
+
"file": "addons.md",
|
|
168
|
+
"description": "Reusable subqueries for fetching related data",
|
|
169
|
+
"applyTo": ["addons/*.xs"],
|
|
170
|
+
"aliases": ["subqueries", "relations"]
|
|
171
|
+
},
|
|
172
|
+
"debugging": {
|
|
173
|
+
"file": "debugging.md",
|
|
174
|
+
"description": "Logging, inspecting, and debugging XanoScript execution",
|
|
175
|
+
"applyTo": ["**/*.xs"],
|
|
176
|
+
"aliases": ["logs", "debug", "trace"]
|
|
100
177
|
},
|
|
101
178
|
"performance": {
|
|
102
179
|
"file": "performance.md",
|
|
103
|
-
"
|
|
180
|
+
"description": "Performance optimization best practices",
|
|
181
|
+
"applyTo": ["functions/**/*.xs", "apis/**/*.xs"],
|
|
104
182
|
"aliases": ["optimization", "speed", "caching"]
|
|
105
183
|
},
|
|
106
|
-
"
|
|
107
|
-
"file": "
|
|
108
|
-
"
|
|
109
|
-
"
|
|
184
|
+
"realtime": {
|
|
185
|
+
"file": "realtime.md",
|
|
186
|
+
"description": "Real-time channels and events for push updates",
|
|
187
|
+
"applyTo": ["triggers/**/*.xs"],
|
|
188
|
+
"aliases": ["websocket", "channels", "pubsub"]
|
|
110
189
|
},
|
|
111
|
-
"
|
|
112
|
-
"file": "
|
|
113
|
-
"
|
|
114
|
-
"
|
|
190
|
+
"schema": {
|
|
191
|
+
"file": "schema.md",
|
|
192
|
+
"description": "Runtime schema parsing and validation",
|
|
193
|
+
"applyTo": [],
|
|
194
|
+
"aliases": ["runtime-schema", "parsing"]
|
|
195
|
+
},
|
|
196
|
+
"security": {
|
|
197
|
+
"file": "security.md",
|
|
198
|
+
"description": "Security best practices for authentication and authorization",
|
|
199
|
+
"applyTo": ["functions/**/*.xs", "apis/**/*.xs"],
|
|
200
|
+
"aliases": ["auth", "authorization", "permissions"]
|
|
115
201
|
},
|
|
116
202
|
"streaming": {
|
|
117
203
|
"file": "streaming.md",
|
|
118
|
-
"
|
|
204
|
+
"description": "Streaming data from files, requests, and responses",
|
|
205
|
+
"applyTo": [],
|
|
119
206
|
"aliases": ["stream", "large-files"]
|
|
120
207
|
},
|
|
121
|
-
"realtime": {
|
|
122
|
-
"file": "realtime.md",
|
|
123
|
-
"purpose": "Real-time channel configuration",
|
|
124
|
-
"aliases": ["websocket", "channels", "pubsub"]
|
|
125
|
-
},
|
|
126
208
|
"middleware": {
|
|
127
209
|
"file": "middleware.md",
|
|
128
|
-
"
|
|
210
|
+
"description": "Request/response interceptors for functions, queries, tasks, and tools",
|
|
211
|
+
"applyTo": ["middleware/**/*.xs"],
|
|
129
212
|
"aliases": ["interceptors", "hooks"]
|
|
130
213
|
},
|
|
131
|
-
"
|
|
132
|
-
"file": "
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
"workflow-tests": {
|
|
137
|
-
"file": "workflow-tests.md",
|
|
138
|
-
"purpose": "End-to-end workflow tests",
|
|
139
|
-
"aliases": ["e2e", "workflow", "integration-tests"]
|
|
214
|
+
"branch": {
|
|
215
|
+
"file": "branch.md",
|
|
216
|
+
"description": "Branch-level settings: middleware, history retention, visual styling",
|
|
217
|
+
"applyTo": ["branch.xs"],
|
|
218
|
+
"aliases": ["settings", "config"]
|
|
140
219
|
},
|
|
141
|
-
"
|
|
142
|
-
"file": "
|
|
143
|
-
"
|
|
144
|
-
"
|
|
220
|
+
"workspace": {
|
|
221
|
+
"file": "workspace.md",
|
|
222
|
+
"description": "Workspace-level settings: environment variables, preferences, realtime",
|
|
223
|
+
"applyTo": ["workspace/**/*.xs"],
|
|
224
|
+
"aliases": ["env", "environment", "preferences"]
|
|
145
225
|
}
|
|
146
226
|
},
|
|
147
227
|
|
|
@@ -220,46 +300,44 @@
|
|
|
220
300
|
"function.run": { "file": "functions.md" },
|
|
221
301
|
"redis.get": { "file": "integrations/redis.md" },
|
|
222
302
|
"redis.set": { "file": "integrations/redis.md" },
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"array.
|
|
226
|
-
"array.
|
|
227
|
-
"array.
|
|
228
|
-
"array.
|
|
229
|
-
"array.
|
|
230
|
-
"array.
|
|
231
|
-
"array.
|
|
232
|
-
"array.
|
|
233
|
-
"array.
|
|
234
|
-
"array.
|
|
235
|
-
"array.
|
|
236
|
-
"array.
|
|
237
|
-
"array.
|
|
238
|
-
"array.
|
|
239
|
-
"array.
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"text.
|
|
243
|
-
"text.
|
|
244
|
-
"text.
|
|
245
|
-
"text.
|
|
246
|
-
"text.
|
|
247
|
-
"text.
|
|
248
|
-
"text.
|
|
249
|
-
"text.
|
|
250
|
-
"text.
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"math.
|
|
254
|
-
"math.
|
|
255
|
-
"math.
|
|
256
|
-
"math.
|
|
257
|
-
"math.bitwise.
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"object.
|
|
261
|
-
"object.values": { "file": "syntax.md" },
|
|
262
|
-
"object.entries": { "file": "syntax.md" },
|
|
303
|
+
"array.push": { "file": "syntax/array-filters.md" },
|
|
304
|
+
"array.pop": { "file": "syntax/array-filters.md" },
|
|
305
|
+
"array.shift": { "file": "syntax/array-filters.md" },
|
|
306
|
+
"array.unshift": { "file": "syntax/array-filters.md" },
|
|
307
|
+
"array.merge": { "file": "syntax/array-filters.md" },
|
|
308
|
+
"array.find": { "file": "syntax/array-filters.md" },
|
|
309
|
+
"array.find_index": { "file": "syntax/array-filters.md" },
|
|
310
|
+
"array.has": { "file": "syntax/array-filters.md" },
|
|
311
|
+
"array.every": { "file": "syntax/array-filters.md" },
|
|
312
|
+
"array.filter": { "file": "syntax/array-filters.md" },
|
|
313
|
+
"array.filter_count": { "file": "syntax/array-filters.md" },
|
|
314
|
+
"array.map": { "file": "syntax/array-filters.md" },
|
|
315
|
+
"array.partition": { "file": "syntax/array-filters.md" },
|
|
316
|
+
"array.group_by": { "file": "syntax/array-filters.md" },
|
|
317
|
+
"array.union": { "file": "syntax/array-filters.md" },
|
|
318
|
+
"array.difference": { "file": "syntax/array-filters.md" },
|
|
319
|
+
"array.intersection": { "file": "syntax/array-filters.md" },
|
|
320
|
+
"text.contains": { "file": "syntax/string-filters.md" },
|
|
321
|
+
"text.icontains": { "file": "syntax/string-filters.md" },
|
|
322
|
+
"text.starts_with": { "file": "syntax/string-filters.md" },
|
|
323
|
+
"text.istarts_with": { "file": "syntax/string-filters.md" },
|
|
324
|
+
"text.ends_with": { "file": "syntax/string-filters.md" },
|
|
325
|
+
"text.iends_with": { "file": "syntax/string-filters.md" },
|
|
326
|
+
"text.trim": { "file": "syntax/string-filters.md" },
|
|
327
|
+
"text.ltrim": { "file": "syntax/string-filters.md" },
|
|
328
|
+
"text.rtrim": { "file": "syntax/string-filters.md" },
|
|
329
|
+
"text.append": { "file": "syntax/string-filters.md" },
|
|
330
|
+
"text.prepend": { "file": "syntax/string-filters.md" },
|
|
331
|
+
"math.add": { "file": "syntax/functions.md" },
|
|
332
|
+
"math.sub": { "file": "syntax/functions.md" },
|
|
333
|
+
"math.mul": { "file": "syntax/functions.md" },
|
|
334
|
+
"math.div": { "file": "syntax/functions.md" },
|
|
335
|
+
"math.bitwise.and": { "file": "syntax/functions.md" },
|
|
336
|
+
"math.bitwise.or": { "file": "syntax/functions.md" },
|
|
337
|
+
"math.bitwise.xor": { "file": "syntax/functions.md" },
|
|
338
|
+
"object.keys": { "file": "syntax/functions.md" },
|
|
339
|
+
"object.values": { "file": "syntax/functions.md" },
|
|
340
|
+
"object.entries": { "file": "syntax/functions.md" },
|
|
263
341
|
"redis.remove": { "file": "integrations/redis.md" },
|
|
264
342
|
"redis.keys": { "file": "integrations/redis.md" },
|
|
265
343
|
"security.jwe_encode": { "file": "security.md" },
|
|
@@ -297,7 +375,7 @@
|
|
|
297
375
|
"authentication": ["security.md", "apis.md"],
|
|
298
376
|
"authorization": ["security.md"],
|
|
299
377
|
"rate_limiting": ["security.md", "integrations/redis.md"],
|
|
300
|
-
"error_handling": ["syntax.md", "
|
|
378
|
+
"error_handling": ["syntax.md", "essentials.md"],
|
|
301
379
|
"pagination": ["database.md", "apis.md"],
|
|
302
380
|
"file_upload": ["integrations/cloud-storage.md", "streaming.md"],
|
|
303
381
|
"caching": ["performance.md", "integrations/redis.md"],
|