@red-hat-developer-hub/backstage-plugin-orchestrator-common 3.1.0 → 3.3.0
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/CHANGELOG.md +22 -0
- package/dist/index.d.ts +15 -15
- package/dist/types.cjs.js.map +1 -1
- package/dist/types.esm.js.map +1 -1
- package/dist/workflow.cjs.js +1 -1
- package/dist/workflow.cjs.js.map +1 -1
- package/dist/workflow.esm.js +1 -1
- package/dist/workflow.esm.js.map +1 -1
- package/package.json +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
## @red-hat-developer-hub/backstage-plugin-orchestrator-common [1.13.1](https://github.com/janus-idp/backstage-plugins/compare/@red-hat-developer-hub/backstage-plugin-orchestrator-common@1.13.0...@red-hat-developer-hub/backstage-plugin-orchestrator-common@1.13.1) (2024-08-02)
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 782c33f: Removal and updating outdated and unmaintained dependencies
|
|
8
|
+
- 34a36cb: Update @serverlessworkflow/sdk-typescript to the correct module name and latest version
|
|
9
|
+
- 29dfed0: Backstage version bump to v1.45.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- a1671ab: The js-yaml-cli package was removed in error here: #1735 . While it is not being used in the code, it is used to generate the API for the router
|
|
14
|
+
- 40b80fe: Change "lifecycle" to active in catalog-info.yaml
|
|
15
|
+
- f5f4973: Updated dependency `@openapitools/openapi-generator-cli` to `2.25.0`.
|
|
16
|
+
Updated dependency `@red-hat-developer-hub/backstage-plugin-theme` to `^0.10.0`.
|
|
17
|
+
- 40b80fe: Remove "support", "lifecycle" keywords and "supported-versions" in package.json. Change "lifecycle" to active in catalog.yaml
|
|
18
|
+
|
|
19
|
+
## 3.2.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- fba1136: Backstage version bump to v1.44.1
|
|
24
|
+
|
|
3
25
|
## 3.1.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonObject, JsonValue } from '@backstage/types';
|
|
2
|
-
import { Specification } from '@
|
|
2
|
+
import { Specification } from '@serverlessworkflow/sdk-typescript';
|
|
3
3
|
import { JSONSchema7, JSONSchema7Definition } from 'json-schema';
|
|
4
4
|
import * as axios from 'axios';
|
|
5
5
|
import { RawAxiosRequestConfig, AxiosInstance, AxiosPromise } from 'axios';
|
|
@@ -117,7 +117,7 @@ type OmitDistributive<T, K extends PropertyKey> = T extends any ? T extends obje
|
|
|
117
117
|
type OmitRecursively<T, K extends PropertyKey> = Omit<{
|
|
118
118
|
[P in keyof T]: OmitDistributive<T[P], K>;
|
|
119
119
|
}, K>;
|
|
120
|
-
type WorkflowDefinition = OmitRecursively<Specification.Workflow, 'normalize'>;
|
|
120
|
+
type WorkflowDefinition = OmitRecursively<Specification.Workflow, 'normalize' | 'asPlainObject'>;
|
|
121
121
|
type WorkflowListResult = {
|
|
122
122
|
items: WorkflowDefinition[];
|
|
123
123
|
offset: number;
|
|
@@ -1490,7 +1490,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1490
1490
|
* @throws {RequiredError}
|
|
1491
1491
|
* @memberof DefaultApi
|
|
1492
1492
|
*/
|
|
1493
|
-
abortWorkflow(instanceId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any>>;
|
|
1493
|
+
abortWorkflow(instanceId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any, {}>>;
|
|
1494
1494
|
/**
|
|
1495
1495
|
* Execute a workflow
|
|
1496
1496
|
* @summary Execute a workflow
|
|
@@ -1500,7 +1500,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1500
1500
|
* @throws {RequiredError}
|
|
1501
1501
|
* @memberof DefaultApi
|
|
1502
1502
|
*/
|
|
1503
|
-
executeWorkflow(workflowId: string, executeWorkflowRequestDTO: ExecuteWorkflowRequestDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ExecuteWorkflowResponseDTO, any>>;
|
|
1503
|
+
executeWorkflow(workflowId: string, executeWorkflowRequestDTO: ExecuteWorkflowRequestDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ExecuteWorkflowResponseDTO, any, {}>>;
|
|
1504
1504
|
/**
|
|
1505
1505
|
* Get a workflow execution/run (instance)
|
|
1506
1506
|
* @summary Get Workflow Instance by ID
|
|
@@ -1509,7 +1509,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1509
1509
|
* @throws {RequiredError}
|
|
1510
1510
|
* @memberof DefaultApi
|
|
1511
1511
|
*/
|
|
1512
|
-
getInstanceById(instanceId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceDTO, any>>;
|
|
1512
|
+
getInstanceById(instanceId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceDTO, any, {}>>;
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Retrieve an array of workflow executions (instances)
|
|
1515
1515
|
* @summary Get instances
|
|
@@ -1518,7 +1518,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1518
1518
|
* @throws {RequiredError}
|
|
1519
1519
|
* @memberof DefaultApi
|
|
1520
1520
|
*/
|
|
1521
|
-
getInstances(searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceListResultDTO, any>>;
|
|
1521
|
+
getInstances(searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceListResultDTO, any, {}>>;
|
|
1522
1522
|
/**
|
|
1523
1523
|
* Get the workflow input schema. It defines the input fields of the workflow
|
|
1524
1524
|
* @param {string} workflowId ID of the workflow to fetch
|
|
@@ -1527,7 +1527,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1527
1527
|
* @throws {RequiredError}
|
|
1528
1528
|
* @memberof DefaultApi
|
|
1529
1529
|
*/
|
|
1530
|
-
getWorkflowInputSchemaById(workflowId: string, instanceId?: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<InputSchemaResponseDTO, any>>;
|
|
1530
|
+
getWorkflowInputSchemaById(workflowId: string, instanceId?: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<InputSchemaResponseDTO, any, {}>>;
|
|
1531
1531
|
/**
|
|
1532
1532
|
* Retrieve an array of workflow executions (instances) for the given workflow
|
|
1533
1533
|
* @summary Get instances for a specific workflow
|
|
@@ -1537,7 +1537,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1537
1537
|
* @throws {RequiredError}
|
|
1538
1538
|
* @memberof DefaultApi
|
|
1539
1539
|
*/
|
|
1540
|
-
getWorkflowInstances(workflowId: string, searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceListResultDTO, any>>;
|
|
1540
|
+
getWorkflowInstances(workflowId: string, searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ProcessInstanceListResultDTO, any, {}>>;
|
|
1541
1541
|
/**
|
|
1542
1542
|
* Returns the key fields of the workflow including data on the last run instance
|
|
1543
1543
|
* @param {string} workflowId Unique identifier of the workflow
|
|
@@ -1545,7 +1545,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1545
1545
|
* @throws {RequiredError}
|
|
1546
1546
|
* @memberof DefaultApi
|
|
1547
1547
|
*/
|
|
1548
|
-
getWorkflowOverviewById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewDTO, any>>;
|
|
1548
|
+
getWorkflowOverviewById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewDTO, any, {}>>;
|
|
1549
1549
|
/**
|
|
1550
1550
|
* Get the workflow\'s definition
|
|
1551
1551
|
* @param {string} workflowId ID of the workflow to fetch
|
|
@@ -1553,7 +1553,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1553
1553
|
* @throws {RequiredError}
|
|
1554
1554
|
* @memberof DefaultApi
|
|
1555
1555
|
*/
|
|
1556
|
-
getWorkflowSourceById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any>>;
|
|
1556
|
+
getWorkflowSourceById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any, {}>>;
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Retrieve array with the status of all instances
|
|
1559
1559
|
* @summary Get workflow status list
|
|
@@ -1561,7 +1561,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1561
1561
|
* @throws {RequiredError}
|
|
1562
1562
|
* @memberof DefaultApi
|
|
1563
1563
|
*/
|
|
1564
|
-
getWorkflowStatuses(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowRunStatusDTO[], any>>;
|
|
1564
|
+
getWorkflowStatuses(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowRunStatusDTO[], any, {}>>;
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Returns the key fields of the workflow including data on the last run instance
|
|
1567
1567
|
* @param {SearchRequest} [searchRequest] Pagination and filters
|
|
@@ -1569,7 +1569,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1569
1569
|
* @throws {RequiredError}
|
|
1570
1570
|
* @memberof DefaultApi
|
|
1571
1571
|
*/
|
|
1572
|
-
getWorkflowsOverview(searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewListResultDTO, any>>;
|
|
1572
|
+
getWorkflowsOverview(searchRequest?: SearchRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewListResultDTO, any, {}>>;
|
|
1573
1573
|
/**
|
|
1574
1574
|
* Returns the key fields of the workflow including data on the last run instance
|
|
1575
1575
|
* @param {GetWorkflowsOverviewForEntityRequest} [getWorkflowsOverviewForEntityRequest] Target entity reference and annotation workflow ids
|
|
@@ -1577,7 +1577,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1577
1577
|
* @throws {RequiredError}
|
|
1578
1578
|
* @memberof DefaultApi
|
|
1579
1579
|
*/
|
|
1580
|
-
getWorkflowsOverviewForEntity(getWorkflowsOverviewForEntityRequest?: GetWorkflowsOverviewForEntityRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewListResultDTO, any>>;
|
|
1580
|
+
getWorkflowsOverviewForEntity(getWorkflowsOverviewForEntityRequest?: GetWorkflowsOverviewForEntityRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<WorkflowOverviewListResultDTO, any, {}>>;
|
|
1581
1581
|
/**
|
|
1582
1582
|
* Returns true if the workflow service is up for the given workflow ID.
|
|
1583
1583
|
* @param {string} workflowId ID of the workflow to fetch
|
|
@@ -1585,7 +1585,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1585
1585
|
* @throws {RequiredError}
|
|
1586
1586
|
* @memberof DefaultApi
|
|
1587
1587
|
*/
|
|
1588
|
-
pingWorkflowServiceById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<boolean, any>>;
|
|
1588
|
+
pingWorkflowServiceById(workflowId: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<boolean, any, {}>>;
|
|
1589
1589
|
/**
|
|
1590
1590
|
* Retrigger an instance
|
|
1591
1591
|
* @summary Retrigger an instance
|
|
@@ -1596,7 +1596,7 @@ declare class DefaultApi extends BaseAPI {
|
|
|
1596
1596
|
* @throws {RequiredError}
|
|
1597
1597
|
* @memberof DefaultApi
|
|
1598
1598
|
*/
|
|
1599
|
-
retriggerInstance(workflowId: string, instanceId: string, retriggerInstanceRequestDTO: RetriggerInstanceRequestDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any>>;
|
|
1599
|
+
retriggerInstance(workflowId: string, instanceId: string, retriggerInstanceRequestDTO: RetriggerInstanceRequestDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}>>;
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
1602
|
/**
|
package/dist/types.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs.js","sources":["../src/types.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '@backstage/types';\n\nimport type { Specification } from '@
|
|
1
|
+
{"version":3,"file":"types.cjs.js","sources":["../src/types.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '@backstage/types';\n\nimport type { Specification } from '@serverlessworkflow/sdk-typescript';\nimport type { JSONSchema7, JSONSchema7Definition } from 'json-schema';\n\nimport type { ProcessInstanceStateValues } from './models';\n\ntype Id<T> = { [P in keyof T]: T[P] };\n\ntype OmitDistributive<T, K extends PropertyKey> = T extends any\n ? T extends object\n ? Id<OmitRecursively<T, K>>\n : T\n : never;\n\nexport type OmitRecursively<T, K extends PropertyKey> = Omit<\n { [P in keyof T]: OmitDistributive<T[P], K> },\n K\n>;\n\nexport type WorkflowDefinition = OmitRecursively<\n Specification.Workflow,\n 'normalize' | 'asPlainObject'\n>;\n\nexport type WorkflowListResult = {\n items: WorkflowDefinition[];\n offset: number;\n limit: number;\n};\n\nexport type WorkflowOverviewListResult = {\n items: WorkflowOverview[];\n offset: number;\n limit: number;\n};\n\nexport type WorkflowFormat = 'yaml' | 'json';\n\nexport type WorkflowInputSchemaStep = {\n schema: JsonObjectSchema;\n title: string;\n key: string;\n data: JsonObject;\n readonlyKeys: string[];\n};\n\nexport type JsonObjectSchema = Omit<JSONSchema7, 'properties'> & {\n properties: { [key: string]: JSONSchema7 };\n};\n\nexport type ComposedSchema = Omit<JSONSchema7, 'properties'> & {\n properties: {\n [key: string]: Omit<JSONSchema7, 'properties'> & {\n properties: { [key: string]: JsonObjectSchema };\n };\n };\n};\n\nexport const isJsonObjectSchema = (\n schema: JSONSchema7 | JsonObjectSchema | JSONSchema7Definition,\n): schema is JsonObjectSchema =>\n typeof schema === 'object' &&\n !!schema.properties &&\n Object.values(schema.properties).filter(\n curSchema => typeof curSchema !== 'object',\n ).length === 0;\n\nexport const isComposedSchema = (\n schema: JSONSchema7 | ComposedSchema,\n): schema is ComposedSchema =>\n !!schema.properties &&\n Object.values(schema.properties).filter(\n curSchema => !isJsonObjectSchema(curSchema),\n ).length === 0;\n\nexport interface WorkflowExecutionResponse {\n id: string;\n}\n\nexport interface WorkflowOverview {\n workflowId: string;\n format: WorkflowFormat;\n name?: string;\n lastRunId?: string;\n lastTriggeredMs?: number;\n lastRunStatus?: ProcessInstanceStateValues;\n avgDurationMs?: number;\n description?: string;\n isAvailable?: boolean;\n}\n\nexport interface WorkflowInfo {\n id: string;\n type?: string;\n name?: string;\n version?: string;\n annotations?: string[];\n description?: string;\n inputSchema?: JSONSchema7;\n endpoint?: string;\n serviceUrl?: string;\n roles?: string[];\n source?: string;\n metadata?: Record<string, string>;\n nodes?: Node[];\n}\n\nexport interface Node {\n id: string;\n type?: string;\n name?: string;\n uniqueId?: string;\n nodeDefinitionId?: string;\n}\n"],"names":[],"mappings":";;AA2EO,MAAM,kBAAA,GAAqB,CAChC,MAAA,KAEA,OAAO,WAAW,QAAA,IAClB,CAAC,CAAC,MAAA,CAAO,UAAA,IACT,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,UAAU,CAAA,CAAE,MAAA;AAAA,EAC/B,CAAA,SAAA,KAAa,OAAO,SAAA,KAAc;AACpC,CAAA,CAAE,MAAA,KAAW;AAER,MAAM,gBAAA,GAAmB,CAC9B,MAAA,KAEA,CAAC,CAAC,MAAA,CAAO,UAAA,IACT,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,UAAU,CAAA,CAAE,MAAA;AAAA,EAC/B,CAAA,SAAA,KAAa,CAAC,kBAAA,CAAmB,SAAS;AAC5C,CAAA,CAAE,MAAA,KAAW;;;;;"}
|
package/dist/types.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '@backstage/types';\n\nimport type { Specification } from '@
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '@backstage/types';\n\nimport type { Specification } from '@serverlessworkflow/sdk-typescript';\nimport type { JSONSchema7, JSONSchema7Definition } from 'json-schema';\n\nimport type { ProcessInstanceStateValues } from './models';\n\ntype Id<T> = { [P in keyof T]: T[P] };\n\ntype OmitDistributive<T, K extends PropertyKey> = T extends any\n ? T extends object\n ? Id<OmitRecursively<T, K>>\n : T\n : never;\n\nexport type OmitRecursively<T, K extends PropertyKey> = Omit<\n { [P in keyof T]: OmitDistributive<T[P], K> },\n K\n>;\n\nexport type WorkflowDefinition = OmitRecursively<\n Specification.Workflow,\n 'normalize' | 'asPlainObject'\n>;\n\nexport type WorkflowListResult = {\n items: WorkflowDefinition[];\n offset: number;\n limit: number;\n};\n\nexport type WorkflowOverviewListResult = {\n items: WorkflowOverview[];\n offset: number;\n limit: number;\n};\n\nexport type WorkflowFormat = 'yaml' | 'json';\n\nexport type WorkflowInputSchemaStep = {\n schema: JsonObjectSchema;\n title: string;\n key: string;\n data: JsonObject;\n readonlyKeys: string[];\n};\n\nexport type JsonObjectSchema = Omit<JSONSchema7, 'properties'> & {\n properties: { [key: string]: JSONSchema7 };\n};\n\nexport type ComposedSchema = Omit<JSONSchema7, 'properties'> & {\n properties: {\n [key: string]: Omit<JSONSchema7, 'properties'> & {\n properties: { [key: string]: JsonObjectSchema };\n };\n };\n};\n\nexport const isJsonObjectSchema = (\n schema: JSONSchema7 | JsonObjectSchema | JSONSchema7Definition,\n): schema is JsonObjectSchema =>\n typeof schema === 'object' &&\n !!schema.properties &&\n Object.values(schema.properties).filter(\n curSchema => typeof curSchema !== 'object',\n ).length === 0;\n\nexport const isComposedSchema = (\n schema: JSONSchema7 | ComposedSchema,\n): schema is ComposedSchema =>\n !!schema.properties &&\n Object.values(schema.properties).filter(\n curSchema => !isJsonObjectSchema(curSchema),\n ).length === 0;\n\nexport interface WorkflowExecutionResponse {\n id: string;\n}\n\nexport interface WorkflowOverview {\n workflowId: string;\n format: WorkflowFormat;\n name?: string;\n lastRunId?: string;\n lastTriggeredMs?: number;\n lastRunStatus?: ProcessInstanceStateValues;\n avgDurationMs?: number;\n description?: string;\n isAvailable?: boolean;\n}\n\nexport interface WorkflowInfo {\n id: string;\n type?: string;\n name?: string;\n version?: string;\n annotations?: string[];\n description?: string;\n inputSchema?: JSONSchema7;\n endpoint?: string;\n serviceUrl?: string;\n roles?: string[];\n source?: string;\n metadata?: Record<string, string>;\n nodes?: Node[];\n}\n\nexport interface Node {\n id: string;\n type?: string;\n name?: string;\n uniqueId?: string;\n nodeDefinitionId?: string;\n}\n"],"names":[],"mappings":"AA2EO,MAAM,kBAAA,GAAqB,CAChC,MAAA,KAEA,OAAO,WAAW,QAAA,IAClB,CAAC,CAAC,MAAA,CAAO,UAAA,IACT,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,UAAU,CAAA,CAAE,MAAA;AAAA,EAC/B,CAAA,SAAA,KAAa,OAAO,SAAA,KAAc;AACpC,CAAA,CAAE,MAAA,KAAW;AAER,MAAM,gBAAA,GAAmB,CAC9B,MAAA,KAEA,CAAC,CAAC,MAAA,CAAO,UAAA,IACT,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,UAAU,CAAA,CAAE,MAAA;AAAA,EAC/B,CAAA,SAAA,KAAa,CAAC,kBAAA,CAAmB,SAAS;AAC5C,CAAA,CAAE,MAAA,KAAW;;;;"}
|
package/dist/workflow.cjs.js
CHANGED
package/dist/workflow.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.cjs.js","sources":["../src/workflow.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Specification } from '@
|
|
1
|
+
{"version":3,"file":"workflow.cjs.js","sources":["../src/workflow.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Specification } from '@serverlessworkflow/sdk-typescript';\nimport { dump } from 'js-yaml';\n\nimport { WorkflowDefinition, WorkflowFormat } from './types';\n\nexport function fromWorkflowSource(content: string): WorkflowDefinition {\n const parsed = Specification.Workflow.fromSource(content);\n const workflow = parsed.sourceModel ?? parsed;\n return removeProperty(workflow, 'normalize');\n}\n\nexport function toWorkflowString(\n definition: WorkflowDefinition,\n format: WorkflowFormat,\n): string {\n switch (format) {\n case 'json':\n return toWorkflowJson(definition);\n case 'yaml':\n return toWorkflowYaml(definition);\n default:\n throw new Error(`Unsupported format ${format}`);\n }\n}\n\nexport function toWorkflowJson(definition: WorkflowDefinition): string {\n return JSON.stringify(definition, null, 2);\n}\n\nexport function toWorkflowYaml(definition: WorkflowDefinition): string {\n return dump(definition);\n}\n\nexport function extractWorkflowFormatFromUri(uri: string): WorkflowFormat {\n const match = RegExp(/\\.sw\\.(json|yaml|yml)$/).exec(uri);\n if (match) {\n if (match[1] === 'yml' || match[1] === 'yaml') {\n return 'yaml';\n }\n if (match[1] === 'json') {\n return 'json';\n }\n }\n throw new Error(`Unsupported workflow format for uri ${uri}`);\n}\n\nfunction removeProperty<T>(obj: T, propToDelete: string): T {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => removeProperty(item, propToDelete)) as T;\n }\n\n const newObj: any = {};\n\n for (const key in obj) {\n if (key !== propToDelete) {\n newObj[key] = removeProperty(obj[key], propToDelete); // Recurse into nested objects\n }\n }\n\n return newObj;\n}\n\nexport function parseWorkflowVariables(variables?: object): object | undefined {\n if (variables === undefined) {\n return undefined;\n }\n\n if (typeof variables === 'string') {\n try {\n return JSON.parse(variables);\n } catch {\n throw new Error(\n `Error when parsing process instance variables: ${variables}`,\n );\n }\n }\n\n return variables;\n}\n\nexport function extractWorkflowFormat(source: string): WorkflowFormat {\n try {\n JSON.parse(source);\n return 'json';\n } catch (_) {\n return 'yaml';\n }\n}\n"],"names":["Specification","dump"],"mappings":";;;;;AAqBO,SAAS,mBAAmB,OAAA,EAAqC;AACtE,EAAA,MAAM,MAAA,GAASA,2BAAA,CAAc,QAAA,CAAS,UAAA,CAAW,OAAO,CAAA;AACxD,EAAA,MAAM,QAAA,GAAW,OAAO,WAAA,IAAe,MAAA;AACvC,EAAA,OAAO,cAAA,CAAe,UAAU,WAAW,CAAA;AAC7C;AAEO,SAAS,gBAAA,CACd,YACA,MAAA,EACQ;AACR,EAAA,QAAQ,MAAA;AAAQ,IACd,KAAK,MAAA;AACH,MAAA,OAAO,eAAe,UAAU,CAAA;AAAA,IAClC,KAAK,MAAA;AACH,MAAA,OAAO,eAAe,UAAU,CAAA;AAAA,IAClC;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,mBAAA,EAAsB,MAAM,CAAA,CAAE,CAAA;AAAA;AAEpD;AAEO,SAAS,eAAe,UAAA,EAAwC;AACrE,EAAA,OAAO,IAAA,CAAK,SAAA,CAAU,UAAA,EAAY,IAAA,EAAM,CAAC,CAAA;AAC3C;AAEO,SAAS,eAAe,UAAA,EAAwC;AACrE,EAAA,OAAOC,YAAK,UAAU,CAAA;AACxB;AAEO,S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M,SAAS,CAAA;AAAA,IAC7B,CAAA,CAAA,MAAQ;AACN,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,kDAAkD,SAAS,CAAA;AAAA,OAC7D;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,SAAA;AACT;AAEO,SAAS,sBAAsB,MAAA,EAAgC;AACpE,EAAA,IAAI;AACF,IAAA,IAAA,CAAK,MAAM,MAAM,CAAA;AACjB,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,CAAA,EAAG;AACV,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;;;;;;;"}
|
package/dist/workflow.esm.js
CHANGED
package/dist/workflow.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.esm.js","sources":["../src/workflow.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Specification } from '@
|
|
1
|
+
{"version":3,"file":"workflow.esm.js","sources":["../src/workflow.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Specification } from '@serverlessworkflow/sdk-typescript';\nimport { dump } from 'js-yaml';\n\nimport { WorkflowDefinition, WorkflowFormat } from './types';\n\nexport function fromWorkflowSource(content: string): WorkflowDefinition {\n const parsed = Specification.Workflow.fromSource(content);\n const workflow = parsed.sourceModel ?? parsed;\n return removeProperty(workflow, 'normalize');\n}\n\nexport function toWorkflowString(\n definition: WorkflowDefinition,\n format: WorkflowFormat,\n): string {\n switch (format) {\n case 'json':\n return toWorkflowJson(definition);\n case 'yaml':\n return toWorkflowYaml(definition);\n default:\n throw new Error(`Unsupported format ${format}`);\n }\n}\n\nexport function toWorkflowJson(definition: WorkflowDefinition): string {\n return JSON.stringify(definition, null, 2);\n}\n\nexport function toWorkflowYaml(definition: WorkflowDefinition): string {\n return dump(definition);\n}\n\nexport function extractWorkflowFormatFromUri(uri: string): WorkflowFormat {\n const match = RegExp(/\\.sw\\.(json|yaml|yml)$/).exec(uri);\n if (match) {\n if (match[1] === 'yml' || match[1] === 'yaml') {\n return 'yaml';\n }\n if (match[1] === 'json') {\n return 'json';\n }\n }\n throw new Error(`Unsupported workflow format for uri ${uri}`);\n}\n\nfunction removeProperty<T>(obj: T, propToDelete: string): T {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => removeProperty(item, propToDelete)) as T;\n }\n\n const newObj: any = {};\n\n for (const key in obj) {\n if (key !== propToDelete) {\n newObj[key] = removeProperty(obj[key], propToDelete); // Recurse into nested objects\n }\n }\n\n return newObj;\n}\n\nexport function parseWorkflowVariables(variables?: object): object | undefined {\n if (variables === undefined) {\n return undefined;\n }\n\n if (typeof variables === 'string') {\n try {\n return JSON.parse(variables);\n } catch {\n throw new Error(\n `Error when parsing process instance variables: ${variables}`,\n );\n }\n }\n\n return variables;\n}\n\nexport function extractWorkflowFormat(source: string): WorkflowFormat {\n try {\n JSON.parse(source);\n return 'json';\n } catch (_) {\n return 'yaml';\n }\n}\n"],"names":[],"mappings":";;;AAqBO,SAAS,mBAAmB,OAAA,EAAqC;AACtE,EAAA,MAAM,MAAA,GAAS,aAAA,CAAc,Q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,EACT;AAEA,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,GAAG,CAAA,EAAG;AACtB,IAAA,OAAO,IAAI,GAAA,CAAI,CAAA,IAAA,KAAQ,cAAA,CAAe,IAAA,EAAM,YAAY,CAAC,CAAA;AAAA,EAC3D;AAEA,EAAA,MAAM,SAAc,EAAC;AAErB,EAAA,KAAA,MAAW,OAAO,GAAA,EAAK;AACrB,IAAA,IAAI,QAAQ,YAAA,EAAc;AACxB,MAAA,MAAA,CAAO,GAAG,CAAA,GAAI,cAAA,CAAe,GAAA,CAAI,GAAG,GAAG,YAAY,CAAA;AAAA,IACrD;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT;AAEO,SAAS,uBAAuB,SAAA,EAAwC;AAC7E,EAAA,IAAI,cAAc,MAAA,EAAW;AAC3B,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,IAAI,OAAO,cAAc,QAAA,EAAU;AACjC,IAAA,IAAI;AACF,MAAA,OAAO,IAAA,CAAK,MAAM,SAAS,CAAA;AAAA,IAC7B,CAAA,CAAA,MAAQ;AACN,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,kDAAkD,SAAS,CAAA;AAAA,OAC7D;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,SAAA;AACT;AAEO,SAAS,sBAAsB,MAAA,EAAgC;AACpE,EAAA,IAAI;AACF,IAAA,IAAA,CAAK,MAAM,MAAM,CAAA;AACjB,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,CAAA,EAAG;AACV,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-orchestrator-common",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"backstage": {
|
|
14
14
|
"role": "common-library",
|
|
15
|
-
"supported-versions": "1.39.1",
|
|
16
15
|
"pluginId": "orchestrator",
|
|
17
16
|
"pluginPackages": [
|
|
18
17
|
"@red-hat-developer-hub/backstage-plugin-orchestrator",
|
|
@@ -28,8 +27,6 @@
|
|
|
28
27
|
},
|
|
29
28
|
"bugs": "https://github.com/redhat-developer/rhdh-plugins/issues",
|
|
30
29
|
"keywords": [
|
|
31
|
-
"support:tech-preview",
|
|
32
|
-
"lifecycle:active",
|
|
33
30
|
"backstage",
|
|
34
31
|
"plugin",
|
|
35
32
|
"orchestrator",
|
|
@@ -57,18 +54,18 @@
|
|
|
57
54
|
"openapi:check": "./scripts/openapi.sh check"
|
|
58
55
|
},
|
|
59
56
|
"dependencies": {
|
|
60
|
-
"@backstage/core-plugin-api": "^1.
|
|
61
|
-
"@backstage/plugin-permission-common": "^0.9.
|
|
62
|
-
"@backstage/types": "^1.2.
|
|
63
|
-
"@
|
|
57
|
+
"@backstage/core-plugin-api": "^1.12.0",
|
|
58
|
+
"@backstage/plugin-permission-common": "^0.9.3",
|
|
59
|
+
"@backstage/types": "^1.2.2",
|
|
60
|
+
"@serverlessworkflow/sdk-typescript": "^0.8.4",
|
|
64
61
|
"axios": "^1.11.0",
|
|
65
62
|
"js-yaml": "^4.1.0"
|
|
66
63
|
},
|
|
67
64
|
"devDependencies": {
|
|
68
|
-
"@backstage/cli": "^0.34.
|
|
69
|
-
"@openapitools/openapi-generator-cli": "2.
|
|
65
|
+
"@backstage/cli": "^0.34.5",
|
|
66
|
+
"@openapitools/openapi-generator-cli": "2.25.0",
|
|
70
67
|
"@types/json-schema": "7.0.15",
|
|
71
|
-
"js-yaml-cli": "0.6.0"
|
|
68
|
+
"js-yaml-cli": "^0.6.0"
|
|
72
69
|
},
|
|
73
70
|
"maintainers": [
|
|
74
71
|
"@mlibra",
|