@backstage/plugin-scaffolder-node 0.1.2-next.0 → 0.1.2-next.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 +23 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +7 -8
- package/dist/index.beta.d.ts +7 -8
- package/dist/index.cjs.js +1 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -8
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.1.2-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2898b6c8d52: Minor type tweaks for TypeScript 5.0
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
10
|
+
- @backstage/catalog-model@1.2.1
|
|
11
|
+
- @backstage/types@1.0.2
|
|
12
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.1
|
|
13
|
+
|
|
14
|
+
## 0.1.2-next.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- a7eb36c6e38: Improve type-check for scaffolder output parameters
|
|
19
|
+
- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.1
|
|
22
|
+
- @backstage/backend-plugin-api@0.5.1-next.1
|
|
23
|
+
- @backstage/catalog-model@1.2.1
|
|
24
|
+
- @backstage/types@1.0.2
|
|
25
|
+
|
|
3
26
|
## 0.1.2-next.0
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
10
10
|
import { JsonObject } from '@backstage/types';
|
|
11
|
-
import { JsonValue } from '@backstage/types';
|
|
12
11
|
import { Logger } from 'winston';
|
|
13
12
|
import { Schema } from 'jsonschema';
|
|
14
13
|
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
|
@@ -20,13 +19,13 @@ import { z } from 'zod';
|
|
|
20
19
|
* ActionContext is passed into scaffolder actions.
|
|
21
20
|
* @public
|
|
22
21
|
*/
|
|
23
|
-
export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
22
|
+
export declare type ActionContext<TActionInput extends JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
24
23
|
logger: Logger;
|
|
25
24
|
logStream: Writable;
|
|
26
25
|
secrets?: TaskSecrets;
|
|
27
26
|
workspacePath: string;
|
|
28
27
|
input: TActionInput;
|
|
29
|
-
output(name:
|
|
28
|
+
output(name: keyof TActionOutput, value: TActionOutput[keyof TActionOutput]): void;
|
|
30
29
|
/**
|
|
31
30
|
* Creates a temporary directory for use by the action, which is then cleaned up automatically.
|
|
32
31
|
*/
|
|
@@ -61,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
|
61
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
62
61
|
* @public
|
|
63
62
|
*/
|
|
64
|
-
export declare const createTemplateAction: <
|
|
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>;
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
66
|
* Extension point for managing scaffolder actions.
|
|
@@ -89,7 +88,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
89
88
|
};
|
|
90
89
|
|
|
91
90
|
/** @public */
|
|
92
|
-
export declare type TemplateAction<TActionInput =
|
|
91
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
93
92
|
id: string;
|
|
94
93
|
description?: string;
|
|
95
94
|
examples?: {
|
|
@@ -101,11 +100,11 @@ export declare type TemplateAction<TActionInput = unknown> = {
|
|
|
101
100
|
input?: Schema;
|
|
102
101
|
output?: Schema;
|
|
103
102
|
};
|
|
104
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
103
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
105
104
|
};
|
|
106
105
|
|
|
107
106
|
/** @public */
|
|
108
|
-
export declare type TemplateActionOptions<TActionInput = {}, 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 = {}> = {
|
|
109
108
|
id: string;
|
|
110
109
|
description?: string;
|
|
111
110
|
examples?: {
|
|
@@ -117,7 +116,7 @@ export declare type TemplateActionOptions<TActionInput = {}, TInputSchema extend
|
|
|
117
116
|
input?: TInputSchema;
|
|
118
117
|
output?: TOutputSchema;
|
|
119
118
|
};
|
|
120
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
119
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
121
120
|
};
|
|
122
121
|
|
|
123
122
|
export { }
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
10
10
|
import { JsonObject } from '@backstage/types';
|
|
11
|
-
import { JsonValue } from '@backstage/types';
|
|
12
11
|
import { Logger } from 'winston';
|
|
13
12
|
import { Schema } from 'jsonschema';
|
|
14
13
|
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
|
@@ -20,13 +19,13 @@ import { z } from 'zod';
|
|
|
20
19
|
* ActionContext is passed into scaffolder actions.
|
|
21
20
|
* @public
|
|
22
21
|
*/
|
|
23
|
-
export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
22
|
+
export declare type ActionContext<TActionInput extends JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
24
23
|
logger: Logger;
|
|
25
24
|
logStream: Writable;
|
|
26
25
|
secrets?: TaskSecrets;
|
|
27
26
|
workspacePath: string;
|
|
28
27
|
input: TActionInput;
|
|
29
|
-
output(name:
|
|
28
|
+
output(name: keyof TActionOutput, value: TActionOutput[keyof TActionOutput]): void;
|
|
30
29
|
/**
|
|
31
30
|
* Creates a temporary directory for use by the action, which is then cleaned up automatically.
|
|
32
31
|
*/
|
|
@@ -61,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
|
61
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
62
61
|
* @public
|
|
63
62
|
*/
|
|
64
|
-
export declare const createTemplateAction: <
|
|
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>;
|
|
65
64
|
|
|
66
65
|
/* Excluded from this release type: ScaffolderActionsExtensionPoint */
|
|
67
66
|
|
|
@@ -77,7 +76,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
/** @public */
|
|
80
|
-
export declare type TemplateAction<TActionInput =
|
|
79
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
81
80
|
id: string;
|
|
82
81
|
description?: string;
|
|
83
82
|
examples?: {
|
|
@@ -89,11 +88,11 @@ export declare type TemplateAction<TActionInput = unknown> = {
|
|
|
89
88
|
input?: Schema;
|
|
90
89
|
output?: Schema;
|
|
91
90
|
};
|
|
92
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
91
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
93
92
|
};
|
|
94
93
|
|
|
95
94
|
/** @public */
|
|
96
|
-
export declare type TemplateActionOptions<TActionInput = {}, 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 = {}> = {
|
|
97
96
|
id: string;
|
|
98
97
|
description?: string;
|
|
99
98
|
examples?: {
|
|
@@ -105,7 +104,7 @@ export declare type TemplateActionOptions<TActionInput = {}, TInputSchema extend
|
|
|
105
104
|
input?: TInputSchema;
|
|
106
105
|
output?: TOutputSchema;
|
|
107
106
|
};
|
|
108
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
107
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
109
108
|
};
|
|
110
109
|
|
|
111
110
|
export { }
|
package/dist/index.cjs.js
CHANGED
|
@@ -13,7 +13,7 @@ const createTemplateAction = (action) => {
|
|
|
13
13
|
var _a, _b, _c, _d;
|
|
14
14
|
const inputSchema = ((_a = action.schema) == null ? void 0 : _a.input) && "safeParseAsync" in action.schema.input ? zodToJsonSchema__default["default"](action.schema.input) : (_b = action.schema) == null ? void 0 : _b.input;
|
|
15
15
|
const outputSchema = ((_c = action.schema) == null ? void 0 : _c.output) && "safeParseAsync" in action.schema.output ? zodToJsonSchema__default["default"](action.schema.output) : (_d = action.schema) == null ? void 0 : _d.output;
|
|
16
|
-
|
|
16
|
+
return {
|
|
17
17
|
...action,
|
|
18
18
|
schema: {
|
|
19
19
|
...action.schema,
|
|
@@ -21,7 +21,6 @@ const createTemplateAction = (action) => {
|
|
|
21
21
|
output: outputSchema
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
return templateAction;
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
const scaffolderActionsExtensionPoint = backendPluginApi.createExtensionPoint({
|
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';\n\n/** @public */\nexport type TemplateActionOptions<\n TActionInput = {},\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>) => 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
|
|
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
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
10
10
|
import { JsonObject } from '@backstage/types';
|
|
11
|
-
import { JsonValue } from '@backstage/types';
|
|
12
11
|
import { Logger } from 'winston';
|
|
13
12
|
import { Schema } from 'jsonschema';
|
|
14
13
|
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
|
@@ -20,13 +19,13 @@ import { z } from 'zod';
|
|
|
20
19
|
* ActionContext is passed into scaffolder actions.
|
|
21
20
|
* @public
|
|
22
21
|
*/
|
|
23
|
-
export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
22
|
+
export declare type ActionContext<TActionInput extends JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
24
23
|
logger: Logger;
|
|
25
24
|
logStream: Writable;
|
|
26
25
|
secrets?: TaskSecrets;
|
|
27
26
|
workspacePath: string;
|
|
28
27
|
input: TActionInput;
|
|
29
|
-
output(name:
|
|
28
|
+
output(name: keyof TActionOutput, value: TActionOutput[keyof TActionOutput]): void;
|
|
30
29
|
/**
|
|
31
30
|
* Creates a temporary directory for use by the action, which is then cleaned up automatically.
|
|
32
31
|
*/
|
|
@@ -61,7 +60,7 @@ export declare type ActionContext<TActionInput extends JsonObject> = {
|
|
|
61
60
|
* Will convert zod schemas to json schemas for use throughout the system.
|
|
62
61
|
* @public
|
|
63
62
|
*/
|
|
64
|
-
export declare const createTemplateAction: <
|
|
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>;
|
|
65
64
|
|
|
66
65
|
/* Excluded from this release type: ScaffolderActionsExtensionPoint */
|
|
67
66
|
|
|
@@ -77,7 +76,7 @@ export declare type TaskSecrets = Record<string, string> & {
|
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
/** @public */
|
|
80
|
-
export declare type TemplateAction<TActionInput =
|
|
79
|
+
export declare type TemplateAction<TActionInput extends JsonObject = JsonObject, TActionOutput extends JsonObject = JsonObject> = {
|
|
81
80
|
id: string;
|
|
82
81
|
description?: string;
|
|
83
82
|
examples?: {
|
|
@@ -89,11 +88,11 @@ export declare type TemplateAction<TActionInput = unknown> = {
|
|
|
89
88
|
input?: Schema;
|
|
90
89
|
output?: Schema;
|
|
91
90
|
};
|
|
92
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
91
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
93
92
|
};
|
|
94
93
|
|
|
95
94
|
/** @public */
|
|
96
|
-
export declare type TemplateActionOptions<TActionInput = {}, 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 = {}> = {
|
|
97
96
|
id: string;
|
|
98
97
|
description?: string;
|
|
99
98
|
examples?: {
|
|
@@ -105,7 +104,7 @@ export declare type TemplateActionOptions<TActionInput = {}, TInputSchema extend
|
|
|
105
104
|
input?: TInputSchema;
|
|
106
105
|
output?: TOutputSchema;
|
|
107
106
|
};
|
|
108
|
-
handler: (ctx: ActionContext<TActionInput>) => Promise<void>;
|
|
107
|
+
handler: (ctx: ActionContext<TActionInput, TActionOutput>) => Promise<void>;
|
|
109
108
|
};
|
|
110
109
|
|
|
111
110
|
export { }
|
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.2",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"postpack": "backstage-cli package postpack"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@backstage/backend-plugin-api": "^0.5.1-next.
|
|
27
|
+
"@backstage/backend-plugin-api": "^0.5.1-next.2",
|
|
28
28
|
"@backstage/catalog-model": "^1.2.1",
|
|
29
|
-
"@backstage/plugin-scaffolder-common": "^1.2.7-next.
|
|
29
|
+
"@backstage/plugin-scaffolder-common": "^1.2.7-next.1",
|
|
30
30
|
"@backstage/types": "^1.0.2",
|
|
31
31
|
"jsonschema": "^1.2.6",
|
|
32
32
|
"winston": "^3.2.1",
|
|
33
|
-
"zod": "
|
|
34
|
-
"zod-to-json-schema": "
|
|
33
|
+
"zod": "^3.21.4",
|
|
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.2"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
40
|
"alpha",
|