@seamlet/astro 0.11.0 → 0.11.1

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/README.md CHANGED
@@ -29,7 +29,7 @@ npx astro add @seamlet/astro node # the integration, and an ad
29
29
  }
30
30
  ```
31
31
 
32
- The environment variable `CMS_ORIGIN` takes the place of `cms` when it is set: a build for a CMS in development, or the CMS's own builder. A build without the file, or with a field it cannot read, stops and says which field to fix.
32
+ The environment variable `CMS_ORIGIN` takes the place of `cms` when it is set and not empty: a build for a CMS in development, or the CMS's own builder. A build without the file, or with a field it cannot read, stops and says which field to fix.
33
33
 
34
34
  3. Describe the content with a schema, and mark the elements that show it:
35
35
 
package/dist/index.js CHANGED
@@ -67,7 +67,8 @@ var FIELD_RULES = {
67
67
  async function loadSiteConfig(root, cmsOverride) {
68
68
  const file = new URL(SITE_CONFIG_FILE, root);
69
69
  const parsed = await readJsonFile(file);
70
- const input = cmsOverride === void 0 ? parsed : { ...asObject(parsed), cms: cmsOverride };
70
+ const isOverridden = cmsOverride !== void 0 && cmsOverride !== "";
71
+ const input = isOverridden ? { ...asObject(parsed), cms: cmsOverride } : parsed;
71
72
  const reading = readSiteConfig(input);
72
73
  if (reading.status === "read") return reading.config;
73
74
  throw new Error(invalidFieldsMessage(file, reading.invalidFields));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamlet/astro",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Connects an Astro site to the Seamlet CMS: the schema of its content, the preview the editor frames, and its published content.",
5
5
  "license": "MIT",
6
6
  "type": "module",