@backstage/plugin-scaffolder-backend 1.14.0 → 1.14.1-next.0
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 +25 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/cjs/{ScaffolderEntitiesProcessor-021c5dcb.cjs.js → ScaffolderEntitiesProcessor-c40021d1.cjs.js} +19 -11
- package/dist/cjs/ScaffolderEntitiesProcessor-c40021d1.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +12 -12
- package/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.14.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cc936b529676: Fix handling of `optional` property in `catalog:register` scaffolder action
|
|
8
|
+
- b269da39ac2d: Clearer error messages for action `publish:gitlab:merge-request`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/catalog-client@1.4.2-next.0
|
|
11
|
+
- @backstage/plugin-catalog-backend@1.9.2-next.0
|
|
12
|
+
- @backstage/plugin-catalog-node@1.3.7-next.0
|
|
13
|
+
- @backstage/backend-common@0.18.6-next.0
|
|
14
|
+
- @backstage/integration@1.4.5
|
|
15
|
+
- @backstage/config@1.0.7
|
|
16
|
+
- @backstage/backend-plugin-api@0.5.3-next.0
|
|
17
|
+
- @backstage/backend-tasks@0.5.3-next.0
|
|
18
|
+
- @backstage/catalog-model@1.3.0
|
|
19
|
+
- @backstage/errors@1.1.5
|
|
20
|
+
- @backstage/types@1.0.2
|
|
21
|
+
- @backstage/plugin-auth-node@0.2.15-next.0
|
|
22
|
+
- @backstage/plugin-catalog-common@1.0.13
|
|
23
|
+
- @backstage/plugin-permission-common@0.7.5
|
|
24
|
+
- @backstage/plugin-permission-node@0.7.9-next.0
|
|
25
|
+
- @backstage/plugin-scaffolder-common@1.3.0
|
|
26
|
+
- @backstage/plugin-scaffolder-node@0.1.4-next.0
|
|
27
|
+
|
|
3
28
|
## 1.14.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
6
|
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
7
|
-
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-
|
|
7
|
+
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-c40021d1.cjs.js');
|
|
8
8
|
var alpha$1 = require('@backstage/plugin-scaffolder-common/alpha');
|
|
9
9
|
var pluginPermissionNode = require('@backstage/plugin-permission-node');
|
|
10
10
|
var backendCommon = require('@backstage/backend-common');
|
|
@@ -179,13 +179,19 @@ function createCatalogRegisterAction(options) {
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
ctx.logger.info(`Registering ${catalogInfoUrl} in the catalog`);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
try {
|
|
183
|
+
await catalogClient.addLocation(
|
|
184
|
+
{
|
|
185
|
+
type: "url",
|
|
186
|
+
target: catalogInfoUrl
|
|
187
|
+
},
|
|
188
|
+
((_a = ctx.secrets) == null ? void 0 : _a.backstageToken) ? { token: ctx.secrets.backstageToken } : {}
|
|
189
|
+
);
|
|
190
|
+
} catch (e) {
|
|
191
|
+
if (!input.optional) {
|
|
192
|
+
throw e;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
189
195
|
try {
|
|
190
196
|
const result = await catalogClient.addLocation(
|
|
191
197
|
{
|
|
@@ -195,7 +201,7 @@ function createCatalogRegisterAction(options) {
|
|
|
195
201
|
},
|
|
196
202
|
((_b = ctx.secrets) == null ? void 0 : _b.backstageToken) ? { token: ctx.secrets.backstageToken } : {}
|
|
197
203
|
);
|
|
198
|
-
if (result.entities.length
|
|
204
|
+
if (result.entities.length) {
|
|
199
205
|
const { entities } = result;
|
|
200
206
|
let entity;
|
|
201
207
|
entity = entities.find(
|
|
@@ -4250,13 +4256,15 @@ const createPublishGitlabMergeRequestAction = (options) => {
|
|
|
4250
4256
|
try {
|
|
4251
4257
|
await api.Branches.create(repoID, branchName, String(defaultBranch));
|
|
4252
4258
|
} catch (e) {
|
|
4253
|
-
throw new errors.InputError(
|
|
4259
|
+
throw new errors.InputError(
|
|
4260
|
+
`The branch creation failed. Please check that your repo does not already contain a branch named '${branchName}'. ${e}`
|
|
4261
|
+
);
|
|
4254
4262
|
}
|
|
4255
4263
|
try {
|
|
4256
4264
|
await api.Commits.create(repoID, branchName, ctx.input.title, actions);
|
|
4257
4265
|
} catch (e) {
|
|
4258
4266
|
throw new errors.InputError(
|
|
4259
|
-
`Committing the changes to ${branchName} failed ${e}`
|
|
4267
|
+
`Committing the changes to ${branchName} failed. Please check that none of the files created by the template already exists. ${e}`
|
|
4260
4268
|
);
|
|
4261
4269
|
}
|
|
4262
4270
|
try {
|
|
@@ -6174,4 +6182,4 @@ exports.executeShellCommand = executeShellCommand;
|
|
|
6174
6182
|
exports.fetchContents = fetchContents;
|
|
6175
6183
|
exports.scaffolderActionRules = scaffolderActionRules;
|
|
6176
6184
|
exports.scaffolderTemplateRules = scaffolderTemplateRules;
|
|
6177
|
-
//# sourceMappingURL=ScaffolderEntitiesProcessor-
|
|
6185
|
+
//# sourceMappingURL=ScaffolderEntitiesProcessor-c40021d1.cjs.js.map
|