@aion0/forge 0.10.71 → 0.10.72
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/RELEASE_NOTES.md +3 -6
- package/lib/projects.ts +13 -3
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
# Forge v0.10.
|
|
1
|
+
# Forge v0.10.72
|
|
2
2
|
|
|
3
3
|
Released: 2026-06-11
|
|
4
4
|
|
|
5
|
-
## Changes since v0.10.
|
|
5
|
+
## Changes since v0.10.71
|
|
6
6
|
|
|
7
|
-
### Other
|
|
8
|
-
- fix(auth): persist AUTH_SECRET so sessions survive refresh/restart
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
**Full Changelog**: https://github.com/aiwatching/forge/compare/v0.10.70...v0.10.71
|
|
8
|
+
**Full Changelog**: https://github.com/aiwatching/forge/compare/v0.10.71...v0.10.72
|
package/lib/projects.ts
CHANGED
|
@@ -386,15 +386,25 @@ export function resolveOrCloneProject(name: string | undefined): ResolveResult {
|
|
|
386
386
|
// 2. `name` is empty / unknown — pull the gitlab connector's
|
|
387
387
|
// `default_project_path` (e.g. "fortinet/fortinac-dev") and use
|
|
388
388
|
// it as the fallback repo.
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
//
|
|
389
|
+
// Before cloning, scan local projectRoots for a checkout whose git
|
|
390
|
+
// origin already matches — saves a redundant clone and also covers the
|
|
391
|
+
// "server just booted, registry/settings cache not warm yet" window
|
|
392
|
+
// where the user's real local FortiNAC was missed by the name-based
|
|
393
|
+
// lookups above.
|
|
392
394
|
const gl = readGitlabConnector();
|
|
393
395
|
if (gl) {
|
|
394
396
|
const targetPath = trimmed && trimmed.includes('/')
|
|
395
397
|
? trimmed
|
|
396
398
|
: (gl.default_project_path || '').trim();
|
|
397
399
|
if (targetPath) {
|
|
400
|
+
const projects = scanProjects();
|
|
401
|
+
const want = normalizeRepoPath(targetPath) || targetPath.toLowerCase().replace(/^\/+|\/+$/g, '');
|
|
402
|
+
const wantBase = want.split('/').pop()!;
|
|
403
|
+
const byRepo = projects.filter((p) => p.repo && p.repo === want);
|
|
404
|
+
if (byRepo.length === 1) return { project: byRepo[0], source: 'existing' };
|
|
405
|
+
const byRepoBase = projects.filter((p) => p.repo && p.repo.split('/').pop() === wantBase);
|
|
406
|
+
if (byRepoBase.length === 1) return { project: byRepoBase[0], source: 'existing' };
|
|
407
|
+
|
|
398
408
|
const cloned = tryGitlabClone(targetPath);
|
|
399
409
|
if (cloned) return { project: cloned, source: 'gitlab-cloned', clone_url: `${gl.base_url}/${targetPath.replace(/^\/+|\/+$/g, '')}.git` };
|
|
400
410
|
}
|
package/package.json
CHANGED