@laioutr/app-hygraph 1.10.0 → 1.10.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/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laioutr/app-hygraph",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "configKey": "@laioutr/app-hygraph",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
package/dist/module.mjs CHANGED
@@ -3,7 +3,7 @@ import { defu } from 'defu';
3
3
  import { registerLaioutrApp } from '@laioutr-core/kit';
4
4
 
5
5
  const name = "@laioutr/app-hygraph";
6
- const version = "1.10.0";
6
+ const version = "1.10.1";
7
7
 
8
8
  const module = defineNuxtModule({
9
9
  meta: {
@@ -22,7 +22,9 @@ export default defineMediaLibraryProvider({
22
22
  );
23
23
  return {
24
24
  items,
25
- total: 0,
25
+ // The picker pages by offset and stops as soon as it has seen `total` items, so a wrong count
26
+ // here costs the tail of the library: at 0 it never asks for a second page.
27
+ total: result.data.assetsConnection.aggregate.count,
26
28
  offset,
27
29
  limit
28
30
  };
@@ -1,11 +1 @@
1
- export declare const defineHygraph: import("@laioutr-core/orchestr/types").OrchestrBuilder<import("@laioutr-core/orchestr/types").ArgsWithMiddleware<import("@laioutr-core/orchestr/types").ArgsWithMeta<import("@laioutr-core/orchestr/types").OrchestrArgsBase<Record<string, any> | undefined>, {
2
- app: string;
3
- logoUrl: string;
4
- label: string;
5
- }>, {
6
- context: {
7
- hygraph: {
8
- request: <TData = unknown>(query: string, variables?: unknown) => Promise<import("../../index.js").HygraphResponse<TData>>;
9
- };
10
- };
11
- }>>;
1
+ export declare const defineHygraph: any;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1 +1 @@
1
- export declare const MEDIA_LIBRARY_LIST_QUERY = "\n #graphql\n \n #graphql\n fragment Asset on Asset {\n url\n fileName\n mimeType\n width\n height\n handle\n }\n\n query MediaLibraryList($skip: Int, $first: Int, $where: AssetWhereInput, $stage: Stage = PUBLISHED) {\n assets(skip: $skip, first: $first, orderBy: createdAt_DESC, where: $where, stage: $stage) {\n ...Asset\n }\n }\n";
1
+ export declare const MEDIA_LIBRARY_LIST_QUERY = "\n #graphql\n \n #graphql\n fragment Asset on Asset {\n url\n fileName\n mimeType\n width\n height\n handle\n }\n\n query MediaLibraryList($skip: Int, $first: Int, $where: AssetWhereInput, $stage: Stage = PUBLISHED) {\n assets(skip: $skip, first: $first, orderBy: createdAt_DESC, where: $where, stage: $stage) {\n ...Asset\n }\n assetsConnection(where: $where, stage: $stage) {\n aggregate {\n count\n }\n }\n }\n";
@@ -8,6 +8,11 @@ export const MEDIA_LIBRARY_LIST_QUERY = (
8
8
  assets(skip: $skip, first: $first, orderBy: createdAt_DESC, where: $where, stage: $stage) {
9
9
  ...Asset
10
10
  }
11
+ assetsConnection(where: $where, stage: $stage) {
12
+ aggregate {
13
+ count
14
+ }
15
+ }
11
16
  }
12
17
  `
13
18
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laioutr/app-hygraph",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "Laioutr Hygraph App",
5
5
  "repository": "your-org/@laioutr/app-hygraph",
6
6
  "license": "MIT",
@@ -43,6 +43,17 @@
43
43
  "files": [
44
44
  "dist"
45
45
  ],
46
+ "scripts": {
47
+ "dev": "npm run dev:prepare && nuxi dev playground",
48
+ "dev:build": "nuxi build playground",
49
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
50
+ "lint": "eslint .",
51
+ "prepack": "nuxt-module-build build",
52
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish --access public && git push --follow-tags",
53
+ "test": "vitest run",
54
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
55
+ "test:watch": "vitest watch"
56
+ },
46
57
  "dependencies": {
47
58
  "@nuxt/kit": "3.16.2",
48
59
  "zod": "3.25.61"
@@ -70,6 +81,7 @@
70
81
  "nuxt": "3.16.2",
71
82
  "pinia": "3.0.2",
72
83
  "typescript": "5.9.2",
84
+ "unbuild": "^3.6.1",
73
85
  "vitest": "3.1.1",
74
86
  "vue-tsc": "2.2.10"
75
87
  },
@@ -92,15 +104,5 @@
92
104
  "engines": {
93
105
  "node": ">=22.12.0",
94
106
  "pnpm": ">=10.15.0"
95
- },
96
- "scripts": {
97
- "dev": "npm run dev:prepare && nuxi dev playground",
98
- "dev:build": "nuxi build playground",
99
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
100
- "lint": "eslint .",
101
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish --access public && git push --follow-tags",
102
- "test": "vitest run",
103
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
104
- "test:watch": "vitest watch"
105
107
  }
106
- }
108
+ }