@backstage-community/plugin-scaffolder-backend-module-quay 2.18.0 → 2.20.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,17 @@
1
1
  # @backstage-community/plugin-scaffolder-backend-module-quay
2
2
 
3
+ ## 2.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d4e8668: Backstage version bump to v1.51.0
8
+
9
+ ## 2.19.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 07b8314: Backstage version bump to v1.50.4
14
+
3
15
  ## 2.18.0
4
16
 
5
17
  ### Minor Changes
@@ -56,7 +56,7 @@ function createQuayRepositoryAction() {
56
56
  isValueValid(repoKind, "repository kind", [
57
57
  "application",
58
58
  "image",
59
- undefined
59
+ void 0
60
60
  ]);
61
61
  const params = {
62
62
  description,
@@ -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\nimport { examples } from './quay-actions.examples';\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({\n id: 'quay:create-repository',\n examples,\n description: 'Create an quay image repository',\n schema: {\n input: {\n name: z => z.string().describe('Name of the repository to be created'),\n visibility: z =>\n z\n .string()\n .describe(\n 'Visibility setting for the created repository, either public or private',\n ),\n description: z => z.string().describe('The repository description'),\n token: z => z.string().describe('Bearer token used for authorization'),\n baseUrl: z =>\n z\n .string()\n .optional()\n .describe(\n 'URL of your quay instance, set to \"https://quay.io\" by default',\n ),\n namespace: z =>\n z\n .string()\n .optional()\n .describe(\n 'Namespace in which to create the repository, by default the users namespace',\n ),\n repoKind: z =>\n z\n .string()\n .optional()\n .describe(\n 'The created repository type either image or an application, if empty image will be used',\n ),\n },\n output: {\n repositoryUrl: z => z.string().describe('Created repository URL link'),\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","examples"],"mappings":";;;;;AAqDA,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,yCAAqB,CAAA;AAAA,IAC1B,EAAI,EAAA,wBAAA;AAAA,cACJC,6BAAA;AAAA,IACA,WAAa,EAAA,iCAAA;AAAA,IACb,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,MAAM,CAAK,CAAA,KAAA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AA;AAAA,QACZ,UAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAW,EAAA;AAAA,OACb;AAEA,MAAA,MAAM,GAAM,GAAA,SAAA,CAAU,CAAG,EAAA,OAAO,CAAoB,kBAAA,CAAA,CAAA;AACpD,MAAM,MAAA,QAAA,GAAW,MAAM,KAAA,CAAM,GAAK,EAAA;AAAA,QAChC,OAAS,EAAA;AAAA,UACP,cAAgB,EAAA,kBAAA;AAAA,UAChB,MAAQ,EAAA,kBAAA;AAAA,UACR,aAAA,EAAe,UAAU,KAAK,CAAA;AAAA,SAChC;AAAA,QACA,IAAA,EAAM,IAAK,CAAA,SAAA,CAAU,MAAM,CAAA;AAAA,QAC3B,MAAQ,EAAA;AAAA,OACT,CAAA;AAED,MAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,QAAM,MAAA,SAAA,GAAa,MAAM,QAAA,CAAS,IAAK,EAAA;AACvC,QAAM,MAAA,WAAA,GAAc,SAAU,CAAA,MAAA,IAAU,QAAS,CAAA,MAAA;AAEjD,QAAM,MAAA,QAAA,GAAW,SAAU,CAAA,MAAA,IAAW,SAAkB,CAAA,KAAA;AACxD,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,kCAAA,EAAqC,WAAW,CAAA,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;;;;"}
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\nimport { examples } from './quay-actions.examples';\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({\n id: 'quay:create-repository',\n examples,\n description: 'Create an quay image repository',\n schema: {\n input: {\n name: z => z.string().describe('Name of the repository to be created'),\n visibility: z =>\n z\n .string()\n .describe(\n 'Visibility setting for the created repository, either public or private',\n ),\n description: z => z.string().describe('The repository description'),\n token: z => z.string().describe('Bearer token used for authorization'),\n baseUrl: z =>\n z\n .string()\n .optional()\n .describe(\n 'URL of your quay instance, set to \"https://quay.io\" by default',\n ),\n namespace: z =>\n z\n .string()\n .optional()\n .describe(\n 'Namespace in which to create the repository, by default the users namespace',\n ),\n repoKind: z =>\n z\n .string()\n .optional()\n .describe(\n 'The created repository type either image or an application, if empty image will be used',\n ),\n },\n output: {\n repositoryUrl: z => z.string().describe('Created repository URL link'),\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","examples"],"mappings":";;;;;AAqDA,MAAM,MAAA,GAAS,CAAC,GAAA,KAAoC;AAClD,EAAA,IAAI,CAAC,GAAA,EAAK;AACR,IAAA,OAAO,iBAAA;AAAA,EACT;AACA,EAAA,IAAI;AAEF,IAAA,IAAI,IAAI,GAAG,CAAA;AAAA,EACb,SAAS,KAAA,EAAO;AACd,IAAA,MAAM,IAAI,MAAM,sBAAsB,CAAA;AAAA,EACxC;AACA,EAAA,OAAO,GAAA;AACT,CAAA;AAEA,MAAM,YAAA,GAAe,CACnB,KAAA,EACA,SAAA,EACA,SAAA,KACG;AACH,EAAA,I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AAA;AACxD,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,kCAAA,EAAqC,WAAW,CAAA,IAAA,EAAO,QAAQ,CAAA;AAAA,SACjE;AAAA,MACF;AAEA,MAAA,MAAM,IAAA,GAAQ,MAAM,QAAA,CAAS,IAAA,EAAK;AAClC,MAAA,GAAA,CAAI,MAAA;AAAA,QACF,eAAA;AAAA,QACA,GAAG,OAAO,CAAA,YAAA,EAAe,KAAK,SAAS,CAAA,CAAA,EAAI,KAAK,IAAI,CAAA;AAAA,OACtD;AAAA,IACF;AAAA,GACD,CAAA;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"quay-actions.examples.cjs.js","sources":["../../src/actions/quay-actions.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { TemplateExample } from '@backstage/plugin-scaffolder-node';\n\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creates a public repository on Quay with basic details.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Quay Repository',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'example-repo',\n visibility: 'public',\n description: 'An example public repository on Quay',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Creates a private repository in a specific namespace on Quay.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Private Quay Repository',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'private-repo',\n visibility: 'private',\n description: 'Private repository for internal projects',\n namespace: 'example-namespace',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a Quay repository with a specified repository kind.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Application Repository on Quay',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'app-repo',\n visibility: 'public',\n description: 'Application repository on Quay',\n repoKind: 'application',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAoBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,yDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,kBAAA;AAAA,UACJ,MAAQ,EAAA,wBAAA;AAAA,UACR,IAAM,EAAA,wBAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,iBAAA;AAAA,YACT,KAAO,EAAA,iBAAA;AAAA,YACP,IAAM,EAAA,cAAA;AAAA,YACN,UAAY,EAAA,QAAA;AAAA,YACZ,WAAa,EAAA;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,+DAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,kBAAA;AAAA,UACJ,MAAQ,EAAA,wBAAA;AAAA,UACR,IAAM,EAAA,gCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,iBAAA;AAAA,YACT,KAAO,EAAA,iBAAA;AAAA,YACP,IAAM,EAAA,cAAA;AAAA,YACN,UAAY,EAAA,SAAA;AAAA,YACZ,WAAa,EAAA,0CAAA;AAAA,YACb,SAAW,EAAA;AAAA;AACb;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,6DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,kBAAA;AAAA,UACJ,MAAQ,EAAA,wBAAA;AAAA,UACR,IAAM,EAAA,uCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,iBAAA;AAAA,YACT,KAAO,EAAA,iBAAA;AAAA,YACP,IAAM,EAAA,UAAA;AAAA,YACN,UAAY,EAAA,QAAA;AAAA,YACZ,WAAa,EAAA,gCAAA;AAAA,YACb,QAAU,EAAA;AAAA;AACZ;AACF;AACF,KACD;AAAA;AAEL;;;;"}
1
+ {"version":3,"file":"quay-actions.examples.cjs.js","sources":["../../src/actions/quay-actions.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { TemplateExample } from '@backstage/plugin-scaffolder-node';\n\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creates a public repository on Quay with basic details.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Quay Repository',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'example-repo',\n visibility: 'public',\n description: 'An example public repository on Quay',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Creates a private repository in a specific namespace on Quay.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Private Quay Repository',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'private-repo',\n visibility: 'private',\n description: 'Private repository for internal projects',\n namespace: 'example-namespace',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a Quay repository with a specified repository kind.',\n example: yaml.stringify({\n steps: [\n {\n id: 'create-quay-repo',\n action: 'quay:create-repository',\n name: 'Create Application Repository on Quay',\n input: {\n baseUrl: 'https://quay.io',\n token: 'YOUR_AUTH_TOKEN',\n name: 'app-repo',\n visibility: 'public',\n description: 'Application repository on Quay',\n repoKind: 'application',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAoBO,MAAM,QAAA,GAA8B;AAAA,EACzC;AAAA,IACE,WAAA,EAAa,yDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,EAAA,EAAI,kBAAA;AAAA,UACJ,MAAA,EAAQ,wBAAA;AAAA,UACR,IAAA,EAAM,wBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,iBAAA;AAAA,YACT,KAAA,EAAO,iBAAA;AAAA,YACP,IAAA,EAAM,cAAA;AAAA,YACN,UAAA,EAAY,QAAA;AAAA,YACZ,WAAA,EAAa;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EACE,+DAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,EAAA,EAAI,kBAAA;AAAA,UACJ,MAAA,EAAQ,wBAAA;AAAA,UACR,IAAA,EAAM,gCAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,iBAAA;AAAA,YACT,KAAA,EAAO,iBAAA;AAAA,YACP,IAAA,EAAM,cAAA;AAAA,YACN,UAAA,EAAY,SAAA;AAAA,YACZ,WAAA,EAAa,0CAAA;AAAA,YACb,SAAA,EAAW;AAAA;AACb;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,6DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,EAAA,EAAI,kBAAA;AAAA,UACJ,MAAA,EAAQ,wBAAA;AAAA,UACR,IAAA,EAAM,uCAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,iBAAA;AAAA,YACT,KAAA,EAAO,iBAAA;AAAA,YACP,IAAA,EAAM,UAAA;AAAA,YACN,UAAA,EAAY,QAAA;AAAA,YACZ,WAAA,EAAa,gCAAA;AAAA,YACb,QAAA,EAAU;AAAA;AACZ;AACF;AACF,KACD;AAAA;AAEL;;;;"}
@@ -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';\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;;;;"}
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';\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,oCAAA,CAAoB;AAAA,EAC5D,QAAA,EAAU,yBAAA;AAAA,EACV,QAAA,EAAU,YAAA;AAAA,EACV,SAAS,GAAA,EAAK;AACZ,IAAA,GAAA,CAAI,YAAA,CAAa;AAAA,MACf,IAAA,EAAM;AAAA,QACJ,UAAA,EAAYC;AAAA,OACd;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAW,EAAG;AACzB,QAAA,UAAA,CAAW,UAAA,CAAWC,iDAA4B,CAAA;AAAA,MACpD;AAAA,KACD,CAAA;AAAA,EACH;AACF,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.18.0",
4
+ "version": "2.20.0",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -46,13 +46,13 @@
46
46
  "prettier:fix": "prettier --ignore-unknown --write ."
47
47
  },
48
48
  "dependencies": {
49
- "@backstage/backend-plugin-api": "^1.8.0",
50
- "@backstage/plugin-scaffolder-node": "^0.13.0",
49
+ "@backstage/backend-plugin-api": "^1.9.1",
50
+ "@backstage/plugin-scaffolder-node": "^0.13.3",
51
51
  "yaml": "^2.6.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@backstage/cli": "^0.36.0",
55
- "@backstage/plugin-scaffolder-node-test-utils": "^0.3.9"
54
+ "@backstage/cli": "^0.36.2",
55
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.3.11"
56
56
  },
57
57
  "files": [
58
58
  "dist"