@fluidgrids/cli 0.0.0-stage → 2026.1028.1
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/LICENSE +9 -0
- package/README.md +219 -2
- 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 +10 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +37 -0
- package/dist/cli.js.map +1 -0
- package/dist/code-first/api.d.ts +170 -0
- package/dist/code-first/api.d.ts.map +1 -0
- package/dist/code-first/api.js +166 -0
- package/dist/code-first/api.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/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 +51 -0
- package/dist/code-first/commands/push.d.ts.map +1 -0
- package/dist/code-first/commands/push.js +217 -0
- package/dist/code-first/commands/push.js.map +1 -0
- package/dist/code-first/commands/validate.d.ts +34 -0
- package/dist/code-first/commands/validate.d.ts.map +1 -0
- package/dist/code-first/commands/validate.js +115 -0
- package/dist/code-first/commands/validate.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/index.d.ts +14 -0
- package/dist/code-first/index.d.ts.map +1 -0
- package/dist/code-first/index.js +31 -0
- package/dist/code-first/index.js.map +1 -0
- package/dist/code-first/lowering.d.ts +42 -0
- package/dist/code-first/lowering.d.ts.map +1 -0
- package/dist/code-first/lowering.js +128 -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/project.d.ts +114 -0
- package/dist/code-first/project.d.ts.map +1 -0
- package/dist/code-first/project.js +279 -0
- package/dist/code-first/project.js.map +1 -0
- package/dist/code-first/python.d.ts +70 -0
- package/dist/code-first/python.d.ts.map +1 -0
- package/dist/code-first/python.js +219 -0
- package/dist/code-first/python.js.map +1 -0
- package/dist/code-first/register.d.ts +21 -0
- package/dist/code-first/register.d.ts.map +1 -0
- package/dist/code-first/register.js +126 -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 +120 -0
- package/dist/code-first/remote.js.map +1 -0
- package/dist/code-first/shared.d.ts +39 -0
- package/dist/code-first/shared.d.ts.map +1 -0
- package/dist/code-first/shared.js +57 -0
- package/dist/code-first/shared.js.map +1 -0
- package/dist/modules.d.ts +15 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +61 -0
- package/dist/modules.js.map +1 -0
- package/dist/product-defaults.d.ts +11 -0
- package/dist/product-defaults.d.ts.map +1 -0
- package/dist/product-defaults.js +25 -0
- package/dist/product-defaults.js.map +1 -0
- 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 +100 -4
|
@@ -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
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/code-first/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,qBAAqB,GAAG,6BAA6B,CAAC;AAE5D,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;yBAKT,qBAAqB;;;CAG7C,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAU,CAAC;AAGzE;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAA4B;IACjE,OAAO;wCAC+B,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;;;;;;;;;;gBAUzE,MAAM;;;;;;;;;;;;CAYrB,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;CAMnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;CAQpC,CAAC;AAEF,MAAM,qBAAqB,GAAG,4DAA4D,CAAC;AAE3F,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;mBAQvB,qBAAqB;;;CAGvC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;mBAKf,qBAAqB;;;yBAGf,qBAAqB;;;;CAI7C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;CAWvC,CAAC;AAEF,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAE3D,8FAA8F;AAC9F,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;iBAI9B,uBAAuB;mBACrB,uBAAuB;;;CAGzC,CAAC;AAEF,oGAAoG;AACpG,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;CAIpC,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;CAOrC,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;CAQlC,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
}
|
|
55
|
+
export interface ProjectLock {
|
|
56
|
+
formatVersion: number;
|
|
57
|
+
sdkVersion: string;
|
|
58
|
+
registrySnapshot: string | null;
|
|
59
|
+
nodes: LockedNode[];
|
|
60
|
+
workflows: Record<string, LockedWorkflow>;
|
|
61
|
+
}
|
|
62
|
+
export interface Project {
|
|
63
|
+
root: string;
|
|
64
|
+
config: ProjectConfig;
|
|
65
|
+
lock: ProjectLock;
|
|
66
|
+
}
|
|
67
|
+
/** A project file: path relative to the root with `/` separators, and its text. */
|
|
68
|
+
export interface ProjectFile {
|
|
69
|
+
path: string;
|
|
70
|
+
content: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function parseConfig(value: unknown, where: string): ProjectConfig;
|
|
73
|
+
export declare function emptyLock(): ProjectLock;
|
|
74
|
+
export declare function parseLock(value: unknown, where: string): ProjectLock;
|
|
75
|
+
/** The nearest directory at or above `start` that holds `fluidgrids.config.json`. */
|
|
76
|
+
export declare function findProjectRoot(start: string): string | null;
|
|
77
|
+
/** Load the project at `projectDir`, or the nearest one above the working directory. */
|
|
78
|
+
export declare function loadProject(projectDir: string | undefined, cwd?: string): Project;
|
|
79
|
+
/** Deterministic JSON text for a file the CLI owns: sorted keys, two spaces, final newline. */
|
|
80
|
+
export declare function jsonText(value: unknown): string;
|
|
81
|
+
export declare function writeLock(project: Project): void;
|
|
82
|
+
/**
|
|
83
|
+
* A project-relative path with `/` separators. Absolute paths, `..` segments,
|
|
84
|
+
* empty segments and backslashes are refused, so a path from a server response
|
|
85
|
+
* or a lock file can never point outside the project.
|
|
86
|
+
*/
|
|
87
|
+
export declare function safeRelativePath(path: string, where: string): string;
|
|
88
|
+
/** Write a file inside the project, creating its directory. */
|
|
89
|
+
export declare function writeProjectFile(root: string, path: string, content: string): void;
|
|
90
|
+
export declare function readProjectFile(root: string, path: string): string | null;
|
|
91
|
+
/** Every file under the project's source directories, sorted. */
|
|
92
|
+
export declare function listSourcePaths(root: string): string[];
|
|
93
|
+
export declare function isSidecar(path: string): boolean;
|
|
94
|
+
/** A canvas workflow kept as JSON: `workflows/**.json` that is not a sidecar. */
|
|
95
|
+
export declare function isJsonWorkflow(path: string): boolean;
|
|
96
|
+
/** Source modules of the given language that may define workflows (tests and declarations excluded). */
|
|
97
|
+
export declare function isWorkflowModule(path: string, language: ProjectLanguage): boolean;
|
|
98
|
+
/** Files of the given language that lowering reads: modules plus sidecars. */
|
|
99
|
+
export declare function isLoweringInput(path: string, language: ProjectLanguage): boolean;
|
|
100
|
+
export declare function readProjectFiles(root: string, paths: readonly string[]): ProjectFile[];
|
|
101
|
+
/** The OS-specific form of a project-relative path, for messages. */
|
|
102
|
+
export declare function displayPath(path: string): string;
|
|
103
|
+
/**
|
|
104
|
+
* Refuse to work against a workspace other than the one the project records in
|
|
105
|
+
* `fluidgrids.config.json` (`workspaceId`), so a `push` or `pull` never lands in
|
|
106
|
+
* the wrong workspace after `fluidgrids workspace set` switched the CLI. A
|
|
107
|
+
* project without `workspaceId` works against any workspace, and so does a
|
|
108
|
+
* session whose workspace is not known (token mode with only
|
|
109
|
+
* `FLUIDGRIDS_WORKSPACE_TOKEN`).
|
|
110
|
+
*/
|
|
111
|
+
export declare function assertProjectWorkspace(env: {
|
|
112
|
+
ctx: CLIContext;
|
|
113
|
+
}, project: Project): void;
|
|
114
|
+
//# 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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gB,sBAAsB,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,UAAU,CAAA;CAAE,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAWvF"}
|
|
@@ -0,0 +1,279 @@
|
|
|
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 { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'fs';
|
|
17
|
+
import { dirname, isAbsolute, join, posix, resolve, sep } from 'path';
|
|
18
|
+
import { CliUserError } from '@burdenoff/cli-sdk/core';
|
|
19
|
+
import { SDK_VERSION } from '@fluidgrids/workflows';
|
|
20
|
+
import { stableStringify } from '@fluidgrids/workflows/ir';
|
|
21
|
+
export const CONFIG_FILE = 'fluidgrids.config.json';
|
|
22
|
+
export const LOCK_FILE = 'lock.json';
|
|
23
|
+
export const WORKFLOWS_DIR = 'workflows';
|
|
24
|
+
export const ACTIVITIES_DIR = 'activities';
|
|
25
|
+
export const GENERATED_DIR = '.fluidgrids';
|
|
26
|
+
export const CONFIG_FORMAT_VERSION = 1;
|
|
27
|
+
export const LOCK_FORMAT_VERSION = 1;
|
|
28
|
+
export const PROJECT_LANGUAGES = ['ts', 'py'];
|
|
29
|
+
export const WORKFLOW_FORMATS = ['ts', 'py', 'json'];
|
|
30
|
+
function isRecord(value) {
|
|
31
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
32
|
+
}
|
|
33
|
+
function readJson(path) {
|
|
34
|
+
let text;
|
|
35
|
+
try {
|
|
36
|
+
text = readFileSync(path, 'utf8');
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
40
|
+
throw new CliUserError(`Cannot read ${path}: ${reason}`);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(text);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
throw new CliUserError(`${path} is not valid JSON.`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function optionalString(record, key, where) {
|
|
50
|
+
const value = record[key];
|
|
51
|
+
if (value === undefined)
|
|
52
|
+
return undefined;
|
|
53
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
54
|
+
throw new CliUserError(`${where}: "${key}" must be a non-empty string.`);
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
export function parseConfig(value, where) {
|
|
59
|
+
if (!isRecord(value))
|
|
60
|
+
throw new CliUserError(`${where} must be a JSON object.`);
|
|
61
|
+
if (value['formatVersion'] !== CONFIG_FORMAT_VERSION) {
|
|
62
|
+
throw new CliUserError(`${where}: "formatVersion" must be ${CONFIG_FORMAT_VERSION}.`);
|
|
63
|
+
}
|
|
64
|
+
const language = value['language'];
|
|
65
|
+
if (language !== 'ts' && language !== 'py') {
|
|
66
|
+
throw new CliUserError(`${where}: "language" must be "ts" or "py".`);
|
|
67
|
+
}
|
|
68
|
+
const config = {
|
|
69
|
+
formatVersion: CONFIG_FORMAT_VERSION,
|
|
70
|
+
language,
|
|
71
|
+
defaultTaskQueue: optionalString(value, 'defaultTaskQueue', where) ?? 'managed',
|
|
72
|
+
};
|
|
73
|
+
const workspaceId = optionalString(value, 'workspaceId', where);
|
|
74
|
+
if (workspaceId)
|
|
75
|
+
config.workspaceId = workspaceId;
|
|
76
|
+
const python = optionalString(value, 'python', where);
|
|
77
|
+
if (python)
|
|
78
|
+
config.python = python;
|
|
79
|
+
return config;
|
|
80
|
+
}
|
|
81
|
+
export function emptyLock() {
|
|
82
|
+
return {
|
|
83
|
+
formatVersion: LOCK_FORMAT_VERSION,
|
|
84
|
+
sdkVersion: SDK_VERSION,
|
|
85
|
+
registrySnapshot: null,
|
|
86
|
+
nodes: [],
|
|
87
|
+
workflows: {},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function parseLockedWorkflow(value, key, where) {
|
|
91
|
+
if (!isRecord(value) ||
|
|
92
|
+
typeof value['version'] !== 'string' ||
|
|
93
|
+
typeof value['irHash'] !== 'string' ||
|
|
94
|
+
typeof value['path'] !== 'string' ||
|
|
95
|
+
!WORKFLOW_FORMATS.includes(value['format'])) {
|
|
96
|
+
throw new CliUserError(`${where}: workflows["${key}"] is not a valid entry.`);
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
version: value['version'],
|
|
100
|
+
irHash: value['irHash'],
|
|
101
|
+
format: value['format'],
|
|
102
|
+
path: safeRelativePath(value['path'], where),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export function parseLock(value, where) {
|
|
106
|
+
if (!isRecord(value) || value['formatVersion'] !== LOCK_FORMAT_VERSION) {
|
|
107
|
+
throw new CliUserError(`${where}: "formatVersion" must be ${LOCK_FORMAT_VERSION}.`);
|
|
108
|
+
}
|
|
109
|
+
const snapshot = value['registrySnapshot'];
|
|
110
|
+
if (snapshot !== null && typeof snapshot !== 'string') {
|
|
111
|
+
throw new CliUserError(`${where}: "registrySnapshot" must be a string or null.`);
|
|
112
|
+
}
|
|
113
|
+
const nodesValue = value['nodes'];
|
|
114
|
+
if (!Array.isArray(nodesValue))
|
|
115
|
+
throw new CliUserError(`${where}: "nodes" must be an array.`);
|
|
116
|
+
const nodes = nodesValue.map((node, index) => {
|
|
117
|
+
if (!isRecord(node) ||
|
|
118
|
+
typeof node['nodeType'] !== 'string' ||
|
|
119
|
+
(node['nodeVersion'] !== null && typeof node['nodeVersion'] !== 'string')) {
|
|
120
|
+
throw new CliUserError(`${where}: nodes[${index}] is not a valid entry.`);
|
|
121
|
+
}
|
|
122
|
+
return { nodeType: node['nodeType'], nodeVersion: node['nodeVersion'] };
|
|
123
|
+
});
|
|
124
|
+
const workflowsValue = value['workflows'];
|
|
125
|
+
if (!isRecord(workflowsValue)) {
|
|
126
|
+
throw new CliUserError(`${where}: "workflows" must be an object.`);
|
|
127
|
+
}
|
|
128
|
+
const workflows = {};
|
|
129
|
+
for (const [key, entry] of Object.entries(workflowsValue)) {
|
|
130
|
+
Object.defineProperty(workflows, key, {
|
|
131
|
+
value: parseLockedWorkflow(entry, key, where),
|
|
132
|
+
enumerable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
configurable: true,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
formatVersion: LOCK_FORMAT_VERSION,
|
|
139
|
+
sdkVersion: typeof value['sdkVersion'] === 'string' ? value['sdkVersion'] : SDK_VERSION,
|
|
140
|
+
registrySnapshot: snapshot,
|
|
141
|
+
nodes,
|
|
142
|
+
workflows,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/** The nearest directory at or above `start` that holds `fluidgrids.config.json`. */
|
|
146
|
+
export function findProjectRoot(start) {
|
|
147
|
+
let dir = resolve(start);
|
|
148
|
+
for (;;) {
|
|
149
|
+
if (existsSync(join(dir, CONFIG_FILE)))
|
|
150
|
+
return dir;
|
|
151
|
+
const parent = dirname(dir);
|
|
152
|
+
if (parent === dir)
|
|
153
|
+
return null;
|
|
154
|
+
dir = parent;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/** Load the project at `projectDir`, or the nearest one above the working directory. */
|
|
158
|
+
export function loadProject(projectDir, cwd = process.cwd()) {
|
|
159
|
+
const root = projectDir ? resolve(cwd, projectDir) : findProjectRoot(cwd);
|
|
160
|
+
if (!root || !existsSync(join(root, CONFIG_FILE))) {
|
|
161
|
+
throw new CliUserError(`No ${CONFIG_FILE} found.`, {
|
|
162
|
+
hint: 'Run `fluidgrids init` to create a project, or pass --project <dir>.',
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
const config = parseConfig(readJson(join(root, CONFIG_FILE)), CONFIG_FILE);
|
|
166
|
+
const lockPath = join(root, LOCK_FILE);
|
|
167
|
+
const lock = existsSync(lockPath) ? parseLock(readJson(lockPath), LOCK_FILE) : emptyLock();
|
|
168
|
+
return { root, config, lock };
|
|
169
|
+
}
|
|
170
|
+
/** Deterministic JSON text for a file the CLI owns: sorted keys, two spaces, final newline. */
|
|
171
|
+
export function jsonText(value) {
|
|
172
|
+
return stableStringify(value);
|
|
173
|
+
}
|
|
174
|
+
export function writeLock(project) {
|
|
175
|
+
writeProjectFile(project.root, LOCK_FILE, jsonText({ ...project.lock, sdkVersion: SDK_VERSION }));
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* A project-relative path with `/` separators. Absolute paths, `..` segments,
|
|
179
|
+
* empty segments and backslashes are refused, so a path from a server response
|
|
180
|
+
* or a lock file can never point outside the project.
|
|
181
|
+
*/
|
|
182
|
+
export function safeRelativePath(path, where) {
|
|
183
|
+
const refuse = () => {
|
|
184
|
+
throw new CliUserError(`${where}: refusing the path "${path}".`);
|
|
185
|
+
};
|
|
186
|
+
if (path === '' || path.includes('\\') || path.includes('\0') || isAbsolute(path))
|
|
187
|
+
refuse();
|
|
188
|
+
const segments = path.split('/');
|
|
189
|
+
if (segments.some((segment) => segment === '' || segment === '.' || segment === '..'))
|
|
190
|
+
refuse();
|
|
191
|
+
return posix.normalize(path);
|
|
192
|
+
}
|
|
193
|
+
/** Write a file inside the project, creating its directory. */
|
|
194
|
+
export function writeProjectFile(root, path, content) {
|
|
195
|
+
const relative = safeRelativePath(path, 'write');
|
|
196
|
+
const target = join(root, ...relative.split('/'));
|
|
197
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
198
|
+
writeFileSync(target, content, 'utf8');
|
|
199
|
+
}
|
|
200
|
+
export function readProjectFile(root, path) {
|
|
201
|
+
const target = join(root, ...safeRelativePath(path, 'read').split('/'));
|
|
202
|
+
return existsSync(target) ? readFileSync(target, 'utf8') : null;
|
|
203
|
+
}
|
|
204
|
+
const SKIPPED_DIRS = new Set(['node_modules', '__pycache__', '.venv', 'venv', '.git']);
|
|
205
|
+
function walk(root, dir, out) {
|
|
206
|
+
const absolute = join(root, ...dir.split('/'));
|
|
207
|
+
if (!existsSync(absolute) || !statSync(absolute).isDirectory())
|
|
208
|
+
return;
|
|
209
|
+
for (const entry of readdirSync(absolute, { withFileTypes: true })) {
|
|
210
|
+
const relative = `${dir}/${entry.name}`;
|
|
211
|
+
if (entry.isDirectory()) {
|
|
212
|
+
if (!SKIPPED_DIRS.has(entry.name))
|
|
213
|
+
walk(root, relative, out);
|
|
214
|
+
}
|
|
215
|
+
else if (entry.isFile()) {
|
|
216
|
+
out.push(relative);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/** Every file under the project's source directories, sorted. */
|
|
221
|
+
export function listSourcePaths(root) {
|
|
222
|
+
const out = [];
|
|
223
|
+
for (const dir of [WORKFLOWS_DIR, ACTIVITIES_DIR, GENERATED_DIR])
|
|
224
|
+
walk(root, dir, out);
|
|
225
|
+
return out.sort();
|
|
226
|
+
}
|
|
227
|
+
export function isSidecar(path) {
|
|
228
|
+
return path.endsWith('.layout.json') || path.endsWith('.pinned.json');
|
|
229
|
+
}
|
|
230
|
+
/** A canvas workflow kept as JSON: `workflows/**.json` that is not a sidecar. */
|
|
231
|
+
export function isJsonWorkflow(path) {
|
|
232
|
+
return path.startsWith(`${WORKFLOWS_DIR}/`) && path.endsWith('.json') && !isSidecar(path);
|
|
233
|
+
}
|
|
234
|
+
/** Source modules of the given language that may define workflows (tests and declarations excluded). */
|
|
235
|
+
export function isWorkflowModule(path, language) {
|
|
236
|
+
if (!path.startsWith(`${WORKFLOWS_DIR}/`))
|
|
237
|
+
return false;
|
|
238
|
+
if (language === 'ts') {
|
|
239
|
+
return path.endsWith('.ts') && !path.endsWith('.d.ts') && !/\.(test|spec)\.ts$/.test(path);
|
|
240
|
+
}
|
|
241
|
+
const name = posix.basename(path);
|
|
242
|
+
return path.endsWith('.py') && !name.startsWith('test_') && !name.endsWith('_test.py');
|
|
243
|
+
}
|
|
244
|
+
/** Files of the given language that lowering reads: modules plus sidecars. */
|
|
245
|
+
export function isLoweringInput(path, language) {
|
|
246
|
+
if (isSidecar(path))
|
|
247
|
+
return path.startsWith(`${WORKFLOWS_DIR}/`);
|
|
248
|
+
return language === 'ts' ? path.endsWith('.ts') : path.endsWith('.py');
|
|
249
|
+
}
|
|
250
|
+
export function readProjectFiles(root, paths) {
|
|
251
|
+
return paths.map((path) => ({
|
|
252
|
+
path,
|
|
253
|
+
content: readFileSync(join(root, ...path.split('/')), 'utf8'),
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
/** The OS-specific form of a project-relative path, for messages. */
|
|
257
|
+
export function displayPath(path) {
|
|
258
|
+
return path.split('/').join(sep);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Refuse to work against a workspace other than the one the project records in
|
|
262
|
+
* `fluidgrids.config.json` (`workspaceId`), so a `push` or `pull` never lands in
|
|
263
|
+
* the wrong workspace after `fluidgrids workspace set` switched the CLI. A
|
|
264
|
+
* project without `workspaceId` works against any workspace, and so does a
|
|
265
|
+
* session whose workspace is not known (token mode with only
|
|
266
|
+
* `FLUIDGRIDS_WORKSPACE_TOKEN`).
|
|
267
|
+
*/
|
|
268
|
+
export function assertProjectWorkspace(env, project) {
|
|
269
|
+
const expected = project.config.workspaceId;
|
|
270
|
+
if (!expected || !env.ctx.auth.isAuthenticated())
|
|
271
|
+
return;
|
|
272
|
+
const current = env.ctx.auth.read()?.workspaceId;
|
|
273
|
+
if (!current || current === expected)
|
|
274
|
+
return;
|
|
275
|
+
throw new CliUserError(`This project targets workspace ${expected}, but the CLI is using workspace ${current}.`, {
|
|
276
|
+
hint: `Run \`${env.ctx.productName} workspace set ${expected}\` (or set FLUIDGRIDS_WORKSPACE_ID=${expected}), or remove "workspaceId" from ${CONFIG_FILE} to use the project with any workspace.`,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/code-first/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAmB,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AACpD,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAC3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAKrC,MAAM,CAAC,MAAM,iBAAiB,GAA+B,CAAC,IAAI,EAAE,IAA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