@antelopejs/dms-automation 0.7.0 → 0.9.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/README.md +33 -22
- package/dist/cluster/bus.js +8 -6
- package/dist/cluster/bus.js.map +1 -1
- package/dist/cluster/leader.js.map +1 -1
- package/dist/data/procedures-query.d.ts +19 -0
- package/dist/data/procedures-query.js +105 -0
- package/dist/data/procedures-query.js.map +1 -0
- package/dist/data/procedures-table.d.ts +5 -20
- package/dist/data/procedures-table.js +10 -106
- package/dist/data/procedures-table.js.map +1 -1
- package/dist/data/runs-table.d.ts +3 -3
- package/dist/data/runs-table.js.map +1 -1
- package/dist/db/models/automation_template.model.d.ts +13 -13
- package/dist/db/models/automation_template.model.js +13 -14
- package/dist/db/models/automation_template.model.js.map +1 -1
- package/dist/db/models/procedure.model.d.ts +7 -5
- package/dist/db/models/procedure_run.model.d.ts +9 -6
- package/dist/db/models/procedure_run.model.js +8 -8
- package/dist/db/models/procedure_run.model.js.map +1 -1
- package/dist/db/models/stats.model.js.map +1 -1
- package/dist/db/models/type_switch.model.d.ts +7 -5
- package/dist/db/tables/procedure_run.table.d.ts +2 -1
- package/dist/db/tables/procedure_run.table.js.map +1 -1
- package/dist/implementations/dms-automation/index.d.ts +2 -2
- package/dist/implementations/dms-automation/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pages/category.js.map +1 -1
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/overview.js.map +1 -1
- package/dist/pages/procedures.js.map +1 -1
- package/dist/pages/runs.js.map +1 -1
- package/dist/pages/shared.js +1 -1
- package/dist/pages/shared.js.map +1 -1
- package/dist/realtime.d.ts +2 -1
- package/dist/realtime.js.map +1 -1
- package/dist/routes/action-types.d.ts +3 -2
- package/dist/routes/action-types.js.map +1 -1
- package/dist/routes/data-node-types.d.ts +1 -1
- package/dist/routes/deleteConfirm.js +4 -3
- package/dist/routes/deleteConfirm.js.map +1 -1
- package/dist/routes/graphSchema.d.ts +2 -1
- package/dist/routes/graphSchema.js +13 -10
- package/dist/routes/graphSchema.js.map +1 -1
- package/dist/routes/library.d.ts +12 -1
- package/dist/routes/library.js +38 -34
- package/dist/routes/library.js.map +1 -1
- package/dist/routes/procedureChecks.js +5 -5
- package/dist/routes/procedureChecks.js.map +1 -1
- package/dist/routes/procedureRuns.d.ts +3 -3
- package/dist/routes/procedureRuns.js +1 -1
- package/dist/routes/procedureRuns.js.map +1 -1
- package/dist/routes/procedureSchemas.d.ts +7 -6
- package/dist/routes/procedureSchemas.js +4 -2
- package/dist/routes/procedureSchemas.js.map +1 -1
- package/dist/routes/procedures.d.ts +15 -14
- package/dist/routes/procedures.js +2 -1
- package/dist/routes/procedures.js.map +1 -1
- package/dist/routes/requests.d.ts +12 -6
- package/dist/routes/requests.js +2 -1
- package/dist/routes/requests.js.map +1 -1
- package/dist/routes/runs.d.ts +9 -8
- package/dist/routes/runs.js +5 -3
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/stats.js.map +1 -1
- package/dist/routes/templates.d.ts +5 -4
- package/dist/routes/templates.js +2 -1
- package/dist/routes/templates.js.map +1 -1
- package/dist/routes/trigger-types.d.ts +3 -2
- package/dist/routes/trigger-types.js.map +1 -1
- package/dist/routes/typeConfigShared.d.ts +2 -1
- package/dist/routes/typeConfigShared.js.map +1 -1
- package/dist/routes/zodJson.d.ts +3 -0
- package/dist/routes/zodJson.js +21 -0
- package/dist/routes/zodJson.js.map +1 -0
- package/dist/runtime/armErrors.d.ts +0 -1
- package/dist/runtime/armErrors.js +5 -12
- package/dist/runtime/armErrors.js.map +1 -1
- package/dist/runtime/boundRunLog.d.ts +7 -5
- package/dist/runtime/boundRunLog.js +24 -20
- package/dist/runtime/boundRunLog.js.map +1 -1
- package/dist/runtime/builtins/actions/http.d.ts +7 -3
- package/dist/runtime/builtins/actions/http.js +33 -22
- package/dist/runtime/builtins/actions/http.js.map +1 -1
- package/dist/runtime/builtins/actions/log.d.ts +5 -4
- package/dist/runtime/builtins/actions/log.js.map +1 -1
- package/dist/runtime/builtins/data/boolean.d.ts +2 -1
- package/dist/runtime/builtins/data/boolean.js +4 -5
- package/dist/runtime/builtins/data/boolean.js.map +1 -1
- package/dist/runtime/builtins/data/compare.js +8 -10
- package/dist/runtime/builtins/data/compare.js.map +1 -1
- package/dist/runtime/builtins/data/constant.js +1 -1
- package/dist/runtime/builtins/data/constant.js.map +1 -1
- package/dist/runtime/builtins/data/json.js +4 -5
- package/dist/runtime/builtins/data/json.js.map +1 -1
- package/dist/runtime/builtins/data/math.js +4 -4
- package/dist/runtime/builtins/data/math.js.map +1 -1
- package/dist/runtime/builtins/data/object.js +27 -27
- package/dist/runtime/builtins/data/object.js.map +1 -1
- package/dist/runtime/builtins/data/string.js +13 -18
- package/dist/runtime/builtins/data/string.js.map +1 -1
- package/dist/runtime/builtins/nodes/action.js +16 -5
- package/dist/runtime/builtins/nodes/action.js.map +1 -1
- package/dist/runtime/builtins/nodes/data.js +2 -2
- package/dist/runtime/builtins/nodes/data.js.map +1 -1
- package/dist/runtime/builtins/nodes/delay.js +2 -2
- package/dist/runtime/builtins/nodes/delay.js.map +1 -1
- package/dist/runtime/builtins/nodes/forRange.js +2 -2
- package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
- package/dist/runtime/builtins/nodes/foreach.js +2 -2
- package/dist/runtime/builtins/nodes/foreach.js.map +1 -1
- package/dist/runtime/builtins/nodes/groupInput.js +2 -2
- package/dist/runtime/builtins/nodes/groupInput.js.map +1 -1
- package/dist/runtime/builtins/nodes/groupOutput.js +2 -2
- package/dist/runtime/builtins/nodes/groupOutput.js.map +1 -1
- package/dist/runtime/builtins/nodes/if.js +2 -2
- package/dist/runtime/builtins/nodes/if.js.map +1 -1
- package/dist/runtime/builtins/nodes/parallel.js +2 -2
- package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
- package/dist/runtime/builtins/nodes/retry.js +13 -5
- package/dist/runtime/builtins/nodes/retry.js.map +1 -1
- package/dist/runtime/builtins/nodes/setVariable.js +2 -2
- package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
- package/dist/runtime/builtins/nodes/switch.js +8 -3
- package/dist/runtime/builtins/nodes/switch.js.map +1 -1
- package/dist/runtime/builtins/nodes/trigger.js +2 -2
- package/dist/runtime/builtins/nodes/trigger.js.map +1 -1
- package/dist/runtime/builtins/nodes/tryCatch.js +2 -2
- package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
- package/dist/runtime/builtins/triggers/cron.d.ts +4 -3
- package/dist/runtime/builtins/triggers/cron.js +5 -7
- package/dist/runtime/builtins/triggers/cron.js.map +1 -1
- package/dist/runtime/builtins/triggers/webhook.d.ts +11 -7
- package/dist/runtime/builtins/triggers/webhook.js +15 -12
- package/dist/runtime/builtins/triggers/webhook.js.map +1 -1
- package/dist/runtime/declaredProcedures.d.ts +2 -2
- package/dist/runtime/declaredProcedures.js +3 -2
- package/dist/runtime/declaredProcedures.js.map +1 -1
- package/dist/runtime/describe.d.ts +3 -1
- package/dist/runtime/describe.js +14 -13
- package/dist/runtime/describe.js.map +1 -1
- package/dist/runtime/executor.d.ts +2 -1
- package/dist/runtime/executor.js +18 -13
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/flatten.d.ts +1 -1
- package/dist/runtime/flatten.js +1 -1
- package/dist/runtime/flatten.js.map +1 -1
- package/dist/runtime/graphIssues.d.ts +2 -2
- package/dist/runtime/graphIssues.js +39 -32
- package/dist/runtime/graphIssues.js.map +1 -1
- package/dist/runtime/graphVersion.d.ts +1 -1
- package/dist/runtime/graphVersion.js +4 -3
- package/dist/runtime/graphVersion.js.map +1 -1
- package/dist/runtime/nodeKinds.d.ts +6 -5
- package/dist/runtime/nodeKinds.js.map +1 -1
- package/dist/runtime/reconcile.d.ts +3 -0
- package/dist/runtime/reconcile.js +178 -0
- package/dist/runtime/reconcile.js.map +1 -0
- package/dist/runtime/registry.d.ts +3 -3
- package/dist/runtime/resolveInputs.d.ts +13 -8
- package/dist/runtime/resolveInputs.js +18 -18
- package/dist/runtime/resolveInputs.js.map +1 -1
- package/dist/runtime/resolveSubgraph.js +4 -5
- package/dist/runtime/resolveSubgraph.js.map +1 -1
- package/dist/runtime/retention.js.map +1 -1
- package/dist/runtime/runProcedure.d.ts +3 -2
- package/dist/runtime/runProcedure.js +2 -1
- package/dist/runtime/runProcedure.js.map +1 -1
- package/dist/runtime/schedule.js +3 -0
- package/dist/runtime/schedule.js.map +1 -1
- package/dist/runtime/schemaProperties.d.ts +3 -0
- package/dist/runtime/schemaProperties.js +7 -0
- package/dist/runtime/schemaProperties.js.map +1 -0
- package/dist/runtime/serialQueue.d.ts +1 -1
- package/dist/runtime/serialQueue.js +4 -4
- package/dist/runtime/serialQueue.js.map +1 -1
- package/dist/runtime/sideEffects.d.ts +2 -2
- package/dist/runtime/subscriptions.d.ts +6 -4
- package/dist/runtime/subscriptions.js +21 -180
- package/dist/runtime/subscriptions.js.map +1 -1
- package/dist/runtime/subwalk.js.map +1 -1
- package/dist/runtime/templateCacheState.d.ts +6 -0
- package/dist/runtime/templateCacheState.js +10 -0
- package/dist/runtime/templateCacheState.js.map +1 -0
- package/dist/runtime/templateUsages.js +4 -5
- package/dist/runtime/templateUsages.js.map +1 -1
- package/dist/runtime/topo.js +2 -4
- package/dist/runtime/topo.js.map +1 -1
- package/dist/runtime/trace.d.ts +5 -2
- package/dist/runtime/trace.js +27 -17
- package/dist/runtime/trace.js.map +1 -1
- package/dist/runtime/triggerHandles.d.ts +4 -3
- package/dist/runtime/triggerHandles.js +9 -1
- package/dist/runtime/triggerHandles.js.map +1 -1
- package/dist/runtime/typeOrigin.js +12 -1
- package/dist/runtime/typeOrigin.js.map +1 -1
- package/dist/runtime/validate.js.map +1 -1
- package/dist/runtime/validateTemplate.js.map +1 -1
- package/dist/runtime/withTimeout.js.map +1 -1
- package/dist/runtime/wording.js +12 -8
- package/dist/runtime/wording.js.map +1 -1
- package/dist/stats/health-banner.js.map +1 -1
- package/dist/stats/health.js.map +1 -1
- package/dist/stats/kpi.js +1 -1
- package/dist/stats/kpi.js.map +1 -1
- package/dist/stats/overview.js +2 -1
- package/dist/stats/overview.js.map +1 -1
- package/dist/types/dataValue.d.ts +7 -0
- package/dist/types/dataValue.js +56 -0
- package/dist/types/dataValue.js.map +1 -0
- package/dist/types/graph.d.ts +19 -13
- package/dist/types/graph.js +8 -0
- package/dist/types/graph.js.map +1 -1
- package/dist/types/guards.d.ts +8 -0
- package/dist/types/guards.js +35 -0
- package/dist/types/guards.js.map +1 -0
- package/dist/types/runLog.d.ts +8 -7
- package/dist/types/runLog.js.map +1 -1
- package/frontend-vue/app/build/components/editor/EditorBanners.vue +120 -0
- package/frontend-vue/app/build/components/editor/EditorChoiceModal.vue +44 -0
- package/frontend-vue/app/build/components/editor/EditorForkModal.vue +51 -0
- package/frontend-vue/app/build/components/editor/EditorHeader.vue +146 -0
- package/frontend-vue/app/build/components/editor/EditorSaveTemplateModal.vue +105 -0
- package/frontend-vue/app/build/components/editor/NodeInspectorDocs.vue +28 -0
- package/frontend-vue/app/build/components/editor/NodeInspectorRun.vue +48 -0
- package/frontend-vue/app/build/composables/editor/useBuilderMount.ts +129 -0
- package/frontend-vue/app/build/composables/editor/useBuilderSave.ts +256 -0
- package/frontend-vue/app/build/composables/editor/useBuilderShortcuts.ts +270 -0
- package/frontend-vue/app/build/composables/editor/useDraftProblems.ts +288 -0
- package/frontend-vue/app/build/composables/editor/useEditorContext.ts +388 -0
- package/frontend-vue/app/build/composables/editor/useEditorLoad.ts +158 -0
- package/frontend-vue/app/build/composables/editor/useForkToLocal.ts +193 -0
- package/frontend-vue/app/build/composables/editor/useGraphHistory.ts +113 -0
- package/frontend-vue/app/build/composables/editor/useGroupEditing.ts +445 -0
- package/frontend-vue/app/build/composables/editor/usePalette.ts +41 -0
- package/frontend-vue/app/build/composables/editor/useProcedureActions.ts +96 -0
- package/frontend-vue/app/build/composables/editor/useRunOverlay.ts +466 -0
- package/frontend-vue/app/build/composables/editor/useSaveAsTemplate.ts +172 -0
- package/frontend-vue/app/build/composables/editor/useSavedTriggers.ts +100 -0
- package/frontend-vue/app/build/composables/editor/useSubgraphNavigation.ts +270 -0
- package/frontend-vue/app/build/composables/editor/useUnsavedGuards.ts +233 -0
- package/frontend-vue/app/build/composables/graphCanvas/connect.ts +273 -0
- package/frontend-vue/app/build/composables/graphCanvas/edgeEvents.ts +172 -0
- package/frontend-vue/app/build/composables/graphCanvas/edges.ts +55 -0
- package/frontend-vue/app/build/composables/graphCanvas/handles.ts +181 -0
- package/frontend-vue/app/build/composables/graphCanvas/linkMenu.ts +123 -0
- package/frontend-vue/app/build/composables/graphCanvas/nodeData.ts +222 -0
- package/frontend-vue/app/build/composables/graphCanvas/placement.ts +248 -0
- package/frontend-vue/app/build/composables/graphCanvas/selection.ts +150 -0
- package/frontend-vue/app/build/composables/graphCanvas/types.ts +188 -0
- package/frontend-vue/app/build/composables/graphCanvas/view.ts +230 -0
- package/frontend-vue/app/build/types/editor.ts +94 -0
- package/frontend-vue/app/build/utils/editor/apiErrors.ts +74 -0
- package/frontend-vue/app/build/utils/editor/graphShape.ts +68 -0
- package/frontend-vue/app/build/utils/editor/groupPlan.ts +322 -0
- package/frontend-vue/app/build/utils/editor/groupPorts.ts +210 -0
- package/frontend-vue/app/build/utils/editor/keyboard.ts +22 -0
- package/frontend-vue/app/build/utils/inspectorFields.ts +117 -0
- package/frontend-vue/app/build/utils/templates.ts +88 -0
- package/frontend-vue/app/components/AttentionList.vue +2 -6
- package/frontend-vue/app/components/Catalog.vue +2 -1
- package/frontend-vue/app/components/Editor/GraphCanvas.vue +78 -1337
- package/frontend-vue/app/components/Editor/NodeInspector.vue +31 -123
- package/frontend-vue/app/components/Editor.vue +134 -3484
- package/frontend-vue/app/components/Templates.vue +14 -84
- package/frontend-vue/build/backend-boundary.ts +122 -0
- package/frontend-vue/dms.frontend.build.ts +2 -0
- package/frontend-vue/eslint-rules/index.mjs +103 -0
- package/frontend-vue/eslint.config.mjs +15 -0
- package/frontend-vue/package.json +8 -5
- package/frontend-vue/pnpm-lock.yaml +168 -139
- package/frontend-vue/tests/api-error-presentation.test.cjs +254 -0
- package/frontend-vue/tests/helpers/setup.cjs +44 -0
- package/package.json +18 -15
- package/skills/dms-automation/SKILL.md +2 -2
- package/skills/dms-automation/cases.json +58 -0
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref, watch } from 'vue'
|
|
3
3
|
import type { TraceStep } from '../../composables/useAutomationRuns'
|
|
4
|
-
import { describeDateTime
|
|
4
|
+
import { describeDateTime } from '../../utils/describe'
|
|
5
5
|
import JsonField from './JsonField.vue'
|
|
6
|
+
import NodeInspectorDocs from '../../build/components/editor/NodeInspectorDocs.vue'
|
|
7
|
+
import NodeInspectorRun from '../../build/components/editor/NodeInspectorRun.vue'
|
|
8
|
+
import {
|
|
9
|
+
arrayToText,
|
|
10
|
+
asBool,
|
|
11
|
+
asNumber,
|
|
12
|
+
asString,
|
|
13
|
+
dataNodeSchema,
|
|
14
|
+
isBoolish,
|
|
15
|
+
nameInWords,
|
|
16
|
+
isNumberish,
|
|
17
|
+
isStringish,
|
|
18
|
+
portsSchema,
|
|
19
|
+
textToArray,
|
|
20
|
+
} from '../../build/utils/inspectorFields'
|
|
6
21
|
import type { NodeKindEntry } from '../../composables/useAutomationNodeKinds'
|
|
7
22
|
import type {
|
|
8
23
|
ActionType,
|
|
@@ -114,10 +129,6 @@ const typeDescription = computed(() => {
|
|
|
114
129
|
|
|
115
130
|
const kindUi = computed(() => props.nodeKinds.find((k) => k.kind === props.node?.kind)?.meta.ui)
|
|
116
131
|
|
|
117
|
-
function portsSchema(ports: Array<{ name: string; type?: string }>): JsonSchema {
|
|
118
|
-
return { properties: Object.fromEntries(ports.map((p) => [p.name, p.type ? { type: p.type } : {}])) }
|
|
119
|
-
}
|
|
120
|
-
|
|
121
132
|
// What the block reads: its type's fields, else its kind's data inputs and
|
|
122
133
|
// settings.
|
|
123
134
|
const inputSchema = computed<JsonSchema | null>(() => {
|
|
@@ -156,12 +167,6 @@ const issueText = computed(() => {
|
|
|
156
167
|
return t(key, prop ? { ...issue.params, label: fieldLabel(String(field), prop) } : (issue.params ?? {}))
|
|
157
168
|
})
|
|
158
169
|
|
|
159
|
-
function unwrap(described: unknown): unknown {
|
|
160
|
-
if (!described || typeof described !== 'object') return described
|
|
161
|
-
if ('value' in described && 'type' in described) return (described as { value: unknown }).value
|
|
162
|
-
return Object.fromEntries(Object.entries(described as Record<string, unknown>).map(([k, v]) => [k, unwrap(v)]))
|
|
163
|
-
}
|
|
164
|
-
|
|
165
170
|
// Sentinel nodes (the group's input/output handles) are auto-managed and
|
|
166
171
|
// never user-deletable, mirroring the canvas keyboard-delete guard.
|
|
167
172
|
const SENTINEL_KINDS: ReadonlySet<string> = new Set(['groupInput', 'groupOutput'])
|
|
@@ -228,18 +233,7 @@ const schema = computed<JsonSchema | null>(() => {
|
|
|
228
233
|
if (n.kind === 'data') {
|
|
229
234
|
const t = dataNodeType.value
|
|
230
235
|
if (!t) return null
|
|
231
|
-
|
|
232
|
-
return {
|
|
233
|
-
type: 'object',
|
|
234
|
-
properties: {
|
|
235
|
-
...(t.inputSchema?.properties ?? {}),
|
|
236
|
-
...(t.configSchema.properties ?? {}),
|
|
237
|
-
},
|
|
238
|
-
required: [
|
|
239
|
-
...(t.inputSchema?.required ?? []),
|
|
240
|
-
...(t.configSchema.required ?? []),
|
|
241
|
-
],
|
|
242
|
-
}
|
|
236
|
+
return dataNodeSchema(t)
|
|
243
237
|
}
|
|
244
238
|
return (
|
|
245
239
|
(props.nodeKinds.find((k) => k.kind === n.kind)?.meta.ui?.configSchema as
|
|
@@ -285,12 +279,7 @@ function fieldLabel(name: string, prop: JsonSchemaProperty): string {
|
|
|
285
279
|
const key = `dms_automation.editor.inspector.fields.${name}`
|
|
286
280
|
if (te(key)) return t(key)
|
|
287
281
|
if (prop.title) return prop.title
|
|
288
|
-
|
|
289
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
290
|
-
.replace(/[_-]+/g, ' ')
|
|
291
|
-
.toLowerCase()
|
|
292
|
-
.replace(/\b(id|url)(s?)\b/g, (_, word: string, plural: string) => word.toUpperCase() + plural)
|
|
293
|
-
return words.charAt(0).toUpperCase() + words.slice(1)
|
|
282
|
+
return nameInWords(name)
|
|
294
283
|
}
|
|
295
284
|
|
|
296
285
|
// Under a schedule: when it fires next, in the server's time zone. The
|
|
@@ -339,58 +328,6 @@ function getValue(field: string): unknown {
|
|
|
339
328
|
return props.node?.config?.[field]
|
|
340
329
|
}
|
|
341
330
|
|
|
342
|
-
function asString(v: unknown): string {
|
|
343
|
-
if (v === undefined || v === null) return ''
|
|
344
|
-
if (typeof v === 'string') return v
|
|
345
|
-
return String(v)
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
function asNumber(v: unknown): number | undefined {
|
|
349
|
-
if (v === undefined || v === null || v === '') return undefined
|
|
350
|
-
const n = Number(v)
|
|
351
|
-
return Number.isNaN(n) ? undefined : n
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function asBool(v: unknown): boolean {
|
|
355
|
-
return !!v
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// Returns true if `prop.type` is `"string"` OR an array of scalar types that
|
|
359
|
-
// includes `"string"`. Used to render a plain string input instead of a JSON
|
|
360
|
-
// textarea for multi-type fields like compare-node ports. A type that also
|
|
361
|
-
// takes an object or an array (an HTTP body) keeps the JSON editor, which
|
|
362
|
-
// still accepts plain text.
|
|
363
|
-
function isStringish(prop: JsonSchemaProperty): boolean {
|
|
364
|
-
const t = prop.type
|
|
365
|
-
if (t === 'string') return true
|
|
366
|
-
if (Array.isArray(t)) return t.includes('string') && !t.includes('object') && !t.includes('array')
|
|
367
|
-
return false
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
function isNumberish(prop: JsonSchemaProperty): boolean {
|
|
371
|
-
const t = prop.type
|
|
372
|
-
if (t === 'number' || t === 'integer') return true
|
|
373
|
-
if (Array.isArray(t) && (t.includes('number') || t.includes('integer')) && !t.includes('string')) return true
|
|
374
|
-
return false
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
function isBoolish(prop: JsonSchemaProperty): boolean {
|
|
378
|
-
const t = prop.type
|
|
379
|
-
if (t === 'boolean') return true
|
|
380
|
-
if (Array.isArray(t) && t.includes('boolean') && !t.includes('string') && !t.includes('number')) return true
|
|
381
|
-
return false
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
function arrayToText(v: unknown): string {
|
|
385
|
-
if (Array.isArray(v)) return v.map((x) => String(x)).join('\n')
|
|
386
|
-
if (typeof v === 'string') return v
|
|
387
|
-
return ''
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function textToArray(s: string): string[] {
|
|
391
|
-
return s.split('\n').map((x) => x.trim()).filter((x) => x.length > 0)
|
|
392
|
-
}
|
|
393
|
-
|
|
394
331
|
|
|
395
332
|
function onUnwire(field: string) {
|
|
396
333
|
emit('unwire', { field })
|
|
@@ -444,49 +381,20 @@ function onUnwire(field: string) {
|
|
|
444
381
|
{{ issueText }}
|
|
445
382
|
</div>
|
|
446
383
|
|
|
447
|
-
<
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
/>
|
|
454
|
-
<span class="font-mono text-xs text-muted">{{ describeDuration(runStep.durationMs) }}</span>
|
|
455
|
-
</div>
|
|
456
|
-
<p v-if="runLabel" class="text-xs text-muted">{{ runLabel }}</p>
|
|
457
|
-
<div class="flex flex-col gap-1">
|
|
458
|
-
<span class="font-mono text-[10.5px] text-dimmed uppercase">{{ $t('dms_automation.trace.input') }}</span>
|
|
459
|
-
<pre class="max-h-56 overflow-auto rounded-md bg-elevated p-2 font-mono text-xs break-all whitespace-pre-wrap text-toned">{{ prettyJson(unwrap(runStep.inputs)) || '—' }}</pre>
|
|
460
|
-
</div>
|
|
461
|
-
<div class="flex flex-col gap-1">
|
|
462
|
-
<span class="font-mono text-[10.5px] text-dimmed uppercase">
|
|
463
|
-
{{ runStep.status === 'failed' ? $t('dms_automation.trace.error') : $t('dms_automation.trace.output') }}
|
|
464
|
-
</span>
|
|
465
|
-
<pre
|
|
466
|
-
class="max-h-56 overflow-auto rounded-md bg-elevated p-2 font-mono text-xs break-all whitespace-pre-wrap"
|
|
467
|
-
:class="runStep.status === 'failed' ? 'text-error' : 'text-toned'"
|
|
468
|
-
>{{ runStep.status === 'failed' ? runStep.error : prettyJson(unwrap(runStep.output)) || '—' }}</pre>
|
|
469
|
-
</div>
|
|
470
|
-
<UButton v-if="runTraceUrl" size="xs" variant="ghost" color="neutral" trailing-icon="i-ph-arrow-up-right" :to="runTraceUrl" class="self-start">
|
|
471
|
-
{{ $t('dms_automation.trace.openFull') }}
|
|
472
|
-
</UButton>
|
|
473
|
-
</div>
|
|
384
|
+
<NodeInspectorRun
|
|
385
|
+
v-if="tab === 'run' && runStep"
|
|
386
|
+
:run-step="runStep"
|
|
387
|
+
:run-label="runLabel"
|
|
388
|
+
:run-trace-url="runTraceUrl"
|
|
389
|
+
/>
|
|
474
390
|
|
|
475
|
-
<
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
<span class="font-mono text-[10.5px] text-dimmed uppercase">{{ $t('dms_automation.editor.inspector.branches') }}</span>
|
|
483
|
-
<p class="font-mono text-xs text-toned">{{ branches.join(' · ') }}</p>
|
|
484
|
-
</div>
|
|
485
|
-
<div class="flex flex-col gap-1">
|
|
486
|
-
<span class="font-mono text-[10.5px] text-dimmed uppercase">{{ $t('dms_automation.library.outputs') }}</span>
|
|
487
|
-
<DmsAutomationSchemaTable :schema="outputSchema" />
|
|
488
|
-
</div>
|
|
489
|
-
</div>
|
|
391
|
+
<NodeInspectorDocs
|
|
392
|
+
v-else-if="tab === 'docs'"
|
|
393
|
+
:description="typeDescription"
|
|
394
|
+
:input-schema="inputSchema"
|
|
395
|
+
:branches="branches"
|
|
396
|
+
:output-schema="outputSchema"
|
|
397
|
+
/>
|
|
490
398
|
|
|
491
399
|
<div v-else class="flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4">
|
|
492
400
|
<UButton
|