@conloca/content-api 0.2.1 → 0.2.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.
Files changed (76) hide show
  1. package/dist/.build-inputs.json +71 -0
  2. package/dist/address-site.d.ts +6 -0
  3. package/dist/address-site.d.ts.map +1 -0
  4. package/dist/address-site.js +15 -0
  5. package/dist/address-site.js.map +1 -0
  6. package/dist/asset-operations.d.ts +15 -2
  7. package/dist/asset-operations.d.ts.map +1 -1
  8. package/dist/asset-operations.js +216 -78
  9. package/dist/asset-operations.js.map +1 -1
  10. package/dist/cf-access.d.ts +4 -2
  11. package/dist/cf-access.d.ts.map +1 -1
  12. package/dist/cf-access.js +29 -13
  13. package/dist/cf-access.js.map +1 -1
  14. package/dist/content-file-id.d.ts +9 -0
  15. package/dist/content-file-id.d.ts.map +1 -0
  16. package/dist/content-file-id.js +33 -0
  17. package/dist/content-file-id.js.map +1 -0
  18. package/dist/content-utils.d.ts +4 -1
  19. package/dist/content-utils.d.ts.map +1 -1
  20. package/dist/content-utils.js +14 -1
  21. package/dist/content-utils.js.map +1 -1
  22. package/dist/editor-host.d.ts +121 -0
  23. package/dist/editor-host.d.ts.map +1 -0
  24. package/dist/editor-host.js +212 -0
  25. package/dist/editor-host.js.map +1 -0
  26. package/dist/filesystem-content-api.d.ts.map +1 -1
  27. package/dist/filesystem-content-api.js +3 -2
  28. package/dist/filesystem-content-api.js.map +1 -1
  29. package/dist/git-operations.d.ts.map +1 -1
  30. package/dist/git-operations.js +162 -34
  31. package/dist/git-operations.js.map +1 -1
  32. package/dist/index.d.ts +2 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/middleware.d.ts.map +1 -1
  37. package/dist/middleware.js +5 -0
  38. package/dist/middleware.js.map +1 -1
  39. package/dist/schemas/index.d.ts +9 -97
  40. package/dist/schemas/index.d.ts.map +1 -1
  41. package/dist/schemas/index.js +8 -83
  42. package/dist/schemas/index.js.map +1 -1
  43. package/dist/schemas/normalize.d.ts +101 -0
  44. package/dist/schemas/normalize.d.ts.map +1 -0
  45. package/dist/schemas/normalize.js +168 -0
  46. package/dist/schemas/normalize.js.map +1 -0
  47. package/dist/schemas/types.d.ts +135 -0
  48. package/dist/schemas/types.d.ts.map +1 -0
  49. package/dist/schemas/types.js +17 -0
  50. package/dist/schemas/types.js.map +1 -0
  51. package/dist/schemas/validators.d.ts +46 -0
  52. package/dist/schemas/validators.d.ts.map +1 -0
  53. package/dist/schemas/validators.js +938 -0
  54. package/dist/schemas/validators.js.map +1 -0
  55. package/dist/site.d.ts.map +1 -1
  56. package/dist/site.js +3 -1
  57. package/dist/site.js.map +1 -1
  58. package/dist/types.d.ts +9 -0
  59. package/dist/types.d.ts.map +1 -1
  60. package/package.json +17 -5
  61. package/src/address-site.ts +19 -0
  62. package/src/asset-operations.ts +256 -83
  63. package/src/cf-access.ts +30 -14
  64. package/src/content-file-id.ts +31 -0
  65. package/src/content-utils.ts +18 -2
  66. package/src/editor-host.ts +268 -0
  67. package/src/filesystem-content-api.ts +3 -2
  68. package/src/git-operations.ts +188 -41
  69. package/src/index.ts +19 -1
  70. package/src/middleware.ts +5 -0
  71. package/src/schemas/index.ts +34 -108
  72. package/src/schemas/normalize.ts +194 -0
  73. package/src/schemas/types.ts +154 -0
  74. package/src/schemas/validators.ts +176 -0
  75. package/src/site.ts +3 -1
  76. package/src/types.ts +9 -0
package/src/types.ts CHANGED
@@ -178,6 +178,13 @@ export interface LocaleVersion extends LocalePathData {
178
178
  modified: string;
179
179
  publishAt?: string;
180
180
  unpublishAt?: string;
181
+ /**
182
+ * Set to true when this locale has never been published: it exists only as
183
+ * saved editing work, not on the branch the site is built from. Absent when
184
+ * published, and absent on backends that keep no such state, where a saved
185
+ * file is the published content.
186
+ */
187
+ unpublished?: true;
181
188
  previousPathnames?: Record<string, string>; // pages only
182
189
  meta: ContentMeta; // title, description, seo, etc.
183
190
  /**
@@ -377,6 +384,8 @@ export interface SitesConfig {
377
384
  domains?: {
378
385
  [locale: string]: string;
379
386
  };
387
+ /** Path the site is served under, as Astro's `base`: starts and ends with `/`; default `/`. */
388
+ base?: string;
380
389
  /**
381
390
  * Optional filesystem path for this site's mdx-type pages.
382
391
  * When set, .mdx files under this path are surfaced in the CMS