@backstage/plugin-scaffolder-common
Advanced tools
Comparing version 0.0.0-nightly-20220307022304 to 0.0.0-nightly-20220308022132
# @backstage/plugin-scaffolder-common | ||
## 0.0.0-nightly-20220307022304 | ||
## 0.0.0-nightly-20220308022132 | ||
### Minor Changes | ||
- 310e905998: The following deprecations are now breaking and have been removed: | ||
- **BREAKING**: Support for `backstage.io/v1beta2` Software Templates has been removed. Please migrate your legacy templates to the new `scaffolder.backstage.io/v1beta3` `apiVersion` by following the [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3) | ||
- **BREAKING**: Removed the deprecated `TemplateMetadata`. Please use `TemplateInfo` instead. | ||
- **BREAKING**: Removed the deprecated `context.baseUrl`. It's now available on `context.templateInfo.baseUrl`. | ||
- **BREAKING**: Removed the deprecated `DispatchResult`, use `TaskBrokerDispatchResult` instead. | ||
- **BREAKING**: Removed the deprecated `runCommand`, use `executeShellCommond` instead. | ||
- **BREAKING**: Removed the deprecated `Status` in favour of `TaskStatus` instead. | ||
- **BREAKING**: Removed the deprecated `TaskState` in favour of `CurrentClaimedTask` instead. | ||
### Patch Changes | ||
- Updated dependencies | ||
- @backstage/catalog-model@0.0.0-nightly-20220307022304 | ||
- @backstage/catalog-model@0.0.0-nightly-20220308022132 | ||
@@ -10,0 +28,0 @@ ## 0.2.3 |
@@ -7,230 +7,2 @@ 'use strict'; | ||
var $schema$1 = "http://json-schema.org/draft-07/schema"; | ||
var $id$1 = "TemplateV1beta2"; | ||
var description$1 = "A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task."; | ||
var examples$1 = [ | ||
{ | ||
apiVersion: "backstage.io/v1beta2", | ||
kind: "Template", | ||
metadata: { | ||
name: "react-ssr-template", | ||
title: "React SSR Template", | ||
description: "Next.js application skeleton for creating isomorphic web applications.", | ||
tags: [ | ||
"recommended", | ||
"react" | ||
] | ||
}, | ||
spec: { | ||
owner: "artist-relations-team", | ||
type: "website", | ||
parameters: { | ||
required: [ | ||
"name", | ||
"description" | ||
], | ||
properties: { | ||
name: { | ||
title: "Name", | ||
type: "string", | ||
description: "Unique name of the component" | ||
}, | ||
description: { | ||
title: "Description", | ||
type: "string", | ||
description: "Description of the component" | ||
} | ||
} | ||
}, | ||
steps: [ | ||
{ | ||
id: "fetch", | ||
name: "Fetch", | ||
action: "fetch:plain", | ||
parameters: { | ||
url: "./template" | ||
} | ||
}, | ||
{ | ||
id: "publish", | ||
name: "Publish to GitHub", | ||
action: "publish:github", | ||
parameters: { | ||
repoUrl: "{{ parameters.repoUrl }}" | ||
}, | ||
"if": "{{ parameters.repoUrl }}" | ||
} | ||
], | ||
output: { | ||
catalogInfoUrl: "{{ steps.publish.output.catalogInfoUrl }}" | ||
} | ||
} | ||
} | ||
]; | ||
var allOf$1 = [ | ||
{ | ||
$ref: "Entity" | ||
}, | ||
{ | ||
type: "object", | ||
required: [ | ||
"spec" | ||
], | ||
properties: { | ||
apiVersion: { | ||
"enum": [ | ||
"backstage.io/v1beta2" | ||
] | ||
}, | ||
kind: { | ||
"enum": [ | ||
"Template" | ||
] | ||
}, | ||
spec: { | ||
type: "object", | ||
required: [ | ||
"type", | ||
"steps" | ||
], | ||
properties: { | ||
type: { | ||
type: "string", | ||
description: "The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.", | ||
examples: [ | ||
"service", | ||
"website", | ||
"library" | ||
], | ||
minLength: 1 | ||
}, | ||
parameters: { | ||
oneOf: [ | ||
{ | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template." | ||
}, | ||
{ | ||
type: "array", | ||
description: "A list of separate forms to collect parameters.", | ||
items: { | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template." | ||
} | ||
} | ||
] | ||
}, | ||
steps: { | ||
type: "array", | ||
description: "A list of steps to execute.", | ||
items: { | ||
type: "object", | ||
description: "A description of the step to execute.", | ||
required: [ | ||
"action" | ||
], | ||
properties: { | ||
id: { | ||
type: "string", | ||
description: "The ID of the step, which can be used to refer to its outputs." | ||
}, | ||
name: { | ||
type: "string", | ||
description: "The name of the step, which will be displayed in the UI during the scaffolding process." | ||
}, | ||
action: { | ||
type: "string", | ||
description: "The name of the action to execute." | ||
}, | ||
input: { | ||
type: "object", | ||
description: "A templated object describing the inputs to the action." | ||
}, | ||
"if": { | ||
type: [ | ||
"string", | ||
"boolean" | ||
], | ||
description: "A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`." | ||
} | ||
} | ||
} | ||
}, | ||
output: { | ||
type: "object", | ||
description: "A templated object describing the outputs of the scaffolding task.", | ||
properties: { | ||
links: { | ||
type: "array", | ||
description: "A list of external hyperlinks, typically pointing to resources created or updated by the template", | ||
items: { | ||
type: "object", | ||
required: [ | ||
], | ||
properties: { | ||
url: { | ||
type: "string", | ||
description: "A url in a standard uri format.", | ||
examples: [ | ||
"https://github.com/my-org/my-new-repo" | ||
], | ||
minLength: 1 | ||
}, | ||
entityRef: { | ||
type: "string", | ||
description: "An entity reference to an entity in the catalog.", | ||
examples: [ | ||
"Component:default/my-app" | ||
], | ||
minLength: 1 | ||
}, | ||
title: { | ||
type: "string", | ||
description: "A user friendly display name for the link.", | ||
examples: [ | ||
"View new repo" | ||
], | ||
minLength: 1 | ||
}, | ||
icon: { | ||
type: "string", | ||
description: "A key representing a visual icon to be displayed in the UI.", | ||
examples: [ | ||
"dashboard" | ||
], | ||
minLength: 1 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
additionalProperties: { | ||
type: "string" | ||
} | ||
}, | ||
owner: { | ||
type: "string", | ||
description: "The user (or group) owner of the template", | ||
minLength: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
]; | ||
var schema$1 = { | ||
$schema: $schema$1, | ||
$id: $id$1, | ||
description: description$1, | ||
examples: examples$1, | ||
allOf: allOf$1 | ||
}; | ||
const validator$1 = catalogModel.entityKindSchemaValidator(schema$1); | ||
const templateEntityV1beta2Validator = { | ||
async check(data) { | ||
return validator$1(data) === data; | ||
} | ||
}; | ||
var $schema = "http://json-schema.org/draft-07/schema"; | ||
@@ -469,4 +241,3 @@ var $id = "TemplateV1beta3"; | ||
exports.templateEntityV1beta2Validator = templateEntityV1beta2Validator; | ||
exports.templateEntityV1beta3Validator = templateEntityV1beta3Validator; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -5,12 +5,2 @@ import { JsonObject, JsonValue } from '@backstage/types'; | ||
/** | ||
* Metadata about the Template that was the originator of a scaffolder task, as | ||
* stored in the database. | ||
* | ||
* @public | ||
* @deprecated use templateInfo on the spec instead | ||
*/ | ||
declare type TemplateMetadata = { | ||
name: string; | ||
}; | ||
/** | ||
* Information about a template that is stored on a task specification. | ||
@@ -38,23 +28,2 @@ * Includes a stringified entityRef, and the baseUrl which is usually the relative path of the template definition | ||
/** | ||
* A scaffolder task as stored in the database, generated from a v1beta2 | ||
* apiVersion Template. | ||
* | ||
* @public | ||
* @deprecated Please convert your templates to TaskSpecV1beta3 on apiVersion | ||
* scaffolder.backstage.io/v1beta3 | ||
*/ | ||
interface TaskSpecV1beta2 { | ||
apiVersion: 'backstage.io/v1beta2'; | ||
/** @deprecated use templateInfo.baseUrl instead */ | ||
baseUrl?: string; | ||
values: JsonObject; | ||
steps: TaskStep[]; | ||
output: { | ||
[name: string]: string; | ||
}; | ||
/** @deprecated use templateInfo instead */ | ||
metadata?: TemplateMetadata; | ||
templateInfo?: TemplateInfo; | ||
} | ||
/** | ||
* A scaffolder task as stored in the database, generated from a v1beta3 | ||
@@ -67,4 +36,2 @@ * apiVersion Template. | ||
apiVersion: 'scaffolder.backstage.io/v1beta3'; | ||
/** @deprecated use templateInfo.baseUrl instead */ | ||
baseUrl?: string; | ||
parameters: JsonObject; | ||
@@ -75,4 +42,2 @@ steps: TaskStep[]; | ||
}; | ||
/** @deprecated use templateInfo instead */ | ||
metadata?: TemplateMetadata; | ||
templateInfo?: TemplateInfo; | ||
@@ -85,3 +50,3 @@ } | ||
*/ | ||
declare type TaskSpec = TaskSpecV1beta2 | TaskSpecV1beta3; | ||
declare type TaskSpec = TaskSpecV1beta3; | ||
@@ -93,39 +58,3 @@ /** | ||
* @public | ||
* @deprecated Please convert your templates to TemplateEntityV1beta3 on | ||
* apiVersion scaffolder.backstage.io/v1beta3 | ||
*/ | ||
interface TemplateEntityV1beta2 extends Entity { | ||
apiVersion: 'backstage.io/v1beta2'; | ||
kind: 'Template'; | ||
spec: { | ||
type: string; | ||
parameters?: JsonObject | JsonObject[]; | ||
steps: Array<{ | ||
id?: string; | ||
name?: string; | ||
action: string; | ||
input?: JsonObject; | ||
if?: string | boolean; | ||
}>; | ||
output?: { | ||
[name: string]: string; | ||
}; | ||
owner?: string; | ||
}; | ||
} | ||
/** | ||
* Entity data validator for {@link TemplateEntityV1beta2}. | ||
* | ||
* @public | ||
* @deprecated Please convert your templates to TemplateEntityV1beta3 on | ||
* apiVersion scaffolder.backstage.io/v1beta3 | ||
*/ | ||
declare const templateEntityV1beta2Validator: KindValidator; | ||
/** | ||
* Backstage catalog Template kind Entity. Templates are used by the Scaffolder | ||
* plugin to create new entities, such as Components. | ||
* | ||
* @public | ||
*/ | ||
interface TemplateEntityV1beta3 extends Entity { | ||
@@ -157,2 +86,2 @@ apiVersion: 'scaffolder.backstage.io/v1beta3'; | ||
export { TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskStep, TemplateEntityV1beta2, TemplateEntityV1beta3, TemplateInfo, TemplateMetadata, templateEntityV1beta2Validator, templateEntityV1beta3Validator }; | ||
export { TaskSpec, TaskSpecV1beta3, TaskStep, TemplateEntityV1beta3, TemplateInfo, templateEntityV1beta3Validator }; |
import { entityKindSchemaValidator } from '@backstage/catalog-model'; | ||
var $schema$1 = "http://json-schema.org/draft-07/schema"; | ||
var $id$1 = "TemplateV1beta2"; | ||
var description$1 = "A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task."; | ||
var examples$1 = [ | ||
{ | ||
apiVersion: "backstage.io/v1beta2", | ||
kind: "Template", | ||
metadata: { | ||
name: "react-ssr-template", | ||
title: "React SSR Template", | ||
description: "Next.js application skeleton for creating isomorphic web applications.", | ||
tags: [ | ||
"recommended", | ||
"react" | ||
] | ||
}, | ||
spec: { | ||
owner: "artist-relations-team", | ||
type: "website", | ||
parameters: { | ||
required: [ | ||
"name", | ||
"description" | ||
], | ||
properties: { | ||
name: { | ||
title: "Name", | ||
type: "string", | ||
description: "Unique name of the component" | ||
}, | ||
description: { | ||
title: "Description", | ||
type: "string", | ||
description: "Description of the component" | ||
} | ||
} | ||
}, | ||
steps: [ | ||
{ | ||
id: "fetch", | ||
name: "Fetch", | ||
action: "fetch:plain", | ||
parameters: { | ||
url: "./template" | ||
} | ||
}, | ||
{ | ||
id: "publish", | ||
name: "Publish to GitHub", | ||
action: "publish:github", | ||
parameters: { | ||
repoUrl: "{{ parameters.repoUrl }}" | ||
}, | ||
"if": "{{ parameters.repoUrl }}" | ||
} | ||
], | ||
output: { | ||
catalogInfoUrl: "{{ steps.publish.output.catalogInfoUrl }}" | ||
} | ||
} | ||
} | ||
]; | ||
var allOf$1 = [ | ||
{ | ||
$ref: "Entity" | ||
}, | ||
{ | ||
type: "object", | ||
required: [ | ||
"spec" | ||
], | ||
properties: { | ||
apiVersion: { | ||
"enum": [ | ||
"backstage.io/v1beta2" | ||
] | ||
}, | ||
kind: { | ||
"enum": [ | ||
"Template" | ||
] | ||
}, | ||
spec: { | ||
type: "object", | ||
required: [ | ||
"type", | ||
"steps" | ||
], | ||
properties: { | ||
type: { | ||
type: "string", | ||
description: "The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.", | ||
examples: [ | ||
"service", | ||
"website", | ||
"library" | ||
], | ||
minLength: 1 | ||
}, | ||
parameters: { | ||
oneOf: [ | ||
{ | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template." | ||
}, | ||
{ | ||
type: "array", | ||
description: "A list of separate forms to collect parameters.", | ||
items: { | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template." | ||
} | ||
} | ||
] | ||
}, | ||
steps: { | ||
type: "array", | ||
description: "A list of steps to execute.", | ||
items: { | ||
type: "object", | ||
description: "A description of the step to execute.", | ||
required: [ | ||
"action" | ||
], | ||
properties: { | ||
id: { | ||
type: "string", | ||
description: "The ID of the step, which can be used to refer to its outputs." | ||
}, | ||
name: { | ||
type: "string", | ||
description: "The name of the step, which will be displayed in the UI during the scaffolding process." | ||
}, | ||
action: { | ||
type: "string", | ||
description: "The name of the action to execute." | ||
}, | ||
input: { | ||
type: "object", | ||
description: "A templated object describing the inputs to the action." | ||
}, | ||
"if": { | ||
type: [ | ||
"string", | ||
"boolean" | ||
], | ||
description: "A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\"\"`, `0`, or `[]`." | ||
} | ||
} | ||
} | ||
}, | ||
output: { | ||
type: "object", | ||
description: "A templated object describing the outputs of the scaffolding task.", | ||
properties: { | ||
links: { | ||
type: "array", | ||
description: "A list of external hyperlinks, typically pointing to resources created or updated by the template", | ||
items: { | ||
type: "object", | ||
required: [ | ||
], | ||
properties: { | ||
url: { | ||
type: "string", | ||
description: "A url in a standard uri format.", | ||
examples: [ | ||
"https://github.com/my-org/my-new-repo" | ||
], | ||
minLength: 1 | ||
}, | ||
entityRef: { | ||
type: "string", | ||
description: "An entity reference to an entity in the catalog.", | ||
examples: [ | ||
"Component:default/my-app" | ||
], | ||
minLength: 1 | ||
}, | ||
title: { | ||
type: "string", | ||
description: "A user friendly display name for the link.", | ||
examples: [ | ||
"View new repo" | ||
], | ||
minLength: 1 | ||
}, | ||
icon: { | ||
type: "string", | ||
description: "A key representing a visual icon to be displayed in the UI.", | ||
examples: [ | ||
"dashboard" | ||
], | ||
minLength: 1 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
additionalProperties: { | ||
type: "string" | ||
} | ||
}, | ||
owner: { | ||
type: "string", | ||
description: "The user (or group) owner of the template", | ||
minLength: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
]; | ||
var schema$1 = { | ||
$schema: $schema$1, | ||
$id: $id$1, | ||
description: description$1, | ||
examples: examples$1, | ||
allOf: allOf$1 | ||
}; | ||
const validator$1 = entityKindSchemaValidator(schema$1); | ||
const templateEntityV1beta2Validator = { | ||
async check(data) { | ||
return validator$1(data) === data; | ||
} | ||
}; | ||
var $schema = "http://json-schema.org/draft-07/schema"; | ||
@@ -464,3 +236,3 @@ var $id = "TemplateV1beta3"; | ||
export { templateEntityV1beta2Validator, templateEntityV1beta3Validator }; | ||
export { templateEntityV1beta3Validator }; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@backstage/plugin-scaffolder-common", | ||
"description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", | ||
"version": "0.0.0-nightly-20220307022304", | ||
"version": "0.0.0-nightly-20220308022132", | ||
"main": "dist/index.cjs.js", | ||
@@ -42,9 +42,9 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@backstage/catalog-model": "^0.0.0-nightly-20220307022304", | ||
"@backstage/catalog-model": "^0.0.0-nightly-20220308022132", | ||
"@backstage/types": "^0.1.3" | ||
}, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20220307022304" | ||
"@backstage/cli": "^0.0.0-nightly-20220308022132" | ||
}, | ||
"module": "dist/index.esm.js" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23392
549