@backstage/plugin-scaffolder-backend-module-azure 0.1.6 → 0.1.7
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 +11 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend-module-azure
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-scaffolder-node@0.4.1
|
|
9
|
+
- @backstage/backend-plugin-api@0.6.15
|
|
10
|
+
- @backstage/config@1.2.0
|
|
11
|
+
- @backstage/errors@1.2.4
|
|
12
|
+
- @backstage/integration@1.9.1
|
|
13
|
+
|
|
3
14
|
## 0.1.6
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -10,14 +10,14 @@ var yaml = require('yaml');
|
|
|
10
10
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
11
11
|
var alpha = require('@backstage/plugin-scaffolder-node/alpha');
|
|
12
12
|
|
|
13
|
-
function
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
14
|
|
|
15
|
-
var yaml__default = /*#__PURE__*/
|
|
15
|
+
var yaml__default = /*#__PURE__*/_interopDefaultCompat(yaml);
|
|
16
16
|
|
|
17
17
|
const examples = [
|
|
18
18
|
{
|
|
19
19
|
description: "Initializes a git repository of the content in the workspace, and publishes it to Azure.",
|
|
20
|
-
example: yaml__default
|
|
20
|
+
example: yaml__default.default.stringify({
|
|
21
21
|
steps: [
|
|
22
22
|
{
|
|
23
23
|
id: "publish",
|
|
@@ -32,7 +32,7 @@ const examples = [
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
description: "Add a description.",
|
|
35
|
-
example: yaml__default
|
|
35
|
+
example: yaml__default.default.stringify({
|
|
36
36
|
steps: [
|
|
37
37
|
{
|
|
38
38
|
id: "publish",
|
|
@@ -48,7 +48,7 @@ const examples = [
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
description: "Change the default branch.",
|
|
51
|
-
example: yaml__default
|
|
51
|
+
example: yaml__default.default.stringify({
|
|
52
52
|
steps: [
|
|
53
53
|
{
|
|
54
54
|
id: "publish",
|
|
@@ -234,5 +234,5 @@ const azureModule = backendPluginApi.createBackendModule({
|
|
|
234
234
|
});
|
|
235
235
|
|
|
236
236
|
exports.createPublishAzureAction = createPublishAzureAction;
|
|
237
|
-
exports
|
|
237
|
+
exports.default = azureModule;
|
|
238
238
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -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 of the content in the workspace, and publishes it to Azure.',\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: 'Add 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: 'Change the default branch.',\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 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,0FAAA;AAAA,IACF,OAAA,EAASA,yBAAK,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,CAA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,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 of the content in the workspace, and publishes it to Azure.',\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: 'Add 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: 'Change the default branch.',\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 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,0FAAA;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,oBAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL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A,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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-backend-module-azure",
|
|
3
3
|
"description": "The azure module for @backstage/plugin-scaffolder-backend",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"postpack": "backstage-cli package postpack"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
37
|
+
"@backstage/backend-plugin-api": "^0.6.15",
|
|
38
38
|
"@backstage/config": "^1.2.0",
|
|
39
39
|
"@backstage/errors": "^1.2.4",
|
|
40
40
|
"@backstage/integration": "^1.9.1",
|
|
41
|
-
"@backstage/plugin-scaffolder-node": "^0.4.
|
|
41
|
+
"@backstage/plugin-scaffolder-node": "^0.4.1",
|
|
42
42
|
"azure-devops-node-api": "^12.0.0",
|
|
43
43
|
"yaml": "^2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@backstage/cli": "^0.26.
|
|
47
|
-
"@backstage/plugin-scaffolder-node-test-utils": "^0.1.
|
|
46
|
+
"@backstage/cli": "^0.26.1",
|
|
47
|
+
"@backstage/plugin-scaffolder-node-test-utils": "^0.1.1"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"dist"
|