@cmssy/cli 19.1.1 → 19.2.0

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,7 +1,16 @@
1
- import { createCmssyClient } from "@cmssy/core";
1
+ import { createCmssyClient, typedOperation } from "@cmssy/core";
2
2
  import { cmssy } from "@/cmssy.config";
3
3
 
4
- const PUBLISHED_PAGES = `query PublishedPages($workspaceSlug: String!) {
4
+ type PublishedPages = {
5
+ public?: {
6
+ page?: { list?: { slug?: string | null; publishedAt?: string | null }[] | null } | null;
7
+ } | null;
8
+ };
9
+
10
+ const PUBLISHED_PAGES = typedOperation<
11
+ PublishedPages,
12
+ { workspaceSlug: string }
13
+ >(`query PublishedPages($workspaceSlug: String!) {
5
14
  public {
6
15
  page {
7
16
  list(workspaceSlug: $workspaceSlug) {
@@ -10,13 +19,7 @@ const PUBLISHED_PAGES = `query PublishedPages($workspaceSlug: String!) {
10
19
  }
11
20
  }
12
21
  }
13
- }`;
14
-
15
- type PublishedPages = {
16
- public?: {
17
- page?: { list?: { slug?: string | null; publishedAt?: string | null }[] | null } | null;
18
- } | null;
19
- };
22
+ }`);
20
23
 
21
24
  const client = createCmssyClient({
22
25
  apiUrl: cmssy.apiUrl,
@@ -25,7 +28,7 @@ const client = createCmssyClient({
25
28
  });
26
29
 
27
30
  export async function publishedPaths(): Promise<{ path: string[] }[]> {
28
- const data = await client.query<PublishedPages>(
31
+ const data = await client.query(
29
32
  PUBLISHED_PAGES,
30
33
  { workspaceSlug: cmssy.workspaceSlug },
31
34
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/cli",
3
- "version": "19.1.1",
3
+ "version": "19.2.0",
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.1.1"
31
+ "@cmssy/core": "19.2.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^20.0.0",