From d84ee0f1e8c34557300bb46a38cf0a00372322da Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 26 Nov 2026 12:04:17 -0800 Subject: [PATCH 1/2] fix(workflow-code): decode JSON-text input mappings, keep wiring beside its blocks, add source find - A Workflow block's inputMapping (and any native object/list field) stored as JSON text by the operations route printed as a t`` template that never type-checks; an untouched directory passed only because check suppresses errors in files still as get wrote them. Canonicalize now decodes the container and materialize keeps the stored text encoding. Deploy-change detection treats the two encodings as one value. - The printer emits each wiring statement under the last-declared block it names, so a block's edges sit next to it instead of ~1000 lines away in a 192-block workflow. - New `sim workflows source find `: a block's code with line numbers, function file, incoming/outgoing wiring and readers, offline. - The operations batch cap error says how to split a larger edit. --- apps/docs/content/docs/cli/reference.mdx | 32 ++ apps/docs/content/docs/cli/workflows.mdx | 32 ++ .../docs/workflows/code/coding-agents.mdx | 1 + apps/sim/lib/api/contracts/v2/workflows.ts | 7 +- .../lib/workflows/canonical/subblock-value.ts | 14 +- .../workflows/code/api-built-source.test.ts | 44 ++- .../lib/workflows/code/catalog/value-kind.ts | 15 + .../code/corpus/typecheck.corpus.test.ts | 1 - .../sim-cli/src/commands/protocol/index.ts | 2 + .../src/commands/protocol/source-check.ts | 2 +- .../src/commands/protocol/workflow-dir.ts | 1 + .../protocol/workflow-source-find.test.ts | 117 +++++++ .../commands/protocol/workflow-source-find.ts | 300 ++++++++++++++++++ .../protocol/workflow-source-params.ts | 2 +- packages/workflow-code/DESIGN.md | 3 + .../workflow-code/src/canonicalize/params.ts | 42 ++- packages/workflow-code/src/index.ts | 2 +- .../src/print/__golden__/agent-tools.txt | 1 - .../src/print/__golden__/block-meta.txt | 3 +- .../__golden__/branch-titles-and-extra.txt | 3 +- .../print/__golden__/branches-null-rows.txt | 5 +- .../print/__golden__/comments-at-anchors.txt | 5 +- .../src/print/__golden__/fan-out-wrapping.txt | 1 - .../src/print/__golden__/function-files.txt | 5 +- .../print/__golden__/function-languages.txt | 5 +- .../src/print/__golden__/inactive-values.txt | 1 - .../src/print/__golden__/json-code-fields.txt | 3 +- .../src/print/__golden__/lock-order.txt | 3 +- .../src/print/__golden__/loop-foreach.txt | 6 +- .../src/print/__golden__/nested-subflows.txt | 6 +- .../src/print/__golden__/parallel-untyped.txt | 2 - .../print/__golden__/raw-and-odd-edges.txt | 5 +- .../__golden__/ref-cycle-literalized.txt | 3 +- .../src/print/__golden__/resource-nodes.txt | 3 +- .../src/print/__golden__/response-body.txt | 3 +- .../src/print/__golden__/router-routes.txt | 5 +- .../src/print/__golden__/stored-secrets.txt | 1 - .../src/print/__golden__/support-triage.txt | 11 +- .../print/__golden__/templates-and-paths.txt | 1 - .../__golden__/trigger-mode-builders.txt | 1 - .../print/__golden__/unresolved-tokens.txt | 1 - .../src/print/__golden__/vars-by-field.txt | 3 +- packages/workflow-code/src/print/edges.ts | 48 ++- packages/workflow-code/src/print/index.ts | 1 + packages/workflow-code/src/print/printer.ts | 58 ++-- .../workflow-code/src/print/scaling.test.ts | 22 +- 46 files changed, 718 insertions(+), 114 deletions(-) create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-find.ts diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 40020fded1e..80202cd3497 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8837,6 +8837,38 @@ Prints a builder in brief (an example call, the required params with types, the Exit codes: 0 printed; 1 no builder or namespace of that name (the closest one is named), or no cached catalog (run a get once). +### sim workflows source find + +Print a block's code, edges and readers with line numbers (offline) + +```bash +sim workflows source find [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `block` | Yes | Block name, key or identifier; a part of a name matches every block | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--dir ` | No | Workflow source directory to read. Defaults to `.`. | + + + +Prints each block the name matches, read from the directory alone (no request is made): its declaration in workflow.ts with line numbers, its function file, the wiring statements of its incoming and outgoing edges, and every block that reads its outputs (a param, a branch, or a function file's $ref), each as file:line. <block> is a block name (Security Score), its key (securityscore) or its identifier (securityScore); with no exact match, every block whose name contains it is printed (at most 20). Run it from a workflow source directory, or pass --dir. + +Exit codes: 0 printed; 1 no block matches (the closest name is suggested), or the directory is not a workflow source directory. + ### sim workflows get Get workflow diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index f6594928557..a3271b8e013 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1569,6 +1569,38 @@ Without --server, each file created, edited or deleted since the directory was r API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). +### Print a block's code, edges and readers with line numbers + +Offline. + +```bash +sim workflows source find [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `block` | Yes | Block name, key or identifier; a part of a name matches every block | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--dir ` | No | Workflow source directory to read. Defaults to `.`. | + + + +Prints each block the name matches, read from the directory alone (no request is made): its declaration in workflow.ts with line numbers, its function file, the wiring statements of its incoming and outgoing edges, and every block that reads its outputs (a param, a branch, or a function file's $ref), each as file:line. <block> is a block name (Security Score), its key (securityscore) or its identifier (securityScore); with no exact match, every block whose name contains it is printed (at most 20). Run it from a workflow source directory, or pass --dir. + +Exit codes: 0 printed; 1 no block matches (the closest name is suggested), or the directory is not a workflow source directory. + ### Print a builder's params and outputs from the cached block catalog Offline. diff --git a/apps/docs/content/docs/workflows/code/coding-agents.mdx b/apps/docs/content/docs/workflows/code/coding-agents.mdx index 6f8698decb2..b90191e1eed 100644 --- a/apps/docs/content/docs/workflows/code/coding-agents.mdx +++ b/apps/docs/content/docs/workflows/code/coding-agents.mdx @@ -32,6 +32,7 @@ For a whole workspace, use `sim workspaces source` with the same steps; see [Man ## Look things up +- `sim workflows source find ` prints one block of the workflow by name, key or identifier, from the directory without a request: its declaration with line numbers, its function file, its incoming and outgoing wiring and every block that reads its outputs, each as `file:line`. A part of a name prints every block it matches. - `sim workflows source params ` prints a builder in brief (an example call, the required params with types, the optional ones by name and the outputs) from the cached block catalog without a request. `--full` prints every param with its type, options, default and doc. A legacy builder names the one that replaces it, and a namespace such as `gmail` lists its builders. - `sim workflows source resources` lists the tables, knowledge bases, credentials, workflows, skills, custom tools, MCP servers and environment variable names the file can name. - `sim workflows source catalog` shows the block catalog the source is checked against. diff --git a/apps/sim/lib/api/contracts/v2/workflows.ts b/apps/sim/lib/api/contracts/v2/workflows.ts index 57a524f0802..97e3bb85082 100644 --- a/apps/sim/lib/api/contracts/v2/workflows.ts +++ b/apps/sim/lib/api/contracts/v2/workflows.ts @@ -3340,7 +3340,10 @@ export const v2ImportWorkflowContract = defineRouteContract({ */ export const MAX_WORKFLOW_GRAPH_BLOCKS = 2000 export const MAX_WORKFLOW_GRAPH_EDGES = 10_000 -/** Ceiling on one `POST /operations` batch. */ +/** + * Ceiling on one `POST /operations` batch: a bound on the request, the one transaction and the + * report an atomic batch writes, not on a workflow's size. A larger edit splits into batches. + */ export const MAX_WORKFLOW_EDIT_OPERATIONS = 200 /** Ceiling on the complete tool list assigned to one Agent block. */ export const MAX_AGENT_TOOLS_PER_BLOCK = 100 @@ -4342,7 +4345,7 @@ export const v2ApplyWorkflowOperationsBodySchema = z .min(1, 'operations cannot be empty') .max( MAX_WORKFLOW_EDIT_OPERATIONS, - `operations cannot exceed ${MAX_WORKFLOW_EDIT_OPERATIONS} entries` + `operations cannot exceed ${MAX_WORKFLOW_EDIT_OPERATIONS} entries: split the edit into batches of at most ${MAX_WORKFLOW_EDIT_OPERATIONS}, applied in turn (atomic covers one batch); a later batch names a block an earlier one added by the id in that apply's mintedBlockIds` ) .describe('Edits to apply, in a single batch.'), atomic: z diff --git a/apps/sim/lib/workflows/canonical/subblock-value.ts b/apps/sim/lib/workflows/canonical/subblock-value.ts index d2520bd338e..94dba83e193 100644 --- a/apps/sim/lib/workflows/canonical/subblock-value.ts +++ b/apps/sim/lib/workflows/canonical/subblock-value.ts @@ -1,3 +1,5 @@ +import { parseJsonContainer } from '@sim/workflow-code' +import { holdsNativeContainer } from '@/lib/workflows/code/catalog/value-kind' import { normalizedStringify, sanitizeInputFormat, @@ -56,6 +58,16 @@ export function shapeSubBlockValue( return shaped } +/** + * JSON text in a field that holds a container natively (an `inputMapping` the operations route + * stored as text) is that container: the executor parses both alike, so a change of encoding alone + * is no change to deploy. The diff view still shows the encoding (`shapeSubBlockValue`). + */ +function decodeNativeContainer(value: unknown, spec: CanonicalFieldSpec | undefined): unknown { + if (typeof value !== 'string' || !spec?.type || !holdsNativeContainer(spec.type)) return value + return parseJsonContainer(value) ?? value +} + /** * Resolves a stored subblock value to the configuration it actually represents. * @@ -80,7 +92,7 @@ export function canonicalizeSubBlockValue( stored: unknown, spec: CanonicalFieldSpec | undefined ): unknown { - const shaped = shapeSubBlockValue(subBlockId, stored, spec?.type) + const shaped = decodeNativeContainer(shapeSubBlockValue(subBlockId, stored, spec?.type), spec) /* * Root absence is canonicalized separately from structured values, where diff --git a/apps/sim/lib/workflows/code/api-built-source.test.ts b/apps/sim/lib/workflows/code/api-built-source.test.ts index 5ec3ed58947..05b78a84aa8 100644 --- a/apps/sim/lib/workflows/code/api-built-source.test.ts +++ b/apps/sim/lib/workflows/code/api-built-source.test.ts @@ -4,6 +4,9 @@ * unnamed input row) and a function block added through the operations route. */ +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import path from 'node:path' import { isRecordLike } from '@sim/utils/object' import { canonicalize, @@ -14,7 +17,7 @@ import { sourceFingerprint, } from '@sim/workflow-code' import type { WorkflowState } from '@sim/workflow-types/workflow' -import { describe, expect, it, vi } from 'vitest' +import { afterAll, describe, expect, it, vi } from 'vitest' vi.unmock('@/blocks/registry') vi.unmock('@/tools/metadata-outputs') @@ -22,6 +25,7 @@ vi.unmock('@/tools/registry') import { registryCatalog as catalog } from '@/lib/workflows/code/catalog/registry-catalog.test-helpers' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { typeCheckAgainstSdk, writeSdkTypes } from '@/lib/workflows/code/sdk-typecheck.test-helpers' import { buildDefaultWorkflowArtifacts } from '@/lib/workflows/defaults' import { createBlockFromParams } from '@/lib/workflows/editing/builders' @@ -126,3 +130,41 @@ describe('a workflow built by the editor and the API', () => { expect(JSON.stringify(run.state)).toBe(JSON.stringify(stored)) }) }) + +describe('a child workflow call whose input mapping the operations route stored as JSON text', () => { + const MAPPING = '{"ticketId":"","source":"api"}' + const workDir = mkdtempSync(path.join(tmpdir(), 'api-built-source-')) + afterAll(() => rmSync(workDir, { recursive: true, force: true })) + + function callWorkflow(): WorkflowState { + const stored = builtWorkflow() + const call = createBlockFromParams('call-block', { + type: 'workflow_input', + name: 'Record Audit', + inputs: { workflowId: 'child-workflow', inputMapping: MAPPING }, + }) + return { + ...stored, + blocks: { ...stored.blocks, [call.id]: { ...call, position: { x: 800, y: 0 } } }, + } + } + + it('prints source that type-checks after an edit, and stores the mapping as text as before', () => { + const stored = callWorkflow() + const untouched = getThenApply(stored) + expect(untouched.noop).toBe(true) + expect(untouched.state.blocks['call-block']?.subBlocks.inputMapping?.value).toBe(MAPPING) + + const renamed = (text: string) => text.replace("fn('Score'", "fn('Final Score'") + const remapped = (text: string) => text.replace("source: 'api'", "source: 'ops'") + const edited = getThenApply(stored, (text) => remapped(renamed(text))) + expect(edited.errors).toEqual([]) + expect(edited.state.blocks['call-block']?.subBlocks.inputMapping?.value).toBe( + MAPPING.replace('"api"', '"ops"') + ) + writeSdkTypes(workDir, catalog) + const file = path.join(workDir, 'workflow.ts') + writeFileSync(file, remapped(renamed(edited.text))) + expect(typeCheckAgainstSdk(workDir, 'edited', [file])).toBe('') + }, 120_000) +}) diff --git a/apps/sim/lib/workflows/code/catalog/value-kind.ts b/apps/sim/lib/workflows/code/catalog/value-kind.ts index 2c3e1b20342..668a556a4f5 100644 --- a/apps/sim/lib/workflows/code/catalog/value-kind.ts +++ b/apps/sim/lib/workflows/code/catalog/value-kind.ts @@ -4,6 +4,7 @@ import type { ParamStorage, ResourceKind, } from '@sim/workflow-code' +import { getOwn } from '@sim/workflow-code' import type { SubBlockConfig, SubBlockType } from '@/blocks/types' /** @@ -88,6 +89,20 @@ const TYPE_RULES: Record = { modal: { valueKind: 'none' }, } +/** + * Whether a field of `type` holds a JSON object or list natively: the editor writes the container, + * while the operations route and older editors may store the same container as JSON text, which + * the executor parses alike. + */ +export function holdsNativeContainer(type: string): boolean { + const rule = getOwn(TYPE_RULES, type) + return ( + (rule?.valueKind === 'object' || rule?.valueKind === 'array') && + rule.storage === undefined && + rule.structured === undefined + ) +} + /** * Derives a subBlock's value shape from its type plus the few config flags that change it: a * JSON-language code field holds JSON, a multi-select dropdown holds an array, a `readOnly` field diff --git a/apps/sim/lib/workflows/code/corpus/typecheck.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/typecheck.corpus.test.ts index f3130bdcb5f..3b14439bc23 100644 --- a/apps/sim/lib/workflows/code/corpus/typecheck.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/typecheck.corpus.test.ts @@ -50,7 +50,6 @@ const KNOWN_UNTYPED: ReadonlyArray<{ match: RegExp; cause: string }> = [ match: /:(response|human_in_the_loop|human_in_the_loop_v2):/, cause: 'a response format stored as text', }, - { match: /:workflow_input:/, cause: 'an input mapping stored as JSON text' }, { match: /^(operation|error-edge|variables):variables:/, cause: 'variable rows with no variableId', diff --git a/packages/sim-cli/src/commands/protocol/index.ts b/packages/sim-cli/src/commands/protocol/index.ts index ebd36748bea..96fc7f0415a 100644 --- a/packages/sim-cli/src/commands/protocol/index.ts +++ b/packages/sim-cli/src/commands/protocol/index.ts @@ -25,6 +25,7 @@ import { attachWorkflowRunGet } from './workflow-run-get' import { attachWorkflowRunWait } from './workflow-run-wait' import { attachWorkflowSourceApply, attachWorkflowSourceCreate } from './workflow-source-apply' import { attachWorkflowSourceCheck } from './workflow-source-check' +import { attachWorkflowSourceFind } from './workflow-source-find' import { attachWorkflowSourceGet } from './workflow-source-get' import { attachWorkflowSourceParams } from './workflow-source-params' import { attachWorkflowSourceDiff, attachWorkflowSourceStatus } from './workflow-source-status' @@ -107,6 +108,7 @@ export function attachProtocolCommands(program: Command): void { attachWorkflowSourceStatus(source) attachWorkflowSourceDiff(source) attachWorkflowSourceParams(source) + attachWorkflowSourceFind(source) const workspaces = group(program, 'workspaces') attachWorkspaceOperationWait(group(workspaces, 'operations')) diff --git a/packages/sim-cli/src/commands/protocol/source-check.ts b/packages/sim-cli/src/commands/protocol/source-check.ts index c2286f258bf..7087922b8dc 100644 --- a/packages/sim-cli/src/commands/protocol/source-check.ts +++ b/packages/sim-cli/src/commands/protocol/source-check.ts @@ -464,7 +464,7 @@ function declarationFindings( * `catalog`, checking env names against `envNames` (what `secrets.ts` declares) when given. Its * calls are untyped: {@link compiledWithChildResults} types them. */ -async function compileWorkflowDir( +export async function compileWorkflowDir( dir: string, workspaceCatalog: BlockCatalog, envNames?: ReadonlySet, diff --git a/packages/sim-cli/src/commands/protocol/workflow-dir.ts b/packages/sim-cli/src/commands/protocol/workflow-dir.ts index ff4d648a681..4b0c143e261 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-dir.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-dir.ts @@ -265,6 +265,7 @@ Editing the \`workflow('…')\` name or description renames or redescribes the w ## Finding a builder and its types +- \`sim workflows source find \`: one block of this workflow by name, key or identifier, from the directory alone: its declaration with line numbers, its function file, its incoming and outgoing wiring and every block that reads its outputs, each as file:line. A part of a name prints every block it matches (\`find 'Fetch Policy'\`). Use it instead of searching a long \`${SOURCE_ENTRY_FILE}\`. - \`sim workflows source params \`: one builder's params (required first, enums, defaults) and outputs; a namespace (\`gmail\`) lists its builders; a miss names the closest. Builders are named for the service, not the block type: \`gmail_v2\` is \`gmail.*\`, \`workflow_input\` is \`runWorkflow\`, the HTTP request block is \`api\`, and \`legacy.*\` builders are old versions not to write. - \`${SDK_DIR}/core.d.ts\`: the SDK (\`workflow\`, \`t\`, \`env\`, \`credential\`, \`table\`, \`loop\`, \`parallel\`, \`BlockMeta\`). - \`${SDK_DIR}/blocks/.d.ts\`: the builders of a block the source uses, with their params and outputs (check adds the file of a block an edit starts using). Do not read them, or \`${SDK_DIR}/models.d.ts\`, whole: \`params\` prints the part you need, and \`grep\` finds a model id. diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts new file mode 100644 index 00000000000..117ec58bc0c --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts @@ -0,0 +1,117 @@ +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { Command } from 'commander' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { cacheCatalogText } from '../../test/catalog-cache' +import { contextMockFns, mockedProfile } from '../../test/context-mock' +import { attachWorkflowSourceFind } from './workflow-source-find' + +vi.mock('../../context', async () => (await import('../../test/context-mock')).contextMock) + +/** A real catalog projected from registry blocks, shared with the SDK's own type checks. */ +const FIXTURE_TEXT = readFileSync( + join(__dirname, '../../../../workflow-sdk/test/fixtures/catalog.json'), + 'utf8' +) + +const WORKFLOW_TS = `// @sim-sdk 1 +import { api, codeFile, condition, fn, js, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('W', {}, () => { + const start = trigger.start('Start', { inputFormat: { url: { type: 'string' } } }) + const fetchPolicy = api('Fetch Policy', { url: start.url, method: 'GET' }) + start.to(fetchPolicy) + const score = fn('Score', { code: codeFile('./functions/score.js') }) + fetchPolicy.to(score) + const fallback = fn('Fallback', { code: js\`return 0\` }) + fetchPolicy.onError(fallback) + const gate = condition('Gate', { if: js\`\${fetchPolicy.status} === 200\`, else: true }) + score.to(gate) +}) +` + +let dir: string + +async function find(...argv: string[]): Promise { + const source = new Command('source') + attachWorkflowSourceFind(source) + source.commands.forEach((command) => command.exitOverride()) + await source.parseAsync(['node', 'source', 'find', ...argv, '--dir', dir]) +} + +function stdoutJson(): { blocks: Array> } { + const calls = vi.mocked(console.log).mock.calls + expect(calls).toHaveLength(1) + return JSON.parse(calls[0].join(' ')) +} + +/** The 1-based line of `text` in the workflow file. */ +function lineOf(text: string): number { + return WORKFLOW_TS.split('\n').findIndex((line) => line.includes(text)) + 1 +} + +beforeEach(() => { + dir = mkdtempSync(join(tmpdir(), 'sim-source-find-')) + mkdirSync(join(dir, '.sim')) + mkdirSync(join(dir, 'functions')) + writeFileSync(join(dir, 'workflow.ts'), WORKFLOW_TS) + writeFileSync(join(dir, 'functions/score.js'), 'const s = 1\nreturn $ref.fetchpolicy.data\n') + vi.stubEnv('SIM_CONFIG_DIR', join(dir, 'config')) + cacheCatalogText(join(dir, 'config'), null, FIXTURE_TEXT) + writeFileSync( + join(dir, '.sim/base.json'), + JSON.stringify({ + version: 1, + workflowId: 'wf', + workspaceId: 'ws_find', + fingerprint: 'sf1:a', + catalogHash: JSON.parse(FIXTURE_TEXT).hash, + }) + ) + contextMockFns.mockProfileFrom.mockReturnValue({ ...mockedProfile(), output: 'json' }) + contextMockFns.mockRequest.mockReset() + vi.spyOn(console, 'log').mockImplementation(() => {}) +}) + +afterEach(() => { + rmSync(dir, { recursive: true, force: true }) +}) + +describe('sim workflows source find', () => { + it("locates a block's declaration, edges and readers by line without a request", async () => { + await find('Fetch Policy') + const [block] = stdoutJson().blocks + expect(block).toMatchObject({ + key: 'fetchpolicy', + ident: 'fetchPolicy', + file: 'workflow.ts', + line: lineOf("api('Fetch Policy'"), + incoming: [{ block: 'Start', line: lineOf('start.to(fetchPolicy)') }], + outgoing: [ + { block: 'Score', port: 'out', line: lineOf('fetchPolicy.to(score)') }, + { block: 'Fallback', port: 'error', line: lineOf('fetchPolicy.onError(fallback)') }, + ], + readers: [ + { block: 'Score', file: 'functions/score.js', line: 2 }, + { block: 'Gate', file: 'workflow.ts', line: lineOf("condition('Gate'") }, + ], + }) + expect(contextMockFns.mockRequest).not.toHaveBeenCalled() + }) + + it('takes a key or identifier, and prints every block a part of a name matches', async () => { + await find('fetchPolicy') + expect(stdoutJson().blocks.map((block) => block.name)).toEqual(['Fetch Policy']) + vi.mocked(console.log).mockClear() + await find('o') + expect(stdoutJson().blocks.map((block) => block.name)).toEqual(['Fetch Policy', 'Score']) + }) + + it('refuses a name no block has, suggesting the closest', async () => { + await expect(find('Fetch Polcy')).rejects.toMatchObject({ + code: 'BLOCK_UNKNOWN', + message: expect.stringContaining('Did you mean Fetch Policy?'), + }) + }) +}) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-find.ts b/packages/sim-cli/src/commands/protocol/workflow-source-find.ts new file mode 100644 index 00000000000..c6f39724d01 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-find.ts @@ -0,0 +1,300 @@ +import { compareStrings } from '@sim/utils/string' +import { collectStringLeaves } from '@sim/utils/workflow-references' +import { + type BlockKey, + type CanonicalBlock, + type CompileResult, + didYouMean, + encodeAnchor, + fromCodeFile, + LineIndex, + referencedHeads, + type StoredEdgeRef, +} from '@sim/workflow-code' +import { SOURCE_ENTRY_FILE } from '@sim/workflow-code/limits' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import type { Command } from 'commander' +import { printLine } from '#sim-cli/output/io' +import { actingProfileFrom } from '../../context' +import { CliUsageError } from './local-errors' +import { printProtocolResult } from './result' +import { compileWorkflowDir } from './source-check' +import { assertSourceDirKind, sourceRelativePath } from './source-dir' +import { isMachine } from './source-ui' +import { lookupCatalog } from './workflow-source-params' + +/** The most blocks one find prints, so a broad match stays readable. */ +const MAX_FOUND = 20 + +const FIND_HELP = ` +Prints each block the name matches, read from the directory alone (no request is made): its +declaration in workflow.ts with line numbers, its function file, the wiring statements of its +incoming and outgoing edges, and every block that reads its outputs (a param, a branch, or a +function file's $ref), each as file:line. is a block name (Security Score), its key +(securityscore) or its identifier (securityScore); with no exact match, every block whose name +contains it is printed (at most ${MAX_FOUND}). Run it from a workflow source directory, or pass --dir. + +Exit codes: 0 printed; 1 no block matches (the closest name is suggested), or the +directory is not a workflow source directory.` + +interface Located { + file: string + line: number +} + +interface FoundEdge extends Located { + block: string + port: StoredEdgeRef['port'] + statement: string +} + +interface Reader extends Located { + block: string + field: string +} + +interface FoundBlock extends Located { + name: string + key: BlockKey + ident: string + type: string | null + endLine: number + codeFile: string | null + incoming: FoundEdge[] + outgoing: FoundEdge[] + readers: Reader[] +} + +const byLine = (a: Located, b: Located) => compareStrings(a.file, b.file) || a.line - b.line + +/** A compiled source directory, each file's lines indexed once, with the lookups find needs. */ +class SourceIndex { + private readonly indexes = new Map() + + constructor( + readonly compiled: CompileResult, + private readonly files: Readonly> + ) {} + + keys(): BlockKey[] { + return Object.keys(this.compiled.hints.blocks) + } + + nameOf(key: BlockKey): string { + return this.compiled.workflow?.blocks[key]?.name ?? key + } + + identOf(key: BlockKey): string { + return this.compiled.hints.blocks[key]?.ident ?? key + } + + codeFileOf(key: BlockKey): string | null { + const path = this.compiled.hints.blocks[key]?.codeFile + return path ? sourceRelativePath(path) : null + } + + span(anchor: Parameters[0]) { + return this.compiled.spans[encodeAnchor(anchor)] + } + + /** The line index of `file` (split as compile counts lines), or `null` when it is not read. */ + linesOf(file: string): LineIndex | null { + const text = this.files[file] + if (text === undefined) return null + let index = this.indexes.get(file) + if (!index) { + index = new LineIndex(text) + this.indexes.set(file, index) + } + return index + } +} + +/** Every string a block's params, branches and subflow config hold, by the field that holds it. */ +function blockFields(block: CanonicalBlock): Array<{ field: string; texts: string[] }> { + const fields: Array<{ field: string; value: unknown }> = Object.entries(block.params).map( + ([id, param]) => ({ field: id, value: param.kind === 'value' ? param.value : param.tools }) + ) + for (const row of block.branches?.rows ?? []) fields.push({ field: row.key, value: row.value }) + if (block.subflow) fields.push({ field: block.subflow.kind, value: block.subflow }) + return fields.map(({ field, value }) => { + const texts: string[] = [] + collectStringLeaves(value, texts) + return { field, texts } + }) +} + +/** + * Every block's readers, by the key they read, from one pass over the workflow: a function file + * by the lines its `$ref` names the block on, any other field by its span. + */ +function readersByKey(index: SourceIndex): Map { + const readers = new Map() + const add = (key: BlockKey, reader: Reader) => { + const list = readers.get(key) + if (list) list.push(reader) + else readers.set(key, [reader]) + } + for (const [readerKey, block] of Object.entries(index.compiled.workflow?.blocks ?? {})) { + const codeFile = index.codeFileOf(readerKey) + const codeLines = codeFile ? index.linesOf(codeFile) : null + for (const { field, texts } of blockFields(block)) { + const heads = new Set(texts.flatMap(referencedHeads)) + heads.delete(readerKey) + if (heads.size === 0) continue + const parsed = + field === 'code' && codeLines ? fromCodeFile(codeLines.text, 'javascript') : null + if (codeFile && codeLines && parsed?.ok) { + for (const ref of parsed.refs) { + const [head] = ref.kind === 'ref' ? ref.segments : [] + if (head?.kind !== 'name' || !heads.has(head.name)) continue + const { line } = codeLines.position(ref.start) + add(head.name, { block: block.name, field, file: codeFile, line }) + } + continue + } + const at = + index.span({ kind: 'param', block: readerKey, param: field }) ?? + index.span({ kind: 'block', block: readerKey }) + for (const head of heads) { + add(head, { + block: block.name, + field, + file: at?.file ?? SOURCE_ENTRY_FILE, + line: at?.line ?? 0, + }) + } + } + } + return readers +} + +/** + * The blocks `query` names: an exact key, identifier or name first, else every block whose name + * contains the query. + */ +function matchBlocks(index: SourceIndex, query: string): BlockKey[] { + const normalized = normalizeWorkflowBlockName(query) + const exact = index.keys().filter((key) => key === normalized || index.identOf(key) === query) + if (exact.length > 0) return exact + const needle = query.toLowerCase() + return index + .keys() + .filter((key) => key.includes(normalized) || index.nameOf(key).toLowerCase().includes(needle)) +} + +/** The refusal for a query no block matches, naming the closest block. */ +function unknownBlock(index: SourceIndex, query: string): CliUsageError { + const names = index + .keys() + .map((key) => index.nameOf(key)) + .sort(compareStrings) + const hint = didYouMean(query, names) ?? `It has ${names.length} blocks.` + return new CliUsageError(`No block is named ${query}. ${hint}`, { code: 'BLOCK_UNKNOWN' }) +} + +function describeBlock( + index: SourceIndex, + readers: ReadonlyMap, + key: BlockKey +): FoundBlock { + const span = index.span({ kind: 'block', block: key }) + const edge = (ref: StoredEdgeRef, other: BlockKey): FoundEdge => { + const at = index.span({ kind: 'edges', block: ref.from, port: ref.port }) + return { + block: index.nameOf(other), + port: ref.port, + file: at?.file ?? SOURCE_ENTRY_FILE, + line: at?.line ?? span?.line ?? 0, + statement: at + ? (index.linesOf(at.file)?.lines[at.line - 1]?.trim() ?? '') + : '(implied by the container)', + } + } + const { edges } = index.compiled + return { + name: index.nameOf(key), + key, + ident: index.identOf(key), + type: index.compiled.workflow?.blocks[key]?.type ?? null, + file: span?.file ?? SOURCE_ENTRY_FILE, + line: span?.line ?? 0, + endLine: span?.endLine ?? 0, + codeFile: index.codeFileOf(key), + incoming: edges + .filter((ref) => ref.to === key) + .map((ref) => edge(ref, ref.from)) + .sort(byLine), + outgoing: edges + .filter((ref) => ref.from === key) + .map((ref) => edge(ref, ref.to)) + .sort(byLine), + readers: [...(readers.get(key) ?? [])].sort(byLine), + } +} + +function printFound(index: SourceIndex, found: FoundBlock): void { + const kind = found.type ? `${found.type}, ` : '' + printLine(`${found.name} (${kind}key ${found.key}, ${found.ident})`) + const lines = index.linesOf(found.file)?.lines ?? [] + const width = String(found.endLine).length + for (let line = Math.max(found.line, 1); line <= found.endLine; line += 1) { + printLine(`${String(line).padStart(width)} ${lines[line - 1] ?? ''}`) + } + if (found.codeFile) printLine(`code: ${found.codeFile}`) + const section = (label: string, rows: string[]) => { + printLine(rows.length === 0 ? `${label}: none` : `${label}:`) + for (const row of rows) printLine(` ${row}`) + } + const edgeRow = (edge: FoundEdge) => `${edge.file}:${edge.line} ${edge.statement}` + section('in', found.incoming.map(edgeRow)) + section('out', found.outgoing.map(edgeRow)) + section( + 'read by', + found.readers.map( + (reader) => `${reader.file}:${reader.line} ${reader.block} (${reader.field})` + ) + ) +} + +/** + * `sim workflows source find [--dir ]`: one block's code, function file, edges and + * readers with their lines, from the directory alone, so locating a block in a long workflow is + * one command instead of rounds of search. + */ +export function attachWorkflowSourceFind(source: Command): void { + source + .command('find') + .argument('', 'Block name, key or identifier; a part of a name matches every block') + .option('--dir ', 'Workflow source directory to read', '.') + .allowExcessArguments(false) + .description("Print a block's code, edges and readers with line numbers (offline)") + .addHelpText('after', FIND_HELP) + .action(async (query: string, options: { dir: string }, command: Command) => { + const profile = actingProfileFrom(command) + await assertSourceDirKind(options.dir, 'workflow') + const catalog = await lookupCatalog(options.dir, profile) + const { compiled, files } = await compileWorkflowDir(options.dir, catalog) + const index = new SourceIndex(compiled, files) + const keys = matchBlocks(index, query) + if (keys.length === 0) throw unknownBlock(index, query) + const readers = readersByKey(index) + const found = keys + .slice(0, MAX_FOUND) + .map((key) => describeBlock(index, readers, key)) + .sort(byLine) + const more = keys.length - found.length + if (isMachine(profile.output)) { + printProtocolResult(profile.output, { blocks: found, ...(more > 0 ? { more } : {}) }) + return + } + if (compiled.workflow === null) { + printLine('The source has compile errors, so readers are left out: run `source check`.') + } + found.forEach((block, position) => { + if (position > 0) printLine('') + printFound(index, block) + }) + if (more > 0) printLine(`\n${more} more blocks match; name one exactly to print it.`) + }) +} diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-params.ts b/packages/sim-cli/src/commands/protocol/workflow-source-params.ts index 9847a95445f..5af09c65914 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-params.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-params.ts @@ -33,7 +33,7 @@ cached catalog (run a get once).` * The catalog the directory was printed with (its `.sim/base.json` hash), else the one cached for * the workspace it records ({@link recordedWorkspace}), or the profile's. */ -async function lookupCatalog( +export async function lookupCatalog( dir: string, profile: Pick ): Promise { diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index dcab92c9f3f..dca5b69e8f7 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -310,6 +310,9 @@ print compiles with zero errors. - Blocks are declared in topological order per scope; ties sort by trigger first, then hint `order`, then key. A ref that would point forward (a ref cycle) prints as literal text (`W_FORWARD_REF_LITERALIZED`). +- Each wiring statement prints right under the last-declared block it names, so a block's incoming + edges sit under its declaration and its outgoing ones under each target: finding a block's edges + in a long file needs no search. Compile takes wiring anywhere after the blocks it names. - Idents come from hints, else `assignIdentifiers`. - Only active values print, and none equal to its default. A pair prints under its `canonicalParamId` (or its alias) and the value kind alone picks the member (see SYNTAX.md "Pair diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts index 990f9893d97..7e57f690218 100644 --- a/packages/workflow-code/src/canonicalize/params.ts +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -55,28 +55,47 @@ export function surfaceDeclaration( return declarations.find((subBlock) => subBlock.surface === surface) ?? declarations[0] } -/** Whether canonicalize decodes this subBlock's JSON text (structured or json-string storage). */ +/** Whether a field always holds JSON text: a structured value or json-string storage. */ +function holdsJsonText(declaration: CatalogSubBlock): boolean { + return declaration.structured !== undefined || declaration.storage === 'json-string' +} + +/** + * A native object or list field (a child workflow's `inputMapping`, a message list). The operations + * route and older editors may store it as JSON text, which would never type-check if printed as + * text, so it decodes like a structured field; text that does not parse is a value of its own (a + * reference to a whole list), not a warning. + */ +function holdsNativeContainer(declaration: CatalogSubBlock): boolean { + return ( + !holdsJsonText(declaration) && + (declaration.valueKind === 'object' || declaration.valueKind === 'array') + ) +} + +/** Whether canonicalize decodes this subBlock's JSON text. */ export function shouldDecode(declaration: CatalogSubBlock | undefined): boolean { if (!declaration || declaration.neverDecoded === true) return false - return declaration.structured !== undefined || declaration.storage === 'json-string' + return holdsJsonText(declaration) || holdsNativeContainer(declaration) } /** - * JSON text of a structured field, decoded. Only an object or array counts + * JSON text of a structured or native-container field, decoded. Only an object or array counts * as decoded, so a scalar-looking string stays the string it is. Blank text is the untouched - * sentinel and stays as is; other text that does not parse is kept with - * `W_CANON_UNDECODABLE_JSON`. The encoding is not recorded: the CWM is encoding-free and - * materialize keeps prev's. + * sentinel and stays as is; other text that does not parse is kept, with + * `W_CANON_UNDECODABLE_JSON` unless the field is a native container. The encoding is not + * recorded: the CWM is encoding-free and materialize keeps prev's. */ function decodeStructured( raw: unknown, + declaration: CatalogSubBlock, blockKey: BlockKey, - param: string, context: CanonContext ): unknown { if (typeof raw !== 'string' || raw.trim() === '') return raw const parsed = parseJsonContainer(raw) - if (parsed) return parsed + if (parsed || holdsNativeContainer(declaration)) return parsed ?? raw + const param = declaration.id context.diagnostics.push( diagnostic( 'W_CANON_UNDECODABLE_JSON', @@ -187,9 +206,10 @@ export function canonicalParams(inputs: ParamInputs, context: CanonContext): Par ) } - const decoded = shouldDecode(declaration) - ? decodeStructured(raw, blockKey, id, context) - : decodeLegacyScalar(raw, declaration, catalog) + const decoded = + declaration && shouldDecode(declaration) + ? decodeStructured(raw, declaration, blockKey, context) + : decodeLegacyScalar(raw, declaration, catalog) const location = { blockKey, param: id } if (declaration?.structured === 'tools' && Array.isArray(decoded)) { diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 3539821e7eb..f93bbb883af 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -127,7 +127,7 @@ export type { Value, } from './model' export { isResourceKind } from './model' -export { assignIdentifiers, printWorkflow } from './print' +export { assignIdentifiers, printWorkflow, referencedHeads } from './print' export { hasSuspiciousCharacter, printKey, printNumber, quoteString } from './print/strings' export { getOwn, invertRecord, parseJsonContainer, setOrDelete, setOwn } from './records' export { diff --git a/packages/workflow-code/src/print/__golden__/agent-tools.txt b/packages/workflow-code/src/print/__golden__/agent-tools.txt index 70555bb7b27..46b784d492e 100644 --- a/packages/workflow-code/src/print/__golden__/agent-tools.txt +++ b/packages/workflow-code/src/print/__golden__/agent-tools.txt @@ -52,6 +52,5 @@ export default workflow('Fixture', {}, () => { childWorkflow('enrich-lead').asTool({ usageControl: 'auto' }), ], }) - start.to(assistant) }) diff --git a/packages/workflow-code/src/print/__golden__/block-meta.txt b/packages/workflow-code/src/print/__golden__/block-meta.txt index 49de809c641..844aec64eb9 100644 --- a/packages/workflow-code/src/print/__golden__/block-meta.txt +++ b/packages/workflow-code/src/print/__golden__/block-meta.txt @@ -5,6 +5,7 @@ export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const flaky = api('Flaky', { url: 'https://b.test', method: todo() }) const fallback = response('Fallback', {}) + flaky.onError(fallback) const guarded = api( 'Guarded', { url: 'https://a.test', method: 'POST' }, @@ -16,7 +17,5 @@ export default workflow('Fixture', {}, () => { retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, } ) - start.to(flaky, guarded) - flaky.onError(fallback) }) diff --git a/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt index 5faf04dd8f2..acd679779d1 100644 --- a/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt +++ b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt @@ -8,9 +8,8 @@ export default workflow('Fixture', {}, () => { { big: js`${start.amount} > 100`, elseIf0: js``, else: js`true` }, { branches: { big: { title: 'Large amount' }, elseIf0: { extra: { legacyFlag: true } } } } ) - const done = response('Done', {}) - start.to(check) + const done = response('Done', {}) check.big.to(done) check.elseIf0.to(done) check.else.to(done) diff --git a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt index c34da9dd8d5..245522eb192 100644 --- a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt +++ b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt @@ -4,10 +4,9 @@ import { condition, response, router, trigger, workflow } from '@sim/workflow-sd export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const gate = condition('Gate', {}) - const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} }) - const yes = response('Yes', {}) - start.to(gate) + const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} }) gate.if.to(pick) + const yes = response('Yes', {}) pick.route0.to(yes) }) diff --git a/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt index 5111a801abc..4de03d1649c 100644 --- a/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt +++ b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt @@ -19,13 +19,12 @@ export default workflow( // tuned 2026-10 temperature: 0.5, }) // see runbook + // Wiring + start.to(classify) /** * Final reply. */ const done = response('Done', {}) - - // Wiring - start.to(classify) classify.to(done) // happy path } ) diff --git a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt index 829a1cb1b0b..29b9cfa2632 100644 --- a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt +++ b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt @@ -14,7 +14,6 @@ export default workflow('Fixture', {}, () => { }) const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test', method: todo() }) const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test', method: todo() }) - start.to( archiveRawPayload, enrichCompanyProfile, diff --git a/packages/workflow-code/src/print/__golden__/function-files.txt b/packages/workflow-code/src/print/__golden__/function-files.txt index 0f3cab68ef4..8d78c03a332 100644 --- a/packages/workflow-code/src/print/__golden__/function-files.txt +++ b/packages/workflow-code/src/print/__golden__/function-files.txt @@ -4,10 +4,9 @@ import { codeFile, fn, raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: { total: 'number' } }) const jsCode = fn('Js code', { code: codeFile('./functions/js-code.js') }) - const pyCode = fn('Py code', { language: 'python', code: codeFile('./functions/py-code.py') }) - const shCode = fn('Sh code', { language: raw('shell'), code: codeFile('./functions/sh-code.sh') }) - start.to(jsCode) + const pyCode = fn('Py code', { language: 'python', code: codeFile('./functions/py-code.py') }) jsCode.to(pyCode) + const shCode = fn('Sh code', { language: raw('shell'), code: codeFile('./functions/sh-code.sh') }) pyCode.to(shCode) }) diff --git a/packages/workflow-code/src/print/__golden__/function-languages.txt b/packages/workflow-code/src/print/__golden__/function-languages.txt index 014386df735..2c7b3aa570c 100644 --- a/packages/workflow-code/src/print/__golden__/function-languages.txt +++ b/packages/workflow-code/src/print/__golden__/function-languages.txt @@ -8,15 +8,14 @@ export default workflow('Fixture', {}, () => { // keep \`ticks\` and \${braces} return total`, }) + start.to(jsCode) const pyCode = fn('Py code', { language: 'python', code: py`def main(): return ${start.total} `, }) - const shCode = fn('Sh code', { language: raw('shell'), code: sh`echo "${env.HOME_DIR}"` }) - - start.to(jsCode) jsCode.to(pyCode) + const shCode = fn('Sh code', { language: raw('shell'), code: sh`echo "${env.HOME_DIR}"` }) pyCode.to(shCode) }) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.txt b/packages/workflow-code/src/print/__golden__/inactive-values.txt index 406dd72ab76..428e27e3632 100644 --- a/packages/workflow-code/src/print/__golden__/inactive-values.txt +++ b/packages/workflow-code/src/print/__golden__/inactive-values.txt @@ -4,6 +4,5 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const remember = agent('Remember', { model: 'm', memoryType: 'none' }) - start.to(remember) }) diff --git a/packages/workflow-code/src/print/__golden__/json-code-fields.txt b/packages/workflow-code/src/print/__golden__/json-code-fields.txt index 1f018992f1f..0bb781e6101 100644 --- a/packages/workflow-code/src/print/__golden__/json-code-fields.txt +++ b/packages/workflow-code/src/print/__golden__/json-code-fields.txt @@ -12,6 +12,7 @@ export default workflow('Fixture', {}, () => { }`, }) const sugared = agent('Sugared', { model: 'm', responseFormat: { name: 'ticket', strict: true } }) + start.to(sugared) const typedRefs = table.insertRow('Typed refs', { tableId: table('tickets'), data: { @@ -22,6 +23,4 @@ export default workflow('Fixture', {}, () => { tags: ['a', start.count], }, }) - - start.to(sugared) }) diff --git a/packages/workflow-code/src/print/__golden__/lock-order.txt b/packages/workflow-code/src/print/__golden__/lock-order.txt index 1aa233330d1..b765277f7f8 100644 --- a/packages/workflow-code/src/print/__golden__/lock-order.txt +++ b/packages/workflow-code/src/print/__golden__/lock-order.txt @@ -4,8 +4,7 @@ import { api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const zeta = api('Zeta', { url: 'https://z.test', method: todo() }) + start.to(zeta) const alpha = api('Alpha', { url: 'https://a.test', method: todo() }) const mid = api('Mid', { url: t`https://m.test ${alpha.data}`, method: todo() }) - - start.to(zeta) }) diff --git a/packages/workflow-code/src/print/__golden__/loop-foreach.txt b/packages/workflow-code/src/print/__golden__/loop-foreach.txt index 89e62222f37..38d6fd7b230 100644 --- a/packages/workflow-code/src/print/__golden__/loop-foreach.txt +++ b/packages/workflow-code/src/print/__golden__/loop-foreach.txt @@ -8,16 +8,14 @@ export default workflow('Fixture', {}, () => { url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, method: 'GET', }) - const score = fn('Score', { code: js`return ${lookup.data}.score * 2` }) - p.to(lookup) + const score = fn('Score', { code: js`return ${lookup.data}.score * 2` }) lookup.to(score) }) + start.to(eachLead) const summary = agent('Summary', { messages: [{ role: 'system', content: t`Results: ${eachLead.results} and ` }], model: 'm', }) - - start.to(eachLead) eachLead.to(summary) }) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.txt index 11560dd73d5..52f59b0339f 100644 --- a/packages/workflow-code/src/print/__golden__/nested-subflows.txt +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.txt @@ -14,21 +14,17 @@ export default workflow('Fixture', {}, () => { ], model: 'm', }) - p2.to(work) }) - p.to(fan) }) + start.to(outer) const sibling = loop.while('Sibling', { condition: js` < 3` }, (p) => { const insideSibling = agent('Inside sibling', { messages: [{ role: 'system', content: 'cannot see ' }], model: 'm', }) - p.to(insideSibling) }) - - start.to(outer) outer.to(sibling) }) diff --git a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt index fa47e23a866..5c01283af2a 100644 --- a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt +++ b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt @@ -5,9 +5,7 @@ export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const batch = parallel('Batch', { count: 4 }, (p) => { const ping = api('Ping', { url: t`https://x.test/${p.index}`, method: todo() }) - p.to(ping) }) - start.to(batch) }) diff --git a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt index cee9ace047e..3f8474fa766 100644 --- a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt +++ b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt @@ -4,11 +4,10 @@ import { api, condition, edge, js, todo, trigger, workflow } from '@sim/workflow export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const gate = condition('Gate', { if: js`true`, else: true }) - const a = api('A', { url: 'https://a.test', method: todo() }) - const b = api('B', { url: 'https://b.test', method: todo() }) - start.to(gate) + const a = api('A', { url: 'https://a.test', method: todo() }) edge(gate, 'source', a) + const b = api('B', { url: 'https://b.test', method: todo() }) gate.if.to(b) edge(a, 'right-legacy', b) }) diff --git a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt index 7f987872a01..33be8c1c2e0 100644 --- a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt +++ b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt @@ -11,11 +11,10 @@ export default workflow('Fixture', {}, () => { messages: [{ role: 'system', content: 'See ' }], model: 'm', }) + start.to(alpha) const beta = agent('Beta', { messages: [{ role: 'system', content: t`See ${alpha.content}` }], model: 'm', }) - - start.to(alpha) alpha.to(beta) }) diff --git a/packages/workflow-code/src/print/__golden__/resource-nodes.txt b/packages/workflow-code/src/print/__golden__/resource-nodes.txt index 19ef523e6ab..92a5fde369d 100644 --- a/packages/workflow-code/src/print/__golden__/resource-nodes.txt +++ b/packages/workflow-code/src/print/__golden__/resource-nodes.txt @@ -21,14 +21,13 @@ export default workflow( ], }), }) + start.to(query) const setVars = setVariables('Set vars', { variables: [ { variableId: vars.retries, value: t`${vars.retries}` }, { variableId: vars.lastrun, value: t`${query.rows}` }, ], }) - - start.to(query) query.to(setVars) } ) diff --git a/packages/workflow-code/src/print/__golden__/response-body.txt b/packages/workflow-code/src/print/__golden__/response-body.txt index 40ceccd8e00..10a267dde50 100644 --- a/packages/workflow-code/src/print/__golden__/response-body.txt +++ b/packages/workflow-code/src/print/__golden__/response-body.txt @@ -11,7 +11,6 @@ export default workflow('Fixture', {}, () => { status: 201, headers: { 'X-Trace': start.input }, }) - const echo = response('Echo', { body: start.input }) - start.to(created) + const echo = response('Echo', { body: start.input }) }) diff --git a/packages/workflow-code/src/print/__golden__/router-routes.txt b/packages/workflow-code/src/print/__golden__/router-routes.txt index 3292df4ff84..39d0ca133f2 100644 --- a/packages/workflow-code/src/print/__golden__/router-routes.txt +++ b/packages/workflow-code/src/print/__golden__/router-routes.txt @@ -8,10 +8,9 @@ export default workflow('Fixture', {}, () => { model: 'claude-sonnet-5-5', routes: { small: 'Under $100, auto-approve', review: 'Needs a manager' }, }) - const approve = response('Approve', {}) - const escalate = response('Escalate', {}) - start.to(triage) + const approve = response('Approve', {}) triage.small.to(approve) + const escalate = response('Escalate', {}) triage.review.to(escalate) }) diff --git a/packages/workflow-code/src/print/__golden__/stored-secrets.txt b/packages/workflow-code/src/print/__golden__/stored-secrets.txt index 99ed8d28f14..18255c7f7e7 100644 --- a/packages/workflow-code/src/print/__golden__/stored-secrets.txt +++ b/packages/workflow-code/src/print/__golden__/stored-secrets.txt @@ -5,6 +5,5 @@ export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: {} }) const envKey = agent('Env key', { model: 'gpt-5.5', apiKey: env.OPENAI_API_KEY }) const pastedKey = agent('Pasted key', { model: 'gpt-5.5', apiKey: stored() }) - start.to(envKey, pastedKey) }) diff --git a/packages/workflow-code/src/print/__golden__/support-triage.txt b/packages/workflow-code/src/print/__golden__/support-triage.txt index 4045fc10dbe..49baf2081ef 100644 --- a/packages/workflow-code/src/print/__golden__/support-triage.txt +++ b/packages/workflow-code/src/print/__golden__/support-triage.txt @@ -38,15 +38,18 @@ ${ticketIn.body}`, model: 'claude-sonnet-5-5', temperature: 0.2, }) + ticketIn.to(classify) const byCategory = condition('By category', { billing: js`${classify.content} === 'billing'`, urgent: js`${classify.content}.includes("urgent") && ${vars.escalations} < 3`, else: true, }) + classify.to(byCategory) const logTicket = table.insertRow('Log ticket', { tableId: table('tickets'), data: { subject: ticketIn.subject }, }) + byCategory.billing.to(logTicket) const notify = slack.sendMessage( 'Notify', { @@ -56,15 +59,11 @@ ${ticketIn.body}`, }, { errorPort: true } ) - const reply = response('Reply', { body: { ok: true, category: classify.content } }) - - ticketIn.to(classify) - classify.to(byCategory) - byCategory.billing.to(logTicket) byCategory.urgent.to(notify) - byCategory.else.to(reply) logTicket.to(notify) logTicket.onError(notify) + const reply = response('Reply', { body: { ok: true, category: classify.content } }) + byCategory.else.to(reply) notify.to(reply) } ) diff --git a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt index 11c8adf7ce7..ac8c82a6ea8 100644 --- a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt +++ b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt @@ -24,6 +24,5 @@ Line two without refs`, }, } ) - start.to(writer) }) diff --git a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt index 8342cd86a94..f4388c1fdc4 100644 --- a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt +++ b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt @@ -19,6 +19,5 @@ export default workflow('Fixture', {}, () => { subject: 'Invoices', body: invoiceEmail.email.subject, }) - invoiceEmail.to(sendSummary) }) diff --git a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt index efcb863a437..4fd46a1d744 100644 --- a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt +++ b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt @@ -12,6 +12,5 @@ export default workflow('Fixture', {}, () => { }, } ) - start.to(html) }) diff --git a/packages/workflow-code/src/print/__golden__/vars-by-field.txt b/packages/workflow-code/src/print/__golden__/vars-by-field.txt index 0202882d2f1..4e41eeb924e 100644 --- a/packages/workflow-code/src/print/__golden__/vars-by-field.txt +++ b/packages/workflow-code/src/print/__golden__/vars-by-field.txt @@ -12,13 +12,12 @@ export default workflow( { variableId: vars.count, value: t`count is ${vars.count}` }, ], }) + start.to(setCount) const echo = agent( 'Echo', { model: raw({ $sim: 'var', key: 'count' }), temperature: t`count is ${vars.count}` }, { extra: { systemPrompt: vars.count } } ) - - start.to(setCount) setCount.to(echo) } ) diff --git a/packages/workflow-code/src/print/edges.ts b/packages/workflow-code/src/print/edges.ts index fef013ad84e..094f6ac847f 100644 --- a/packages/workflow-code/src/print/edges.ts +++ b/packages/workflow-code/src/print/edges.ts @@ -101,12 +101,18 @@ function identExpr(ctx: PrintContext, key: BlockKey): Expr { return { doc: ctx.idents.get(key) ?? key, shape: 'identifier', depth: 1 } } -/** The wiring statements of one scope, with the anchor and source block of each. */ -export function wiringStatements( - ctx: PrintContext, - scope: BlockKey | null -): Array<{ expr: Expr; anchor: AnchorKey; source: BlockKey }> { - const statements: Array<{ expr: Expr; anchor: AnchorKey; source: BlockKey }> = [] +/** One wiring statement, with its comment anchor and the blocks it names. */ +export interface WiringStatement { + expr: Expr + anchor: AnchorKey + source: BlockKey + targets: BlockKey[] +} + +/** The wiring statements of one scope. */ +export function wiringStatements(ctx: PrintContext, scope: BlockKey | null): WiringStatement[] { + const statements: WiringStatement[] = [] + const keys = (edges: CanonicalEdge[]) => edges.map((edge) => edge.to) const byTarget = (a: CanonicalEdge, b: CanonicalEdge) => (ctx.position.get(a.to) ?? 0) - (ctx.position.get(b.to) ?? 0) || (ctx.preorderIndex.get(a.to) ?? -1) - (ctx.preorderIndex.get(b.to) ?? -1) @@ -138,6 +144,7 @@ export function wiringStatements( expr: call(ctx.paramNames.get(scope) ?? 'p', starts, 'to'), anchor: anchors.edges(scope, 'subflowStart'), source: scope, + targets: keys(starts), }) } } @@ -199,7 +206,12 @@ export function wiringStatements( ? 'error' : 'source' for (const edge of [...mismatched].sort(byTarget)) { - statements.push({ expr: raw(source, handle, edge.to), anchor, source }) + statements.push({ + expr: raw(source, handle, edge.to), + anchor, + source, + targets: [edge.to], + }) } if (kind.kind === 'subflowStart') continue targets = targets.filter((edge) => !mismatched.includes(edge)) @@ -208,20 +220,36 @@ export function wiringStatements( if (kind.kind === 'raw' || (kind.kind === 'out' && (isContainer || hasBranches))) { const handle = kind.kind === 'raw' ? kind.handle : 'source' for (const edge of [...targets].sort(byTarget)) { - statements.push({ expr: raw(source, handle, edge.to), anchor, source }) + statements.push({ + expr: raw(source, handle, edge.to), + anchor, + source, + targets: [edge.to], + }) } continue } if (kind.kind === 'error') { - statements.push({ expr: call(ident, targets, 'onError'), anchor, source }) + statements.push({ + expr: call(ident, targets, 'onError'), + anchor, + source, + targets: keys(targets), + }) } else if (kind.kind === 'branch') { statements.push({ expr: call(`${ident}${printMember(kind.key)}`, targets, 'to'), anchor, source, + targets: keys(targets), }) } else { - statements.push({ expr: call(ident, targets, 'to'), anchor, source }) + statements.push({ + expr: call(ident, targets, 'to'), + anchor, + source, + targets: keys(targets), + }) } } } diff --git a/packages/workflow-code/src/print/index.ts b/packages/workflow-code/src/print/index.ts index 2477608ea9a..3b60ecb0d0c 100644 --- a/packages/workflow-code/src/print/index.ts +++ b/packages/workflow-code/src/print/index.ts @@ -1,2 +1,3 @@ export { assignIdentifiers } from './idents' export { printWorkflow } from './printer' +export { referencedHeads } from './refs' diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index dc0f2a86612..18eca8e2bb0 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -23,7 +23,7 @@ import { printedConfig } from '../forms/subflow' import { SOURCE_ENTRY_FILE } from '../limits' import type { SourceHintBlock, SourceHints } from '../lock' import type { AnchorKey, BlockKey, CanonicalBlock, Json } from '../model' -import { getOwn, setOwn } from '../records' +import { getOwn, pushTo, setOwn } from '../records' import { type BlockMetaKey, GENERIC_BUILDER, SDK_MODULE, type TemplateTag } from '../sdk' import { type AttachedComments, anchors, withComments } from './comments' import type { PrintContext } from './context' @@ -250,19 +250,31 @@ function containerCall(ctx: PrintContext, block: CanonicalBlock): Expr { return ctx.values.call(callee, args) } -/** Declarations then wiring for one scope (the workflow body or a container callback). */ +/** + * The statements of one scope (the workflow body or a container callback): each block declaration + * followed by the wiring statements whose last-declared block it is, so a block's incoming edges + * sit right under it and its outgoing ones under each target, wherever the scope is long. + */ function scopeStatements(ctx: PrintContext, scope: BlockKey | null): StatementList { const members = ctx.scopeMembers.get(scope) ?? [] const calls = members.map((key) => { const block = ctx.blocks.get(key) - return block ? { key, call: blockCall(ctx, block) } : null + return block ? blockCall(ctx, block) : null }) + const slotOf = new Map(members.map((key, index) => [key, index])) const wiring = wiringStatements(ctx, scope) - const wiringDocs: Doc[] = [] + .map((statement) => ({ + statement, + slot: Math.max( + ...[statement.source, ...statement.targets].map((key) => slotOf.get(key) ?? -1) + ), + })) + .sort((a, b) => a.slot - b.slot) + const wiringAt = new Map() // An expression statement over the call; a declaration adds its declarator too. let depth = 0 const seenAnchors = new Set() - wiring.forEach((statement, index) => { + wiring.forEach(({ statement, slot }, index) => { const attached: AttachedComments = seenAnchors.has(statement.anchor) ? { leading: [], trailing: [] } : ctx.comments.take(statement.anchor) @@ -272,32 +284,28 @@ function scopeStatements(ctx: PrintContext, scope: BlockKey | null): StatementLi attached.leading.unshift(...wiringComments.leading) attached.trailing.push(...wiringComments.trailing) } - wiringDocs.push(withComments(statement.expr.doc, attached)) + pushTo(wiringAt, slot, withComments(statement.expr.doc, attached)) depth = Math.max(depth, 1 + statement.expr.depth) }) - const declarations: Doc[] = [] - for (const entry of calls) { - if (!entry) continue - const { key, call } = entry - const own = ctx.comments.take(anchors.block(key)) - const moved = ctx.comments.takeOrphans(key) - const attached: AttachedComments = { - leading: [...own.leading, ...moved.leading], - trailing: [...own.trailing, ...moved.trailing], + const docs: Doc[] = [...(wiringAt.get(-1) ?? [])] + members.forEach((key, slot) => { + const call = calls[slot] + if (call) { + const own = ctx.comments.take(anchors.block(key)) + const moved = ctx.comments.takeOrphans(key) + const attached: AttachedComments = { + leading: [...own.leading, ...moved.leading], + trailing: [...own.trailing, ...moved.trailing], + } + docs.push(withComments(['const ', ctx.idents.get(key) ?? key, ' = ', call.doc], attached)) + depth = Math.max(depth, 2 + call.depth) } - declarations.push( - withComments(['const ', ctx.idents.get(key) ?? key, ' = ', call.doc], attached) - ) - depth = Math.max(depth, 2 + call.depth) - } + docs.push(...(wiringAt.get(slot) ?? [])) + }) if (scope === null && wiring.length === 0) { const dangling = ctx.comments.take(anchors.wiring) - for (const comment of [...dangling.leading, ...dangling.trailing]) wiringDocs.push(comment) + for (const comment of [...dangling.leading, ...dangling.trailing]) docs.push(comment) } - const docs = - declarations.length > 0 && wiringDocs.length > 0 - ? [...declarations, '', ...wiringDocs] - : [...declarations, ...wiringDocs] return { docs, depth } } diff --git a/packages/workflow-code/src/print/scaling.test.ts b/packages/workflow-code/src/print/scaling.test.ts index d32edcf6d86..5d03c522ef8 100644 --- a/packages/workflow-code/src/print/scaling.test.ts +++ b/packages/workflow-code/src/print/scaling.test.ts @@ -1,9 +1,10 @@ /** - * Printing grows linearly with the workflow (see `growth` for how a case is measured). + * Printing grows linearly with the workflow (see `growth` for how a case is measured), and a long + * workflow keeps each block's wiring beside it. */ import { expectLinearGrowth } from '@sim/testing/helpers/scaling' -import { describe, it } from 'vitest' +import { describe, expect, it } from 'vitest' import { compareEdges } from '../canonicalize/edges' import { compileWorkflow } from '../compile' import { TEST_CATALOG } from '../compile/catalog.test-helpers' @@ -72,3 +73,20 @@ describe('print scaling', () => { }, 500) }) }) + +describe('print locality', () => { + it('prints each edge of a long chain on the line under its target', () => { + const { text } = printWorkflow({ + workflow: siblingScopes(200), + catalog: TEST_CATALOG, + options: { functionCode: 'inline' }, + }).files[0] + const lines = text.split('\n') + const lineOf = (prefix: string) => lines.findIndex((line) => line.trim().startsWith(prefix)) + const distances = Array.from({ length: 199 }, (_, i) => { + const target = `a${i + 1}` + return lineOf(`a${i}.to(${target})`) - lineOf(`const ${target} =`) + }) + expect(new Set(distances)).toEqual(new Set([1])) + }) +}) From b1f4fbb8c8d03603f6c217eed1310773f3d102e7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 26 Nov 2026 12:39:20 -0800 Subject: [PATCH 2/2] fix(workflow-code): exact JSON-text equivalence, per-edge find locations, layout-aware tests - Decode JSON text, and treat it as unchanged in deploy-change detection, only for input-mapping fields, whose runtime parses both forms (JSON_TEXT_CONTAINER_TYPES). Other container fields such as a checkbox list compare as stored again. - Compile records where each edge is written (edgeSpans), and `source find` reports every edge at its own statement. - `source find` reads function-file references the way compile does (codeFileRefs: parsed chains plus stored tags) in the file's own language. - Integration edits follow the interleaved wiring layout; docs baseline takes the new CLI reference code examples. --- .../scripts/fixtures/content-baseline.json | 1694 +++++++++-------- .../apply-workflow-source.integration.ts | 17 +- .../canonical/json-text-encoding.test.ts | 54 + .../lib/workflows/canonical/subblock-value.ts | 14 +- .../lib/workflows/code/catalog/value-kind.ts | 15 - .../protocol/workflow-source-find.test.ts | 16 +- .../commands/protocol/workflow-source-find.ts | 38 +- .../workflow-code/src/canonicalize/params.ts | 20 +- .../workflow-code/src/code-files/from-file.ts | 38 +- .../workflow-code/src/code-files/index.ts | 2 +- packages/workflow-code/src/compile/blocks.ts | 39 +- packages/workflow-code/src/compile/edges.ts | 5 + packages/workflow-code/src/compile/index.ts | 10 +- packages/workflow-code/src/index.ts | 3 + 14 files changed, 1029 insertions(+), 936 deletions(-) create mode 100644 apps/sim/lib/workflows/canonical/json-text-encoding.test.ts diff --git a/apps/docs/scripts/fixtures/content-baseline.json b/apps/docs/scripts/fixtures/content-baseline.json index f069b9dee87..a9802c358a0 100644 --- a/apps/docs/scripts/fixtures/content-baseline.json +++ b/apps/docs/scripts/fixtures/content-baseline.json @@ -11058,2549 +11058,2556 @@ "lang": "bash", "meta": null, "sha256": "e89f5163bfcc02bcec8be44abb82d7807ccaeecc397ea8b3d8575e189f05a46a", - "bytes": 19, - "line": 45 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3ce59639490b19f90613bf0b002f0d5f747ae6bf89110a31aaad132f4a5d56df", - "bytes": 20, - "line": 68 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7be8dbf1bad323118735b5a0b4cdf49c653cc20508516225fe058776f0421e2e", - "bytes": 20, - "line": 86 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5b13d0a219062e58827d50697e4cec707e48ebef466a5058abb6e524376cc18e", - "bytes": 23, - "line": 106 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fac9741c4ccc5f0596cba54e6e2ecc4997e489032315eb4c80dd872c941dd0ae", - "bytes": 20, - "line": 127 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cc2a546bb69dcb90170c414517e67c86b5a20c7918c28999cb06d15f19ad4774", - "bytes": 28, - "line": 145 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f22525d91b0a915d24281bdac40a70c066449d9310582f844446e4fb2d9b347f", - "bytes": 181, - "line": 173 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "21d922f40e072101cbcfdfcd4ee3c6e9ca22fc35bc4828a37f79f57dafec8d02", - "bytes": 17, - "line": 191 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "56b302d091c4b589dde86d24739634d8f7d560873ca281d9962939aa6ff46ac1", - "bytes": 33, - "line": 199 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ce318a355b5dabeedbde09c7ddeb4f9132a4a57501b15fd3c2d23b3b8c75fd7f", - "bytes": 20, - "line": 233 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c74ad02c1945ec9c5cb8316f5ffeb64cc0b9dde01530570343e2dd2ee5c2ec23", - "bytes": 20, - "line": 243 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "abe19c862f574d48aa91f6a506496b6f6c414d03fab399a6c86e1c12b2f8302a", - "bytes": 21, - "line": 251 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5c4299cf8aa6117a3a1a3c728d72c2a86f9627a5766d47be8ae1f03088642346", - "bytes": 25, - "line": 263 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cf03b326f03d9bcb4260e2be1ca5bcb89551a8f7f2bb1ba85744f50a9a84b434", - "bytes": 73, - "line": 281 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1350c2e26838e2b4a68726a51de8a06e2a5d32cc9714e0171c0dafd867db1d90", - "bytes": 41, - "line": 298 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8b747ef16c178bb05ca7171ec48e801f20a250e774a44d2d3b9753bd69aa3ec2", - "bytes": 29, - "line": 328 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "88526e37fa1577427e6126306dc69d3afa94894d3dd313ae31286bff5eadafa4", - "bytes": 28, - "line": 363 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "437c1deab5031ec9ce664b5429f7b62c062fd592469411b7f61cc16a9e21aa15", - "bytes": 26, - "line": 383 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "575f3eca46c258a161e39e0bb8154f4e8ea02ed85bc48ba09e313bad08b2bdd7", - "bytes": 24, - "line": 415 + "bytes": null, + "line": null }, { "lang": "text", "meta": null, "sha256": "83c910b94eeb65b4b76fd1d9852fc5709862a2786abbcb6a6569b444bd176c6f", - "bytes": 821, - "line": 429 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ecc11df2b60a4b0dc7d6b4e95f6fbee1f43554a8e32ee7232d50543a94e22273", - "bytes": 25, - "line": 448 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "451b8c0648b69af0d37673c7b6c4bd98eb8ce4baca0c902038fc1460938adf88", - "bytes": 35, - "line": 480 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5037ed0778643f28636735f01bb24cd5f938bdc923f02abfacf6e37840a822f7", - "bytes": 34, - "line": 511 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ef5100ffa39072ae2ba9bb021d546036b95ded8da431fad855f809550c8913fb", - "bytes": 47, - "line": 544 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4051f5bb25072a25196ba8e847ab22b9d42aeb0cbb36186b5e7cc051d77c00e0", - "bytes": 53, - "line": 574 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2b6d0db0f06b8f51733c7da29a0c183aab73a6da83b787db76e7c3064fc9c78c", - "bytes": 64, - "line": 608 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a74b652635bc27ca58af7b080b78d983469558a2668f0b3f033a1b5b2f4cef10", - "bytes": 55, - "line": 639 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e407b3388ac13c30e985d64e41a9fb8f68c52e6e7a020bc3db79ce9473944724", - "bytes": 40, - "line": 670 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cb3d67be4a05a8cc95870cadb5ac682c16e80889db6606e388dd48651bfc4af4", - "bytes": 30, - "line": 690 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f7e2cb3ed34992b91cdcbd2fa65eadb48134c31e0d295519421644ad0668f20e", - "bytes": 47, - "line": 715 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3ce249d6b52442bdf5df53436bae6b9718064994b4b26ecf25372ce53606db08", - "bytes": 45, - "line": 768 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48d4019bc1905094aec776873af1d5a4e94ec2f52d043c51bbbb559b6a876944", - "bytes": 276, - "line": 811 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "866eaf5e25ac2d6471b52118f082a507d5300b7c80cd82ecbe3cfbce598c5f6a", - "bytes": 54, - "line": 823 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48d4019bc1905094aec776873af1d5a4e94ec2f52d043c51bbbb559b6a876944", - "bytes": 276, - "line": 861 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e0ac83da55217195ac0ca3bd1a41314be433d0a62428f36eb9666df607e8322c", - "bytes": 46, - "line": 873 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "664dfa9d010be73d8c8d4c1b079e946a646cc4677891d5fd34df9e5817cabfed", - "bytes": 40, - "line": 903 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "55d8bb7d28001fafb0a76ccaf87863cb67f0150ffef73889e5c363ce3775131b", - "bytes": 33, - "line": 929 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "02ff8ad73ece2f21edb90fc1a69904f322032da6d90a23d28d2d490beb55ab53", - "bytes": 48, - "line": 953 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "06a7f6e71ab68db991126dcf2d660866aec7b89d27f751d082d2f90030a19b00", - "bytes": 35, - "line": 983 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3c9e74b86271246976e186b32c311a50f367fcd701f0506a56c8c8150c01b400", - "bytes": 31, - "line": 1003 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c0bbfff139a69379e188cfe4bbd3393285fce565dd83f7098eb2d387356da9c4", - "bytes": 48, - "line": 1026 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c569c5e38502a1c1e8f6078954bc90b559dd80adb577bb4cf7b63ec7bbdb3aa7", - "bytes": 46, - "line": 1066 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "939a624f32ea05ac4cddd6037a27cdc7829018f0ac8096e4afd85aa9fab93ea2", - "bytes": 24, - "line": 1097 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "428eca668e88f6323ab89a2e488c5fd403b8b04064b26b55a3b8ca7ddb966be5", - "bytes": 26, - "line": 1116 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "66b86826e7fbeb5cc1b35c54dcbf9727264c2b6d50528e8c21accaff3a708806", - "bytes": 31, - "line": 1140 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a461b9c9fef3090d3367148a2a183410e81624e42e340c21a4138c30c6b4409c", - "bytes": 41, - "line": 1162 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8c86de167a3b73c5430d2b15f558b7c0b2a82cd347b4e85907862196cf8e16bc", - "bytes": 32, - "line": 1193 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8a9eb6688329292f21fecba059890d65dab0a136e86f26d38987c27d68013ad8", - "bytes": 43, - "line": 1221 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "be3c635d1b158a14e8e00c6e88d84e4126e29d89f0464ebf0b296f19b2bdf59b", - "bytes": 32, - "line": 1244 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "993262e619d4470867077b7a4e0c528f715be468511bf9e072e8a9429ef250a1", - "bytes": 35, - "line": 1266 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "adc4973b83b313bcaf5f9058297e030a9c272cb1b5612fe8465b02edf2ad1b73", - "bytes": 54, - "line": 1298 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48fbd97b704f5e02a593cbf0020bc3c6600ff1b4d349ae80b3cba39225a4b9fc", - "bytes": 46, - "line": 1329 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "49e712965d1a8af321563bc382bb448e0b68067c3c68861f84896b5f97e70314", - "bytes": 42, - "line": 1350 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e463cbe0c80554eaa7fe151c51523307240c2226a54924a3d984cdc0a84f529b", - "bytes": 52, - "line": 1383 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "23bede1f0d68221f4da857a62e0594d031e40e5a794bd96c79eba2de2924072a", - "bytes": 54, - "line": 1416 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ad1df0d9a424569351d851507b674bb104654e1251d7bee11ebc6955e0f2be6c", - "bytes": 56, - "line": 1448 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "37cdd4ceab29424161734300286176b9971cd7d6c134022308d5b21e4fa9e714", - "bytes": 33, - "line": 1480 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0bc8335422d07dfbc74c55102518d6d2965a5aa27be6994b8b4317478e13ef3d", - "bytes": 37, - "line": 1511 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "863b992687ec7121ef44d5680b290502052bfe51e7e43aa24376ddba51fc3841", - "bytes": 28, - "line": 1541 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9d7e15ac24392a0771cf7857c3f110be1ede32e18427995923edc5978fdcaa31", - "bytes": 38, - "line": 1561 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "15849bbb5c9f4f1c0754c0c99d3048b910f6fdcbb02ab84a4e34d7ed1930cd15", - "bytes": 24, - "line": 1594 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "31cbe1979c2c645d78646d966ac83fd45e6b556d56ab0d8fc47a7abd281e524d", - "bytes": 24, - "line": 1621 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1a728e81af7425e00df25a70a5819d272cbddcab487426cebc94de7834509999", - "bytes": 33, - "line": 1644 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f7a8e9f75a2ea3d88d6d12b097f20a94e2b915741cc10f805b070c6ad4261a7e", - "bytes": 35, - "line": 1676 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "94537050876dfc16340c4db7965fcc2a098f09fcb9911d5e154c11721d212e6a", - "bytes": 26, - "line": 1706 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cdee40f5dc3195f9db4462ddd0e5b7bc03b44f600a82f357d6b651ecee770840", - "bytes": 26, - "line": 1726 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bda181f24ee73df10ced9c179ddb81b115d62b4da46eb64b63dd23e7f4c51a96", - "bytes": 34, - "line": 1753 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "14e217553dedf133ef014fd989058ee281844a55293e05a9dddf044947c058fe", - "bytes": 40, - "line": 1783 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "30f91370cbb0ddf76900ab363e83bb26c0a95cb81518de875885f66d4c9df4a3", - "bytes": 33, - "line": 1815 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1c143b6c0cd2e76ce8c74504ecb5ee2560b147eb299d8f0d3d956854b706958c", - "bytes": 32, - "line": 1846 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b36a5102aee98e664a1ca4cc19d91310af00b2a4afbb04c78589bb4c3a2936a9", - "bytes": 29, - "line": 1877 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "62a17f5231fba3f732cba025c16c8b6706411b9267e6abd58e4e51aff8777043", - "bytes": 22, - "line": 1908 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "760a88e6d91ed147f40d39808ae39d178b6c38b61a5c69dd37755079cff376c2", - "bytes": 69, - "line": 1934 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e0173107cc10779c1b96d55c66a3bd628e9bc21b39234101e2f9d7519087780e", - "bytes": 51, - "line": 1964 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "71bb24f623f1958775fe0f9df499ad3f8241c3132ea8f8a40d5f26bd2041b65e", - "bytes": 53, - "line": 1994 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "51d1aa93ed9262fa8f275fbd24e805ad9a3a075ed2f5c3888d57ecf909426c3e", - "bytes": 61, - "line": 2028 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4782c15ea248b0cb3a7cffa4242b54f9bea866ecf26f63ada4ed921455699cb3", - "bytes": 54, - "line": 2061 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c8f14f40bbc787d13778c342211d73c9f0b118a8d37d3c82a87c72b42b9d5d93", - "bytes": 56, - "line": 2093 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "913db46a26314244a1e4c903adb6772a8e405da8cba64f7218ff3683d7daa72a", - "bytes": 41, - "line": 2123 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7cda9f00d098a51943b10891142d7e6a8d4cb46d752e1cdae5825ab6c56b8aa9", - "bytes": 42, - "line": 2143 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e09f666b66b4d7acdcd6aa26831c7f258ff49baa0fd762ea920b90fd39846582", - "bytes": 61, - "line": 2163 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8b204243cf243c64557adb522d2bfd72be53400afab3c03f4c314117ed37655d", - "bytes": 74, - "line": 2197 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cf87bc61bba385818ebc622f9b9f481213e1d86f65df7ab1a193749ab929a651", - "bytes": 68, - "line": 2230 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2d57fee1358f9ce5a3f166aed1400940cbe737b04d8f487a16eb35bc3bb5a6d4", - "bytes": 78, - "line": 2265 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7f02636a02ece5cd252aad171e251b18e1c29207d62dfcc962485052b799fdc4", - "bytes": 65, - "line": 2297 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e6a2660057e8859cebd226a4420672f12beed4e274bdc57a4b70c96a0142b1b6", - "bytes": 66, - "line": 2319 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "54b00a2d3830092a8fe552bba29419710da6647ac3cc96d6a0a9ffbef596c440", - "bytes": 78, - "line": 2355 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a0a28be794c70e6366719b49f3ad627faa087181960d287d6a17bc44d7a8bd9d", - "bytes": 64, - "line": 2389 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2a48509e548ba0f0d2bb97bfc37ac1807f3b34cc5c44cbd1c5ca57735614fc24", - "bytes": 71, - "line": 2424 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ea154f4a00845d5c60d54aff14d7173c8de383ec43e13454a8c326459ed7695f", - "bytes": 58, - "line": 2455 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f14623530e7aeb20de131c59208269f9703e85ab6a89cd4368fb3c2ff7c36863", - "bytes": 56, - "line": 2476 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cdf3ade3d9fa9f1f3a191265a2b0de8092eaaa49bd961d94eccb09355dfddb26", - "bytes": 71, - "line": 2512 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2f509b586cc62ff6bb0b5c1ee7e5062689b1cfd987acc2c18dee6b10bc3a194f", - "bytes": 65, - "line": 2566 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6546c4a95a217203c622f0e62f945cbe2863d42d02a5229621f43f12b68bc063", - "bytes": 39, - "line": 2600 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e9f1685d2a50e4bd554c7daf19621a7704aa5b1aea3540af28884066ae413c69", - "bytes": 36, - "line": 2620 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ad0c1107caee2427422e0a52a6da2df0a037010f93467fd957fb0136f938d675", - "bytes": 30, - "line": 2640 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fae160a2cd7e296a9f9b00fa789ba95a2f1e507713a469902de21ed945d9eb25", - "bytes": 59, - "line": 2663 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "abdae7f49c77877550cfc2d7195132c12fb0117a0471faf1c525d44ad2de1321", - "bytes": 73, - "line": 2699 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d11c4c59feac4345ba7dfb02edc2780adae89cf702e570f32e1ccc8555bdb169", - "bytes": 60, - "line": 2732 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "af533689c0b530ff902ae36c2cac7198f43ff6968d168a94da153d81fe8020fd", - "bytes": 81, - "line": 2753 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f907eb4bee803d3f45d4abc9baae106aaec0249143dfd9cf56aa17285776a430", - "bytes": 83, - "line": 2787 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "28c4e709c778f27d924fbe49edb4bf198b7c73e9b65619e6fad43d1fb9e2cfb7", - "bytes": 57, - "line": 2819 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0a7262cac83ce7c16b17a1364a123764e5fa8b645dd60fd5b394b3f74dd0e1fa", - "bytes": 71, - "line": 2851 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a25c869b7add79bfe6f194ec72190bb6b4957bb303fe6b4c31c9455f4a2e11a9", - "bytes": 73, - "line": 2883 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b3f9e190362420216749c9924e83a35c5a5c2414ab03ff89601a6b9501494bf9", - "bytes": 35, - "line": 2916 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ae5dcbc80aeb125607ebd763669a1f335d6ddf087a6baf1853453867675ce865", - "bytes": 45, - "line": 2938 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c91b2cb83c28571b965071d6643d955366931a6ca3dd340e54d8536ea90cefde", - "bytes": 36, - "line": 2969 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "de622393fa33cc9b0002c7d670d9f45c2bcd9fbfe3f0c99be71ae96969a005dd", - "bytes": 47, - "line": 2994 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "356cb12341ce90e24b765d02a997421c0469a3b26509c90e42a17af4dd3f9e95", - "bytes": 48, - "line": 3019 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a611d4f425ac65781756225557a7e8f8559faccaa4c6466ef23fa78cd2a2226c", - "bytes": 35, - "line": 3049 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8c7bab52ede04cca1dd71b466bd76c7f5b67c6b7f0fed08e14ee7656d6b2b160", - "bytes": 28, - "line": 3069 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "063e71c7485fe7d3657e692841a2f0629e6a31b48e8501282b0456202eefaa5d", - "bytes": 39, - "line": 3094 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4f9e7b46b98628ddded377f3a73cb2e9b4751023b7b1fc90c1cefc90555c80c4", - "bytes": 30, - "line": 3114 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "efaaf65fd8057cd592d386d0e0c800eef4e71d649a1f011fd2f20495d8d942ab", - "bytes": 48, - "line": 3142 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5303a1a6194097b3acc7546ccafb0faced44b084951b7e14ff1029cf0fdff957", - "bytes": 43, - "line": 3175 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a9ba0ea93105e0f224ed0c3e661adf5fe706a875fb9741348134814d65c6d882", - "bytes": 48, - "line": 3196 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a721f46390cb321c013b700b13f46f2e9833616be44a3ee8e0971c3e5c0f945b", - "bytes": 37, - "line": 3228 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9f9b6ea8992e8fcd2bdb540857d42288ba0ecedb959ff5c1c56de708e65db79e", - "bytes": 33, - "line": 3259 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1478c9884eb8c9bc2dd64170d3fb101030957399aab5da911d5f77d46b662c73", - "bytes": 26, - "line": 3290 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "51b81826c6f4b7933c1c802c82baca186c67efe8e59e69a6a7754360fe8675da", - "bytes": 30, - "line": 3316 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8aeb5fc735c8037c480f3c8220149fb6f811de62c946584523d50d1cd1811a53", - "bytes": 24, - "line": 3348 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a1bf4221604cc962c677313543850fe6cd140476ef52de3a9e29b305865ae8f0", - "bytes": 23, - "line": 3377 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5215bc6f0c098350b8067dd283226f3444cf73599ab1989c5dfae5c563069a04", - "bytes": 25, - "line": 3421 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "98f84efeb01c77bc8c1aadb62fbd989c5ae41de97d07fd9b59e8b2b53cafe06f", - "bytes": 145, - "line": 3445 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "baad97733d922f4ef4c068577ef9f0f855c44f3b54e9b80a61733a4fecfd350d", - "bytes": 32, - "line": 3465 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fdb563355cb89d0b6f534e825e70973c85326879a7d4f0adaee447ed78db5260", - "bytes": 46, - "line": 3498 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8409df5d28808a04cbea45c4f0162a7a283a0d4eee0fc3391d82a8663121a495", - "bytes": 33, - "line": 3528 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c3189f21b856e8c158f2a39d3260d7c0ac93ba2c0c73494c7e1374d45a51346f", - "bytes": 30, - "line": 3548 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "066839a4599d90ccd88f845122e61c608a8ea120e9f1476857f0a2eb8c723de7", - "bytes": 50, - "line": 3571 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "209da9ab7f502fbcaec3297113212d496eca57b124e273dc8080efa6c4e0de71", - "bytes": 46, - "line": 3602 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c01ee6bd733ccd61abdb244baa88a17758166a1eacaa4456d3a8bbe56e6ff00f", - "bytes": 15, - "line": 3647 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e2c2a5ffcc518a49f6cc038c691b068769101b4bf94905eb0a472299ab563620", - "bytes": 39, - "line": 3661 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ccaaa978abfa31e70784eda567c50bec64a5cf485a205fa545e71f46c1821f3a", - "bytes": 40, - "line": 3682 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7e6eac72f3011e3714d4eeb9914601dbe344ff899504c1324ff55c2b6eed60d5", - "bytes": 53, - "line": 3707 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d557d9bb45aa7b4ee10d2d502d92710aafe9fcbc7b12d0a219c3eff49863e1f7", - "bytes": 53, - "line": 3738 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6f4dc8213285da7c740b7f183f519a14d88e853125347cf4b3585c153f3d6c95", - "bytes": 62, - "line": 3768 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c7934b9e19cf7a0ff636ecdb465b1a6727ad23d36b695eb0b08783efa08698d3", - "bytes": 50, - "line": 3798 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c6c30823efb18475aef576f5eac37ab1a319e1de7b2462fccb62b249396e3d9f", - "bytes": 52, - "line": 3820 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8567533e04160a832142ff673958ff2456ea163f86df91685ba5da691604a882", - "bytes": 56, - "line": 3847 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f8809dfed9678563c959c376cf67dcc022eeee8e5e4384e8aa46ff6470838960", - "bytes": 59, - "line": 3867 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c4202b9b75440588bb6562fce248037a4425448373f72f9ee3ad9ade135fab34", - "bytes": 48, - "line": 3888 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "711c4598e2329b7c5079f9cc2569196c4af7ebfa267e38ab904ff60e579e5169", - "bytes": 48, - "line": 3913 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ef9a879b046809272052e1804f9ebe98b60cd0cdf476251b599ca44bb3ae1b11", - "bytes": 63, - "line": 3939 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b07d1aa721f8a38cfc8e79bc68497e76240430fcc1fec0818294974f67755a1d", - "bytes": 63, - "line": 3969 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48441bc81c5893bfd1567acf2a401eb191e4b7bef2862b8c29aa158a517adb82", - "bytes": 93, - "line": 4005 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "74d9b766eac6b565c6287e10884f95c2f74ecd8dd4947b488cda0ff1c1f16597", - "bytes": 80, - "line": 4037 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4b74edf3d708c0fafd7bb8ba6a827644f65d6cd755a4cf1822b5308a45eb76c3", - "bytes": 106, - "line": 4071 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "229448ff3c47ffdfdd720fb88b38edcf58f51d063f7b7836d4f4fdc478f99b5c", - "bytes": 69, - "line": 4105 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7863a0cbd4e2cb3715358cca55047765a210f9a42a3dd171e42f574185fe0ab9", - "bytes": 73, - "line": 4137 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "412f8bcf9151f7075294ba9e7cfcbb86581e91dbd1b217775e9fb6958df71a2e", - "bytes": 72, - "line": 4170 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "483447579062e117424ae72463645f166fea91b8a87fe6efcf48a24a3a8145f8", - "bytes": 49, - "line": 4205 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e57bccfdde20412a95b0aeb601448b791eb566d28af3b17bbc16d1e62bbcfb4c", - "bytes": 60, - "line": 4233 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "34378bac1290005ec4e6a46fc968c097307dc2dd27dffd2ed275b885dcc8502b", - "bytes": 57, - "line": 4264 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "91c6910aa33b8d3c65dccd59a480a9d986eadf89d8d4974ade0c8cb47c7ac821", - "bytes": 47, - "line": 4294 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "303d009467865566416478bccdf9e95291862e222144f55ca61bae5d446fa9d5", - "bytes": 50, - "line": 4318 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7deac995bc8ac114dae3500bb4792b73fdb39f5b666f4a2886428320e1ffbd00", - "bytes": 60, - "line": 4342 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6231d67b8fca5d05ef85468209b86d04c0c016014f46f2f444da5321bd655941", - "bytes": 46, - "line": 4377 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "30a1944929f1b7cdc8d8866735022851ef133f4160fc018f736201f1531e7907", - "bytes": 58, - "line": 4399 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6ce2fc39c89d2789f343b2590c28ff069d4bcf685241cdfd645d579b886625a5", - "bytes": 44, - "line": 4429 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "edbc6c008ae5039761ca84f5af6c63c15aab125fe0bc7b890362159598318cf6", - "bytes": 65, - "line": 4455 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cdeb9be48212517be6994c625844b9761842bd3822c74e7d86970a022811a07d", - "bytes": 61, - "line": 4490 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7f3233f2465f84ad271fbe67411e1651f83d9dd39e15128c477276a103443baa", - "bytes": 61, - "line": 4522 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "af80c56179adf35f94c4c1c3eb3676cf2ca68b61af3c1b43a9ac020c4205f4a2", - "bytes": 61, - "line": 4555 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48fced6ea852f10aa3620044ca010c0bf50acfb3b743012f836a98be0d7cdf08", - "bytes": 58, - "line": 4586 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6d9a078ab511579f7f7234fa28d72ae92f7df84c9f9957aff14951a2fe1b08f3", - "bytes": 46, - "line": 4616 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "88b2622d7dc41ea41543f26e4dd1b513c271cb0e0452b937033088f7ae80484f", - "bytes": 46, - "line": 4641 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "757036af4cd38ae573a0589ddcd08b179542a30bfa802f88ff3debb198baae47", - "bytes": 62, - "line": 4689 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7311b5a978eda8140f8e314d709e565a535c76064199595eb139c015f16312d5", - "bytes": 42, - "line": 4719 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c3410310e5eccb2e0a7440b8d3cbfc2508270890a08ec5a85c5b8cc5c5a3b8b8", - "bytes": 45, - "line": 4739 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "08f1a585205b784ac0527c4ffb9aae95a4d8bd1702abddb87d1aa25415de45d2", - "bytes": 38, - "line": 4760 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e4502c5ec3c9643358cf434f3271f7f39ee39f899661c58e7af68b98f42cbcb1", - "bytes": 60, - "line": 4780 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "59e8699f41a3f06be75f1eb4addb041b762d100d6e15f61788e729a8a277f55f", - "bytes": 63, - "line": 4810 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9a525f2d35624ea70a558a4081c20c98418fb371cce3ac2d70cb01462271f1c6", - "bytes": 40, - "line": 4841 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5db8d4c149bb0b8378ac584947f1a8d037aa2375312e098338ee1566030988e4", - "bytes": 51, - "line": 4867 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cba02b44f48f44f069fb55f48ec4e680a49b71ab99d8e7013ff4113236cd6e19", - "bytes": 51, - "line": 4898 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1825feb4954c2f39280e98a8ab8f8784e097c9823d04cbccf616c28f24eeee4b", - "bytes": 43, - "line": 4929 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0bd4be17187ea4870dfddcf74c03492e4ff3e4eb734d8e38fc710a0afd70e771", - "bytes": 41, - "line": 4955 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e26b81a721ffd90b20b61be8168187fc20333274f6c3e537eb6cc44f87397f8b", - "bytes": 40, - "line": 4979 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a85bb64841a5626286099eb6175af5f8d0b0c8f19d71275c41ba144d5ce6d75b", - "bytes": 32, - "line": 5008 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c8500badf466ac4cddb64017931e69aedba037eb5c44d0be411f3e2368254f87", - "bytes": 38, - "line": 5031 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c5da7d1cca60bf076fb11e3a830b1c639ae02b8b2413e4956b12b54d4af7869d", - "bytes": 43, - "line": 5063 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ee42a8df21f3cb29767908892e907b58edc31fccac8414e646690b238373feac", - "bytes": 49, - "line": 5085 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3aa75d103d8d87811ca0f13f238ef5bfc84debf02826b8883eb0a09b372b7230", - "bytes": 44, - "line": 5108 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c97bf15cbec26edcc86e8e3a908361b4c12a7d4b5578d5ea685d4fc68993c3f9", - "bytes": 55, - "line": 5134 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "971979fe121168021fc32881c5e8807f271cbaee608d70cf22b709662e0aae21", - "bytes": 38, - "line": 5166 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "76f320882518b53d2a6055f48c06b0deba00efa8baa1c1932ec6f1c598868a82", - "bytes": 48, - "line": 5194 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1c902a61277e58e20d330fd4f7510a922639122f3e26126aeff5a404579d210d", - "bytes": 45, - "line": 5225 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3e09d80993bd2231d73817167d0a3e7d022d9bb5fadbf1563a854531a3c22ced", - "bytes": 36, - "line": 5255 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "39050b42d7a1e9da84fac3fa817aa0635c47c28f32bceabcaf8811283ad7d7ce", - "bytes": 48, - "line": 5279 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a4d3e32ee5d44b474b2fe040b4be5d32c0ad725d1b3c3e4342dc2ca08fa0a157", - "bytes": 30, - "line": 5321 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "37f58f218a36b8141bd5c32fb2774d731631774d332ce2fe9f7a3af158f122c1", - "bytes": 42, - "line": 5347 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "992f83d520658780ee956610f7965ecaad8d3c782b452d78d619edccd3afa26f", - "bytes": 29, - "line": 5377 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "594f0358c607649151209b234a12f44d7a125fa9150668fbf46ad475c36e52c9", - "bytes": 28, - "line": 5397 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1f2babf217eecbcd3edee20e939434b8b177c454ae3edad1ed0a79b24bf0929f", - "bytes": 42, - "line": 5420 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d0f3737b421a98903f809a0b9e6dea5cd3bd96377b7dcc30fc5239e3aecf311d", - "bytes": 28, - "line": 5462 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "aa98bb7f2995f97bb02887ae3591ff0609686e634f9ad60068fbe12f38a4a026", - "bytes": 35, - "line": 5495 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e421d326ab72354b8ec1d5711570d31868223c50da978b51961f9896acae5f35", - "bytes": 26, - "line": 5526 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "65c4b3a60ee39d43b253afd6818ed08dd93a5297f82b4648e4a3d5b0002731e4", - "bytes": 32, - "line": 5550 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e2f60ffbb1bae7635a1e9ba79c228b19464a582144e1be50bfaba8d2c2db30c8", - "bytes": 27, - "line": 5592 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "afa0b971e60daad0dddc74b93f44fac1f51be91d47626ed4942b465fc6eba770", - "bytes": 28, - "line": 5614 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4a0236d60519b55978f69d4eaa3ac6b8de2b354a7e63a14255abb64862d0456e", - "bytes": 27, - "line": 5644 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ebd45772f099ce26c6315895068a1703d8e757f43daf35f6d3618c408319b37b", - "bytes": 37, - "line": 5668 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e6e8ba88a5ede0c440346b124c101ccd53241c492f6dc28c3453fd23b8917cb3", - "bytes": 24, - "line": 5698 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c19501e59583b680d6ce36b1133f3850ef1c96d05e7e5985b6cb8b1c5e19ff46", - "bytes": 45, - "line": 5718 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4b84b742cd46fa81f9dc42d64c66c4b801b9fc6c381c1fda6690647d082639e3", - "bytes": 43, - "line": 5748 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b9eefbf636684f9388fb43e708ad6dd2326b629f85a95e039f69e13651993c41", - "bytes": 45, - "line": 5782 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bf2cc4f904e1d46c6ad5fb9c85a1a77b75062b61997add02c5c8d5b4cdcda262", - "bytes": 25, - "line": 5813 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "eef07048b814eb3b00f997c8b0907d1e21817abad072f7e8502087fdbe9a0188", - "bytes": 37, - "line": 5836 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f35ce94c4d5abe5378ba2b6095a786d9989540caefe3b2248b43ec375b69d212", - "bytes": 45, - "line": 5874 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f8a9f16a31241f7bed8f14a44cbc6ba4c13707b0bbc71f95abaded420f98cae8", - "bytes": 45, - "line": 5906 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6eee9d069d9053a29e2bd61c5a85821fead20cc3af306f55e3597f9931588d32", - "bytes": 45, - "line": 5937 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b0485a54f218265aaf8ef27b26af37e80603744b4cd13af804b9460ded6c769c", - "bytes": 44, - "line": 5968 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "eff43eafc0b5c9829de1e71e899e82b6db9bf5a3ba4da138fe2608ecf2ad96ea", - "bytes": 44, - "line": 6003 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "598ec0411dcfb12246c2ad819aeb9083cfd0dcf6a894aec2a0e908d82226e85f", - "bytes": 32, - "line": 6034 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2869d4bb0b7552d346eca2e8bfe110dccdb3a13073c0e5a531ed34e8d111459f", - "bytes": 44, - "line": 6054 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "faa95847578604b50b3c020d50d94589351f7b1ec36e28cac7fe2140de6c4549", - "bytes": 33, - "line": 6097 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "25e24485a99181672176131b6ac2152347841a1a567430fbb98a553a929770f3", - "bytes": 47, - "line": 6119 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9720d5ef881383f1c6da7a8a3a008f3afd615af99678d1bb81118511ff84dfcc", - "bytes": 42, - "line": 6149 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3b9ac116c754c7e2bcf7f077f6061399dbfff4238408c4ef0d048fb442c3baf8", - "bytes": 50, - "line": 6182 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3487041dfbdb03a03ebed0e308da4117442785d83c8158248fbad5df46f35fb2", - "bytes": 48, - "line": 6215 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "25f7e3715a24bd9657f90a5d9bc466cfe7b121a2660596c62c08a6ae0c4834f2", - "bytes": 47, - "line": 6248 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8a310ebdd720a3d0e2fffb7db415873a53befe47ea4d638fca4ecd59ac27595e", - "bytes": 40, - "line": 6280 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d3dba384fd5ce87e831b8454186e60d5e1cd6ae404b6324009adf4a961d85cfe", - "bytes": 41, - "line": 6313 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4bec76dae83cf450410fd42df2a56ef2b20e69143f9631539a58f363631cb986", - "bytes": 41, - "line": 6348 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ad373ebb46a54ef7fead24880468d70c4a415003db879817f5d78e717994573c", - "bytes": 50, - "line": 6378 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9f85f14e7c0f00e23c82b9a097ab414df558c764e4171f8bdd6771386b02677c", - "bytes": 42, - "line": 6400 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "856a70bda3a296ed9e7d3de557191906106fd51da9fab3d2372bd4a3d0115ae1", - "bytes": 48, - "line": 6434 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "12b44782510d874df9900581914d66e8e8a0708ea6e1f8cab799c1187d4778f2", - "bytes": 50, - "line": 6467 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "908dcdcee6aa38f9ed48e63e5a70bba22dc7aaa603dfb8c62f0999259a1b9eb1", - "bytes": 61, - "line": 6500 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "55ea841db41ce49eb504636a54c29187e16b403b686059375abfa8aa51d01f7d", - "bytes": 48, - "line": 6531 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c414854798bccb75c4b223fbed069ed445872158dbfb2b23093e140827d1e838", - "bytes": 48, - "line": 6566 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9f45f6e6567f09f49ec40484721420a71a15d42f7ab92d3a3cfa1124ab8419fd", - "bytes": 36, - "line": 6587 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "862b4e873ebd70c303716275ebf30b3822c9c9e7f261a78e27b18f9585d798b0", - "bytes": 46, - "line": 6607 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bb65d63f55930b4ea7b86e0475159b98a53e0525015508285c90425f28d53a55", - "bytes": 45, - "line": 6628 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "18d5a60f518896e595f00666ed45fdd624c789287809e18798e0d9f5610d48c8", - "bytes": 43, - "line": 6658 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e44d003a6ba11690de0cc469320be892fae3b09033939a46724fccfb0aac4ab0", - "bytes": 48, - "line": 6679 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bee16895751b8f386d2188e18ae402e521187d2bb7da9af709c2432ba9634209", - "bytes": 46, - "line": 6702 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d3dede19db079b39e165a036fac3dd3376044ada7849f3ec70220ae188ac28e5", - "bytes": 33, - "line": 6732 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0ac8381a83158432224d7b6bead7492d25f36e68eadc15c18e9bf84eddef77d0", - "bytes": 42, - "line": 6754 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "57308ec7b05d6b120ff6841edb51d8159d84444d6eaf36b3bccb9d1b2bb385e6", - "bytes": 27, - "line": 6788 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "90b5b274482044f6d036867177353233bf58d00f5dd345f76c0866a23be10343", - "bytes": 32, - "line": 6811 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0636f27b84a87525a97146f65475905163efcae563920102110bdaef39d0cbe2", - "bytes": 42, - "line": 6833 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "36c08c95e7a531c73736416e90aea14eb199ad1746f90a4ecc78db9c037fd03e", - "bytes": 33, - "line": 6864 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ab978cbdc23f7d851799251cfe01863187b2cd628b05c3c750ad1db2d26fb5fc", - "bytes": 44, - "line": 6889 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2333fb674a47979dc56cf4e10c852516a7d179ddc234cc184130c6e82ae5811b", - "bytes": 33, - "line": 6912 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d301cb24422359056dad68402e9f54a8ed15e21c0f183fb4c8eb937738f155dc", - "bytes": 43, - "line": 6932 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bd3c423a63ecf70ee28e0c4aa2fe7b9e6078179ec2577ba80004cdfaf527843a", - "bytes": 52, - "line": 6965 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a064ea603a971a2a3582988297d7293e6e0c6cabedfad714f2af97c0ff1884e7", - "bytes": 39, - "line": 6996 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "20d848044f1a1ac09fe6621d3e3f7fe7e2a6271c08e23f5eaea2c4c4b3f21c9d", - "bytes": 31, - "line": 7017 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b19fe44255306f492be72ced4183894fe6ab47c5e87ab02cf909c5a6e89ab964", - "bytes": 52, - "line": 7037 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "0a8251333833585605881b98f9d121fa0e5669e58ba11cb583f69a333cea2ad6", - "bytes": 37, - "line": 7074 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3f1de42768c4151cd364eb2534408179e93ca92dda918a493c9d05d4c8f03209", - "bytes": 53, - "line": 7104 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "60b57e472e506c0d6430f325c0e05c6cdfe9a62b4051a9f371929799ec7cfdef", - "bytes": 24, - "line": 7126 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "aeea8ffe933fcbb749950596d5c83192d1c42e2dac8f9532625c97afd7fe18a2", - "bytes": 25, - "line": 7146 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3010a87af250eea55a7de4dcdda1fdcef515e73b7d2f5977d955f9d66ca4e130", - "bytes": 25, - "line": 7171 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4cff190ec4b1d449d089493b45b00f986e3d17e563bca1816769ee3a1cfea2f2", - "bytes": 28, - "line": 7193 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b7a3a8b8a114216dbdb506005496e5510feb227b0b6e39ba2b5145743e852577", - "bytes": 37, - "line": 7213 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "36e0677e842c003940707713b5334c6f2cabdfe6548790bc0c1b8546b0f820b6", - "bytes": 32, - "line": 7245 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a9a07815e06f5bab4b2d1fc80a606227a8a617c105c56680c4bef68a520970c1", - "bytes": 37, - "line": 7266 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "79420742f040a499740d4b465a8e8fdbc628c275fbd2880182637c5917b67b9e", - "bytes": 34, - "line": 7303 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a6b4fb5e2728894616f9d11df544879c4786b80458d5905a67ffc2224022ec1e", - "bytes": 30, - "line": 7342 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1aa431dc5b8d1fdc3d54a77c56f15a1b9ac5896e343818d3d0ad2edbabc541db", - "bytes": 23, - "line": 7373 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "262692daffbb55d5cbbf1717fb2c8ff08bc009514bae8ff83ee756d4caba08d1", - "bytes": 36, - "line": 7399 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1e9b19a7ea2fdbf0902ed74b48cecc710d7fa2272d4dbed9172af1ae0258310d", - "bytes": 22, - "line": 7431 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "734b96827127375d652bc125b1c9a243946cf5f8c251b43a7097656fcc2ce544", - "bytes": 24, - "line": 7451 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c6544463a5be88fa1bb81e80633a6e4bf70e99d424d408c75930046e74c1dc5f", - "bytes": 41, - "line": 7482 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2ba0e68b06d7be939be3058e281cd495a16a41611ae4dadb91c97dea4b95fe29", - "bytes": 52, - "line": 7508 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f0f241b97b09236a5fcdc9527cff2f76cf382270caf4315aa8ae11f8ca919932", - "bytes": 58, - "line": 7538 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fde5893586a0c2c7cbd2ab3976d7d9ef35e861b56eab07191919891e09528bd4", - "bytes": 46, - "line": 7571 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3d28258fd09b2c94b7cb24cb37035ce71d3777b58b2270998781761f8957081e", - "bytes": 71, - "line": 7593 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "45cdb94cf834d1950ab049a6a65c398b4917312897fdcaa3f25fa0081e707912", - "bytes": 39, - "line": 7624 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ac7f120b7e8c39cb3de7b0936dfd2f6d8f38ece480b0523518883cef7b5b643c", - "bytes": 39, - "line": 7644 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7994ad60b43332fb5bc583bf1ea5599fa2f659cd8ad811105837cf9e87fa28ed", - "bytes": 52, - "line": 7666 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5ed096b4dcf0efad18c54d322d528b7bb0e80336d061ee7eaa5d39d3bd505a4d", - "bytes": 62, - "line": 7707 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "daf3ccbc5a308bc4c62d1a761e01fac3d40ff67cc256c4c9624d0cd00a0072c4", - "bytes": 53, - "line": 7740 + "bytes": null, + "line": null }, { "lang": "text", "meta": null, "sha256": "aa4647efb6d9824f38c588df82cff0ce7cf0cea06c21fab0d73552cbb14556cf", - "bytes": 4323, - "line": 7771 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48ecf1013a285c0de3e23936d53a850d85af0564a7e089de2eba1ac7f8881a44", - "bytes": 53, - "line": 7833 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "653a412a8eeaffac8afbbbb2533375f02df67fe7ef882ca53fc7ca2755d0bcec", - "bytes": 43, - "line": 7866 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bfb90a10455a59ef26068d176221816b9c374c4001d386ffdbb0140c4cfe40ca", - "bytes": 40, - "line": 7896 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "11658c406271a4f22a346aab51f697bc949342fbaaaabb2a786de824561bc4c3", - "bytes": 35, - "line": 7931 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d683e8c6e5a1d063ea9f6c74fd9020d48aede0d5af7031f6f48bd5a173ad2d3d", - "bytes": 33, - "line": 7956 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "96abc89ee23cb4a7e2fc3caca2afbd2dd57d2734ca9e73816c412a71c5c5eb9d", - "bytes": 43, - "line": 7983 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d63bf37625acc32ec1ee6e59a56f57469b9cb4dab03e23067a54d2f7d8abd3a3", - "bytes": 41, - "line": 8015 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "eb79c561c688b305a39f834bb39d74f65095db957e337d8e6081bbc00545bb08", - "bytes": 53, - "line": 8048 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f30977b7b952e6a369b72b828256fac3f9ede78ce6e7c45560a8d09989bd4db5", - "bytes": 49, - "line": 8079 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7d00d2a238c8794c5479e28ef14e6e104bcaff1aaaef70a094a2a51c55b6420c", - "bytes": 50, - "line": 8100 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f34921d79bc4b608cb3e3c3f882729808afe1d8cf95ca45c63cbdf00ab494a3e", - "bytes": 62, - "line": 8131 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ebfb60766394d803a01326b040ac37c5f122134555f1b968aeb6a79b10d74fc7", - "bytes": 30, - "line": 8163 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "432348582be57741628ca2b6a762c385ed57bbbfd4e4794b914409b7a89db582", - "bytes": 35, - "line": 8187 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "25d75743717b8e1c96f6b78e334e3e3cbc6dac5e395068308a4e358e06a0bac6", - "bytes": 45, - "line": 8209 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2fc4fd97c2a62f635b42d646e481b18b0402ec0d051e7532988c026d838f0534", - "bytes": 36, - "line": 8240 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3da31453cf86b97920f8d013f00122dee830af847c064e30ed3e158bd8f642cb", - "bytes": 47, - "line": 8265 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d4de05e9142f532574133568e3fe2965c7fd82338e5b54ba0d8ae5713639eaca", - "bytes": 43, - "line": 8290 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e63db5a4bab57e3229127bb086d0c5429dfe20de83eaf5097e8943f90520b9b3", - "bytes": 51, - "line": 8322 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b130d4ed01c735074275b1505e7959e6dd3ae89c6b7ac159d17ccd495bec8f38", - "bytes": 38, - "line": 8352 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "32709306f0caabb4378fce9efba6b9c60a3985bb3500402d9a7f9e89fe35e00e", - "bytes": 49, - "line": 8376 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a09f283134986b066a49a41c5ef250ff1502ae2adbc3316baacf92712112cc2d", - "bytes": 43, - "line": 8418 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d941e4f91a379820ba5d640e7ceffd42c6fdd70b5b19da9c508c259b40ce14f7", - "bytes": 53, - "line": 8451 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fb10d8958f9f1b03ab76713459abf552755dae3334103a451c387c9d1c7b3605", - "bytes": 40, - "line": 8482 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b5dc1e771889fb1bf5f4d81d340cfd35d3a2263c87a725341d1d5c70405eb78d", - "bytes": 43, - "line": 8538 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9065c4d4de3606f4362700b64aa3f856aa75214bebafe9334d48b9ff8466a80c", - "bytes": 38, - "line": 8572 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "face4eea006073000b49334d0a2bea7f15f9df86cb1f606ac8fe39004c754027", - "bytes": 30, - "line": 8592 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "29cc30facfddd548aa5873383ac3d90a6b392cf120894fd73a735f266196540d", - "bytes": 47, - "line": 8602 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d58dd2280200d928a15de43483c5c709be8aedc38087ba95cbbe2a31a39466fa", - "bytes": 49, - "line": 8636 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f43f6a034552660fdb745c0ac0cfe17c1af0c7a2995fd76ab45f79ebfd116bfb", - "bytes": 37, - "line": 8674 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "529d96c3ff160cf6393f3f7a1f69014d8f2f9f3f3ce5733fc11c58133accb7d7", - "bytes": 36, - "line": 8703 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "427c626ebed3055c690ff0dbbb3a20550a2daae5ae40f5f9e005f1eb47dd733a", - "bytes": 37, - "line": 8730 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e61ba28ca4eef131ee1291f39b5cb583b2a1dd4436bde33a061ce27ac8af05af", - "bytes": 46, - "line": 8757 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2b6c40dcef94f6188188d6369383e982f5a6dc88654b8ab76664c189f9af8ab0", - "bytes": 47, - "line": 8791 + "bytes": null, + "line": null + }, + { + "lang": "bash", + "meta": null, + "sha256": "d7ee275831d1d82d0812ddf90e79aaf3861d23bc0b5474e2e365aabf466d1ddb", + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "736889b5b5a59bc4fe7965922999b5cbec295acad8313c1e486d5668c7da961e", - "bytes": 30, - "line": 8823 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4d6c0bc0130fd4a83c7b2fcac6f5b4b7bc2f275c05fa6101551ac61ce1405aca", - "bytes": 44, - "line": 8843 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "62d28b9be74c32c4ba00fefe878c492a6a5c671cc4a500373d7f2bdba9f7ef79", - "bytes": 54, - "line": 8863 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "185227ff19342ab461c3e652c4158d8ece85c079b2542b9243b7c7cf0b2dac2c", - "bytes": 34, - "line": 8893 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7115696baaba8ca1ecd8f7cb22f215b7a53bf13d5757bd6932267644a0377807", - "bytes": 36, - "line": 8913 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "10330e610f59c2fb169fcff11cb8147563efbcc109f875222ecbfaaa48c05f31", - "bytes": 50, - "line": 8935 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e88ab81833a4d529271c80e2cdf0e7ff5037a60066a918a9702a28ceca73a846", - "bytes": 30, - "line": 8972 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f094df6732656b52792e5e766a69079c3e8bd929326bda7284e0bcb760bedd79", - "bytes": 28, - "line": 9002 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7579bd6ac197afa0afa5f62d9b412a7e265725bd507c1c63b438a60fd72ce1d0", - "bytes": 40, - "line": 9029 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "63aac11606dc0eeb6cc452c20c405806840960425372cf2cf7c8b4b90a7de878", - "bytes": 62, - "line": 9049 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "52be4758f4289e9f75875d8401cf57fda54283b2df00e413921d07303e728638", - "bytes": 28, - "line": 9080 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4c51312bac2ca9ea2dba0e7cf27f06d5e99502bab35ab569064057a85514cc38", - "bytes": 38, - "line": 9101 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2b26aa6f404ab19bda2d846871eb04b732f6397d1899fc28d89a29706fc0a670", - "bytes": 34, - "line": 9127 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "47af2a240e0fa4bca92d786d1fea2d4b6cd7ee8810c4540b619271457739f829", - "bytes": 60, - "line": 9149 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f4a5d9b54707e03cc845a3ffc99493f9990d7c0a0aa96a48a492b303ef1959b4", - "bytes": 45, - "line": 9182 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4a4ff033e75c32373422638e4f8079487d9cc37fa2b250cc2907584e690e2699", - "bytes": 45, - "line": 9215 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "66d1f7b4fc772fcb1ac84bcba2c1aa0e1a26105dda64b564c40dec35fc5fdaf2", - "bytes": 43, - "line": 9245 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5fc8d60c19e8e3fc1c640ea87e091d0b95642a210a7e1a7d9d19e527b6f11207", - "bytes": 38, - "line": 9277 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a7acb92552eae9b29dd7b973751bb7f3c2f7eb1dc00f36e84c594cb88dd9fc1c", - "bytes": 33, - "line": 9298 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bb84857c237d2bfae0c6f63653597fe55263147428a5e8d36ceacfcda6bd6246", - "bytes": 26, - "line": 9329 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3e634421662d08fe73882dd6a0d428545c33597790333f83b4c5086c8d494a1e", - "bytes": 49, - "line": 9355 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c48dfec9df0cebb16aa976f859770a8b5beb67e2cf01dc5472dd8b3727ea164d", - "bytes": 47, - "line": 9375 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8fd3a890425cf05e630bcd969b2aff57b3993d6632d905cab5b23cfce60e425c", - "bytes": 49, - "line": 9396 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bd32d826b077176044eabbf175d64a747ba1a826bb36c95efb46925525f75ba9", - "bytes": 45, - "line": 9422 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ee94be8e7fcb3c1bdb0abd6991992563371ba113b80b433cce0c71ac499f1d48", - "bytes": 43, - "line": 9446 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bbaecaea783d60d4e8cbaad1c6951d2aa5fde5772f050166a24415162d9de3bc", - "bytes": 29, - "line": 9468 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "627ab83bbee7d7a608e8771c98556a00cb9df200a40fe9b68d79f93c322de59d", - "bytes": 18, - "line": 9493 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9396c5d2aba2c0ff0d484a0a778dc38368154eb19edca9372cf576f8abedac90", - "bytes": 32, - "line": 9503 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "456a3638df3f1208cc5620fe2f7744e60215930e90cdada8c6d3f3041844b81c", - "bytes": 22, - "line": 9513 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "80c6f38f04b6c653c8de67e79ba7b6ca1a5ec208e8765a036048fd0adc4b4522", - "bytes": 37, - "line": 9523 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3be0a5bf2f996779b39f57c35c08a046709ad91ffbb1ecd700c2d0f8a1c9b554", - "bytes": 40, - "line": 9548 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "94cdaecf523029bf20f25cf278f76142041e4ad9ce6980a0de225f6dd0b93a8f", - "bytes": 43, - "line": 9570 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1731734821194e9c9ab5d0e866031dff102eab3c67b81c83780dce706461c802", - "bytes": 40, - "line": 9590 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "466187fc1a5788ab09d7700cf7cd19c9c541a571d0bc86d70fe52a1eb831b851", - "bytes": 54, - "line": 9612 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e10bc7e084ad3b9231262208e0ac216aee47dc0ec7b1507214690ea9c098d5c9", - "bytes": 32, - "line": 9644 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "6bb0cf09f6bd8ba02e1f24a5eed89b35c0226ec7eefce07502015a455520fd0f", - "bytes": 33, - "line": 9654 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "23acce8016e243ab651bcc860cd8f1b1d236e6a5b7951abc76282cd674b2a25e", - "bytes": 39, - "line": 9677 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "210e8ab3d8af173ce648501ca50c828325ac1f4452006ad4485cb7a24d760ae4", - "bytes": 37, - "line": 9701 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "cdff2d4272d5bc3a18729e63e5ece9053d33ac0f8faf35cfaa3a289baa2dccc1", - "bytes": 48, - "line": 9723 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "c307203dd609208b90cbc0372e3401a75e943421bdf77e4e10779ed2c89ca4ff", - "bytes": 48, - "line": 9753 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f6340c3d5dc4eedb98435df593ff277d0e44fbcb4c61e71a05123267b5352e78", - "bytes": 29, - "line": 9783 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ca6e405dc70365db67ec66e6c2499fedf89ae3d7a90f4b5d044a2aab13bb8f37", - "bytes": 37, - "line": 9805 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "52918df5b4d4003d22322d5785d8a0202a2b66d39a3c71171f92a65545e28788", - "bytes": 37, - "line": 9826 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "28e77f2a35930390cc7de2fc5abdce7809311c33b10eb749941d5c44b9de0cfa", - "bytes": 37, - "line": 9851 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "088f9018d5639eac73c710bf1ef4fd134b0cd4c290587a161af1322b415a013f", - "bytes": 29, - "line": 9878 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "67384a12d7642ea8a82e807a58e42f921ea37cb496e2315ac87368ae0e297e4d", - "bytes": 29, - "line": 9910 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4c9e46c0b1c48cb348bfb37e4c705e4dfe1cd5f221d667ebd02dd7325fce7e29", - "bytes": 38, - "line": 9942 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "20fbb381c0b4ef786f755f485789ecb9e76538ec6394956bb6153ee4a79547ca", - "bytes": 31, - "line": 9965 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ec9baafc46bf3e7425a387e9d92083a610028b2f7bf477ccc203fee669796cf1", - "bytes": 31, - "line": 9986 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "54ffdfd98a1fc3aad38e602c1d02336a81fe97d48e6732402a7980d0f55cb20d", - "bytes": 40, - "line": 10007 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "1dbcb58a66005a55dccd94c633f3be04c7b462980746ce0bdfc7275bf728f009", - "bytes": 35, - "line": 10028 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "384da7ccbd87c00eba8c8301b7904ac71161b4faa0f51c208e833ddb1eba9a3c", - "bytes": 37, - "line": 10054 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "8fae3ef13c962a97565001ae3caa4625cb9df99e17686cf13c6142b0c324a5a6", - "bytes": 37, - "line": 10084 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7dc2bd34c299748344eadb6569a96731086b27cc503f1bff70f63a05d41782fb", - "bytes": 38, - "line": 10115 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "625019ad388b3c98472aa65b7a683a970d0d0060496e89c547c3bbef85afc867", - "bytes": 47, - "line": 10145 + "bytes": null, + "line": null } ], "links": [ @@ -17415,393 +17422,400 @@ "lang": "bash", "meta": null, "sha256": "f094df6732656b52792e5e766a69079c3e8bd929326bda7284e0bcb760bedd79", - "bytes": 28, - "line": 18 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "736889b5b5a59bc4fe7965922999b5cbec295acad8313c1e486d5668c7da961e", - "bytes": 30, - "line": 43 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "ebfb60766394d803a01326b040ac37c5f122134555f1b968aeb6a79b10d74fc7", - "bytes": 30, - "line": 61 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "66d1f7b4fc772fcb1ac84bcba2c1aa0e1a26105dda64b564c40dec35fc5fdaf2", - "bytes": 43, - "line": 83 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d941e4f91a379820ba5d640e7ceffd42c6fdd70b5b19da9c508c259b40ce14f7", - "bytes": 53, - "line": 113 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "52be4758f4289e9f75875d8401cf57fda54283b2df00e413921d07303e728638", - "bytes": 28, - "line": 142 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5fc8d60c19e8e3fc1c640ea87e091d0b95642a210a7e1a7d9d19e527b6f11207", - "bytes": 38, - "line": 161 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d4de05e9142f532574133568e3fe2965c7fd82338e5b54ba0d8ae5713639eaca", - "bytes": 43, - "line": 182 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2b26aa6f404ab19bda2d846871eb04b732f6397d1899fc28d89a29706fc0a670", - "bytes": 34, - "line": 210 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7115696baaba8ca1ecd8f7cb22f215b7a53bf13d5757bd6932267644a0377807", - "bytes": 36, - "line": 230 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "10330e610f59c2fb169fcff11cb8147563efbcc109f875222ecbfaaa48c05f31", - "bytes": 50, - "line": 252 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "185227ff19342ab461c3e652c4158d8ece85c079b2542b9243b7c7cf0b2dac2c", - "bytes": 34, - "line": 287 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "daf3ccbc5a308bc4c62d1a761e01fac3d40ff67cc256c4c9624d0cd00a0072c4", - "bytes": 53, - "line": 309 + "bytes": null, + "line": null }, { "lang": "text", "meta": null, "sha256": "aa4647efb6d9824f38c588df82cff0ce7cf0cea06c21fab0d73552cbb14556cf", - "bytes": 4323, - "line": 340 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "48ecf1013a285c0de3e23936d53a850d85af0564a7e089de2eba1ac7f8881a44", - "bytes": 53, - "line": 400 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a09f283134986b066a49a41c5ef250ff1502ae2adbc3316baacf92712112cc2d", - "bytes": 43, - "line": 433 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4d6c0bc0130fd4a83c7b2fcac6f5b4b7bc2f275c05fa6101551ac61ce1405aca", - "bytes": 44, - "line": 464 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "62d28b9be74c32c4ba00fefe878c492a6a5c671cc4a500373d7f2bdba9f7ef79", - "bytes": 54, - "line": 484 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7579bd6ac197afa0afa5f62d9b412a7e265725bd507c1c63b438a60fd72ce1d0", - "bytes": 40, - "line": 512 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "63aac11606dc0eeb6cc452c20c405806840960425372cf2cf7c8b4b90a7de878", - "bytes": 62, - "line": 530 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "7d00d2a238c8794c5479e28ef14e6e104bcaff1aaaef70a094a2a51c55b6420c", - "bytes": 50, - "line": 559 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f30977b7b952e6a369b72b828256fac3f9ede78ce6e7c45560a8d09989bd4db5", - "bytes": 49, - "line": 588 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f34921d79bc4b608cb3e3c3f882729808afe1d8cf95ca45c63cbdf00ab494a3e", - "bytes": 62, - "line": 607 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "eb79c561c688b305a39f834bb39d74f65095db957e337d8e6081bbc00545bb08", - "bytes": 53, - "line": 637 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "5ed096b4dcf0efad18c54d322d528b7bb0e80336d061ee7eaa5d39d3bd505a4d", - "bytes": 62, - "line": 670 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "47af2a240e0fa4bca92d786d1fea2d4b6cd7ee8810c4540b619271457739f829", - "bytes": 60, - "line": 703 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f4a5d9b54707e03cc845a3ffc99493f9990d7c0a0aa96a48a492b303ef1959b4", - "bytes": 45, - "line": 736 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4a4ff033e75c32373422638e4f8079487d9cc37fa2b250cc2907584e690e2699", - "bytes": 45, - "line": 769 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "fb10d8958f9f1b03ab76713459abf552755dae3334103a451c387c9d1c7b3605", - "bytes": 40, - "line": 799 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d683e8c6e5a1d063ea9f6c74fd9020d48aede0d5af7031f6f48bd5a173ad2d3d", - "bytes": 33, - "line": 851 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "11658c406271a4f22a346aab51f697bc949342fbaaaabb2a786de824561bc4c3", - "bytes": 35, - "line": 876 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bfb90a10455a59ef26068d176221816b9c374c4001d386ffdbb0140c4cfe40ca", - "bytes": 40, - "line": 901 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d63bf37625acc32ec1ee6e59a56f57469b9cb4dab03e23067a54d2f7d8abd3a3", - "bytes": 41, - "line": 934 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "96abc89ee23cb4a7e2fc3caca2afbd2dd57d2734ca9e73816c412a71c5c5eb9d", - "bytes": 43, - "line": 967 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "653a412a8eeaffac8afbbbb2533375f02df67fe7ef882ca53fc7ca2755d0bcec", - "bytes": 43, - "line": 999 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b130d4ed01c735074275b1505e7959e6dd3ae89c6b7ac159d17ccd495bec8f38", - "bytes": 38, - "line": 1031 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "32709306f0caabb4378fce9efba6b9c60a3985bb3500402d9a7f9e89fe35e00e", - "bytes": 49, - "line": 1055 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e63db5a4bab57e3229127bb086d0c5429dfe20de83eaf5097e8943f90520b9b3", - "bytes": 51, - "line": 1099 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "b5dc1e771889fb1bf5f4d81d340cfd35d3a2263c87a725341d1d5c70405eb78d", - "bytes": 43, - "line": 1131 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "4c51312bac2ca9ea2dba0e7cf27f06d5e99502bab35ab569064057a85514cc38", - "bytes": 38, - "line": 1163 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e88ab81833a4d529271c80e2cdf0e7ff5037a60066a918a9702a28ceca73a846", - "bytes": 30, - "line": 1187 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "a7acb92552eae9b29dd7b973751bb7f3c2f7eb1dc00f36e84c594cb88dd9fc1c", - "bytes": 33, - "line": 1217 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2fc4fd97c2a62f635b42d646e481b18b0402ec0d051e7532988c026d838f0534", - "bytes": 36, - "line": 1246 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "432348582be57741628ca2b6a762c385ed57bbbfd4e4794b914409b7a89db582", - "bytes": 35, - "line": 1269 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "25d75743717b8e1c96f6b78e334e3e3cbc6dac5e395068308a4e358e06a0bac6", - "bytes": 45, - "line": 1289 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "3da31453cf86b97920f8d013f00122dee830af847c064e30ed3e158bd8f642cb", - "bytes": 47, - "line": 1318 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "bb84857c237d2bfae0c6f63653597fe55263147428a5e8d36ceacfcda6bd6246", - "bytes": 26, - "line": 1339 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "29cc30facfddd548aa5873383ac3d90a6b392cf120894fd73a735f266196540d", - "bytes": 47, - "line": 1359 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "427c626ebed3055c690ff0dbbb3a20550a2daae5ae40f5f9e005f1eb47dd733a", - "bytes": 37, - "line": 1391 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "f43f6a034552660fdb745c0ac0cfe17c1af0c7a2995fd76ab45f79ebfd116bfb", - "bytes": 37, - "line": 1416 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "d58dd2280200d928a15de43483c5c709be8aedc38087ba95cbbe2a31a39466fa", - "bytes": 49, - "line": 1443 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "9065c4d4de3606f4362700b64aa3f856aa75214bebafe9334d48b9ff8466a80c", - "bytes": 38, - "line": 1479 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "529d96c3ff160cf6393f3f7a1f69014d8f2f9f3f3ce5733fc11c58133accb7d7", - "bytes": 36, - "line": 1497 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "e61ba28ca4eef131ee1291f39b5cb583b2a1dd4436bde33a061ce27ac8af05af", - "bytes": 46, - "line": 1522 + "bytes": null, + "line": null + }, + { + "lang": "bash", + "meta": null, + "sha256": "d7ee275831d1d82d0812ddf90e79aaf3861d23bc0b5474e2e365aabf466d1ddb", + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "2b6c40dcef94f6188188d6369383e982f5a6dc88654b8ab76664c189f9af8ab0", - "bytes": 47, - "line": 1556 + "bytes": null, + "line": null }, { "lang": "bash", "meta": null, "sha256": "face4eea006073000b49334d0a2bea7f15f9df86cb1f606ac8fe39004c754027", - "bytes": 30, - "line": 1586 + "bytes": null, + "line": null } ], "links": [ diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts index 8c57bd6a7cf..a9f74eac30c 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts @@ -3008,9 +3008,10 @@ describe('renames in source', () => { files = edit(renameIdent(files, ident, newIdent), `fn('${name}'`, `fn('${newName}'`) } files = edit(edit(files, 'return 1', 'return 10'), 'return 2', 'return 20') + files = edit(edit(files, ' start.to(bang)\n', ''), ' bang.to(total)\n', '') files = edit( files, - ' start.to(bang)\n bang.to(total)\n total.to(report)', + ' total.to(report)', ' start.to(report)\n report.to(bang)\n report.to(total)' ) @@ -3054,12 +3055,16 @@ describe('renames in source', () => { ...edit( edit( edit( - source.files, - " const tally = fn('Tally', { language: null, code: codeFile('./functions/tally.js') })\n", - " const fresh = fn('Fresh', { code: js`return 'unrelated'` })\n" + edit( + source.files, + " const tally = fn('Tally', { language: null, code: codeFile('./functions/tally.js') })\n", + " const fresh = fn('Fresh', { code: js`return 'unrelated'` })\n" + ), + ' boom.to(tally)\n', + ' start.to(fresh)\n' ), - ' boom.to(tally)\n tally.to(report)', - ' boom.to(report)\n start.to(fresh)' + ' tally.to(report)', + ' boom.to(report)' ), 'import { codeFile, fn,', 'import { codeFile, fn, js,' diff --git a/apps/sim/lib/workflows/canonical/json-text-encoding.test.ts b/apps/sim/lib/workflows/canonical/json-text-encoding.test.ts new file mode 100644 index 00000000000..f287bc85acc --- /dev/null +++ b/apps/sim/lib/workflows/canonical/json-text-encoding.test.ts @@ -0,0 +1,54 @@ +/** + * Deploy-change detection takes JSON text and the container it encodes as one value only where the + * runtime reads both alike (a child workflow's `inputMapping`); anywhere else the encoding is a + * change, because the runtime reads one form only (a Jina `readUrlOptions` held as text sends no + * options). + */ +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.mock('@/blocks/registry-maps', async () => { + const { partialBlockRegistry } = await import('@sim/testing/mocks/block-registry.mock') + return partialBlockRegistry( + await import('@/blocks/blocks/jina'), + await import('@/blocks/blocks/workflow_input') + ) +}) + +import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' +import type { WorkflowState } from '@/stores/workflows/workflow/types' + +function withValue(type: string, subBlockId: string, subBlockType: string, value: unknown) { + return { + blocks: { + block: { + id: 'block', + type, + name: 'Block', + position: { x: 0, y: 0 }, + subBlocks: { [subBlockId]: { id: subBlockId, type: subBlockType, value } }, + outputs: {}, + enabled: true, + }, + }, + edges: [], + loops: {}, + parallels: {}, + } as unknown as WorkflowState +} + +describe('deploy-change detection over JSON text', () => { + it('takes an input mapping as text and as an object as one value', () => { + const text = withValue('workflow_input', 'inputMapping', 'input-mapping', '{"id":""}') + const object = withValue('workflow_input', 'inputMapping', 'input-mapping', { + id: '', + }) + expect(hasWorkflowChanged(object, text)).toBe(false) + }) + + it('reports a checkbox list moving between text and an object, which runs differently', () => { + const text = withValue('jina', 'readUrlOptions', 'checkbox-list', '{"gatherLinks":true}') + const object = withValue('jina', 'readUrlOptions', 'checkbox-list', { gatherLinks: true }) + expect(hasWorkflowChanged(object, text)).toBe(true) + }) +}) diff --git a/apps/sim/lib/workflows/canonical/subblock-value.ts b/apps/sim/lib/workflows/canonical/subblock-value.ts index 94dba83e193..20fb417931a 100644 --- a/apps/sim/lib/workflows/canonical/subblock-value.ts +++ b/apps/sim/lib/workflows/canonical/subblock-value.ts @@ -1,5 +1,4 @@ -import { parseJsonContainer } from '@sim/workflow-code' -import { holdsNativeContainer } from '@/lib/workflows/code/catalog/value-kind' +import { JSON_TEXT_CONTAINER_TYPES, parseJsonContainer } from '@sim/workflow-code' import { normalizedStringify, sanitizeInputFormat, @@ -59,12 +58,15 @@ export function shapeSubBlockValue( } /** - * JSON text in a field that holds a container natively (an `inputMapping` the operations route - * stored as text) is that container: the executor parses both alike, so a change of encoding alone - * is no change to deploy. The diff view still shows the encoding (`shapeSubBlockValue`). + * JSON text in a field whose runtime parses it like the container it encodes (a child workflow's + * `inputMapping`, `JSON_TEXT_CONTAINER_TYPES`) is that container, so a change of encoding alone is + * no change to deploy. Every other field compares as stored, and the diff view still shows the + * encoding (`shapeSubBlockValue`). */ function decodeNativeContainer(value: unknown, spec: CanonicalFieldSpec | undefined): unknown { - if (typeof value !== 'string' || !spec?.type || !holdsNativeContainer(spec.type)) return value + if (typeof value !== 'string' || !spec?.type || !JSON_TEXT_CONTAINER_TYPES.has(spec.type)) { + return value + } return parseJsonContainer(value) ?? value } diff --git a/apps/sim/lib/workflows/code/catalog/value-kind.ts b/apps/sim/lib/workflows/code/catalog/value-kind.ts index 668a556a4f5..2c3e1b20342 100644 --- a/apps/sim/lib/workflows/code/catalog/value-kind.ts +++ b/apps/sim/lib/workflows/code/catalog/value-kind.ts @@ -4,7 +4,6 @@ import type { ParamStorage, ResourceKind, } from '@sim/workflow-code' -import { getOwn } from '@sim/workflow-code' import type { SubBlockConfig, SubBlockType } from '@/blocks/types' /** @@ -89,20 +88,6 @@ const TYPE_RULES: Record = { modal: { valueKind: 'none' }, } -/** - * Whether a field of `type` holds a JSON object or list natively: the editor writes the container, - * while the operations route and older editors may store the same container as JSON text, which - * the executor parses alike. - */ -export function holdsNativeContainer(type: string): boolean { - const rule = getOwn(TYPE_RULES, type) - return ( - (rule?.valueKind === 'object' || rule?.valueKind === 'array') && - rule.storage === undefined && - rule.structured === undefined - ) -} - /** * Derives a subBlock's value shape from its type plus the few config flags that change it: a * JSON-language code field holds JSON, a multi-select dropdown holds an array, a `readOnly` field diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts index 117ec58bc0c..2e27a8b1d0e 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-find.test.ts @@ -26,6 +26,8 @@ export default workflow('W', {}, () => { fetchPolicy.to(score) const fallback = fn('Fallback', { code: js\`return 0\` }) fetchPolicy.onError(fallback) + const audit = fn('Audit', { language: 'python', code: codeFile('./functions/audit.py') }) + fetchPolicy.to(audit) const gate = condition('Gate', { if: js\`\${fetchPolicy.status} === 200\`, else: true }) score.to(gate) }) @@ -56,7 +58,11 @@ beforeEach(() => { mkdirSync(join(dir, '.sim')) mkdirSync(join(dir, 'functions')) writeFileSync(join(dir, 'workflow.ts'), WORKFLOW_TS) - writeFileSync(join(dir, 'functions/score.js'), 'const s = 1\nreturn $ref.fetchpolicy.data\n') + writeFileSync( + join(dir, 'functions/score.js'), + "const s = 1\nreturn $ref.fetchpolicy.data\nconst tag = ''\n" + ) + writeFileSync(join(dir, 'functions/audit.py'), 'import json\nprint()\n') vi.stubEnv('SIM_CONFIG_DIR', join(dir, 'config')) cacheCatalogText(join(dir, 'config'), null, FIXTURE_TEXT) writeFileSync( @@ -91,9 +97,17 @@ describe('sim workflows source find', () => { outgoing: [ { block: 'Score', port: 'out', line: lineOf('fetchPolicy.to(score)') }, { block: 'Fallback', port: 'error', line: lineOf('fetchPolicy.onError(fallback)') }, + { + block: 'Audit', + port: 'out', + line: lineOf('fetchPolicy.to(audit)'), + statement: 'fetchPolicy.to(audit)', + }, ], readers: [ + { block: 'Audit', file: 'functions/audit.py', line: 2 }, { block: 'Score', file: 'functions/score.js', line: 2 }, + { block: 'Score', file: 'functions/score.js', line: 3 }, { block: 'Gate', file: 'workflow.ts', line: lineOf("condition('Gate'") }, ], }) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-find.ts b/packages/sim-cli/src/commands/protocol/workflow-source-find.ts index c6f39724d01..1d12869bcfa 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-find.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-find.ts @@ -4,6 +4,8 @@ import { type BlockKey, type CanonicalBlock, type CompileResult, + codeFileLanguage, + codeFileRefs, didYouMean, encodeAnchor, fromCodeFile, @@ -142,10 +144,9 @@ function readersByKey(index: SourceIndex): Map { const heads = new Set(texts.flatMap(referencedHeads)) heads.delete(readerKey) if (heads.size === 0) continue - const parsed = - field === 'code' && codeLines ? fromCodeFile(codeLines.text, 'javascript') : null - if (codeFile && codeLines && parsed?.ok) { - for (const ref of parsed.refs) { + if (field === 'code' && codeFile && codeLines) { + const parsed = fromCodeFile(codeLines.text, codeFileLanguage(codeFile) ?? 'javascript') + for (const ref of codeFileRefs(parsed.ok ? parsed.refs : [], codeLines.text)) { const [head] = ref.kind === 'ref' ? ref.segments : [] if (head?.kind !== 'name' || !heads.has(head.name)) continue const { line } = codeLines.position(ref.start) @@ -199,19 +200,22 @@ function describeBlock( key: BlockKey ): FoundBlock { const span = index.span({ kind: 'block', block: key }) - const edge = (ref: StoredEdgeRef, other: BlockKey): FoundEdge => { - const at = index.span({ kind: 'edges', block: ref.from, port: ref.port }) + const { edges, edgeSpans } = index.compiled + const edge = (at: number, other: BlockKey): FoundEdge => { + const ref = edges[at] + const written = edgeSpans[at] return { block: index.nameOf(other), port: ref.port, - file: at?.file ?? SOURCE_ENTRY_FILE, - line: at?.line ?? span?.line ?? 0, - statement: at - ? (index.linesOf(at.file)?.lines[at.line - 1]?.trim() ?? '') - : '(implied by the container)', + file: written?.file ?? SOURCE_ENTRY_FILE, + line: written?.line ?? span?.line ?? 0, + statement: written + ? (index.linesOf(written.file)?.lines[written.line - 1]?.trim() ?? '') + : '', } } - const { edges } = index.compiled + const ends = (side: 'from' | 'to', other: 'from' | 'to') => + edges.flatMap((ref, at) => (ref[side] === key ? [edge(at, ref[other])] : [])).sort(byLine) return { name: index.nameOf(key), key, @@ -221,14 +225,8 @@ function describeBlock( line: span?.line ?? 0, endLine: span?.endLine ?? 0, codeFile: index.codeFileOf(key), - incoming: edges - .filter((ref) => ref.to === key) - .map((ref) => edge(ref, ref.from)) - .sort(byLine), - outgoing: edges - .filter((ref) => ref.from === key) - .map((ref) => edge(ref, ref.to)) - .sort(byLine), + incoming: ends('to', 'from'), + outgoing: ends('from', 'to'), readers: [...(readers.get(key) ?? [])].sort(byLine), } } diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts index 7e57f690218..5cb7dd7f517 100644 --- a/packages/workflow-code/src/canonicalize/params.ts +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -61,16 +61,20 @@ function holdsJsonText(declaration: CatalogSubBlock): boolean { } /** - * A native object or list field (a child workflow's `inputMapping`, a message list). The operations - * route and older editors may store it as JSON text, which would never type-check if printed as - * text, so it decodes like a structured field; text that does not parse is a value of its own (a - * reference to a whole list), not a warning. + * Field types whose runtime reads JSON text and the container it encodes alike: the workflow + * handler and the tool runners parse a child workflow's `inputMapping` either way, and the + * operations route stores either. Canonicalize decodes the text so it prints as the object source + * can type, and deploy-change detection takes the two encodings as one value. Any other native + * container field stays as stored, since its runtime reads only one form. */ +export const JSON_TEXT_CONTAINER_TYPES: ReadonlySet = new Set([ + 'input-mapping', + 'workflow-input-mapper', +]) + +/** A field of a {@link JSON_TEXT_CONTAINER_TYPES} type; text that does not parse stays a value. */ function holdsNativeContainer(declaration: CatalogSubBlock): boolean { - return ( - !holdsJsonText(declaration) && - (declaration.valueKind === 'object' || declaration.valueKind === 'array') - ) + return JSON_TEXT_CONTAINER_TYPES.has(declaration.type) } /** Whether canonicalize decodes this subBlock's JSON text. */ diff --git a/packages/workflow-code/src/code-files/from-file.ts b/packages/workflow-code/src/code-files/from-file.ts index 9898d4c46e6..b9523fb2198 100644 --- a/packages/workflow-code/src/code-files/from-file.ts +++ b/packages/workflow-code/src/code-files/from-file.ts @@ -1,8 +1,11 @@ import { type ParserOptions, parse } from '@babel/parser' import type { Expression, MemberExpression, Node } from '@babel/types' -import { isLikelyWorkflowReferenceSegment } from '@sim/utils/workflow-references' +import { + findWorkflowReferenceTokens, + isLikelyWorkflowReferenceSegment, +} from '@sim/utils/workflow-references' import { babelErrorShape, babelMessage, childNodes, memberSegment } from '../babel' -import { ENV_VAR_NAME, formatStoredPath, type RefSegment } from './ref-path' +import { ENV_VAR_NAME, formatStoredPath, parseStoredPath, type RefSegment } from './ref-path' import { type CodeFileLanguage, ENV_ROOT, REF_ROOT } from './to-file' interface CodeFileSyntaxError { @@ -202,3 +205,34 @@ function collectReplacements(program: Node): Replacement[] { } return replacements } + +/** + * The `` references a code file writes as text, found by the runtime's own scanner (a + * JavaScript string, a Python or shell line): the run resolves each one, so compile checks them as + * it checks a `$ref` chain. A token with no path (`` in HTML text) is no reference. + */ +function referenceTags(text: string): CodeFileRef[] { + const tags: CodeFileRef[] = [] + for (const token of findWorkflowReferenceTokens(text)) { + if (token.kind === 'environment') { + const name = token.value.slice(2, -2).trim() + if (ENV_VAR_NAME.test(name)) { + tags.push({ kind: 'env', name, start: token.start, end: token.end }) + } + continue + } + if (token.kind !== 'workflow') continue + const segments = parseStoredPath(token.value.slice(1, -1)) + if (!segments || segments.length < 2) continue + tags.push({ kind: 'ref', segments, start: token.start, end: token.end, tag: true }) + } + return tags +} + +/** + * Every reference a code file makes as compile reads it, in file order: the `$ref`/`$env` chains + * {@link fromCodeFile} parsed from `text` (`parsed`), plus the stored tags any language keeps. + */ +export function codeFileRefs(parsed: readonly CodeFileRef[], text: string): CodeFileRef[] { + return [...parsed, ...referenceTags(text)].sort((a, b) => a.start - b.start) +} diff --git a/packages/workflow-code/src/code-files/index.ts b/packages/workflow-code/src/code-files/index.ts index a1ff2d0cfba..d236ca403ef 100644 --- a/packages/workflow-code/src/code-files/index.ts +++ b/packages/workflow-code/src/code-files/index.ts @@ -1,5 +1,5 @@ export { checkCodeFileBijection } from './bijection' -export { type CodeFileRef, fromCodeFile } from './from-file' +export { type CodeFileRef, codeFileRefs, fromCodeFile } from './from-file' export { createJsContextScanner } from './lexer' export { ENV_VAR_NAME, diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 7ae95ea851f..22ffa30d0c6 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -41,18 +41,8 @@ import { } from '../catalog/surface' import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import { catalogBuildersOfType } from '../catalog/view' -import { - type CodeFileLanguage, - type CodeFileRef, - codeFileLanguage, - fromCodeFile, -} from '../code-files' -import { - ENV_VAR_NAME, - isIdentifierName, - LOOP_PROPERTIES, - parseStoredPath, -} from '../code-files/ref-path' +import { type CodeFileLanguage, codeFileLanguage, codeFileRefs, fromCodeFile } from '../code-files' +import { isIdentifierName, LOOP_PROPERTIES, parseStoredPath } from '../code-files/ref-path' import { branchesAtTopLevel, ELSE_KEY, isElseTrue } from '../forms/condition' import { compileResponseParam, usesResponseForm } from '../forms/response' import { type ConfigField, type ContainerForm, loopForm, parallelForm } from '../forms/subflow' @@ -468,7 +458,7 @@ function parseCodeFile( return null } if (language !== 'javascript') reportScriptRefSyntax(ctx, path, text, language, decl.key) - const refs = [...back.refs, ...referenceTags(text)].sort((a, b) => a.start - b.start) + const refs = codeFileRefs(back.refs, text) if (refs.length > 0) ctx.codeFiles.chains.push({ path, blockKey: decl.key, refs }) return back.code } @@ -529,29 +519,6 @@ function reportScriptRefSyntax( } } -/** - * The `` references a code file writes as text, found by the runtime's own scanner (a - * JavaScript string, a Python or shell line): the run resolves each one, so compile checks them as - * it checks a `$ref` chain. A token with no path (`` in HTML text) is no reference. - */ -function referenceTags(text: string): CodeFileRef[] { - const tags: CodeFileRef[] = [] - for (const token of findWorkflowReferenceTokens(text)) { - if (token.kind === 'environment') { - const name = token.value.slice(2, -2).trim() - if (ENV_VAR_NAME.test(name)) { - tags.push({ kind: 'env', name, start: token.start, end: token.end }) - } - continue - } - if (token.kind !== 'workflow') continue - const segments = parseStoredPath(token.value.slice(1, -1)) - if (!segments || segments.length < 2) continue - tags.push({ kind: 'ref', segments, start: token.start, end: token.end, tag: true }) - } - return tags -} - interface WrittenParam { property: ObjectProperty param: string diff --git a/packages/workflow-code/src/compile/edges.ts b/packages/workflow-code/src/compile/edges.ts index 15e29283d77..b8d39dbc1f4 100644 --- a/packages/workflow-code/src/compile/edges.ts +++ b/packages/workflow-code/src/compile/edges.ts @@ -96,6 +96,11 @@ export class EdgeCollector { this.ctx.reporter.report(code, message, rangeOf(this.ctx, node), { hint, blockKey }) } + /** Each accepted edge with the node it was written at. */ + written(): Array<{ edge: CanonicalEdge; node: Node }> { + return this.edges.map((edge, index) => ({ edge, node: this.nodes[index] })) + } + /** Validates and records one edge; `false` when it was rejected. */ add( from: BlockDecl, diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index 895c3a2500a..7aaecb3ff52 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -166,6 +166,11 @@ export interface CompileResult { * `CompileInput.storedUnreadEdges`. */ edges: StoredEdgeRef[] + /** + * Where the wiring that denotes each of {@link edges} is written, by the same index: its + * statement, or the container callback an implied start edge comes from. + */ + edgeSpans: SourceSpan[] /** * Every JSON field holding a bare reference nothing types, reported or not, by block key: what * an offline check records of a get's printed source as `CompileInput.storedUnreadUntypedFields`. @@ -487,6 +492,7 @@ function emptyResult(reporter: Reporter, sdkMajor: number | null): CompileResult sdkMajor, envReferences: [], edges: [], + edgeSpans: [], untypedJsonFields: [], } } @@ -869,7 +875,8 @@ function compileEntry( const spans: Partial> = {} for (const [key, span] of ctx.spans) spans[key] = span - const sortedEdges = [...edges.edges].sort(compareEdges) + const written = edges.written().sort((a, b) => compareEdges(a.edge, b.edge)) + const sortedEdges = written.map(({ edge }) => edge) const workflow: CanonicalWorkflow | null = reporter.hasErrors || !workflowHeader ? null @@ -892,6 +899,7 @@ function compileEntry( sdkMajor: parsed.sdkMajor, envReferences: [...ctx.envReferences].sort(compareStrings), edges: sortedEdges.map((edge) => ({ from: edge.from, port: portKey(edge.port), to: edge.to })), + edgeSpans: written.map(({ node }) => reporter.span(rangeOf(ctx, node))), untypedJsonFields, } } diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index f93bbb883af..a2822da2b8e 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -2,6 +2,7 @@ export { decodeAnchor, encodeAnchor } from './anchors' export { babelErrorShape, babelMessage } from './babel' export { type CanonicalizeResult, canonicalize, canonicalizeUnderLock } from './canonicalize' export { toolModes } from './canonicalize/modes' +export { JSON_TEXT_CONTAINER_TYPES } from './canonicalize/params' export { builderOutputSchemas, builderProducedOutputs, @@ -43,6 +44,8 @@ export { } from './child-results' export { checkCodeFileBijection, + codeFileLanguage, + codeFileRefs, createJsContextScanner, ENV_VAR_NAME, formatStoredPath,