@backstage/plugin-scaffolder-backend 1.17.2 → 1.18.0-next.1

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,26 +1,56 @@
1
1
  # @backstage/plugin-scaffolder-backend
2
2
 
3
- ## 1.17.2
3
+ ## 1.18.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - f41099bb31: Display meaningful error to the output if Gitlab namespace not found inside `publish:gitlab`.
4
8
 
5
9
  ### Patch Changes
6
10
 
7
11
  - Updated dependencies
8
- - @backstage/plugin-auth-node@0.3.1
9
- - @backstage/backend-plugin-api@0.6.4
10
- - @backstage/plugin-catalog-backend@1.13.2
11
- - @backstage/plugin-permission-node@0.7.15
12
- - @backstage/backend-common@0.19.6
13
- - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.1
14
- - @backstage/plugin-catalog-node@1.4.5
15
- - @backstage/plugin-scaffolder-node@0.2.4
16
- - @backstage/backend-tasks@0.5.9
12
+ - @backstage/backend-tasks@0.5.10-next.1
13
+ - @backstage/plugin-catalog-backend@1.14.0-next.1
14
+ - @backstage/plugin-catalog-node@1.4.6-next.1
15
+ - @backstage/backend-common@0.19.7-next.1
16
+ - @backstage/backend-plugin-api@0.6.5-next.1
17
+ - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.2-next.1
18
+ - @backstage/plugin-auth-node@0.3.2-next.1
19
+ - @backstage/plugin-permission-node@0.7.16-next.1
20
+ - @backstage/plugin-scaffolder-node@0.2.5-next.1
21
+ - @backstage/config@1.1.0
22
+ - @backstage/catalog-client@1.4.4
23
+ - @backstage/catalog-model@1.4.2
24
+ - @backstage/errors@1.2.2
25
+ - @backstage/integration@1.7.1-next.0
26
+ - @backstage/types@1.1.1
27
+ - @backstage/plugin-catalog-common@1.0.16
28
+ - @backstage/plugin-permission-common@0.7.8
29
+ - @backstage/plugin-scaffolder-common@1.4.1
17
30
 
18
- ## 1.17.1
31
+ ## 1.17.3-next.0
19
32
 
20
33
  ### Patch Changes
21
34
 
22
35
  - Updated dependencies
23
- - @backstage/plugin-catalog-backend@1.13.1
36
+ - @backstage/integration@1.7.1-next.0
37
+ - @backstage/plugin-catalog-backend@1.14.0-next.0
38
+ - @backstage/plugin-auth-node@0.3.2-next.0
39
+ - @backstage/backend-common@0.19.7-next.0
40
+ - @backstage/plugin-scaffolder-node@0.2.5-next.0
41
+ - @backstage/config@1.1.0
42
+ - @backstage/backend-plugin-api@0.6.5-next.0
43
+ - @backstage/backend-tasks@0.5.10-next.0
44
+ - @backstage/catalog-client@1.4.4
45
+ - @backstage/catalog-model@1.4.2
46
+ - @backstage/errors@1.2.2
47
+ - @backstage/types@1.1.1
48
+ - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.2-next.0
49
+ - @backstage/plugin-catalog-common@1.0.16
50
+ - @backstage/plugin-catalog-node@1.4.6-next.0
51
+ - @backstage/plugin-permission-common@0.7.8
52
+ - @backstage/plugin-permission-node@0.7.16-next.0
53
+ - @backstage/plugin-scaffolder-common@1.4.1
24
54
 
25
55
  ## 1.17.0
26
56
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
- "version": "1.17.2",
3
+ "version": "1.18.0-next.1",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var alpha = require('@backstage/plugin-scaffolder-common/alpha');
6
6
  var pluginPermissionNode = require('@backstage/plugin-permission-node');
7
- var router = require('./cjs/router-129b368d.cjs.js');
7
+ var router = require('./cjs/router-2e0adf31.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var backendCommon = require('@backstage/backend-common');
10
10
  var integration = require('@backstage/integration');
@@ -5096,13 +5096,24 @@ function createPublishGitlabAction(options) {
5096
5096
  host: integrationConfig.config.baseUrl,
5097
5097
  [tokenType]: token
5098
5098
  });
5099
- let { id: targetNamespace } = await client.Namespaces.show(owner);
5099
+ let targetNamespaceId;
5100
+ try {
5101
+ const namespaceResponse = await client.Namespaces.show(owner);
5102
+ targetNamespaceId = namespaceResponse.id;
5103
+ } catch (e) {
5104
+ if (e.response && e.response.statusCode === 404) {
5105
+ throw new errors.InputError(
5106
+ `The namespace ${owner} is not found or the user doesn't have permissions to access it`
5107
+ );
5108
+ }
5109
+ throw e;
5110
+ }
5100
5111
  const { id: userId } = await client.Users.current();
5101
- if (!targetNamespace) {
5102
- targetNamespace = userId;
5112
+ if (!targetNamespaceId) {
5113
+ targetNamespaceId = userId;
5103
5114
  }
5104
5115
  const { id: projectId, http_url_to_repo } = await client.Projects.create({
5105
- namespace_id: targetNamespace,
5116
+ namespace_id: targetNamespaceId,
5106
5117
  name: repo,
5107
5118
  visibility: repoVisibility,
5108
5119
  ...topics.length ? { topics } : {}
@@ -7276,4 +7287,4 @@ exports.createRouter = createRouter;
7276
7287
  exports.createWaitAction = createWaitAction;
7277
7288
  exports.scaffolderActionRules = scaffolderActionRules;
7278
7289
  exports.scaffolderTemplateRules = scaffolderTemplateRules;
7279
- //# sourceMappingURL=router-129b368d.cjs.js.map
7290
+ //# sourceMappingURL=router-2e0adf31.cjs.js.map