@burdenoff/fluidgrids-fe-sdk 2026.1113.1 → 2026.1113.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/dist/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4403 -46
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
- package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-DQtHXbIg.js +0 -224
- package/dist/api-MeAm6g7E.js +0 -55
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
- package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-CcLeCDfv.js +0 -504
- package/dist/useWorkflowOrganization-QxVePSkk.js +0 -282
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
|
|
3
|
+
import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
|
|
4
|
+
import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
|
|
5
|
+
import { n as getGlobalStoreClient } from "./global-client-DP_Wxe5t.js";
|
|
6
|
+
import { c as ensureInstalledNodeTypesLoaded, d as ensureRegistryNodeTypesLoaded, i as AVAILABLE_NODES, in as useFluidGridsAnalytics, o as NODE_CONFIGS, t as FluidGridsContext, y as GetMyNodeInstallationsDocument } from "./FluidGridsProvider-Dc_Jhtch.js";
|
|
5
7
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
8
|
+
import { o as isNodeTypeHiddenFromPalette } from "./durable-nodes-DXCCQYWD.js";
|
|
6
9
|
import { h as usePhaseDFlags } from "./feature-flags-B_b8PJ6Z.js";
|
|
7
10
|
import { c as isQuotaExhaustedFailure } from "./quota-Cdt8yz7N.js";
|
|
8
11
|
import { a as emitTemplateUsed, s as emitWorkflowCreated, t as emitNodeInstalled } from "./fluidgridsEvents-Dm5CaHtr.js";
|
|
12
|
+
import { n as InstallWorkflowNodeDocument } from "./global-operations-7pvXw_j9.js";
|
|
9
13
|
import { t as cn } from "./cn-QqidFIgr.js";
|
|
10
14
|
import { t as Button } from "./button-DG7y_FVJ.js";
|
|
11
|
-
import { b as utf8Length } from "./workflow-code-transfer-l9wO34S0.js";
|
|
12
15
|
import { i as SdkPermissionButton, t as FLUIDGRIDS_PERMISSIONS } from "./constants-dcxg6zG6.js";
|
|
16
|
+
import { t as useGlobalStoreClient } from "./useGlobalStoreClient-DMTrywdX.js";
|
|
17
|
+
import { r as templateInstallSource } from "./template-code-dqRunGOv.js";
|
|
18
|
+
import { t as Badge } from "./badge-CXfPhoMH.js";
|
|
19
|
+
import { t as templatePreview } from "./template-preview-C01KV277.js";
|
|
13
20
|
import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
|
|
14
21
|
import React, { Suspense, forwardRef, lazy, useCallback, useContext, useMemo, useState } from "react";
|
|
15
22
|
import { useQuery } from "@apollo/client/react";
|
|
@@ -18,88 +25,633 @@ import { Icon } from "@iconify/react";
|
|
|
18
25
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
26
|
import { toast } from "sonner";
|
|
20
27
|
import { useEventBus } from "@burdenoff/fe-libs/shared/events";
|
|
21
|
-
import { cva } from "class-variance-authority";
|
|
22
28
|
import { Download, Eye, Sparkles, Star } from "lucide-react";
|
|
23
|
-
import JSZip from "jszip";
|
|
24
29
|
|
|
25
|
-
// src/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
30
|
+
// src/generated/documents/global/BrowseWorkflowTemplatesDocument.ts
|
|
31
|
+
const BrowseWorkflowTemplatesDocument = {
|
|
32
|
+
"kind": "Document",
|
|
33
|
+
"definitions": [{
|
|
34
|
+
"kind": "OperationDefinition",
|
|
35
|
+
"operation": "query",
|
|
36
|
+
"name": {
|
|
37
|
+
"kind": "Name",
|
|
38
|
+
"value": "BrowseWorkflowTemplates"
|
|
39
|
+
},
|
|
40
|
+
"variableDefinitions": [{
|
|
41
|
+
"kind": "VariableDefinition",
|
|
42
|
+
"variable": {
|
|
43
|
+
"kind": "Variable",
|
|
44
|
+
"name": {
|
|
45
|
+
"kind": "Name",
|
|
46
|
+
"value": "input"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"type": {
|
|
50
|
+
"kind": "NonNullType",
|
|
51
|
+
"type": {
|
|
52
|
+
"kind": "NamedType",
|
|
53
|
+
"name": {
|
|
54
|
+
"kind": "Name",
|
|
55
|
+
"value": "BrowseStoreInput"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"directives": []
|
|
60
|
+
}],
|
|
61
|
+
"directives": [],
|
|
62
|
+
"selectionSet": {
|
|
63
|
+
"kind": "SelectionSet",
|
|
64
|
+
"selections": [{
|
|
65
|
+
"kind": "Field",
|
|
66
|
+
"name": {
|
|
67
|
+
"kind": "Name",
|
|
68
|
+
"value": "browseStore"
|
|
69
|
+
},
|
|
70
|
+
"arguments": [{
|
|
71
|
+
"kind": "Argument",
|
|
72
|
+
"name": {
|
|
73
|
+
"kind": "Name",
|
|
74
|
+
"value": "input"
|
|
75
|
+
},
|
|
76
|
+
"value": {
|
|
77
|
+
"kind": "Variable",
|
|
78
|
+
"name": {
|
|
79
|
+
"kind": "Name",
|
|
80
|
+
"value": "input"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}],
|
|
84
|
+
"directives": [],
|
|
85
|
+
"selectionSet": {
|
|
86
|
+
"kind": "SelectionSet",
|
|
87
|
+
"selections": [
|
|
88
|
+
{
|
|
89
|
+
"kind": "Field",
|
|
90
|
+
"name": {
|
|
91
|
+
"kind": "Name",
|
|
92
|
+
"value": "products"
|
|
93
|
+
},
|
|
94
|
+
"arguments": [],
|
|
95
|
+
"directives": [],
|
|
96
|
+
"selectionSet": {
|
|
97
|
+
"kind": "SelectionSet",
|
|
98
|
+
"selections": [
|
|
99
|
+
{
|
|
100
|
+
"kind": "Field",
|
|
101
|
+
"name": {
|
|
102
|
+
"kind": "Name",
|
|
103
|
+
"value": "id"
|
|
104
|
+
},
|
|
105
|
+
"arguments": [],
|
|
106
|
+
"directives": []
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "Field",
|
|
110
|
+
"name": {
|
|
111
|
+
"kind": "Name",
|
|
112
|
+
"value": "name"
|
|
113
|
+
},
|
|
114
|
+
"arguments": [],
|
|
115
|
+
"directives": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"kind": "Field",
|
|
119
|
+
"name": {
|
|
120
|
+
"kind": "Name",
|
|
121
|
+
"value": "slug"
|
|
122
|
+
},
|
|
123
|
+
"arguments": [],
|
|
124
|
+
"directives": []
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "Field",
|
|
128
|
+
"name": {
|
|
129
|
+
"kind": "Name",
|
|
130
|
+
"value": "type"
|
|
131
|
+
},
|
|
132
|
+
"arguments": [],
|
|
133
|
+
"directives": []
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"kind": "Field",
|
|
137
|
+
"name": {
|
|
138
|
+
"kind": "Name",
|
|
139
|
+
"value": "subType"
|
|
140
|
+
},
|
|
141
|
+
"arguments": [],
|
|
142
|
+
"directives": []
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "Field",
|
|
146
|
+
"name": {
|
|
147
|
+
"kind": "Name",
|
|
148
|
+
"value": "description"
|
|
149
|
+
},
|
|
150
|
+
"arguments": [],
|
|
151
|
+
"directives": []
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"kind": "Field",
|
|
155
|
+
"name": {
|
|
156
|
+
"kind": "Name",
|
|
157
|
+
"value": "longDescription"
|
|
158
|
+
},
|
|
159
|
+
"arguments": [],
|
|
160
|
+
"directives": []
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"kind": "Field",
|
|
164
|
+
"name": {
|
|
165
|
+
"kind": "Name",
|
|
166
|
+
"value": "icon"
|
|
167
|
+
},
|
|
168
|
+
"arguments": [],
|
|
169
|
+
"directives": []
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "Field",
|
|
173
|
+
"name": {
|
|
174
|
+
"kind": "Name",
|
|
175
|
+
"value": "screenshots"
|
|
176
|
+
},
|
|
177
|
+
"arguments": [],
|
|
178
|
+
"directives": []
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"kind": "Field",
|
|
182
|
+
"name": {
|
|
183
|
+
"kind": "Name",
|
|
184
|
+
"value": "videoUrls"
|
|
185
|
+
},
|
|
186
|
+
"arguments": [],
|
|
187
|
+
"directives": []
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"kind": "Field",
|
|
191
|
+
"name": {
|
|
192
|
+
"kind": "Name",
|
|
193
|
+
"value": "rating"
|
|
194
|
+
},
|
|
195
|
+
"arguments": [],
|
|
196
|
+
"directives": []
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "Field",
|
|
200
|
+
"name": {
|
|
201
|
+
"kind": "Name",
|
|
202
|
+
"value": "reviewCount"
|
|
203
|
+
},
|
|
204
|
+
"arguments": [],
|
|
205
|
+
"directives": []
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"kind": "Field",
|
|
209
|
+
"name": {
|
|
210
|
+
"kind": "Name",
|
|
211
|
+
"value": "downloads"
|
|
212
|
+
},
|
|
213
|
+
"arguments": [],
|
|
214
|
+
"directives": []
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "Field",
|
|
218
|
+
"name": {
|
|
219
|
+
"kind": "Name",
|
|
220
|
+
"value": "viewCount"
|
|
221
|
+
},
|
|
222
|
+
"arguments": [],
|
|
223
|
+
"directives": []
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"kind": "Field",
|
|
227
|
+
"name": {
|
|
228
|
+
"kind": "Name",
|
|
229
|
+
"value": "price"
|
|
230
|
+
},
|
|
231
|
+
"arguments": [],
|
|
232
|
+
"directives": []
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"kind": "Field",
|
|
236
|
+
"name": {
|
|
237
|
+
"kind": "Name",
|
|
238
|
+
"value": "pricingModel"
|
|
239
|
+
},
|
|
240
|
+
"arguments": [],
|
|
241
|
+
"directives": []
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "Field",
|
|
245
|
+
"name": {
|
|
246
|
+
"kind": "Name",
|
|
247
|
+
"value": "currency"
|
|
248
|
+
},
|
|
249
|
+
"arguments": [],
|
|
250
|
+
"directives": []
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"kind": "Field",
|
|
254
|
+
"name": {
|
|
255
|
+
"kind": "Name",
|
|
256
|
+
"value": "featured"
|
|
257
|
+
},
|
|
258
|
+
"arguments": [],
|
|
259
|
+
"directives": []
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "Field",
|
|
263
|
+
"name": {
|
|
264
|
+
"kind": "Name",
|
|
265
|
+
"value": "manifest"
|
|
266
|
+
},
|
|
267
|
+
"arguments": [],
|
|
268
|
+
"directives": []
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"kind": "Field",
|
|
272
|
+
"name": {
|
|
273
|
+
"kind": "Name",
|
|
274
|
+
"value": "manifestVersion"
|
|
275
|
+
},
|
|
276
|
+
"arguments": [],
|
|
277
|
+
"directives": []
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"kind": "Field",
|
|
281
|
+
"name": {
|
|
282
|
+
"kind": "Name",
|
|
283
|
+
"value": "content"
|
|
284
|
+
},
|
|
285
|
+
"arguments": [],
|
|
286
|
+
"directives": []
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"kind": "Field",
|
|
290
|
+
"name": {
|
|
291
|
+
"kind": "Name",
|
|
292
|
+
"value": "authorName"
|
|
293
|
+
},
|
|
294
|
+
"arguments": [],
|
|
295
|
+
"directives": []
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"kind": "Field",
|
|
299
|
+
"name": {
|
|
300
|
+
"kind": "Name",
|
|
301
|
+
"value": "license"
|
|
302
|
+
},
|
|
303
|
+
"arguments": [],
|
|
304
|
+
"directives": []
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"kind": "Field",
|
|
308
|
+
"name": {
|
|
309
|
+
"kind": "Name",
|
|
310
|
+
"value": "category"
|
|
311
|
+
},
|
|
312
|
+
"arguments": [],
|
|
313
|
+
"directives": []
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"kind": "Field",
|
|
317
|
+
"name": {
|
|
318
|
+
"kind": "Name",
|
|
319
|
+
"value": "tags"
|
|
320
|
+
},
|
|
321
|
+
"arguments": [],
|
|
322
|
+
"directives": []
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "Field",
|
|
326
|
+
"name": {
|
|
327
|
+
"kind": "Name",
|
|
328
|
+
"value": "compatibleProducts"
|
|
329
|
+
},
|
|
330
|
+
"arguments": [],
|
|
331
|
+
"directives": []
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"kind": "Field",
|
|
335
|
+
"name": {
|
|
336
|
+
"kind": "Name",
|
|
337
|
+
"value": "zipFileUrl"
|
|
338
|
+
},
|
|
339
|
+
"arguments": [],
|
|
340
|
+
"directives": []
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"kind": "Field",
|
|
344
|
+
"name": {
|
|
345
|
+
"kind": "Name",
|
|
346
|
+
"value": "isPurchased"
|
|
347
|
+
},
|
|
348
|
+
"arguments": [],
|
|
349
|
+
"directives": []
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"kind": "Field",
|
|
353
|
+
"name": {
|
|
354
|
+
"kind": "Name",
|
|
355
|
+
"value": "publisher"
|
|
356
|
+
},
|
|
357
|
+
"arguments": [],
|
|
358
|
+
"directives": [],
|
|
359
|
+
"selectionSet": {
|
|
360
|
+
"kind": "SelectionSet",
|
|
361
|
+
"selections": [
|
|
362
|
+
{
|
|
363
|
+
"kind": "Field",
|
|
364
|
+
"name": {
|
|
365
|
+
"kind": "Name",
|
|
366
|
+
"value": "id"
|
|
367
|
+
},
|
|
368
|
+
"arguments": [],
|
|
369
|
+
"directives": []
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"kind": "Field",
|
|
373
|
+
"name": {
|
|
374
|
+
"kind": "Name",
|
|
375
|
+
"value": "name"
|
|
376
|
+
},
|
|
377
|
+
"arguments": [],
|
|
378
|
+
"directives": []
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"kind": "Field",
|
|
382
|
+
"name": {
|
|
383
|
+
"kind": "Name",
|
|
384
|
+
"value": "email"
|
|
385
|
+
},
|
|
386
|
+
"arguments": [],
|
|
387
|
+
"directives": []
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"kind": "Field",
|
|
391
|
+
"name": {
|
|
392
|
+
"kind": "Name",
|
|
393
|
+
"value": "websiteUrl"
|
|
394
|
+
},
|
|
395
|
+
"arguments": [],
|
|
396
|
+
"directives": []
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"kind": "Field",
|
|
400
|
+
"name": {
|
|
401
|
+
"kind": "Name",
|
|
402
|
+
"value": "logoUrl"
|
|
403
|
+
},
|
|
404
|
+
"arguments": [],
|
|
405
|
+
"directives": []
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"kind": "Field",
|
|
409
|
+
"name": {
|
|
410
|
+
"kind": "Name",
|
|
411
|
+
"value": "isVerified"
|
|
412
|
+
},
|
|
413
|
+
"arguments": [],
|
|
414
|
+
"directives": []
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"kind": "Field",
|
|
421
|
+
"name": {
|
|
422
|
+
"kind": "Name",
|
|
423
|
+
"value": "createdAt"
|
|
424
|
+
},
|
|
425
|
+
"arguments": [],
|
|
426
|
+
"directives": []
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"kind": "Field",
|
|
430
|
+
"name": {
|
|
431
|
+
"kind": "Name",
|
|
432
|
+
"value": "updatedAt"
|
|
433
|
+
},
|
|
434
|
+
"arguments": [],
|
|
435
|
+
"directives": []
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"kind": "Field",
|
|
439
|
+
"name": {
|
|
440
|
+
"kind": "Name",
|
|
441
|
+
"value": "publishedAt"
|
|
442
|
+
},
|
|
443
|
+
"arguments": [],
|
|
444
|
+
"directives": []
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"kind": "Field",
|
|
451
|
+
"name": {
|
|
452
|
+
"kind": "Name",
|
|
453
|
+
"value": "totalCount"
|
|
454
|
+
},
|
|
455
|
+
"arguments": [],
|
|
456
|
+
"directives": []
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"kind": "Field",
|
|
460
|
+
"name": {
|
|
461
|
+
"kind": "Name",
|
|
462
|
+
"value": "hasMore"
|
|
463
|
+
},
|
|
464
|
+
"arguments": [],
|
|
465
|
+
"directives": []
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"kind": "Field",
|
|
469
|
+
"name": {
|
|
470
|
+
"kind": "Name",
|
|
471
|
+
"value": "nextCursor"
|
|
472
|
+
},
|
|
473
|
+
"arguments": [],
|
|
474
|
+
"directives": []
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
}]
|
|
479
|
+
}
|
|
480
|
+
}]
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// src/generated/documents/global/StoreNodeProductsByTypeDocument.ts
|
|
484
|
+
const StoreNodeProductsByTypeDocument = {
|
|
485
|
+
"kind": "Document",
|
|
486
|
+
"definitions": [{
|
|
487
|
+
"kind": "OperationDefinition",
|
|
488
|
+
"operation": "query",
|
|
489
|
+
"name": {
|
|
490
|
+
"kind": "Name",
|
|
491
|
+
"value": "StoreNodeProductsByType"
|
|
492
|
+
},
|
|
493
|
+
"variableDefinitions": [{
|
|
494
|
+
"kind": "VariableDefinition",
|
|
495
|
+
"variable": {
|
|
496
|
+
"kind": "Variable",
|
|
497
|
+
"name": {
|
|
498
|
+
"kind": "Name",
|
|
499
|
+
"value": "nodeTypes"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"type": {
|
|
503
|
+
"kind": "NonNullType",
|
|
504
|
+
"type": {
|
|
505
|
+
"kind": "ListType",
|
|
506
|
+
"type": {
|
|
507
|
+
"kind": "NonNullType",
|
|
508
|
+
"type": {
|
|
509
|
+
"kind": "NamedType",
|
|
510
|
+
"name": {
|
|
511
|
+
"kind": "Name",
|
|
512
|
+
"value": "String"
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"directives": []
|
|
519
|
+
}, {
|
|
520
|
+
"kind": "VariableDefinition",
|
|
521
|
+
"variable": {
|
|
522
|
+
"kind": "Variable",
|
|
523
|
+
"name": {
|
|
524
|
+
"kind": "Name",
|
|
525
|
+
"value": "compatibleWith"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"type": {
|
|
529
|
+
"kind": "NamedType",
|
|
530
|
+
"name": {
|
|
531
|
+
"kind": "Name",
|
|
532
|
+
"value": "String"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"directives": []
|
|
536
|
+
}],
|
|
537
|
+
"directives": [],
|
|
538
|
+
"selectionSet": {
|
|
539
|
+
"kind": "SelectionSet",
|
|
540
|
+
"selections": [{
|
|
541
|
+
"kind": "Field",
|
|
542
|
+
"name": {
|
|
543
|
+
"kind": "Name",
|
|
544
|
+
"value": "storeNodeProductsByType"
|
|
545
|
+
},
|
|
546
|
+
"arguments": [{
|
|
547
|
+
"kind": "Argument",
|
|
548
|
+
"name": {
|
|
549
|
+
"kind": "Name",
|
|
550
|
+
"value": "nodeTypes"
|
|
551
|
+
},
|
|
552
|
+
"value": {
|
|
553
|
+
"kind": "Variable",
|
|
554
|
+
"name": {
|
|
555
|
+
"kind": "Name",
|
|
556
|
+
"value": "nodeTypes"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}, {
|
|
560
|
+
"kind": "Argument",
|
|
561
|
+
"name": {
|
|
562
|
+
"kind": "Name",
|
|
563
|
+
"value": "compatibleWith"
|
|
564
|
+
},
|
|
565
|
+
"value": {
|
|
566
|
+
"kind": "Variable",
|
|
567
|
+
"name": {
|
|
568
|
+
"kind": "Name",
|
|
569
|
+
"value": "compatibleWith"
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}],
|
|
573
|
+
"directives": [],
|
|
574
|
+
"selectionSet": {
|
|
575
|
+
"kind": "SelectionSet",
|
|
576
|
+
"selections": [
|
|
577
|
+
{
|
|
578
|
+
"kind": "Field",
|
|
579
|
+
"name": {
|
|
580
|
+
"kind": "Name",
|
|
581
|
+
"value": "id"
|
|
582
|
+
},
|
|
583
|
+
"arguments": [],
|
|
584
|
+
"directives": []
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"kind": "Field",
|
|
588
|
+
"name": {
|
|
589
|
+
"kind": "Name",
|
|
590
|
+
"value": "productId"
|
|
591
|
+
},
|
|
592
|
+
"arguments": [],
|
|
593
|
+
"directives": []
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"kind": "Field",
|
|
597
|
+
"name": {
|
|
598
|
+
"kind": "Name",
|
|
599
|
+
"value": "name"
|
|
600
|
+
},
|
|
601
|
+
"arguments": [],
|
|
602
|
+
"directives": []
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"kind": "Field",
|
|
606
|
+
"name": {
|
|
607
|
+
"kind": "Name",
|
|
608
|
+
"value": "manifest"
|
|
609
|
+
},
|
|
610
|
+
"arguments": [],
|
|
611
|
+
"directives": []
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"kind": "Field",
|
|
615
|
+
"name": {
|
|
616
|
+
"kind": "Name",
|
|
617
|
+
"value": "manifestVersion"
|
|
618
|
+
},
|
|
619
|
+
"arguments": [],
|
|
620
|
+
"directives": []
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"kind": "Field",
|
|
624
|
+
"name": {
|
|
625
|
+
"kind": "Name",
|
|
626
|
+
"value": "pricingModel"
|
|
627
|
+
},
|
|
628
|
+
"arguments": [],
|
|
629
|
+
"directives": []
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"kind": "Field",
|
|
633
|
+
"name": {
|
|
634
|
+
"kind": "Name",
|
|
635
|
+
"value": "downloads"
|
|
636
|
+
},
|
|
637
|
+
"arguments": [],
|
|
638
|
+
"directives": []
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"kind": "Field",
|
|
642
|
+
"name": {
|
|
643
|
+
"kind": "Name",
|
|
644
|
+
"value": "publishedAt"
|
|
645
|
+
},
|
|
646
|
+
"arguments": [],
|
|
647
|
+
"directives": []
|
|
648
|
+
}
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
}]
|
|
652
|
+
}
|
|
653
|
+
}]
|
|
654
|
+
};
|
|
103
655
|
|
|
104
656
|
// src/ui/card.tsx
|
|
105
657
|
const Card = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
@@ -139,24 +691,6 @@ const CardFooter = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
139
691
|
}));
|
|
140
692
|
CardFooter.displayName = "CardFooter";
|
|
141
693
|
|
|
142
|
-
// src/hooks/store/useGlobalStoreClient.ts
|
|
143
|
-
/**
|
|
144
|
-
* Hook to get the Global Store Apollo client
|
|
145
|
-
*
|
|
146
|
-
* Priority:
|
|
147
|
-
* 1. FluidGridsProvider context (if available)
|
|
148
|
-
* 2. Module-level singleton set via setGlobalStoreClient()
|
|
149
|
-
*
|
|
150
|
-
* @throws Error if no global client is available from either source
|
|
151
|
-
*/
|
|
152
|
-
function useGlobalStoreClient() {
|
|
153
|
-
const context = useContext(FluidGridsContext);
|
|
154
|
-
if (context?.globalClient) return context.globalClient;
|
|
155
|
-
const singletonClient = getGlobalStoreClient();
|
|
156
|
-
if (singletonClient) return singletonClient;
|
|
157
|
-
throw new Error("useGlobalStoreClient: No global client available. Either wrap your component tree with <FluidGridsProvider globalClient={...}> or call setGlobalStoreClient(client) before rendering.");
|
|
158
|
-
}
|
|
159
|
-
|
|
160
694
|
// src/hooks/store/useInstalledNodes.ts
|
|
161
695
|
/**
|
|
162
696
|
* Hook to get installed nodes for the current workspace
|
|
@@ -571,7 +1105,7 @@ function replaceVariables(str, inputs) {
|
|
|
571
1105
|
}
|
|
572
1106
|
|
|
573
1107
|
// src/utils/template-import-flow.ts
|
|
574
|
-
function isRecord
|
|
1108
|
+
function isRecord(value) {
|
|
575
1109
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
576
1110
|
}
|
|
577
1111
|
function graphOf(value) {
|
|
@@ -589,13 +1123,13 @@ function graphOf(value) {
|
|
|
589
1123
|
* manifest holds neither.
|
|
590
1124
|
*/
|
|
591
1125
|
function manifestTemplateGraph(manifest) {
|
|
592
|
-
if (!isRecord
|
|
1126
|
+
if (!isRecord(manifest)) return null;
|
|
593
1127
|
const direct = graphOf(manifest);
|
|
594
1128
|
if (direct) return direct;
|
|
595
1129
|
if (typeof manifest.jsonContent !== "string") return null;
|
|
596
1130
|
try {
|
|
597
1131
|
const parsed = JSON.parse(manifest.jsonContent);
|
|
598
|
-
return isRecord
|
|
1132
|
+
return isRecord(parsed) ? graphOf(parsed) : null;
|
|
599
1133
|
} catch {
|
|
600
1134
|
return null;
|
|
601
1135
|
}
|
|
@@ -634,9 +1168,9 @@ async function resolveTemplateContent(product, requiredNodeTypesOf) {
|
|
|
634
1168
|
*/
|
|
635
1169
|
function unwrapTemplateDefinition(definitionJson) {
|
|
636
1170
|
const data = definitionJson.data;
|
|
637
|
-
if (!isRecord
|
|
638
|
-
const nested = isRecord
|
|
639
|
-
return isRecord
|
|
1171
|
+
if (!isRecord(data)) return definitionJson;
|
|
1172
|
+
const nested = isRecord(data.workflowDefinition) ? data.workflowDefinition.definitionJson : void 0;
|
|
1173
|
+
return isRecord(nested) ? nested : definitionJson;
|
|
640
1174
|
}
|
|
641
1175
|
/**
|
|
642
1176
|
* Whether "Use this template" must stop at the configuration dialog before
|
|
@@ -677,201 +1211,6 @@ async function installNodesInOrder(nodes, install, onProgress, onFailure) {
|
|
|
677
1211
|
return installed;
|
|
678
1212
|
}
|
|
679
1213
|
|
|
680
|
-
// src/utils/template-code.ts
|
|
681
|
-
/**
|
|
682
|
-
* Templates as code (BOFF-9907, PLAN-D D2 and C-TEMPLATE).
|
|
683
|
-
*
|
|
684
|
-
* A store WORKFLOW template may carry its project files in `content.sources`
|
|
685
|
-
* next to the `definitionJson` every client installs. These helpers:
|
|
686
|
-
*
|
|
687
|
-
* - read a template's code defensively (store content is free JSON);
|
|
688
|
-
* - package it as a project zip for *Open as code*;
|
|
689
|
-
* - shape it as the `source` of `importWorkflowTemplate` for a tier-2
|
|
690
|
-
* install;
|
|
691
|
-
* - check code before it is published, with the same rules global-store-svc
|
|
692
|
-
* applies on every write (DD3 size guard, path rules, DD7), so a refusal is
|
|
693
|
-
* explained before anything is sent.
|
|
694
|
-
*
|
|
695
|
-
* Nothing here lifts or lowers code: the service does that.
|
|
696
|
-
*/
|
|
697
|
-
/** DD3: the largest `content.sources` the store accepts, as UTF-8 JSON. */
|
|
698
|
-
const TEMPLATE_SOURCES_MAX_BYTES = 1048576;
|
|
699
|
-
/** DD3: the most files `content.sources` may hold. */
|
|
700
|
-
const TEMPLATE_SOURCES_MAX_FILES = 64;
|
|
701
|
-
/** The only package a tier-2 template's sources may import (C-TEMPLATE). */
|
|
702
|
-
const TEMPLATE_RUNTIME_PACKAGE = "@fluidgrids/workflows";
|
|
703
|
-
var TemplateCodeError = class extends Error {
|
|
704
|
-
problem;
|
|
705
|
-
constructor(problem) {
|
|
706
|
-
super(`Template code refused: ${problem.code}`);
|
|
707
|
-
this.problem = problem;
|
|
708
|
-
this.name = "TemplateCodeError";
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
|
-
function isRecord(value) {
|
|
712
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* Whether a source path is a plain relative POSIX path, as global-store-svc
|
|
716
|
-
* requires: not empty, not absolute, no drive letter, no backslash, no `.`,
|
|
717
|
-
* `..` or empty segment, and no control character.
|
|
718
|
-
*/
|
|
719
|
-
function isSafeTemplateSourcePath(path) {
|
|
720
|
-
if (!path || path.startsWith("/") || path.includes("\\")) return false;
|
|
721
|
-
if (/^[A-Za-z]:/.test(path)) return false;
|
|
722
|
-
for (const character of path) {
|
|
723
|
-
const code = character.charCodeAt(0);
|
|
724
|
-
if (code < 32 || code === 127) return false;
|
|
725
|
-
}
|
|
726
|
-
return path.split("/").every((segment) => segment !== "" && segment !== "." && segment !== "..");
|
|
727
|
-
}
|
|
728
|
-
/** Bytes the store counts for a sources list: its UTF-8 JSON. */
|
|
729
|
-
function templateSourcesBytes(sources) {
|
|
730
|
-
return utf8Length(JSON.stringify(sources));
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* Module specifiers a source imports: static and dynamic `import`, `export
|
|
734
|
-
* … from` and `require`. Comments are not stripped, so a commented-out import
|
|
735
|
-
* is counted too; that only makes the check stricter.
|
|
736
|
-
*/
|
|
737
|
-
function importedSpecifiers(source) {
|
|
738
|
-
const found = [];
|
|
739
|
-
for (const pattern of [
|
|
740
|
-
/\b(?:import|export)\s[^'"`;]*?\bfrom\s*['"]([^'"]+)['"]/g,
|
|
741
|
-
/\bimport\s*['"]([^'"]+)['"]/g,
|
|
742
|
-
/\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g,
|
|
743
|
-
/\brequire\s*\(\s*['"]([^'"]+)['"]\s*\)/g
|
|
744
|
-
]) for (const match of source.matchAll(pattern)) if (match[1] !== void 0) found.push(match[1]);
|
|
745
|
-
return found;
|
|
746
|
-
}
|
|
747
|
-
/** A specifier a tier-2 source may use: a project file or the SDK itself. */
|
|
748
|
-
function isAllowedSpecifier(specifier) {
|
|
749
|
-
return specifier.startsWith("./") || specifier.startsWith("../") || specifier === "@fluidgrids/workflows";
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* Checks sources against the store's rules (and, for tier 2, the import
|
|
753
|
-
* rule). Throws {@link TemplateCodeError} with the first problem found.
|
|
754
|
-
*/
|
|
755
|
-
function assertTemplateSources(sources, tier) {
|
|
756
|
-
if (sources.length === 0) throw new TemplateCodeError({ code: "no-files" });
|
|
757
|
-
if (sources.length > 64) throw new TemplateCodeError({
|
|
758
|
-
code: "too-many-files",
|
|
759
|
-
limit: 64
|
|
760
|
-
});
|
|
761
|
-
const seen = /* @__PURE__ */ new Set();
|
|
762
|
-
for (const file of sources) {
|
|
763
|
-
if (!isSafeTemplateSourcePath(file.path)) throw new TemplateCodeError({
|
|
764
|
-
code: "unsafe-path",
|
|
765
|
-
path: file.path
|
|
766
|
-
});
|
|
767
|
-
const folded = file.path.toLowerCase();
|
|
768
|
-
if (seen.has(folded)) throw new TemplateCodeError({
|
|
769
|
-
code: "duplicate-path",
|
|
770
|
-
path: file.path
|
|
771
|
-
});
|
|
772
|
-
seen.add(folded);
|
|
773
|
-
if (tier === "tier2" && /\.[cm]?[jt]s$/.test(file.path)) {
|
|
774
|
-
const foreign = importedSpecifiers(file.content).find((specifier) => !isAllowedSpecifier(specifier));
|
|
775
|
-
if (foreign !== void 0) throw new TemplateCodeError({
|
|
776
|
-
code: "foreign-import",
|
|
777
|
-
path: file.path,
|
|
778
|
-
specifier: foreign
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
if (templateSourcesBytes(sources) > 1048576) throw new TemplateCodeError({
|
|
783
|
-
code: "too-large",
|
|
784
|
-
limitBytes: TEMPLATE_SOURCES_MAX_BYTES
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* A template's code, or null when it has none or what it has is not usable
|
|
789
|
-
* (not a list of files, unsafe paths, an unknown format or tier). The store
|
|
790
|
-
* refuses such content on write; reading defensively keeps a template written
|
|
791
|
-
* before the guard, or by another client, from breaking the page.
|
|
792
|
-
*/
|
|
793
|
-
function readTemplateCode(content) {
|
|
794
|
-
if (!content || !Array.isArray(content.sources)) return null;
|
|
795
|
-
const files = [];
|
|
796
|
-
for (const entry of content.sources) {
|
|
797
|
-
if (!isRecord(entry) || typeof entry.path !== "string" || typeof entry.content !== "string") return null;
|
|
798
|
-
files.push({
|
|
799
|
-
path: entry.path,
|
|
800
|
-
contentType: typeof entry.contentType === "string" ? entry.contentType : contentTypeOf(entry.path),
|
|
801
|
-
content: entry.content
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
const format = content.sourceFormat ?? "TYPESCRIPT";
|
|
805
|
-
if (format !== "TYPESCRIPT" && format !== "PYTHON") return null;
|
|
806
|
-
const tier = content.codeTier ?? "tier1";
|
|
807
|
-
if (tier !== "tier1" && tier !== "tier2") return null;
|
|
808
|
-
try {
|
|
809
|
-
assertTemplateSources(files, "tier1");
|
|
810
|
-
} catch {
|
|
811
|
-
return null;
|
|
812
|
-
}
|
|
813
|
-
return {
|
|
814
|
-
files,
|
|
815
|
-
format,
|
|
816
|
-
tier,
|
|
817
|
-
irHash: typeof content.sourceIrHash === "string" ? content.sourceIrHash : null
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
/** The content type a project file is stored with, by its extension. */
|
|
821
|
-
function contentTypeOf(path) {
|
|
822
|
-
if (/\.[cm]?ts$/.test(path)) return "text/typescript";
|
|
823
|
-
if (/\.[cm]?js$/.test(path)) return "text/javascript";
|
|
824
|
-
if (path.endsWith(".py")) return "text/x-python";
|
|
825
|
-
if (path.endsWith(".json")) return "application/json";
|
|
826
|
-
return "text/plain";
|
|
827
|
-
}
|
|
828
|
-
/** A file name segment that is safe on every OS. */
|
|
829
|
-
function safeSegment(value) {
|
|
830
|
-
return value.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
831
|
-
}
|
|
832
|
-
/** The zip *Open as code* downloads for a template. */
|
|
833
|
-
function templateArchiveName(templateName) {
|
|
834
|
-
return `${safeSegment(templateName) || "template"}.code.zip`;
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* *Open as code*: the template's project files as one zip that keeps their
|
|
838
|
-
* paths, so unpacking it gives a FluidGrids project (`fluidgrids push`
|
|
839
|
-
* reads it as it is).
|
|
840
|
-
*/
|
|
841
|
-
async function buildTemplateCodeDownload(templateName, code) {
|
|
842
|
-
const zip = new JSZip();
|
|
843
|
-
for (const file of code.files) zip.file(file.path, file.content);
|
|
844
|
-
return {
|
|
845
|
-
filename: templateArchiveName(templateName),
|
|
846
|
-
blob: await zip.generateAsync({
|
|
847
|
-
type: "blob",
|
|
848
|
-
mimeType: "application/zip"
|
|
849
|
-
})
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
/** The `source` of an `importWorkflowTemplate` for a tier-2 install. */
|
|
853
|
-
function templateImportSource(code) {
|
|
854
|
-
return {
|
|
855
|
-
format: code.format,
|
|
856
|
-
files: code.files.map((file) => ({
|
|
857
|
-
path: file.path,
|
|
858
|
-
content: file.content
|
|
859
|
-
}))
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* What `importWorkflowTemplate` installs a template from (PLAN-D D2): its
|
|
864
|
-
* sources for a tier-2 TypeScript template while code-first, durable-functions and
|
|
865
|
-
* code-templates are on (`codeTemplatesDurable`), else null, and the caller
|
|
866
|
-
* sends `definitionJson` exactly as before (tier 1, Python, no code, or a
|
|
867
|
-
* gate off).
|
|
868
|
-
*/
|
|
869
|
-
function templateInstallSource(content, codeTemplatesDurable) {
|
|
870
|
-
if (!codeTemplatesDurable) return null;
|
|
871
|
-
const code = readTemplateCode(content);
|
|
872
|
-
return code?.tier === "tier2" && code.format === "TYPESCRIPT" ? templateImportSource(code) : null;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
1214
|
// src/hooks/store/useImportWorkflowTemplate.ts
|
|
876
1215
|
const IMPORT_WORKFLOW_TEMPLATE = gql`
|
|
877
1216
|
mutation ImportWorkflowTemplate($input: ImportWorkflowTemplateInput!) {
|
|
@@ -1282,7 +1621,7 @@ async function dismissToastWhenShown(id) {
|
|
|
1282
1621
|
}
|
|
1283
1622
|
|
|
1284
1623
|
// src/hooks/store/useTemplateImportFlow.tsx
|
|
1285
|
-
const LazyTemplateConfigurationModal = lazy(() => import("./TemplateConfigurationModal-
|
|
1624
|
+
const LazyTemplateConfigurationModal = lazy(() => import("./TemplateConfigurationModal-BT3PaR0O.js").then((m) => ({ default: m.TemplateConfigurationModal })));
|
|
1286
1625
|
/**
|
|
1287
1626
|
* "Use this template", the same everywhere it is offered: the builder's
|
|
1288
1627
|
* template panel, the Templates page and the template preview page
|
|
@@ -1441,53 +1780,6 @@ function useTemplateImportFlow({ onImported, onQuotaExhausted }) {
|
|
|
1441
1780
|
};
|
|
1442
1781
|
}
|
|
1443
1782
|
|
|
1444
|
-
// src/ui/badge.tsx
|
|
1445
|
-
const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
1446
|
-
variants: { variant: {
|
|
1447
|
-
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
1448
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1449
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
1450
|
-
outline: "text-foreground",
|
|
1451
|
-
success: "border-transparent bg-status-success-bg-subtle text-status-success-text",
|
|
1452
|
-
warning: "border-transparent bg-status-warning-bg-subtle text-status-warning-text",
|
|
1453
|
-
info: "border-transparent bg-status-info-bg-subtle text-status-info-text"
|
|
1454
|
-
} },
|
|
1455
|
-
defaultVariants: { variant: "default" }
|
|
1456
|
-
});
|
|
1457
|
-
function Badge({ className, variant, ...props }) {
|
|
1458
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1459
|
-
className: cn(badgeVariants({ variant }), className),
|
|
1460
|
-
...props
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
// src/utils/template-preview.ts
|
|
1465
|
-
const ICONIFY_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*:[a-z0-9]+(?:[-_][a-z0-9]+)*$/i;
|
|
1466
|
-
/** True when the value is an Iconify `prefix:name` icon, not a URL. */
|
|
1467
|
-
function isIconifyName(value) {
|
|
1468
|
-
return ICONIFY_NAME.test(value) && !/^(https?|data|blob):/i.test(value);
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* The preview for a template: its first screenshot, else its icon, which is
|
|
1472
|
-
* shown as an image only when it is not an Iconify name.
|
|
1473
|
-
*/
|
|
1474
|
-
function templatePreview(template) {
|
|
1475
|
-
const screenshot = template.screenshots?.find((shot) => typeof shot === "string" && shot.trim() !== "");
|
|
1476
|
-
if (screenshot) return {
|
|
1477
|
-
kind: "image",
|
|
1478
|
-
src: screenshot
|
|
1479
|
-
};
|
|
1480
|
-
const icon = template.icon?.trim();
|
|
1481
|
-
if (!icon) return { kind: "none" };
|
|
1482
|
-
return isIconifyName(icon) ? {
|
|
1483
|
-
kind: "icon",
|
|
1484
|
-
name: icon
|
|
1485
|
-
} : {
|
|
1486
|
-
kind: "image",
|
|
1487
|
-
src: icon
|
|
1488
|
-
};
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
1783
|
// src/utils/template-price.ts
|
|
1492
1784
|
/**
|
|
1493
1785
|
* The price shown on a store template card and in the preview.
|
|
@@ -1707,4 +1999,4 @@ function TemplateCard({ template, onClick, onUseTemplate }) {
|
|
|
1707
1999
|
});
|
|
1708
2000
|
}
|
|
1709
2001
|
|
|
1710
|
-
export {
|
|
2002
|
+
export { CardTitle as C, CardHeader as S, useInstalledNodes as _, buildNodeCheck as a, CardDescription as b, useImportWorkflowTemplate as c, getStoreNodeAvailability as d, getStoreNodeIcon as f, storeNodeInstallVersion as g, storeNodeDisplayVersion as h, useTemplateImportFlow as i, useWorkflowTemplates as l, isStoreNodeUpdateAvailable as m, formatTemplatePrice as n, buildRequiredNodeTypes as o, getStoreNodeType as p, isPaidTemplate as r, getWorkflowNodeTypes as s, TemplateCard as t, filterStoreNodesForPalette as u, Card as v, CardFooter as x, CardContent as y };
|