@20baht/cli 0.1.1 → 0.2.0
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/dist/domain/form-dsl.js +5 -21
- package/package.json +2 -2
- package/templates/angular/apps/shell/package.json +3 -3
- package/templates/angular/package.json.hbs +1 -1
- package/templates/create/apps/web/package.json.hbs +1 -1
- package/templates/new/package.json.hbs +1 -1
- package/templates/remote/package.json.hbs +3 -3
package/dist/domain/form-dsl.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseSchema } from '@20baht/validator';
|
|
1
|
+
import { BUILT_IN_FIELD_TYPES, parseSchema } from '@20baht/validator';
|
|
2
2
|
/**
|
|
3
3
|
* Compact field DSL for `bahtui g form` (spec 04-adjacent, PRD P3):
|
|
4
4
|
*
|
|
@@ -10,26 +10,10 @@ import { parseSchema } from '@20baht/validator';
|
|
|
10
10
|
* The result is engine-validated (parseSchema) BEFORE any file is written —
|
|
11
11
|
* an invalid spec exits 1 with zero files (the P1 guarantee, kept).
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'number',
|
|
18
|
-
'currency',
|
|
19
|
-
'email',
|
|
20
|
-
'password',
|
|
21
|
-
'dropdown',
|
|
22
|
-
'multiselect',
|
|
23
|
-
'checkbox',
|
|
24
|
-
'radio',
|
|
25
|
-
'toggle',
|
|
26
|
-
'date',
|
|
27
|
-
'file',
|
|
28
|
-
'rating',
|
|
29
|
-
'range',
|
|
30
|
-
'reference',
|
|
31
|
-
'tags',
|
|
32
|
-
]);
|
|
13
|
+
/** Types the DSL has no way to fill in: a static block needs its text, a repeater its columns. */
|
|
14
|
+
const NOT_IN_DSL = new Set(['label', 'section', 'repeater']);
|
|
15
|
+
/** Every other built-in type, read from the engine's list so a new one is offered here too. */
|
|
16
|
+
const FIELD_TYPES = new Set(BUILT_IN_FIELD_TYPES.filter((type) => !NOT_IN_DSL.has(type)));
|
|
33
17
|
const KEY_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
34
18
|
const titleCase = (key) => key
|
|
35
19
|
.split('_')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20baht/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Scaffold bun workspaces (bahtui new) and DDD monorepos (React + Elysia + Eden, bahtui create) plus bahtui generators.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"accept:angular": "bun scripts/accept-angular.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@20baht/validator": ">=0.
|
|
48
|
+
"@20baht/validator": ">=0.2.0 <0.3.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@angular/core": "^22.2.0",
|
|
20
20
|
"@angular/platform-browser": "^22.2.0",
|
|
21
21
|
"@angular/router": "^22.2.0",
|
|
22
|
-
"@20baht/engine": "0.
|
|
23
|
-
"@20baht/ui": "0.
|
|
24
|
-
"@20baht/angular": "0.
|
|
22
|
+
"@20baht/engine": "0.2.0",
|
|
23
|
+
"@20baht/ui": "0.2.0",
|
|
24
|
+
"@20baht/angular": "0.2.0",
|
|
25
25
|
"dompurify": "3.4.17",
|
|
26
26
|
"es-module-shims": "^2.8.0",
|
|
27
27
|
"flatpickr": "4.6.13",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@angular/core": "^22.2.0",
|
|
18
18
|
"@angular/platform-browser": "^22.2.0",
|
|
19
19
|
"@angular/router": "^22.2.0",
|
|
20
|
-
"@20baht/engine": "0.
|
|
21
|
-
"@20baht/ui": "0.
|
|
22
|
-
"@20baht/angular": "0.
|
|
20
|
+
"@20baht/engine": "0.2.0",
|
|
21
|
+
"@20baht/ui": "0.2.0",
|
|
22
|
+
"@20baht/angular": "0.2.0",
|
|
23
23
|
"dompurify": "3.4.17",
|
|
24
24
|
"es-module-shims": "^2.8.0",
|
|
25
25
|
"flatpickr": "4.6.13",
|