@backstage/plugin-scaffolder-common 2.0.1-next.0 → 2.1.1-next.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 +26 -0
- package/dist/Template.v1beta3.schema.json.cjs.js +16 -2
- package/dist/Template.v1beta3.schema.json.cjs.js.map +1 -1
- package/dist/Template.v1beta3.schema.json.esm.js +16 -2
- package/dist/Template.v1beta3.schema.json.esm.js.map +1 -1
- package/dist/TemplateEntityV1beta3.esm.js +2 -2
- package/dist/TemplateEntityV1beta3.esm.js.map +1 -1
- package/dist/alpha.cjs.js +2 -0
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +9 -1
- package/dist/alpha.esm.js +1 -0
- package/dist/alpha.esm.js.map +1 -1
- package/dist/catalogModel.cjs.js +40 -0
- package/dist/catalogModel.cjs.js.map +1 -0
- package/dist/catalogModel.esm.js +38 -0
- package/dist/catalogModel.esm.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-common
|
|
2
2
|
|
|
3
|
+
## 2.1.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/errors@1.3.1-next.0
|
|
9
|
+
- @backstage/integration@2.0.2-next.0
|
|
10
|
+
- @backstage/catalog-model@1.8.1-next.0
|
|
11
|
+
- @backstage/plugin-permission-common@0.9.9-next.0
|
|
12
|
+
- @backstage/types@1.2.2
|
|
13
|
+
|
|
14
|
+
## 2.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- e5fcfcb: Added `scaffolderCatalogModelLayer`, a Template kind model layer with JSON Schema definition, serving as an example of how plugins can declare their own catalog entity kinds.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 3ef6078: Added optional `if` property to `ScaffolderOutputLink` and `ScaffolderOutputText` types, allowing template authors to conditionally include output links and text items.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/errors@1.3.0
|
|
25
|
+
- @backstage/catalog-model@1.8.0
|
|
26
|
+
- @backstage/integration@2.0.1
|
|
27
|
+
- @backstage/plugin-permission-common@0.9.8
|
|
28
|
+
|
|
3
29
|
## 2.0.1-next.0
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -300,6 +300,13 @@ var allOf = [
|
|
|
300
300
|
required: [
|
|
301
301
|
],
|
|
302
302
|
properties: {
|
|
303
|
+
"if": {
|
|
304
|
+
type: [
|
|
305
|
+
"string",
|
|
306
|
+
"boolean"
|
|
307
|
+
],
|
|
308
|
+
description: "A templated condition that excludes this link when evaluated to false. If the condition is true or not defined, the link is included. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`."
|
|
309
|
+
},
|
|
303
310
|
url: {
|
|
304
311
|
type: "string",
|
|
305
312
|
description: "A url in a standard uri format.",
|
|
@@ -343,6 +350,13 @@ var allOf = [
|
|
|
343
350
|
required: [
|
|
344
351
|
],
|
|
345
352
|
properties: {
|
|
353
|
+
"if": {
|
|
354
|
+
type: [
|
|
355
|
+
"string",
|
|
356
|
+
"boolean"
|
|
357
|
+
],
|
|
358
|
+
description: "A templated condition that excludes this text when evaluated to false. If the condition is true or not defined, the text is included. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`."
|
|
359
|
+
},
|
|
346
360
|
title: {
|
|
347
361
|
type: "string",
|
|
348
362
|
description: "A user friendly display name for the text.",
|
|
@@ -379,7 +393,7 @@ var allOf = [
|
|
|
379
393
|
}
|
|
380
394
|
}
|
|
381
395
|
];
|
|
382
|
-
var
|
|
396
|
+
var jsonSchema = {
|
|
383
397
|
$schema: $schema,
|
|
384
398
|
$id: $id,
|
|
385
399
|
description: description,
|
|
@@ -390,7 +404,7 @@ var schema = {
|
|
|
390
404
|
exports.$id = $id;
|
|
391
405
|
exports.$schema = $schema;
|
|
392
406
|
exports.allOf = allOf;
|
|
393
|
-
exports.default =
|
|
407
|
+
exports.default = jsonSchema;
|
|
394
408
|
exports.description = description;
|
|
395
409
|
exports.examples = examples;
|
|
396
410
|
//# sourceMappingURL=Template.v1beta3.schema.json.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Template.v1beta3.schema.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Template.v1beta3.schema.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -296,6 +296,13 @@ var allOf = [
|
|
|
296
296
|
required: [
|
|
297
297
|
],
|
|
298
298
|
properties: {
|
|
299
|
+
"if": {
|
|
300
|
+
type: [
|
|
301
|
+
"string",
|
|
302
|
+
"boolean"
|
|
303
|
+
],
|
|
304
|
+
description: "A templated condition that excludes this link when evaluated to false. If the condition is true or not defined, the link is included. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`."
|
|
305
|
+
},
|
|
299
306
|
url: {
|
|
300
307
|
type: "string",
|
|
301
308
|
description: "A url in a standard uri format.",
|
|
@@ -339,6 +346,13 @@ var allOf = [
|
|
|
339
346
|
required: [
|
|
340
347
|
],
|
|
341
348
|
properties: {
|
|
349
|
+
"if": {
|
|
350
|
+
type: [
|
|
351
|
+
"string",
|
|
352
|
+
"boolean"
|
|
353
|
+
],
|
|
354
|
+
description: "A templated condition that excludes this text when evaluated to false. If the condition is true or not defined, the text is included. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`."
|
|
355
|
+
},
|
|
342
356
|
title: {
|
|
343
357
|
type: "string",
|
|
344
358
|
description: "A user friendly display name for the text.",
|
|
@@ -375,7 +389,7 @@ var allOf = [
|
|
|
375
389
|
}
|
|
376
390
|
}
|
|
377
391
|
];
|
|
378
|
-
var
|
|
392
|
+
var jsonSchema = {
|
|
379
393
|
$schema: $schema,
|
|
380
394
|
$id: $id,
|
|
381
395
|
description: description,
|
|
@@ -383,5 +397,5 @@ var schema = {
|
|
|
383
397
|
allOf: allOf
|
|
384
398
|
};
|
|
385
399
|
|
|
386
|
-
export { $id, $schema, allOf,
|
|
400
|
+
export { $id, $schema, allOf, jsonSchema as default, description, examples };
|
|
387
401
|
//# sourceMappingURL=Template.v1beta3.schema.json.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Template.v1beta3.schema.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Template.v1beta3.schema.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { entityKindSchemaValidator } from '@backstage/catalog-model';
|
|
2
|
-
import
|
|
2
|
+
import jsonSchema from './Template.v1beta3.schema.json.esm.js';
|
|
3
3
|
|
|
4
|
-
const validator = entityKindSchemaValidator(
|
|
4
|
+
const validator = entityKindSchemaValidator(jsonSchema);
|
|
5
5
|
const templateEntityV1beta3Validator = {
|
|
6
6
|
// TODO(freben): Emulate the old KindValidator until we fix that type
|
|
7
7
|
async check(data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateEntityV1beta3.esm.js","sources":["../src/TemplateEntityV1beta3.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 Entity,\n entityKindSchemaValidator,\n KindValidator,\n} from '@backstage/catalog-model';\nimport { JsonObject } from '@backstage/types';\nimport schema from './Template.v1beta3.schema.json';\n\n/**\n * Backstage catalog Template kind Entity. Templates are used by the Scaffolder\n * plugin to create new entities, such as Components.\n *\n * @public\n */\nexport interface TemplateEntityV1beta3 extends Entity {\n /**\n * The apiVersion string of the TaskSpec.\n */\n apiVersion: 'scaffolder.backstage.io/v1beta3';\n /**\n * The kind of the entity\n */\n kind: 'Template';\n /**\n * The specification of the Template Entity\n */\n spec: {\n /**\n * The type that the Template will create. For example service, website or library.\n */\n type: string;\n\n /**\n * Template specific configuration of the presentation layer.\n */\n presentation?: TemplatePresentationV1beta3;\n\n /**\n * Recovery strategy for the template\n */\n EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3;\n\n /**\n * Form hooks to be run\n */\n EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];\n\n /**\n * This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend\n * to collect user input and validate it against that schema. This can then be used in the `steps` part below to template\n * variables passed from the user into each action in the template.\n */\n parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[];\n /**\n * Configuration for secrets that are passed during task creation.\n * The schema field contains a JSONSchema used to validate secrets.\n */\n secrets?: {\n schema?: JsonObject;\n };\n /**\n * A list of steps to be executed in sequence which are defined by the template. These steps are a list of the underlying\n * javascript action and some optional input parameters that may or may not have been collected from the end user.\n */\n steps: Array<TemplateEntityStepV1beta3>;\n /**\n * The output is an object where template authors can pull out information from template actions and return them in a known standard way.\n */\n output?: { [name: string]: string };\n /**\n * The owner entityRef of the TemplateEntity\n */\n owner?: string;\n /**\n * Specifies the lifecycle phase of the TemplateEntity\n */\n lifecycle?: string;\n };\n}\n\n/**\n * Depends on how you designed your task you might tailor the behaviour for each of them.\n *\n * @public\n */\nexport interface TemplateRecoveryV1beta3 extends JsonObject {\n /**\n *\n * none - not recover, let the task be marked as failed\n * startOver - do recover, start the execution of the task from the first step.\n *\n * @public\n */\n EXPERIMENTAL_strategy?: 'none' | 'startOver';\n}\n\n/**\n * The presentation of the template.\n *\n * @public\n */\nexport interface TemplatePresentationV1beta3 extends JsonObject {\n /**\n * Overrides default buttons' text\n */\n buttonLabels?: {\n /**\n * The text for the button which leads to the previous template page\n */\n backButtonText?: string;\n /**\n * The text for the button which starts the execution of the template\n */\n createButtonText?: string;\n /**\n * The text for the button which opens template's review/summary\n */\n reviewButtonText?: string;\n };\n}\n\n/**\n * Step that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateEntityStepV1beta3 extends JsonObject {\n id?: string;\n name?: string;\n action: string;\n input?: JsonObject;\n if?: string | boolean;\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * The shape of each entry of parameters which gets rendered\n * as a separate step in the wizard input\n *\n * @public\n */\nexport type TemplateParameterSchema = {\n title: string;\n description?: string;\n presentation?: TemplatePresentationV1beta3;\n steps: Array<{\n title: string;\n description?: string;\n schema: JsonObject;\n }>;\n EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];\n};\n\n/**\n * Parameter that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateParametersV1beta3 extends JsonObject {\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Access control properties for parts of a template.\n *\n * @public\n */\nexport interface TemplatePermissionsV1beta3 extends JsonObject {\n tags?: string[];\n}\n\nconst validator = entityKindSchemaValidator(schema);\n\n/**\n * Entity data validator for {@link TemplateEntityV1beta3}.\n *\n * @public\n */\nexport const templateEntityV1beta3Validator: KindValidator = {\n // TODO(freben): Emulate the old KindValidator until we fix that type\n async check(data: Entity) {\n return validator(data) === data;\n },\n};\n\n/**\n * Typeguard for filtering entities and ensuring v1beta3 entities\n * @public\n */\nexport const isTemplateEntityV1beta3 = (\n entity: Entity,\n): entity is TemplateEntityV1beta3 =>\n entity.apiVersion === 'scaffolder.backstage.io/v1beta3' &&\n entity.kind === 'Template';\n"],"names":[],"mappings":";;;AA2LA,MAAM,SAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"TemplateEntityV1beta3.esm.js","sources":["../src/TemplateEntityV1beta3.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 Entity,\n entityKindSchemaValidator,\n KindValidator,\n} from '@backstage/catalog-model';\nimport { JsonObject } from '@backstage/types';\nimport schema from './Template.v1beta3.schema.json';\n\n/**\n * Backstage catalog Template kind Entity. Templates are used by the Scaffolder\n * plugin to create new entities, such as Components.\n *\n * @public\n */\nexport interface TemplateEntityV1beta3 extends Entity {\n /**\n * The apiVersion string of the TaskSpec.\n */\n apiVersion: 'scaffolder.backstage.io/v1beta3';\n /**\n * The kind of the entity\n */\n kind: 'Template';\n /**\n * The specification of the Template Entity\n */\n spec: {\n /**\n * The type that the Template will create. For example service, website or library.\n */\n type: string;\n\n /**\n * Template specific configuration of the presentation layer.\n */\n presentation?: TemplatePresentationV1beta3;\n\n /**\n * Recovery strategy for the template\n */\n EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3;\n\n /**\n * Form hooks to be run\n */\n EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];\n\n /**\n * This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend\n * to collect user input and validate it against that schema. This can then be used in the `steps` part below to template\n * variables passed from the user into each action in the template.\n */\n parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[];\n /**\n * Configuration for secrets that are passed during task creation.\n * The schema field contains a JSONSchema used to validate secrets.\n */\n secrets?: {\n schema?: JsonObject;\n };\n /**\n * A list of steps to be executed in sequence which are defined by the template. These steps are a list of the underlying\n * javascript action and some optional input parameters that may or may not have been collected from the end user.\n */\n steps: Array<TemplateEntityStepV1beta3>;\n /**\n * The output is an object where template authors can pull out information from template actions and return them in a known standard way.\n */\n output?: { [name: string]: string };\n /**\n * The owner entityRef of the TemplateEntity\n */\n owner?: string;\n /**\n * Specifies the lifecycle phase of the TemplateEntity\n */\n lifecycle?: string;\n };\n}\n\n/**\n * Depends on how you designed your task you might tailor the behaviour for each of them.\n *\n * @public\n */\nexport interface TemplateRecoveryV1beta3 extends JsonObject {\n /**\n *\n * none - not recover, let the task be marked as failed\n * startOver - do recover, start the execution of the task from the first step.\n *\n * @public\n */\n EXPERIMENTAL_strategy?: 'none' | 'startOver';\n}\n\n/**\n * The presentation of the template.\n *\n * @public\n */\nexport interface TemplatePresentationV1beta3 extends JsonObject {\n /**\n * Overrides default buttons' text\n */\n buttonLabels?: {\n /**\n * The text for the button which leads to the previous template page\n */\n backButtonText?: string;\n /**\n * The text for the button which starts the execution of the template\n */\n createButtonText?: string;\n /**\n * The text for the button which opens template's review/summary\n */\n reviewButtonText?: string;\n };\n}\n\n/**\n * Step that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateEntityStepV1beta3 extends JsonObject {\n id?: string;\n name?: string;\n action: string;\n input?: JsonObject;\n if?: string | boolean;\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * The shape of each entry of parameters which gets rendered\n * as a separate step in the wizard input\n *\n * @public\n */\nexport type TemplateParameterSchema = {\n title: string;\n description?: string;\n presentation?: TemplatePresentationV1beta3;\n steps: Array<{\n title: string;\n description?: string;\n schema: JsonObject;\n }>;\n EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];\n};\n\n/**\n * Parameter that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateParametersV1beta3 extends JsonObject {\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Access control properties for parts of a template.\n *\n * @public\n */\nexport interface TemplatePermissionsV1beta3 extends JsonObject {\n tags?: string[];\n}\n\nconst validator = entityKindSchemaValidator(schema);\n\n/**\n * Entity data validator for {@link TemplateEntityV1beta3}.\n *\n * @public\n */\nexport const templateEntityV1beta3Validator: KindValidator = {\n // TODO(freben): Emulate the old KindValidator until we fix that type\n async check(data: Entity) {\n return validator(data) === data;\n },\n};\n\n/**\n * Typeguard for filtering entities and ensuring v1beta3 entities\n * @public\n */\nexport const isTemplateEntityV1beta3 = (\n entity: Entity,\n): entity is TemplateEntityV1beta3 =>\n entity.apiVersion === 'scaffolder.backstage.io/v1beta3' &&\n entity.kind === 'Template';\n"],"names":["schema"],"mappings":";;;AA2LA,MAAM,SAAA,GAAY,0BAA0BA,UAAM,CAAA;AAO3C,MAAM,8BAAA,GAAgD;AAAA;AAAA,EAE3D,MAAM,MAAM,IAAA,EAAc;AACxB,IAAA,OAAO,SAAA,CAAU,IAAI,CAAA,KAAM,IAAA;AAAA,EAC7B;AACF;AAMO,MAAM,0BAA0B,CACrC,MAAA,KAEA,OAAO,UAAA,KAAe,iCAAA,IACtB,OAAO,IAAA,KAAS;;;;"}
|
package/dist/alpha.cjs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var permissions = require('./permissions.cjs.js');
|
|
4
|
+
var catalogModel = require('./catalogModel.cjs.js');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
@@ -18,4 +19,5 @@ exports.taskReadPermission = permissions.taskReadPermission;
|
|
|
18
19
|
exports.templateManagementPermission = permissions.templateManagementPermission;
|
|
19
20
|
exports.templateParameterReadPermission = permissions.templateParameterReadPermission;
|
|
20
21
|
exports.templateStepReadPermission = permissions.templateStepReadPermission;
|
|
22
|
+
exports.scaffolderCatalogModelLayer = catalogModel.scaffolderCatalogModelLayer;
|
|
21
23
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
2
|
+
import * as _backstage_catalog_model_alpha from '@backstage/catalog-model/alpha';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Permission resource type which corresponds to a scaffolder templates.
|
|
@@ -93,4 +94,11 @@ declare const scaffolderTaskPermissions: (_backstage_plugin_permission_common.Ba
|
|
|
93
94
|
*/
|
|
94
95
|
declare const scaffolderPermissions: (_backstage_plugin_permission_common.BasicPermission | _backstage_plugin_permission_common.ResourcePermission<"scaffolder-action"> | _backstage_plugin_permission_common.ResourcePermission<"scaffolder-template"> | _backstage_plugin_permission_common.ResourcePermission<"scaffolder-task">)[];
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Extends the catalog model with the Template kind.
|
|
99
|
+
*
|
|
100
|
+
* @alpha
|
|
101
|
+
*/
|
|
102
|
+
declare const scaffolderCatalogModelLayer: _backstage_catalog_model_alpha.CatalogModelLayer;
|
|
103
|
+
|
|
104
|
+
export { RESOURCE_TYPE_SCAFFOLDER_ACTION, RESOURCE_TYPE_SCAFFOLDER_TASK, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, actionExecutePermission, scaffolderActionPermissions, scaffolderCatalogModelLayer, scaffolderPermissions, scaffolderTaskPermissions, scaffolderTemplatePermissions, taskCancelPermission, taskCreatePermission, taskReadPermission, templateManagementPermission, templateParameterReadPermission, templateStepReadPermission };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { RESOURCE_TYPE_SCAFFOLDER_ACTION, RESOURCE_TYPE_SCAFFOLDER_TASK, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, actionExecutePermission, scaffolderActionPermissions, scaffolderPermissions, scaffolderTaskPermissions, scaffolderTemplatePermissions, taskCancelPermission, taskCreatePermission, taskReadPermission, templateManagementPermission, templateParameterReadPermission, templateStepReadPermission } from './permissions.esm.js';
|
|
2
|
+
export { scaffolderCatalogModelLayer } from './catalogModel.esm.js';
|
|
2
3
|
//# sourceMappingURL=alpha.esm.js.map
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var alpha = require('@backstage/catalog-model/alpha');
|
|
4
|
+
var Template_v1beta3_schema = require('./Template.v1beta3.schema.json.cjs.js');
|
|
5
|
+
|
|
6
|
+
const scaffolderCatalogModelLayer = alpha.createCatalogModelLayer({
|
|
7
|
+
layerId: "scaffolder.backstage.io/kind-template",
|
|
8
|
+
builder: (model) => {
|
|
9
|
+
model.addKind({
|
|
10
|
+
group: "scaffolder.backstage.io",
|
|
11
|
+
names: {
|
|
12
|
+
kind: "Template",
|
|
13
|
+
singular: "template",
|
|
14
|
+
plural: "templates"
|
|
15
|
+
},
|
|
16
|
+
description: "A template for scaffolding a new component",
|
|
17
|
+
versions: [
|
|
18
|
+
{
|
|
19
|
+
name: "v1beta3",
|
|
20
|
+
relationFields: [
|
|
21
|
+
{
|
|
22
|
+
selector: { path: "spec.owner" },
|
|
23
|
+
relation: "ownedBy",
|
|
24
|
+
defaultKind: "Group",
|
|
25
|
+
// TODO: This was inherit since before, but should ownership in general be default instead?
|
|
26
|
+
defaultNamespace: "inherit",
|
|
27
|
+
allowedKinds: ["Group", "User"]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
schema: {
|
|
31
|
+
jsonSchema: Template_v1beta3_schema.default
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
exports.scaffolderCatalogModelLayer = scaffolderCatalogModelLayer;
|
|
40
|
+
//# sourceMappingURL=catalogModel.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogModel.cjs.js","sources":["../src/catalogModel.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { createCatalogModelLayer } from '@backstage/catalog-model/alpha';\nimport type { JsonObject } from '@backstage/types';\nimport jsonSchema from './Template.v1beta3.schema.json';\n\n/**\n * Extends the catalog model with the Template kind.\n *\n * @alpha\n */\nexport const scaffolderCatalogModelLayer = createCatalogModelLayer({\n layerId: 'scaffolder.backstage.io/kind-template',\n builder: model => {\n model.addKind({\n group: 'scaffolder.backstage.io',\n names: {\n kind: 'Template',\n singular: 'template',\n plural: 'templates',\n },\n description: 'A template for scaffolding a new component',\n versions: [\n {\n name: 'v1beta3',\n relationFields: [\n {\n selector: { path: 'spec.owner' },\n relation: 'ownedBy',\n defaultKind: 'Group',\n // TODO: This was inherit since before, but should ownership in general be default instead?\n defaultNamespace: 'inherit',\n allowedKinds: ['Group', 'User'],\n },\n ],\n schema: {\n jsonSchema: jsonSchema as JsonObject,\n },\n },\n ],\n });\n },\n});\n"],"names":["createCatalogModelLayer","jsonSchema"],"mappings":";;;;;AAyBO,MAAM,8BAA8BA,6BAAA,CAAwB;AAAA,EACjE,OAAA,EAAS,uCAAA;AAAA,EACT,SAAS,CAAA,KAAA,KAAS;AAChB,IAAA,KAAA,CAAM,OAAA,CAAQ;AAAA,MACZ,KAAA,EAAO,yBAAA;AAAA,MACP,KAAA,EAAO;AAAA,QACL,IAAA,EAAM,UAAA;AAAA,QACN,QAAA,EAAU,UAAA;AAAA,QACV,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,WAAA,EAAa,4CAAA;AAAA,MACb,QAAA,EAAU;AAAA,QACR;AAAA,UACE,IAAA,EAAM,SAAA;AAAA,UACN,cAAA,EAAgB;AAAA,YACd;AAAA,cACE,QAAA,EAAU,EAAE,IAAA,EAAM,YAAA,EAAa;AAAA,cAC/B,QAAA,EAAU,SAAA;AAAA,cACV,WAAA,EAAa,OAAA;AAAA;AAAA,cAEb,gBAAA,EAAkB,SAAA;AAAA,cAClB,YAAA,EAAc,CAAC,OAAA,EAAS,MAAM;AAAA;AAChC,WACF;AAAA,UACA,MAAA,EAAQ;AAAA,wBACNC;AAAA;AACF;AACF;AACF,KACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createCatalogModelLayer } from '@backstage/catalog-model/alpha';
|
|
2
|
+
import jsonSchema from './Template.v1beta3.schema.json.esm.js';
|
|
3
|
+
|
|
4
|
+
const scaffolderCatalogModelLayer = createCatalogModelLayer({
|
|
5
|
+
layerId: "scaffolder.backstage.io/kind-template",
|
|
6
|
+
builder: (model) => {
|
|
7
|
+
model.addKind({
|
|
8
|
+
group: "scaffolder.backstage.io",
|
|
9
|
+
names: {
|
|
10
|
+
kind: "Template",
|
|
11
|
+
singular: "template",
|
|
12
|
+
plural: "templates"
|
|
13
|
+
},
|
|
14
|
+
description: "A template for scaffolding a new component",
|
|
15
|
+
versions: [
|
|
16
|
+
{
|
|
17
|
+
name: "v1beta3",
|
|
18
|
+
relationFields: [
|
|
19
|
+
{
|
|
20
|
+
selector: { path: "spec.owner" },
|
|
21
|
+
relation: "ownedBy",
|
|
22
|
+
defaultKind: "Group",
|
|
23
|
+
// TODO: This was inherit since before, but should ownership in general be default instead?
|
|
24
|
+
defaultNamespace: "inherit",
|
|
25
|
+
allowedKinds: ["Group", "User"]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
schema: {
|
|
29
|
+
jsonSchema
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { scaffolderCatalogModelLayer };
|
|
38
|
+
//# sourceMappingURL=catalogModel.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogModel.esm.js","sources":["../src/catalogModel.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { createCatalogModelLayer } from '@backstage/catalog-model/alpha';\nimport type { JsonObject } from '@backstage/types';\nimport jsonSchema from './Template.v1beta3.schema.json';\n\n/**\n * Extends the catalog model with the Template kind.\n *\n * @alpha\n */\nexport const scaffolderCatalogModelLayer = createCatalogModelLayer({\n layerId: 'scaffolder.backstage.io/kind-template',\n builder: model => {\n model.addKind({\n group: 'scaffolder.backstage.io',\n names: {\n kind: 'Template',\n singular: 'template',\n plural: 'templates',\n },\n description: 'A template for scaffolding a new component',\n versions: [\n {\n name: 'v1beta3',\n relationFields: [\n {\n selector: { path: 'spec.owner' },\n relation: 'ownedBy',\n defaultKind: 'Group',\n // TODO: This was inherit since before, but should ownership in general be default instead?\n defaultNamespace: 'inherit',\n allowedKinds: ['Group', 'User'],\n },\n ],\n schema: {\n jsonSchema: jsonSchema as JsonObject,\n },\n },\n ],\n });\n },\n});\n"],"names":[],"mappings":";;;AAyBO,MAAM,8BAA8B,uBAAA,CAAwB;AAAA,EACjE,OAAA,EAAS,uCAAA;AAAA,EACT,SAAS,CAAA,KAAA,KAAS;AAChB,IAAA,KAAA,CAAM,OAAA,CAAQ;AAAA,MACZ,KAAA,EAAO,yBAAA;AAAA,MACP,KAAA,EAAO;AAAA,QACL,IAAA,EAAM,UAAA;AAAA,QACN,QAAA,EAAU,UAAA;AAAA,QACV,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,WAAA,EAAa,4CAAA;AAAA,MACb,QAAA,EAAU;AAAA,QACR;AAAA,UACE,IAAA,EAAM,SAAA;AAAA,UACN,cAAA,EAAgB;AAAA,YACd;AAAA,cACE,QAAA,EAAU,EAAE,IAAA,EAAM,YAAA,EAAa;AAAA,cAC/B,QAAA,EAAU,SAAA;AAAA,cACV,WAAA,EAAa,OAAA;AAAA;AAAA,cAEb,gBAAA,EAAkB,SAAA;AAAA,cAClB,YAAA,EAAc,CAAC,OAAA,EAAS,MAAM;AAAA;AAChC,WACF;AAAA,UACA,MAAA,EAAQ;AAAA,YACN;AAAA;AACF;AACF;AACF,KACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -420,6 +420,7 @@ type ListTemplatingExtensionsResponse = {
|
|
|
420
420
|
};
|
|
421
421
|
/** @public */
|
|
422
422
|
type ScaffolderOutputLink = {
|
|
423
|
+
if?: string | boolean;
|
|
423
424
|
title?: string;
|
|
424
425
|
icon?: string;
|
|
425
426
|
url?: string;
|
|
@@ -427,6 +428,7 @@ type ScaffolderOutputLink = {
|
|
|
427
428
|
};
|
|
428
429
|
/** @public */
|
|
429
430
|
type ScaffolderOutputText = {
|
|
431
|
+
if?: string | boolean;
|
|
430
432
|
title?: string;
|
|
431
433
|
icon?: string;
|
|
432
434
|
content?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1-next.0",
|
|
4
4
|
"description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "common-library",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"test": "backstage-cli package test"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@backstage/catalog-model": "1.
|
|
74
|
-
"@backstage/errors": "1.3.
|
|
75
|
-
"@backstage/integration": "2.0.
|
|
76
|
-
"@backstage/plugin-permission-common": "0.9.
|
|
73
|
+
"@backstage/catalog-model": "1.8.1-next.0",
|
|
74
|
+
"@backstage/errors": "1.3.1-next.0",
|
|
75
|
+
"@backstage/integration": "2.0.2-next.0",
|
|
76
|
+
"@backstage/plugin-permission-common": "0.9.9-next.0",
|
|
77
77
|
"@backstage/types": "1.2.2",
|
|
78
78
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
79
79
|
"@types/json-schema": "^7.0.9",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"zen-observable": "^0.10.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@backstage/cli": "0.36.
|
|
87
|
-
"@backstage/test-utils": "1.7.
|
|
86
|
+
"@backstage/cli": "0.36.2-next.0",
|
|
87
|
+
"@backstage/test-utils": "1.7.18-next.0",
|
|
88
88
|
"msw": "^1.0.0"
|
|
89
89
|
},
|
|
90
90
|
"module": "./dist/index.esm.js"
|