frizz 0.12.2 → 0.12.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/dist/dev-child.js +10 -1
- package/package.json +1 -1
package/dist/dev-child.js
CHANGED
|
@@ -16464,7 +16464,14 @@ function resolveProjectIdentity(dir, home = homedir5()) {
|
|
|
16464
16464
|
return { id: ensureProjectIdFile(root, home, git2?.id), scope: git2?.scope ?? "repository", root };
|
|
16465
16465
|
}
|
|
16466
16466
|
function cwdSlug(absPath) {
|
|
16467
|
-
|
|
16467
|
+
const slug = absPath.replace(/[^A-Za-z0-9]/g, "-");
|
|
16468
|
+
if (slug.length <= CWD_SLUG_MAX) return slug;
|
|
16469
|
+
return `${slug.slice(0, CWD_SLUG_MAX)}-${Math.abs(cwdSlugHash(absPath)).toString(36)}`;
|
|
16470
|
+
}
|
|
16471
|
+
function cwdSlugHash(absPath) {
|
|
16472
|
+
let hash = 0;
|
|
16473
|
+
for (let i = 0; i < absPath.length; i++) hash = (hash << 5) - hash + absPath.charCodeAt(i) | 0;
|
|
16474
|
+
return hash;
|
|
16468
16475
|
}
|
|
16469
16476
|
function registerAndReconcile(dir, id, home) {
|
|
16470
16477
|
const remoteOwner = resolveProjectLabel(dir)?.split("/")[0];
|
|
@@ -16547,6 +16554,7 @@ function projectFromLaunchTarget(target, env = process.env) {
|
|
|
16547
16554
|
...target.identityScope === "worktree" ? { identityScope: "worktree" } : {}
|
|
16548
16555
|
};
|
|
16549
16556
|
}
|
|
16557
|
+
var CWD_SLUG_MAX;
|
|
16550
16558
|
var init_project = __esm({
|
|
16551
16559
|
"packages/server/src/project.ts"() {
|
|
16552
16560
|
"use strict";
|
|
@@ -16557,6 +16565,7 @@ var init_project = __esm({
|
|
|
16557
16565
|
init_project_identity();
|
|
16558
16566
|
init_github();
|
|
16559
16567
|
init_project_identity();
|
|
16568
|
+
CWD_SLUG_MAX = 200;
|
|
16560
16569
|
}
|
|
16561
16570
|
});
|
|
16562
16571
|
|