@red-hat-developer-hub/backstage-plugin-orchestrator-common 3.2.0 → 3.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8524940: Fix TypeScript compilation errors in orchestrator plugins
8
+ - d91ef65: Updated dependency `@types/express` to `4.17.25`.
9
+ Updated dependency `@openapitools/openapi-generator-cli` to `2.25.2`.
10
+
11
+ ## 3.3.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 782c33f: Removal and updating outdated and unmaintained dependencies
16
+ - 34a36cb: Update @serverlessworkflow/sdk-typescript to the correct module name and latest version
17
+ - 29dfed0: Backstage version bump to v1.45.2
18
+
19
+ ### Patch Changes
20
+
21
+ - 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
22
+ - 40b80fe: Change "lifecycle" to active in catalog-info.yaml
23
+ - f5f4973: Updated dependency `@openapitools/openapi-generator-cli` to `2.25.0`.
24
+ Updated dependency `@red-hat-developer-hub/backstage-plugin-theme` to `^0.10.0`.
25
+ - 40b80fe: Remove "support", "lifecycle" keywords and "supported-versions" in package.json. Change "lifecycle" to active in catalog.yaml
26
+
3
27
  ## 3.2.0
4
28
 
5
29
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JsonObject, JsonValue } from '@backstage/types';
2
- import { Specification } from '@severlessworkflow/sdk-typescript';
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;
@@ -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 '@severlessworkflow/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'\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;;;;;"}
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;;;;;"}
@@ -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 '@severlessworkflow/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'\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;;;;"}
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;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var sdkTypescript = require('@severlessworkflow/sdk-typescript');
3
+ var sdkTypescript = require('@serverlessworkflow/sdk-typescript');
4
4
  var jsYaml = require('js-yaml');
5
5
 
6
6
  function fromWorkflowSource(content) {
@@ -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 '@severlessworkflow/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,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,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;;;;;;;;;;"}
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;AA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ErB,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;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { Specification } from '@severlessworkflow/sdk-typescript';
1
+ import { Specification } from '@serverlessworkflow/sdk-typescript';
2
2
  import { dump } from 'js-yaml';
3
3
 
4
4
  function fromWorkflowSource(content) {
@@ -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 '@severlessworkflow/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);\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,CAAkB,KAAQ,YAAA,EAAyB;AAC1D,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,IAAA,EAAM;AAC3C,IAAA,OAAO,GAAA;AAAA,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;;;;"}
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,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,OAAO,KAAK,UAAU,CAAA;AACxB;AAEO,SAAS,6BAA6B,GAAA,EAA6B;AACxE,EAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,wBAAwB,CAAA,CAAE,KAAK,GAAG,CAAA;AACvD,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,MAAM,CAAC,CAAA,KAAM,SAAS,KAAA,CAAM,CAAC,MAAM,MAAA,EAAQ;AAC7C,MAAA,OAAO,MAAA;AAAA,IACT;AACA,IAAA,IAAI,KAAA,CAAM,C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AAA,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.2.0",
3
+ "version": "3.3.1",
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,19 @@
57
54
  "openapi:check": "./scripts/openapi.sh check"
58
55
  },
59
56
  "dependencies": {
60
- "@backstage/core-plugin-api": "^1.11.1",
61
- "@backstage/plugin-permission-common": "^0.9.2",
57
+ "@backstage/core-plugin-api": "^1.12.0",
58
+ "@backstage/plugin-permission-common": "^0.9.3",
62
59
  "@backstage/types": "^1.2.2",
63
- "@severlessworkflow/sdk-typescript": "^3.0.3",
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.4",
69
- "@openapitools/openapi-generator-cli": "2.22.0",
65
+ "@backstage/cli": "^0.34.5",
66
+ "@openapitools/openapi-generator-cli": "2.25.2",
67
+ "@types/js-yaml": "^4.0.0",
70
68
  "@types/json-schema": "7.0.15",
71
- "js-yaml-cli": "0.6.0"
69
+ "js-yaml-cli": "^0.6.0"
72
70
  },
73
71
  "maintainers": [
74
72
  "@mlibra",