This commit is contained in:
Ruben Fiszel
2024-03-13 02:18:14 +01:00
parent 03e4fbb013
commit b017fb6ec8
4 changed files with 22 additions and 2 deletions
@@ -390,7 +390,7 @@
showSchemaExplorer
/>
{:else if arg.expr != undefined}
<div class="border rounded mt-2 border-gray-300">
<div class="border mt-2">
<SimpleEditor
bind:this={monaco}
bind:code={arg.expr}
@@ -102,7 +102,14 @@
previousId: undefined,
hasResume: false
},
extraLib: ''
extraLib: `
declare const error: {
message: string
name: string
stack: string
}
`
}
: getStepPropPicker(
$flowStateStore,
+12
View File
@@ -138,6 +138,15 @@ export async function main(message: string, name: string) {
}
`
export const BUN_FAILURE_MODULE_CODE = `
export async function main(message: string, name: string) {
const flow_id = process.env.WM_FLOW_JOB_ID
console.log("message", message)
console.log("name",name)
return { message, flow_id }
}
`
export const POSTGRES_INIT_CODE = `-- to pin the database use '-- database f/your/path'
-- $1 name1 = default arg
-- $2 name2
@@ -403,10 +412,13 @@ export function initialCode(
} else if (language == 'bun') {
if (kind === 'approval') {
return BUN_INIT_CODE_APPROVAL
} else if (kind === 'failure') {
return BUN_FAILURE_MODULE_CODE
}
if (subkind === 'flow') {
return BUN_INIT_CODE_CLEAR
}
return BUN_INIT_CODE
} else {
if (kind === 'failure') {
@@ -208,6 +208,7 @@
<Alert type="warning" title="Adding a form to the approval page is an EE feature" />
{:else}
<SchemaForm
noVariablePicker
bind:isValid={valid}
schema={mergeSchema(schema, enum_payload)}
bind:args={default_payload}