@backstage/plugin-scaffolder-backend-module-azure 0.1.11-next.2 → 0.1.12

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,30 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-azure
2
2
 
3
+ ## 0.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/plugin-scaffolder-node@0.4.6
9
+ - @backstage/backend-plugin-api@0.6.20
10
+ - @backstage/config@1.2.0
11
+ - @backstage/errors@1.2.4
12
+ - @backstage/integration@1.12.0
13
+
14
+ ## 0.1.11
15
+
16
+ ### Patch Changes
17
+
18
+ - 78a0b08: Internal refactor to handle `BackendFeature` contract change.
19
+ - b4169ee: Use `GitRepository.webUrl` instead of `GitRepository.remoteUrl` to set the value of `repoContentsUrl` as `remoteUrl` can sometimes return an URL with the wrong format (e.g. `https://<organization>@dev.azure.com/<organization>/<project>/\_git/<repository>`).
20
+ - d44a20a: Added additional plugin metadata to `package.json`.
21
+ - Updated dependencies
22
+ - @backstage/backend-plugin-api@0.6.19
23
+ - @backstage/integration@1.12.0
24
+ - @backstage/plugin-scaffolder-node@0.4.5
25
+ - @backstage/config@1.2.0
26
+ - @backstage/errors@1.2.4
27
+
3
28
  ## 0.1.11-next.2
4
29
 
5
30
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -183,7 +183,12 @@ function createPublishAzureAction(options) {
183
183
  if (!repositoryId) {
184
184
  throw new errors.InputError("No Id returned from create repository for Azure");
185
185
  }
186
- const repoContentsUrl = remoteUrl;
186
+ const repoContentsUrl = returnedRepo.webUrl;
187
+ if (!repoContentsUrl) {
188
+ throw new errors.InputError(
189
+ "No web URL returned from create repository for Azure"
190
+ );
191
+ }
187
192
  const gitAuthorInfo = {
188
193
  name: gitAuthorName ? gitAuthorName : config.getOptionalString("scaffolder.defaultAuthor.name"),
189
194
  email: gitAuthorEmail ? gitAuthorEmail : config.getOptionalString("scaffolder.defaultAuthor.email")
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/actions/azure.examples.ts","../src/actions/azure.ts","../src/module.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';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description:\n 'Initializes a git repository with the content in the workspace, and publishes it to Azure DevOps with the default configuration.',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n },\n },\n ],\n }),\n },\n {\n description: 'Initializes an Azure DevOps repository with a description.',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n description: 'Initialize a git repository',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Initializes an Azure DevOps repository with a default branch, if not set defaults to master',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n defaultBranch: 'main',\n },\n },\n ],\n }),\n },\n];\n","/*\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 { InputError } from '@backstage/errors';\nimport {\n DefaultAzureDevOpsCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport {\n initRepoAndPush,\n getRepoSourceDirectory,\n parseRepoUrl,\n createTemplateAction,\n} from '@backstage/plugin-scaffolder-node';\nimport { GitRepositoryCreateOptions } from 'azure-devops-node-api/interfaces/GitInterfaces';\nimport {\n getBearerHandler,\n getPersonalAccessTokenHandler,\n WebApi,\n} from 'azure-devops-node-api';\nimport { Config } from '@backstage/config';\nimport { examples } from './azure.examples';\n\n/**\n * Creates a new action that initializes a git repository of the content in the workspace\n * and publishes it to Azure.\n * @public\n */\nexport function createPublishAzureAction(options: {\n integrations: ScmIntegrationRegistry;\n config: Config;\n}) {\n const { integrations, config } = options;\n\n return createTemplateAction<{\n repoUrl: string;\n description?: string;\n defaultBranch?: string;\n sourcePath?: string;\n token?: string;\n gitCommitMessage?: string;\n gitAuthorName?: string;\n gitAuthorEmail?: string;\n }>({\n id: 'publish:azure',\n examples,\n description:\n 'Initializes a git repository of the content in the workspace, and publishes it to Azure.',\n schema: {\n input: {\n type: 'object',\n required: ['repoUrl'],\n properties: {\n repoUrl: {\n title: 'Repository Location',\n type: 'string',\n },\n description: {\n title: 'Repository Description',\n type: 'string',\n },\n defaultBranch: {\n title: 'Default Branch',\n type: 'string',\n description: `Sets the default branch on the repository. The default value is 'master'`,\n },\n gitCommitMessage: {\n title: 'Git Commit Message',\n type: 'string',\n description: `Sets the commit message on the repository. The default value is 'initial commit'`,\n },\n gitAuthorName: {\n title: 'Default Author Name',\n type: 'string',\n description: `Sets the default author name for the commit. The default value is 'Scaffolder'`,\n },\n gitAuthorEmail: {\n title: 'Default Author Email',\n type: 'string',\n description: `Sets the default author email for the commit.`,\n },\n sourcePath: {\n title: 'Source Path',\n description:\n 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.',\n type: 'string',\n },\n token: {\n title: 'Authentication Token',\n type: 'string',\n description: 'The token to use for authorization to Azure',\n },\n },\n },\n output: {\n type: 'object',\n properties: {\n remoteUrl: {\n title: 'A URL to the repository with the provider',\n type: 'string',\n },\n repoContentsUrl: {\n title: 'A URL to the root of the repository',\n type: 'string',\n },\n repositoryId: {\n title: 'The Id of the created repository',\n type: 'string',\n },\n commitHash: {\n title: 'The git commit hash of the initial commit',\n type: 'string',\n },\n },\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n defaultBranch = 'master',\n gitCommitMessage = 'initial commit',\n gitAuthorName,\n gitAuthorEmail,\n } = ctx.input;\n\n const { owner, repo, host, organization } = parseRepoUrl(\n repoUrl,\n integrations,\n );\n\n if (!organization) {\n throw new InputError(\n `Invalid URL provider was included in the repo URL to create ${ctx.input.repoUrl}, missing organization`,\n );\n }\n\n const url = `https://${host}/${organization}`;\n const credentialProvider =\n DefaultAzureDevOpsCredentialsProvider.fromIntegrations(integrations);\n const credentials = await credentialProvider.getCredentials({ url: url });\n\n if (credentials === undefined && ctx.input.token === undefined) {\n throw new InputError(\n `No credentials provided ${url}, please check your integrations config`,\n );\n }\n\n const authHandler =\n ctx.input.token || credentials?.type === 'pat'\n ? getPersonalAccessTokenHandler(ctx.input.token ?? credentials!.token)\n : getBearerHandler(credentials!.token);\n\n const webApi = new WebApi(url, authHandler);\n const client = await webApi.getGitApi();\n const createOptions: GitRepositoryCreateOptions = { name: repo };\n const returnedRepo = await client.createRepository(createOptions, owner);\n\n if (!returnedRepo) {\n throw new InputError(\n `Unable to create the repository with Organization ${organization}, Project ${owner} and Repo ${repo}.\n Please make sure that both the Org and Project are typed corrected and exist.`,\n );\n }\n const remoteUrl = returnedRepo.remoteUrl;\n\n if (!remoteUrl) {\n throw new InputError(\n 'No remote URL returned from create repository for Azure',\n );\n }\n const repositoryId = returnedRepo.id;\n\n if (!repositoryId) {\n throw new InputError('No Id returned from create repository for Azure');\n }\n\n // blam: Repo contents is serialized into the path,\n // so it's just the base path I think\n const repoContentsUrl = remoteUrl;\n\n const gitAuthorInfo = {\n name: gitAuthorName\n ? gitAuthorName\n : config.getOptionalString('scaffolder.defaultAuthor.name'),\n email: gitAuthorEmail\n ? gitAuthorEmail\n : config.getOptionalString('scaffolder.defaultAuthor.email'),\n };\n\n const auth =\n ctx.input.token || credentials?.type === 'pat'\n ? {\n username: 'notempty',\n password: ctx.input.token ?? credentials!.token,\n }\n : { token: credentials!.token };\n\n const commitResult = await initRepoAndPush({\n dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath),\n remoteUrl,\n defaultBranch,\n auth: auth,\n logger: ctx.logger,\n commitMessage: gitCommitMessage\n ? gitCommitMessage\n : config.getOptionalString('scaffolder.defaultCommitMessage'),\n gitAuthorInfo,\n });\n\n ctx.output('commitHash', commitResult?.commitHash);\n ctx.output('remoteUrl', remoteUrl);\n ctx.output('repoContentsUrl', repoContentsUrl);\n ctx.output('repositoryId', repositoryId);\n },\n });\n}\n","/*\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 {\n createBackendModule,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { ScmIntegrations } from '@backstage/integration';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';\nimport { createPublishAzureAction } from './actions';\n\n/**\n * @public\n * The Azure Module for the Scaffolder Backend\n */\nexport const azureModule = createBackendModule({\n moduleId: 'azure',\n pluginId: 'scaffolder',\n register({ registerInit }) {\n registerInit({\n deps: {\n scaffolderActions: scaffolderActionsExtensionPoint,\n config: coreServices.rootConfig,\n },\n async init({ scaffolderActions, config }) {\n const integrations = ScmIntegrations.fromConfig(config);\n scaffolderActions.addActions(\n createPublishAzureAction({\n integrations,\n config,\n }),\n );\n },\n });\n },\n});\n"],"names":["yaml","createTemplateAction","parseRepoUrl","InputError","DefaultAzureDevOpsCredentialsProvider","getPersonalAccessTokenHandler","getBearerHandler","WebApi","initRepoAndPush","getRepoSourceDirectory","createBackendModule","scaffolderActionsExtensionPoint","coreServices","ScmIntegrations"],"mappings":";;;;;;;;;;;;;;;;AAmBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WACE,EAAA,kIAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,SAAA;AAAA,UACJ,MAAQ,EAAA,eAAA;AAAA,UACR,IAAM,EAAA,kBAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OACE,EAAA,iEAAA;AAAA,WACJ;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,4DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,SAAA;AAAA,UACJ,MAAQ,EAAA,eAAA;AAAA,UACR,IAAM,EAAA,kBAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OACE,EAAA,iEAAA;AAAA,YACF,WAAa,EAAA,6BAAA;AAAA,WACf;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,6FAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EA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,MAAI,GAAA,CAAA,MAAA,CAAO,YAAc,EAAA,YAAA,EAAc,UAAU,CAAA,CAAA;AACjD,MAAI,GAAA,CAAA,MAAA,CAAO,aAAa,SAAS,CAAA,CAAA;AACjC,MAAI,GAAA,CAAA,MAAA,CAAO,mBAAmB,eAAe,CAAA,CAAA;AAC7C,MAAI,GAAA,CAAA,MAAA,CAAO,gBAAgB,YAAY,CAAA,CAAA;AAAA,KACzC;AAAA,GACD,CAAA,CAAA;AACH;;ACzMO,MAAM,cAAcC,oCAAoB,CAAA;AAAA,EAC7C,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,YAAA;AAAA,EACV,QAAA,CAAS,EAAE,YAAA,EAAgB,EAAA;AACzB,IAAa,YAAA,CAAA;AAAA,MACX,IAAM,EAAA;AAAA,QACJ,iBAAmB,EAAAC,qCAAA;AAAA,QACnB,QAAQC,6BAAa,CAAA,UAAA;AAAA,OACvB;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,iBAAA,EAAmB,QAAU,EAAA;AACxC,QAAM,MAAA,YAAA,GAAeC,2BAAgB,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACtD,QAAkB,iBAAA,CAAA,UAAA;AAAA,UAChB,wBAAyB,CAAA;AAAA,YACvB,YAAA;AAAA,YACA,MAAA;AAAA,WACD,CAAA;AAAA,SACH,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/actions/azure.examples.ts","../src/actions/azure.ts","../src/module.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';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description:\n 'Initializes a git repository with the content in the workspace, and publishes it to Azure DevOps with the default configuration.',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n },\n },\n ],\n }),\n },\n {\n description: 'Initializes an Azure DevOps repository with a description.',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n description: 'Initialize a git repository',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Initializes an Azure DevOps repository with a default branch, if not set defaults to master',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:azure',\n name: 'Publish to Azure',\n input: {\n repoUrl:\n 'dev.azure.com?organization=organization&owner=project&repo=repo',\n defaultBranch: 'main',\n },\n },\n ],\n }),\n },\n];\n","/*\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 { InputError } from '@backstage/errors';\nimport {\n DefaultAzureDevOpsCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport {\n initRepoAndPush,\n getRepoSourceDirectory,\n parseRepoUrl,\n createTemplateAction,\n} from '@backstage/plugin-scaffolder-node';\nimport { GitRepositoryCreateOptions } from 'azure-devops-node-api/interfaces/GitInterfaces';\nimport {\n getBearerHandler,\n getPersonalAccessTokenHandler,\n WebApi,\n} from 'azure-devops-node-api';\nimport { Config } from '@backstage/config';\nimport { examples } from './azure.examples';\n\n/**\n * Creates a new action that initializes a git repository of the content in the workspace\n * and publishes it to Azure.\n * @public\n */\nexport function createPublishAzureAction(options: {\n integrations: ScmIntegrationRegistry;\n config: Config;\n}) {\n const { integrations, config } = options;\n\n return createTemplateAction<{\n repoUrl: string;\n description?: string;\n defaultBranch?: string;\n sourcePath?: string;\n token?: string;\n gitCommitMessage?: string;\n gitAuthorName?: string;\n gitAuthorEmail?: string;\n }>({\n id: 'publish:azure',\n examples,\n description:\n 'Initializes a git repository of the content in the workspace, and publishes it to Azure.',\n schema: {\n input: {\n type: 'object',\n required: ['repoUrl'],\n properties: {\n repoUrl: {\n title: 'Repository Location',\n type: 'string',\n },\n description: {\n title: 'Repository Description',\n type: 'string',\n },\n defaultBranch: {\n title: 'Default Branch',\n type: 'string',\n description: `Sets the default branch on the repository. The default value is 'master'`,\n },\n gitCommitMessage: {\n title: 'Git Commit Message',\n type: 'string',\n description: `Sets the commit message on the repository. The default value is 'initial commit'`,\n },\n gitAuthorName: {\n title: 'Default Author Name',\n type: 'string',\n description: `Sets the default author name for the commit. The default value is 'Scaffolder'`,\n },\n gitAuthorEmail: {\n title: 'Default Author Email',\n type: 'string',\n description: `Sets the default author email for the commit.`,\n },\n sourcePath: {\n title: 'Source Path',\n description:\n 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.',\n type: 'string',\n },\n token: {\n title: 'Authentication Token',\n type: 'string',\n description: 'The token to use for authorization to Azure',\n },\n },\n },\n output: {\n type: 'object',\n properties: {\n remoteUrl: {\n title: 'A URL to the repository with the provider',\n type: 'string',\n },\n repoContentsUrl: {\n title: 'A URL to the root of the repository',\n type: 'string',\n },\n repositoryId: {\n title: 'The Id of the created repository',\n type: 'string',\n },\n commitHash: {\n title: 'The git commit hash of the initial commit',\n type: 'string',\n },\n },\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n defaultBranch = 'master',\n gitCommitMessage = 'initial commit',\n gitAuthorName,\n gitAuthorEmail,\n } = ctx.input;\n\n const { owner, repo, host, organization } = parseRepoUrl(\n repoUrl,\n integrations,\n );\n\n if (!organization) {\n throw new InputError(\n `Invalid URL provider was included in the repo URL to create ${ctx.input.repoUrl}, missing organization`,\n );\n }\n\n const url = `https://${host}/${organization}`;\n const credentialProvider =\n DefaultAzureDevOpsCredentialsProvider.fromIntegrations(integrations);\n const credentials = await credentialProvider.getCredentials({ url: url });\n\n if (credentials === undefined && ctx.input.token === undefined) {\n throw new InputError(\n `No credentials provided ${url}, please check your integrations config`,\n );\n }\n\n const authHandler =\n ctx.input.token || credentials?.type === 'pat'\n ? getPersonalAccessTokenHandler(ctx.input.token ?? credentials!.token)\n : getBearerHandler(credentials!.token);\n\n const webApi = new WebApi(url, authHandler);\n const client = await webApi.getGitApi();\n const createOptions: GitRepositoryCreateOptions = { name: repo };\n const returnedRepo = await client.createRepository(createOptions, owner);\n\n if (!returnedRepo) {\n throw new InputError(\n `Unable to create the repository with Organization ${organization}, Project ${owner} and Repo ${repo}.\n Please make sure that both the Org and Project are typed corrected and exist.`,\n );\n }\n const remoteUrl = returnedRepo.remoteUrl;\n\n if (!remoteUrl) {\n throw new InputError(\n 'No remote URL returned from create repository for Azure',\n );\n }\n const repositoryId = returnedRepo.id;\n\n if (!repositoryId) {\n throw new InputError('No Id returned from create repository for Azure');\n }\n\n const repoContentsUrl = returnedRepo.webUrl;\n\n if (!repoContentsUrl) {\n throw new InputError(\n 'No web URL returned from create repository for Azure',\n );\n }\n\n const gitAuthorInfo = {\n name: gitAuthorName\n ? gitAuthorName\n : config.getOptionalString('scaffolder.defaultAuthor.name'),\n email: gitAuthorEmail\n ? gitAuthorEmail\n : config.getOptionalString('scaffolder.defaultAuthor.email'),\n };\n\n const auth =\n ctx.input.token || credentials?.type === 'pat'\n ? {\n username: 'notempty',\n password: ctx.input.token ?? credentials!.token,\n }\n : { token: credentials!.token };\n\n const commitResult = await initRepoAndPush({\n dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath),\n remoteUrl,\n defaultBranch,\n auth: auth,\n logger: ctx.logger,\n commitMessage: gitCommitMessage\n ? gitCommitMessage\n : config.getOptionalString('scaffolder.defaultCommitMessage'),\n gitAuthorInfo,\n });\n\n ctx.output('commitHash', commitResult?.commitHash);\n ctx.output('remoteUrl', remoteUrl);\n ctx.output('repoContentsUrl', repoContentsUrl);\n ctx.output('repositoryId', repositoryId);\n },\n });\n}\n","/*\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 {\n createBackendModule,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { ScmIntegrations } from '@backstage/integration';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';\nimport { createPublishAzureAction } from './actions';\n\n/**\n * @public\n * The Azure Module for the Scaffolder Backend\n */\nexport const azureModule = createBackendModule({\n moduleId: 'azure',\n pluginId: 'scaffolder',\n register({ registerInit }) {\n registerInit({\n deps: {\n scaffolderActions: scaffolderActionsExtensionPoint,\n config: coreServices.rootConfig,\n },\n async init({ scaffolderActions, config }) {\n const integrations = ScmIntegrations.fromConfig(config);\n scaffolderActions.addActions(\n createPublishAzureAction({\n integrations,\n config,\n }),\n );\n },\n });\n },\n});\n"],"names":["yaml","createTemplateAction","parseRepoUrl","InputError","DefaultAzureDevOpsCredentialsProvider","getPersonalAccessTokenHandler","getBearerHandler","WebApi","initRepoAndPush","getRepoSourceDirectory","createBackendModule","scaffolderActionsExt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O,gBAAgB,YAAY,CAAA,CAAA;AAAA,KACzC;AAAA,GACD,CAAA,CAAA;AACH;;AC7MO,MAAM,cAAcC,oCAAoB,CAAA;AAAA,EAC7C,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,YAAA;AAAA,EACV,QAAA,CAAS,EAAE,YAAA,EAAgB,EAAA;AACzB,IAAa,YAAA,CAAA;AAAA,MACX,IAAM,EAAA;AAAA,QACJ,iBAAmB,EAAAC,qCAAA;AAAA,QACnB,QAAQC,6BAAa,CAAA,UAAA;AAAA,OACvB;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,iBAAA,EAAmB,QAAU,EAAA;AACxC,QAAM,MAAA,YAAA,GAAeC,2BAAgB,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACtD,QAAkB,iBAAA,CAAA,UAAA;AAAA,UAChB,wBAAyB,CAAA;AAAA,YACvB,YAAA;AAAA,YACA,MAAA;AAAA,WACD,CAAA;AAAA,SACH,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
package/dist/index.d.ts CHANGED
@@ -27,6 +27,6 @@ declare function createPublishAzureAction(options: {
27
27
  * @public
28
28
  * The Azure Module for the Scaffolder Backend
29
29
  */
30
- declare const azureModule: () => _backstage_backend_plugin_api.BackendFeature;
30
+ declare const azureModule: _backstage_backend_plugin_api.BackendFeatureCompat;
31
31
 
32
32
  export { createPublishAzureAction, azureModule as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend-module-azure",
3
- "version": "0.1.11-next.2",
3
+ "version": "0.1.12",
4
4
  "description": "The azure module for @backstage/plugin-scaffolder-backend",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -39,16 +39,16 @@
39
39
  "test": "backstage-cli package test"
40
40
  },
41
41
  "dependencies": {
42
- "@backstage/backend-plugin-api": "^0.6.19-next.3",
42
+ "@backstage/backend-plugin-api": "^0.6.20",
43
43
  "@backstage/config": "^1.2.0",
44
44
  "@backstage/errors": "^1.2.4",
45
- "@backstage/integration": "^1.12.0-next.1",
46
- "@backstage/plugin-scaffolder-node": "^0.4.5-next.3",
45
+ "@backstage/integration": "^1.12.0",
46
+ "@backstage/plugin-scaffolder-node": "^0.4.6",
47
47
  "azure-devops-node-api": "^12.0.0",
48
48
  "yaml": "^2.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@backstage/cli": "^0.26.7-next.3",
52
- "@backstage/plugin-scaffolder-node-test-utils": "^0.1.5-next.3"
51
+ "@backstage/cli": "^0.26.8",
52
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.1.6"
53
53
  }
54
54
  }