@backstage/plugin-scaffolder-node 0.12.0-next.1 → 0.12.1-next.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 +48 -0
- package/dist/scm/git.cjs.js +2 -1
- package/dist/scm/git.cjs.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.12.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@1.7.6-next.0
|
|
10
|
+
- @backstage/integration@1.18.2-next.0
|
|
11
|
+
- @backstage/backend-plugin-api@1.4.5-next.0
|
|
12
|
+
- @backstage/errors@1.2.7
|
|
13
|
+
- @backstage/types@1.2.2
|
|
14
|
+
- @backstage/plugin-permission-common@0.9.3-next.0
|
|
15
|
+
- @backstage/plugin-scaffolder-common@1.7.3-next.0
|
|
16
|
+
|
|
17
|
+
## 0.12.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 9b81a90: **BREAKING** - Marking optional fields as required in the `TaskBroker`, these can be fixed with a no-op `() => void` if you don't want to implement the functions.
|
|
22
|
+
|
|
23
|
+
- `cancel`, `recoverTasks` and `retry` are the required methods on the `TaskBroker` interface.
|
|
24
|
+
|
|
25
|
+
**NOTE**: If you're affected by this breaking change, please reach out to us in an issue as we're thinking about completely removing the `TaskBroker` extension point soon and would like to hear your use cases for the upcoming re-architecture of the `scaffolder-backend` plugin.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- c8aa210: **BREAKING ALPHA**: We've moved the `scaffolderActionsExtensionPoint` from `/alpha` to the main export.
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
// before
|
|
33
|
+
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
|
|
34
|
+
|
|
35
|
+
// after
|
|
36
|
+
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- 6e2bda7: **DEPRECATION**: We're going to be working on refactoring a lot of the internals of the Scaffolder backend plugin, and with that comes a lot of deprecations and removals for public types that are making these things hard.
|
|
40
|
+
|
|
41
|
+
If you're using these types, please reach out to us either on Discord or a GitHub issue with your use cases.
|
|
42
|
+
|
|
43
|
+
- `SerializedTask`, `SerializedTaskEvent`, `TaskBroker`, `TaskContext`, `TaskBrokerDispatchOptions`, `TaskBrokerDispatchResult`, `TaskCompletionState`, `TaskEventType`, `TaskFilter`, `TaskFilters`, `TaskStatus` are the types that have now been marked as deprecated, and will be removed in a future release.
|
|
44
|
+
|
|
45
|
+
- Updated dependencies
|
|
46
|
+
- @backstage/integration@1.18.1
|
|
47
|
+
- @backstage/backend-plugin-api@1.4.4
|
|
48
|
+
- @backstage/plugin-permission-common@0.9.2
|
|
49
|
+
- @backstage/plugin-scaffolder-common@1.7.2
|
|
50
|
+
|
|
3
51
|
## 0.12.0-next.1
|
|
4
52
|
|
|
5
53
|
### Patch Changes
|
package/dist/scm/git.cjs.js
CHANGED
|
@@ -15,6 +15,8 @@ function isAuthCallbackOptions(options) {
|
|
|
15
15
|
return "onAuth" in options;
|
|
16
16
|
}
|
|
17
17
|
class Git {
|
|
18
|
+
headers;
|
|
19
|
+
config;
|
|
18
20
|
constructor(config) {
|
|
19
21
|
this.config = config;
|
|
20
22
|
this.onAuth = config.onAuth;
|
|
@@ -23,7 +25,6 @@ class Git {
|
|
|
23
25
|
...config.token ? { Authorization: `Bearer ${config.token}` } : {}
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
|
-
headers;
|
|
27
28
|
async add(options) {
|
|
28
29
|
const { dir, filepath } = options;
|
|
29
30
|
this.config.logger?.info(`Adding file {dir=${dir},filepath=${filepath}}`);
|
package/dist/scm/git.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.cjs.js","sources":["../../src/scm/git.ts"],"sourcesContent":["/*\n * Copyright 2020 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 git, {\n AuthCallback,\n MergeResult,\n ProgressCallback,\n ReadCommitResult,\n} from 'isomorphic-git';\nimport http from 'isomorphic-git/http/node';\nimport fs from 'fs-extra';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n// @ts-ignore\nimport { pgp } from '@isomorphic-git/pgp-plugin';\n\nfunction isAuthCallbackOptions(\n options: StaticAuthOptions | AuthCallbackOptions,\n): options is AuthCallbackOptions {\n return 'onAuth' in options;\n}\n\n/**\n * Configure static credential for authentication\n *\n * @public\n */\nexport type StaticAuthOptions = {\n username?: string;\n password?: string;\n token?: string;\n logger?: LoggerService;\n};\n\n/**\n * Configure an authentication callback that can provide credentials on demand\n *\n * @public\n */\nexport type AuthCallbackOptions = {\n onAuth: AuthCallback;\n logger?: LoggerService;\n};\n\n/*\nprovider username password\nAzure 'notempty' token\nBitbucket Cloud 'x-token-auth' token\nBitbucket Server username password or token\nGitHub 'x-access-token' token\nGitLab 'oauth2' token\n\nFrom : https://isomorphic-git.org/docs/en/onAuth with fix for GitHub\n\nOr token provided as `token` for Bearer auth header\ninstead of Basic Auth (e.g., Bitbucket Server).\n*/\n\n/**\n * A convenience wrapper around the `isomorphic-git` library.\n *\n * @public\n */\n\nexport class Git {\n private readonly headers: {\n [x: string]: string;\n };\n\n private constructor(\n private readonly config: {\n onAuth: AuthCallback;\n token?: string;\n logger?: LoggerService;\n },\n ) {\n this.onAuth = config.onAuth;\n\n this.headers = {\n 'user-agent': 'git/@isomorphic-git',\n ...(config.token ? { Authorization: `Bearer ${config.token}` } : {}),\n };\n }\n\n async add(options: { dir: string; filepath: string }): Promise<void> {\n const { dir, filepath } = options;\n this.config.logger?.info(`Adding file {dir=${dir},filepath=${filepath}}`);\n\n return git.add({ fs, dir, filepath });\n }\n\n async addRemote(options: {\n dir: string;\n remote: string;\n url: string;\n force?: boolean;\n }): Promise<void> {\n const { dir, url, remote, force } = options;\n this.config.logger?.info(\n `Creating new remote {dir=${dir},remote=${remote},url=${url}}`,\n );\n return git.addRemote({ fs, dir, remote, url, force });\n }\n\n async deleteRemote(options: { dir: string; remote: string }): Promise<void> {\n const { dir, remote } = options;\n this.config.logger?.info(`Deleting remote {dir=${dir},remote=${remote}}`);\n return git.deleteRemote({ fs, dir, remote });\n }\n\n async checkout(options: { dir: string; ref: string }): Promise<void> {\n const { dir, ref } = options;\n this.config.logger?.info(`Checking out branch {dir=${dir},ref=${ref}}`);\n\n return git.checkout({ fs, dir, ref });\n }\n\n async branch(options: { dir: string; ref: string }): Promise<void> {\n const { dir, ref } = options;\n this.config.logger?.info(`Creating branch {dir=${dir},ref=${ref}`);\n\n return git.branch({ fs, dir, ref });\n }\n\n async commit(options: {\n dir: string;\n message: string;\n author: { name: string; email: string };\n committer: { name: string; email: string };\n signingKey?: string;\n }): Promise<string> {\n const { dir, message, author, committer, signingKey } = options;\n this.config.logger?.info(\n `Committing file to repo {dir=${dir},message=${message}}`,\n );\n return git.commit({\n fs,\n dir,\n message,\n author,\n committer,\n signingKey,\n onSign: signingKey ? pgp.sign : undefined,\n });\n }\n\n /** https://isomorphic-git.org/docs/en/clone */\n async clone(options: {\n url: string;\n dir: string;\n ref?: string;\n depth?: number;\n noCheckout?: boolean;\n }): Promise<void> {\n const { url, dir, ref, depth, noCheckout } = options;\n this.config.logger?.info(`Cloning repo {dir=${dir},url=${url}}`);\n\n try {\n return await git.clone({\n fs,\n http,\n url,\n dir,\n ref,\n singleBranch: true,\n depth: depth ?? 1,\n noCheckout,\n onProgress: this.onProgressHandler(),\n headers: this.headers,\n onAuth: this.onAuth,\n });\n } catch (ex) {\n this.config.logger?.error(`Failed to clone repo {dir=${dir},url=${url}}`);\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n /** https://isomorphic-git.org/docs/en/currentBranch */\n async currentBranch(options: {\n dir: string;\n fullName?: boolean;\n }): Promise<string | undefined> {\n const { dir, fullName = false } = options;\n return git.currentBranch({ fs, dir, fullname: fullName }) as Promise<\n string | undefined\n >;\n }\n\n /** https://isomorphic-git.org/docs/en/fetch */\n async fetch(options: {\n dir: string;\n remote?: string;\n tags?: boolean;\n }): Promise<void> {\n const { dir, remote = 'origin', tags = false } = options;\n this.config.logger?.info(\n `Fetching remote=${remote} for repository {dir=${dir}}`,\n );\n\n try {\n await git.fetch({\n fs,\n http,\n dir,\n remote,\n tags,\n onProgress: this.onProgressHandler(),\n headers: this.headers,\n onAuth: this.onAuth,\n });\n } catch (ex) {\n this.config.logger?.error(\n `Failed to fetch repo {dir=${dir},remote=${remote}}`,\n );\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n async init(options: { dir: string; defaultBranch?: string }): Promise<void> {\n const { dir, defaultBranch = 'master' } = options;\n this.config.logger?.info(`Init git repository {dir=${dir}}`);\n\n return git.init({\n fs,\n dir,\n defaultBranch,\n });\n }\n\n /** https://isomorphic-git.org/docs/en/merge */\n async merge(options: {\n dir: string;\n theirs: string;\n ours?: string;\n author: { name: string; email: string };\n committer: { name: string; email: string };\n signingKey?: string;\n }): Promise<MergeResult> {\n const { dir, theirs, ours, author, committer, signingKey } = options;\n this.config.logger?.info(\n `Merging branch '${theirs}' into '${ours}' for repository {dir=${dir}}`,\n );\n\n // If ours is undefined, current branch is used.\n return git.merge({\n fs,\n dir,\n ours,\n theirs,\n author,\n committer,\n signingKey,\n onSign: signingKey ? pgp.sign : undefined,\n });\n }\n\n async push(options: {\n dir: string;\n remote: string;\n remoteRef?: string;\n url?: string;\n force?: boolean;\n }) {\n const { dir, remote, url, remoteRef, force } = options;\n this.config.logger?.info(\n `Pushing directory to remote {dir=${dir},remote=${remote}}`,\n );\n try {\n return await git.push({\n fs,\n dir,\n http,\n onProgress: this.onProgressHandler(),\n remoteRef,\n force,\n headers: this.headers,\n remote,\n url,\n onAuth: this.onAuth,\n corsProxy: '',\n });\n } catch (ex) {\n this.config.logger?.error(\n `Failed to push to repo {dir=${dir}, remote=${remote}}`,\n );\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n /** https://isomorphic-git.org/docs/en/readCommit */\n async readCommit(options: {\n dir: string;\n sha: string;\n }): Promise<ReadCommitResult> {\n const { dir, sha } = options;\n return git.readCommit({ fs, dir, oid: sha });\n }\n\n /** https://isomorphic-git.org/docs/en/remove */\n async remove(options: { dir: string; filepath: string }): Promise<void> {\n const { dir, filepath } = options;\n this.config.logger?.info(\n `Removing file from git index {dir=${dir},filepath=${filepath}}`,\n );\n return git.remove({ fs, dir, filepath });\n }\n\n /** https://isomorphic-git.org/docs/en/resolveRef */\n async resolveRef(options: { dir: string; ref: string }): Promise<string> {\n const { dir, ref } = options;\n return git.resolveRef({ fs, dir, ref });\n }\n\n /** https://isomorphic-git.org/docs/en/log */\n async log(options: {\n dir: string;\n ref?: string;\n }): Promise<ReadCommitResult[]> {\n const { dir, ref } = options;\n return git.log({\n fs,\n dir,\n ref: ref ?? 'HEAD',\n });\n }\n\n private onAuth: AuthCallback;\n\n private onProgressHandler = (): ProgressCallback => {\n let currentPhase = '';\n\n return event => {\n if (currentPhase !== event.phase) {\n currentPhase = event.phase;\n this.config.logger?.info(event.phase);\n }\n const total = event.total\n ? `${Math.round((event.loaded / event.total) * 100)}%`\n : event.loaded;\n this.config.logger?.debug(`status={${event.phase},total={${total}}}`);\n };\n };\n\n static fromAuth = (options: StaticAuthOptions | AuthCallbackOptions) => {\n if (isAuthCallbackOptions(options)) {\n const { onAuth, logger } = options;\n return new Git({ onAuth, logger });\n }\n\n const { username, password, token, logger } = options;\n return new Git({ onAuth: () => ({ username, password }), token, logger });\n };\n}\n"],"names":["git","fs","pgp","http","logger"],"mappings":";;;;;;;;;;;;;AA4BA,SAAS,sBACP,OAAA,EACgC;AAChC,EAAA,OAAO,QAAA,IAAY,OAAA;AACrB;AA4CO,MAAM,GAAA,CAAI;AAAA,EAKP,YACW,MAAA,EAKjB;AALiB,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAMjB,IAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAErB,IAAA,IAAA,CAAK,OAAA,GAAU;AAAA,MACb,YAAA,EAAc,qBAAA;AAAA,MACd,GAAI,MAAA,CAAO,KAAA,GAAQ,EAAE,aAAA,EAAe,UAAU,MAAA,CAAO,KAAK,CAAA,CAAA,EAAG,GAAI;AAAC,KACpE;AAAA,EACF;AAAA,EAjBiB,OAAA;AAAA,EAmBjB,MAAM,IAAI,OAAA,EAA2D;AACnE,IAAA,MAAM,EAAE,GAAA,EAAK,QAAA,EAAS,GAAI,OAAA;AAC1B,IAAA,IAAA,CAAK,OAAO,MAAA,EAAQ,IAAA,CAAK,oBAAoB,GAAG,CAAA,UAAA,EAAa,QAAQ,CAAA,CAAA,CAAG,CAAA;AAExE,IAAA,OAAOA,qBAAI,GAAA,CAAI,MAAEC,mBAAA,EAAI,GAAA,EAAK,UAAU,CAAA;AAAA,EACtC;AAAA,EAEA,MAAM,UAAU,OAAA,EAKE;AAChB,IAAA,MAAM,EAAE,GAAA,EAAK,GAAA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AAA;AAAA,IACtE,CAAA;AAAA,EACF,CAAA;AAAA,EAEA,OAAO,QAAA,GAAW,CAAC,OAAA,KAAqD;AACtE,IAAA,IAAI,qBAAA,CAAsB,OAAO,CAAA,EAAG;AAClC,MAAA,MAAM,EAAE,MAAA,EAAQ,MAAA,EAAAG,OAAAA,EAAO,GAAI,OAAA;AAC3B,MAAA,OAAO,IAAI,GAAA,CAAI,EAAE,MAAA,EAAQ,MAAA,EAAAA,SAAQ,CAAA;AAAA,IACnC;AAEA,IAAA,MAAM,EAAE,QAAA,EAAU,QAAA,EAAU,KAAA,EAAO,QAAO,GAAI,OAAA;AAC9C,IAAA,OAAO,IAAI,GAAA,CAAI,EAAE,MAAA,EAAQ,OAAO,EAAE,QAAA,EAAU,QAAA,EAAS,CAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,CAAA;AAAA,EAC1E,CAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"git.cjs.js","sources":["../../src/scm/git.ts"],"sourcesContent":["/*\n * Copyright 2020 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 git, {\n AuthCallback,\n MergeResult,\n ProgressCallback,\n ReadCommitResult,\n} from 'isomorphic-git';\nimport http from 'isomorphic-git/http/node';\nimport fs from 'fs-extra';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n// @ts-ignore\nimport { pgp } from '@isomorphic-git/pgp-plugin';\n\nfunction isAuthCallbackOptions(\n options: StaticAuthOptions | AuthCallbackOptions,\n): options is AuthCallbackOptions {\n return 'onAuth' in options;\n}\n\n/**\n * Configure static credential for authentication\n *\n * @public\n */\nexport type StaticAuthOptions = {\n username?: string;\n password?: string;\n token?: string;\n logger?: LoggerService;\n};\n\n/**\n * Configure an authentication callback that can provide credentials on demand\n *\n * @public\n */\nexport type AuthCallbackOptions = {\n onAuth: AuthCallback;\n logger?: LoggerService;\n};\n\n/*\nprovider username password\nAzure 'notempty' token\nBitbucket Cloud 'x-token-auth' token\nBitbucket Server username password or token\nGitHub 'x-access-token' token\nGitLab 'oauth2' token\n\nFrom : https://isomorphic-git.org/docs/en/onAuth with fix for GitHub\n\nOr token provided as `token` for Bearer auth header\ninstead of Basic Auth (e.g., Bitbucket Server).\n*/\n\n/**\n * A convenience wrapper around the `isomorphic-git` library.\n *\n * @public\n */\n\nexport class Git {\n private readonly headers: {\n [x: string]: string;\n };\n\n private readonly config: {\n onAuth: AuthCallback;\n token?: string;\n logger?: LoggerService;\n };\n\n private constructor(config: {\n onAuth: AuthCallback;\n token?: string;\n logger?: LoggerService;\n }) {\n this.config = config;\n this.onAuth = config.onAuth;\n\n this.headers = {\n 'user-agent': 'git/@isomorphic-git',\n ...(config.token ? { Authorization: `Bearer ${config.token}` } : {}),\n };\n }\n\n async add(options: { dir: string; filepath: string }): Promise<void> {\n const { dir, filepath } = options;\n this.config.logger?.info(`Adding file {dir=${dir},filepath=${filepath}}`);\n\n return git.add({ fs, dir, filepath });\n }\n\n async addRemote(options: {\n dir: string;\n remote: string;\n url: string;\n force?: boolean;\n }): Promise<void> {\n const { dir, url, remote, force } = options;\n this.config.logger?.info(\n `Creating new remote {dir=${dir},remote=${remote},url=${url}}`,\n );\n return git.addRemote({ fs, dir, remote, url, force });\n }\n\n async deleteRemote(options: { dir: string; remote: string }): Promise<void> {\n const { dir, remote } = options;\n this.config.logger?.info(`Deleting remote {dir=${dir},remote=${remote}}`);\n return git.deleteRemote({ fs, dir, remote });\n }\n\n async checkout(options: { dir: string; ref: string }): Promise<void> {\n const { dir, ref } = options;\n this.config.logger?.info(`Checking out branch {dir=${dir},ref=${ref}}`);\n\n return git.checkout({ fs, dir, ref });\n }\n\n async branch(options: { dir: string; ref: string }): Promise<void> {\n const { dir, ref } = options;\n this.config.logger?.info(`Creating branch {dir=${dir},ref=${ref}`);\n\n return git.branch({ fs, dir, ref });\n }\n\n async commit(options: {\n dir: string;\n message: string;\n author: { name: string; email: string };\n committer: { name: string; email: string };\n signingKey?: string;\n }): Promise<string> {\n const { dir, message, author, committer, signingKey } = options;\n this.config.logger?.info(\n `Committing file to repo {dir=${dir},message=${message}}`,\n );\n return git.commit({\n fs,\n dir,\n message,\n author,\n committer,\n signingKey,\n onSign: signingKey ? pgp.sign : undefined,\n });\n }\n\n /** https://isomorphic-git.org/docs/en/clone */\n async clone(options: {\n url: string;\n dir: string;\n ref?: string;\n depth?: number;\n noCheckout?: boolean;\n }): Promise<void> {\n const { url, dir, ref, depth, noCheckout } = options;\n this.config.logger?.info(`Cloning repo {dir=${dir},url=${url}}`);\n\n try {\n return await git.clone({\n fs,\n http,\n url,\n dir,\n ref,\n singleBranch: true,\n depth: depth ?? 1,\n noCheckout,\n onProgress: this.onProgressHandler(),\n headers: this.headers,\n onAuth: this.onAuth,\n });\n } catch (ex) {\n this.config.logger?.error(`Failed to clone repo {dir=${dir},url=${url}}`);\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n /** https://isomorphic-git.org/docs/en/currentBranch */\n async currentBranch(options: {\n dir: string;\n fullName?: boolean;\n }): Promise<string | undefined> {\n const { dir, fullName = false } = options;\n return git.currentBranch({ fs, dir, fullname: fullName }) as Promise<\n string | undefined\n >;\n }\n\n /** https://isomorphic-git.org/docs/en/fetch */\n async fetch(options: {\n dir: string;\n remote?: string;\n tags?: boolean;\n }): Promise<void> {\n const { dir, remote = 'origin', tags = false } = options;\n this.config.logger?.info(\n `Fetching remote=${remote} for repository {dir=${dir}}`,\n );\n\n try {\n await git.fetch({\n fs,\n http,\n dir,\n remote,\n tags,\n onProgress: this.onProgressHandler(),\n headers: this.headers,\n onAuth: this.onAuth,\n });\n } catch (ex) {\n this.config.logger?.error(\n `Failed to fetch repo {dir=${dir},remote=${remote}}`,\n );\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n async init(options: { dir: string; defaultBranch?: string }): Promise<void> {\n const { dir, defaultBranch = 'master' } = options;\n this.config.logger?.info(`Init git repository {dir=${dir}}`);\n\n return git.init({\n fs,\n dir,\n defaultBranch,\n });\n }\n\n /** https://isomorphic-git.org/docs/en/merge */\n async merge(options: {\n dir: string;\n theirs: string;\n ours?: string;\n author: { name: string; email: string };\n committer: { name: string; email: string };\n signingKey?: string;\n }): Promise<MergeResult> {\n const { dir, theirs, ours, author, committer, signingKey } = options;\n this.config.logger?.info(\n `Merging branch '${theirs}' into '${ours}' for repository {dir=${dir}}`,\n );\n\n // If ours is undefined, current branch is used.\n return git.merge({\n fs,\n dir,\n ours,\n theirs,\n author,\n committer,\n signingKey,\n onSign: signingKey ? pgp.sign : undefined,\n });\n }\n\n async push(options: {\n dir: string;\n remote: string;\n remoteRef?: string;\n url?: string;\n force?: boolean;\n }) {\n const { dir, remote, url, remoteRef, force } = options;\n this.config.logger?.info(\n `Pushing directory to remote {dir=${dir},remote=${remote}}`,\n );\n try {\n return await git.push({\n fs,\n dir,\n http,\n onProgress: this.onProgressHandler(),\n remoteRef,\n force,\n headers: this.headers,\n remote,\n url,\n onAuth: this.onAuth,\n corsProxy: '',\n });\n } catch (ex) {\n this.config.logger?.error(\n `Failed to push to repo {dir=${dir}, remote=${remote}}`,\n );\n if (ex.data) {\n throw new Error(`${ex.message} {data=${JSON.stringify(ex.data)}}`);\n }\n throw ex;\n }\n }\n\n /** https://isomorphic-git.org/docs/en/readCommit */\n async readCommit(options: {\n dir: string;\n sha: string;\n }): Promise<ReadCommitResult> {\n const { dir, sha } = options;\n return git.readCommit({ fs, dir, oid: sha });\n }\n\n /** https://isomorphic-git.org/docs/en/remove */\n async remove(options: { dir: string; filepath: string }): Promise<void> {\n const { dir, filepath } = options;\n this.config.logger?.info(\n `Removing file from git index {dir=${dir},filepath=${filepath}}`,\n );\n return git.remove({ fs, dir, filepath });\n }\n\n /** https://isomorphic-git.org/docs/en/resolveRef */\n async resolveRef(options: { dir: string; ref: string }): Promise<string> {\n const { dir, ref } = options;\n return git.resolveRef({ fs, dir, ref });\n }\n\n /** https://isomorphic-git.org/docs/en/log */\n async log(options: {\n dir: string;\n ref?: string;\n }): Promise<ReadCommitResult[]> {\n const { dir, ref } = options;\n return git.log({\n fs,\n dir,\n ref: ref ?? 'HEAD',\n });\n }\n\n private onAuth: AuthCallback;\n\n private onProgressHandler = (): ProgressCallback => {\n let currentPhase = '';\n\n return event => {\n if (currentPhase !== event.phase) {\n currentPhase = event.phase;\n this.config.logger?.info(event.phase);\n }\n const total = event.total\n ? `${Math.round((event.loaded / event.total) * 100)}%`\n : event.loaded;\n this.config.logger?.debug(`status={${event.phase},total={${total}}}`);\n };\n };\n\n static fromAuth = (options: StaticAuthOptions | AuthCallbackOptions) => {\n if (isAuthCallbackOptions(options)) {\n const { onAuth, logger } = options;\n return new Git({ onAuth, logger });\n }\n\n const { username, password, token, logger } = options;\n return new Git({ onAuth: () => ({ username, password }), token, logger });\n };\n}\n"],"names":["git","fs","pgp","http","logger"],"mappings":";;;;;;;;;;;;;AA4BA,SAAS,sBACP,OAAA,EACgC;AAChC,EAAA,OAAO,QAAA,IAAY,OAAA;AACrB;AA4CO,MAAM,GAAA,CAAI;AAAA,EACE,OAAA;AAAA,EAIA,MAAA;AAAA,EAMT,YAAY,MAAA,EAIjB;AACD,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAErB,IAAA,IAAA,CAAK,OAAA,GAAU;AAAA,MACb,YAAA,EAAc,qBAAA;AAAA,MACd,GAAI,MAAA,CAAO,KAAA,GAAQ,EAAE,aAAA,EAAe,UAAU,MAAA,CAAO,KAAK,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,QAAA,YAAA,GAAe,KAAA,CAAM,KAAA;AACrB,QAAA,IAAA,CAAK,MAAA,CAAO,MAAA,EAAQ,IAAA,CAAK,KAAA,CAAM,KAAK,CAAA;AAAA,MACtC;AACA,MAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,KAAA,GAChB,CAAA,EAAG,IAAA,CAAK,KAAA,CAAO,KAAA,CAAM,MAAA,GAAS,KAAA,CAAM,KAAA,GAAS,GAAG,CAAC,MACjD,KAAA,CAAM,MAAA;AACV,MAAA,IAAA,CAAK,MAAA,CAAO,QAAQ,KAAA,CAAM,CAAA,QAAA,EAAW,MAAM,KAAK,CAAA,QAAA,EAAW,KAAK,CAAA,EAAA,CAAI,CAAA;AAAA,IACtE,CAAA;AAAA,EACF,CAAA;AAAA,EAEA,OAAO,QAAA,GAAW,CAAC,OAAA,KAAqD;AACtE,IAAA,IAAI,qBAAA,CAAsB,OAAO,CAAA,EAAG;AAClC,MAAA,MAAM,EAAE,MAAA,EAAQ,MAAA,EAAAG,OAAAA,EAAO,GAAI,OAAA;AAC3B,MAAA,OAAO,IAAI,GAAA,CAAI,EAAE,MAAA,EAAQ,MAAA,EAAAA,SAAQ,CAAA;AAAA,IACnC;AAEA,IAAA,MAAM,EAAE,QAAA,EAAU,QAAA,EAAU,KAAA,EAAO,QAAO,GAAI,OAAA;AAC9C,IAAA,OAAO,IAAI,GAAA,CAAI,EAAE,MAAA,EAAQ,OAAO,EAAE,QAAA,EAAU,QAAA,EAAS,CAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,CAAA;AAAA,EAC1E,CAAA;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-node",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1-next.0",
|
|
4
4
|
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"test": "backstage-cli package test"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@backstage/backend-plugin-api": "1.4.
|
|
66
|
-
"@backstage/catalog-model": "1.7.
|
|
65
|
+
"@backstage/backend-plugin-api": "1.4.5-next.0",
|
|
66
|
+
"@backstage/catalog-model": "1.7.6-next.0",
|
|
67
67
|
"@backstage/errors": "1.2.7",
|
|
68
|
-
"@backstage/integration": "1.18.
|
|
69
|
-
"@backstage/plugin-permission-common": "0.9.
|
|
70
|
-
"@backstage/plugin-scaffolder-common": "1.7.
|
|
68
|
+
"@backstage/integration": "1.18.2-next.0",
|
|
69
|
+
"@backstage/plugin-permission-common": "0.9.3-next.0",
|
|
70
|
+
"@backstage/plugin-scaffolder-common": "1.7.3-next.0",
|
|
71
71
|
"@backstage/types": "1.2.2",
|
|
72
72
|
"@isomorphic-git/pgp-plugin": "^0.0.7",
|
|
73
73
|
"concat-stream": "^2.0.0",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"zod-to-json-schema": "^3.20.4"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@backstage/backend-test-utils": "1.
|
|
88
|
-
"@backstage/cli": "0.34.
|
|
89
|
-
"@backstage/config": "1.3.
|
|
87
|
+
"@backstage/backend-test-utils": "1.10.0-next.0",
|
|
88
|
+
"@backstage/cli": "0.34.5-next.0",
|
|
89
|
+
"@backstage/config": "1.3.6-next.0",
|
|
90
90
|
"@types/lodash": "^4.14.151"
|
|
91
91
|
}
|
|
92
92
|
}
|