@vexblocks/cli 1.1.4 → 1.1.6

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 (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -618,7 +618,7 @@ function getOptionalEnvVars(packages) {
618
618
  }
619
619
  async function mergeSchemaFile(schemaPath, spinner) {
620
620
  const content = await fs4.readFile(schemaPath, "utf-8");
621
- if (content.includes('from "./schema.cms"')) {
621
+ if (content.includes('from "./cms/schema.cms"') || content.includes('from "./schema.cms"')) {
622
622
  spinner.text = "CMS schema already integrated";
623
623
  return;
624
624
  }
@@ -640,10 +640,10 @@ ${importStatement}` + newContent.slice(insertPosition);
640
640
  ${newContent}`;
641
641
  }
642
642
  }
643
- const hasSpread = /defineSchema\s*\(\s*\{[^}]*\.\.\.cmsSchemaExports/s.test(
643
+ const hasCmsSpread = /defineSchema\s*\(\s*\{[^}]*\.\.\.(cmsSchemaExports|cmsTablesWithoutUsers|cmsTables)/s.test(
644
644
  newContent
645
645
  );
646
- if (!hasSpread) {
646
+ if (!hasCmsSpread) {
647
647
  const defineSchemaRegex = /defineSchema\s*\(\s*\{(\s*)/;
648
648
  if (defineSchemaRegex.test(newContent)) {
649
649
  newContent = newContent.replace(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vexblocks/cli",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "CLI for adding VexBlocks Headless CMS to your Turborepo project",
5
5
  "keywords": [
6
6
  "cms",