@teleporthq/teleport-uidl-validator 0.43.0-alpha.0 → 0.43.3

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 (57) hide show
  1. package/__tests__/decoder/index.ts +121 -0
  2. package/__tests__/parser/compoenent-with-state-reference.json +110 -0
  3. package/__tests__/parser/component-parsing.ts +13 -1
  4. package/__tests__/validator/index.ts +17 -24
  5. package/__tests__/validator/project-sample.json +15 -0
  6. package/dist/cjs/decoders/component-decoder.js +3 -3
  7. package/dist/cjs/decoders/component-decoder.js.map +1 -1
  8. package/dist/cjs/decoders/custom-combinators.d.ts +5 -8
  9. package/dist/cjs/decoders/custom-combinators.d.ts.map +1 -1
  10. package/dist/cjs/decoders/custom-combinators.js +42 -60
  11. package/dist/cjs/decoders/custom-combinators.js.map +1 -1
  12. package/dist/cjs/decoders/project-decoder.d.ts.map +1 -1
  13. package/dist/cjs/decoders/project-decoder.js +24 -0
  14. package/dist/cjs/decoders/project-decoder.js.map +1 -1
  15. package/dist/cjs/decoders/utils.d.ts +142 -5
  16. package/dist/cjs/decoders/utils.d.ts.map +1 -1
  17. package/dist/cjs/decoders/utils.js +400 -46
  18. package/dist/cjs/decoders/utils.js.map +1 -1
  19. package/dist/cjs/parser/index.d.ts.map +1 -1
  20. package/dist/cjs/parser/index.js +230 -23
  21. package/dist/cjs/parser/index.js.map +1 -1
  22. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  23. package/dist/cjs/validator/index.d.ts.map +1 -1
  24. package/dist/cjs/validator/index.js.map +1 -1
  25. package/dist/cjs/validator/utils.d.ts.map +1 -1
  26. package/dist/cjs/validator/utils.js +29 -21
  27. package/dist/cjs/validator/utils.js.map +1 -1
  28. package/dist/esm/decoders/component-decoder.js +3 -3
  29. package/dist/esm/decoders/component-decoder.js.map +1 -1
  30. package/dist/esm/decoders/custom-combinators.d.ts +5 -8
  31. package/dist/esm/decoders/custom-combinators.d.ts.map +1 -1
  32. package/dist/esm/decoders/custom-combinators.js +38 -60
  33. package/dist/esm/decoders/custom-combinators.js.map +1 -1
  34. package/dist/esm/decoders/project-decoder.d.ts.map +1 -1
  35. package/dist/esm/decoders/project-decoder.js +26 -2
  36. package/dist/esm/decoders/project-decoder.js.map +1 -1
  37. package/dist/esm/decoders/utils.d.ts +142 -5
  38. package/dist/esm/decoders/utils.d.ts.map +1 -1
  39. package/dist/esm/decoders/utils.js +400 -46
  40. package/dist/esm/decoders/utils.js.map +1 -1
  41. package/dist/esm/parser/index.d.ts.map +1 -1
  42. package/dist/esm/parser/index.js +230 -23
  43. package/dist/esm/parser/index.js.map +1 -1
  44. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  45. package/dist/esm/validator/index.d.ts.map +1 -1
  46. package/dist/esm/validator/index.js.map +1 -1
  47. package/dist/esm/validator/utils.d.ts.map +1 -1
  48. package/dist/esm/validator/utils.js +30 -22
  49. package/dist/esm/validator/utils.js.map +1 -1
  50. package/package.json +4 -4
  51. package/src/decoders/component-decoder.ts +3 -3
  52. package/src/decoders/custom-combinators.ts +33 -51
  53. package/src/decoders/project-decoder.ts +35 -1
  54. package/src/decoders/utils.ts +570 -60
  55. package/src/parser/index.ts +310 -24
  56. package/src/validator/index.ts +1 -0
  57. package/src/validator/utils.ts +50 -25
@@ -0,0 +1,121 @@
1
+ import { UIDLConditionalNode, UIDLStateDefinition } from '@teleporthq/teleport-types'
2
+ import { conditionalNodeDecoder, stateDefinitionsDecoder } from '../../src/decoders/utils'
3
+
4
+ test('decode conditional nodes properly when using dynamic and expression reference', () => {
5
+ const node: UIDLConditionalNode = {
6
+ type: 'conditional',
7
+ content: {
8
+ node: {
9
+ type: 'element',
10
+ content: {
11
+ elementType: 'cms-navigation-button',
12
+ semanticType: 'div',
13
+ name: 'Previous',
14
+ referencedStyles: {
15
+ TQ_Cami9r8BH2: {
16
+ type: 'style-map',
17
+ content: {
18
+ mapType: 'project-referenced',
19
+ referenceId: 'button',
20
+ },
21
+ },
22
+ },
23
+ abilities: {
24
+ link: {
25
+ type: 'navlink',
26
+ content: {
27
+ routeName: {
28
+ type: 'expr',
29
+ content:
30
+ // tslint:disable no-invalid-template-strings
31
+ "`?${new URLSearchParams({...router.query, ['cPage-5iuksa']: parseInt(router.query['cPage-5iuksa']) - 1 || 1})}`",
32
+ },
33
+ },
34
+ },
35
+ },
36
+ style: {
37
+ display: {
38
+ type: 'static',
39
+ content: 'flex',
40
+ },
41
+ },
42
+ children: [
43
+ {
44
+ type: 'element',
45
+ content: {
46
+ elementType: 'text',
47
+ referencedStyles: {},
48
+ abilities: {},
49
+ children: [
50
+ {
51
+ type: 'static',
52
+ content: 'Previous',
53
+ },
54
+ ],
55
+ },
56
+ },
57
+ ],
58
+ },
59
+ },
60
+ reference: {
61
+ type: 'expr',
62
+ content: 'params?.meta?.pagination.hasPrevPage',
63
+ },
64
+ value: true,
65
+ },
66
+ }
67
+
68
+ const result = conditionalNodeDecoder.run(node)
69
+ expect(result.ok).toBeTruthy()
70
+ })
71
+
72
+ // Regression guard for the admin-panel deep-link feature: state definitions
73
+ // declared with `urlSearchParamBinding` must survive `validateProjectSchema`
74
+ // — otherwise `createStateHookAST` never sees the binding and the generated
75
+ // `useState(...)` call silently falls back to the static default, leaving
76
+ // detail panels unable to auto-open from URLs like
77
+ // `/admin/products?products_detail_panel_item_id=<id>`. The json-type-validation
78
+ // `object(...)` decoder is strict and drops any unlisted key, so adding
79
+ // `urlSearchParamBinding` to the type without also adding it to the decoder
80
+ // would produce exactly this silent-stripping bug.
81
+ test('stateDefinitionsDecoder preserves urlSearchParamBinding round-trip', () => {
82
+ const state: UIDLStateDefinition = {
83
+ type: 'string',
84
+ defaultValue: '',
85
+ urlSearchParamBinding: { key: 'products_detail_panel_item_id' },
86
+ }
87
+
88
+ const result = stateDefinitionsDecoder.run(state)
89
+ expect(result.ok).toBeTruthy()
90
+ if (result.ok) {
91
+ expect(result.result.urlSearchParamBinding).toEqual({
92
+ key: 'products_detail_panel_item_id',
93
+ })
94
+ }
95
+ })
96
+
97
+ test('stateDefinitionsDecoder keeps a non-empty static default alongside a URL binding (fallback path)', () => {
98
+ const state: UIDLStateDefinition = {
99
+ type: 'string',
100
+ defaultValue: 'all',
101
+ urlSearchParamBinding: { key: 'category' },
102
+ }
103
+
104
+ const result = stateDefinitionsDecoder.run(state)
105
+ expect(result.ok).toBeTruthy()
106
+ if (result.ok) {
107
+ expect(result.result.defaultValue).toBe('all')
108
+ expect(result.result.urlSearchParamBinding?.key).toBe('category')
109
+ }
110
+ })
111
+
112
+ test('stateDefinitionsDecoder rejects urlSearchParamBinding that is missing the required `key`', () => {
113
+ const state = {
114
+ type: 'string',
115
+ defaultValue: '',
116
+ urlSearchParamBinding: {},
117
+ } as unknown as UIDLStateDefinition
118
+
119
+ const result = stateDefinitionsDecoder.run(state)
120
+ expect(result.ok).toBeFalsy()
121
+ })
@@ -0,0 +1,110 @@
1
+ {
2
+ "stateDefinitions": {
3
+ "isVisible_": {
4
+ "defaultValue": true,
5
+ "type": "boolean"
6
+ }
7
+ },
8
+ "node": {
9
+ "type": "element",
10
+ "content": {
11
+ "elementType": "container",
12
+ "semanticType": "div",
13
+ "referencedStyles": {},
14
+ "abilities": {},
15
+ "style": {
16
+ "width": {
17
+ "type": "static",
18
+ "content": "100%"
19
+ },
20
+ "height": {
21
+ "type": "static",
22
+ "content": "400px"
23
+ },
24
+ "display": {
25
+ "type": "static",
26
+ "content": "flex"
27
+ },
28
+ "position": {
29
+ "type": "static",
30
+ "content": "relative"
31
+ },
32
+ "alignItems": {
33
+ "type": "static",
34
+ "content": "center"
35
+ },
36
+ "flexDirection": {
37
+ "type": "static",
38
+ "content": "row"
39
+ },
40
+ "justifyContent": {
41
+ "type": "static",
42
+ "content": "center"
43
+ },
44
+ "gap": {
45
+ "type": "dynamic",
46
+ "content": {
47
+ "referenceType": "token",
48
+ "id": "--dl-space-space-halfunit",
49
+ "fallback": ""
50
+ }
51
+ }
52
+ },
53
+ "children": [
54
+ {
55
+ "type": "conditional",
56
+ "content": {
57
+ "node": {
58
+ "type": "element",
59
+ "content": {
60
+ "elementType": "image",
61
+ "referencedStyles": {},
62
+ "abilities": {},
63
+ "attrs": {
64
+ "src": {
65
+ "type": "dynamic",
66
+ "content": {
67
+ "referenceType": "prop",
68
+ "id": "imagesrc1",
69
+ "fallback": ""
70
+ }
71
+ },
72
+ "alt": {
73
+ "type": "dynamic",
74
+ "content": {
75
+ "referenceType": "prop",
76
+ "id": "imagealt1",
77
+ "fallback": ""
78
+ }
79
+ }
80
+ },
81
+ "style": {
82
+ "width": {
83
+ "type": "static",
84
+ "content": "200px"
85
+ },
86
+ "objectFit": {
87
+ "type": "static",
88
+ "content": "cover"
89
+ }
90
+ },
91
+ "children": []
92
+ }
93
+ },
94
+ "reference": {
95
+ "type": "dynamic",
96
+ "content": {
97
+ "referenceType": "state",
98
+ "id": "isVisible_"
99
+ },
100
+ "pos": ""
101
+ },
102
+ "value": false
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ },
108
+ "name": "Component",
109
+ "styleSetDefinitions": {}
110
+ }
@@ -6,9 +6,11 @@ import componentResultJSON from './component-with-proper-values.json'
6
6
  import componentStyleSetsInputJSON from './component-with-reusalble-styles.json'
7
7
  // @ts-ignore
8
8
  import componentWithReferencedStylesJSON from './componennt-with-referenced-styles.json'
9
+ // @ts-ignore
10
+ import componentWithStateReferences from './compoenent-with-state-reference.json'
9
11
 
10
12
  import { parseComponentJSON, parseProjectJSON } from '../../src/parser'
11
- import { ComponentUIDL } from '@teleporthq/teleport-types'
13
+ import { ComponentUIDL, UIDLConditionalNode } from '@teleporthq/teleport-types'
12
14
 
13
15
  describe('parseComponentJSON', () => {
14
16
  it('transforms primitive component values', () => {
@@ -113,4 +115,14 @@ describe('RefernecedStyles for ComponentUIDL', () => {
113
115
  const result = parseComponentJSON(uidl as unknown as Record<string, unknown>)
114
116
  expect(result).toEqual(result)
115
117
  })
118
+
119
+ it('Parses reference on a conditional node and changes the state/prop references', () => {
120
+ const result = parseComponentJSON(
121
+ componentWithStateReferences as unknown as Record<string, string>
122
+ )
123
+ const conditionalNode = result.node.content.children?.[0]
124
+
125
+ expect(result.stateDefinitions?.isVisible).toBeDefined()
126
+ expect((conditionalNode as UIDLConditionalNode)?.content.reference.content.id).toBe('isVisible')
127
+ })
116
128
  })
@@ -28,16 +28,23 @@ import { parseProjectJSON } from '../../src/parser'
28
28
 
29
29
  const uidl = component(
30
30
  'Repeat Component',
31
- elementNode('container', {}, [
32
- repeatNode(
33
- elementNode('div', {}, [dynamicNode('local', 'item')]),
34
- dynamicNode('prop', 'items'),
35
- {
36
- useIndex: true,
37
- }
38
- ),
39
- ]),
40
- { items: definition('array', ['hello', 'world']) },
31
+ elementNode(
32
+ 'container',
33
+ { fields: { type: 'dynamic', content: { referenceType: 'prop', id: 'fields["bg Image"]' } } },
34
+ [
35
+ repeatNode(
36
+ elementNode('div', {}, [dynamicNode('local', 'item')]),
37
+ dynamicNode('prop', 'items'),
38
+ {
39
+ useIndex: true,
40
+ }
41
+ ),
42
+ ]
43
+ ),
44
+ {
45
+ items: definition('array', ['hello', 'world']),
46
+ fields: definition('object', { 'bg Image': 'test' }),
47
+ },
41
48
  { items: definition('array', ['hello', 'world']) }
42
49
  )
43
50
 
@@ -130,20 +137,6 @@ describe('Validate UIDL', () => {
130
137
  // "isOpen" is used in events, but not defined. Please add it in stateDefinitions
131
138
  // )
132
139
  })
133
-
134
- it('throws an error if event name is empty string', () => {
135
- const validator = new Validator()
136
- // @ts-ignore
137
- expect(() => validator.validateComponentSchema(ComponentUidlElementWithEmptyName)).toThrow(
138
- Error
139
- )
140
-
141
- // expect(validationResult.errorMsg).toBe(
142
- // UIDL Format Validation Error. Please check the following:
143
- // - Path undefined: Error: Name attribute cannot be empty.
144
- // is a undefined
145
- // )
146
- })
147
140
  })
148
141
 
149
142
  describe('Project UIDL Format', () => {
@@ -265,6 +265,14 @@
265
265
  "items": {
266
266
  "type": "array",
267
267
  "defaultValue": []
268
+ },
269
+ "hero": {
270
+ "type": "object",
271
+ "defaultValue": {
272
+ "bg Image": {
273
+ "src": "test"
274
+ }
275
+ }
268
276
  }
269
277
  },
270
278
  "stateDefinitions": {
@@ -288,6 +296,13 @@
288
296
  "referenceType": "prop",
289
297
  "id": "title"
290
298
  }
299
+ },
300
+ "bgImage": {
301
+ "type": "dynamic",
302
+ "content": {
303
+ "referenceType": "prop",
304
+ "id": "hero['bg Image'].src"
305
+ }
291
306
  }
292
307
  },
293
308
  "children": [
@@ -7,7 +7,7 @@ exports.componentUIDLDecoder = (0, json_type_validation_1.object)({
7
7
  name: (0, json_type_validation_1.withDefault)('MyComponent', (0, json_type_validation_1.string)()),
8
8
  node: utils_1.elementNodeDecoder,
9
9
  stateDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.stateDefinitionsDecoder)),
10
- propDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.propDefinitionsDecoder)),
10
+ propDefinitions: (0, json_type_validation_1.withDefault)({}, (0, json_type_validation_1.dict)(utils_1.propDefinitionsDecoder)),
11
11
  styleSetDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.styleSetDefinitionDecoder)),
12
12
  importDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.externaldependencyDecoder)),
13
13
  outputOptions: (0, json_type_validation_1.optional)(utils_1.outputOptionsDecoder),
@@ -23,10 +23,10 @@ exports.rootComponentUIDLDecoder = (0, json_type_validation_1.object)({
23
23
  values: (0, json_type_validation_1.array)(utils_1.stateValueDetailsDecoder),
24
24
  }),
25
25
  })),
26
- propDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.propDefinitionsDecoder)),
26
+ propDefinitions: (0, json_type_validation_1.withDefault)({}, (0, json_type_validation_1.dict)(utils_1.propDefinitionsDecoder)),
27
27
  importDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.externaldependencyDecoder)),
28
28
  peerDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.peerDependencyDecoder)),
29
- styleSetDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(utils_1.styleSetDefinitionDecoder)),
29
+ styleSetDefinitions: (0, json_type_validation_1.withDefault)({}, (0, json_type_validation_1.dict)(utils_1.styleSetDefinitionDecoder)),
30
30
  outputOptions: (0, json_type_validation_1.optional)(utils_1.outputOptionsDecoder),
31
31
  seo: (0, json_type_validation_1.optional)(utils_1.componentSeoDecoder),
32
32
  designLanguage: (0, json_type_validation_1.optional)((0, json_type_validation_1.object)({
@@ -1 +1 @@
1
- {"version":3,"file":"component-decoder.js","sourceRoot":"","sources":["../../../src/decoders/component-decoder.ts"],"names":[],"mappings":";;;AAAA,uEASuC;AAEvC,iCAWgB;AAEH,QAAA,oBAAoB,GAA4B,IAAA,6BAAM,EAAC;IAClE,IAAI,EAAE,IAAA,kCAAW,EAAC,aAAa,EAAE,IAAA,6BAAM,GAAE,CAAC;IAC1C,IAAI,EAAE,0BAAkB;IACxB,gBAAgB,EAAE,IAAA,+BAAQ,EAAC,IAAA,2BAAI,EAAC,+BAAuB,CAAC,CAAC;IACzD,eAAe,EAAE,IAAA,+BAAQ,EAAC,IAAA,2BAAI,EAAC,8BAAsB,CAAC,CAAC;IACvD,mBAAmB,EAAE,IAAA,+BAAQ,EAAC,IAAA,2BAAI,EAAC,iCAAyB,CAAC,CAAC;IAC9D,iBAAiB,EAAE,IAAA,+BAAQ,EAAC,IAAA,2BAAI,EAAC,iCAAyB,CAAC,CAAC;IAC5D,aAAa,EAAE,IAAA,+BAAQ,EAAC,4BAAoB,CAAC;IAC7C,GAAG,EAAE,IAAA,+BAAQ,EAAC,2BAAmB,CAAC;CACnC,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAAgC,IAAA,6BAAM,EAAC;IAC1E,IAAI,EAAE,IAAA,kCAAW,EAAC,KAAK,EAAE,IAAA,6BAAM,GAAE,CAA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A,+BAAQ,EAAC,2BAAmB,CAAC;IAClC,cAAc,EAAE,IAAA,+BAAQ,EACtB,IAAA,6BAAM,EAAC;QACL,MAAM,EAAE,IAAA,+BAAQ,EAAC,2BAAmB,CAAC;KACtC,CAAC,CACH;CACF,CAAC,CAAA"}
@@ -1,9 +1,6 @@
1
- export declare class CustomCombinators<A> {
2
- private decode;
3
- private constructor();
4
- static isValidComponentName(): CustomCombinators<string>;
5
- static isValidNavLink(): CustomCombinators<string>;
6
- static isValidFileName(): CustomCombinators<string>;
7
- static isValidElementName(): CustomCombinators<string>;
8
- }
1
+ import { Decoder } from '@mojotech/json-type-validation';
2
+ export declare const isValidComponentName: (name: string) => Decoder<string>;
3
+ export declare const isValidNavLink: (link: string) => Decoder<string>;
4
+ export declare const isValidFileName: (name: string) => Decoder<string>;
5
+ export declare const isValidElementName: (name: string) => Decoder<string>;
9
6
  //# sourceMappingURL=custom-combinators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-combinators.d.ts","sourceRoot":"","sources":["../../../src/decoders/custom-combinators.ts"],"names":[],"mappings":"AASA,qBAAa,iBAAiB,CAAC,CAAC;IAEV,OAAO,CAAC,MAAM;IAAlC,OAAO;IAEP,MAAM,CAAC,oBAAoB,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAYxD,MAAM,CAAC,cAAc,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAmBlD,MAAM,CAAC,eAAe,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAYnD,MAAM,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,MAAM,CAAC;CAWvD"}
1
+ {"version":3,"file":"custom-combinators.d.ts","sourceRoot":"","sources":["../../../src/decoders/custom-combinators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAOvE,eAAO,MAAM,oBAAoB,SAAU,MAAM,KAAG,QAAQ,MAAM,CAOjE,CAAA;AAED,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,QAAQ,MAAM,CAe3D,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,QAAQ,MAAM,CAO5D,CAAA;AAED,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,QAAQ,MAAM,CAO/D,CAAA"}
@@ -1,65 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomCombinators = void 0;
4
- /* tslint:disable member-ordering */
3
+ exports.isValidElementName = exports.isValidFileName = exports.isValidNavLink = exports.isValidComponentName = void 0;
5
4
  var json_type_validation_1 = require("@mojotech/json-type-validation");
6
- var CustomCombinators = /** @class */ (function () {
7
- // @ts-ignore
8
- function CustomCombinators(decode) {
9
- this.decode = decode;
5
+ /* These are some custom combinators that comes in handy for us,
6
+ instead of parsing and cross-checking regex again. The combinators,
7
+ can used inside a existing Decoder, since we did not implement any run()
8
+ runWithException() etc */
9
+ var isValidComponentName = function (name) {
10
+ var componentNameRegex = new RegExp('^[A-Z]+[a-zA-Z0-9]*$');
11
+ if (name && typeof name === 'string' && componentNameRegex.test(name)) {
12
+ return (0, json_type_validation_1.succeed)(name);
10
13
  }
11
- CustomCombinators.isValidComponentName = function () {
12
- return new CustomCombinators(function (json) {
13
- var componentNameRegex = new RegExp('^[A-Z]+[a-zA-Z0-9]*$');
14
- if (json && typeof json === 'string' && componentNameRegex.test(json)) {
15
- return json_type_validation_1.Result.ok(json);
16
- }
17
- else if (json.length === 0) {
18
- throw new Error("Component Name cannot be empty");
19
- }
20
- throw new Error("Invalid Component name, got ".concat(json));
21
- });
22
- };
23
- CustomCombinators.isValidNavLink = function () {
24
- return new CustomCombinators(function (link) {
25
- if (!link || typeof link !== 'string') {
26
- throw new Error("Invalid navLink attribute, received ".concat(link));
27
- }
28
- if (link === '**') {
29
- return json_type_validation_1.Result.ok(link);
30
- }
31
- var navLinkRegex = new RegExp('/(?:[a-zA-Z0-9-_]+|/[[a-zA-Z]+]|[/[a-zA-Z]+])*');
32
- if (navLinkRegex.test(link)) {
33
- return json_type_validation_1.Result.ok(link);
34
- }
35
- throw new Error("Invalid navLink attribute, received ".concat(link));
36
- });
37
- };
38
- CustomCombinators.isValidFileName = function () {
39
- return new CustomCombinators(function (json) {
40
- var fileNameRegex = new RegExp('^[[a-zA-Z0-9-_.]+]*$');
41
- if (json && typeof json === 'string' && fileNameRegex.test(json)) {
42
- return json_type_validation_1.Result.ok(json);
43
- }
44
- else if (json.length === 0) {
45
- throw new Error("File Name cannot be empty");
46
- }
47
- throw new Error("Invalid File name, received ".concat(json));
48
- });
49
- };
50
- CustomCombinators.isValidElementName = function () {
51
- return new CustomCombinators(function (json) {
52
- var fileNameRegex = new RegExp('^[a-zA-Z]+[a-zA-Z0-9-_]*$');
53
- if (json && typeof json === 'string' && fileNameRegex.test(json)) {
54
- return json_type_validation_1.Result.ok(json);
55
- }
56
- else if (json.length === 0) {
57
- throw new Error("Name attribute cannot be empty");
58
- }
59
- throw new Error("Invalid name attribute, received ".concat(json));
60
- });
61
- };
62
- return CustomCombinators;
63
- }());
64
- exports.CustomCombinators = CustomCombinators;
14
+ return (0, json_type_validation_1.fail)("Invalid Component name, got ".concat(name));
15
+ };
16
+ exports.isValidComponentName = isValidComponentName;
17
+ var isValidNavLink = function (link) {
18
+ if (!link || typeof link !== 'string') {
19
+ throw new Error("Invalid navLink attribute, received ".concat(link));
20
+ }
21
+ if (link === '**') {
22
+ return (0, json_type_validation_1.succeed)(link);
23
+ }
24
+ var navLinkRegex = new RegExp('/(?:[a-zA-Z0-9-_]+|/[[a-zA-Z]+]|[/[a-zA-Z]+])*');
25
+ if (navLinkRegex.test(link)) {
26
+ return (0, json_type_validation_1.succeed)(link);
27
+ }
28
+ return (0, json_type_validation_1.fail)("Invalid navLink attribute, received ".concat(link));
29
+ };
30
+ exports.isValidNavLink = isValidNavLink;
31
+ var isValidFileName = function (name) {
32
+ var fileNameRegex = new RegExp('^[[a-zA-Z0-9-_.]+]*$');
33
+ if (name && typeof name === 'string' && fileNameRegex.test(name)) {
34
+ return (0, json_type_validation_1.succeed)(name);
35
+ }
36
+ return (0, json_type_validation_1.fail)("Invalid File name, received ".concat(name));
37
+ };
38
+ exports.isValidFileName = isValidFileName;
39
+ var isValidElementName = function (name) {
40
+ var elementNameRefex = new RegExp('^[a-zA-Z]+[a-zA-Z0-9-_]*$');
41
+ if (name && typeof name === 'string' && elementNameRefex.test(name)) {
42
+ return (0, json_type_validation_1.succeed)(name);
43
+ }
44
+ return (0, json_type_validation_1.fail)("Invalid name attribute, received ".concat(name));
45
+ };
46
+ exports.isValidElementName = isValidElementName;
65
47
  //# sourceMappingURL=custom-combinators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-combinators.js","sourceRoot":"","sources":["../../../src/decoders/custom-combinators.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,uEAAqE;AAQrE;IACE,aAAa;IACb,2BAA4B,MAAyC;QAAzC,WAAM,GAAN,MAAM,CAAmC;IAAG,CAAC;IAElE,sCAAoB,GAA3B;QACE,OAAO,IAAI,iBAAiB,CAAS,UAAC,IAAY;YAChD,IAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,sBAAsB,CAAC,CAAA;YAC7D,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACrE,OAAO,6BAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;aACvB;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC5B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;aAClD;YACD,MAAM,IAAI,KAAK,CAAC,sCAA+B,IAAI,CAAE,CAAC,CAAA;QACxD,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,gCAAc,GAArB;QACE,OAAO,IAAI,iBAAiB,CAAS,UAAC,IAAY;YAChD,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ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kBAAkB,EAAE,OAAO,CAAC,YAAY,CAMnD,CAAA"}
1
+ {"version":3,"file":"project-decoder.d.ts","sourceRoot":"","sources":["../../../src/decoders/project-decoder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAYR,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,aAAa,EAEd,MAAM,4BAA4B,CAAA;AAanC,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,WAAW,CAUlD,CAAA;AAEF,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,wBAAwB,CAgBvE,CAAA;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAkBlD,CAAA;AAEF,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,YAAY,CAgC1B,CAAA"}
@@ -50,5 +50,29 @@ exports.projectUIDLDecoder = (0, json_type_validation_1.object)({
50
50
  root: component_decoder_1.rootComponentUIDLDecoder,
51
51
  components: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)(component_decoder_1.componentUIDLDecoder)),
52
52
  resources: (0, json_type_validation_1.optional)(exports.resourcesDecoder),
53
+ dataSources: (0, json_type_validation_1.optional)(utils_1.dataSourcesDecoder),
54
+ forms: (0, json_type_validation_1.optional)(utils_1.formsDecoder),
55
+ authentication: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
56
+ internationalization: (0, json_type_validation_1.optional)((0, json_type_validation_1.object)({
57
+ main: (0, json_type_validation_1.object)({
58
+ name: (0, json_type_validation_1.string)(),
59
+ locale: (0, json_type_validation_1.string)(),
60
+ }),
61
+ ignoreBrowserLanguage: (0, json_type_validation_1.optional)((0, json_type_validation_1.boolean)()),
62
+ languages: (0, json_type_validation_1.dict)((0, json_type_validation_1.string)()),
63
+ translations: (0, json_type_validation_1.dict)((0, json_type_validation_1.dict)((0, json_type_validation_1.union)(utils_1.elementNodeDecoder, utils_1.staticValueDecoder))),
64
+ })),
65
+ workflows: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
66
+ // These top-level project-level settings are consumed by downstream generator
67
+ // plugins (NextEcommerceProjectPlugin, NextAIChatProjectPlugin, the invoice
68
+ // sub-plugin of the workflows project plugin, NextGlobalStateProjectPlugin).
69
+ // They were previously dropped here because they were not declared — which
70
+ // silently disabled e-commerce API routes, the AI chat library/routes, the
71
+ // invoice templates, and the global-state store. Passing them through as
72
+ // anyJson keeps validation permissive while letting the plugins see them.
73
+ globalStateDefinitions: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
74
+ invoiceSettings: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
75
+ ecommerceSettings: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
76
+ aiAssistantChat: (0, json_type_validation_1.optional)((0, json_type_validation_1.anyJson)()),
53
77
  });
54
78
  //# sourceMappingURL=project-decoder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-decoder.js","sourceRoot":"","sources":["../../../src/decoders/project-decoder.ts"],"names":[],"mappings":";;;AAAA,uEAUuC;AAOvC,iCAKgB;AAChB,yDAAoF;AAEvE,QAAA,kBAAkB,GAAyB,IAAA,6BAAM,EAAC;IAC7D,UAAU,EAAE,IAAA,+BAAQ,EAAC,IAAA,6BAAM,GAAE,CAAC;IAC9B,IAAI,EAAE,IAAA,+BAAQ,EAAC,IAAA,6BAAM,GAAE,CAAC;IACxB,KAAK,EAAE,IAAA,+BAAQ,EAAC,IAAA,4BAAK,EAAC,IAAA,6BAAM,EAAC,EAAE,GAAG,EAAE,IAAA,6BAAM,GAAE,EAAE,IAAI,EAAE,IAAA,6BAAM,GAAE,EAAE,KAAK,EAAE,IAAA,6BAAM,GAAE,EAAE,CAAC,CAAC,CAAC;IAClF,SAAS,EAAE,IAAA,+BAAQ,EAAC,IAAA,6BAAM,GAAE,CAAC;IAC7B,gBAAgB,EAAE,IAAA,+BAAQ,EAAC,IAAA,6BAAM,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