@backstage/plugin-scaffolder-common 0.2.1 → 0.2.2

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @backstage/plugin-scaffolder-common
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a4d53fe18e: **DEPRECATED** - The `TaskSpec.metadata` and `TaskSpec.baseUrl` has been deprecated in favour of the new `TaskSpec.templateInfo`.
8
+ The `baseUrl` is now found on the `templateInfo` object, and the name can be inferred from the `templateInfo.entityRef` property.
9
+
10
+ Usages of `TaskSpec.metadata.name` or `ctx.metadata.name` in Actions should migrate to using `parseEntityRef(taskSpec.templateInfo.entityRef)` to get the parsed entity triplet.
11
+
12
+ Usages of `ctx.baseUrl` in Actions should migrate to using `ctx.templateInfo.baseUrl` instead.
13
+
14
+ - Updated dependencies
15
+ - @backstage/catalog-model@0.11.0
16
+
3
17
  ## 0.2.1
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -6,10 +6,21 @@ import { Entity, KindValidator } from '@backstage/catalog-model';
6
6
  * stored in the database.
7
7
  *
8
8
  * @public
9
+ * @deprecated use templateInfo on the spec instead
9
10
  */
10
11
  declare type TemplateMetadata = {
11
12
  name: string;
12
13
  };
14
+ /**
15
+ * Information about a template that is stored on a task specification.
16
+ * Includes a stringified entityRef, and the baseUrl which is usually the relative path of the template definition
17
+ *
18
+ * @public
19
+ */
20
+ declare type TemplateInfo = {
21
+ entityRef: string;
22
+ baseUrl?: string;
23
+ };
13
24
  /**
14
25
  * An individual step of a scaffolder task, as stored in the database.
15
26
  *
@@ -32,13 +43,16 @@ interface TaskStep {
32
43
  */
33
44
  interface TaskSpecV1beta2 {
34
45
  apiVersion: 'backstage.io/v1beta2';
46
+ /** @deprecated use templateInfo.baseUrl instead */
35
47
  baseUrl?: string;
36
48
  values: JsonObject;
37
49
  steps: TaskStep[];
38
50
  output: {
39
51
  [name: string]: string;
40
52
  };
53
+ /** @deprecated use templateInfo instead */
41
54
  metadata?: TemplateMetadata;
55
+ templateInfo?: TemplateInfo;
42
56
  }
43
57
  /**
44
58
  * A scaffolder task as stored in the database, generated from a v1beta3
@@ -48,13 +62,16 @@ interface TaskSpecV1beta2 {
48
62
  */
49
63
  interface TaskSpecV1beta3 {
50
64
  apiVersion: 'scaffolder.backstage.io/v1beta3';
65
+ /** @deprecated use templateInfo.baseUrl instead */
51
66
  baseUrl?: string;
52
67
  parameters: JsonObject;
53
68
  steps: TaskStep[];
54
69
  output: {
55
70
  [name: string]: JsonValue;
56
71
  };
72
+ /** @deprecated use templateInfo instead */
57
73
  metadata?: TemplateMetadata;
74
+ templateInfo?: TemplateInfo;
58
75
  }
59
76
  /**
60
77
  * A scaffolder task as stored in the database, generated from a Template.
@@ -131,4 +148,4 @@ interface TemplateEntityV1beta3 extends Entity {
131
148
  */
132
149
  declare const templateEntityV1beta3Validator: KindValidator;
133
150
 
134
- export { TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskStep, TemplateEntityV1beta2, TemplateEntityV1beta3, TemplateMetadata, templateEntityV1beta2Validator, templateEntityV1beta3Validator };
151
+ export { TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskStep, TemplateEntityV1beta2, TemplateEntityV1beta3, TemplateInfo, TemplateMetadata, templateEntityV1beta2Validator, templateEntityV1beta3Validator };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-common",
3
3
  "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -39,12 +39,12 @@
39
39
  "url": "https://github.com/backstage/backstage/issues"
40
40
  },
41
41
  "dependencies": {
42
- "@backstage/catalog-model": "^0.10.1",
42
+ "@backstage/catalog-model": "^0.11.0",
43
43
  "@backstage/types": "^0.1.3"
44
44
  },
45
45
  "devDependencies": {
46
- "@backstage/cli": "^0.14.0"
46
+ "@backstage/cli": "^0.14.1"
47
47
  },
48
- "gitHead": "e244b348c473700e7d5e5fbcef38bd9f9fd1d0ba",
48
+ "gitHead": "a15da6ea1e3e8adc37be98be064071c8b5279b4a",
49
49
  "module": "dist/index.esm.js"
50
50
  }