@backstage-community/plugin-scaffolder-backend-module-quay 2.2.2 → 2.3.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  ### Dependencies
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7daf65a: Backstage version bump to v1.34.2
8
+
9
+ ### Patch Changes
10
+
11
+ - 0f5c451: Updated dependency `prettier` to `3.4.2`.
12
+
13
+ ## 2.2.3
14
+
15
+ ### Patch Changes
16
+
17
+ - 1af220c: Clean up api report warnings and remove unnecessary files
18
+
3
19
  ## 2.2.2
4
20
 
5
21
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"createQuayRepository.cjs.js","sources":["../../src/actions/createQuayRepository.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\n\nexport interface ResponseBody {\n namespace: string;\n name: string;\n kind: string;\n}\nexport interface ResponseErrorBody {\n detail: string;\n error_message: string;\n error_type: string;\n title: string;\n type: string;\n status: number;\n}\ninterface RequestBody {\n repository: string;\n visibility: string;\n namespace?: string;\n description: string;\n repo_kind?: string;\n}\n\ntype TemplateActionParameters = {\n name: string;\n visibility: string;\n description: string;\n token: string;\n baseUrl?: string;\n namespace?: string;\n repoKind?: string;\n};\n\nconst getUrl = (url: string | undefined): string => {\n if (!url) {\n return 'https://quay.io';\n }\n try {\n // eslint-disable-next-line no-new\n new URL(url);\n } catch (error) {\n throw new Error('\"baseUrl\" is invalid');\n }\n return url;\n};\n\nconst isValueValid = (\n value: string | undefined,\n valueName: string,\n valueOpts: Array<string | undefined>,\n) => {\n if (valueOpts.includes(value)) {\n return;\n }\n throw new Error(\n `For the \"${valueName}\" parameter \"${value}\" is not a valid option,` +\n ` available options are: ${valueOpts.map(v => v || 'none').join(', ')}`,\n );\n};\n\nexport function createQuayRepositoryAction() {\n return createTemplateAction<TemplateActionParameters>({\n id: 'quay:create-repository',\n description: 'Create an quay image repository',\n schema: {\n input: {\n type: 'object',\n required: ['name', 'visibility', 'description', 'token'],\n properties: {\n name: {\n title: 'Repository name',\n description: 'Name of the repository to be created',\n type: 'string',\n },\n visibility: {\n title: 'Visibility setting',\n description:\n 'Visibility setting for the created repository, either public or private',\n type: 'string',\n },\n description: {\n title: 'Repository description',\n description: 'The repository desription',\n type: 'string',\n },\n token: {\n title: 'Token',\n description: 'Bearer token used for authorization',\n type: 'string',\n },\n baseUrl: {\n title: 'Base URL',\n description:\n 'URL of your quay instance, set to \"https://quay.io\" by default',\n type: 'string',\n },\n namespace: {\n title: 'Namespace',\n description:\n 'Namespace in which to create the repository, by default the users namespace',\n type: 'string',\n },\n repoKind: {\n title: 'Repository kind',\n description:\n 'The crated repository type either image or an application, if empty image will be used',\n type: 'string',\n },\n },\n },\n output: {\n type: 'object',\n properties: {\n repositoryUrl: {\n title: 'Quay image repository URL',\n type: 'string',\n description: 'Created repository URL link',\n },\n },\n },\n },\n async handler(ctx) {\n const { token, name, visibility, namespace, description, repoKind } =\n ctx.input;\n const baseUrl = getUrl(ctx.input.baseUrl);\n isValueValid(visibility, 'visibility', ['public', 'private']);\n isValueValid(repoKind, 'repository kind', [\n 'application',\n 'image',\n undefined,\n ]);\n\n const params: RequestBody = {\n description,\n repository: name,\n visibility,\n namespace,\n repo_kind: repoKind,\n };\n\n const uri = encodeURI(`${baseUrl}/api/v1/repository`);\n const response = await fetch(uri, {\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(params),\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorBody = (await response.json()) as ResponseErrorBody;\n const errorStatus = errorBody.status || response.status;\n // Some error responses don't have the structure defined in ResponseErrorBody\n const errorMsg = errorBody.detail || (errorBody as any).error;\n throw new Error(\n `Failed to create Quay repository, ${errorStatus} -- ${errorMsg}`,\n );\n }\n\n const body = (await response.json()) as ResponseBody;\n ctx.output(\n 'repositoryUrl',\n `${baseUrl}/repository/${body.namespace}/${body.name}`,\n );\n },\n });\n}\n"],"names":["createTemplateAction"],"mappings":";;;;AAgDA,MAAM,MAAA,GAAS,CAAC,GAAoC,KAAA;AAClD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAO,OAAA,iBAAA,CAAA;AAAA,GACT;AACA,EAAI,IAAA;AAEF,IAAA,IAAI,IAAI,GAAG,CAAA,CAAA;AAAA,WACJ,KAAO,EAAA;AACd,IAAM,MAAA,IAAI,MAAM,sBAAsB,CAAA,CAAA;AAAA,GACxC;AACA,EAAO,OAAA,GAAA,CAAA;AACT,CAAA,CAAA;AAEA,MAAM,YAAe,GAAA,CACnB,KACA,EAAA,SAAA,EACA,SACG,KAAA;AACH,EAAI,IAAA,SAAA,CAAU,QAAS,CAAA,KAAK,CAAG,EAAA;AAC7B,IAAA,OAAA;AAAA,GACF;AACA,EAAA,MAAM,IAAI,KAAA;AAAA,IACR,CAAY,SAAA,EAAA,SAAS,CAAgB,aAAA,EAAA,KAAK,CACb,gDAAA,EAAA,SAAA,CAAU,GAAI,CAAA,CAAA,CAAA,KAAK,CAAK,IAAA,MAAM,CAAE,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA;AAAA,GACzE,CAAA;AACF,CAAA,CAAA;AAEO,SAAS,0BAA6B,GAAA;AAC3C,EAAA,OAAOA,yCAA+C,CAAA;AAAA,IACpD,EAAI,EAAA,wBAAA;AAAA,IACJ,WAAa,EAAA,iCAAA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AA,MAAA,CAAA;AAEjD,QAAM,MAAA,QAAA,GAAW,SAAU,CAAA,MAAA,IAAW,SAAkB,CAAA,KAAA,CAAA;AACxD,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,kCAAA,EAAqC,WAAW,CAAA,IAAA,EAAO,QAAQ,CAAA,CAAA;AAAA,SACjE,CAAA;AAAA,OACF;AAEA,MAAM,MAAA,IAAA,GAAQ,MAAM,QAAA,CAAS,IAAK,EAAA,CAAA;AAClC,MAAI,GAAA,CAAA,MAAA;AAAA,QACF,eAAA;AAAA,QACA,GAAG,OAAO,CAAA,YAAA,EAAe,KAAK,SAAS,CAAA,CAAA,EAAI,KAAK,IAAI,CAAA,CAAA;AAAA,OACtD,CAAA;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"createQuayRepository.cjs.js","sources":["../../src/actions/createQuayRepository.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\n\nexport interface ResponseBody {\n namespace: string;\n name: string;\n kind: string;\n}\nexport interface ResponseErrorBody {\n detail: string;\n error_message: string;\n error_type: string;\n title: string;\n type: string;\n status: number;\n}\ninterface RequestBody {\n repository: string;\n visibility: string;\n namespace?: string;\n description: string;\n repo_kind?: string;\n}\n\n/**\n * @public\n */\nexport type TemplateActionParameters = {\n name: string;\n visibility: string;\n description: string;\n token: string;\n baseUrl?: string;\n namespace?: string;\n repoKind?: string;\n};\n\nconst getUrl = (url: string | undefined): string => {\n if (!url) {\n return 'https://quay.io';\n }\n try {\n // eslint-disable-next-line no-new\n new URL(url);\n } catch (error) {\n throw new Error('\"baseUrl\" is invalid');\n }\n return url;\n};\n\nconst isValueValid = (\n value: string | undefined,\n valueName: string,\n valueOpts: Array<string | undefined>,\n) => {\n if (valueOpts.includes(value)) {\n return;\n }\n throw new Error(\n `For the \"${valueName}\" parameter \"${value}\" is not a valid option,` +\n ` available options are: ${valueOpts.map(v => v || 'none').join(', ')}`,\n );\n};\n\n/**\n * @public\n */\nexport function createQuayRepositoryAction() {\n return createTemplateAction<TemplateActionParameters>({\n id: 'quay:create-repository',\n description: 'Create an quay image repository',\n schema: {\n input: {\n type: 'object',\n required: ['name', 'visibility', 'description', 'token'],\n properties: {\n name: {\n title: 'Repository name',\n description: 'Name of the repository to be created',\n type: 'string',\n },\n visibility: {\n title: 'Visibility setting',\n description:\n 'Visibility setting for the created repository, either public or private',\n type: 'string',\n },\n description: {\n title: 'Repository description',\n description: 'The repository desription',\n type: 'string',\n },\n token: {\n title: 'Token',\n description: 'Bearer token used for authorization',\n type: 'string',\n },\n baseUrl: {\n title: 'Base URL',\n description:\n 'URL of your quay instance, set to \"https://quay.io\" by default',\n type: 'string',\n },\n namespace: {\n title: 'Namespace',\n description:\n 'Namespace in which to create the repository, by default the users namespace',\n type: 'string',\n },\n repoKind: {\n title: 'Repository kind',\n description:\n 'The crated repository type either image or an application, if empty image will be used',\n type: 'string',\n },\n },\n },\n output: {\n type: 'object',\n properties: {\n repositoryUrl: {\n title: 'Quay image repository URL',\n type: 'string',\n description: 'Created repository URL link',\n },\n },\n },\n },\n async handler(ctx) {\n const { token, name, visibility, namespace, description, repoKind } =\n ctx.input;\n const baseUrl = getUrl(ctx.input.baseUrl);\n isValueValid(visibility, 'visibility', ['public', 'private']);\n isValueValid(repoKind, 'repository kind', [\n 'application',\n 'image',\n undefined,\n ]);\n\n const params: RequestBody = {\n description,\n repository: name,\n visibility,\n namespace,\n repo_kind: repoKind,\n };\n\n const uri = encodeURI(`${baseUrl}/api/v1/repository`);\n const response = await fetch(uri, {\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(params),\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorBody = (await response.json()) as ResponseErrorBody;\n const errorStatus = errorBody.status || response.status;\n // Some error responses don't have the structure defined in ResponseErrorBody\n const errorMsg = errorBody.detail || (errorBody as any).error;\n throw new Error(\n `Failed to create Quay repository, ${errorStatus} -- ${errorMsg}`,\n );\n }\n\n const body = (await response.json()) as ResponseBody;\n ctx.output(\n 'repositoryUrl',\n `${baseUrl}/repository/${body.namespace}/${body.name}`,\n );\n },\n });\n}\n"],"names":["createTemplateAction"],"mappings":";;;;AAmDA,MAAM,MAAA,GAAS,CAAC,GAAoC,KAAA;AAClD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAO,OAAA,iBAAA;AAAA;AAET,EAAI,IAAA;AAEF,IAAA,IAAI,IAAI,GAAG,CAAA;AAAA,WACJ,KAAO,EAAA;AACd,IAAM,MAAA,IAAI,MAAM,sBAAsB,CAAA;AAAA;AAExC,EAAO,OAAA,GAAA;AACT,CAAA;AAEA,MAAM,YAAe,GAAA,CACnB,KACA,EAAA,SAAA,EACA,SACG,KAAA;AACH,EAAI,IAAA,SAAA,CAAU,QAAS,CAAA,KAAK,CAAG,EAAA;AAC7B,IAAA;AAAA;AAEF,EAAA,MAAM,IAAI,KAAA;AAAA,IACR,CAAY,SAAA,EAAA,SAAS,CAAgB,aAAA,EAAA,KAAK,CACb,gDAAA,EAAA,SAAA,CAAU,GAAI,CAAA,CAAA,CAAA,KAAK,CAAK,IAAA,MAAM,CAAE,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,GACzE;AACF,CAAA;AAKO,SAAS,0BAA6B,GAAA;AAC3C,EAAA,OAAOA,yCAA+C,CAAA;AAAA,IACpD,EAAI,EAAA,wBAAA;AAAA,IACJ,WAAa,EAAA,iCAAA;AAAA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IAAA,EAAO,QAAQ,CAAA;AAAA,SACjE;AAAA;AAGF,MAAM,MAAA,IAAA,GAAQ,MAAM,QAAA,CAAS,IAAK,EAAA;AAClC,MAAI,GAAA,CAAA,MAAA;AAAA,QACF,eAAA;AAAA,QACA,GAAG,OAAO,CAAA,YAAA,EAAe,KAAK,SAAS,CAAA,CAAA,EAAI,KAAK,IAAI,CAAA;AAAA,OACtD;AAAA;AACF,GACD,CAAA;AACH;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder-node';
2
- import * as _backstage_types from '@backstage/types';
2
+ import * as _backstage_types_index from '@backstage/types/index';
3
3
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
4
4
 
5
+ /**
6
+ * @public
7
+ */
5
8
  type TemplateActionParameters = {
6
9
  name: string;
7
10
  visibility: string;
@@ -11,8 +14,14 @@ type TemplateActionParameters = {
11
14
  namespace?: string;
12
15
  repoKind?: string;
13
16
  };
14
- declare function createQuayRepositoryAction(): _backstage_plugin_scaffolder_node.TemplateAction<TemplateActionParameters, _backstage_types.JsonObject>;
17
+ /**
18
+ * @public
19
+ */
20
+ declare function createQuayRepositoryAction(): _backstage_plugin_scaffolder_node.TemplateAction<TemplateActionParameters, _backstage_types_index.JsonObject>;
15
21
 
22
+ /**
23
+ * @public
24
+ */
16
25
  declare const scaffolderModuleQuayAction: _backstage_backend_plugin_api.BackendFeature;
17
26
 
18
- export { createQuayRepositoryAction, scaffolderModuleQuayAction as default };
27
+ export { type TemplateActionParameters, createQuayRepositoryAction, scaffolderModuleQuayAction as default };
@@ -1 +1 @@
1
- {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';\n\nimport { createQuayRepositoryAction } from './actions';\n\nexport const scaffolderModuleQuayAction = createBackendModule({\n moduleId: 'scaffolder-backend-quay',\n pluginId: 'scaffolder',\n register(env) {\n env.registerInit({\n deps: {\n scaffolder: scaffolderActionsExtensionPoint,\n },\n async init({ scaffolder }) {\n scaffolder.addActions(createQuayRepositoryAction());\n },\n });\n },\n});\n"],"names":["createBackendModule","scaffolderActionsExtensionPoint","createQuayRepositoryAction"],"mappings":";;;;;;AAoBO,MAAM,6BAA6BA,oCAAoB,CAAA;AAAA,EAC5D,QAAU,EAAA,yBAAA;AAAA,EACV,QAAU,EAAA,YAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,UAAY,EAAAC,qCAAA;AAAA,OACd;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAc,EAAA;AACzB,QAAW,UAAA,CAAA,UAAA,CAAWC,iDAA4B,CAAA,CAAA;AAAA,OACpD;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';\n\nimport { createQuayRepositoryAction } from './actions';\n\n/**\n * @public\n */\nexport const scaffolderModuleQuayAction = createBackendModule({\n moduleId: 'scaffolder-backend-quay',\n pluginId: 'scaffolder',\n register(env) {\n env.registerInit({\n deps: {\n scaffolder: scaffolderActionsExtensionPoint,\n },\n async init({ scaffolder }) {\n scaffolder.addActions(createQuayRepositoryAction());\n },\n });\n },\n});\n"],"names":["createBackendModule","scaffolderActionsExtensionPoint","createQuayRepositoryAction"],"mappings":";;;;;;AAuBO,MAAM,6BAA6BA,oCAAoB,CAAA;AAAA,EAC5D,QAAU,EAAA,yBAAA;AAAA,EACV,QAAU,EAAA,YAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,UAAY,EAAAC;AAAA,OACd;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAc,EAAA;AACzB,QAAW,UAAA,CAAA,UAAA,CAAWC,iDAA4B,CAAA;AAAA;AACpD,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-scaffolder-backend-module-quay",
3
3
  "description": "The quay-actions module for @backstage-community/plugin-scaffolder-backend-module-quay",
4
- "version": "2.2.2",
4
+ "version": "2.3.0",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -23,6 +23,13 @@
23
23
  },
24
24
  "./package.json": "./package.json"
25
25
  },
26
+ "typesVersions": {
27
+ "*": {
28
+ "index": [
29
+ "dist/index.d.ts"
30
+ ]
31
+ }
32
+ },
26
33
  "scripts": {
27
34
  "build": "backstage-cli package build",
28
35
  "clean": "backstage-cli package clean",
@@ -37,15 +44,15 @@
37
44
  "prettier:fix": "prettier --ignore-unknown --write ."
38
45
  },
39
46
  "dependencies": {
40
- "@backstage/backend-plugin-api": "^1.0.1",
41
- "@backstage/plugin-scaffolder-node": "^0.5.0",
47
+ "@backstage/backend-plugin-api": "^1.1.0",
48
+ "@backstage/plugin-scaffolder-node": "^0.6.2",
42
49
  "yaml": "^2.6.0"
43
50
  },
44
51
  "devDependencies": {
45
- "@backstage/cli": "0.28.2",
46
- "@backstage/plugin-scaffolder-node-test-utils": "0.1.14",
52
+ "@backstage/cli": "^0.29.4",
53
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.1.17",
47
54
  "@spotify/prettier-config": "^15.0.0",
48
- "prettier": "3.3.3"
55
+ "prettier": "3.4.2"
49
56
  },
50
57
  "files": [
51
58
  "dist"