@fluidgrids/cli 2026.1021.1 → 2026.1028.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -5
- package/dist/auth/device-login.d.ts +31 -0
- package/dist/auth/device-login.d.ts.map +1 -0
- package/dist/auth/device-login.js +75 -0
- package/dist/auth/device-login.js.map +1 -0
- package/dist/auth/token-auth.d.ts +49 -0
- package/dist/auth/token-auth.d.ts.map +1 -0
- package/dist/auth/token-auth.js +279 -0
- package/dist/auth/token-auth.js.map +1 -0
- package/dist/cli.d.ts +4 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -32
- package/dist/cli.js.map +1 -1
- package/dist/code-first/api.d.ts +357 -0
- package/dist/code-first/api.d.ts.map +1 -0
- package/dist/code-first/api.js +288 -0
- package/dist/code-first/api.js.map +1 -0
- package/dist/code-first/code-upload.d.ts +52 -0
- package/dist/code-first/code-upload.d.ts.map +1 -0
- package/dist/code-first/code-upload.js +161 -0
- package/dist/code-first/code-upload.js.map +1 -0
- package/dist/code-first/commands/codegen.d.ts +20 -0
- package/dist/code-first/commands/codegen.d.ts.map +1 -0
- package/dist/code-first/commands/codegen.js +50 -0
- package/dist/code-first/commands/codegen.js.map +1 -0
- package/dist/code-first/commands/diff.d.ts +28 -0
- package/dist/code-first/commands/diff.d.ts.map +1 -0
- package/dist/code-first/commands/diff.js +73 -0
- package/dist/code-first/commands/diff.js.map +1 -0
- package/dist/code-first/commands/hotfix.d.ts +54 -0
- package/dist/code-first/commands/hotfix.d.ts.map +1 -0
- package/dist/code-first/commands/hotfix.js +225 -0
- package/dist/code-first/commands/hotfix.js.map +1 -0
- package/dist/code-first/commands/import.d.ts +40 -0
- package/dist/code-first/commands/import.d.ts.map +1 -0
- package/dist/code-first/commands/import.js +235 -0
- package/dist/code-first/commands/import.js.map +1 -0
- package/dist/code-first/commands/init.d.ts +33 -0
- package/dist/code-first/commands/init.d.ts.map +1 -0
- package/dist/code-first/commands/init.js +177 -0
- package/dist/code-first/commands/init.js.map +1 -0
- package/dist/code-first/commands/interface.d.ts +12 -0
- package/dist/code-first/commands/interface.d.ts.map +1 -0
- package/dist/code-first/commands/interface.js +21 -0
- package/dist/code-first/commands/interface.js.map +1 -0
- package/dist/code-first/commands/pull.d.ts +63 -0
- package/dist/code-first/commands/pull.d.ts.map +1 -0
- package/dist/code-first/commands/pull.js +266 -0
- package/dist/code-first/commands/pull.js.map +1 -0
- package/dist/code-first/commands/push.d.ts +97 -0
- package/dist/code-first/commands/push.d.ts.map +1 -0
- package/dist/code-first/commands/push.js +313 -0
- package/dist/code-first/commands/push.js.map +1 -0
- package/dist/code-first/commands/replay.d.ts +44 -0
- package/dist/code-first/commands/replay.d.ts.map +1 -0
- package/dist/code-first/commands/replay.js +238 -0
- package/dist/code-first/commands/replay.js.map +1 -0
- package/dist/code-first/commands/runs.d.ts +94 -0
- package/dist/code-first/commands/runs.d.ts.map +1 -0
- package/dist/code-first/commands/runs.js +304 -0
- package/dist/code-first/commands/runs.js.map +1 -0
- package/dist/code-first/commands/validate.d.ts +38 -0
- package/dist/code-first/commands/validate.d.ts.map +1 -0
- package/dist/code-first/commands/validate.js +140 -0
- package/dist/code-first/commands/validate.js.map +1 -0
- package/dist/code-first/commands/versions.d.ts +14 -0
- package/dist/code-first/commands/versions.d.ts.map +1 -0
- package/dist/code-first/commands/versions.js +30 -0
- package/dist/code-first/commands/versions.js.map +1 -0
- package/dist/code-first/connections.d.ts +55 -0
- package/dist/code-first/connections.d.ts.map +1 -0
- package/dist/code-first/connections.js +180 -0
- package/dist/code-first/connections.js.map +1 -0
- package/dist/code-first/durable-operations.d.ts +42 -0
- package/dist/code-first/durable-operations.d.ts.map +1 -0
- package/dist/code-first/durable-operations.js +136 -0
- package/dist/code-first/durable-operations.js.map +1 -0
- package/dist/code-first/history.d.ts +30 -0
- package/dist/code-first/history.d.ts.map +1 -0
- package/dist/code-first/history.js +139 -0
- package/dist/code-first/history.js.map +1 -0
- package/dist/code-first/imports.d.ts +22 -0
- package/dist/code-first/imports.d.ts.map +1 -0
- package/dist/code-first/imports.js +67 -0
- package/dist/code-first/imports.js.map +1 -0
- package/dist/code-first/index.d.ts +17 -0
- package/dist/code-first/index.d.ts.map +1 -0
- package/dist/code-first/index.js +35 -0
- package/dist/code-first/index.js.map +1 -0
- package/dist/code-first/lowering.d.ts +81 -0
- package/dist/code-first/lowering.d.ts.map +1 -0
- package/dist/code-first/lowering.js +225 -0
- package/dist/code-first/lowering.js.map +1 -0
- package/dist/code-first/operations.d.ts +57 -0
- package/dist/code-first/operations.d.ts.map +1 -0
- package/dist/code-first/operations.js +167 -0
- package/dist/code-first/operations.js.map +1 -0
- package/dist/code-first/presigned.d.ts +21 -0
- package/dist/code-first/presigned.d.ts.map +1 -0
- package/dist/code-first/presigned.js +85 -0
- package/dist/code-first/presigned.js.map +1 -0
- package/dist/code-first/project.d.ts +123 -0
- package/dist/code-first/project.d.ts.map +1 -0
- package/dist/code-first/project.js +301 -0
- package/dist/code-first/project.js.map +1 -0
- package/dist/code-first/python.d.ts +81 -0
- package/dist/code-first/python.d.ts.map +1 -0
- package/dist/code-first/python.js +249 -0
- package/dist/code-first/python.js.map +1 -0
- package/dist/code-first/register.d.ts +27 -0
- package/dist/code-first/register.d.ts.map +1 -0
- package/dist/code-first/register.js +270 -0
- package/dist/code-first/register.js.map +1 -0
- package/dist/code-first/remote.d.ts +58 -0
- package/dist/code-first/remote.d.ts.map +1 -0
- package/dist/code-first/remote.js +126 -0
- package/dist/code-first/remote.js.map +1 -0
- package/dist/code-first/replay.d.ts +36 -0
- package/dist/code-first/replay.d.ts.map +1 -0
- package/dist/code-first/replay.js +52 -0
- package/dist/code-first/replay.js.map +1 -0
- package/dist/code-first/shared.d.ts +51 -0
- package/dist/code-first/shared.d.ts.map +1 -0
- package/dist/code-first/shared.js +93 -0
- package/dist/code-first/shared.js.map +1 -0
- package/dist/modules.d.ts +4 -0
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +6 -0
- package/dist/modules.js.map +1 -1
- package/dist/program.d.ts +20 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +43 -0
- package/dist/program.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL documents for the code-first commands (spec 07 §7, Phase A).
|
|
3
|
+
*
|
|
4
|
+
* Every document targets the WORKSPACE gateway (wspace-workflow-svc, plus
|
|
5
|
+
* wspace-integrations-svc for connections). They are hand-written, like the
|
|
6
|
+
* documents in `@burdenoff/cli-sdk/modules/fluidgrids`, and validated by
|
|
7
|
+
* `tests/code-first/operations.test.ts`.
|
|
8
|
+
*
|
|
9
|
+
* Two groups:
|
|
10
|
+
* - Live operations, validated against the vendored supergraph
|
|
11
|
+
* `schema/wspace.graphql`: `exportWorkflow` (JSON envelope),
|
|
12
|
+
* `workflowVersions`, `createWorkflowVersion`, `importWorkflow`,
|
|
13
|
+
* `workflowVersionDiff`, `nodeEndpointConfigs`, `getConnections`,
|
|
14
|
+
* `workflowDefinitions`.
|
|
15
|
+
* - Code-first operations added by the wspace-workflow-svc code-first release
|
|
16
|
+
* (BOFF-9904): `exportWorkflow(format:, options:)` with the additive
|
|
17
|
+
* `exportFormat` / `files` / `fidelity` / `irHash` fields, `importWorkflow`
|
|
18
|
+
* with `source`, `validateWorkflowDefinition` and `workflowInterface`. They
|
|
19
|
+
* are validated against the supergraph once `bun run schema:pull` brings them
|
|
20
|
+
* in, and until then against `schema/code-first.pending.graphql`, which mirrors
|
|
21
|
+
* the service's `code-first.gql`.
|
|
22
|
+
*
|
|
23
|
+
* Every code-first operation is gated on the service by the
|
|
24
|
+
* `fluidgrids.code-first` feature flag; a workspace without it gets a GraphQL
|
|
25
|
+
* error that the CLI prints as it is.
|
|
26
|
+
*/
|
|
27
|
+
/** The portable JSON envelope, exactly the fields the service writes. */
|
|
28
|
+
export declare const CF_EXPORT_WORKFLOW = "\n query FluidgridsCodeExportWorkflow($workflowKey: String!, $version: String) {\n exportWorkflow(workflowKey: $workflowKey, version: $version) {\n format schemaVersion exportedAt workflowKey version name description\n definitionJson context tags tagsV2 icon category\n nodeReferences { nodeId nodeType nodeVersion }\n }\n }\n";
|
|
29
|
+
/** Code formats the service renders. */
|
|
30
|
+
export declare const RENDERED_EXPORT_FORMATS: readonly ["TYPESCRIPT", "PYTHON"];
|
|
31
|
+
export type RenderedExportFormat = (typeof RENDERED_EXPORT_FORMATS)[number];
|
|
32
|
+
/**
|
|
33
|
+
* `exportWorkflow` rendered as code on the service (code-first release).
|
|
34
|
+
* `ExportOptionsInput.connectionNames` is the on/off switch (default on) and
|
|
35
|
+
* `connectionNameMap` carries the connectionId-to-name map, because the service
|
|
36
|
+
* does not read the integrations service on the caller's behalf.
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderedExportDocument(format: RenderedExportFormat): string;
|
|
39
|
+
export declare const CF_WORKFLOW_VERSIONS = "\n query FluidgridsCodeWorkflowVersions($workflowKey: String!) {\n workflowVersions(workflowKey: $workflowKey) {\n id workflowKey version name status isActive alias createdAt\n }\n }\n";
|
|
40
|
+
export declare const CF_LIST_WORKFLOW_KEYS = "\n query FluidgridsCodeListWorkflowKeys($input: ListWorkflowDefinitionsInput!) {\n workflowDefinitions(input: $input) {\n items { workflowKey version }\n total\n hasMore\n }\n }\n";
|
|
41
|
+
export declare const CF_CREATE_WORKFLOW_VERSION = "\n mutation FluidgridsCodeCreateWorkflowVersion(\n $workflowKey: String!\n $input: CreateWorkflowVersionInput!\n ) {\n createWorkflowVersion(workflowKey: $workflowKey, input: $input) {\n success\n message\n workflow { id workflowKey version status createdAt validationWarnings }\n }\n }\n";
|
|
42
|
+
/**
|
|
43
|
+
* `importWorkflow` with either a bare `definitionJson` (live) or, from the
|
|
44
|
+
* code-first release, `source: { format, files, connections }` so the service
|
|
45
|
+
* reads a JSON document or lowers tier-1 TypeScript itself.
|
|
46
|
+
*/
|
|
47
|
+
export declare const CF_IMPORT_WORKFLOW = "\n mutation FluidgridsCodeImportWorkflow($input: ImportWorkflowInput!) {\n importWorkflow(input: $input) {\n success\n message\n workflow { id workflowKey version status createdAt validationWarnings }\n validation {\n valid errors warnings\n missingNodes { nodeId nodeType nodeVersion }\n }\n }\n }\n";
|
|
48
|
+
export declare const CF_WORKFLOW_VERSION_DIFF = "\n query FluidgridsCodeWorkflowVersionDiff(\n $workflowKey: String!\n $fromVersion: String!\n $toVersion: String!\n ) {\n workflowVersionDiff(workflowKey: $workflowKey, fromVersion: $fromVersion, toVersion: $toVersion) {\n workflowKey fromVersion toVersion truncated\n entries { path kind before after }\n }\n }\n";
|
|
49
|
+
/** IR v2 validation on the service, with the strict rules on request (code-first release). */
|
|
50
|
+
export declare const CF_VALIDATE_WORKFLOW_DEFINITION = "\n query FluidgridsCodeValidateWorkflowDefinition($definitionJson: JSON!, $strict: Boolean) {\n validateWorkflowDefinition(definitionJson: $definitionJson, strict: $strict) {\n valid schemaVersion irHash taskQueues\n errors { code message nodeId path }\n warnings { code message nodeId path }\n }\n }\n";
|
|
51
|
+
/** The workflow's declared or derived interface (inputs, outputs, signals) (code-first release). */
|
|
52
|
+
export declare const CF_WORKFLOW_INTERFACE = "\n query FluidgridsCodeWorkflowInterface($workflowKey: String!, $version: String) {\n workflowInterface(workflowKey: $workflowKey, version: $version)\n }\n";
|
|
53
|
+
/** The node registry the workspace can use: the contract fields codegen reads. */
|
|
54
|
+
export declare const CF_LIST_NODE_MANIFESTS = "\n query FluidgridsCodeNodeManifests($status: NodeConfigStatus, $pagination: WorkflowPaginationInput) {\n nodeEndpointConfigs(status: $status, pagination: $pagination) {\n configs { nodeType nodeVersion name kind operations isLatest }\n pagination { total limit offset hasMore }\n }\n }\n";
|
|
55
|
+
/** Workspace connections, to resolve connection names in code to ids. */
|
|
56
|
+
export declare const CF_LIST_CONNECTIONS = "\n query FluidgridsCodeConnections($pagination: IntegrationsPaginationInput) {\n getConnections(pagination: $pagination) {\n items { id name provider { key } }\n total\n hasMore\n }\n }\n";
|
|
57
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/code-first/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,kWAQ9B,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,uBAAuB,mCAAoC,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAyB3E;AAED,eAAO,MAAM,oBAAoB,0MAMhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,+MAQjC,CAAC;AAIF,eAAO,MAAM,0BAA0B,mUAWtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gWAY9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,0VAWpC,CAAC;AAIF,8FAA8F;AAC9F,eAAO,MAAM,+BAA+B,0UAQ3C,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,qBAAqB,qKAIjC,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,uTAOlC,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,uNAQ/B,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL documents for the code-first commands (spec 07 §7, Phase A).
|
|
3
|
+
*
|
|
4
|
+
* Every document targets the WORKSPACE gateway (wspace-workflow-svc, plus
|
|
5
|
+
* wspace-integrations-svc for connections). They are hand-written, like the
|
|
6
|
+
* documents in `@burdenoff/cli-sdk/modules/fluidgrids`, and validated by
|
|
7
|
+
* `tests/code-first/operations.test.ts`.
|
|
8
|
+
*
|
|
9
|
+
* Two groups:
|
|
10
|
+
* - Live operations, validated against the vendored supergraph
|
|
11
|
+
* `schema/wspace.graphql`: `exportWorkflow` (JSON envelope),
|
|
12
|
+
* `workflowVersions`, `createWorkflowVersion`, `importWorkflow`,
|
|
13
|
+
* `workflowVersionDiff`, `nodeEndpointConfigs`, `getConnections`,
|
|
14
|
+
* `workflowDefinitions`.
|
|
15
|
+
* - Code-first operations added by the wspace-workflow-svc code-first release
|
|
16
|
+
* (BOFF-9904): `exportWorkflow(format:, options:)` with the additive
|
|
17
|
+
* `exportFormat` / `files` / `fidelity` / `irHash` fields, `importWorkflow`
|
|
18
|
+
* with `source`, `validateWorkflowDefinition` and `workflowInterface`. They
|
|
19
|
+
* are validated against the supergraph once `bun run schema:pull` brings them
|
|
20
|
+
* in, and until then against `schema/code-first.pending.graphql`, which mirrors
|
|
21
|
+
* the service's `code-first.gql`.
|
|
22
|
+
*
|
|
23
|
+
* Every code-first operation is gated on the service by the
|
|
24
|
+
* `fluidgrids.code-first` feature flag; a workspace without it gets a GraphQL
|
|
25
|
+
* error that the CLI prints as it is.
|
|
26
|
+
*/
|
|
27
|
+
const NODE_REFERENCE_FIELDS = 'nodeId nodeType nodeVersion';
|
|
28
|
+
/** The portable JSON envelope, exactly the fields the service writes. */
|
|
29
|
+
export const CF_EXPORT_WORKFLOW = `
|
|
30
|
+
query FluidgridsCodeExportWorkflow($workflowKey: String!, $version: String) {
|
|
31
|
+
exportWorkflow(workflowKey: $workflowKey, version: $version) {
|
|
32
|
+
format schemaVersion exportedAt workflowKey version name description
|
|
33
|
+
definitionJson context tags tagsV2 icon category
|
|
34
|
+
nodeReferences { ${NODE_REFERENCE_FIELDS} }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
/** Code formats the service renders. */
|
|
39
|
+
export const RENDERED_EXPORT_FORMATS = ['TYPESCRIPT', 'PYTHON'];
|
|
40
|
+
/**
|
|
41
|
+
* `exportWorkflow` rendered as code on the service (code-first release).
|
|
42
|
+
* `ExportOptionsInput.connectionNames` is the on/off switch (default on) and
|
|
43
|
+
* `connectionNameMap` carries the connectionId-to-name map, because the service
|
|
44
|
+
* does not read the integrations service on the caller's behalf.
|
|
45
|
+
*/
|
|
46
|
+
export function renderedExportDocument(format) {
|
|
47
|
+
return `
|
|
48
|
+
query FluidgridsCodeExportWorkflowAs${format === 'TYPESCRIPT' ? 'TypeScript' : 'Python'}(
|
|
49
|
+
$workflowKey: String!
|
|
50
|
+
$version: String
|
|
51
|
+
$connectionNameMap: JSON
|
|
52
|
+
$includeLayout: Boolean
|
|
53
|
+
$includePinnedData: Boolean
|
|
54
|
+
) {
|
|
55
|
+
exportWorkflow(
|
|
56
|
+
workflowKey: $workflowKey
|
|
57
|
+
version: $version
|
|
58
|
+
format: ${format}
|
|
59
|
+
options: {
|
|
60
|
+
connectionNameMap: $connectionNameMap
|
|
61
|
+
includeLayout: $includeLayout
|
|
62
|
+
includePinnedData: $includePinnedData
|
|
63
|
+
}
|
|
64
|
+
) {
|
|
65
|
+
workflowKey version exportFormat irHash
|
|
66
|
+
files { path contentType content }
|
|
67
|
+
fidelity { level items { nodeId path kind detail } }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
export const CF_WORKFLOW_VERSIONS = `
|
|
73
|
+
query FluidgridsCodeWorkflowVersions($workflowKey: String!) {
|
|
74
|
+
workflowVersions(workflowKey: $workflowKey) {
|
|
75
|
+
id workflowKey version name status isActive alias createdAt
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
export const CF_LIST_WORKFLOW_KEYS = `
|
|
80
|
+
query FluidgridsCodeListWorkflowKeys($input: ListWorkflowDefinitionsInput!) {
|
|
81
|
+
workflowDefinitions(input: $input) {
|
|
82
|
+
items { workflowKey version }
|
|
83
|
+
total
|
|
84
|
+
hasMore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
const SAVED_WORKFLOW_FIELDS = 'id workflowKey version status createdAt validationWarnings';
|
|
89
|
+
export const CF_CREATE_WORKFLOW_VERSION = `
|
|
90
|
+
mutation FluidgridsCodeCreateWorkflowVersion(
|
|
91
|
+
$workflowKey: String!
|
|
92
|
+
$input: CreateWorkflowVersionInput!
|
|
93
|
+
) {
|
|
94
|
+
createWorkflowVersion(workflowKey: $workflowKey, input: $input) {
|
|
95
|
+
success
|
|
96
|
+
message
|
|
97
|
+
workflow { ${SAVED_WORKFLOW_FIELDS} }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
/**
|
|
102
|
+
* `importWorkflow` with either a bare `definitionJson` (live) or, from the
|
|
103
|
+
* code-first release, `source: { format, files, connections }` so the service
|
|
104
|
+
* reads a JSON document or lowers tier-1 TypeScript itself.
|
|
105
|
+
*/
|
|
106
|
+
export const CF_IMPORT_WORKFLOW = `
|
|
107
|
+
mutation FluidgridsCodeImportWorkflow($input: ImportWorkflowInput!) {
|
|
108
|
+
importWorkflow(input: $input) {
|
|
109
|
+
success
|
|
110
|
+
message
|
|
111
|
+
workflow { ${SAVED_WORKFLOW_FIELDS} }
|
|
112
|
+
validation {
|
|
113
|
+
valid errors warnings
|
|
114
|
+
missingNodes { ${NODE_REFERENCE_FIELDS} }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
export const CF_WORKFLOW_VERSION_DIFF = `
|
|
120
|
+
query FluidgridsCodeWorkflowVersionDiff(
|
|
121
|
+
$workflowKey: String!
|
|
122
|
+
$fromVersion: String!
|
|
123
|
+
$toVersion: String!
|
|
124
|
+
) {
|
|
125
|
+
workflowVersionDiff(workflowKey: $workflowKey, fromVersion: $fromVersion, toVersion: $toVersion) {
|
|
126
|
+
workflowKey fromVersion toVersion truncated
|
|
127
|
+
entries { path kind before after }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
const VALIDATION_ISSUE_FIELDS = 'code message nodeId path';
|
|
132
|
+
/** IR v2 validation on the service, with the strict rules on request (code-first release). */
|
|
133
|
+
export const CF_VALIDATE_WORKFLOW_DEFINITION = `
|
|
134
|
+
query FluidgridsCodeValidateWorkflowDefinition($definitionJson: JSON!, $strict: Boolean) {
|
|
135
|
+
validateWorkflowDefinition(definitionJson: $definitionJson, strict: $strict) {
|
|
136
|
+
valid schemaVersion irHash taskQueues
|
|
137
|
+
errors { ${VALIDATION_ISSUE_FIELDS} }
|
|
138
|
+
warnings { ${VALIDATION_ISSUE_FIELDS} }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
/** The workflow's declared or derived interface (inputs, outputs, signals) (code-first release). */
|
|
143
|
+
export const CF_WORKFLOW_INTERFACE = `
|
|
144
|
+
query FluidgridsCodeWorkflowInterface($workflowKey: String!, $version: String) {
|
|
145
|
+
workflowInterface(workflowKey: $workflowKey, version: $version)
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
/** The node registry the workspace can use: the contract fields codegen reads. */
|
|
149
|
+
export const CF_LIST_NODE_MANIFESTS = `
|
|
150
|
+
query FluidgridsCodeNodeManifests($status: NodeConfigStatus, $pagination: WorkflowPaginationInput) {
|
|
151
|
+
nodeEndpointConfigs(status: $status, pagination: $pagination) {
|
|
152
|
+
configs { nodeType nodeVersion name kind operations isLatest }
|
|
153
|
+
pagination { total limit offset hasMore }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
/** Workspace connections, to resolve connection names in code to ids. */
|
|
158
|
+
export const CF_LIST_CONNECTIONS = `
|
|
159
|
+
query FluidgridsCodeConnections($pagination: IntegrationsPaginationInput) {
|
|
160
|
+
getConnections(pagination: $pagination) {
|
|
161
|
+
items { id name provider { key } }
|
|
162
|
+
total
|
|
163
|
+
hasMore
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
//# sourceMapp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,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;CAOrC,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;CAQlC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presigned S3 URLs the service hands the CLI (code uploads, offloaded history
|
|
3
|
+
* payloads). The URL carries a signature, so neither it nor anything that
|
|
4
|
+
* echoes the request (S3 error bodies repeat the access key id, the string to
|
|
5
|
+
* sign and the signature) is ever printed.
|
|
6
|
+
*/
|
|
7
|
+
/** Parse a presigned URL and refuse anything but https (plain http only to this machine). */
|
|
8
|
+
export declare function presignedUrl(raw: string, what: string): URL;
|
|
9
|
+
/**
|
|
10
|
+
* A safe one-line summary of a storage error body: the `<Code>` and
|
|
11
|
+
* `<Message>` of an S3 XML error and nothing else. Other bodies are not
|
|
12
|
+
* echoed, because a proxy or a storage service may repeat the request.
|
|
13
|
+
*/
|
|
14
|
+
export declare function storageErrorSummary(body: string): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Read a response body of at most `maxBytes` bytes: `content-length` is
|
|
17
|
+
* checked before reading, and the stream is counted while it is read, so an
|
|
18
|
+
* oversized body is never buffered whole.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readCapped(response: Response, maxBytes: number, tooLarge: () => Error): Promise<Uint8Array>;
|
|
21
|
+
//# sourceMappingURL=presigned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presigned.d.ts","sourceRoot":"","sources":["../../src/code-first/presigned.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAc3D;AAqBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKpE;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,KAAK,GACpB,OAAO,CAAC,UAAU,CAAC,CA2BrB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presigned S3 URLs the service hands the CLI (code uploads, offloaded history
|
|
3
|
+
* payloads). The URL carries a signature, so neither it nor anything that
|
|
4
|
+
* echoes the request (S3 error bodies repeat the access key id, the string to
|
|
5
|
+
* sign and the signature) is ever printed.
|
|
6
|
+
*/
|
|
7
|
+
import { CliUserError } from '@burdenoff/cli-sdk/core';
|
|
8
|
+
/** Parse a presigned URL and refuse anything but https (plain http only to this machine). */
|
|
9
|
+
export function presignedUrl(raw, what) {
|
|
10
|
+
let url;
|
|
11
|
+
try {
|
|
12
|
+
url = new URL(raw);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
throw new CliUserError(`The service returned an invalid ${what} URL.`);
|
|
16
|
+
}
|
|
17
|
+
const local = url.hostname === 'localhost' || url.hostname === '127.0.0.1';
|
|
18
|
+
if (url.protocol !== 'https:' && !(url.protocol === 'http:' && local)) {
|
|
19
|
+
throw new CliUserError(`Refusing to transfer the ${what} over ${url.protocol}; expected https.`);
|
|
20
|
+
}
|
|
21
|
+
return url;
|
|
22
|
+
}
|
|
23
|
+
const XML_FIELD_LIMIT = 200;
|
|
24
|
+
function xmlField(text, name) {
|
|
25
|
+
const match = new RegExp(`<${name}>([^<]*)</${name}>`).exec(text);
|
|
26
|
+
const value = match?.[1]?.trim();
|
|
27
|
+
return value ? value.slice(0, XML_FIELD_LIMIT) : undefined;
|
|
28
|
+
}
|
|
29
|
+
/** Credential-shaped values that must never reach the terminal. */
|
|
30
|
+
const SECRET_PATTERNS = [
|
|
31
|
+
/X-Amz-[A-Za-z-]+=[^&\s"<]*/g,
|
|
32
|
+
/\b(?:AKIA|ASIA)[A-Z0-9]{12,}\b/g,
|
|
33
|
+
/\b[0-9a-f]{40,}\b/g,
|
|
34
|
+
];
|
|
35
|
+
function redact(value) {
|
|
36
|
+
return SECRET_PATTERNS.reduce((text, pattern) => text.replace(pattern, '[redacted]'), value);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A safe one-line summary of a storage error body: the `<Code>` and
|
|
40
|
+
* `<Message>` of an S3 XML error and nothing else. Other bodies are not
|
|
41
|
+
* echoed, because a proxy or a storage service may repeat the request.
|
|
42
|
+
*/
|
|
43
|
+
export function storageErrorSummary(body) {
|
|
44
|
+
const code = xmlField(body, 'Code');
|
|
45
|
+
if (!code)
|
|
46
|
+
return undefined;
|
|
47
|
+
const message = xmlField(body, 'Message');
|
|
48
|
+
return redact(message ? `${code}: ${message}` : code);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Read a response body of at most `maxBytes` bytes: `content-length` is
|
|
52
|
+
* checked before reading, and the stream is counted while it is read, so an
|
|
53
|
+
* oversized body is never buffered whole.
|
|
54
|
+
*/
|
|
55
|
+
export async function readCapped(response, maxBytes, tooLarge) {
|
|
56
|
+
const declared = Number(response.headers.get('content-length'));
|
|
57
|
+
if (Number.isFinite(declared) && declared > maxBytes) {
|
|
58
|
+
await response.body?.cancel().catch(() => undefined);
|
|
59
|
+
throw tooLarge();
|
|
60
|
+
}
|
|
61
|
+
if (!response.body)
|
|
62
|
+
return new Uint8Array();
|
|
63
|
+
const reader = response.body.getReader();
|
|
64
|
+
const chunks = [];
|
|
65
|
+
let total = 0;
|
|
66
|
+
for (;;) {
|
|
67
|
+
const { done, value } = await reader.read();
|
|
68
|
+
if (done)
|
|
69
|
+
break;
|
|
70
|
+
total += value.byteLength;
|
|
71
|
+
if (total > maxBytes) {
|
|
72
|
+
await reader.cancel().catch(() => undefined);
|
|
73
|
+
throw tooLarge();
|
|
74
|
+
}
|
|
75
|
+
chunks.push(value);
|
|
76
|
+
}
|
|
77
|
+
const out = new Uint8Array(total);
|
|
78
|
+
let offset = 0;
|
|
79
|
+
for (const chunk of chunks) {
|
|
80
|
+
out.set(chunk, offset);
|
|
81
|
+
offset += chunk.byteLength;
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=presigned.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presigned.js","sourceRoot":"","sources":["../../src/code-first/presigned.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,IAAY;IACpD,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,YAAY,CAAC,mCAAmC,IAAI,OAAO,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,KAAK,WAAW,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,CAAC;IAC3E,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;QACtE,MAAM,IAAI,YAAY,CACpB,4BAA4B,IAAI,SAAS,GAAG,CAAC,QAAQ,mBAAmB,CACzE,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC1C,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,IAAI,aAAa,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACj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AC,IAAI;QAAE,OAAO,IAAI,UAAU,EAAE,CAAC;IAC5C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACzC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,SAAS,CAAC;QACR,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5C,IAAI,IAAI;YAAE,MAAM;QAChB,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC;QAC1B,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YACrB,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC7C,MAAM,QAAQ,EAAE,CAAC;QACnB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;IAC7B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The code-first project on disk (spec 06 §7, 07 §7):
|
|
3
|
+
*
|
|
4
|
+
* ```
|
|
5
|
+
* fluidgrids.config.json language, workspace, default task queue, Python interpreter
|
|
6
|
+
* workflows/<key>.ts|.py tier-1 source (with <key>.layout.json / <key>.pinned.json sidecars)
|
|
7
|
+
* workflows/<key>.json canvas-authored workflows kept as the JSON export envelope
|
|
8
|
+
* activities/ code imported by workflows
|
|
9
|
+
* .fluidgrids/nodes.ts|.py generated node clients (`fluidgrids codegen`)
|
|
10
|
+
* lock.json registry snapshot, node versions, SDK version, pulled versions
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The `workflows/` and `.fluidgrids/` names are fixed: the lift and lower in
|
|
14
|
+
* `@fluidgrids/workflows` read and write sidecars at `workflows/<key>.*`.
|
|
15
|
+
*/
|
|
16
|
+
import { type CLIContext } from '@burdenoff/cli-sdk/core';
|
|
17
|
+
export declare const CONFIG_FILE = "fluidgrids.config.json";
|
|
18
|
+
export declare const LOCK_FILE = "lock.json";
|
|
19
|
+
export declare const WORKFLOWS_DIR = "workflows";
|
|
20
|
+
export declare const ACTIVITIES_DIR = "activities";
|
|
21
|
+
export declare const GENERATED_DIR = ".fluidgrids";
|
|
22
|
+
export declare const CONFIG_FORMAT_VERSION = 1;
|
|
23
|
+
export declare const LOCK_FORMAT_VERSION = 1;
|
|
24
|
+
export type ProjectLanguage = 'ts' | 'py';
|
|
25
|
+
export type WorkflowFormat = 'ts' | 'py' | 'json';
|
|
26
|
+
export declare const PROJECT_LANGUAGES: readonly ProjectLanguage[];
|
|
27
|
+
export declare const WORKFLOW_FORMATS: readonly WorkflowFormat[];
|
|
28
|
+
export interface ProjectConfig {
|
|
29
|
+
formatVersion: number;
|
|
30
|
+
/** Language of the workflow source and of the generated node clients. */
|
|
31
|
+
language: ProjectLanguage;
|
|
32
|
+
/**
|
|
33
|
+
* Workspace the project targets. When set, commands that talk to the
|
|
34
|
+
* workspace refuse to run while the CLI uses another one.
|
|
35
|
+
*/
|
|
36
|
+
workspaceId?: string;
|
|
37
|
+
/** Task queue new code workflows default to (Phase B). */
|
|
38
|
+
defaultTaskQueue: string;
|
|
39
|
+
/** Python interpreter for `.py` projects; default `.venv/bin/python`, then `python3`. */
|
|
40
|
+
python?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface LockedNode {
|
|
43
|
+
nodeType: string;
|
|
44
|
+
nodeVersion: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface LockedWorkflow {
|
|
47
|
+
/** The remote version this file was pulled from or pushed as. */
|
|
48
|
+
version: string;
|
|
49
|
+
/** `irHash` of that version. */
|
|
50
|
+
irHash: string;
|
|
51
|
+
format: WorkflowFormat;
|
|
52
|
+
/** Project-relative path of the workflow file. */
|
|
53
|
+
path: string;
|
|
54
|
+
/** `buildId` of the code bundle this version references (durable functions). */
|
|
55
|
+
buildId?: string;
|
|
56
|
+
}
|
|
57
|
+
/** The code bundle of the last push that uploaded one (durable functions, Phase B). */
|
|
58
|
+
export interface LockedBundle {
|
|
59
|
+
buildId: string;
|
|
60
|
+
sourceHash: string;
|
|
61
|
+
sdkVersion: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ProjectLock {
|
|
64
|
+
formatVersion: number;
|
|
65
|
+
sdkVersion: string;
|
|
66
|
+
registrySnapshot: string | null;
|
|
67
|
+
nodes: LockedNode[];
|
|
68
|
+
workflows: Record<string, LockedWorkflow>;
|
|
69
|
+
bundle?: LockedBundle;
|
|
70
|
+
}
|
|
71
|
+
export interface Project {
|
|
72
|
+
root: string;
|
|
73
|
+
config: ProjectConfig;
|
|
74
|
+
lock: ProjectLock;
|
|
75
|
+
}
|
|
76
|
+
/** A project file: path relative to the root with `/` separators, and its text. */
|
|
77
|
+
export interface ProjectFile {
|
|
78
|
+
path: string;
|
|
79
|
+
content: string;
|
|
80
|
+
}
|
|
81
|
+
export declare function parseConfig(value: unknown, where: string): ProjectConfig;
|
|
82
|
+
export declare function emptyLock(): ProjectLock;
|
|
83
|
+
export declare function parseLock(value: unknown, where: string): ProjectLock;
|
|
84
|
+
/** The nearest directory at or above `start` that holds `fluidgrids.config.json`. */
|
|
85
|
+
export declare function findProjectRoot(start: string): string | null;
|
|
86
|
+
/** Load the project at `projectDir`, or the nearest one above the working directory. */
|
|
87
|
+
export declare function loadProject(projectDir: string | undefined, cwd?: string): Project;
|
|
88
|
+
/** Deterministic JSON text for a file the CLI owns: sorted keys, two spaces, final newline. */
|
|
89
|
+
export declare function jsonText(value: unknown): string;
|
|
90
|
+
export declare function writeLock(project: Project): void;
|
|
91
|
+
/**
|
|
92
|
+
* A project-relative path with `/` separators. Absolute paths, `..` segments,
|
|
93
|
+
* empty segments and backslashes are refused, so a path from a server response
|
|
94
|
+
* or a lock file can never point outside the project.
|
|
95
|
+
*/
|
|
96
|
+
export declare function safeRelativePath(path: string, where: string): string;
|
|
97
|
+
/** Write a file inside the project, creating its directory. */
|
|
98
|
+
export declare function writeProjectFile(root: string, path: string, content: string): void;
|
|
99
|
+
export declare function readProjectFile(root: string, path: string): string | null;
|
|
100
|
+
/** Every file under the project's source directories, sorted. */
|
|
101
|
+
export declare function listSourcePaths(root: string): string[];
|
|
102
|
+
export declare function isSidecar(path: string): boolean;
|
|
103
|
+
/** A canvas workflow kept as JSON: `workflows/**.json` that is not a sidecar. */
|
|
104
|
+
export declare function isJsonWorkflow(path: string): boolean;
|
|
105
|
+
/** Source modules of the given language that may define workflows (tests and declarations excluded). */
|
|
106
|
+
export declare function isWorkflowModule(path: string, language: ProjectLanguage): boolean;
|
|
107
|
+
/** Files of the given language that lowering reads: modules plus sidecars. */
|
|
108
|
+
export declare function isLoweringInput(path: string, language: ProjectLanguage): boolean;
|
|
109
|
+
export declare function readProjectFiles(root: string, paths: readonly string[]): ProjectFile[];
|
|
110
|
+
/** The OS-specific form of a project-relative path, for messages. */
|
|
111
|
+
export declare function displayPath(path: string): string;
|
|
112
|
+
/**
|
|
113
|
+
* Refuse to work against a workspace other than the one the project records in
|
|
114
|
+
* `fluidgrids.config.json` (`workspaceId`), so a `push` or `pull` never lands in
|
|
115
|
+
* the wrong workspace after `fluidgrids workspace set` switched the CLI. A
|
|
116
|
+
* project without `workspaceId` works against any workspace, and so does a
|
|
117
|
+
* session whose workspace is not known (token mode with only
|
|
118
|
+
* `FLUIDGRIDS_WORKSPACE_TOKEN`).
|
|
119
|
+
*/
|
|
120
|
+
export declare function assertProjectWorkspace(env: {
|
|
121
|
+
ctx: CLIContext;
|
|
122
|
+
}, project: Project): void;
|
|
123
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/code-first/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIxE,eAAO,MAAM,WAAW,2BAA2B,CAAC;AACpD,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1C,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAElD,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAAiB,CAAC;AAC1E,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAAyB,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM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