@open-mercato/cezar 0.9.1-pr694.821 → 0.9.1-pr694.883
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 +6 -6
- package/dist/automations/github-poller.d.ts +9 -2
- package/dist/automations/github-poller.js +113 -38
- package/dist/automations/github-poller.js.map +1 -1
- package/dist/automations/scheduler.js +19 -4
- package/dist/automations/scheduler.js.map +1 -1
- package/dist/release/manifests.d.ts +72 -0
- package/dist/release/manifests.js +73 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/server/app-type.d.ts +20 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/forge/index.d.ts +8 -1
- package/dist/server/forge/index.js +14 -1
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/server.d.ts +577 -1
- package/dist/server/server.js +155 -46
- package/dist/server/server.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +15 -0
- package/dist/server-install/platforms/ubuntu-vps.js +83 -1
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/workflows/run.d.ts +2 -3
- package/dist/workflows/run.js +6 -2
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/projects.d.ts +7 -1
- package/dist/workspace/projects.js +9 -3
- package/dist/workspace/projects.js.map +1 -1
- package/package.json +13 -38
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-gwiqFFFu.js +1 -0
- package/web/dist/assets/{centered-state-DsblJe6Q.js → centered-state-dD8yqQys.js} +11 -11
- package/web/dist/assets/collapsible-CqTit0ZR.js +1 -0
- package/web/dist/assets/{commit-list-CAwllMBX.js → commit-list-Cj-cA4sD.js} +1 -1
- package/web/dist/assets/compare-variants-FhrzO3P-.js +1 -0
- package/web/dist/assets/diff-D8vQWbBJ2.js +3 -0
- package/web/dist/assets/{diff-view-Ct3kYFRM.js → diff-view-Bj-Arp6J.js} +4 -4
- package/web/dist/assets/dropdown-menu-C-y3sjkF.js +1 -0
- package/web/dist/assets/git-toolbar-CJSJ-HhK.js +1 -0
- package/web/dist/assets/github-B1F5OIiS.js +1 -0
- package/web/dist/assets/index-CSqLL-Oz.css +2 -0
- package/web/dist/assets/index-fiTYCCIj.js +22 -0
- package/web/dist/assets/new-task-form-umhQeDuQ.js +1 -0
- package/web/dist/assets/{project-router-CnKsyZKI.js → project-router-DSGsTy9r.js} +1 -1
- package/web/dist/assets/{repo-git-DnkvanyM.js → repo-git-BIhVoC3s.js} +1 -1
- package/web/dist/assets/run-diff-CerjSGSP.js +3 -0
- package/web/dist/assets/run-header-CiS45_c4.js +1 -0
- package/web/dist/assets/skills-Cox0kFDd.js +1 -0
- package/web/dist/assets/{tab-link-BbQLZUG5.js → tab-link-BQmBICqB.js} +1 -1
- package/web/dist/assets/{task-changes-BYNpnV0E.js → task-changes-_uZcv-N4.js} +1 -1
- package/web/dist/assets/task-commits-BQWM57ju.js +1 -0
- package/web/dist/assets/task-files-CdPBE1dU.js +2 -0
- package/web/dist/assets/task-thread-DKOE2f2x.js +9 -0
- package/web/dist/assets/{use-desktop-BAHxMKrE.js → use-desktop-DDKq0fp9.js} +1 -1
- package/web/dist/assets/workflows-CG_B8DEH.js +11 -0
- package/web/dist/index.html +10 -6
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/compare-variants-JnaeMTz5.js +0 -1
- package/web/dist/assets/diff-Drvekr61.js +0 -3
- package/web/dist/assets/dist-CngV8tyE.js +0 -1
- package/web/dist/assets/git-toolbar-BLqu97v8.js +0 -1
- package/web/dist/assets/github-hrWK-ST8.js +0 -1
- package/web/dist/assets/index-B96YnNHc.js +0 -22
- package/web/dist/assets/index-DdBHg6_F.css +0 -2
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/run-diff-LyXkHJCR.js +0 -3
- package/web/dist/assets/run-header-BtH23tbQ.js +0 -1
- package/web/dist/assets/skills-CE0HAI_G.js +0 -1
- package/web/dist/assets/task-commits-DRnMTXtG.js +0 -1
- package/web/dist/assets/task-files-DAqPuHp1.js +0 -2
- package/web/dist/assets/task-thread-DMM5s2zt.js +0 -9
- package/web/dist/assets/workflows-DCkK4Bsn.js +0 -11
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/dist/release/snapshot.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* at call time, never from constants — so the `@pat-lewczuk/cezar` →
|
|
12
12
|
* `@open-mercato/cezar` rename (PR #501) lands independently of this pipeline.
|
|
13
13
|
*/
|
|
14
|
+
import { stampManifestSet } from './manifests.js';
|
|
14
15
|
export function computeSnapshot(ctx) {
|
|
15
16
|
const channel = resolveChannel(ctx);
|
|
16
17
|
if (!channel)
|
|
@@ -48,29 +49,15 @@ function resolveChannel(ctx) {
|
|
|
48
49
|
}
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
51
|
-
/** Stamp
|
|
52
|
+
/** Stamp the release set to the snapshot version.
|
|
52
53
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* we publish with `--provenance`, and npm rejects (E422) any manifest whose
|
|
61
|
-
* `repository.url` doesn't match the building repo. The alias file carries no
|
|
62
|
-
* such fields of its own, so it must borrow the root's — which already matches
|
|
63
|
-
* and, being a git URL, is unaffected by any npm-name rename. */
|
|
64
|
-
export function stampManifests(rootPkg, aliasPkg, version) {
|
|
65
|
-
const inherited = {};
|
|
66
|
-
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
67
|
-
if (rootPkg[field] !== undefined)
|
|
68
|
-
inherited[field] = rootPkg[field];
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
root: { ...rootPkg, version },
|
|
72
|
-
alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: version } },
|
|
73
|
-
};
|
|
54
|
+
* Every intra-release dependency is pinned **exact** (`0.1.5-pr482.123`, no range) so
|
|
55
|
+
* `npx <alias>@<version>` runs exactly the PR's code and the service resolves exactly the
|
|
56
|
+
* api-client it was cut with — a `^` range would resolve to whatever newer version exists
|
|
57
|
+
* (spec, resolved Q5). Stable releases keep their `^` range and never go through this
|
|
58
|
+
* stamper. */
|
|
59
|
+
export function stampManifests(manifests, version) {
|
|
60
|
+
return stampManifestSet(manifests, version, (v) => v);
|
|
74
61
|
}
|
|
75
62
|
/** The copy-pasteable commands for the sticky PR comment and the step summary.
|
|
76
63
|
* Rendered from the *actual* alias package name so a future rename of the npx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/release/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/release/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAgC/F,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,SAAS,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5F,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,GAA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B,SAA6B,EAC7B,OAAe;IAEf,OAAO,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;sEAEsE;AACtE,MAAM,UAAU,iBAAiB,CAAC,SAAiB,EAAE,OAAe;IAClE,MAAM,GAAG,GAAG,OAAO,SAAS,IAAI,OAAO,EAAE,CAAC;IAC1C,OAAO;QACL,GAAG,GAAG,oEAAoE;QAC1E,GAAG,GAAG,gDAAgD;QACtD,GAAG,GAAG,qEAAqE;KAC5E,CAAC;AACJ,CAAC"}
|
package/dist/release/stable.d.ts
CHANGED
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
* thing that ever moves the `latest` dist-tag (spec
|
|
7
7
|
* `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
|
|
8
8
|
*
|
|
9
|
-
* Two decisions live here so they stay unit-testable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
|
|
14
|
-
* up compatible patch releases of the implementation package.
|
|
9
|
+
* Two decisions live here so they stay unit-testable and side-effect-free: the next stable
|
|
10
|
+
* version for a given bump, and the pin style the release set is stamped with. Crucially,
|
|
11
|
+
* stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
|
|
12
|
+
* so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
|
|
15
13
|
*/
|
|
14
|
+
import { type ReleaseManifests as ReleaseManifestSet } from './manifests.js';
|
|
16
15
|
/** The version-bump modes the Release workflow offers. `existing` publishes the
|
|
17
|
-
* version already committed to the
|
|
16
|
+
* version already committed to the service manifest (for hand-prepared releases);
|
|
18
17
|
* the rest increment semver from the current base. */
|
|
19
18
|
export type ReleaseBump = 'patch' | 'minor' | 'major' | 'existing';
|
|
20
19
|
export declare const RELEASE_BUMPS: readonly ReleaseBump[];
|
|
@@ -27,26 +26,13 @@ export declare function isReleaseBump(value: string): value is ReleaseBump;
|
|
|
27
26
|
* `npm version` does. Returns `null` for an unparseable base so the caller can
|
|
28
27
|
* fail loudly instead of publishing a garbage version. */
|
|
29
28
|
export declare function computeStableVersion(bump: ReleaseBump, base: string): string | null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
name: string;
|
|
33
|
-
version: string;
|
|
34
|
-
dependencies?: Record<string, string>;
|
|
35
|
-
[key: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
/** Stamp both manifests to a stable version.
|
|
29
|
+
export type { ManifestLike, ReleaseManifests } from './manifests.js';
|
|
30
|
+
/** Stamp the release set to a stable version.
|
|
38
31
|
*
|
|
39
|
-
* Mirror of `
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
* the manifest's `repository.url` matches the building repo, and the alias file
|
|
47
|
-
* carries none of its own. The git URL already matches and survives any
|
|
48
|
-
* npm-name rename. */
|
|
49
|
-
export declare function stampStableManifests(rootPkg: ManifestLike, aliasPkg: ManifestLike, version: string): {
|
|
50
|
-
root: ManifestLike;
|
|
51
|
-
alias: ManifestLike;
|
|
52
|
-
};
|
|
32
|
+
* Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
|
|
33
|
+
* dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
|
|
34
|
+
* follow compatible releases of the implementation package, and a stable service should follow
|
|
35
|
+
* compatible releases of the api-client; a snapshot must pin the one exact build it was cut
|
|
36
|
+
* from. Everything else — which manifests exist, which sections carry the pin, what the alias
|
|
37
|
+
* inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
|
|
38
|
+
export declare function stampStableManifests(manifests: ReleaseManifestSet, version: string): ReleaseManifestSet;
|
package/dist/release/stable.js
CHANGED
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
* thing that ever moves the `latest` dist-tag (spec
|
|
7
7
|
* `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
|
|
8
8
|
*
|
|
9
|
-
* Two decisions live here so they stay unit-testable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
|
|
14
|
-
* up compatible patch releases of the implementation package.
|
|
9
|
+
* Two decisions live here so they stay unit-testable and side-effect-free: the next stable
|
|
10
|
+
* version for a given bump, and the pin style the release set is stamped with. Crucially,
|
|
11
|
+
* stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
|
|
12
|
+
* so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
|
|
15
13
|
*/
|
|
14
|
+
import { stampManifestSet } from './manifests.js';
|
|
16
15
|
export const RELEASE_BUMPS = ['patch', 'minor', 'major', 'existing'];
|
|
17
16
|
export function isReleaseBump(value) {
|
|
18
17
|
return RELEASE_BUMPS.includes(value);
|
|
@@ -42,27 +41,15 @@ export function computeStableVersion(bump, base) {
|
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
/** Stamp
|
|
44
|
+
/** Stamp the release set to a stable version.
|
|
46
45
|
*
|
|
47
|
-
* Mirror of `
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* carries none of its own. The git URL already matches and survives any
|
|
56
|
-
* npm-name rename. */
|
|
57
|
-
export function stampStableManifests(rootPkg, aliasPkg, version) {
|
|
58
|
-
const inherited = {};
|
|
59
|
-
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
60
|
-
if (rootPkg[field] !== undefined)
|
|
61
|
-
inherited[field] = rootPkg[field];
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
root: { ...rootPkg, version },
|
|
65
|
-
alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: `^${version}` } },
|
|
66
|
-
};
|
|
46
|
+
* Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
|
|
47
|
+
* dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
|
|
48
|
+
* follow compatible releases of the implementation package, and a stable service should follow
|
|
49
|
+
* compatible releases of the api-client; a snapshot must pin the one exact build it was cut
|
|
50
|
+
* from. Everything else — which manifests exist, which sections carry the pin, what the alias
|
|
51
|
+
* inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
|
|
52
|
+
export function stampStableManifests(manifests, version) {
|
|
53
|
+
return stampManifestSet(manifests, version, (v) => `^${v}`);
|
|
67
54
|
}
|
|
68
55
|
//# sourceMappingURL=stable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAO/F,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE7F,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;2DAM2D;AAC3D,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,IAAY;IAClE,MAAM,CAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU;YACb,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;QACtC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC;QACnC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC;QAC5B;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAID;;;;;;;iFAOiF;AACjF,MAAM,UAAU,oBAAoB,CAClC,SAA6B,EAC7B,OAAe;IAEf,OAAO,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { createApp } from './server.js';
|
|
2
|
+
/**
|
|
3
|
+
* The service's HTTP contract, as a type.
|
|
4
|
+
*
|
|
5
|
+
* This is the whole boundary between the cezar service and a typed consumer: Hono infers an
|
|
6
|
+
* app's endpoint table from the app's *type*, and `hc<AppType>` turns that table into a client
|
|
7
|
+
* whose paths, request bodies and response shapes are checked at compile time. No hand-written
|
|
8
|
+
* mirror, no schema to author twice — the routes ARE the contract.
|
|
9
|
+
*
|
|
10
|
+
* Only routes registered through a **chained** builder appear here. `server.ts` still registers
|
|
11
|
+
* most families as loose statements (whose return value, and with it the accumulated route
|
|
12
|
+
* type, is discarded), so this type currently covers the chained families mounted under
|
|
13
|
+
* `/api/v1` — health, agent-config and workflows. Each family that gets chained widens this
|
|
14
|
+
* type automatically; nothing here needs updating.
|
|
15
|
+
*
|
|
16
|
+
* Type-only by construction: importing this module pulls in no runtime code (`import type`
|
|
17
|
+
* disappears at build), which is what lets a browser bundle consume it without dragging
|
|
18
|
+
* `node:*` in.
|
|
19
|
+
*/
|
|
20
|
+
export type AppType = ReturnType<typeof createApp>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-type.js","sourceRoot":"","sources":["../../src/server/app-type.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RepoInfo } from '../git.js';
|
|
2
|
-
import type { ForgeDriver } from './types.js';
|
|
2
|
+
import type { ForgeDriver, ForgeKind } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Forge resolution (cockpit-ui redesign spec §"Forge-driver seam"): map the
|
|
5
5
|
* repo's origin remote to a driver — github.com → the GitHub driver, anything
|
|
@@ -19,6 +19,13 @@ export interface ParsedRemote {
|
|
|
19
19
|
* else that doesn't look like a forge remote.
|
|
20
20
|
*/
|
|
21
21
|
export declare function parseRemote(remote: string): ParsedRemote | null;
|
|
22
|
+
/**
|
|
23
|
+
* Which forge a remote URL belongs to, without building a driver (#698): the
|
|
24
|
+
* registry's per-project probe classifies each root from its remote alone —
|
|
25
|
+
* plain string parsing, no `gh` shell-out — so the sidebar can gate each
|
|
26
|
+
* project's GitHub tab on the project's own remote.
|
|
27
|
+
*/
|
|
28
|
+
export declare function forgeKindOfRemote(remote: string | undefined): ForgeKind | null;
|
|
22
29
|
/** Remote host → driver | null. GitLab lands here later as one more case. */
|
|
23
30
|
export declare function resolveForge(repoInfo: RepoInfo | null): ForgeDriver | null;
|
|
24
31
|
export type { ForgeDriver, ForgeAvailability, ForgeItem, ForgeKind, ForgePrStatus, ForgeRefKind } from './types.js';
|
|
@@ -30,6 +30,19 @@ export function parseRemote(remote) {
|
|
|
30
30
|
return null;
|
|
31
31
|
return { host: host.toLowerCase(), owner, repo };
|
|
32
32
|
}
|
|
33
|
+
/** Remote host → forge kind. The one host table both `resolveForge` and the
|
|
34
|
+
* registry probe read; GitLab lands here later as one more row. */
|
|
35
|
+
const FORGE_HOSTS = { 'github.com': 'github' };
|
|
36
|
+
/**
|
|
37
|
+
* Which forge a remote URL belongs to, without building a driver (#698): the
|
|
38
|
+
* registry's per-project probe classifies each root from its remote alone —
|
|
39
|
+
* plain string parsing, no `gh` shell-out — so the sidebar can gate each
|
|
40
|
+
* project's GitHub tab on the project's own remote.
|
|
41
|
+
*/
|
|
42
|
+
export function forgeKindOfRemote(remote) {
|
|
43
|
+
const parsed = remote ? parseRemote(remote) : null;
|
|
44
|
+
return parsed ? (FORGE_HOSTS[parsed.host] ?? null) : null;
|
|
45
|
+
}
|
|
33
46
|
/** Remote host → driver | null. GitLab lands here later as one more case. */
|
|
34
47
|
export function resolveForge(repoInfo) {
|
|
35
48
|
if (!repoInfo?.remote)
|
|
@@ -37,7 +50,7 @@ export function resolveForge(repoInfo) {
|
|
|
37
50
|
const parsed = parseRemote(repoInfo.remote);
|
|
38
51
|
if (!parsed)
|
|
39
52
|
return null;
|
|
40
|
-
if (parsed.host === 'github
|
|
53
|
+
if (FORGE_HOSTS[parsed.host] === 'github') {
|
|
41
54
|
return createGithubDriver(repoInfo.root, { owner: parsed.owner, repo: parsed.repo });
|
|
42
55
|
}
|
|
43
56
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/forge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAiBjD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5C,IAAI,IAAwB,CAAC;IAC7B,IAAI,IAAwB,CAAC;IAC7B,MAAM,GAAG,GAAG,uEAAuE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5F,IAAI,GAAG,EAAE,CAAC;QACR,CAAC,EAAE,IA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