@ebay-dt/bonfire-node 0.1.0 → 0.2.0-alpha.3
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/README.md +10 -4
- package/dist/agent-service.d.ts +4 -1
- package/dist/agent-service.d.ts.map +1 -1
- package/dist/agent-service.js +18 -2
- package/dist/agent-service.js.map +1 -1
- package/dist/claude.d.ts +12 -11
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +166 -11
- package/dist/claude.js.map +1 -1
- package/dist/git-repository.d.ts +1 -1
- package/dist/git-repository.d.ts.map +1 -1
- package/dist/git-repository.js +5 -2
- package/dist/git-repository.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lifecycle/local-prototype-lifecycle.d.ts +9 -1
- package/dist/lifecycle/local-prototype-lifecycle.d.ts.map +1 -1
- package/dist/lifecycle/local-prototype-lifecycle.js +104 -25
- package/dist/lifecycle/local-prototype-lifecycle.js.map +1 -1
- package/dist/lifecycle/repository-summary.d.ts +17 -0
- package/dist/lifecycle/repository-summary.d.ts.map +1 -0
- package/dist/lifecycle/repository-summary.js +182 -0
- package/dist/lifecycle/repository-summary.js.map +1 -0
- package/dist/lifecycle/repository-synchronization.d.ts +35 -0
- package/dist/lifecycle/repository-synchronization.d.ts.map +1 -0
- package/dist/lifecycle/repository-synchronization.js +270 -0
- package/dist/lifecycle/repository-synchronization.js.map +1 -0
- package/dist/lifecycle/runtime-context.d.ts +3 -1
- package/dist/lifecycle/runtime-context.d.ts.map +1 -1
- package/dist/lifecycle/runtime-context.js +3 -0
- package/dist/lifecycle/runtime-context.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { realpathSync } from "node:fs";
|
|
2
|
+
import { parseGitModeSetting, } from "@ebay-dt/bonfire-core";
|
|
2
3
|
import { resolvePrototypeCatalogPaths, } from "../prototype-paths.js";
|
|
3
4
|
import { createGitRepository, } from "../git-repository.js";
|
|
4
5
|
const DEFAULT_REMOTE = "origin";
|
|
@@ -20,6 +21,7 @@ export function createPrototypeLifecycleRuntime(options) {
|
|
|
20
21
|
const primaryBranch = requireNonEmptyOption(options.primaryBranch, "primaryBranch") ??
|
|
21
22
|
DEFAULT_PRIMARY_BRANCH;
|
|
22
23
|
const automaticBranchSwitch = options.automaticBranchSwitch ?? "enabled";
|
|
24
|
+
const gitMode = parseGitModeSetting(options.gitMode);
|
|
23
25
|
const commitIdentity = Object.freeze({
|
|
24
26
|
...DEFAULT_COMMIT_IDENTITY,
|
|
25
27
|
...options.commitIdentity,
|
|
@@ -30,6 +32,7 @@ export function createPrototypeLifecycleRuntime(options) {
|
|
|
30
32
|
remote,
|
|
31
33
|
primaryBranch,
|
|
32
34
|
automaticBranchSwitch,
|
|
35
|
+
gitMode,
|
|
33
36
|
commitIdentity,
|
|
34
37
|
gitRepository: options.gitRepository ??
|
|
35
38
|
createGitRepository({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../../src/lifecycle/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../../src/lifecycle/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EACL,mBAAmB,GAGpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,GAG7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,GAGpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AACtC,MAAM,uBAAuB,GAAsB;IACjD,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAqBF,SAAS,qBAAqB,CAAC,KAAyB,EAAE,MAAc;IACtE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,SAAS,CAAC,GAAG,MAAM,4BAA4B,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,OAAyC;IAEzC,MAAM,KAAK,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9D,MAAM,MAAM,GACV,qBAAqB,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,cAAc,CAAC;IACpE,MAAM,aAAa,GACjB,qBAAqB,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,CAAC;QAC7D,sBAAsB,CAAC;IACzB,MAAM,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,IAAI,SAAS,CAAC;IACzE,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;QACnC,GAAG,uBAAuB;QAC1B,GAAG,OAAO,CAAC,cAAc;KAC1B,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,KAAK;QACR,kBAAkB;QAClB,MAAM;QACN,aAAa;QACb,qBAAqB;QACrB,OAAO;QACP,cAAc;QACd,aAAa,EACX,OAAO,CAAC,aAAa;YACrB,mBAAmB,CAAC;gBAClB,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,cAAc;aACf,CAAC;KACL,CAAC;AACJ,CAAC","sourcesContent":["import { realpathSync } from \"node:fs\";\nimport {\n parseGitModeSetting,\n type AutomaticBranchSwitchMode,\n type GitMode,\n} from \"@ebay-dt/bonfire-core\";\nimport {\n resolvePrototypeCatalogPaths,\n type PrototypeCatalogOptions,\n type ResolvedPrototypeCatalogPaths,\n} from \"../prototype-paths.js\";\nimport {\n createGitRepository,\n type GitCommitIdentity,\n type GitRepository,\n} from \"../git-repository.js\";\n\nconst DEFAULT_REMOTE = \"origin\";\nconst DEFAULT_PRIMARY_BRANCH = \"main\";\nconst DEFAULT_COMMIT_IDENTITY: GitCommitIdentity = {\n name: \"Bonfire\",\n email: \"bonfire@localhost\",\n};\n\nexport type PrototypeLifecycleRuntimeOptions = PrototypeCatalogOptions & {\n remote?: string;\n primaryBranch?: string;\n commitIdentity?: GitCommitIdentity;\n automaticBranchSwitch?: AutomaticBranchSwitchMode;\n gitMode?: GitMode;\n gitRepository?: GitRepository;\n};\n\nexport type PrototypeLifecycleRuntimeContext = ResolvedPrototypeCatalogPaths & {\n repositoryRealPath: string;\n remote: string;\n primaryBranch: string;\n automaticBranchSwitch: AutomaticBranchSwitchMode;\n gitMode: GitMode;\n commitIdentity: Readonly<GitCommitIdentity>;\n gitRepository: GitRepository;\n};\n\nfunction requireNonEmptyOption(value: string | undefined, option: string) {\n if (value !== undefined && value.length === 0) {\n throw new TypeError(`${option} must be a nonempty string`);\n }\n return value;\n}\n\nexport function createPrototypeLifecycleRuntime(\n options: PrototypeLifecycleRuntimeOptions,\n): PrototypeLifecycleRuntimeContext {\n const paths = resolvePrototypeCatalogPaths(options);\n const repositoryRealPath = realpathSync(paths.repositoryRoot);\n const remote =\n requireNonEmptyOption(options.remote, \"remote\") ?? DEFAULT_REMOTE;\n const primaryBranch =\n requireNonEmptyOption(options.primaryBranch, \"primaryBranch\") ??\n DEFAULT_PRIMARY_BRANCH;\n const automaticBranchSwitch = options.automaticBranchSwitch ?? \"enabled\";\n const gitMode = parseGitModeSetting(options.gitMode);\n const commitIdentity = Object.freeze({\n ...DEFAULT_COMMIT_IDENTITY,\n ...options.commitIdentity,\n });\n\n return {\n ...paths,\n repositoryRealPath,\n remote,\n primaryBranch,\n automaticBranchSwitch,\n gitMode,\n commitIdentity,\n gitRepository:\n options.gitRepository ??\n createGitRepository({\n repositoryRoot: paths.repositoryRoot,\n commitIdentity,\n }),\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebay-dt/bonfire-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "Node.js adapters for Bonfire.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ebay-dt/bonfire-core": "0.
|
|
34
|
+
"@ebay-dt/bonfire-core": "0.2.0-alpha.3",
|
|
35
35
|
"chokidar": "^5.0.0",
|
|
36
36
|
"simple-git": "^3.36.0"
|
|
37
37
|
},
|