canopycms 0.0.26 → 0.0.27

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.
Files changed (80) hide show
  1. package/dist/ai/generate.d.ts +3 -0
  2. package/dist/ai/generate.d.ts.map +1 -1
  3. package/dist/ai/generate.js +17 -6
  4. package/dist/ai/generate.js.map +1 -1
  5. package/dist/ai/handler.d.ts.map +1 -1
  6. package/dist/ai/handler.js +1 -0
  7. package/dist/ai/handler.js.map +1 -1
  8. package/dist/api/content.d.ts +6 -0
  9. package/dist/api/content.d.ts.map +1 -1
  10. package/dist/api/content.js +18 -1
  11. package/dist/api/content.js.map +1 -1
  12. package/dist/api/schema.d.ts +20 -20
  13. package/dist/build/generate-ai-content.d.ts.map +1 -1
  14. package/dist/build/generate-ai-content.js +1 -0
  15. package/dist/build/generate-ai-content.js.map +1 -1
  16. package/dist/cli/generate-ai-content.js +262 -123
  17. package/dist/cli/init.js +2 -1
  18. package/dist/client.d.ts +2 -0
  19. package/dist/client.d.ts.map +1 -1
  20. package/dist/client.js +1 -0
  21. package/dist/client.js.map +1 -1
  22. package/dist/config/helpers.d.ts.map +1 -1
  23. package/dist/config/helpers.js +2 -1
  24. package/dist/config/helpers.js.map +1 -1
  25. package/dist/config/schemas/collection.d.ts +6 -6
  26. package/dist/config/schemas/config.d.ts +10 -6
  27. package/dist/config/schemas/config.d.ts.map +1 -1
  28. package/dist/config/schemas/config.js +1 -0
  29. package/dist/config/schemas/config.js.map +1 -1
  30. package/dist/config/types.d.ts +6 -1
  31. package/dist/config/types.d.ts.map +1 -1
  32. package/dist/config/types.js.map +1 -1
  33. package/dist/content-reader.d.ts +2 -0
  34. package/dist/content-reader.d.ts.map +1 -1
  35. package/dist/content-reader.js +13 -4
  36. package/dist/content-reader.js.map +1 -1
  37. package/dist/editor/CanopyEditor.d.ts.map +1 -1
  38. package/dist/editor/CanopyEditor.js +1 -1
  39. package/dist/editor/CanopyEditor.js.map +1 -1
  40. package/dist/editor/Editor.d.ts +1 -0
  41. package/dist/editor/Editor.d.ts.map +1 -1
  42. package/dist/editor/Editor.js +32 -9
  43. package/dist/editor/Editor.js.map +1 -1
  44. package/dist/editor/fields/MarkdownField.d.ts.map +1 -1
  45. package/dist/editor/fields/MarkdownField.js +8 -2
  46. package/dist/editor/fields/MarkdownField.js.map +1 -1
  47. package/dist/editor/fields/entry-link/EntryLinkContext.d.ts +20 -0
  48. package/dist/editor/fields/entry-link/EntryLinkContext.d.ts.map +1 -0
  49. package/dist/editor/fields/entry-link/EntryLinkContext.js +12 -0
  50. package/dist/editor/fields/entry-link/EntryLinkContext.js.map +1 -0
  51. package/dist/editor/fields/entry-link/InsertEntryLink.d.ts +16 -0
  52. package/dist/editor/fields/entry-link/InsertEntryLink.d.ts.map +1 -0
  53. package/dist/editor/fields/entry-link/InsertEntryLink.js +62 -0
  54. package/dist/editor/fields/entry-link/InsertEntryLink.js.map +1 -0
  55. package/dist/editor/fields/entry-link/index.d.ts +3 -0
  56. package/dist/editor/fields/entry-link/index.d.ts.map +1 -0
  57. package/dist/editor/fields/entry-link/index.js +3 -0
  58. package/dist/editor/fields/entry-link/index.js.map +1 -0
  59. package/dist/editor/hooks/useEntryLinkResolution.d.ts +26 -0
  60. package/dist/editor/hooks/useEntryLinkResolution.d.ts.map +1 -0
  61. package/dist/editor/hooks/useEntryLinkResolution.js +96 -0
  62. package/dist/editor/hooks/useEntryLinkResolution.js.map +1 -0
  63. package/dist/entry-link-resolver.d.ts +67 -0
  64. package/dist/entry-link-resolver.d.ts.map +1 -0
  65. package/dist/entry-link-resolver.js +226 -0
  66. package/dist/entry-link-resolver.js.map +1 -0
  67. package/dist/schema/schema-store.d.ts +10 -10
  68. package/dist/server.d.ts +3 -0
  69. package/dist/server.d.ts.map +1 -1
  70. package/dist/server.js +2 -0
  71. package/dist/server.js.map +1 -1
  72. package/dist/utils/entry-url.d.ts +21 -0
  73. package/dist/utils/entry-url.d.ts.map +1 -0
  74. package/dist/utils/entry-url.js +41 -0
  75. package/dist/utils/entry-url.js.map +1 -0
  76. package/dist/validation/entry-link-validator.d.ts +27 -0
  77. package/dist/validation/entry-link-validator.d.ts.map +1 -0
  78. package/dist/validation/entry-link-validator.js +49 -0
  79. package/dist/validation/entry-link-validator.js.map +1 -0
  80. package/package.json +1 -1
@@ -23,6 +23,15 @@ function createLogicalPath(...segments) {
23
23
  }
24
24
  return normalized;
25
25
  }
26
+ function trimSlashes(path13) {
27
+ let start = 0;
28
+ let end = path13.length;
29
+ while (start < end && path13[start] === "/")
30
+ start++;
31
+ while (end > start && path13[end - 1] === "/")
32
+ end--;
33
+ return path13.slice(start, end);
34
+ }
26
35
  var init_normalize = __esm({
27
36
  "dist/paths/normalize.js"() {
28
37
  "use strict";
@@ -348,7 +357,8 @@ var init_config = __esm({
348
357
  contentRoot: contentRootSchema.default("content"),
349
358
  sourceRoot: sourceRootSchema.optional(),
350
359
  editor: editorConfigSchema.optional(),
351
- authPlugin: z4.custom().optional()
360
+ authPlugin: z4.custom().optional(),
361
+ entryLinkUrl: z4.custom().optional()
352
362
  });
353
363
  DEFAULT_PROD_WORKSPACE = "/mnt/efs/workspace";
354
364
  }
@@ -2366,10 +2376,223 @@ function yamlValue(value) {
2366
2376
  return value;
2367
2377
  }
2368
2378
 
2379
+ // dist/utils/debug.js
2380
+ var LOG_LEVELS = {
2381
+ DEBUG: 0,
2382
+ INFO: 1,
2383
+ WARN: 2,
2384
+ ERROR: 3
2385
+ };
2386
+ var DebugLogger = class {
2387
+ constructor(options = {}) {
2388
+ this.timers = /* @__PURE__ */ new Map();
2389
+ this.options = options;
2390
+ }
2391
+ shouldLog(level) {
2392
+ const enabled = this.options.enabled ?? process.env.CANOPYCMS_DEBUG === "true";
2393
+ if (!enabled)
2394
+ return false;
2395
+ const minLevel = this.options.minLevel ?? "DEBUG";
2396
+ return LOG_LEVELS[level] >= LOG_LEVELS[minLevel];
2397
+ }
2398
+ formatMessage(level, category, message) {
2399
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
2400
+ const prefix = this.options.prefix ?? "CanopyCMS";
2401
+ return `[${timestamp}] [${prefix}:${category}] [${level}] ${message}`;
2402
+ }
2403
+ debug(category, message, data) {
2404
+ if (this.shouldLog("DEBUG")) {
2405
+ console.log(this.formatMessage("DEBUG", category, message), data ?? "");
2406
+ }
2407
+ }
2408
+ info(category, message, data) {
2409
+ if (this.shouldLog("INFO")) {
2410
+ console.log(this.formatMessage("INFO", category, message), data ?? "");
2411
+ }
2412
+ }
2413
+ warn(category, message, data) {
2414
+ if (this.shouldLog("WARN")) {
2415
+ console.warn(this.formatMessage("WARN", category, message), data ?? "");
2416
+ }
2417
+ }
2418
+ error(category, message, data) {
2419
+ const msg = this.formatMessage("ERROR", category, message);
2420
+ if (this.shouldLog("ERROR")) {
2421
+ console.error(msg, data ?? "");
2422
+ }
2423
+ const throwOnError = this.options.throwOnError ?? false;
2424
+ if (throwOnError) {
2425
+ const errorMsg = data ? `${message}: ${JSON.stringify(data)}` : message;
2426
+ throw new Error(errorMsg);
2427
+ }
2428
+ }
2429
+ /**
2430
+ * Start timing an operation
2431
+ */
2432
+ time(label) {
2433
+ this.timers.set(label, Date.now());
2434
+ }
2435
+ /**
2436
+ * End timing an operation and log the duration
2437
+ */
2438
+ timeEnd(category, label) {
2439
+ const start = this.timers.get(label);
2440
+ if (start === void 0) {
2441
+ this.warn(category, `Timer '${label}' does not exist`);
2442
+ return;
2443
+ }
2444
+ const duration = Date.now() - start;
2445
+ this.timers.delete(label);
2446
+ this.debug(category, `${label} completed`, { durationMs: duration });
2447
+ return duration;
2448
+ }
2449
+ /**
2450
+ * Wrap an async function with automatic timing
2451
+ */
2452
+ async timed(category, label, fn) {
2453
+ this.time(label);
2454
+ try {
2455
+ return await fn();
2456
+ } finally {
2457
+ this.timeEnd(category, label);
2458
+ }
2459
+ }
2460
+ };
2461
+ function createDebugLogger(options) {
2462
+ return new DebugLogger(options);
2463
+ }
2464
+ var testLogger = createDebugLogger({
2465
+ enabled: process.env.E2E_DEBUG === "true",
2466
+ prefix: "E2E",
2467
+ throwOnError: false
2468
+ });
2469
+
2470
+ // dist/utils/entry-url.js
2471
+ init_normalize();
2472
+ function computeEntryUrl(collection, slug, contentRoot) {
2473
+ const root = trimSlashes(contentRoot);
2474
+ let stripped = collection;
2475
+ if (root && collection.startsWith(`${root}/`)) {
2476
+ stripped = collection.slice(root.length + 1);
2477
+ } else if (collection === root) {
2478
+ stripped = "";
2479
+ }
2480
+ const segments = stripped.split("/").filter(Boolean);
2481
+ if (slug && slug !== "index") {
2482
+ segments.push(slug);
2483
+ }
2484
+ const path13 = segments.length > 0 ? `/${segments.join("/")}` : "/";
2485
+ return path13.toLowerCase();
2486
+ }
2487
+
2488
+ // dist/entry-link-resolver.js
2489
+ var log = createDebugLogger({ prefix: "EntryLinks" });
2490
+ var BASE58_CHAR = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]";
2491
+ var ENTRY_LINK_PATTERN = new RegExp(`entry:(${BASE58_CHAR}{12})(#[^\\s)>"']*)?`, "g");
2492
+ function resolveEntryUrl(location, contentRoot) {
2493
+ return computeEntryUrl(location.collection ?? "", location.slug ?? "", contentRoot);
2494
+ }
2495
+ function resolveEntryLinksInText(text, idIndex, contentRoot, customResolver) {
2496
+ const parts = splitByCodeRegions(text);
2497
+ return parts.map((part) => {
2498
+ if (part.isCode)
2499
+ return part.text;
2500
+ return part.text.replace(ENTRY_LINK_PATTERN, (_match, id, anchor) => {
2501
+ const location = idIndex.findById(id);
2502
+ if (!location || location.type !== "entry" || !location.collection || !location.slug) {
2503
+ log.warn("resolve", `Entry link target not found: entry:${id}`);
2504
+ return anchor ?? "#";
2505
+ }
2506
+ let url;
2507
+ if (customResolver) {
2508
+ url = customResolver({
2509
+ collection: location.collection,
2510
+ slug: location.slug,
2511
+ id
2512
+ });
2513
+ } else {
2514
+ url = resolveEntryUrl(location, contentRoot);
2515
+ }
2516
+ return `${url}${anchor ?? ""}`;
2517
+ });
2518
+ }).join("");
2519
+ }
2520
+ function splitByCodeRegions(text) {
2521
+ const parts = [];
2522
+ let current = "";
2523
+ let i = 0;
2524
+ while (i < text.length) {
2525
+ if ((text[i] === "`" || text[i] === "~") && i + 2 < text.length && text[i + 1] === text[i] && text[i + 2] === text[i]) {
2526
+ const fence = text[i];
2527
+ let fenceLen = 0;
2528
+ while (i + fenceLen < text.length && text[i + fenceLen] === fence)
2529
+ fenceLen++;
2530
+ const lineEnd = text.indexOf("\n", i + fenceLen);
2531
+ if (lineEnd === -1) {
2532
+ if (current)
2533
+ parts.push({ text: current, isCode: false });
2534
+ parts.push({ text: text.slice(i), isCode: true });
2535
+ return parts;
2536
+ }
2537
+ const closingPattern = fence.repeat(fenceLen);
2538
+ let closeStart = lineEnd + 1;
2539
+ let found = false;
2540
+ while (closeStart < text.length) {
2541
+ const nextNewline = text.indexOf("\n", closeStart);
2542
+ const lineContent = nextNewline === -1 ? text.slice(closeStart) : text.slice(closeStart, nextNewline);
2543
+ if (lineContent.trim().startsWith(closingPattern)) {
2544
+ const endPos = nextNewline === -1 ? text.length : nextNewline + 1;
2545
+ if (current)
2546
+ parts.push({ text: current, isCode: false });
2547
+ current = "";
2548
+ parts.push({ text: text.slice(i, endPos), isCode: true });
2549
+ i = endPos;
2550
+ found = true;
2551
+ break;
2552
+ }
2553
+ if (nextNewline === -1)
2554
+ break;
2555
+ closeStart = nextNewline + 1;
2556
+ }
2557
+ if (!found) {
2558
+ if (current)
2559
+ parts.push({ text: current, isCode: false });
2560
+ parts.push({ text: text.slice(i), isCode: true });
2561
+ return parts;
2562
+ }
2563
+ continue;
2564
+ }
2565
+ if (text[i] === "`") {
2566
+ let ticks = 0;
2567
+ while (i + ticks < text.length && text[i + ticks] === "`")
2568
+ ticks++;
2569
+ const closer = "`".repeat(ticks);
2570
+ const closeIdx = text.indexOf(closer, i + ticks);
2571
+ if (closeIdx !== -1) {
2572
+ if (current)
2573
+ parts.push({ text: current, isCode: false });
2574
+ current = "";
2575
+ parts.push({ text: text.slice(i, closeIdx + ticks), isCode: true });
2576
+ i = closeIdx + ticks;
2577
+ continue;
2578
+ }
2579
+ current += text.slice(i, i + ticks);
2580
+ i += ticks;
2581
+ continue;
2582
+ }
2583
+ current += text[i];
2584
+ i++;
2585
+ }
2586
+ if (current)
2587
+ parts.push({ text: current, isCode: false });
2588
+ return parts;
2589
+ }
2590
+
2369
2591
  // dist/ai/generate.js
2370
2592
  async function generateAIContent(options) {
2371
- const { store, flatSchema, contentRoot, config } = options;
2593
+ const { store, flatSchema, contentRoot, config, entryLinkUrl } = options;
2372
2594
  const files = /* @__PURE__ */ new Map();
2595
+ const idIndex = await store.idIndex();
2373
2596
  const collections = flatSchema.filter((item) => item.type === "collection");
2374
2597
  const allEntries = [];
2375
2598
  const manifestCollections = [];
@@ -2381,7 +2604,7 @@ async function generateAIContent(options) {
2381
2604
  continue;
2382
2605
  if (collection.parentPath && collection.parentPath !== contentRoot)
2383
2606
  continue;
2384
- const collectionResult = await processCollection(store, collection, flatSchema, contentRoot, config);
2607
+ const collectionResult = await processCollection(store, collection, flatSchema, contentRoot, config, idIndex, entryLinkUrl);
2385
2608
  allEntries.push(...collectionResult.entries);
2386
2609
  for (const [filePath, content] of collectionResult.files) {
2387
2610
  files.set(filePath, content);
@@ -2390,7 +2613,7 @@ async function generateAIContent(options) {
2390
2613
  }
2391
2614
  const rootCollection = collections.find((c) => c.logicalPath === contentRoot);
2392
2615
  if (rootCollection?.entries) {
2393
- const rootResult = await processRootEntries(store, rootCollection, contentRoot, config);
2616
+ const rootResult = await processRootEntries(store, rootCollection, contentRoot, config, idIndex, entryLinkUrl);
2394
2617
  allEntries.push(...rootResult.entries);
2395
2618
  for (const [filePath, content] of rootResult.files) {
2396
2619
  files.set(filePath, content);
@@ -2426,7 +2649,7 @@ async function generateAIContent(options) {
2426
2649
  files.set("manifest.json", JSON.stringify(manifest, null, 2));
2427
2650
  return { manifest, files };
2428
2651
  }
2429
- async function processCollection(store, collection, flatSchema, contentRoot, config) {
2652
+ async function processCollection(store, collection, flatSchema, contentRoot, config, idIndex, entryLinkUrl) {
2430
2653
  const files = /* @__PURE__ */ new Map();
2431
2654
  const entries = [];
2432
2655
  const cleanPath = stripContentRoot(collection.logicalPath, contentRoot);
@@ -2447,6 +2670,9 @@ async function processCollection(store, collection, flatSchema, contentRoot, con
2447
2670
  resolveReferences: false
2448
2671
  });
2449
2672
  const aiEntry = docToAIEntry(doc, listEntry.slug, entryTypeName, entryTypeConfig, cleanPath);
2673
+ if (aiEntry.body && idIndex) {
2674
+ aiEntry.body = resolveEntryLinksInText(aiEntry.body, idIndex, contentRoot, entryLinkUrl);
2675
+ }
2450
2676
  if (config?.exclude?.where?.(aiEntry))
2451
2677
  continue;
2452
2678
  entries.push(aiEntry);
@@ -2468,7 +2694,7 @@ async function processCollection(store, collection, flatSchema, contentRoot, con
2468
2694
  for (const sub of subcollections) {
2469
2695
  if (isCollectionExcluded(sub.logicalPath, contentRoot, config))
2470
2696
  continue;
2471
- const subResult = await processCollection(store, sub, flatSchema, contentRoot, config);
2697
+ const subResult = await processCollection(store, sub, flatSchema, contentRoot, config, idIndex, entryLinkUrl);
2472
2698
  entries.push(...subResult.entries);
2473
2699
  for (const [filePath, content] of subResult.files) {
2474
2700
  files.set(filePath, content);
@@ -2492,7 +2718,7 @@ async function processCollection(store, collection, flatSchema, contentRoot, con
2492
2718
  };
2493
2719
  return { entries, files, manifestCollection };
2494
2720
  }
2495
- async function processRootEntries(store, rootCollection, contentRoot, config) {
2721
+ async function processRootEntries(store, rootCollection, contentRoot, config, idIndex, entryLinkUrl) {
2496
2722
  const files = /* @__PURE__ */ new Map();
2497
2723
  const entries = [];
2498
2724
  const manifestEntries = [];
@@ -2512,6 +2738,9 @@ async function processRootEntries(store, rootCollection, contentRoot, config) {
2512
2738
  resolveReferences: false
2513
2739
  });
2514
2740
  const aiEntry = docToAIEntry(doc, listEntry.slug, entryTypeName, entryTypeConfig, "");
2741
+ if (aiEntry.body && idIndex) {
2742
+ aiEntry.body = resolveEntryLinksInText(aiEntry.body, idIndex, contentRoot, entryLinkUrl);
2743
+ }
2515
2744
  if (config?.exclude?.where?.(aiEntry))
2516
2745
  continue;
2517
2746
  entries.push(aiEntry);
@@ -2902,97 +3131,6 @@ import fs9 from "node:fs/promises";
2902
3131
  import path10 from "node:path";
2903
3132
  import { simpleGit as simpleGit2 } from "simple-git";
2904
3133
 
2905
- // dist/utils/debug.js
2906
- var LOG_LEVELS = {
2907
- DEBUG: 0,
2908
- INFO: 1,
2909
- WARN: 2,
2910
- ERROR: 3
2911
- };
2912
- var DebugLogger = class {
2913
- constructor(options = {}) {
2914
- this.timers = /* @__PURE__ */ new Map();
2915
- this.options = options;
2916
- }
2917
- shouldLog(level) {
2918
- const enabled = this.options.enabled ?? process.env.CANOPYCMS_DEBUG === "true";
2919
- if (!enabled)
2920
- return false;
2921
- const minLevel = this.options.minLevel ?? "DEBUG";
2922
- return LOG_LEVELS[level] >= LOG_LEVELS[minLevel];
2923
- }
2924
- formatMessage(level, category, message) {
2925
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
2926
- const prefix = this.options.prefix ?? "CanopyCMS";
2927
- return `[${timestamp}] [${prefix}:${category}] [${level}] ${message}`;
2928
- }
2929
- debug(category, message, data) {
2930
- if (this.shouldLog("DEBUG")) {
2931
- console.log(this.formatMessage("DEBUG", category, message), data ?? "");
2932
- }
2933
- }
2934
- info(category, message, data) {
2935
- if (this.shouldLog("INFO")) {
2936
- console.log(this.formatMessage("INFO", category, message), data ?? "");
2937
- }
2938
- }
2939
- warn(category, message, data) {
2940
- if (this.shouldLog("WARN")) {
2941
- console.warn(this.formatMessage("WARN", category, message), data ?? "");
2942
- }
2943
- }
2944
- error(category, message, data) {
2945
- const msg = this.formatMessage("ERROR", category, message);
2946
- if (this.shouldLog("ERROR")) {
2947
- console.error(msg, data ?? "");
2948
- }
2949
- const throwOnError = this.options.throwOnError ?? false;
2950
- if (throwOnError) {
2951
- const errorMsg = data ? `${message}: ${JSON.stringify(data)}` : message;
2952
- throw new Error(errorMsg);
2953
- }
2954
- }
2955
- /**
2956
- * Start timing an operation
2957
- */
2958
- time(label) {
2959
- this.timers.set(label, Date.now());
2960
- }
2961
- /**
2962
- * End timing an operation and log the duration
2963
- */
2964
- timeEnd(category, label) {
2965
- const start = this.timers.get(label);
2966
- if (start === void 0) {
2967
- this.warn(category, `Timer '${label}' does not exist`);
2968
- return;
2969
- }
2970
- const duration = Date.now() - start;
2971
- this.timers.delete(label);
2972
- this.debug(category, `${label} completed`, { durationMs: duration });
2973
- return duration;
2974
- }
2975
- /**
2976
- * Wrap an async function with automatic timing
2977
- */
2978
- async timed(category, label, fn) {
2979
- this.time(label);
2980
- try {
2981
- return await fn();
2982
- } finally {
2983
- this.timeEnd(category, label);
2984
- }
2985
- }
2986
- };
2987
- function createDebugLogger(options) {
2988
- return new DebugLogger(options);
2989
- }
2990
- var testLogger = createDebugLogger({
2991
- enabled: process.env.E2E_DEBUG === "true",
2992
- prefix: "E2E",
2993
- throwOnError: false
2994
- });
2995
-
2996
3134
  // dist/utils/git.js
2997
3135
  import { simpleGit } from "simple-git";
2998
3136
  async function detectHeadBranch(repoRoot, fallback = "main") {
@@ -3006,7 +3144,7 @@ async function detectHeadBranch(repoRoot, fallback = "main") {
3006
3144
  }
3007
3145
 
3008
3146
  // dist/git-manager.js
3009
- var log = createDebugLogger({ prefix: "GitManager" });
3147
+ var log2 = createDebugLogger({ prefix: "GitManager" });
3010
3148
  var remoteInitLocks = /* @__PURE__ */ new Map();
3011
3149
  var GitManager = class _GitManager {
3012
3150
  constructor(options, gitOptions) {
@@ -3017,14 +3155,14 @@ var GitManager = class _GitManager {
3017
3155
  this.git.env("GIT_CEILING_DIRECTORIES", path10.dirname(this.repoPath));
3018
3156
  }
3019
3157
  static async cloneRepo(remoteUrl, targetPath, baseBranch = "main") {
3020
- log.debug("git", "Cloning repository", {
3158
+ log2.debug("git", "Cloning repository", {
3021
3159
  remoteUrl,
3022
3160
  targetPath,
3023
3161
  baseBranch
3024
3162
  });
3025
3163
  const git = simpleGit2();
3026
3164
  await git.clone(remoteUrl, targetPath, ["--branch", baseBranch, "--single-branch"]);
3027
- log.debug("git", "Clone complete");
3165
+ log2.debug("git", "Clone complete");
3028
3166
  }
3029
3167
  /**
3030
3168
  * Initializes a local bare git repository to simulate a remote for dev mode.
@@ -3040,32 +3178,32 @@ var GitManager = class _GitManager {
3040
3178
  static async ensureLocalSimulatedRemote(options) {
3041
3179
  const existingLock = remoteInitLocks.get(options.remotePath);
3042
3180
  if (existingLock) {
3043
- log.debug("git", "Waiting for existing remote initialization", {
3181
+ log2.debug("git", "Waiting for existing remote initialization", {
3044
3182
  remotePath: options.remotePath
3045
3183
  });
3046
3184
  await existingLock;
3047
3185
  try {
3048
3186
  const stat = await fs9.stat(options.remotePath);
3049
3187
  if (stat.isDirectory()) {
3050
- log.debug("git", "Remote exists after waiting for lock");
3188
+ log2.debug("git", "Remote exists after waiting for lock");
3051
3189
  return;
3052
3190
  }
3053
3191
  } catch (err) {
3054
3192
  if (!isNotFoundError(err))
3055
3193
  throw err;
3056
- log.debug("git", "Remote does not exist after lock, will retry initialization");
3194
+ log2.debug("git", "Remote does not exist after lock, will retry initialization");
3057
3195
  }
3058
3196
  }
3059
- const lockPromise = log.timed("git", "ensureLocalSimulatedRemote", async () => {
3197
+ const lockPromise = log2.timed("git", "ensureLocalSimulatedRemote", async () => {
3060
3198
  try {
3061
- log.debug("git", "Initializing local simulated remote", {
3199
+ log2.debug("git", "Initializing local simulated remote", {
3062
3200
  remotePath: options.remotePath,
3063
3201
  baseBranch: options.baseBranch
3064
3202
  });
3065
3203
  try {
3066
3204
  const stat = await fs9.stat(options.remotePath);
3067
3205
  if (stat.isDirectory()) {
3068
- log.debug("git", "Remote already exists, skipping");
3206
+ log2.debug("git", "Remote already exists, skipping");
3069
3207
  return;
3070
3208
  }
3071
3209
  } catch (err) {
@@ -3088,8 +3226,8 @@ var GitManager = class _GitManager {
3088
3226
  }
3089
3227
  let hasCommits = false;
3090
3228
  try {
3091
- const log3 = await sourceGit.log(["-1"]);
3092
- hasCommits = log3.total > 0;
3229
+ const log4 = await sourceGit.log(["-1"]);
3230
+ hasCommits = log4.total > 0;
3093
3231
  } catch {
3094
3232
  hasCommits = false;
3095
3233
  }
@@ -3100,7 +3238,7 @@ var GitManager = class _GitManager {
3100
3238
  if (!branches.all.includes(options.baseBranch)) {
3101
3239
  throw new Error(`Cannot initialize local simulated remote: base branch '${options.baseBranch}' does not exist locally. Please checkout '${options.baseBranch}' first or provide an explicit remoteUrl.`);
3102
3240
  }
3103
- log.debug("git", "Creating bare remote repository");
3241
+ log2.debug("git", "Creating bare remote repository");
3104
3242
  await fs9.mkdir(path10.dirname(options.remotePath), { recursive: true });
3105
3243
  await simpleGit2().raw([
3106
3244
  "init",
@@ -3140,7 +3278,7 @@ var GitManager = class _GitManager {
3140
3278
  } catch {
3141
3279
  }
3142
3280
  }
3143
- log.debug("git", "Remote initialization complete");
3281
+ log2.debug("git", "Remote initialization complete");
3144
3282
  } finally {
3145
3283
  remoteInitLocks.delete(options.remotePath);
3146
3284
  }
@@ -3209,7 +3347,7 @@ var GitManager = class _GitManager {
3209
3347
  try {
3210
3348
  const stat = await fs9.stat(config.autoDetectRemotePath);
3211
3349
  if (stat.isDirectory()) {
3212
- log.debug("git", "Auto-detected local remote", {
3350
+ log2.debug("git", "Auto-detected local remote", {
3213
3351
  path: config.autoDetectRemotePath
3214
3352
  });
3215
3353
  return config.autoDetectRemotePath;
@@ -3262,7 +3400,7 @@ var GitManager = class _GitManager {
3262
3400
  try {
3263
3401
  const stat = await fs9.stat(gitPath);
3264
3402
  if (stat.isDirectory()) {
3265
- log.debug("git", "Removing corrupt .git directory", {
3403
+ log2.debug("git", "Removing corrupt .git directory", {
3266
3404
  workspacePath: options.workspacePath
3267
3405
  });
3268
3406
  await fs9.rm(gitPath, { recursive: true });
@@ -3300,7 +3438,7 @@ var GitManager = class _GitManager {
3300
3438
  await git.git.addConfig("canopycms.managed", "true");
3301
3439
  await git.git.addConfig("user.name", options.gitBotAuthorName);
3302
3440
  await git.git.addConfig("user.email", options.gitBotAuthorEmail);
3303
- log.debug("git", "Marked workspace as CanopyCMS-managed", {
3441
+ log2.debug("git", "Marked workspace as CanopyCMS-managed", {
3304
3442
  workspacePath: options.workspacePath
3305
3443
  });
3306
3444
  if (!justCloned) {
@@ -3463,13 +3601,13 @@ var GitManager = class _GitManager {
3463
3601
  }
3464
3602
  const lines = content.split("\n");
3465
3603
  if (lines.some((line) => line.trim() === pattern)) {
3466
- log.debug("git", "Pattern already in .git/info/exclude", { pattern });
3604
+ log2.debug("git", "Pattern already in .git/info/exclude", { pattern });
3467
3605
  return;
3468
3606
  }
3469
3607
  const needsLeadingNewline = content.length > 0 && !content.endsWith("\n");
3470
3608
  const newContent = content + (needsLeadingNewline ? "\n" : "") + pattern + "\n";
3471
3609
  await fs9.writeFile(excludePath, newContent, "utf-8");
3472
- log.debug("git", "Added pattern to .git/info/exclude", { pattern });
3610
+ log2.debug("git", "Added pattern to .git/info/exclude", { pattern });
3473
3611
  }
3474
3612
  /**
3475
3613
  * Create an orphan branch for settings (permissions/groups).
@@ -3483,10 +3621,10 @@ var GitManager = class _GitManager {
3483
3621
  * @param initialFiles - Files to commit to the new branch (e.g., { 'permissions.json': '{}', 'groups.json': '{}' })
3484
3622
  */
3485
3623
  async createOrphanSettingsBranch(branchName, initialFiles) {
3486
- log.debug("git", "Creating orphan settings branch", { branchName });
3624
+ log2.debug("git", "Creating orphan settings branch", { branchName });
3487
3625
  const branches = await this.git.branch();
3488
3626
  if (branches.all.includes(branchName)) {
3489
- log.debug("git", "Orphan branch already exists", { branchName });
3627
+ log2.debug("git", "Orphan branch already exists", { branchName });
3490
3628
  await this.git.checkout(branchName);
3491
3629
  return;
3492
3630
  }
@@ -3502,19 +3640,19 @@ var GitManager = class _GitManager {
3502
3640
  await this.git.add(filePath);
3503
3641
  }
3504
3642
  await this.git.commit("Initialize settings branch", ["--allow-empty"]);
3505
- log.debug("git", "Orphan settings branch created", { branchName });
3643
+ log2.debug("git", "Orphan settings branch created", { branchName });
3506
3644
  }
3507
3645
  };
3508
3646
 
3509
3647
  // dist/branch-workspace.js
3510
- var log2 = createDebugLogger({ prefix: "BranchWorkspace" });
3648
+ var log3 = createDebugLogger({ prefix: "BranchWorkspace" });
3511
3649
  var workspaceInitLocks = /* @__PURE__ */ new Map();
3512
3650
  var BranchWorkspaceManager = class {
3513
3651
  constructor(config) {
3514
3652
  this.config = config;
3515
3653
  }
3516
3654
  async ensureGitWorkspace(options) {
3517
- return log2.timed("workspace", "ensureGitWorkspace", async () => {
3655
+ return log3.timed("workspace", "ensureGitWorkspace", async () => {
3518
3656
  const existingLock = workspaceInitLocks.get(options.branchRoot);
3519
3657
  if (existingLock) {
3520
3658
  await existingLock;
@@ -3522,7 +3660,7 @@ var BranchWorkspaceManager = class {
3522
3660
  }
3523
3661
  const lockPromise = (async () => {
3524
3662
  try {
3525
- log2.debug("workspace", "Ensuring git workspace", {
3663
+ log3.debug("workspace", "Ensuring git workspace", {
3526
3664
  branchName: options.branchName,
3527
3665
  mode: options.mode
3528
3666
  });
@@ -3651,7 +3789,8 @@ async function generateAIContentFiles(options) {
3651
3789
  store,
3652
3790
  flatSchema,
3653
3791
  contentRoot: contentRootName,
3654
- config: aiConfig
3792
+ config: aiConfig,
3793
+ entryLinkUrl: config.entryLinkUrl
3655
3794
  });
3656
3795
  const absoluteOutputDir = path11.resolve(outputDir) + path11.sep;
3657
3796
  let fileCount = 0;
package/dist/cli/init.js CHANGED
@@ -234,7 +234,8 @@ var init_config = __esm({
234
234
  contentRoot: contentRootSchema.default("content"),
235
235
  sourceRoot: sourceRootSchema.optional(),
236
236
  editor: editorConfigSchema.optional(),
237
- authPlugin: z4.custom().optional()
237
+ authPlugin: z4.custom().optional(),
238
+ entryLinkUrl: z4.custom().optional()
238
239
  });
239
240
  DEFAULT_PROD_WORKSPACE = "/mnt/efs/workspace";
240
241
  }
package/dist/client.d.ts CHANGED
@@ -8,4 +8,6 @@ export * from './editor/theme';
8
8
  export * from './editor/editor-config';
9
9
  export * from './editor/CanopyEditor';
10
10
  export * from './editor/CanopyEditorPage';
11
+ export { EntryLinkContext, useEntryLinkContext } from './editor/fields/entry-link';
12
+ export type { EntryLinkOption, EntryLinkContextValue } from './editor/fields/entry-link';
11
13
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAClF,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
package/dist/client.js CHANGED
@@ -8,4 +8,5 @@ export * from './editor/theme.js';
8
8
  export * from './editor/editor-config.js';
9
9
  export * from './editor/CanopyEditor.js';
10
10
  export * from './editor/CanopyEditorPage.js';
11
+ export { EntryLinkContext, useEntryLinkContext } from './editor/fields/entry-link/index.js';
11
12
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/config/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAYjB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAA;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,qBAAqB;;+BASrD,gBAAgB,KAAG,kBAAkB;EAsBnE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,WAAW,oBAAoB,EAAE,KAAG,YA4E1E,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/config/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAYjB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAA;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,qBAAqB;;+BASrD,gBAAgB,KAAG,kBAAkB;EAwBnE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,WAAW,oBAAoB,EAAE,KAAG,YA4E1E,CAAA"}
@@ -29,13 +29,14 @@ export function defineCanopyConfig(config) {
29
29
  // Client config helper - extracts safe subset and merges overrides
30
30
  // Note: flatSchema is loaded dynamically by the editor via API (from .collection.json files)
31
31
  client: (clientOverrides) => {
32
- const { defaultBaseBranch, defaultActiveBranch, contentRoot, editor, mode } = validated;
32
+ const { defaultBaseBranch, defaultActiveBranch, contentRoot, editor, mode, entryLinkUrl } = validated;
33
33
  const clientConfig = {
34
34
  defaultBaseBranch,
35
35
  defaultActiveBranch,
36
36
  contentRoot,
37
37
  editor,
38
38
  mode,
39
+ entryLinkUrl,
39
40
  flatSchema: [], // Loaded dynamically by editor via API
40
41
  };
41
42
  // Merge client overrides (e.g., auth handlers from useClerkAuthConfig)
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/config/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAsBnD;;;;;;;;;;;;;;;;;;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