@backstage/plugin-scaffolder-node 0.1.2-next.1 → 0.1.2-next.3
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 +21 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +3 -3
- package/dist/index.beta.d.ts +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.1.2-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/catalog-model@1.3.0-next.0
|
|
9
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
10
|
+
- @backstage/types@1.0.2
|
|
11
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.2
|
|
12
|
+
|
|
13
|
+
## 0.1.2-next.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 2898b6c8d52: Minor type tweaks for TypeScript 5.0
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
20
|
+
- @backstage/catalog-model@1.2.1
|
|
21
|
+
- @backstage/types@1.0.2
|
|
22
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.1
|
|
23
|
+
|
|
3
24
|
## 0.1.2-next.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject, TActionOutput
|
|
|
60
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
|
-
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
63
|
+
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput extends JsonObject = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput extends JsonObject = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Extension point for managing scaffolder actions.
|
|
@@ -88,7 +88,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/** @public */
|
|
91
|
-
export declare type TemplateAction<TActionInput =
|
|
91
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
92
92
|
id: string;
|
|
93
93
|
description?: string;
|
|
94
94
|
examples?: {
|
|
@@ -104,7 +104,7 @@ export declare type TemplateAction<TActionInput = unknown, TActionOutput = JsonO
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
/** @public */
|
|
107
|
-
export declare type TemplateActionOptions<TActionInput = {}, TActionOutput = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
107
|
+
export declare type TemplateActionOptions<TActionInput extends JsonObject = {}, TActionOutput extends JsonObject = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
108
108
|
id: string;
|
|
109
109
|
description?: string;
|
|
110
110
|
examples?: {
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject, TActionOutput
|
|
|
60
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
|
-
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
63
|
+
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput extends JsonObject = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput extends JsonObject = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
64
64
|
|
|
65
65
|
/* Excluded from this release type: ScaffolderActionsExtensionPoint */
|
|
66
66
|
|
|
@@ -76,7 +76,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/** @public */
|
|
79
|
-
export declare type TemplateAction<TActionInput =
|
|
79
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
80
80
|
id: string;
|
|
81
81
|
description?: string;
|
|
82
82
|
examples?: {
|
|
@@ -92,7 +92,7 @@ export declare type TemplateAction<TActionInput = unknown, TActionOutput = JsonO
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
/** @public */
|
|
95
|
-
export declare type TemplateActionOptions<TActionInput = {}, TActionOutput = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
95
|
+
export declare type TemplateActionOptions<TActionInput extends JsonObject = {}, TActionOutput extends JsonObject = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
96
96
|
id: string;
|
|
97
97
|
description?: string;
|
|
98
98
|
examples?: {
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/actions/createTemplateAction.ts","../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { ActionContext, TemplateAction } from './types';\nimport { z } from 'zod';\nimport { Schema } from 'jsonschema';\nimport zodToJsonSchema from 'zod-to-json-schema';\nimport { JsonObject } from '@backstage/types';\n\n/** @public */\nexport type TemplateActionOptions<\n TActionInput = {},\n TActionOutput = {},\n TInputSchema extends Schema | z.ZodType = {},\n TOutputSchema extends Schema | z.ZodType = {},\n> = {\n id: string;\n description?: string;\n examples?: { description: string; example: string }[];\n supportsDryRun?: boolean;\n schema?: {\n input?: TInputSchema;\n output?: TOutputSchema;\n };\n handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;\n};\n\n/**\n * This function is used to create new template actions to get type safety.\n * Will convert zod schemas to json schemas for use throughout the system.\n * @public\n */\nexport const createTemplateAction = <\n TInputParams extends JsonObject = JsonObject,\n TOutputParams extends JsonObject = JsonObject,\n TInputSchema extends Schema | z.ZodType = {},\n TOutputSchema extends Schema | z.ZodType = {},\n TActionInput = TInputSchema extends z.ZodType
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/actions/createTemplateAction.ts","../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { ActionContext, TemplateAction } from './types';\nimport { z } from 'zod';\nimport { Schema } from 'jsonschema';\nimport zodToJsonSchema from 'zod-to-json-schema';\nimport { JsonObject } from '@backstage/types';\n\n/** @public */\nexport type TemplateActionOptions<\n TActionInput extends JsonObject = {},\n TActionOutput extends JsonObject = {},\n TInputSchema extends Schema | z.ZodType = {},\n TOutputSchema extends Schema | z.ZodType = {},\n> = {\n id: string;\n description?: string;\n examples?: { description: string; example: string }[];\n supportsDryRun?: boolean;\n schema?: {\n input?: TInputSchema;\n output?: TOutputSchema;\n };\n handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;\n};\n\n/**\n * This function is used to create new template actions to get type safety.\n * Will convert zod schemas to json schemas for use throughout the system.\n * @public\n */\nexport const createTemplateAction = <\n TInputParams extends JsonObject = JsonObject,\n TOutputParams extends JsonObject = JsonObject,\n TInputSchema extends Schema | z.ZodType = {},\n TOutputSchema extends Schema | z.ZodType = {},\n TActionInput extends JsonObject = TInputSchema extends z.ZodType<\n any,\n any,\n infer IReturn\n >\n ? IReturn\n : TInputParams,\n TActionOutput extends JsonObject = TOutputSchema extends z.ZodType<\n any,\n any,\n infer IReturn\n >\n ? IReturn\n : TOutputParams,\n>(\n action: TemplateActionOptions<\n TActionInput,\n TActionOutput,\n TInputSchema,\n TOutputSchema\n >,\n): TemplateAction<TActionInput, TActionOutput> => {\n const inputSchema =\n action.schema?.input && 'safeParseAsync' in action.schema.input\n ? zodToJsonSchema(action.schema.input)\n : action.schema?.input;\n\n const outputSchema =\n action.schema?.output && 'safeParseAsync' in action.schema.output\n ? zodToJsonSchema(action.schema.output)\n : action.schema?.output;\n\n return {\n ...action,\n schema: {\n ...action.schema,\n input: inputSchema,\n output: outputSchema,\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 { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport { TemplateAction } from './actions';\n\n/**\n * Extension point for managing scaffolder actions.\n *\n * @alpha\n */\nexport interface ScaffolderActionsExtensionPoint {\n addActions(...actions: TemplateAction<any>[]): void;\n}\n\n/**\n * Extension point for managing scaffolder actions.\n *\n * @alpha\n */\nexport const scaffolderActionsExtensionPoint =\n createExtensionPoint<ScaffolderActionsExtensionPoint>({\n id: 'scaffolder.actions',\n });\n"],"names":["zodToJsonSchema","createExtensionPoint"],"mappings":";;;;;;;;;;;AA6Ca,MAAA,oBAAA,GAAuB,CAoBlC,MAMgD,KAAA;AAvElD,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAwEE,EAAA,MAAM,gBACJ,EAAO,GAAA,MAAA,CAAA,MAAA,KAAP,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAS,oBAAoB,MAAO,CAAA,MAAA,CAAO,KACtD,GAAAA,mCAAA,CAAgB,OAAO,MAAO,CAAA,KAAK,CACnC,GAAA,CAAA,EAAA,GAAA,MAAA,CAAO,WAAP,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAErB,EAAA,MAAM,iBACJ,EAAO,GAAA,MAAA,CAAA,MAAA,KAAP,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAU,oBAAoB,MAAO,CAAA,MAAA,CAAO,MACvD,GAAAA,mCAAA,CAAgB,OAAO,MAAO,CAAA,MAAM,CACpC,GAAA,CAAA,EAAA,GAAA,MAAA,CAAO,WAAP,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,CAAA;AAErB,EAAO,OAAA;AAAA,IACL,GAAG,MAAA;AAAA,IACH,MAAQ,EAAA;AAAA,MACN,GAAG,MAAO,CAAA,MAAA;AAAA,MACV,KAAO,EAAA,WAAA;AAAA,MACP,MAAQ,EAAA,YAAA;AAAA,KACV;AAAA,GACF,CAAA;AACF;;ACzDO,MAAM,kCACXC,qCAAsD,CAAA;AAAA,EACpD,EAAI,EAAA,oBAAA;AACN,CAAC;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject, TActionOutput
|
|
|
60
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
|
-
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
63
|
+
export declare const createTemplateAction: <TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TOutputSchema extends z.ZodType<any, z.ZodTypeDef, any> | Schema = {}, TActionInput extends JsonObject = TInputSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : TInputParams, TActionOutput extends JsonObject = TOutputSchema extends z.ZodType<any, any, infer IReturn_1> ? IReturn_1 : TOutputParams>(action: TemplateActionOptions<TActionInput, TActionOutput, TInputSchema, TOutputSchema>) => TemplateAction<TActionInput, TActionOutput>;
|
|
64
64
|
|
|
65
65
|
/* Excluded from this release type: ScaffolderActionsExtensionPoint */
|
|
66
66
|
|
|
@@ -76,7 +76,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/** @public */
|
|
79
|
-
export declare type TemplateAction<TActionInput =
|
|
79
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
80
80
|
id: string;
|
|
81
81
|
description?: string;
|
|
82
82
|
examples?: {
|
|
@@ -92,7 +92,7 @@ export declare type TemplateAction<TActionInput = unknown, TActionOutput = JsonO
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
/** @public */
|
|
95
|
-
export declare type TemplateActionOptions<TActionInput = {}, TActionOutput = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
95
|
+
export declare type TemplateActionOptions<TActionInput extends JsonObject = {}, TActionOutput extends JsonObject = {}, TInputSchema extends Schema | z.ZodType = {}, TOutputSchema extends Schema | z.ZodType = {}> = {
|
|
96
96
|
id: string;
|
|
97
97
|
description?: string;
|
|
98
98
|
examples?: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-node",
|
|
3
3
|
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
|
4
|
-
"version": "0.1.2-next.
|
|
4
|
+
"version": "0.1.2-next.3",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"postpack": "backstage-cli package postpack"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@backstage/backend-plugin-api": "^0.5.1-next.
|
|
28
|
-
"@backstage/catalog-model": "^1.
|
|
29
|
-
"@backstage/plugin-scaffolder-common": "^1.2.7-next.
|
|
27
|
+
"@backstage/backend-plugin-api": "^0.5.1-next.2",
|
|
28
|
+
"@backstage/catalog-model": "^1.3.0-next.0",
|
|
29
|
+
"@backstage/plugin-scaffolder-common": "^1.2.7-next.2",
|
|
30
30
|
"@backstage/types": "^1.0.2",
|
|
31
31
|
"jsonschema": "^1.2.6",
|
|
32
32
|
"winston": "^3.2.1",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"zod-to-json-schema": "^3.20.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@backstage/cli": "^0.22.6-next.
|
|
37
|
+
"@backstage/cli": "^0.22.6-next.3"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
40
|
"alpha",
|