Feat/environment variables in workflow (#6515)
Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
import type { VariableAssignerNodeType } from './nodes/variable-assigner/types'
|
||||
import type {
|
||||
Edge,
|
||||
EnvironmentVariable,
|
||||
HistoryWorkflowData,
|
||||
Node,
|
||||
RunFile,
|
||||
@@ -59,6 +60,7 @@ type Shape = {
|
||||
edges: Edge[]
|
||||
viewport: Viewport
|
||||
features: Record<string, any>
|
||||
environmentVariables: EnvironmentVariable[]
|
||||
}
|
||||
setBackupDraft: (backupDraft?: Shape['backupDraft']) => void
|
||||
notInitialWorkflow: boolean
|
||||
@@ -82,6 +84,12 @@ type Shape = {
|
||||
setShortcutsDisabled: (shortcutsDisabled: boolean) => void
|
||||
showDebugAndPreviewPanel: boolean
|
||||
setShowDebugAndPreviewPanel: (showDebugAndPreviewPanel: boolean) => void
|
||||
showEnvPanel: boolean
|
||||
setShowEnvPanel: (showEnvPanel: boolean) => void
|
||||
environmentVariables: EnvironmentVariable[]
|
||||
setEnvironmentVariables: (environmentVariables: EnvironmentVariable[]) => void
|
||||
envSecrets: Record<string, string>
|
||||
setEnvSecrets: (envSecrets: Record<string, string>) => void
|
||||
selection: null | { x1: number; y1: number; x2: number; y2: number }
|
||||
setSelection: (selection: Shape['selection']) => void
|
||||
bundleNodeSize: { width: number; height: number } | null
|
||||
@@ -190,6 +198,12 @@ export const createWorkflowStore = () => {
|
||||
setShortcutsDisabled: shortcutsDisabled => set(() => ({ shortcutsDisabled })),
|
||||
showDebugAndPreviewPanel: false,
|
||||
setShowDebugAndPreviewPanel: showDebugAndPreviewPanel => set(() => ({ showDebugAndPreviewPanel })),
|
||||
showEnvPanel: false,
|
||||
setShowEnvPanel: showEnvPanel => set(() => ({ showEnvPanel })),
|
||||
environmentVariables: [],
|
||||
setEnvironmentVariables: environmentVariables => set(() => ({ environmentVariables })),
|
||||
envSecrets: {},
|
||||
setEnvSecrets: envSecrets => set(() => ({ envSecrets })),
|
||||
selection: null,
|
||||
setSelection: selection => set(() => ({ selection })),
|
||||
bundleNodeSize: null,
|
||||
|
Reference in New Issue
Block a user