@bakers-build/addon-ports 0.9.1-next.5 → 0.9.1-next.6
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/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +5 -1
- package/package.json +5 -5
package/dist/src/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export declare function revalidatesForKill(fresh: {
|
|
|
68
68
|
* reaped on a failed host `ss`; container services must not be reaped on a
|
|
69
69
|
* failed Docker probe). */
|
|
70
70
|
export declare function shouldKeepTunnelRecord(discovery: ClaimedDiscovery, key: string): boolean;
|
|
71
|
+
/** The worktree's branch; a run clone has no Git on the host, so its record answers. */
|
|
71
72
|
export declare function currentBranch(worktree: string): string | null;
|
|
72
73
|
/** Is a recorded route still backed by a claim, and with which rule? Used
|
|
73
74
|
* by `reap` and by every `up`. A changed rule (restarted container, new
|
package/dist/src/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { execFileSync } from 'node:child_process';
|
|
17
17
|
import { readdirSync, readFileSync } from 'node:fs';
|
|
18
18
|
import { isAbsolute, join, relative, resolve } from 'node:path';
|
|
19
|
-
import { homeBbDir } from '@bakers-build/core';
|
|
19
|
+
import { homeBbDir, loadRunClone } from '@bakers-build/core';
|
|
20
20
|
import { discoverClaimedServices, loadClaimers, loadPortsTransport, portsSettings, readPortsSettings, } from './core.js';
|
|
21
21
|
import { isOwnedByCurrentUser, listCloudflaredProcesses, nodeDeps, nodeHttpProbe, processStartTime, readLegacyTunnelPids, } from './deps-node.js';
|
|
22
22
|
import { serviceRules } from './service-config.js';
|
|
@@ -175,7 +175,11 @@ export function shouldKeepTunnelRecord(discovery, key) {
|
|
|
175
175
|
return true;
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
+
/** The worktree's branch; a run clone has no Git on the host, so its record answers. */
|
|
178
179
|
export function currentBranch(worktree) {
|
|
180
|
+
const clone = loadRunClone(worktree);
|
|
181
|
+
if (clone)
|
|
182
|
+
return clone.branch;
|
|
179
183
|
try {
|
|
180
184
|
return execFileSync('git', ['rev-parse', '--abbrev-ref', 'HEAD'], {
|
|
181
185
|
cwd: worktree,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-ports",
|
|
3
|
-
"version": "0.9.1-next.
|
|
3
|
+
"version": "0.9.1-next.6",
|
|
4
4
|
"description": "bakers.build ports command plugin: discover a ticket worktree's running services (claimer packages' containers, Storybook, ad-hoc listeners) and bring shareable tunnels up and down. The command half of BB-475; usable without the cockpit half.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"directory": "bakers-cli/addons/ports"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@bakers-build/addon-docker-compose": "^0.9.1-next.
|
|
28
|
+
"@bakers-build/addon-docker-compose": "^0.9.1-next.6",
|
|
29
29
|
"commander": "^12.1.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@bakers-build/conductor": "^0.9.1-next.
|
|
33
|
-
"@bakers-build/core": "^0.9.1-next.
|
|
32
|
+
"@bakers-build/conductor": "^0.9.1-next.6",
|
|
33
|
+
"@bakers-build/core": "^0.9.1-next.6"
|
|
34
34
|
},
|
|
35
35
|
"bakersBuild": {
|
|
36
|
-
"commit": "
|
|
36
|
+
"commit": "e7d9921d51d5c045f29ca7e35d1e6a348e6ddf08",
|
|
37
37
|
"channel": "next"
|
|
38
38
|
}
|
|
39
39
|
}
|