@cmssy/cli 19.26.0 → 19.26.2

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.
@@ -1,5 +1,15 @@
1
1
  import { defineCmssyConfig, defineCmssyLayout } from "@cmssy/astro";
2
2
 
3
+ if (import.meta.env.DEV) loadLocalEnv();
4
+
5
+ function loadLocalEnv() {
6
+ try {
7
+ process.loadEnvFile?.(".env.local");
8
+ } catch (error) {
9
+ if ((error as { code?: string }).code !== "ENOENT") throw error;
10
+ }
11
+ }
12
+
3
13
  export const layout = defineCmssyLayout({
4
14
  regions: [
5
15
  { id: "header", label: "Header" },
@@ -41,8 +41,8 @@ const layoutSlot = {
41
41
  config: cmssy,
42
42
  };
43
43
  const [header, footer] = await Promise.all([
44
- resolveEditorLayoutBlockData({ ...layoutSlot, position: "header" }),
45
- resolveEditorLayoutBlockData({ ...layoutSlot, position: "footer" }),
44
+ resolveEditorLayoutBlockData({ ...layoutSlot, region: "header" }),
45
+ resolveEditorLayoutBlockData({ ...layoutSlot, region: "footer" }),
46
46
  ]);
47
47
  ---
48
48
 
@@ -54,7 +54,7 @@ const [header, footer] = await Promise.all([
54
54
  <body>
55
55
  <LayoutSlot
56
56
  groups={layouts}
57
- position="header"
57
+ region="header"
58
58
  page={pageContext}
59
59
  locale={locale}
60
60
  defaultLocale={defaultLocale}
@@ -78,7 +78,7 @@ const [header, footer] = await Promise.all([
78
78
  }
79
79
  <LayoutSlot
80
80
  groups={layouts}
81
- position="footer"
81
+ region="footer"
82
82
  page={pageContext}
83
83
  locale={locale}
84
84
  defaultLocale={defaultLocale}
@@ -29,7 +29,7 @@ const editorOrigin = resolveEditorOrigin(cmssy.editorOrigin);
29
29
  <LayoutSlot
30
30
  client:load
31
31
  groups={layouts}
32
- position="header"
32
+ region="header"
33
33
  page={pageContext}
34
34
  locale={locale}
35
35
  defaultLocale={defaultLocale}
@@ -49,7 +49,7 @@ const editorOrigin = resolveEditorOrigin(cmssy.editorOrigin);
49
49
  <LayoutSlot
50
50
  client:load
51
51
  groups={layouts}
52
- position="footer"
52
+ region="footer"
53
53
  page={pageContext}
54
54
  locale={locale}
55
55
  defaultLocale={defaultLocale}
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { dirname, join as join2, resolve } from "path";
11
11
  var DEFAULT_ADMIN_API_URL = "https://api.cmssy.io/graphql";
12
12
  var BAD_TOKEN_HINT = {
13
13
  message: "the cmssy API rejected the token",
14
- fix: "create an API token in the cmssy dashboard (Settings \u2192 API Tokens) and pass it via --token or CMSSY_API_TOKEN"
14
+ fix: "create an API token under API Tokens in the cmssy dashboard sidebar and pass it via --token or CMSSY_API_TOKEN"
15
15
  };
16
16
  var NEEDS_MANIFEST_WRITE_HINT = {
17
17
  message: "the token's user cannot write this workspace's block manifest",
@@ -1686,7 +1686,7 @@ function resolveToken(options, env) {
1686
1686
  if (!token) {
1687
1687
  throw new CliError(
1688
1688
  "no API token given",
1689
- "create an API token in the cmssy dashboard (Settings \u2192 API Tokens) and set CMSSY_API_TOKEN in the deploy environment, or pass --token cs_..."
1689
+ "create an API token under API Tokens in the cmssy dashboard sidebar and set CMSSY_API_TOKEN in the deploy environment, or pass --token cs_..."
1690
1690
  );
1691
1691
  }
1692
1692
  return token;
@@ -1934,7 +1934,7 @@ function resolveToken2(options, deps) {
1934
1934
  if (!token) {
1935
1935
  throw new CliError(
1936
1936
  "no API token given",
1937
- "create an API token in the cmssy dashboard (Settings \u2192 API Tokens), then run cmssy link --token cs_... or set CMSSY_API_TOKEN"
1937
+ "create an API token under API Tokens in the cmssy dashboard sidebar, then run cmssy link --token cs_... or set CMSSY_API_TOKEN"
1938
1938
  );
1939
1939
  }
1940
1940
  return token;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/cli",
3
- "version": "19.26.0",
3
+ "version": "19.26.2",
4
4
  "description": "The cmssy CLI: `cmssy init` wires cmssy into an existing Next.js, Astro or React Router app; `cmssy link` connects it to a workspace and verifies the editor wiring.",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "esbuild": "^0.27.7",
31
- "@cmssy/core": "19.26.0"
31
+ "@cmssy/core": "19.26.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^20.0.0",