gipity 1.0.388 → 1.0.390

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.
@@ -513,7 +513,9 @@ export const claudeCommand = new Command('claude')
513
513
  // .gipity.json into cwd (no projects-root materialization).
514
514
  const cwdBase = basename(process.cwd());
515
515
  const adoptSlug = slugify(cwdBase) || 'project';
516
- const adoptName = cwdBase || adoptSlug;
516
+ // Server caps name at 100 chars; clamp so a very long dir name
517
+ // doesn't trip a "Too big" 400 (slugify already clamps the slug).
518
+ const adoptName = (cwdBase || adoptSlug).slice(0, 100);
517
519
  accountSlug = await getAccountSlug();
518
520
  const adopted = await adoptCurrentDir({
519
521
  cwd: process.cwd(),
@@ -112,8 +112,9 @@ Working with an existing Gipity project:
112
112
  process.exit(1);
113
113
  }
114
114
  }
115
- // Resolve project name
116
- const projectName = name || basename(cwd);
115
+ // Resolve project name. Server caps name at 100 chars; clamp so a very
116
+ // long dir name doesn't trip a "Too big" 400 (slugify clamps the slug).
117
+ const projectName = (name || basename(cwd)).slice(0, 100);
117
118
  const projectSlug = slugify(projectName);
118
119
  if (!projectSlug) {
119
120
  console.error(clrError('Could not derive a valid project slug. Provide a name: gipity init my-app'));
package/dist/setup.js CHANGED
@@ -404,11 +404,23 @@ export function setupGitignore() {
404
404
  writeFileSync(gitignorePath, entries.join('\n') + '\n');
405
405
  }
406
406
  }
407
+ /** The server caps slugs at 50 (MAX_PROJECT_SLUG_LENGTH); we cap shorter for
408
+ * readability, since the slug is also the on-disk folder and the URL path
409
+ * segment. Keeps long-named directories from producing valid-but-ugly slugs. */
410
+ export const MAX_SLUG_LENGTH = 40;
407
411
  export function slugify(name) {
408
- return name
412
+ const slug = name
409
413
  .toLowerCase()
410
414
  .replace(/[^a-z0-9-]/g, '-')
411
415
  .replace(/-+/g, '-')
412
416
  .replace(/^-|-$/g, '');
417
+ if (slug.length <= MAX_SLUG_LENGTH)
418
+ return slug;
419
+ // Cut at the last word (hyphen) boundary within the cap so we don't slice
420
+ // mid-word (e.g. "...call-no"). Fall back to a hard cut if the first word
421
+ // alone already exceeds the cap.
422
+ const cut = slug.slice(0, MAX_SLUG_LENGTH);
423
+ const lastHyphen = cut.lastIndexOf('-');
424
+ return (lastHyphen > 0 ? cut.slice(0, lastHyphen) : cut).replace(/-+$/, '');
413
425
  }
414
426
  //# sourceMappingURL=setup.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gipity",
3
- "version": "1.0.388",
3
+ "version": "1.0.390",
4
4
  "description": "The full-stack platform tuned for AI agents. Database, storage, auth, functions, deploy, and drop-in kits - all agent-tuned. Pair with Claude Code or use standalone.",
5
5
  "bin": {
6
6
  "gipity": "dist/updater/shim.js",