@nordcraft/core 1.0.78 → 1.0.79
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/api/ToddleApiV2.d.ts +2 -2
- package/dist/api/apiTypes.d.ts +1 -1
- package/dist/component/component.types.d.ts +1 -1
- package/dist/component/schemas/action-schema.d.ts +3 -0
- package/dist/component/schemas/action-schema.js +169 -0
- package/dist/component/schemas/action-schema.js.map +1 -0
- package/dist/component/schemas/api-schema.d.ts +3 -0
- package/dist/component/schemas/api-schema.js +174 -0
- package/dist/component/schemas/api-schema.js.map +1 -0
- package/dist/component/schemas/attribute-schema.d.ts +3 -0
- package/dist/component/schemas/attribute-schema.js +12 -0
- package/dist/component/schemas/attribute-schema.js.map +1 -0
- package/dist/component/schemas/component-schema.d.ts +6 -0
- package/dist/component/schemas/component-schema.js +132 -0
- package/dist/component/schemas/component-schema.js.map +1 -0
- package/dist/component/schemas/context-schema.d.ts +3 -0
- package/dist/component/schemas/context-schema.js +20 -0
- package/dist/component/schemas/context-schema.js.map +1 -0
- package/dist/component/schemas/event-schema.d.ts +4 -0
- package/dist/component/schemas/event-schema.js +25 -0
- package/dist/component/schemas/event-schema.js.map +1 -0
- package/dist/component/schemas/formula-schema.d.ts +5 -0
- package/dist/component/schemas/formula-schema.js +203 -0
- package/dist/component/schemas/formula-schema.js.map +1 -0
- package/dist/component/schemas/node-schema.d.ts +3 -0
- package/dist/component/schemas/node-schema.js +159 -0
- package/dist/component/schemas/node-schema.js.map +1 -0
- package/dist/component/schemas/route-schema.d.ts +3 -0
- package/dist/component/schemas/route-schema.js +88 -0
- package/dist/component/schemas/route-schema.js.map +1 -0
- package/dist/component/schemas/variable-schema.d.ts +3 -0
- package/dist/component/schemas/variable-schema.js +8 -0
- package/dist/component/schemas/variable-schema.js.map +1 -0
- package/dist/component/schemas/workflow-schema.d.ts +3 -0
- package/dist/component/schemas/workflow-schema.js +23 -0
- package/dist/component/schemas/workflow-schema.js.map +1 -0
- package/dist/component/schemas/zod-schemas.d.ts +26 -3
- package/dist/component/schemas/zod-schemas.js +4 -1081
- package/dist/component/schemas/zod-schemas.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/collections.d.ts +1 -1
- package/dist/utils/collections.js.map +1 -1
- package/package.json +1 -1
- package/src/api/apiTypes.ts +1 -1
- package/src/component/component.types.ts +1 -1
- package/src/component/schemas/action-schema.ts +258 -0
- package/src/component/schemas/api-schema.ts +255 -0
- package/src/component/schemas/attribute-schema.ts +15 -0
- package/src/component/schemas/component-schema.ts +174 -0
- package/src/component/schemas/context-schema.ts +21 -0
- package/src/component/schemas/event-schema.ts +35 -0
- package/src/component/schemas/formula-schema.ts +299 -0
- package/src/component/schemas/node-schema.ts +259 -0
- package/src/component/schemas/route-schema.ts +135 -0
- package/src/component/schemas/variable-schema.ts +11 -0
- package/src/component/schemas/workflow-schema.ts +30 -0
- package/src/component/schemas/zod-schemas.ts +4 -1493
- package/src/types.ts +1 -1
- package/src/utils/collections.ts +4 -1
package/src/types.ts
CHANGED
|
@@ -159,7 +159,7 @@ export interface Comment {
|
|
|
159
159
|
|
|
160
160
|
export interface NordcraftMetadata {
|
|
161
161
|
'@nordcraft/metadata'?: Nullable<{
|
|
162
|
-
comments
|
|
162
|
+
comments?: Nullable<Partial<Record<string, Comment & { index: number }>>>
|
|
163
163
|
}>
|
|
164
164
|
}
|
|
165
165
|
|
package/src/utils/collections.ts
CHANGED
|
@@ -69,7 +69,10 @@ export const filterObject = <T>(
|
|
|
69
69
|
f: (kv: [string, T]) => boolean,
|
|
70
70
|
): Record<string, T> => Object.fromEntries(Object.entries(object).filter(f))
|
|
71
71
|
|
|
72
|
-
export function get<T = any>(
|
|
72
|
+
export function get<T = any>(
|
|
73
|
+
collection: T,
|
|
74
|
+
[head, ...rest]: Array<string | number>,
|
|
75
|
+
): any {
|
|
73
76
|
const headItem = isDefined(head) ? (collection as any)?.[head] : undefined
|
|
74
77
|
if (rest.length === 0) {
|
|
75
78
|
return headItem
|