@backstage/plugin-scaffolder-backend 2.2.0-next.1 → 2.2.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 +34 -0
- package/dist/ScaffolderPlugin.cjs.js.map +1 -1
- package/dist/lib/templating/SecureTemplater.cjs.js.map +1 -1
- package/dist/lib/templating/filters/createDefaultFilters.cjs.js.map +1 -1
- package/dist/lib/templating/filters/parseEntityRef/examples.cjs.js.map +1 -1
- package/dist/lib/templating/filters/parseEntityRef/filter.cjs.js.map +1 -1
- package/dist/lib/templating/filters/parseRepoUrl/examples.cjs.js.map +1 -1
- package/dist/lib/templating/filters/parseRepoUrl/filter.cjs.js.map +1 -1
- package/dist/lib/templating/filters/pick/examples.cjs.js.map +1 -1
- package/dist/lib/templating/filters/pick/filter.cjs.js.map +1 -1
- package/dist/lib/templating/filters/projectSlug/examples.cjs.js.map +1 -1
- package/dist/lib/templating/filters/projectSlug/filter.cjs.js.map +1 -1
- package/dist/lib/templating/helpers.cjs.js.map +1 -1
- package/dist/scaffolder/actions/TemplateActionRegistry.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/fetch.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/fetch.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/register.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/register.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/write.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/catalog/write.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/log.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/log.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/wait.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/debug/wait.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plain.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plain.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plainFile.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/plainFile.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/template.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/template.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateActionHandler.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateFile.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateFile.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/fetch/templateFileActionHandler.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/delete.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/delete.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/read.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/read.examples.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/rename.cjs.js.map +1 -1
- package/dist/scaffolder/actions/builtin/filesystem/rename.examples.cjs.js.map +1 -1
- package/dist/scaffolder/dryrun/DecoratedActionsRegistry.cjs.js.map +1 -1
- package/dist/scaffolder/dryrun/createDryRunner.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/DatabaseTaskStore.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/DatabaseWorkspaceProvider.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/NunjucksWorkflowRunner.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/StorageTaskBroker.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/TaskWorker.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/WorkspaceService.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/dbUtil.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/helper.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/logger.cjs.js +5 -6
- package/dist/scaffolder/tasks/logger.cjs.js.map +1 -1
- package/dist/scaffolder/tasks/taskRecoveryHelper.cjs.js.map +1 -1
- package/dist/schema/openapi/generated/router.cjs.js.map +1 -1
- package/dist/service/alpha.cjs.js.map +1 -1
- package/dist/service/helpers.cjs.js.map +1 -1
- package/dist/service/permissions.cjs.js.map +1 -1
- package/dist/service/router.cjs.js +8 -1
- package/dist/service/router.cjs.js.map +1 -1
- package/dist/service/rules.cjs.js.map +1 -1
- package/dist/util/checkPermissions.cjs.js.map +1 -1
- package/dist/util/loggerToWinstonLogger.cjs.js.map +1 -1
- package/dist/util/metrics.cjs.js.map +1 -1
- package/dist/util/templating.cjs.js.map +1 -1
- package/package.json +32 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceService.cjs.js","sources":["../../../src/scaffolder/tasks/WorkspaceService.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 { Config } from '@backstage/config';\nimport { CurrentClaimedTask } from './StorageTaskBroker';\nimport { WorkspaceProvider } from '@backstage/plugin-scaffolder-node/alpha';\nimport { DatabaseWorkspaceProvider } from './DatabaseWorkspaceProvider';\nimport { TaskStore } from './types';\nimport fs from 'fs-extra';\n\nexport interface WorkspaceService {\n serializeWorkspace(options: { path: string }): Promise<void>;\n\n cleanWorkspace(): Promise<void>;\n\n rehydrateWorkspace(options: {\n taskId: string;\n targetPath: string;\n }): Promise<void>;\n}\n\nexport class DefaultWorkspaceService implements WorkspaceService {\n static create(\n task: CurrentClaimedTask,\n storage: TaskStore,\n additionalWorkspaceProviders?: Record<string, WorkspaceProvider>,\n config?: Config,\n ) {\n const workspaceProviderName =\n config?.getOptionalString(\n 'scaffolder.EXPERIMENTAL_workspaceSerializationProvider',\n ) ?? 'database';\n const workspaceProvider =\n additionalWorkspaceProviders?.[workspaceProviderName] ??\n DatabaseWorkspaceProvider.create(storage);\n return new DefaultWorkspaceService(task, workspaceProvider, config);\n }\n\n private constructor(\n private readonly task: CurrentClaimedTask,\n private readonly workspaceProvider: WorkspaceProvider,\n private readonly config?: Config,\n ) {}\n\n public async serializeWorkspace(options: { path: string }): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await this.workspaceProvider.serializeWorkspace({\n path: options.path,\n taskId: this.task.taskId,\n });\n }\n }\n\n public async cleanWorkspace(): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await this.workspaceProvider.cleanWorkspace({ taskId: this.task.taskId });\n }\n }\n\n public async rehydrateWorkspace(options: {\n taskId: string;\n targetPath: string;\n }): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await fs.mkdirp(options.targetPath);\n await this.workspaceProvider.rehydrateWorkspace(options);\n }\n }\n\n private isWorkspaceSerializationEnabled(): boolean {\n return (\n this.config?.getOptionalBoolean(\n 'scaffolder.EXPERIMENTAL_workspaceSerialization',\n ) ?? false\n );\n }\n}\n"],"names":["DatabaseWorkspaceProvider","fs"],"mappings":";;;;;;;;;AAkCO,MAAM,
|
|
1
|
+
{"version":3,"file":"WorkspaceService.cjs.js","sources":["../../../src/scaffolder/tasks/WorkspaceService.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 { Config } from '@backstage/config';\nimport { CurrentClaimedTask } from './StorageTaskBroker';\nimport { WorkspaceProvider } from '@backstage/plugin-scaffolder-node/alpha';\nimport { DatabaseWorkspaceProvider } from './DatabaseWorkspaceProvider';\nimport { TaskStore } from './types';\nimport fs from 'fs-extra';\n\nexport interface WorkspaceService {\n serializeWorkspace(options: { path: string }): Promise<void>;\n\n cleanWorkspace(): Promise<void>;\n\n rehydrateWorkspace(options: {\n taskId: string;\n targetPath: string;\n }): Promise<void>;\n}\n\nexport class DefaultWorkspaceService implements WorkspaceService {\n static create(\n task: CurrentClaimedTask,\n storage: TaskStore,\n additionalWorkspaceProviders?: Record<string, WorkspaceProvider>,\n config?: Config,\n ) {\n const workspaceProviderName =\n config?.getOptionalString(\n 'scaffolder.EXPERIMENTAL_workspaceSerializationProvider',\n ) ?? 'database';\n const workspaceProvider =\n additionalWorkspaceProviders?.[workspaceProviderName] ??\n DatabaseWorkspaceProvider.create(storage);\n return new DefaultWorkspaceService(task, workspaceProvider, config);\n }\n\n private constructor(\n private readonly task: CurrentClaimedTask,\n private readonly workspaceProvider: WorkspaceProvider,\n private readonly config?: Config,\n ) {}\n\n public async serializeWorkspace(options: { path: string }): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await this.workspaceProvider.serializeWorkspace({\n path: options.path,\n taskId: this.task.taskId,\n });\n }\n }\n\n public async cleanWorkspace(): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await this.workspaceProvider.cleanWorkspace({ taskId: this.task.taskId });\n }\n }\n\n public async rehydrateWorkspace(options: {\n taskId: string;\n targetPath: string;\n }): Promise<void> {\n if (this.isWorkspaceSerializationEnabled()) {\n await fs.mkdirp(options.targetPath);\n await this.workspaceProvider.rehydrateWorkspace(options);\n }\n }\n\n private isWorkspaceSerializationEnabled(): boolean {\n return (\n this.config?.getOptionalBoolean(\n 'scaffolder.EXPERIMENTA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AA,CAAQ,UAAU,CAAA;AAClC,MAAA,MAAM,IAAA,CAAK,iBAAA,CAAkB,kBAAA,CAAmB,OAAO,CAAA;AAAA,IACzD;AAAA,EACF;AAAA,EAEQ,+BAAA,GAA2C;AACjD,IAAA,OACE,KAAK,MAAA,EAAQ,kBAAA;AAAA,MACX;AAAA,KACF,IAAK,KAAA;AAAA,EAET;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dbUtil.cjs.js","sources":["../../../src/scaffolder/tasks/dbUtil.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { Knex } from 'knex';\n\nexport const intervalFromNowTill = (timeoutS: number, knex: Knex) => {\n let heartbeatInterval = knex.raw(`? - interval '${timeoutS} seconds'`, [\n knex.fn.now(),\n ]);\n if (knex.client.config.client.includes('mysql')) {\n heartbeatInterval = knex.raw(\n `date_sub(now(), interval ${timeoutS} second)`,\n );\n } else if (knex.client.config.client.includes('sqlite3')) {\n heartbeatInterval = knex.raw(`datetime('now', ?)`, [\n `-${timeoutS} seconds`,\n ]);\n }\n return heartbeatInterval;\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dbUtil.cjs.js","sources":["../../../src/scaffolder/tasks/dbUtil.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { Knex } from 'knex';\n\nexport const intervalFromNowTill = (timeoutS: number, knex: Knex) => {\n let heartbeatInterval = knex.raw(`? - interval '${timeoutS} seconds'`, [\n knex.fn.now(),\n ]);\n if (knex.client.config.client.includes('mysql')) {\n heartbeatInterval = knex.raw(\n `date_sub(now(), interval ${timeoutS} second)`,\n );\n } else if (knex.client.config.client.includes('sqlite3')) {\n heartbeatInterval = knex.raw(`datetime('now', ?)`, [\n `-${timeoutS} seconds`,\n ]);\n }\n return heartbeatInterval;\n};\n"],"names":[],"mappings":";;AAiBO,MAAM,mBAAA,GAAsB,CAAC,QAAA,EAAkB,IAAA,KAAe;AACnE,EAAA,IAAI,iBAAA,GAAoB,IAAA,CAAK,GAAA,CAAI,CAAA,cAAA,EAAiB,QAAQ,CAAA,SAAA,CAAA,EAAa;AAAA,IACrE,IAAA,CAAK,GAAG,GAAA;AAAI,GACb,CAAA;AACD,EAAA,IAAI,KAAK,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,QAAA,CAAS,OAAO,CAAA,EAAG;AAC/C,IAAA,iBAAA,GAAoB,IAAA,CAAK,GAAA;AAAA,MACvB,4BAA4B,QAAQ,CAAA,QAAA;AAAA,KACtC;AAAA,EACF,WAAW,IAAA,CAAK,MAAA,CAAO,OAAO,MAAA,CAAO,QAAA,CAAS,SAAS,CAAA,EAAG;AACxD,IAAA,iBAAA,GAAoB,IAAA,CAAK,IAAI,CAAA,kBAAA,CAAA,EAAsB;AAAA,MACjD,IAAI,QAAQ,CAAA,QAAA;AAAA,KACb,CAAA;AAAA,EACH;AACA,EAAA,OAAO,iBAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.cjs.js","sources":["../../../src/scaffolder/tasks/helper.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\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 { Config, readDurationFromConfig } from '@backstage/config';\nimport { HumanDuration } from '@backstage/types';\n\nimport { isArray } from 'lodash';\nimport { Schema } from 'jsonschema';\n\n/**\n * Returns true if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or\n * `[]`. This behavior is based on the behavior of handlebars, see\n * https://handlebarsjs.com/guide/builtin-helpers.html#if\n */\nexport function isTruthy(value: any): boolean {\n return isArray(value) ? value.length > 0 : !!value;\n}\n\nexport function generateExampleOutput(schema: Schema): unknown {\n const { examples } = schema as { examples?: unknown };\n if (examples && Array.isArray(examples)) {\n return examples[0];\n }\n if (schema.type === 'object') {\n return Object.fromEntries(\n Object.entries(schema.properties ?? {}).map(([key, value]) => [\n key,\n generateExampleOutput(value as Schema),\n ]),\n );\n } else if (schema.type === 'array') {\n const [firstSchema] = [schema.items]?.flat();\n if (firstSchema) {\n return [generateExampleOutput(firstSchema as Schema)];\n }\n return [];\n } else if (schema.type === 'string') {\n return '<example>';\n } else if (schema.type === 'number') {\n return 0;\n } else if (schema.type === 'boolean') {\n return false;\n }\n return '<unknown>';\n}\n\nexport const readDuration = (\n config: Config | undefined,\n key: string,\n defaultValue: HumanDuration,\n) => {\n if (config?.has(key)) {\n return readDurationFromConfig(config, { key });\n }\n return defaultValue;\n};\n"],"names":["isArray","config","readDurationFromConfig"],"mappings":";;;;;AA2BO,SAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"helper.cjs.js","sources":["../../../src/scaffolder/tasks/helper.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\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 { Config, readDurationFromConfig } from '@backstage/config';\nimport { HumanDuration } from '@backstage/types';\n\nimport { isArray } from 'lodash';\nimport { Schema } from 'jsonschema';\n\n/**\n * Returns true if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or\n * `[]`. This behavior is based on the behavior of handlebars, see\n * https://handlebarsjs.com/guide/builtin-helpers.html#if\n */\nexport function isTruthy(value: any): boolean {\n return isArray(value) ? value.length > 0 : !!value;\n}\n\nexport function generateExampleOutput(schema: Schema): unknown {\n const { examples } = schema as { examples?: unknown };\n if (examples && Array.isArray(examples)) {\n return examples[0];\n }\n if (schema.type === 'object') {\n return Object.fromEntries(\n Object.entries(schema.properties ?? {}).map(([key, value]) => [\n key,\n generateExampleOutput(value as Schema),\n ]),\n );\n } else if (schema.type === 'array') {\n const [firstSchema] = [schema.items]?.flat();\n if (firstSchema) {\n return [generateExampleOutput(firstSchema as Schema)];\n }\n return [];\n } else if (schema.type === 'string') {\n return '<example>';\n } else if (schema.type === 'number') {\n return 0;\n } else if (schema.type === 'boolean') {\n return false;\n }\n return '<unknown>';\n}\n\nexport const readDuration = (\n config: Config | undefined,\n key: string,\n defaultValue: HumanDuration,\n) => {\n if (config?.has(key)) {\n return readDurationFromConfig(config, { key });\n }\n return defaultValue;\n};\n"],"names":["isArray","config","readDurationFromConfig"],"mappings":";;;;;AA2BO,SAAS,SAAS,KAAA,EAAqB;AAC5C,EAAA,OAAOA,eAAQ,KAAK,CAAA,GAAI,MAAM,MAAA,GAAS,CAAA,GAAI,CAAC,CAAC,KAAA;AAC/C;AAEO,SAAS,sBAAsB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AK,CAAA;AAAA,EAC/C;AACA,EAAA,OAAO,YAAA;AACT;;;;;;"}
|
|
@@ -25,22 +25,21 @@ class BackstageLoggerTransport extends Transport__default.default {
|
|
|
25
25
|
}
|
|
26
26
|
const message = info[tripleBeam.MESSAGE];
|
|
27
27
|
const level = info[tripleBeam.LEVEL];
|
|
28
|
-
const splat = info[tripleBeam.SPLAT];
|
|
29
28
|
switch (level) {
|
|
30
29
|
case "error":
|
|
31
|
-
this.backstageLogger.error(String(message)
|
|
30
|
+
this.backstageLogger.error(String(message));
|
|
32
31
|
break;
|
|
33
32
|
case "warn":
|
|
34
|
-
this.backstageLogger.warn(String(message)
|
|
33
|
+
this.backstageLogger.warn(String(message));
|
|
35
34
|
break;
|
|
36
35
|
case "info":
|
|
37
|
-
this.backstageLogger.info(String(message)
|
|
36
|
+
this.backstageLogger.info(String(message));
|
|
38
37
|
break;
|
|
39
38
|
case "debug":
|
|
40
|
-
this.backstageLogger.debug(String(message)
|
|
39
|
+
this.backstageLogger.debug(String(message));
|
|
41
40
|
break;
|
|
42
41
|
default:
|
|
43
|
-
this.backstageLogger.info(String(message)
|
|
42
|
+
this.backstageLogger.info(String(message));
|
|
44
43
|
}
|
|
45
44
|
this.taskContext.emitLog(message, { stepId: this.stepId });
|
|
46
45
|
callback();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.cjs.js","sources":["../../../src/scaffolder/tasks/logger.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport {\n LoggerService,\n RootLoggerService,\n} from '@backstage/backend-plugin-api';\nimport { JsonObject } from '@backstage/types';\nimport { Format, TransformableInfo } from 'logform';\nimport Transport, { TransportStreamOptions } from 'winston-transport';\nimport { Logger, format, createLogger, transports } from 'winston';\nimport { LEVEL, MESSAGE, SPLAT } from 'triple-beam';\nimport { TaskContext } from '@backstage/plugin-scaffolder-node';\nimport _ from 'lodash';\n\n/**\n * Escapes a given string to be used inside a RegExp.\n *\n * Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n */\nconst escapeRegExp = (text: string) => {\n return text.replace(/[.*+?^${}(\\)|[\\]\\\\]/g, '\\\\$&');\n};\n\ninterface WinstonLoggerOptions {\n meta?: JsonObject;\n level: string;\n format: Format;\n transports: Transport[];\n}\n\n// This is a workaround for being able to preserve the log format of the root logger.\n// Will revisit all of this implementation once we can break the router to use only `LoggerService`.\nexport class BackstageLoggerTransport extends Transport {\n constructor(\n private readonly backstageLogger: LoggerService,\n private readonly taskContext: TaskContext,\n private readonly stepId: string,\n opts?: TransportStreamOptions,\n ) {\n super(opts);\n }\n\n log(info: TransformableInfo, callback: VoidFunction) {\n if (typeof info !== 'object' || info === null) {\n callback();\n return;\n }\n\n const message = info[MESSAGE];\n const level = info[LEVEL];\n const splat = info[SPLAT];\n\n switch (level) {\n case 'error':\n this.backstageLogger.error(String(message), ...splat);\n break;\n case 'warn':\n this.backstageLogger.warn(String(message), ...splat);\n break;\n case 'info':\n this.backstageLogger.info(String(message), ...splat);\n break;\n case 'debug':\n this.backstageLogger.debug(String(message), ...splat);\n break;\n default:\n this.backstageLogger.info(String(message), ...splat);\n }\n\n this.taskContext.emitLog(message, { stepId: this.stepId });\n callback();\n }\n}\n\nexport class WinstonLogger implements RootLoggerService {\n #winston: Logger;\n #addRedactions?: (redactions: Iterable<string>) => void;\n\n /**\n * Creates a {@link WinstonLogger} instance.\n */\n static create(options: WinstonLoggerOptions): WinstonLogger {\n const redacter = WinstonLogger.redacter();\n\n let logger = createLogger({\n level: options.level,\n format: format.combine(options.format, redacter.format),\n transports: options.transports ?? new transports.Console(),\n });\n\n if (options.meta) {\n logger = logger.child(options.meta);\n }\n\n return new WinstonLogger(logger, redacter.add);\n }\n\n /**\n * Creates a winston log formatter for redacting secrets.\n */\n static redacter(): {\n format: Format;\n add: (redactions: Iterable<string>) => void;\n } {\n const redactionSet = new Set<string>();\n\n let redactionPattern: RegExp | undefined = undefined;\n\n return {\n format: format((obj: TransformableInfo) => {\n if (!redactionPattern || !obj) {\n return obj;\n }\n\n obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***');\n\n return obj;\n })(),\n add(newRedactions) {\n let added = 0;\n for (const redactionToTrim of newRedactions) {\n // Skip null or undefined values\n if (redactionToTrim === null || redactionToTrim === undefined) {\n continue;\n }\n // Trimming the string ensures that we don't accdentally get extra\n // newlines or other whitespace interfering with the redaction; this\n // can happen for example when using string literals in yaml\n const redaction = redactionToTrim.trim();\n // Exclude secrets that are empty or just one character in length. These\n // typically mean that you are running local dev or tests, or using the\n // --lax flag which sets things to just 'x'.\n if (redaction.length <= 1) {\n continue;\n }\n if (!redactionSet.has(redaction)) {\n redactionSet.add(redaction);\n added += 1;\n }\n }\n if (added > 0) {\n const redactions = Array.from(redactionSet)\n .map(r => escapeRegExp(r))\n .join('|');\n redactionPattern = new RegExp(`(${redactions})`, 'g');\n }\n },\n };\n }\n\n /**\n * Creates a pretty printed winston log formatter.\n */\n static colorFormat(): Format {\n const colorizer = format.colorize();\n\n return format.combine(\n format.timestamp(),\n format.colorize({\n colors: {\n timestamp: 'dim',\n prefix: 'blue',\n field: 'cyan',\n debug: 'grey',\n },\n }),\n format.printf((info: TransformableInfo) => {\n const { timestamp, plugin, service } = info;\n const message = info[MESSAGE];\n const level = info[LEVEL];\n const fields = info[SPLAT];\n const prefix = plugin || service;\n const timestampColor = colorizer.colorize('timestamp', timestamp);\n const prefixColor = colorizer.colorize('prefix', prefix);\n\n const extraFields = Object.entries(fields)\n .map(\n ([key, value]) =>\n `${colorizer.colorize('field', `${key}`)}=${value}`,\n )\n .join(' ');\n\n return `${timestampColor} ${prefixColor} ${level} ${message} ${extraFields}`;\n }),\n );\n }\n\n private constructor(\n winston: Logger,\n addRedactions?: (redactions: Iterable<string>) => void,\n ) {\n this.#winston = winston;\n this.#addRedactions = addRedactions;\n }\n\n error(message: string, meta?: JsonObject): void {\n this.#winston.error(message, meta);\n }\n\n warn(message: string, meta?: JsonObject): void {\n this.#winston.warn(message, meta);\n }\n\n info(message: string, meta?: JsonObject): void {\n this.#winston.info(message, meta);\n }\n\n debug(message: string, meta?: JsonObject): void {\n this.#winston.debug(message, meta);\n }\n\n child(meta: JsonObject): LoggerService {\n return new WinstonLogger(this.#winston.child(meta));\n }\n\n addRedactions(redactions: Iterable<string>) {\n this.#addRedactions?.(redactions);\n }\n}\n"],"names":["Transport","MESSAGE","LEVEL","SPLAT","createLogger","format","transports"],"mappings":";;;;;;;;;;AAgCA,MAAM,YAAA,GAAe,CAAC,IAAiB,KAAA;AACrC,EAAO,OAAA,IAAA,CAAK,OAAQ,CAAA,sBAAA,EAAwB,MAAM,CAAA;AACpD,CAAA;AAWO,MAAM,iCAAiCA,0BAAU,CAAA;AAAA,EACtD,WACmB,CAAA,eAAA,EACA,WACA,EAAA,MAAA,EACjB,IACA,EAAA;AACA,IAAA,KAAA,CAAM,IAAI,CAAA;AALO,IAAA,IAAA,CAAA,eAAA,GAAA,eAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AACA,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA;AAInB,EAEA,GAAA,CAAI,MAAyB,QAAwB,EAAA;AACnD,IAAA,IAAI,OAAO,IAAA,KAAS,QAAY,IAAA,IAAA,KAAS,IAAM,EAAA;AAC7C,MAAS,QAAA,EAAA;AACT,MAAA;AAAA;AAGF,IAAM,MAAA,OAAA,GAAU,KAAKC,kBAAO,CAAA;AAC5B,IAAM,MAAA,KAAA,GAAQ,KAAKC,gBAAK,CAAA;AACxB,IAAM,M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,GAAG,CAAE,CAAA,CAAC,IAAI,KAAK,CAAA;AAAA,SACrD,CACC,KAAK,GAAG,CAAA;AAEX,QAAO,OAAA,CAAA,EAAG,cAAc,CAAI,CAAA,EAAA,WAAW,IAAI,KAAK,CAAA,CAAA,EAAI,OAAO,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,OAC3E;AAAA,KACH;AAAA;AACF,EAEQ,WAAA,CACN,SACA,aACA,EAAA;AACA,IAAA,IAAA,CAAK,QAAW,GAAA,OAAA;AAChB,IAAA,IAAA,CAAK,cAAiB,GAAA,aAAA;AAAA;AACxB,EAEA,KAAA,CAAM,SAAiB,IAAyB,EAAA;AAC9C,IAAK,IAAA,CAAA,QAAA,CAAS,KAAM,CAAA,OAAA,EAAS,IAAI,CAAA;AAAA;AACnC,EAEA,IAAA,CAAK,SAAiB,IAAyB,EAAA;AAC7C,IAAK,IAAA,CAAA,QAAA,CAAS,IAAK,CAAA,OAAA,EAAS,IAAI,CAAA;AAAA;AAClC,EAEA,IAAA,CAAK,SAAiB,IAAyB,EAAA;AAC7C,IAAK,IAAA,CAAA,QAAA,CAAS,IAAK,CAAA,OAAA,EAAS,IAAI,CAAA;AAAA;AAClC,EAEA,KAAA,CAAM,SAAiB,IAAyB,EAAA;AAC9C,IAAK,IAAA,CAAA,QAAA,CAAS,KAAM,CAAA,OAAA,EAAS,IAAI,CAAA;AAAA;AACnC,EAEA,MAAM,IAAiC,EAAA;AACrC,IAAA,OAAO,IAAI,aAAc,CAAA,IAAA,CAAK,QAAS,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA;AAAA;AACpD,EAEA,cAAc,UAA8B,EAAA;AAC1C,IAAA,IAAA,CAAK,iBAAiB,UAAU,CAAA;AAAA;AAEpC;;;;;"}
|
|
1
|
+
{"version":3,"file":"logger.cjs.js","sources":["../../../src/scaffolder/tasks/logger.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport {\n LoggerService,\n RootLoggerService,\n} from '@backstage/backend-plugin-api';\nimport { JsonObject } from '@backstage/types';\nimport { Format, TransformableInfo } from 'logform';\nimport Transport, { TransportStreamOptions } from 'winston-transport';\nimport { Logger, format, createLogger, transports } from 'winston';\nimport { LEVEL, MESSAGE, SPLAT } from 'triple-beam';\nimport { TaskContext } from '@backstage/plugin-scaffolder-node';\nimport _ from 'lodash';\n\n/**\n * Escapes a given string to be used inside a RegExp.\n *\n * Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n */\nconst escapeRegExp = (text: string) => {\n return text.replace(/[.*+?^${}(\\)|[\\]\\\\]/g, '\\\\$&');\n};\n\ninterface WinstonLoggerOptions {\n meta?: JsonObject;\n level: string;\n format: Format;\n transports: Transport[];\n}\n\n// This is a workaround for being able to preserve the log format of the root logger.\n// Will revisit all of this implementation once we can break the router to use only `LoggerService`.\nexport class BackstageLoggerTransport extends Transport {\n constructor(\n private readonly backstageLogger: LoggerService,\n private readonly taskContext: TaskContext,\n private readonly stepId: string,\n opts?: TransportStreamOptions,\n ) {\n super(opts);\n }\n\n log(info: TransformableInfo, callback: VoidFunction) {\n if (typeof info !== 'object' || info === null) {\n callback();\n return;\n }\n\n const message = info[MESSAGE];\n const level = info[LEVEL];\n\n switch (level) {\n case 'error':\n this.backstageLogger.error(String(message));\n break;\n case 'warn':\n this.backstageLogger.warn(String(message));\n break;\n case 'info':\n this.backstageLogger.info(String(message));\n break;\n case 'debug':\n this.backstageLogger.debug(String(message));\n break;\n default:\n this.backstageLogger.info(String(message));\n }\n\n this.taskContext.emitLog(message, { stepId: this.stepId });\n callback();\n }\n}\n\nexport class WinstonLogger implements RootLoggerService {\n #winston: Logger;\n #addRedactions?: (redactions: Iterable<string>) => void;\n\n /**\n * Creates a {@link WinstonLogger} instance.\n */\n static create(options: WinstonLoggerOptions): WinstonLogger {\n const redacter = WinstonLogger.redacter();\n\n let logger = createLogger({\n level: options.level,\n format: format.combine(options.format, redacter.format),\n transports: options.transports ?? new transports.Console(),\n });\n\n if (options.meta) {\n logger = logger.child(options.meta);\n }\n\n return new WinstonLogger(logger, redacter.add);\n }\n\n /**\n * Creates a winston log formatter for redacting secrets.\n */\n static redacter(): {\n format: Format;\n add: (redactions: Iterable<string>) => void;\n } {\n const redactionSet = new Set<string>();\n\n let redactionPattern: RegExp | undefined = undefined;\n\n return {\n format: format((obj: TransformableInfo) => {\n if (!redactionPattern || !obj) {\n return obj;\n }\n\n obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***');\n\n return obj;\n })(),\n add(newRedactions) {\n let added = 0;\n for (const redactionToTrim of newRedactions) {\n // Skip null or undefined values\n if (redactionToTrim === null || redactionToTrim === undefined) {\n continue;\n }\n // Trimming the string ensures that we don't accdentally get extra\n // newlines or other whitespace interfering with the redaction; this\n // can happen for example when using string literals in yaml\n const redaction = redactionToTrim.trim();\n // Exclude secrets that are empty or just one character in length. These\n // typically mean that you are running local dev or tests, or using the\n // --lax flag which sets things to just 'x'.\n if (redaction.length <= 1) {\n continue;\n }\n if (!redactionSet.has(redaction)) {\n redactionSet.add(redaction);\n added += 1;\n }\n }\n if (added > 0) {\n const redactions = Array.from(redactionSet)\n .map(r => escapeRegExp(r))\n .join('|');\n redactionPattern = new RegExp(`(${redactions})`, 'g');\n }\n },\n };\n }\n\n /**\n * Creates a pretty printed winston log formatter.\n */\n static colorFormat(): Format {\n const colorizer = format.colorize();\n\n return format.combine(\n format.timestamp(),\n format.colorize({\n colors: {\n timestamp: 'dim',\n prefix: 'blue',\n field: 'cyan',\n debug: 'grey',\n },\n }),\n format.printf((info: TransformableInfo) => {\n const { timestamp, plugin, service } = info;\n const message = info[MESSAGE];\n const level = info[LEVEL];\n const fields = info[SPLAT];\n const prefix = plugin || service;\n const timestampColor = colorizer.colorize('timestamp', timestamp);\n const prefixColor = colorizer.colorize('prefix', prefix);\n\n const extraFields = Object.entries(fields)\n .map(\n ([key, value]) =>\n `${colorizer.colorize('field', `${key}`)}=${value}`,\n )\n .join(' ');\n\n return `${timestampColor} ${prefixColor} ${level} ${message} ${extraFields}`;\n }),\n );\n }\n\n private constructor(\n winston: Logger,\n addRedactions?: (redactions: Iterable<string>) => void,\n ) {\n this.#winston = winston;\n this.#addRedactions = addRedactions;\n }\n\n error(message: string, meta?: JsonObject): void {\n this.#winston.error(message, meta);\n }\n\n warn(message: string, meta?: JsonObject): void {\n this.#winston.warn(message, meta);\n }\n\n info(message: string, meta?: JsonObject): void {\n this.#winston.info(message, meta);\n }\n\n debug(message: string, meta?: JsonObject): void {\n this.#winston.debug(message, meta);\n }\n\n child(meta: JsonObject): LoggerService {\n return new WinstonLogger(this.#winston.child(meta));\n }\n\n addRedactions(redactions: Iterable<string>) {\n this.#addRedactions?.(redactions);\n }\n}\n"],"names":["Transport","MESSAGE","LEVEL","createLogger","format","transports","SPLAT"],"mappings":";;;;;;;;;;AAgCA,MAAM,YAAA,GAAe,CAAC,IAAA,KAAiB;AACrC,EAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,sBAAA,EAAwB,MAAM,CAAA;AACpD,CAAA;AAWO,MAAM,iCAAiCA,0BAAA,CAAU;AAAA,EACtD,WAAA,CACmB,eAAA,EACA,WAAA,EACA,MAAA,EACjB,IAAA,EACA;AACA,IAAA,KAAA,CAAM,IAAI,CAAA;AALO,IAAA,IAAA,CAAA,eAAA,GAAA,eAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AACA,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAInB;AAAA,EAEA,GAAA,CAAI,MAAyB,QAAA,EAAwB;AACn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A8B;AAC1C,IAAA,IAAA,CAAK,iBAAiB,UAAU,CAAA;AAAA,EAClC;AACF;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskRecoveryHelper.cjs.js","sources":["../../../src/scaffolder/tasks/taskRecoveryHelper.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\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 { SerializedTaskEvent } from '@backstage/plugin-scaffolder-node';\nimport { TaskRecoverStrategy } from '@backstage/plugin-scaffolder-common';\n\nexport const trimEventsTillLastRecovery = (\n events: SerializedTaskEvent[],\n): { events: SerializedTaskEvent[] } => {\n const recoveredEventInd = events\n .slice()\n .reverse()\n .findIndex(event => event.type === 'recovered');\n\n if (recoveredEventInd >= 0) {\n const ind = events.length - recoveredEventInd - 1;\n const { recoverStrategy } = events[ind].body as {\n recoverStrategy?: TaskRecoverStrategy;\n };\n if (recoverStrategy === 'startOver') {\n return {\n events: recoveredEventInd === 0 ? [] : events.slice(ind),\n };\n }\n }\n\n return { events };\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"taskRecoveryHelper.cjs.js","sources":["../../../src/scaffolder/tasks/taskRecoveryHelper.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\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 { SerializedTaskEvent } from '@backstage/plugin-scaffolder-node';\nimport { TaskRecoverStrategy } from '@backstage/plugin-scaffolder-common';\n\nexport const trimEventsTillLastRecovery = (\n events: SerializedTaskEvent[],\n): { events: SerializedTaskEvent[] } => {\n const recoveredEventInd = events\n .slice()\n .reverse()\n .findIndex(event => event.type === 'recovered');\n\n if (recoveredEventInd >= 0) {\n const ind = events.length - recoveredEventInd - 1;\n const { recoverStrategy } = events[ind].body as {\n recoverStrategy?: TaskRecoverStrategy;\n };\n if (recoverStrategy === 'startOver') {\n return {\n events: recoveredEventInd === 0 ? [] : events.slice(ind),\n };\n }\n }\n\n return { events };\n};\n"],"names":[],"mappings":";;AAmBO,MAAM,0BAAA,GAA6B,CACxC,MAAA,KACsC;AACtC,EAAA,MAAM,iBAAA,GAAoB,MAAA,CACvB,KAAA,EAAM,CACN,OAAA,GACA,SAAA,CAAU,CAAA,KAAA,KAAS,KAAA,CAAM,IAAA,KAAS,WAAW,CAAA;AAEhD,EAAA,IAAI,qBAAqB,CAAA,EAAG;AAC1B,IAAA,MAAM,GAAA,GAAM,MAAA,CAAO,MAAA,GAAS,iBAAA,GAAoB,CAAA;AAChD,IAAA,MAAM,EAAE,eAAA,EAAgB,GAAI,MAAA,CAAO,GAAG,CAAA,CAAE,IAAA;AAGxC,IAAA,IAAI,oBAAoB,WAAA,EAAa;AACnC,MAAA,OAAO;AAAA,QACL,QAAQ,iBAAA,KAAsB,CAAA,GAAI,EAAC,GAAI,MAAA,CAAO,MAAM,GAAG;AAAA,OACzD;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.cjs.js","sources":["../../../../src/schema/openapi/generated/router.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\nimport { createValidatedOpenApiRouterFromGeneratedEndpointMap } from '@backstage/backend-openapi-utils';\nimport { EndpointMap } from './apis';\n\nexport const spec = {\n openapi: '3.0.3',\n info: {\n title: 'scaffolder',\n version: '1',\n description:\n 'The Backstage backend plugin that helps you create new things',\n license: {\n name: 'Apache-2.0',\n url: 'http://www.apache.org/licenses/LICENSE-2.0.html',\n },\n contact: {},\n },\n servers: [\n {\n url: '/',\n },\n ],\n components: {\n examples: {},\n headers: {},\n parameters: {\n createdBy: {\n name: 'createdBy',\n in: 'query',\n description: 'Created by',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n eventsAfter: {\n name: 'after',\n in: 'query',\n description: 'Offset event ID to stream events after.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n },\n },\n kind: {\n name: 'kind',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n limit: {\n name: 'limit',\n in: 'query',\n description: 'Number of records to return in the response.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n minimum: 0,\n },\n },\n namespace: {\n name: 'namespace',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n name: {\n name: 'name',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n offset: {\n name: 'offset',\n in: 'query',\n description: 'Number of records to skip in the query page.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n minimum: 0,\n },\n },\n order: {\n name: 'order',\n in: 'query',\n description: 'Order',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n status: {\n name: 'status',\n in: 'query',\n description: 'Status',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n taskId: {\n name: 'taskId',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n },\n requestBodies: {},\n responses: {\n ErrorResponse: {\n description: 'An error response from the backend.',\n content: {\n 'application/json; charset=utf-8': {\n schema: {\n $ref: '#/components/schemas/Error',\n },\n },\n },\n },\n },\n schemas: {\n Action: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ActionExample',\n },\n },\n schema: {\n type: 'object',\n properties: {\n input: {\n $ref: '#/components/schemas/JsonObject',\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n },\n required: ['id'],\n description:\n 'The response shape for a single action in the `listActions` call to the `scaffolder-backend`',\n },\n ActionExample: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n example: {\n type: 'string',\n },\n },\n required: ['description', 'example'],\n description: 'A single action example',\n },\n DryRunResult: {\n type: 'object',\n properties: {\n log: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n body: {\n allOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n stepId: {\n type: 'string',\n },\n },\n required: ['message'],\n },\n ],\n },\n },\n required: ['body'],\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedFile',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n required: ['log', 'directoryContents', 'output'],\n },\n Error: {\n type: 'object',\n properties: {\n error: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n },\n message: {\n type: 'string',\n },\n stack: {\n type: 'string',\n },\n code: {\n type: 'string',\n },\n },\n required: ['name', 'message'],\n },\n request: {\n type: 'object',\n properties: {\n method: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n required: ['method', 'url'],\n },\n response: {\n type: 'object',\n properties: {\n statusCode: {\n type: 'number',\n },\n },\n required: ['statusCode'],\n },\n },\n required: ['error', 'response'],\n additionalProperties: {},\n },\n JsonArray: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonValue',\n },\n description: 'A type representing all allowed JSON array values.',\n },\n JsonObject: {\n type: 'object',\n properties: {},\n description: 'A type representing all allowed JSON object values.',\n additionalProperties: {},\n },\n JsonPrimitive: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'number',\n },\n {\n type: 'string',\n },\n {\n type: 'object',\n nullable: true,\n },\n ],\n description: 'A type representing all allowed JSON primitive values.',\n },\n JsonValue: {\n oneOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n $ref: '#/components/schemas/JsonArray',\n },\n {\n $ref: '#/components/schemas/JsonPrimitive',\n },\n ],\n description: 'A type representing all allowed JSON values.',\n },\n ListActionsResponse: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/Action',\n },\n description:\n 'The response shape for the `listActions` call to the `scaffolder-backend`',\n },\n ListTasksResponse: {\n type: 'object',\n properties: {\n tasks: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedTask',\n },\n },\n totalTasks: {\n type: 'number',\n },\n },\n required: ['tasks'],\n description:\n 'The response shape for the `listTasks` call to the `scaffolder-backend`',\n },\n ListTemplatingExtensionsResponse: {\n type: 'object',\n properties: {\n filters: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateFilter',\n },\n },\n globals: {\n type: 'object',\n properties: {\n functions: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateGlobalFunction',\n },\n },\n values: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateGlobalValue',\n },\n },\n },\n required: ['functions', 'values'],\n },\n },\n required: ['filters', 'globals'],\n description:\n 'The response shape for the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n ScaffolderScaffoldOptions: {\n type: 'object',\n properties: {\n templateRef: {\n type: 'string',\n },\n values: {\n type: 'object',\n additionalProperties: {},\n },\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n },\n required: ['templateRef', 'values'],\n description:\n 'The input options to the `scaffold` method of the `ScaffolderClient`.',\n },\n ScaffolderUsageExample: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n example: {\n type: 'string',\n },\n notes: {\n type: 'string',\n },\n },\n required: ['example'],\n description: 'A single scaffolder usage example',\n },\n SerializedFile: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n content: {\n type: 'string',\n },\n executable: {\n type: 'boolean',\n },\n symlink: {\n type: 'boolean',\n },\n },\n required: ['path', 'content'],\n },\n SerializedTaskEvent: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n },\n isTaskRecoverable: {\n type: 'boolean',\n },\n taskId: {\n type: 'string',\n },\n body: {\n allOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n stepId: {\n type: 'string',\n },\n },\n required: ['message'],\n },\n ],\n },\n type: {\n $ref: '#/components/schemas/TaskEventType',\n },\n createdAt: {\n type: 'string',\n },\n },\n required: ['id', 'taskId', 'body', 'type', 'createdAt'],\n description: 'SerializedTaskEvent',\n },\n SerializedTask: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n spec: {\n type: 'object',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n createdAt: {\n type: 'string',\n },\n lastHeartbeatAt: {\n type: 'string',\n },\n createdBy: {\n type: 'string',\n },\n secrets: {\n $ref: '#/components/schemas/TaskSecrets',\n },\n state: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n required: ['id', 'spec', 'status', 'createdAt'],\n description: 'SerializedTask',\n },\n TaskEventType: {\n type: 'string',\n description: 'TaskEventType',\n enum: ['cancelled', 'completion', 'log', 'recovered'],\n },\n TaskSecrets: {\n allOf: [\n {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n {\n type: 'object',\n properties: {\n backstageToken: {\n type: 'string',\n },\n },\n },\n ],\n description: 'TaskSecrets',\n },\n TaskStatus: {\n type: 'string',\n enum: [\n 'cancelled',\n 'completed',\n 'failed',\n 'open',\n 'processing',\n 'skipped',\n ],\n description: 'The status of each step of the Task',\n },\n TemplateGlobalFunction: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n properties: {\n arguments: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ScaffolderUsageExample',\n },\n },\n },\n description:\n 'The response shape for a single global function in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateGlobalValue: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n value: {\n type: 'object',\n nullable: true,\n },\n },\n required: ['value'],\n description:\n 'The response shape for a single global value in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateFilter: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n properties: {\n input: {\n $ref: '#/components/schemas/JsonObject',\n },\n arguments: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ScaffolderUsageExample',\n },\n },\n },\n description:\n 'The response shape for a single filter in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateParameterSchema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n steps: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n },\n },\n required: ['title', 'schema'],\n },\n },\n },\n required: ['title', 'steps'],\n description:\n 'The shape of each entry of parameters which gets rendered\\nas a separate step in the wizard input',\n additionalProperties: {},\n },\n ValidationError: {\n type: 'object',\n properties: {\n path: {\n type: 'array',\n items: {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'integer',\n },\n ],\n },\n },\n property: {\n type: 'string',\n },\n message: {\n type: 'string',\n },\n instance: {\n type: 'object',\n },\n name: {\n type: 'string',\n },\n argument: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'number',\n },\n {\n type: 'object',\n },\n {\n type: 'string',\n },\n ],\n },\n stack: {\n type: 'string',\n },\n },\n required: [\n 'path',\n 'property',\n 'message',\n 'schema',\n 'instance',\n 'name',\n 'argument',\n 'stack',\n ],\n additionalProperties: {},\n },\n },\n securitySchemes: {\n JWT: {\n type: 'http',\n scheme: 'bearer',\n bearerFormat: 'JWT',\n },\n },\n },\n paths: {\n '/v2/templates/{namespace}/{kind}/{name}/parameter-schema': {\n get: {\n operationId: 'GetTemplateParameterSchema',\n description: 'Get template parameter schema.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/TemplateParameterSchema',\n },\n },\n },\n },\n '400': {\n $ref: '#/components/responses/ErrorResponse',\n },\n default: {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/namespace',\n },\n {\n $ref: '#/components/parameters/kind',\n },\n {\n $ref: '#/components/parameters/name',\n },\n ],\n },\n },\n '/v2/actions': {\n get: {\n operationId: 'ListActions',\n description: 'Returns a list of all installed actions.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListActionsResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n '/v2/tasks': {\n get: {\n operationId: 'ListTasks',\n description:\n 'Returns a list of tasks, filtering by ownership and/or status if given.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListTasksResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/createdBy',\n },\n {\n $ref: '#/components/parameters/limit',\n },\n {\n $ref: '#/components/parameters/offset',\n },\n {\n $ref: '#/components/parameters/order',\n },\n {\n $ref: '#/components/parameters/status',\n },\n ],\n },\n post: {\n operationId: 'Scaffold',\n description:\n 'Executes the scaffolding of a component, given a template and its\\nparameter values.',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ScaffolderScaffoldOptions',\n },\n },\n },\n },\n responses: {\n '201': {\n description: 'Created',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n },\n '400': {\n description: 'Validation errors.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n errors: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ValidationError',\n },\n },\n },\n required: ['errors'],\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n '/v2/tasks/{taskId}': {\n get: {\n operationId: 'GetTask',\n description: 'Get a task by ID.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SerializedTask',\n },\n },\n },\n },\n '403': {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/cancel': {\n post: {\n operationId: 'CancelTask',\n description:\n 'Sends a signal to a task broker to cancel the running task by taskId.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n },\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/retry': {\n post: {\n operationId: 'Retry',\n description: 'Starts the task again from the point where it failed.',\n requestBody: {\n required: false,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n },\n responses: {\n '201': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/events': {\n get: {\n operationId: 'StreamLogsPolling',\n description: 'Get events for a task by ID.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedTaskEvent',\n },\n },\n },\n },\n },\n '403': {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n parameters: [\n {\n $ref: '#/components/parameters/eventsAfter',\n },\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/dry-run': {\n post: {\n operationId: 'DryRun',\n description: 'Perform a dry-run of a template',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n template: {\n type: 'object',\n },\n values: {\n $ref: '#/components/schemas/JsonObject',\n },\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n base64Content: {\n type: 'string',\n },\n },\n },\n },\n },\n required: ['template', 'values', 'directoryContents'],\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n allOf: [\n {\n $ref: '#/components/schemas/DryRunResult',\n },\n {\n type: 'object',\n properties: {\n steps: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n action: {\n type: 'string',\n },\n },\n required: ['id', 'name', 'action'],\n additionalProperties: {},\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n executable: {\n type: 'boolean',\n },\n base64Content: {\n type: 'string',\n },\n },\n required: ['path', 'base64Content'],\n },\n },\n },\n required: ['steps'],\n },\n ],\n },\n },\n },\n },\n '400': {\n description: 'Validation errors.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n errors: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ValidationError',\n },\n },\n },\n required: ['errors'],\n },\n },\n },\n },\n },\n parameters: [],\n },\n },\n '/v2/autocomplete/{provider}/{resource}': {\n post: {\n operationId: 'Autocomplete',\n description:\n 'Perform an autocomplete for the given provider and resource.',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n context: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n token: {\n type: 'string',\n },\n },\n required: ['context', 'token'],\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n results: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n required: ['results'],\n },\n },\n },\n },\n '400': {\n description: 'Unsupported provider.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n },\n parameters: [\n {\n in: 'path',\n name: 'provider',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n {\n in: 'path',\n name: 'resource',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n ],\n },\n },\n '/v2/templating-extensions': {\n get: {\n operationId: 'ListTemplatingExtensions',\n description:\n 'Returns a structure describing the available templating extensions.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListTemplatingExtensionsResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n },\n} as const;\nexport const createOpenApiRouter = async (\n options?: Parameters<\n typeof createValidatedOpenApiRouterFromGeneratedEndpointMap\n >['1'],\n) =>\n createValidatedOpenApiRouterFromGeneratedEndpointMap<EndpointMap>(\n spec,\n options,\n );\n"],"names":["createValidatedOpenApiRouterFromGeneratedEndpointMap"],"mappings":";;;;AAsBO,MAAM,IAAO,GAAA;AAAA,EAClB,OAAS,EAAA,OAAA;AAAA,EACT,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,YAAA;AAAA,IACP,OAAS,EAAA,GAAA;AAAA,IACT,WACE,EAAA,+DAAA;AAAA,IACF,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,YAAA;AAAA,MACN,GAAK,EAAA;AAAA,KACP;AAAA,IACA,SAAS;AAAC,GACZ;AAAA,EACA,OAAS,EAAA;AAAA,IACP;AAAA,MACE,GAAK,EAAA;AAAA;AACP,GACF;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAU,EAAC;AAAA,IACX,SAAS,EAAC;AAAA,IACV,UAAY,EAAA;AAAA,MACV,SAAW,EAAA;AAAA,QACT,IAAM,EAAA,WAAA;AAAA,QACN,EAAI,EAAA,OAAA;AAAA,QACJ,WAAa,EAAA,YAAA;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A,UAAA;AAAA,YACN,QAAU,EAAA,IAAA;AAAA,YACV,aAAe,EAAA,IAAA;AAAA,YACf,MAAQ,EAAA;AAAA,cACN,IAAM,EAAA;AAAA;AACR,WACF;AAAA,UACA;AAAA,YACE,EAAI,EAAA,MAAA;AAAA,YACJ,IAAM,EAAA,UAAA;AAAA,YACN,QAAU,EAAA,IAAA;AAAA,YACV,aAAe,EAAA,IAAA;AAAA,YACf,MAAQ,EAAA;AAAA,cACN,IAAM,EAAA;AAAA;AACR;AACF;AACF;AACF,KACF;AAAA,IACA,2BAA6B,EAAA;AAAA,MAC3B,GAAK,EAAA;AAAA,QACH,WAAa,EAAA,0BAAA;AAAA,QACb,WACE,EAAA,qEAAA;AAAA,QACF,SAAW,EAAA;AAAA,UACT,KAAO,EAAA;AAAA,YACL,WAAa,EAAA,IAAA;AAAA,YACb,OAAS,EAAA;AAAA,cACP,kBAAoB,EAAA;AAAA,gBAClB,MAAQ,EAAA;AAAA,kBACN,IAAM,EAAA;AAAA;AACR;AACF;AACF;AACF,SACF;AAAA,QACA,QAAU,EAAA;AAAA,UACR,EAAC;AAAA,UACD;AAAA,YACE,KAAK;AAAC;AACR,SACF;AAAA,QACA,YAAY;AAAC;AACf;AACF;AAEJ;AACa,MAAA,mBAAA,GAAsB,OACjC,OAIA,KAAAA,wEAAA;AAAA,EACE,IAAA;AAAA,EACA;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"router.cjs.js","sources":["../../../../src/schema/openapi/generated/router.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\nimport { createValidatedOpenApiRouterFromGeneratedEndpointMap } from '@backstage/backend-openapi-utils';\nimport { EndpointMap } from './apis';\n\nexport const spec = {\n openapi: '3.0.3',\n info: {\n title: 'scaffolder',\n version: '1',\n description:\n 'The Backstage backend plugin that helps you create new things',\n license: {\n name: 'Apache-2.0',\n url: 'http://www.apache.org/licenses/LICENSE-2.0.html',\n },\n contact: {},\n },\n servers: [\n {\n url: '/',\n },\n ],\n components: {\n examples: {},\n headers: {},\n parameters: {\n createdBy: {\n name: 'createdBy',\n in: 'query',\n description: 'Created by',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n eventsAfter: {\n name: 'after',\n in: 'query',\n description: 'Offset event ID to stream events after.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n },\n },\n kind: {\n name: 'kind',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n limit: {\n name: 'limit',\n in: 'query',\n description: 'Number of records to return in the response.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n minimum: 0,\n },\n },\n namespace: {\n name: 'namespace',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n name: {\n name: 'name',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n offset: {\n name: 'offset',\n in: 'query',\n description: 'Number of records to skip in the query page.',\n required: false,\n allowReserved: true,\n schema: {\n type: 'integer',\n minimum: 0,\n },\n },\n order: {\n name: 'order',\n in: 'query',\n description: 'Order',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n status: {\n name: 'status',\n in: 'query',\n description: 'Status',\n required: false,\n allowReserved: true,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n taskId: {\n name: 'taskId',\n in: 'path',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n },\n requestBodies: {},\n responses: {\n ErrorResponse: {\n description: 'An error response from the backend.',\n content: {\n 'application/json; charset=utf-8': {\n schema: {\n $ref: '#/components/schemas/Error',\n },\n },\n },\n },\n },\n schemas: {\n Action: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ActionExample',\n },\n },\n schema: {\n type: 'object',\n properties: {\n input: {\n $ref: '#/components/schemas/JsonObject',\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n },\n required: ['id'],\n description:\n 'The response shape for a single action in the `listActions` call to the `scaffolder-backend`',\n },\n ActionExample: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n example: {\n type: 'string',\n },\n },\n required: ['description', 'example'],\n description: 'A single action example',\n },\n DryRunResult: {\n type: 'object',\n properties: {\n log: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n body: {\n allOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n stepId: {\n type: 'string',\n },\n },\n required: ['message'],\n },\n ],\n },\n },\n required: ['body'],\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedFile',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n required: ['log', 'directoryContents', 'output'],\n },\n Error: {\n type: 'object',\n properties: {\n error: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n },\n message: {\n type: 'string',\n },\n stack: {\n type: 'string',\n },\n code: {\n type: 'string',\n },\n },\n required: ['name', 'message'],\n },\n request: {\n type: 'object',\n properties: {\n method: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n required: ['method', 'url'],\n },\n response: {\n type: 'object',\n properties: {\n statusCode: {\n type: 'number',\n },\n },\n required: ['statusCode'],\n },\n },\n required: ['error', 'response'],\n additionalProperties: {},\n },\n JsonArray: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonValue',\n },\n description: 'A type representing all allowed JSON array values.',\n },\n JsonObject: {\n type: 'object',\n properties: {},\n description: 'A type representing all allowed JSON object values.',\n additionalProperties: {},\n },\n JsonPrimitive: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'number',\n },\n {\n type: 'string',\n },\n {\n type: 'object',\n nullable: true,\n },\n ],\n description: 'A type representing all allowed JSON primitive values.',\n },\n JsonValue: {\n oneOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n $ref: '#/components/schemas/JsonArray',\n },\n {\n $ref: '#/components/schemas/JsonPrimitive',\n },\n ],\n description: 'A type representing all allowed JSON values.',\n },\n ListActionsResponse: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/Action',\n },\n description:\n 'The response shape for the `listActions` call to the `scaffolder-backend`',\n },\n ListTasksResponse: {\n type: 'object',\n properties: {\n tasks: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedTask',\n },\n },\n totalTasks: {\n type: 'number',\n },\n },\n required: ['tasks'],\n description:\n 'The response shape for the `listTasks` call to the `scaffolder-backend`',\n },\n ListTemplatingExtensionsResponse: {\n type: 'object',\n properties: {\n filters: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateFilter',\n },\n },\n globals: {\n type: 'object',\n properties: {\n functions: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateGlobalFunction',\n },\n },\n values: {\n type: 'object',\n additionalProperties: {\n $ref: '#/components/schemas/TemplateGlobalValue',\n },\n },\n },\n required: ['functions', 'values'],\n },\n },\n required: ['filters', 'globals'],\n description:\n 'The response shape for the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n ScaffolderScaffoldOptions: {\n type: 'object',\n properties: {\n templateRef: {\n type: 'string',\n },\n values: {\n type: 'object',\n additionalProperties: {},\n },\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n },\n required: ['templateRef', 'values'],\n description:\n 'The input options to the `scaffold` method of the `ScaffolderClient`.',\n },\n ScaffolderUsageExample: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n example: {\n type: 'string',\n },\n notes: {\n type: 'string',\n },\n },\n required: ['example'],\n description: 'A single scaffolder usage example',\n },\n SerializedFile: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n content: {\n type: 'string',\n },\n executable: {\n type: 'boolean',\n },\n symlink: {\n type: 'boolean',\n },\n },\n required: ['path', 'content'],\n },\n SerializedTaskEvent: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n },\n isTaskRecoverable: {\n type: 'boolean',\n },\n taskId: {\n type: 'string',\n },\n body: {\n allOf: [\n {\n $ref: '#/components/schemas/JsonObject',\n },\n {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n stepId: {\n type: 'string',\n },\n },\n required: ['message'],\n },\n ],\n },\n type: {\n $ref: '#/components/schemas/TaskEventType',\n },\n createdAt: {\n type: 'string',\n },\n },\n required: ['id', 'taskId', 'body', 'type', 'createdAt'],\n description: 'SerializedTaskEvent',\n },\n SerializedTask: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n spec: {\n type: 'object',\n },\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n createdAt: {\n type: 'string',\n },\n lastHeartbeatAt: {\n type: 'string',\n },\n createdBy: {\n type: 'string',\n },\n secrets: {\n $ref: '#/components/schemas/TaskSecrets',\n },\n state: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n required: ['id', 'spec', 'status', 'createdAt'],\n description: 'SerializedTask',\n },\n TaskEventType: {\n type: 'string',\n description: 'TaskEventType',\n enum: ['cancelled', 'completion', 'log', 'recovered'],\n },\n TaskSecrets: {\n allOf: [\n {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n {\n type: 'object',\n properties: {\n backstageToken: {\n type: 'string',\n },\n },\n },\n ],\n description: 'TaskSecrets',\n },\n TaskStatus: {\n type: 'string',\n enum: [\n 'cancelled',\n 'completed',\n 'failed',\n 'open',\n 'processing',\n 'skipped',\n ],\n description: 'The status of each step of the Task',\n },\n TemplateGlobalFunction: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n properties: {\n arguments: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ScaffolderUsageExample',\n },\n },\n },\n description:\n 'The response shape for a single global function in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateGlobalValue: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n value: {\n type: 'object',\n nullable: true,\n },\n },\n required: ['value'],\n description:\n 'The response shape for a single global value in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateFilter: {\n type: 'object',\n properties: {\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n properties: {\n input: {\n $ref: '#/components/schemas/JsonObject',\n },\n arguments: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n output: {\n $ref: '#/components/schemas/JsonObject',\n },\n },\n },\n \"'examples'\": {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ScaffolderUsageExample',\n },\n },\n },\n description:\n 'The response shape for a single filter in the `listTemplatingExtensions` call to the `scaffolder-backend`',\n },\n TemplateParameterSchema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n steps: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n schema: {\n type: 'object',\n },\n },\n required: ['title', 'schema'],\n },\n },\n },\n required: ['title', 'steps'],\n description:\n 'The shape of each entry of parameters which gets rendered\\nas a separate step in the wizard input',\n additionalProperties: {},\n },\n ValidationError: {\n type: 'object',\n properties: {\n path: {\n type: 'array',\n items: {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'integer',\n },\n ],\n },\n },\n property: {\n type: 'string',\n },\n message: {\n type: 'string',\n },\n instance: {\n type: 'object',\n },\n name: {\n type: 'string',\n },\n argument: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'number',\n },\n {\n type: 'object',\n },\n {\n type: 'string',\n },\n ],\n },\n stack: {\n type: 'string',\n },\n },\n required: [\n 'path',\n 'property',\n 'message',\n 'schema',\n 'instance',\n 'name',\n 'argument',\n 'stack',\n ],\n additionalProperties: {},\n },\n },\n securitySchemes: {\n JWT: {\n type: 'http',\n scheme: 'bearer',\n bearerFormat: 'JWT',\n },\n },\n },\n paths: {\n '/v2/templates/{namespace}/{kind}/{name}/parameter-schema': {\n get: {\n operationId: 'GetTemplateParameterSchema',\n description: 'Get template parameter schema.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/TemplateParameterSchema',\n },\n },\n },\n },\n '400': {\n $ref: '#/components/responses/ErrorResponse',\n },\n default: {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/namespace',\n },\n {\n $ref: '#/components/parameters/kind',\n },\n {\n $ref: '#/components/parameters/name',\n },\n ],\n },\n },\n '/v2/actions': {\n get: {\n operationId: 'ListActions',\n description: 'Returns a list of all installed actions.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListActionsResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n '/v2/tasks': {\n get: {\n operationId: 'ListTasks',\n description:\n 'Returns a list of tasks, filtering by ownership and/or status if given.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListTasksResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/createdBy',\n },\n {\n $ref: '#/components/parameters/limit',\n },\n {\n $ref: '#/components/parameters/offset',\n },\n {\n $ref: '#/components/parameters/order',\n },\n {\n $ref: '#/components/parameters/status',\n },\n ],\n },\n post: {\n operationId: 'Scaffold',\n description:\n 'Executes the scaffolding of a component, given a template and its\\nparameter values.',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ScaffolderScaffoldOptions',\n },\n },\n },\n },\n responses: {\n '201': {\n description: 'Created',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n },\n '400': {\n description: 'Validation errors.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n errors: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ValidationError',\n },\n },\n },\n required: ['errors'],\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n '/v2/tasks/{taskId}': {\n get: {\n operationId: 'GetTask',\n description: 'Get a task by ID.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SerializedTask',\n },\n },\n },\n },\n '403': {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/cancel': {\n post: {\n operationId: 'CancelTask',\n description:\n 'Sends a signal to a task broker to cancel the running task by taskId.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n status: {\n $ref: '#/components/schemas/TaskStatus',\n },\n },\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/retry': {\n post: {\n operationId: 'Retry',\n description: 'Starts the task again from the point where it failed.',\n requestBody: {\n required: false,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n },\n responses: {\n '201': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/tasks/{taskId}/events': {\n get: {\n operationId: 'StreamLogsPolling',\n description: 'Get events for a task by ID.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/SerializedTaskEvent',\n },\n },\n },\n },\n },\n '403': {\n $ref: '#/components/responses/ErrorResponse',\n },\n },\n parameters: [\n {\n $ref: '#/components/parameters/eventsAfter',\n },\n {\n $ref: '#/components/parameters/taskId',\n },\n ],\n },\n },\n '/v2/dry-run': {\n post: {\n operationId: 'DryRun',\n description: 'Perform a dry-run of a template',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n template: {\n type: 'object',\n },\n values: {\n $ref: '#/components/schemas/JsonObject',\n },\n secrets: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n base64Content: {\n type: 'string',\n },\n },\n },\n },\n },\n required: ['template', 'values', 'directoryContents'],\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n allOf: [\n {\n $ref: '#/components/schemas/DryRunResult',\n },\n {\n type: 'object',\n properties: {\n steps: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n action: {\n type: 'string',\n },\n },\n required: ['id', 'name', 'action'],\n additionalProperties: {},\n },\n },\n directoryContents: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n },\n executable: {\n type: 'boolean',\n },\n base64Content: {\n type: 'string',\n },\n },\n required: ['path', 'base64Content'],\n },\n },\n },\n required: ['steps'],\n },\n ],\n },\n },\n },\n },\n '400': {\n description: 'Validation errors.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n errors: {\n type: 'array',\n items: {\n $ref: '#/components/schemas/ValidationError',\n },\n },\n },\n required: ['errors'],\n },\n },\n },\n },\n },\n parameters: [],\n },\n },\n '/v2/autocomplete/{provider}/{resource}': {\n post: {\n operationId: 'Autocomplete',\n description:\n 'Perform an autocomplete for the given provider and resource.',\n requestBody: {\n required: true,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n context: {\n type: 'object',\n additionalProperties: {\n type: 'string',\n },\n },\n token: {\n type: 'string',\n },\n },\n required: ['context', 'token'],\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n results: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n },\n required: ['id'],\n },\n },\n },\n required: ['results'],\n },\n },\n },\n },\n '400': {\n description: 'Unsupported provider.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n },\n parameters: [\n {\n in: 'path',\n name: 'provider',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n {\n in: 'path',\n name: 'resource',\n required: true,\n allowReserved: true,\n schema: {\n type: 'string',\n },\n },\n ],\n },\n },\n '/v2/templating-extensions': {\n get: {\n operationId: 'ListTemplatingExtensions',\n description:\n 'Returns a structure describing the available templating extensions.',\n responses: {\n '200': {\n description: 'Ok',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/ListTemplatingExtensionsResponse',\n },\n },\n },\n },\n },\n security: [\n {},\n {\n JWT: [],\n },\n ],\n parameters: [],\n },\n },\n },\n} as const;\nexport const createOpenApiRouter = async (\n options?: Parameters<\n typeof createValidatedOpenApiRouterFromGeneratedEndpointMap\n >['1'],\n) =>\n createValidatedOpenApiRouterFromGeneratedEndpointMap<EndpointMap>(\n spec,\n options,\n );\n"],"names":["createValidatedOpenApiRouterFromGeneratedEndpointMap"],"mappings":";;;;AAsBO,MAAM,IAAA,GAAO;AAAA,EAClB,OAAA,EAAS,OAAA;AAAA,EACT,IAAA,EAAM;AAAA,IACJ,KAAA,EAAO,YAAA;AAAA,IACP,OAAA,EAAS,GAAA;AAAA,IACT,WAAA,EACE,+DAAA;AAAA,IACF,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,YAAA;AAAA,MACN,GAAA,EAAK;AAAA,KACP;AAAA,IACA,SAAS;AAAC,GACZ;AAAA,EACA,OAAA,EAAS;AAAA,IACP;AAAA,MACE,GAAA,EAAK;AAAA;AACP,GACF;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAU,EAAC;AAAA,IACX,SAAS,EAAC;AAAA,IACV,UAAA,EAAY;AAAA,MACV,SAAA,EAAW;AAAA,QACT,IAAA,EAAM,WAAA;AAAA,QACN,EAAA,EAAI,OAAA;AAAA,QACJ,WAAA,EAAa,YAAA;AAAA,QACb,QAAA,EAAU,KAAA;AAAA,QACV,aAAA,EAAe,IAAA;AAAA,QACf,MAAA,EAAQ;AAAA,UACN,IAAA,EAAM,OAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,IAAA,EAAM;AAAA;AACR;AACF,OACF;AAAA,MACA,WAAA,EAAa;AAAA,QACX,IAAA,EAAM,OAAA;AAAA,QACN,EA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A,EAAe,IAAA;AAAA,YACf,MAAA,EAAQ;AAAA,cACN,IAAA,EAAM;AAAA;AACR;AACF;AACF;AACF,KACF;AAAA,IACA,2BAAA,EAA6B;AAAA,MAC3B,GAAA,EAAK;AAAA,QACH,WAAA,EAAa,0BAAA;AAAA,QACb,WAAA,EACE,qEAAA;AAAA,QACF,SAAA,EAAW;AAAA,UACT,KAAA,EAAO;AAAA,YACL,WAAA,EAAa,IAAA;AAAA,YACb,OAAA,EAAS;AAAA,cACP,kBAAA,EAAoB;AAAA,gBAClB,MAAA,EAAQ;AAAA,kBACN,IAAA,EAAM;AAAA;AACR;AACF;AACF;AACF,SACF;AAAA,QACA,QAAA,EAAU;AAAA,UACR,EAAC;AAAA,UACD;AAAA,YACE,KAAK;AAAC;AACR,SACF;AAAA,QACA,YAAY;AAAC;AACf;AACF;AAEJ;AACO,MAAM,mBAAA,GAAsB,OACjC,OAAA,KAIAA,wEAAA;AAAA,EACE,IAAA;AAAA,EACA;AACF;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../../src/service/alpha.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\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 {\n RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n RESOURCE_TYPE_SCAFFOLDER_ACTION,\n RESOURCE_TYPE_SCAFFOLDER_TASK,\n} from '@backstage/plugin-scaffolder-common/alpha';\nimport { createConditionExports } from '@backstage/plugin-permission-node';\nimport {\n scaffolderTemplateRules,\n scaffolderActionRules,\n scaffolderTaskRules,\n} from './rules';\n\nconst templateConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n rules: scaffolderTemplateRules,\n});\n\nconst actionsConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_ACTION,\n rules: scaffolderActionRules,\n});\n\nconst taskConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TASK,\n rules: scaffolderTaskRules,\n});\n\n/**\n * `createScaffolderTemplateConditionalDecision` can be used when authoring policies to\n * create conditional decisions. It requires a permission of type\n * `ResourcePermission<'scaffolder-template'>` to be passed as the first parameter.\n * It's recommended that you use the provided `isResourcePermission` and\n * `isPermission` helper methods to narrow the type of the permission passed to\n * the handle method as shown below.\n *\n * ```\n * // MyAuthorizationPolicy.ts\n * ...\n * import { createScaffolderPolicyDecision } from '@backstage/plugin-scaffolder-backend';\n * import { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE } from '@backstage/plugin-scaffolder-common';\n *\n * class MyAuthorizationPolicy implements PermissionPolicy {\n * async handle(request, user) {\n * ...\n *\n * if (isResourcePermission(request.permission, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE)) {\n * return createScaffolderConditionalDecision(\n * request.permission,\n * { anyOf: [...insert conditions here...] }\n * );\n * }\n *\n * ...\n * }\n *\n * ```\n *\n * @alpha\n */\nexport const createScaffolderTemplateConditionalDecision =\n templateConditionExports.createConditionalDecision;\n\n/**\n * These conditions are used when creating conditional decisions for scaffolder\n * templates that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderTemplateConditions = templateConditionExports.conditions;\n\n/**\n * @alpha\n */\nexport const createScaffolderActionConditionalDecision =\n actionsConditionExports.createConditionalDecision;\n\n/**\n *\n * These conditions are used when creating conditional decisions for scaffolder\n * actions that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderActionConditions = actionsConditionExports.conditions;\n\n/**\n * @alpha\n */\nexport const createScaffolderTaskConditionalDecision =\n taskConditionExports.createConditionalDecision;\n\n/**\n * These conditions are used when creating conditional decisions for scaffolder\n * tasks that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderTaskConditions = taskConditionExports.conditions;\n"],"names":["createConditionExports","RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","scaffolderTemplateRules","RESOURCE_TYPE_SCAFFOLDER_ACTION","scaffolderActionRules","RESOURCE_TYPE_SCAFFOLDER_TASK","scaffolderTaskRules"],"mappings":";;;;;;AA4BA,MAAM,2BAA2BA,
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../../src/service/alpha.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\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 {\n RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n RESOURCE_TYPE_SCAFFOLDER_ACTION,\n RESOURCE_TYPE_SCAFFOLDER_TASK,\n} from '@backstage/plugin-scaffolder-common/alpha';\nimport { createConditionExports } from '@backstage/plugin-permission-node';\nimport {\n scaffolderTemplateRules,\n scaffolderActionRules,\n scaffolderTaskRules,\n} from './rules';\n\nconst templateConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n rules: scaffolderTemplateRules,\n});\n\nconst actionsConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_ACTION,\n rules: scaffolderActionRules,\n});\n\nconst taskConditionExports = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TASK,\n rules: scaffolderTaskRules,\n});\n\n/**\n * `createScaffolderTemplateConditionalDecision` can be used when authoring policies to\n * create conditional decisions. It requires a permission of type\n * `ResourcePermission<'scaffolder-template'>` to be passed as the first parameter.\n * It's recommended that you use the provided `isResourcePermission` and\n * `isPermission` helper methods to narrow the type of the permission passed to\n * the handle method as shown below.\n *\n * ```\n * // MyAuthorizationPolicy.ts\n * ...\n * import { createScaffolderPolicyDecision } from '@backstage/plugin-scaffolder-backend';\n * import { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE } from '@backstage/plugin-scaffolder-common';\n *\n * class MyAuthorizationPolicy implements PermissionPolicy {\n * async handle(request, user) {\n * ...\n *\n * if (isResourcePermission(request.permission, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE)) {\n * return createScaffolderConditionalDecision(\n * request.permission,\n * { anyOf: [...insert conditions here...] }\n * );\n * }\n *\n * ...\n * }\n *\n * ```\n *\n * @alpha\n */\nexport const createScaffolderTemplateConditionalDecision =\n templateConditionExports.createConditionalDecision;\n\n/**\n * These conditions are used when creating conditional decisions for scaffolder\n * templates that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderTemplateConditions = templateConditionExports.conditions;\n\n/**\n * @alpha\n */\nexport const createScaffolderActionConditionalDecision =\n actionsConditionExports.createConditionalDecision;\n\n/**\n *\n * These conditions are used when creating conditional decisions for scaffolder\n * actions that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderActionConditions = actionsConditionExports.conditions;\n\n/**\n * @alpha\n */\nexport const createScaffolderTaskConditionalDecision =\n taskConditionExports.createConditionalDecision;\n\n/**\n * These conditions are used when creating conditional decisions for scaffolder\n * tasks that are returned by authorization policies.\n *\n * @alpha\n */\nexport const scaffolderTaskConditions = taskConditionExports.conditions;\n"],"names":["createConditionExports","RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","scaffolderTemplateRules","RESOURCE_TYPE_SCAFFOLDER_ACTION","scaffolderActionRules","RESOURCE_TYPE_SCAFFOLDER_TASK","scaffolderTaskRules"],"mappings":";;;;;;AA4BA,MAAM,2BAA2BA,2CAAA,CAAuB;AAAA,EACtD,QAAA,EAAU,YAAA;AAAA,EACV,YAAA,EAAcC,uCAAA;AAAA,EACd,KAAA,EAAOC;AACT,CAAC,CAAA;AAED,MAAM,0BAA0BF,2CAAA,CAAuB;AAAA,EACrD,QAAA,EAAU,YAAA;AAAA,EACV,YAAA,EAAcG,qCAAA;AAAA,EACd,KAAA,EAAOC;AACT,CAAC,CAAA;AAED,MAAM,uBAAuBJ,2CAAA,CAAuB;AAAA,EAClD,QAAA,EAAU,YAAA;AAAA,EACV,YAAA,EAAcK,mCAAA;AAAA,EACd,KAAA,EAAOC;AACT,CAAC,CAAA;AAkCM,MAAM,8CACX,wBAAA,CAAyB;AAQpB,MAAM,+BAA+B,wBAAA,CAAyB;AAK9D,MAAM,4CACX,uBAAA,CAAwB;AASnB,MAAM,6BAA6B,uBAAA,CAAwB;AAK3D,MAAM,0CACX,oBAAA,CAAqB;AAQhB,MAAM,2BAA2B,oBAAA,CAAqB;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs.js","sources":["../../src/service/helpers.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 {\n BackstageCredentials,\n LoggerService,\n} from '@backstage/backend-plugin-api';\nimport {\n ANNOTATION_LOCATION,\n ANNOTATION_SOURCE_LOCATION,\n CompoundEntityRef,\n Entity,\n parseLocationRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport { assertError, InputError, NotFoundError } from '@backstage/errors';\nimport { CatalogService } from '@backstage/plugin-catalog-node';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport fs from 'fs-extra';\nimport os from 'os';\n\nexport async function getWorkingDirectory(\n config: Config,\n logger: LoggerService,\n): Promise<string> {\n if (!config.has('backend.workingDirectory')) {\n return os.tmpdir();\n }\n\n const workingDirectory = config.getString('backend.workingDirectory');\n try {\n // Check if working directory exists and is writable\n await fs.access(workingDirectory, fs.constants.F_OK | fs.constants.W_OK);\n logger.info(`using working directory: ${workingDirectory}`);\n } catch (err) {\n assertError(err);\n logger.error(\n `working directory ${workingDirectory} ${\n err.code === 'ENOENT' ? 'does not exist' : 'is not writable'\n }`,\n );\n throw err;\n }\n return workingDirectory;\n}\n\n/**\n * Gets the base URL of the entity location that points to the source location\n * of the entity description within a repo. If there is not source location\n * or if it has an invalid type, undefined will be returned instead.\n *\n * For file locations this will return a `file://` URL.\n */\nexport function getEntityBaseUrl(entity: Entity): string | undefined {\n let location = entity.metadata.annotations?.[ANNOTATION_SOURCE_LOCATION];\n if (!location) {\n location = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n }\n if (!location) {\n return undefined;\n }\n\n const { type, target } = parseLocationRef(location);\n if (type === 'url') {\n return target;\n } else if (type === 'file') {\n return `file://${target}`;\n }\n\n // Only url and file location are handled, as we otherwise don't know if\n // what the url is pointing to makes sense to use as a baseUrl\n return undefined;\n}\n\n/**\n * Will use the provided CatalogApi to go find the given template entity with an additional token.\n * Returns the matching template, or throws a NotFoundError if no such template existed.\n */\nexport async function findTemplate(options: {\n entityRef: CompoundEntityRef;\n catalog: CatalogService;\n credentials: BackstageCredentials;\n}): Promise<TemplateEntityV1beta3> {\n const { entityRef, catalog, credentials } = options;\n\n if (entityRef.kind.toLocaleLowerCase('en-US') !== 'template') {\n throw new InputError(`Invalid kind, only 'Template' kind is supported`);\n }\n\n const template = await catalog.getEntityByRef(entityRef, {\n credentials,\n });\n if (!template) {\n throw new NotFoundError(\n `Template ${stringifyEntityRef(entityRef)} not found`,\n );\n }\n\n return template as TemplateEntityV1beta3;\n}\n\n/**\n * Takes a single unknown parameter and makes sure that it's a single string or\n * an array of strings, and returns as an array.\n */\nexport function parseStringsParam(\n param: unknown,\n paramName: string,\n): string[] | undefined {\n if (param === undefined) {\n return undefined;\n }\n\n const array = [param].flat();\n if (array.some(p => typeof p !== 'string')) {\n throw new InputError(\n `Invalid ${paramName}, not a string or array of strings`,\n );\n }\n\n return array as string[];\n}\n\nexport function parseNumberParam(\n param: unknown,\n paramName: string,\n): number[] | undefined {\n return parseStringsParam(param, paramName)?.map(val => {\n const ret = Number.parseInt(val, 10);\n if (isNaN(ret)) {\n throw new InputError(\n `Invalid ${paramName} parameter \"${val}\", expected a number or array of numbers`,\n );\n }\n return ret;\n });\n}\n\nexport function flattenParams<T>(...params: (undefined | T | T[])[]): T[] {\n return [...params].flat().filter(Boolean) as T[];\n}\n"],"names":["os","fs","assertError","ANNOTATION_SOURCE_LOCATION","ANNOTATION_LOCATION","parseLocationRef","InputError","NotFoundError","stringifyEntityRef"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"helpers.cjs.js","sources":["../../src/service/helpers.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 {\n BackstageCredentials,\n LoggerService,\n} from '@backstage/backend-plugin-api';\nimport {\n ANNOTATION_LOCATION,\n ANNOTATION_SOURCE_LOCATION,\n CompoundEntityRef,\n Entity,\n parseLocationRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport { assertError, InputError, NotFoundError } from '@backstage/errors';\nimport { CatalogService } from '@backstage/plugin-catalog-node';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport fs from 'fs-extra';\nimport os from 'os';\n\nexport async function getWorkingDirectory(\n config: Config,\n logger: LoggerService,\n): Promise<string> {\n if (!config.has('backend.workingDirectory')) {\n return os.tmpdir();\n }\n\n const workingDirectory = config.getString('backend.workingDirectory');\n try {\n // Check if working directory exists and is writable\n await fs.access(workingDirectory, fs.constants.F_OK | fs.constants.W_OK);\n logger.info(`using working directory: ${workingDirectory}`);\n } catch (err) {\n assertError(err);\n logger.error(\n `working directory ${workingDirectory} ${\n err.code === 'ENOENT' ? 'does not exist' : 'is not writable'\n }`,\n );\n throw err;\n }\n return workingDirectory;\n}\n\n/**\n * Gets the base URL of the entity location that points to the source location\n * of the entity description within a repo. If there is not source location\n * or if it has an invalid type, undefined will be returned instead.\n *\n * For file locations this will return a `file://` URL.\n */\nexport function getEntityBaseUrl(entity: Entity): string | undefined {\n let location = entity.metadata.annotations?.[ANNOTATION_SOURCE_LOCATION];\n if (!location) {\n location = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n }\n if (!location) {\n return undefined;\n }\n\n const { type, target } = parseLocationRef(location);\n if (type === 'url') {\n return target;\n } else if (type === 'file') {\n return `file://${target}`;\n }\n\n // Only url and file location are handled, as we otherwise don't know if\n // what the url is pointing to makes sense to use as a baseUrl\n return undefined;\n}\n\n/**\n * Will use the provided CatalogApi to go find the given template entity with an additional token.\n * Returns the matching template, or throws a NotFoundError if no such template existed.\n */\nexport async function findTemplate(options: {\n entityRef: CompoundEntityRef;\n catalog: CatalogService;\n credentials: BackstageCredentials;\n}): Promise<TemplateEntityV1beta3> {\n const { entityRef, catalog, credentials } = options;\n\n if (entityRef.kind.toLocaleLowerCase('en-US') !== 'template') {\n throw new InputError(`Invalid kind, only 'Template' kind is supported`);\n }\n\n const template = await catalog.getEntityByRef(entityRef, {\n credentials,\n });\n if (!template) {\n throw new NotFoundError(\n `Template ${stringifyEntityRef(entityRef)} not found`,\n );\n }\n\n return template as TemplateEntityV1beta3;\n}\n\n/**\n * Takes a single unknown parameter and makes sure that it's a single string or\n * an array of strings, and returns as an array.\n */\nexport function parseStringsParam(\n param: unknown,\n paramName: string,\n): string[] | undefined {\n if (param === undefined) {\n return undefined;\n }\n\n const array = [param].flat();\n if (array.some(p => typeof p !== 'string')) {\n throw new InputError(\n `Invalid ${paramName}, not a string or array of strings`,\n );\n }\n\n return array as string[];\n}\n\nexport function parseNumberParam(\n param: unknown,\n paramName: string,\n): number[] | undefined {\n return parseStringsParam(param, paramName)?.map(val => {\n const ret = Number.parseInt(val, 10);\n if (isNaN(ret)) {\n throw new InputError(\n `Invalid ${paramName} parameter \"${val}\", expected a number or array of numbers`,\n );\n }\n return ret;\n });\n}\n\nexport function flattenParams<T>(...params: (undefined | T | T[])[]): T[] {\n return [...params].flat().filter(Boolean) as T[];\n}\n"],"names":["os","fs","assertError","ANNOTATION_SOURCE_LOCATION","ANNOTATION_LOCATION","parseLocationRef","InputError","NotFoundError","stringifyEntityRef"],"mappings":";;;;;;;;;;;;AAmCA,eAAsB,mBAAA,CACpB,QACA,MAAA,EACiB;AACjB,EAAA,IAAI,CAAC,MAAA,CAAO,GAAA,CAAI,0BAA0B,CAAA,EAAG;AAC3C,IAAA,OAAOA,oBAAG,MAAA,EAAO;AAAA,EACnB;AAEA,EAAA,MAAM,gBAAA,GAAmB,MAAA,CAAO,SAAA,CAAU,0BAA0B,CAAA;AACpE,EAAA,IAAI;AAEF,IAAA,MAAMC,mBAAA,CAAG,OAAO,gBAAA,EAAkBA,mBAAA,CAAG,UAAU,IAAA,GAAOA,mBAAA,CAAG,UAAU,IAAI,CAAA;AACvE,IAAA,MAAA,CAAO,IAAA,CAAK,CAAA,yBAAA,EAA4B,gBAAgB,CAAA,CAA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CAAC,QAAA,EAAU;AACb,IAAA,MAAM,IAAIC,oBAAA;AAAA,MACR,CAAA,SAAA,EAAYC,+BAAA,CAAmB,SAAS,CAAC,CAAA,UAAA;AAAA,KAC3C;AAAA,EACF;AAEA,EAAA,OAAO,QAAA;AACT;AAMO,SAAS,iBAAA,CACd,OACA,SAAA,EACsB;AACtB,EAAA,IAAI,UAAU,MAAA,EAAW;AACvB,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,MAAM,KAAA,GAAQ,CAAC,KAAK,CAAA,CAAE,IAAA,EAAK;AAC3B,EAAA,IAAI,MAAM,IAAA,CAAK,CAAA,CAAA,KAAK,OAAO,CAAA,KAAM,QAAQ,CAAA,EAAG;AAC1C,IAAA,MAAM,IAAIF,iBAAA;AAAA,MACR,WAAW,SAAS,CAAA,kCAAA;AAAA,KACtB;AAAA,EACF;AAEA,EAAA,OAAO,KAAA;AACT;AAiBO,SAAS,iBAAoB,MAAA,EAAsC;AACxE,EAAA,OAAO,CAAC,GAAG,MAAM,EAAE,IAAA,EAAK,CAAE,OAAO,OAAO,CAAA;AAC1C;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.cjs.js","sources":["../../src/service/permissions.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 { PermissionRule } from '@backstage/plugin-permission-node';\nimport {\n TemplateEntityStepV1beta3,\n TemplateParametersV1beta3,\n} from '@backstage/plugin-scaffolder-common';\nimport {\n RESOURCE_TYPE_SCAFFOLDER_ACTION,\n RESOURCE_TYPE_SCAFFOLDER_TASK,\n RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n} from '@backstage/plugin-scaffolder-common/alpha';\nimport { PermissionRuleParams } from '@backstage/plugin-permission-common';\nimport { SerializedTask } from '@backstage/plugin-scaffolder-node';\n\n/**\n *\n * @public\n */\nexport type ScaffolderPermissionRuleInput =\n | TemplatePermissionRuleInput\n | ActionPermissionRuleInput\n | TaskPermissionRuleInput;\n\n/**\n * @public\n */\nexport type TemplatePermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n TemplateEntityStepV1beta3 | TemplateParametersV1beta3,\n {},\n typeof RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n TParams\n>;\nexport function isTemplatePermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is TemplatePermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_TEMPLATE;\n}\n\n/**\n *\n * @public\n */\nexport type ActionPermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n TemplateEntityStepV1beta3 | TemplateParametersV1beta3,\n {},\n typeof RESOURCE_TYPE_SCAFFOLDER_ACTION,\n TParams\n>;\nexport function isActionPermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is ActionPermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_ACTION;\n}\n\n/**\n * @public\n */\nexport type TaskPermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n SerializedTask,\n {\n key: string;\n values?: string[];\n },\n typeof RESOURCE_TYPE_SCAFFOLDER_TASK,\n TParams\n>;\nexport function isTaskPermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is TaskPermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_TASK;\n}\n"],"names":["RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","RESOURCE_TYPE_SCAFFOLDER_ACTION","RESOURCE_TYPE_SCAFFOLDER_TASK"],"mappings":";;;;AAiDO,SAAS,8BACd,
|
|
1
|
+
{"version":3,"file":"permissions.cjs.js","sources":["../../src/service/permissions.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 { PermissionRule } from '@backstage/plugin-permission-node';\nimport {\n TemplateEntityStepV1beta3,\n TemplateParametersV1beta3,\n} from '@backstage/plugin-scaffolder-common';\nimport {\n RESOURCE_TYPE_SCAFFOLDER_ACTION,\n RESOURCE_TYPE_SCAFFOLDER_TASK,\n RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n} from '@backstage/plugin-scaffolder-common/alpha';\nimport { PermissionRuleParams } from '@backstage/plugin-permission-common';\nimport { SerializedTask } from '@backstage/plugin-scaffolder-node';\n\n/**\n *\n * @public\n */\nexport type ScaffolderPermissionRuleInput =\n | TemplatePermissionRuleInput\n | ActionPermissionRuleInput\n | TaskPermissionRuleInput;\n\n/**\n * @public\n */\nexport type TemplatePermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n TemplateEntityStepV1beta3 | TemplateParametersV1beta3,\n {},\n typeof RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n TParams\n>;\nexport function isTemplatePermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is TemplatePermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_TEMPLATE;\n}\n\n/**\n *\n * @public\n */\nexport type ActionPermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n TemplateEntityStepV1beta3 | TemplateParametersV1beta3,\n {},\n typeof RESOURCE_TYPE_SCAFFOLDER_ACTION,\n TParams\n>;\nexport function isActionPermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is ActionPermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_ACTION;\n}\n\n/**\n * @public\n */\nexport type TaskPermissionRuleInput<\n TParams extends PermissionRuleParams = PermissionRuleParams,\n> = PermissionRule<\n SerializedTask,\n {\n key: string;\n values?: string[];\n },\n typeof RESOURCE_TYPE_SCAFFOLDER_TASK,\n TParams\n>;\nexport function isTaskPermissionRuleInput(\n permissionRule: ScaffolderPermissionRuleInput,\n): permissionRule is TaskPermissionRuleInput {\n return permissionRule.resourceType === RESOURCE_TYPE_SCAFFOLDER_TASK;\n}\n"],"names":["RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","RESOURCE_TYPE_SCAFFOLDER_ACTION","RESOURCE_TYPE_SCAFFOLDER_TASK"],"mappings":";;;;AAiDO,SAAS,8BACd,cAAA,EAC+C;AAC/C,EAAA,OAAO,eAAe,YAAA,KAAiBA,uCAAA;AACzC;AAcO,SAAS,4BACd,cAAA,EAC6C;AAC7C,EAAA,OAAO,eAAe,YAAA,KAAiBC,qCAAA;AACzC;AAgBO,SAAS,0BACd,cAAA,EAC2C;AAC3C,EAAA,OAAO,eAAe,YAAA,KAAiBC,mCAAA;AACzC;;;;;;"}
|
|
@@ -212,7 +212,14 @@ async function createRouter(options) {
|
|
|
212
212
|
{
|
|
213
213
|
resourceType: alpha.RESOURCE_TYPE_SCAFFOLDER_TASK,
|
|
214
214
|
permissions: alpha.scaffolderTaskPermissions,
|
|
215
|
-
rules: taskRules
|
|
215
|
+
rules: taskRules,
|
|
216
|
+
getResources: async (resourceRefs) => {
|
|
217
|
+
return Promise.all(
|
|
218
|
+
resourceRefs.map(async (taskId) => {
|
|
219
|
+
return await taskBroker.get(taskId);
|
|
220
|
+
})
|
|
221
|
+
);
|
|
222
|
+
}
|
|
216
223
|
}
|
|
217
224
|
],
|
|
218
225
|
permissions: alpha.scaffolderPermissions
|