@backstage/plugin-scaffolder-backend 1.13.0-next.2 → 1.13.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 +85 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +24 -14
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +57 -16
- package/dist/cjs/{ScaffolderEntitiesProcessor-21c74c4d.cjs.js → ScaffolderEntitiesProcessor-2f24bb9e.cjs.js} +188 -52
- package/dist/cjs/ScaffolderEntitiesProcessor-2f24bb9e.cjs.js.map +1 -0
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/package.json +18 -18
- package/dist/cjs/ScaffolderEntitiesProcessor-21c74c4d.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2b15cb4aa0a: The non-PR/MR Git Actions now return the commit hash of the commit pushed as a new output called `commitHash`, isomorphic-git is now on version 1.23.0
|
|
8
|
+
- 30ffdae70f9: Added `fetch:plain:file` action to fetch a single file, this action is also added to the list of built-in actions.
|
|
9
|
+
- 65e989f4018: Added the possibility to authorize parameters and steps of a template
|
|
10
|
+
|
|
11
|
+
The scaffolder plugin is now integrated with the permission framework.
|
|
12
|
+
It is possible to toggle parameters or actions within templates by marking each section with specific `tags`, inside a `backstage:permissions` property under each parameter or action. Each parameter or action can then be permissioned by using a conditional decision containing the `scaffolderTemplateRules.hasTag` rule.
|
|
13
|
+
|
|
14
|
+
- 3b68b09fc2d: Renamed permissionApi router option to permissions
|
|
15
|
+
- bcae5aaf25c: Added the possibility to authorize actions
|
|
16
|
+
|
|
17
|
+
It is now possible to decide who should be able to execute certain actions or who should be able to pass specific input to specified actions.
|
|
18
|
+
|
|
19
|
+
Some of the existing utility functions for creating conditional decisions have been renamed:
|
|
20
|
+
|
|
21
|
+
- `createScaffolderConditionalDecision` has been renamed to `createScaffolderActionConditionalDecision`
|
|
22
|
+
- `scaffolderConditions` has been renamed to `scaffolderTemplateConditions`
|
|
23
|
+
|
|
24
|
+
- d7c8c222e25: Allow for a commit message to differ from the PR title when publishing a GitHub pull request.
|
|
25
|
+
- 95ea9f69b6f: Provide some more default filters out of the box and refactoring how the filters are applied to the `SecureTemplater`.
|
|
26
|
+
|
|
27
|
+
- `parseEntityRef` will take an string entity triplet and return a parsed object.
|
|
28
|
+
- `pick` will allow you to reference a specific property in the piped object.
|
|
29
|
+
|
|
30
|
+
So you can now combine things like this: `${{ parameters.entity | parseEntityRef | pick('name') }}` to get the name of a specific entity, or `${{ parameters.repoUrl | parseRepoUrl | pick('owner') }}` to get the owner of a repo.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- e23abb37ec1: Rename output parameter `mergeRequestURL` of `publish:gitlab:merge-request` action to `mergeRequestUrl`.
|
|
35
|
+
- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template)
|
|
36
|
+
- a7eb36c6e38: Improve type-check for scaffolder output parameters
|
|
37
|
+
- c9a0fdcd2c8: Fix deprecated types.
|
|
38
|
+
- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies.
|
|
39
|
+
- 9c26e6d8ed3: Updated the alpha `scaffolderPlugin` to not require options.
|
|
40
|
+
- f37a95adcd8: Stripped entity types and namespace before passing to GitHub API
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- @backstage/backend-common@0.18.4
|
|
43
|
+
- @backstage/plugin-catalog-backend@1.9.0
|
|
44
|
+
- @backstage/plugin-scaffolder-common@1.2.7
|
|
45
|
+
- @backstage/plugin-scaffolder-node@0.1.2
|
|
46
|
+
- @backstage/catalog-client@1.4.1
|
|
47
|
+
- @backstage/plugin-permission-node@0.7.7
|
|
48
|
+
- @backstage/plugin-permission-common@0.7.5
|
|
49
|
+
- @backstage/backend-tasks@0.5.1
|
|
50
|
+
- @backstage/catalog-model@1.3.0
|
|
51
|
+
- @backstage/integration@1.4.4
|
|
52
|
+
- @backstage/plugin-auth-node@0.2.13
|
|
53
|
+
- @backstage/plugin-catalog-node@1.3.5
|
|
54
|
+
- @backstage/backend-plugin-api@0.5.1
|
|
55
|
+
- @backstage/config@1.0.7
|
|
56
|
+
- @backstage/errors@1.1.5
|
|
57
|
+
- @backstage/types@1.0.2
|
|
58
|
+
- @backstage/plugin-catalog-common@1.0.13
|
|
59
|
+
|
|
60
|
+
## 1.13.0-next.3
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- d7c8c222e25: Allow for a commit message to differ from the PR title when publishing a GitHub pull request.
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- f37a95adcd8: Stripped entity types and namespace before passing to GitHub API
|
|
69
|
+
- Updated dependencies
|
|
70
|
+
- @backstage/plugin-catalog-backend@1.9.0-next.3
|
|
71
|
+
- @backstage/catalog-model@1.3.0-next.0
|
|
72
|
+
- @backstage/backend-common@0.18.4-next.2
|
|
73
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
74
|
+
- @backstage/backend-tasks@0.5.1-next.2
|
|
75
|
+
- @backstage/catalog-client@1.4.1-next.1
|
|
76
|
+
- @backstage/config@1.0.7
|
|
77
|
+
- @backstage/errors@1.1.5
|
|
78
|
+
- @backstage/integration@1.4.4-next.0
|
|
79
|
+
- @backstage/types@1.0.2
|
|
80
|
+
- @backstage/plugin-auth-node@0.2.13-next.2
|
|
81
|
+
- @backstage/plugin-catalog-common@1.0.13-next.1
|
|
82
|
+
- @backstage/plugin-catalog-node@1.3.5-next.3
|
|
83
|
+
- @backstage/plugin-permission-common@0.7.5-next.0
|
|
84
|
+
- @backstage/plugin-permission-node@0.7.7-next.2
|
|
85
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.2
|
|
86
|
+
- @backstage/plugin-scaffolder-node@0.1.2-next.3
|
|
87
|
+
|
|
3
88
|
## 1.13.0-next.2
|
|
4
89
|
|
|
5
90
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
6
|
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
7
|
-
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-
|
|
7
|
+
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-2f24bb9e.cjs.js');
|
|
8
8
|
var alpha$1 = require('@backstage/plugin-scaffolder-common/alpha');
|
|
9
9
|
var pluginPermissionNode = require('@backstage/plugin-permission-node');
|
|
10
10
|
var backendCommon = require('@backstage/backend-common');
|
|
@@ -31,18 +31,19 @@ require('@gitbeaker/node');
|
|
|
31
31
|
require('@octokit/webhooks');
|
|
32
32
|
require('zen-observable');
|
|
33
33
|
require('p-queue');
|
|
34
|
-
require('winston');
|
|
35
|
-
require('nunjucks');
|
|
36
|
-
require('lodash');
|
|
37
|
-
require('jsonschema');
|
|
38
|
-
require('prom-client');
|
|
39
34
|
require('@backstage/plugin-scaffolder-common');
|
|
40
35
|
require('express');
|
|
41
36
|
require('express-promise-router');
|
|
37
|
+
require('jsonschema');
|
|
42
38
|
require('zod');
|
|
43
39
|
require('yaml');
|
|
44
40
|
require('luxon');
|
|
45
41
|
require('uuid');
|
|
42
|
+
require('winston');
|
|
43
|
+
require('nunjucks');
|
|
44
|
+
require('lodash');
|
|
45
|
+
require('prom-client');
|
|
46
|
+
require('@backstage/plugin-permission-common');
|
|
46
47
|
require('url');
|
|
47
48
|
require('os');
|
|
48
49
|
require('@backstage/plugin-catalog-node');
|
|
@@ -62,13 +63,20 @@ const catalogModuleTemplateKind = backendPluginApi.createBackendModule({
|
|
|
62
63
|
}
|
|
63
64
|
});
|
|
64
65
|
|
|
65
|
-
const
|
|
66
|
+
const templateConditionExports = pluginPermissionNode.createConditionExports({
|
|
66
67
|
pluginId: "scaffolder",
|
|
67
68
|
resourceType: alpha$1.RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,
|
|
68
69
|
rules: ScaffolderEntitiesProcessor.scaffolderTemplateRules
|
|
69
70
|
});
|
|
70
|
-
const
|
|
71
|
-
|
|
71
|
+
const actionsConditionExports = pluginPermissionNode.createConditionExports({
|
|
72
|
+
pluginId: "scaffolder",
|
|
73
|
+
resourceType: alpha$1.RESOURCE_TYPE_SCAFFOLDER_ACTION,
|
|
74
|
+
rules: ScaffolderEntitiesProcessor.scaffolderActionRules
|
|
75
|
+
});
|
|
76
|
+
const createScaffolderTemplateConditionalDecision = templateConditionExports.createConditionalDecision;
|
|
77
|
+
const scaffolderTemplateConditions = templateConditionExports.conditions;
|
|
78
|
+
const createScaffolderActionConditionalDecision = actionsConditionExports.createConditionalDecision;
|
|
79
|
+
const scaffolderActionConditions = actionsConditionExports.conditions;
|
|
72
80
|
|
|
73
81
|
var __accessCheck = (obj, member, msg) => {
|
|
74
82
|
if (!member.has(obj))
|
|
@@ -129,9 +137,9 @@ const scaffolderPlugin = backendPluginApi.createBackendPlugin(
|
|
|
129
137
|
taskBroker,
|
|
130
138
|
taskWorkers,
|
|
131
139
|
additionalTemplateGlobals
|
|
132
|
-
} = options;
|
|
140
|
+
} = options != null ? options : {};
|
|
133
141
|
const log = backendCommon.loggerToWinstonLogger(logger);
|
|
134
|
-
const actions = options.actions || [
|
|
142
|
+
const actions = (options == null ? void 0 : options.actions) || [
|
|
135
143
|
...actionsExtensions.actions,
|
|
136
144
|
...ScaffolderEntitiesProcessor.createBuiltinActions({
|
|
137
145
|
integrations: integration.ScmIntegrations.fromConfig(config),
|
|
@@ -157,7 +165,7 @@ const scaffolderPlugin = backendPluginApi.createBackendPlugin(
|
|
|
157
165
|
taskWorkers,
|
|
158
166
|
additionalTemplateFilters,
|
|
159
167
|
additionalTemplateGlobals,
|
|
160
|
-
|
|
168
|
+
permissions
|
|
161
169
|
});
|
|
162
170
|
httpRouter.use(router);
|
|
163
171
|
}
|
|
@@ -167,7 +175,9 @@ const scaffolderPlugin = backendPluginApi.createBackendPlugin(
|
|
|
167
175
|
);
|
|
168
176
|
|
|
169
177
|
exports.catalogModuleTemplateKind = catalogModuleTemplateKind;
|
|
170
|
-
exports.
|
|
171
|
-
exports.
|
|
178
|
+
exports.createScaffolderActionConditionalDecision = createScaffolderActionConditionalDecision;
|
|
179
|
+
exports.createScaffolderTemplateConditionalDecision = createScaffolderTemplateConditionalDecision;
|
|
180
|
+
exports.scaffolderActionConditions = scaffolderActionConditions;
|
|
172
181
|
exports.scaffolderPlugin = scaffolderPlugin;
|
|
182
|
+
exports.scaffolderTemplateConditions = scaffolderTemplateConditions;
|
|
173
183
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/modules/catalogModuleTemplateKind.ts","../src/service/conditionExports.ts","../src/ScaffolderPlugin.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { ScaffolderEntitiesProcessor } from '../processor';\n\n/**\n * Registers support for the Template kind to the catalog backend plugin.\n *\n * @alpha\n */\nexport const catalogModuleTemplateKind = createBackendModule({\n moduleId: 'scaffolder',\n pluginId: 'templateKind',\n register(env) {\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n },\n async init({ catalog }) {\n catalog.addProcessor(new ScaffolderEntitiesProcessor());\n },\n });\n },\n});\n","/*\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 { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE } from '@backstage/plugin-scaffolder-common/alpha';\nimport { createConditionExports } from '@backstage/plugin-permission-node';\nimport { scaffolderTemplateRules } from './rules';\n\nconst { conditions, createConditionalDecision } = createConditionExports({\n pluginId: 'scaffolder',\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n rules: scaffolderTemplateRules,\n});\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 scaffolderConditions = conditions;\n\n/**\n * `createScaffolderConditionalDecision` 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 createScaffolderConditionalDecision = createConditionalDecision;\n","/*\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 createBackendPlugin,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport { ScmIntegrations } from '@backstage/integration';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';\nimport {\n scaffolderActionsExtensionPoint,\n ScaffolderActionsExtensionPoint,\n TemplateAction,\n} from '@backstage/plugin-scaffolder-node';\nimport {\n TemplateFilter,\n TemplateGlobal,\n TaskBroker,\n} from '@backstage/plugin-scaffolder-backend';\nimport { createBuiltinActions } from './scaffolder';\nimport { createRouter } from './service/router';\n\n/**\n * Catalog plugin options\n *\n * @alpha\n */\nexport type ScaffolderPluginOptions = {\n actions?: TemplateAction<any>[];\n taskWorkers?: number;\n taskBroker?: TaskBroker;\n additionalTemplateFilters?: Record<string, TemplateFilter>;\n additionalTemplateGlobals?: Record<string, TemplateGlobal>;\n};\n\nclass ScaffolderActionsExtensionPointImpl\n implements ScaffolderActionsExtensionPoint\n{\n #actions = new Array<TemplateAction<any>>();\n\n addActions(...actions: TemplateAction<any>[]): void {\n this.#actions.push(...actions);\n }\n\n get actions() {\n return this.#actions;\n }\n}\n\n/**\n * Catalog plugin\n *\n * @alpha\n */\nexport const scaffolderPlugin = createBackendPlugin(\n (options: ScaffolderPluginOptions) => ({\n pluginId: 'scaffolder',\n register(env) {\n const actionsExtensions = new ScaffolderActionsExtensionPointImpl();\n\n env.registerExtensionPoint(\n scaffolderActionsExtensionPoint,\n actionsExtensions,\n );\n\n env.registerInit({\n deps: {\n logger: coreServices.logger,\n config: coreServices.config,\n reader: coreServices.urlReader,\n permissions: coreServices.permissions,\n database: coreServices.database,\n httpRouter: coreServices.httpRouter,\n catalogClient: catalogServiceRef,\n },\n async init({\n logger,\n config,\n reader,\n database,\n httpRouter,\n catalogClient,\n permissions,\n }) {\n const {\n additionalTemplateFilters,\n taskBroker,\n taskWorkers,\n additionalTemplateGlobals,\n } = options;\n const log = loggerToWinstonLogger(logger);\n\n const actions = options.actions || [\n ...actionsExtensions.actions,\n ...createBuiltinActions({\n integrations: ScmIntegrations.fromConfig(config),\n catalogClient,\n reader,\n config,\n additionalTemplateFilters,\n additionalTemplateGlobals,\n }),\n ];\n\n const actionIds = actions.map(action => action.id).join(', ');\n log.info(\n `Starting scaffolder with the following actions enabled ${actionIds}`,\n );\n\n const router = await createRouter({\n logger: log,\n config,\n database,\n catalogClient,\n reader,\n actions,\n taskBroker,\n taskWorkers,\n additionalTemplateFilters,\n additionalTemplateGlobals,\n permissionApi: permissions,\n });\n httpRouter.use(router);\n },\n });\n },\n }),\n);\n"],"names":["createBackendModule","catalogProcessingExtensionPoint","ScaffolderEntitiesProcessor","createConditionExports","RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","scaffolderTemplateRules","createBackendPlugin","scaffolderActionsExtensionPoint","coreServices","catalogServiceRef","loggerToWinstonLogger","createBuiltinActions","ScmIntegrations","createRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAM,4BAA4BA,oCAAoB,CAAA;AAAA,EAC3D,QAAU,EAAA,YAAA;AAAA,EACV,QAAU,EAAA,cAAA;AAAA,EACV,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AA;AAAA,WAC5D,CAAA;AAEA,UAAM,MAAA,MAAA,GAAS,MAAMC,wCAAa,CAAA;AAAA,YAChC,MAAQ,EAAA,GAAA;AAAA,YACR,MAAA;AAAA,YACA,QAAA;AAAA,YACA,aAAA;AAAA,YACA,MAAA;AAAA,YACA,OAAA;AAAA,YACA,UAAA;AAAA,YACA,WAAA;AAAA,YACA,yBAAA;AAAA,YACA,yBAAA;AAAA,YACA,aAAe,EAAA,WAAA;AAAA,WAChB,CAAA,CAAA;AACD,UAAA,UAAA,CAAW,IAAI,MAAM,CAAA,CAAA;AAAA,SACvB;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,GACF,CAAA;AACF;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/modules/catalogModuleTemplateKind.ts","../src/service/conditionExports.ts","../src/ScaffolderPlugin.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { ScaffolderEntitiesProcessor } from '../processor';\n\n/**\n * Registers support for the Template kind to the catalog backend plugin.\n *\n * @alpha\n */\nexport const catalogModuleTemplateKind = createBackendModule({\n moduleId: 'scaffolder',\n pluginId: 'templateKind',\n register(env) {\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n },\n async init({ catalog }) {\n catalog.addProcessor(new ScaffolderEntitiesProcessor());\n },\n });\n },\n});\n","/*\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} from '@backstage/plugin-scaffolder-common/alpha';\nimport { createConditionExports } from '@backstage/plugin-permission-node';\nimport { scaffolderTemplateRules, scaffolderActionRules } 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\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 * 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 createBackendPlugin,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport { ScmIntegrations } from '@backstage/integration';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';\nimport {\n scaffolderActionsExtensionPoint,\n ScaffolderActionsExtensionPoint,\n TemplateAction,\n} from '@backstage/plugin-scaffolder-node';\nimport {\n TemplateFilter,\n TemplateGlobal,\n TaskBroker,\n} from '@backstage/plugin-scaffolder-backend';\nimport { createBuiltinActions } from './scaffolder';\nimport { createRouter } from './service/router';\n\n/**\n * Catalog plugin options\n *\n * @alpha\n */\nexport type ScaffolderPluginOptions = {\n actions?: TemplateAction<any>[];\n taskWorkers?: number;\n taskBroker?: TaskBroker;\n additionalTemplateFilters?: Record<string, TemplateFilter>;\n additionalTemplateGlobals?: Record<string, TemplateGlobal>;\n};\n\nclass ScaffolderActionsExtensionPointImpl\n implements ScaffolderActionsExtensionPoint\n{\n #actions = new Array<TemplateAction<any>>();\n\n addActions(...actions: TemplateAction<any>[]): void {\n this.#actions.push(...actions);\n }\n\n get actions() {\n return this.#actions;\n }\n}\n\n/**\n * Catalog plugin\n *\n * @alpha\n */\nexport const scaffolderPlugin = createBackendPlugin(\n (options?: ScaffolderPluginOptions) => ({\n pluginId: 'scaffolder',\n register(env) {\n const actionsExtensions = new ScaffolderActionsExtensionPointImpl();\n\n env.registerExtensionPoint(\n scaffolderActionsExtensionPoint,\n actionsExtensions,\n );\n\n env.registerInit({\n deps: {\n logger: coreServices.logger,\n config: coreServices.config,\n reader: coreServices.urlReader,\n permissions: coreServices.permissions,\n database: coreServices.database,\n httpRouter: coreServices.httpRouter,\n catalogClient: catalogServiceRef,\n },\n async init({\n logger,\n config,\n reader,\n database,\n httpRouter,\n catalogClient,\n permissions,\n }) {\n const {\n additionalTemplateFilters,\n taskBroker,\n taskWorkers,\n additionalTemplateGlobals,\n } = options ?? {};\n const log = loggerToWinstonLogger(logger);\n\n const actions = options?.actions || [\n ...actionsExtensions.actions,\n ...createBuiltinActions({\n integrations: ScmIntegrations.fromConfig(config),\n catalogClient,\n reader,\n config,\n additionalTemplateFilters,\n additionalTemplateGlobals,\n }),\n ];\n\n const actionIds = actions.map(action => action.id).join(', ');\n log.info(\n `Starting scaffolder with the following actions enabled ${actionIds}`,\n );\n\n const router = await createRouter({\n logger: log,\n config,\n database,\n catalogClient,\n reader,\n actions,\n taskBroker,\n taskWorkers,\n additionalTemplateFilters,\n additionalTemplateGlobals,\n permissions,\n });\n httpRouter.use(router);\n },\n });\n },\n }),\n);\n"],"names":["createBackendModule","catalogProcessingExtensionPoint","ScaffolderEntitiesProcessor","createConditionExports","RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","scaffolderTemplateRules","RESOURCE_TYPE_SCAFFOLDER_ACTION","scaffolderActionRules","createBackendPlugin","scaffolderActionsExtensionPoint","coreServices","catalogServiceRef","loggerToWinstonLogger","createBuiltinActions","ScmIntegrations","createRouter"],"mappings":";;;;;;;;;;;;;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CAAA;AAAA,cACtB,YAAA,EAAcC,2BAAgB,CAAA,UAAA,CAAW,MAAM,CAAA;AAAA,cAC/C,aAAA;AAAA,cACA,MAAA;AAAA,cACA,MAAA;AAAA,cACA,yBAAA;AAAA,cACA,yBAAA;AAAA,aACD,CAAA;AAAA,WACH,CAAA;AAEA,UAAM,MAAA,SAAA,GAAY,QAAQ,GAAI,CAAA,CAAA,MAAA,KAAU,OAAO,EAAE,CAAA,CAAE,KAAK,IAAI,CAAA,CAAA;AAC5D,UAAI,GAAA,CAAA,IAAA;AAAA,YACF,CAA0D,uDAAA,EAAA,SAAA,CAAA,CAAA;AAAA,WAC5D,CAAA;AAEA,UAAM,MAAA,MAAA,GAAS,MAAMC,wCAAa,CAAA;AAAA,YAChC,MAAQ,EAAA,GAAA;AAAA,YACR,MAAA;AAAA,YACA,QAAA;AAAA,YACA,aAAA;AAAA,YACA,MAAA;AAAA,YACA,OAAA;AAAA,YACA,UAAA;AAAA,YACA,WAAA;AAAA,YACA,yBAAA;AAAA,YACA,yBAAA;AAAA,YACA,WAAA;AAAA,WACD,CAAA,CAAA;AACD,UAAA,UAAA,CAAW,IAAI,MAAM,CAAA,CAAA;AAAA,SACvB;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,GACF,CAAA;AACF;;;;;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _backstage_types from '@backstage/types';
|
|
3
3
|
import * as _backstage_plugin_permission_node from '@backstage/plugin-permission-node';
|
|
4
4
|
import * as _backstage_plugin_scaffolder_common from '@backstage/plugin-scaffolder-common';
|
|
5
|
+
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
5
6
|
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
|
|
6
7
|
import { TaskBroker, TemplateFilter, TemplateGlobal } from '@backstage/plugin-scaffolder-backend';
|
|
7
8
|
|
|
@@ -13,18 +14,7 @@ import { TaskBroker, TemplateFilter, TemplateGlobal } from '@backstage/plugin-sc
|
|
|
13
14
|
declare const catalogModuleTemplateKind: () => _backstage_backend_plugin_api.BackendFeature;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
* templates that are returned by authorization policies.
|
|
18
|
-
*
|
|
19
|
-
* @alpha
|
|
20
|
-
*/
|
|
21
|
-
declare const scaffolderConditions: _backstage_plugin_permission_node.Conditions<{
|
|
22
|
-
hasTag: _backstage_plugin_permission_node.PermissionRule<_backstage_plugin_scaffolder_common.TemplateParametersV1beta3 | _backstage_plugin_scaffolder_common.TemplateEntityStepV1beta3, {}, "scaffolder-template", {
|
|
23
|
-
tag: string;
|
|
24
|
-
}>;
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* `createScaffolderConditionalDecision` can be used when authoring policies to
|
|
17
|
+
* `createScaffolderTemplateConditionalDecision` can be used when authoring policies to
|
|
28
18
|
* create conditional decisions. It requires a permission of type
|
|
29
19
|
* `ResourcePermission<'scaffolder-template'>` to be passed as the first parameter.
|
|
30
20
|
* It's recommended that you use the provided `isResourcePermission` and
|
|
@@ -55,7 +45,58 @@ declare const scaffolderConditions: _backstage_plugin_permission_node.Conditions
|
|
|
55
45
|
*
|
|
56
46
|
* @alpha
|
|
57
47
|
*/
|
|
58
|
-
declare const
|
|
48
|
+
declare const createScaffolderTemplateConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-template">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-template">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
|
|
49
|
+
/**
|
|
50
|
+
* These conditions are used when creating conditional decisions for scaffolder
|
|
51
|
+
* templates that are returned by authorization policies.
|
|
52
|
+
*
|
|
53
|
+
* @alpha
|
|
54
|
+
*/
|
|
55
|
+
declare const scaffolderTemplateConditions: _backstage_plugin_permission_node.Conditions<{
|
|
56
|
+
hasTag: _backstage_plugin_permission_node.PermissionRule<_backstage_plugin_scaffolder_common.TemplateParametersV1beta3 | _backstage_plugin_scaffolder_common.TemplateEntityStepV1beta3, {}, "scaffolder-template", {
|
|
57
|
+
tag: string;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* @alpha
|
|
62
|
+
*/
|
|
63
|
+
declare const createScaffolderActionConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-action">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-action">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* These conditions are used when creating conditional decisions for scaffolder
|
|
67
|
+
* actions that are returned by authorization policies.
|
|
68
|
+
*
|
|
69
|
+
* @alpha
|
|
70
|
+
*/
|
|
71
|
+
declare const scaffolderActionConditions: _backstage_plugin_permission_node.Conditions<{
|
|
72
|
+
hasActionId: _backstage_plugin_permission_node.PermissionRule<{
|
|
73
|
+
action: string;
|
|
74
|
+
input: _backstage_types.JsonObject | undefined;
|
|
75
|
+
}, {}, "scaffolder-action", {
|
|
76
|
+
actionId: string;
|
|
77
|
+
}>;
|
|
78
|
+
hasBooleanProperty: _backstage_plugin_permission_node.PermissionRule<{
|
|
79
|
+
action: string;
|
|
80
|
+
input: _backstage_types.JsonObject | undefined;
|
|
81
|
+
}, {}, "scaffolder-action", {
|
|
82
|
+
key: string;
|
|
83
|
+
value?: boolean | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
hasNumberProperty: _backstage_plugin_permission_node.PermissionRule<{
|
|
86
|
+
action: string;
|
|
87
|
+
input: _backstage_types.JsonObject | undefined;
|
|
88
|
+
}, {}, "scaffolder-action", {
|
|
89
|
+
key: string;
|
|
90
|
+
value?: number | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
hasStringProperty: _backstage_plugin_permission_node.PermissionRule<{
|
|
93
|
+
action: string;
|
|
94
|
+
input: _backstage_types.JsonObject | undefined;
|
|
95
|
+
}, {}, "scaffolder-action", {
|
|
96
|
+
key: string;
|
|
97
|
+
value?: string | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
}>;
|
|
59
100
|
|
|
60
101
|
/**
|
|
61
102
|
* Catalog plugin options
|
|
@@ -74,6 +115,6 @@ type ScaffolderPluginOptions = {
|
|
|
74
115
|
*
|
|
75
116
|
* @alpha
|
|
76
117
|
*/
|
|
77
|
-
declare const scaffolderPlugin: (options
|
|
118
|
+
declare const scaffolderPlugin: (options?: ScaffolderPluginOptions | undefined) => _backstage_backend_plugin_api.BackendFeature;
|
|
78
119
|
|
|
79
|
-
export { ScaffolderPluginOptions, catalogModuleTemplateKind,
|
|
120
|
+
export { ScaffolderPluginOptions, catalogModuleTemplateKind, createScaffolderActionConditionalDecision, createScaffolderTemplateConditionalDecision, scaffolderActionConditions, scaffolderPlugin, scaffolderTemplateConditions };
|