@backstage/plugin-scaffolder-common
Advanced tools
Comparing version 0.0.0-nightly-20240319021037 to 0.0.0-nightly-20240423021331
{ | ||
"name": "@backstage/plugin-scaffolder-common", | ||
"version": "0.0.0-nightly-20240319021037", | ||
"version": "0.0.0-nightly-20240423021331", | ||
"main": "../dist/alpha.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "../dist/alpha.esm.js", |
# @backstage/plugin-scaffolder-common | ||
## 0.0.0-nightly-20240319021037 | ||
## 0.0.0-nightly-20240423021331 | ||
@@ -8,6 +8,15 @@ ### Patch Changes | ||
- Updated dependencies | ||
- @backstage/plugin-permission-common@0.0.0-nightly-20240319021037 | ||
- @backstage/catalog-model@0.0.0-nightly-20240319021037 | ||
- @backstage/catalog-model@0.0.0-nightly-20240423021331 | ||
- @backstage/types@1.1.1 | ||
- @backstage/plugin-permission-common@0.7.13 | ||
## 1.5.1 | ||
### Patch Changes | ||
- Updated dependencies | ||
- @backstage/plugin-permission-common@0.7.13 | ||
- @backstage/catalog-model@1.4.5 | ||
- @backstage/types@1.1.1 | ||
## 1.5.1-next.1 | ||
@@ -14,0 +23,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var pluginPermissionCommon = require('@backstage/plugin-permission-common'); | ||
@@ -6,0 +4,0 @@ |
@@ -1,36 +0,2 @@ | ||
import { createPermission } from '@backstage/plugin-permission-common'; | ||
const RESOURCE_TYPE_SCAFFOLDER_TEMPLATE = "scaffolder-template"; | ||
const RESOURCE_TYPE_SCAFFOLDER_ACTION = "scaffolder-action"; | ||
const actionExecutePermission = createPermission({ | ||
name: "scaffolder.action.execute", | ||
attributes: {}, | ||
resourceType: RESOURCE_TYPE_SCAFFOLDER_ACTION | ||
}); | ||
const templateParameterReadPermission = createPermission({ | ||
name: "scaffolder.template.parameter.read", | ||
attributes: { | ||
action: "read" | ||
}, | ||
resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE | ||
}); | ||
const templateStepReadPermission = createPermission({ | ||
name: "scaffolder.template.step.read", | ||
attributes: { | ||
action: "read" | ||
}, | ||
resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE | ||
}); | ||
const scaffolderPermissions = [ | ||
actionExecutePermission, | ||
templateParameterReadPermission, | ||
templateStepReadPermission | ||
]; | ||
const scaffolderTemplatePermissions = [ | ||
templateParameterReadPermission, | ||
templateStepReadPermission | ||
]; | ||
const scaffolderActionPermissions = [actionExecutePermission]; | ||
export { RESOURCE_TYPE_SCAFFOLDER_ACTION, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, actionExecutePermission, scaffolderActionPermissions, scaffolderPermissions, scaffolderTemplatePermissions, templateParameterReadPermission, templateStepReadPermission }; | ||
export { RESOURCE_TYPE_SCAFFOLDER_ACTION, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, actionExecutePermission, scaffolderActionPermissions, scaffolderPermissions, scaffolderTemplatePermissions, templateParameterReadPermission, templateStepReadPermission } from './permissions.esm.js'; | ||
//# sourceMappingURL=alpha.esm.js.map |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var catalogModel = require('@backstage/catalog-model'); | ||
@@ -6,0 +4,0 @@ |
@@ -273,2 +273,2 @@ import { EntityMeta, UserEntity, Entity, KindValidator } from '@backstage/catalog-model'; | ||
export { TaskRecoverStrategy, TaskRecovery, TaskSpec, TaskSpecV1beta3, TaskStep, TemplateEntityStepV1beta3, TemplateEntityV1beta3, TemplateInfo, TemplateParametersV1beta3, TemplatePermissionsV1beta3, TemplatePresentationV1beta3, TemplateRecoveryV1beta3, isTemplateEntityV1beta3, templateEntityV1beta3Validator }; | ||
export { type TaskRecoverStrategy, type TaskRecovery, type TaskSpec, type TaskSpecV1beta3, type TaskStep, type TemplateEntityStepV1beta3, type TemplateEntityV1beta3, type TemplateInfo, type TemplateParametersV1beta3, type TemplatePermissionsV1beta3, type TemplatePresentationV1beta3, type TemplateRecoveryV1beta3, isTemplateEntityV1beta3, templateEntityV1beta3Validator }; |
@@ -1,354 +0,2 @@ | ||
import { entityKindSchemaValidator } from '@backstage/catalog-model'; | ||
var $schema = "http://json-schema.org/draft-07/schema"; | ||
var $id = "TemplateV1beta3"; | ||
var description = "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 = [ | ||
{ | ||
apiVersion: "scaffolder.backstage.io/v1beta3", | ||
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", | ||
"repoUrl" | ||
], | ||
"backstage:permissions": { | ||
tags: [ | ||
"one", | ||
"two" | ||
] | ||
}, | ||
properties: { | ||
name: { | ||
title: "Name", | ||
type: "string", | ||
description: "Unique name of the component" | ||
}, | ||
description: { | ||
title: "Description", | ||
type: "string", | ||
description: "Description of the component" | ||
}, | ||
repoUrl: { | ||
title: "Pick a repository", | ||
type: "string", | ||
"ui:field": "RepoUrlPicker" | ||
} | ||
} | ||
}, | ||
steps: [ | ||
{ | ||
id: "fetch", | ||
name: "Fetch", | ||
action: "fetch:plain", | ||
parameters: { | ||
url: "./template" | ||
}, | ||
"backstage:permissions": { | ||
tags: [ | ||
"one", | ||
"two" | ||
] | ||
} | ||
}, | ||
{ | ||
id: "publish", | ||
name: "Publish to GitHub", | ||
action: "publish:github", | ||
parameters: { | ||
repoUrl: "${{ parameters.repoUrl }}" | ||
}, | ||
"if": "${{ parameters.repoUrl }}" | ||
} | ||
], | ||
output: { | ||
catalogInfoUrl: "${{ steps.publish.output.catalogInfoUrl }}" | ||
} | ||
} | ||
} | ||
]; | ||
var allOf = [ | ||
{ | ||
$ref: "Entity" | ||
}, | ||
{ | ||
type: "object", | ||
required: [ | ||
"spec" | ||
], | ||
properties: { | ||
apiVersion: { | ||
"enum": [ | ||
"scaffolder.backstage.io/v1beta3" | ||
] | ||
}, | ||
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 | ||
}, | ||
owner: { | ||
type: "string", | ||
description: "The user (or group) owner of the template", | ||
minLength: 1 | ||
}, | ||
parameters: { | ||
oneOf: [ | ||
{ | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template.", | ||
properties: { | ||
"backstage:permissions": { | ||
type: "object", | ||
description: "Object used for authorizing the parameter", | ||
properties: { | ||
tags: { | ||
type: "array", | ||
items: { | ||
type: "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
type: "array", | ||
description: "A list of separate forms to collect parameters.", | ||
items: { | ||
type: "object", | ||
description: "The JSONSchema describing the inputs for the template.", | ||
properties: { | ||
"backstage:permissions": { | ||
type: "object", | ||
description: "Object used for authorizing the parameter", | ||
properties: { | ||
tags: { | ||
type: "array", | ||
items: { | ||
type: "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
presentation: { | ||
type: "object", | ||
description: "A way to redefine the labels for actionable buttons.", | ||
properties: { | ||
backButtonText: { | ||
type: "string", | ||
description: "A button which return the user to one step back." | ||
}, | ||
createButtonText: { | ||
type: "string", | ||
description: "A button which start the execution of the template." | ||
}, | ||
reviewButtonText: { | ||
type: "string", | ||
description: "A button which open the review step to verify the input prior to start the execution." | ||
} | ||
} | ||
}, | ||
EXPERIMENTAL_recovery: { | ||
type: "object", | ||
description: "A task recovery section.", | ||
properties: { | ||
EXPERIMENTAL_strategy: { | ||
type: "string", | ||
description: "Recovery strategy for your task (none or startOver). By default none" | ||
} | ||
} | ||
}, | ||
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 `[]`." | ||
}, | ||
"backstage:permissions": { | ||
type: "object", | ||
description: "Object used for authorizing the step", | ||
properties: { | ||
tags: { | ||
type: "array", | ||
items: { | ||
type: "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
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 | ||
} | ||
} | ||
} | ||
}, | ||
text: { | ||
type: "array", | ||
description: "A list of Markdown text blobs, like output data from the template.", | ||
items: { | ||
type: "object", | ||
required: [ | ||
], | ||
properties: { | ||
title: { | ||
type: "string", | ||
description: "A user friendly display name for the text.", | ||
examples: [ | ||
"Output Content" | ||
], | ||
minLength: 1 | ||
}, | ||
icon: { | ||
type: "string", | ||
description: "A key representing a visual icon to be displayed in the UI.", | ||
examples: [ | ||
"dashboard" | ||
], | ||
minLength: 1 | ||
}, | ||
content: { | ||
type: "string", | ||
description: "The text blob to display in the UI, rendered as Markdown.", | ||
examples: [ | ||
"**hey** _I'm_ Markdown" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
additionalProperties: { | ||
type: "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
]; | ||
var schema = { | ||
$schema: $schema, | ||
$id: $id, | ||
description: description, | ||
examples: examples, | ||
allOf: allOf | ||
}; | ||
const validator = entityKindSchemaValidator(schema); | ||
const templateEntityV1beta3Validator = { | ||
// TODO(freben): Emulate the old KindValidator until we fix that type | ||
async check(data) { | ||
return validator(data) === data; | ||
} | ||
}; | ||
const isTemplateEntityV1beta3 = (entity) => entity.apiVersion === "scaffolder.backstage.io/v1beta3" && entity.kind === "Template"; | ||
export { isTemplateEntityV1beta3, templateEntityV1beta3Validator }; | ||
export { isTemplateEntityV1beta3, templateEntityV1beta3Validator } from './TemplateEntityV1beta3.esm.js'; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@backstage/plugin-scaffolder-common", | ||
"version": "0.0.0-nightly-20240319021037", | ||
"version": "0.0.0-nightly-20240423021331", | ||
"description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", | ||
@@ -55,10 +55,10 @@ "backstage": { | ||
"dependencies": { | ||
"@backstage/catalog-model": "^0.0.0-nightly-20240319021037", | ||
"@backstage/plugin-permission-common": "^0.0.0-nightly-20240319021037", | ||
"@backstage/catalog-model": "^0.0.0-nightly-20240423021331", | ||
"@backstage/plugin-permission-common": "^0.7.13", | ||
"@backstage/types": "^1.1.1" | ||
}, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20240319021037" | ||
"@backstage/cli": "^0.0.0-nightly-20240423021331" | ||
}, | ||
"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
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances 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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
69950
20
1119
+ Added@backstage/config@1.3.1(transitive)
+ Added@backstage/errors@1.2.6(transitive)
+ Added@backstage/plugin-permission-common@0.7.14(transitive)
+ Addeduuid@9.0.1(transitive)
- Removed@backstage/config@0.0.0-nightly-20241217023754(transitive)
- Removed@backstage/plugin-permission-common@0.0.0-nightly-20241217023754(transitive)
- Removeduuid@11.0.3(transitive)
- Removedzod-to-json-schema@3.24.1(transitive)
Updated@backstage/catalog-model@^0.0.0-nightly-20240423021331