Skip to content

Commit 2214795

Browse files
committed
Update docs metadata and improve schema build scripts
Standardize titles in meta.json files, update references/meta.json to include new pages, and reorganize ZOD_FILE_TITLES for consistency. The build-schemas script now cleans the output directory before generating new schemas to prevent stale files.
1 parent 9e7124e commit 2214795

File tree

6 files changed

+49
-42
lines changed

6 files changed

+49
-42
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"title": "Drivers"
2+
"title": "Driver Interface"
33
}

content/docs/references/meta.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
"pages": [
55
"data",
66
"ui",
7+
"automation",
78
"system",
9+
"permission",
810
"ai",
911
"api",
10-
"misc"
12+
"driver",
13+
"integration"
1114
]
1215
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"title": "Audit"
2+
"title": "Audit Logs"
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"title": "Licenses"
2+
"title": "License"
33
}

packages/spec/scripts/build-docs.ts

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const ZOD_FILE_TITLES: Record<string, string> = {
2323
// Data
2424
'object': 'Objects',
2525
'field': 'Fields',
26-
'mapping': 'Mappings',
27-
'filter': 'Filters',
28-
'query': 'Queries',
2926
'dataset': 'Datasets',
3027
'hook': 'Hooks',
3128
'validation': 'Validation',
29+
'mapping': 'Mappings',
30+
'filter': 'Filters',
31+
'query': 'Queries',
3232

3333
// Automation
3434
'flow': 'Flows',
@@ -39,56 +39,51 @@ const ZOD_FILE_TITLES: Record<string, string> = {
3939
'sharing': 'Sharing Rules',
4040
'role': 'Roles',
4141
'policy': 'Policies',
42+
'auth': 'Authentication',
43+
'identity': 'Identity',
4244

4345
// System
4446
'manifest': 'Manifest',
4547
'plugin': 'Plugins',
4648
'license': 'License',
4749
'audit': 'Audit Logs',
48-
49-
// Driver
50-
'driver': 'Driver Interface',
51-
// AI
52-
'agent': 'Agents',
53-
'conversation': 'Conversations',
54-
'cost': 'Cost Management',
55-
'model-registry': 'Model Registry',
56-
'nlq': 'Natural Language Query',
57-
'predictive': 'Predictive Models',
58-
'rag-pipeline': 'RAG Pipelines',
59-
'workflow-automation': 'Workflow Automation',
60-
// UI
61-
'app': 'Applications',
62-
'view': 'Views',
63-
'action': 'Actions',
64-
'dashboard': 'Dashboards',
65-
'report': 'Reports',
66-
'page': 'Pages',
67-
'theme': 'Themes',
68-
'widget': 'Widgets',
69-
// System
70-
'manifest': 'Manifest',
7150
'datasource': 'Datasources',
72-
'driver': 'Drivers',
73-
'auth': 'Authentication',
74-
'identity': 'Identity',
75-
'role': 'Roles',
76-
'policy': 'Policies',
7751
'organization': 'Organizations',
7852
'tenant': 'Tenants',
7953
'webhook': 'Webhooks',
8054
'events': 'Events',
8155
'job': 'Jobs',
82-
'realtime': 'Real-time Communication',
8356
'discovery': 'Service Discovery',
84-
'plugin': 'Plugins',
8557
'translation': 'Translations',
86-
'audit': 'Audit',
8758
'territory': 'Territories',
88-
'license': 'Licenses',
89-
'plan': 'Plans',
59+
'plan': 'Subscription Plans',
60+
61+
// UI
62+
'app': 'Applications',
63+
'view': 'Views',
64+
'action': 'Actions',
65+
'dashboard': 'Dashboards',
66+
'report': 'Reports',
67+
'page': 'Pages',
68+
'theme': 'Themes',
69+
'widget': 'Widgets',
70+
71+
// AI
72+
'agent': 'Agents',
73+
'conversation': 'Conversations',
74+
'cost': 'Cost Management',
75+
'model-registry': 'Model Registry',
76+
'nlq': 'Natural Language Query',
77+
'predictive': 'Predictive Models',
78+
'rag-pipeline': 'RAG Pipelines',
79+
'workflow-automation': 'Workflow Automation',
80+
81+
// Driver
82+
'driver': 'Driver Interface',
83+
9084
// API
91-
'contract': 'API Contracts'
85+
'contract': 'API Contracts',
86+
'realtime': 'Real-time Communication'
9287
};
9388

9489
// Map SchemaName -> Category (e.g. 'Object' -> 'data')
@@ -307,10 +302,13 @@ const rootMetaProps = {
307302
pages: [
308303
"data",
309304
"ui",
305+
"automation",
310306
"system",
307+
"permission",
311308
"ai",
312309
"api",
313-
"misc"
310+
"driver",
311+
"integration"
314312
]
315313
};
316314
fs.writeFileSync(path.join(DOCS_ROOT, 'meta.json'), JSON.stringify(rootMetaProps, null, 2));

packages/spec/scripts/build-schemas.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import * as Protocol from '../src/index';
66

77
const OUT_DIR = path.resolve(__dirname, '../json-schema');
88

9+
// Clean output directory ensures no stale files remain
10+
if (fs.existsSync(OUT_DIR)) {
11+
console.log(`Cleaning output directory: ${OUT_DIR}`);
12+
fs.rmSync(OUT_DIR, { recursive: true, force: true });
13+
}
14+
915
// Ensure output directory exists
1016
if (!fs.existsSync(OUT_DIR)) {
1117
fs.mkdirSync(OUT_DIR, { recursive: true });

0 commit comments

Comments
 (0)