@baeta/plugin-pagination 1.0.9 → 2.0.0-next.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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // index.ts
2
- import { createPluginV1, getModuleGetName, getModuleVariableName } from "@baeta/generator-sdk";
2
+ import { createPluginV1, getModuleExportName } from "@baeta/generator-sdk";
3
3
  import { join, parse } from "@baeta/util-path";
4
4
  function printFields(fields) {
5
5
  return fields.map((field) => ` ${field}`).join("\n");
@@ -20,15 +20,53 @@ function printPageInfo(addFields = []) {
20
20
  "hasNextPage: Boolean!"
21
21
  ]);
22
22
  }
23
- function printExport(moduleDefinitionName, moduleName, importExt = "") {
24
- const parsed = parse(moduleDefinitionName);
25
- const method = getModuleGetName(moduleName);
26
- const importName = parsed.ext === ".ts" ? parsed.name : moduleDefinitionName;
27
- return `import { ${method} } from "./${importName}${importExt}";
23
+ function printResolversForType(module, type, fields) {
24
+ return `${type}: ${module}.${type}.$fields({
25
+ ${fields.map((field) => printResolverForField(module, type, field)).map(indent(4)).join(",\n")}
26
+ })`;
27
+ }
28
+ function printResolverForField(module, type, field) {
29
+ return `${field}: ${module}.${type}.${field}.key('${field}').undefinedAsNull()`;
30
+ }
31
+ function getFieldNameFromFieldWithType(field) {
32
+ const [fieldName] = field.split(":");
33
+ return fieldName;
34
+ }
35
+ function printExport(moduleDefinitionName, moduleName, importExt, options) {
36
+ const module = getModuleExportName(moduleName);
37
+ const typedef = parse(moduleDefinitionName).name + importExt;
38
+ const pageInfoResolver = printResolversForType(module, "PageInfo", [
39
+ "hasNextPage",
40
+ "hasPreviousPage",
41
+ ...options.pageInfoFields?.map(getFieldNameFromFieldWithType) ?? []
42
+ ]);
43
+ const typesResolvers = Object.entries(options.types).flatMap(([type, typeOptions]) => {
44
+ if (typeOptions == null || typeOptions === false) {
45
+ return [];
46
+ }
47
+ const extraEdgeFields = (typeOptions === true ? [] : typeOptions.edgeFields ?? []).map(
48
+ getFieldNameFromFieldWithType
49
+ );
50
+ const extraConnectionFields = (typeOptions === true ? [] : typeOptions.connectionFields ?? []).map(getFieldNameFromFieldWithType);
51
+ return [
52
+ printResolversForType(module, `${type}Connection`, [
53
+ "pageInfo",
54
+ "edges",
55
+ ...extraConnectionFields
56
+ ]),
57
+ printResolversForType(module, `${type}Edge`, ["cursor", "node", ...extraEdgeFields])
58
+ ];
59
+ });
60
+ return `import { ${module} } from "./${typedef}";
28
61
 
29
- export const ${getModuleVariableName(moduleName)} = ${method}();
62
+ export default ${module}.$schema({
63
+ ${[pageInfoResolver, ...typesResolvers].map(indent(4)).join(",\n")}
64
+ });
30
65
  `;
31
66
  }
67
+ function indent(size) {
68
+ return (text) => text.split("\n").map((line) => " ".repeat(size) + line).join("\n");
69
+ }
32
70
  function printConnectionTypes(name, typeOptions, options) {
33
71
  const {
34
72
  cursorType = "ID!",
@@ -69,7 +107,7 @@ function paginationPlugin(options) {
69
107
  const types = [printPageInfo(options.pageInfoFields)];
70
108
  for (const name in options.types) {
71
109
  const typeOptions = options.types[name];
72
- if (typeOptions === false) {
110
+ if (typeOptions == null || typeOptions === false) {
73
111
  continue;
74
112
  }
75
113
  const connectionTypes = printConnectionTypes(
@@ -87,15 +125,13 @@ function paginationPlugin(options) {
87
125
  );
88
126
  await definitionFile.write();
89
127
  ctx.fileManager.add(definitionFile);
90
- if (options.createExport === false) {
91
- return next();
92
- }
93
128
  ctx.fileManager.createAndAdd(
94
129
  createExportFilename(moduleDir),
95
130
  printExport(
96
131
  ctx.generatorOptions.moduleDefinitionName,
97
132
  moduleName,
98
- ctx.generatorOptions.importExtension
133
+ ctx.generatorOptions.importExtension,
134
+ options
99
135
  ),
100
136
  "pagination"
101
137
  );
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../index.ts"],"sourcesContent":["import { createPluginV1, getModuleGetName, getModuleVariableName } from '@baeta/generator-sdk';\nimport { join, parse } from '@baeta/util-path';\n\n/**\n * Configuration options for a specific pagination type\n */\nexport interface PaginationTypeOptions {\n\t/** The GraphQL type for nodes (e.g., \"User!\") */\n\tnodeType?: string;\n\t/** The GraphQL type for cursors\n\t * @defaultValue \"ID!\"\n\t */\n\tcursorType?: string;\n\t/**\n\t * Additional fields to add to the edge type\n\t * @example edgeFields: [\"hasPhotos: Boolean!\"]\n\t */\n\tedgeFields?: string[];\n\t/**\n\t * Additional fields to add to the connection type\n\t * @example connectionFields: [\"totalCount: Int!\"]\n\t */\n\tconnectionFields?: string[];\n}\n\n/**\n * Configuration options for the pagination plugin\n */\nexport interface PaginationOptions {\n\t/**\n\t * Map of type names to their pagination configuration.\n\t * @example\n\t * ```typescript\n\t * {\n\t * // Simple configuration\n\t * User: true,\n\t *\n\t * // Advanced configuration\n\t * UserCustom: {\n\t * nodeType: \"User\",\n\t * cursorType: \"UUID!\",\n\t * connectionFields: [\"totalCount: Int!\"],\n\t * edgeFields: [\"hasPhotos: Boolean!\"]\n\t * }\n\t * }\n\t * ```\n\t */\n\ttypes: Record<string, boolean | PaginationTypeOptions>;\n\t/**\n\t * Whether the node field should be nullable in all connections\n\t * @defaultValue true\n\t */\n\tnullableNode?: boolean;\n\t/**\n\t * Additional fields to add to the PageInfo type\n\t * @example [\"hasMorePages: Boolean!\"]\n\t */\n\tpageInfoFields?: string[];\n\t/** Whether to create an export file */\n\tcreateExport?: boolean;\n\t/**\n\t * Custom name for the pagination module\n\t * @defaultValue 'baeta-pagination'\n\t */\n\tmoduleName?: string;\n}\n\nfunction printFields(fields: string[]) {\n\treturn fields.map((field) => ` ${field}`).join('\\n');\n}\n\nfunction printType(name: string, fields: string[]) {\n\treturn `type ${name} {\n${printFields(fields)}\n}`;\n}\n\nfunction printTypes(types: string[]) {\n\treturn `${types.join('\\n\\n')}\\n`;\n}\n\nfunction printPageInfo(addFields: string[] = []) {\n\treturn printType('PageInfo', [\n\t\t...addFields,\n\t\t'hasPreviousPage: Boolean!',\n\t\t'hasNextPage: Boolean!',\n\t]);\n}\n\nfunction printExport(moduleDefinitionName: string, moduleName: string, importExt = '') {\n\tconst parsed = parse(moduleDefinitionName);\n\tconst method = getModuleGetName(moduleName);\n\tconst importName = parsed.ext === '.ts' ? parsed.name : moduleDefinitionName;\n\n\treturn `import { ${method} } from \"./${importName}${importExt}\";\n\nexport const ${getModuleVariableName(moduleName)} = ${method}();\n`;\n}\n\nfunction printConnectionTypes(\n\tname: string,\n\ttypeOptions: PaginationTypeOptions,\n\toptions: PaginationOptions,\n) {\n\tconst {\n\t\tcursorType = 'ID!',\n\t\tnodeType = name,\n\t\tconnectionFields = [],\n\t\tedgeFields = [],\n\t} = typeOptions;\n\n\tconst connection = printType(`${name}Connection`, [\n\t\t...connectionFields,\n\t\t'pageInfo: PageInfo!',\n\t\t`edges: [${name}Edge]`,\n\t]);\n\n\tconst edge = printType(`${name}Edge`, [\n\t\t...edgeFields,\n\t\t`cursor: ${cursorType}`,\n\t\t`node: ${nodeType}${options.nullableNode === false ? '!' : ''}`,\n\t]);\n\n\treturn [connection, edge];\n}\n\nfunction createConnectionModuleDir(modulesDir: string, moduleName: string) {\n\treturn join(modulesDir, moduleName);\n}\n\nfunction createGqlFilename(moduleDir: string) {\n\treturn `${moduleDir}/connections.gql`;\n}\n\nfunction createExportFilename(moduleDir: string) {\n\treturn `${moduleDir}/index.ts`;\n}\n\n/**\n * A plugin that generates Relay-style pagination types for GraphQL.\n * See https://baeta.io/docs/plugins/pagination for more details\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function paginationPlugin(options: PaginationOptions) {\n\tconst { moduleName = 'baeta-pagination' } = options;\n\n\treturn createPluginV1({\n\t\tname: 'pagination',\n\t\tactionName: 'pagination connections',\n\t\twatch: (generatorOptions, watcher) => {\n\t\t\twatcher.ignore(`${createConnectionModuleDir(generatorOptions.modulesDir, moduleName)}/**`);\n\t\t},\n\t\tgenerate: async (ctx, next) => {\n\t\t\tconst types: string[] = [printPageInfo(options.pageInfoFields)];\n\n\t\t\tfor (const name in options.types) {\n\t\t\t\tconst typeOptions = options.types[name];\n\n\t\t\t\tif (typeOptions === false) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst connectionTypes = printConnectionTypes(\n\t\t\t\t\tname,\n\t\t\t\t\ttypeOptions === true ? {} : typeOptions,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\ttypes.push(...connectionTypes);\n\t\t\t}\n\n\t\t\tconst moduleDir = createConnectionModuleDir(ctx.generatorOptions.modulesDir, moduleName);\n\n\t\t\tconst definitionFile = ctx.fileManager.createAndAdd(\n\t\t\t\tcreateGqlFilename(moduleDir),\n\t\t\t\tprintTypes(types),\n\t\t\t\t'pagination',\n\t\t\t);\n\t\t\tawait definitionFile.write();\n\n\t\t\tctx.fileManager.add(definitionFile);\n\n\t\t\tif (options.createExport === false) {\n\t\t\t\treturn next();\n\t\t\t}\n\n\t\t\tctx.fileManager.createAndAdd(\n\t\t\t\tcreateExportFilename(moduleDir),\n\t\t\t\tprintExport(\n\t\t\t\t\tctx.generatorOptions.moduleDefinitionName,\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tctx.generatorOptions.importExtension,\n\t\t\t\t),\n\t\t\t\t'pagination',\n\t\t\t);\n\n\t\t\treturn next();\n\t\t},\n\t});\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,kBAAkB,6BAA6B;AACxE,SAAS,MAAM,aAAa;AAkE5B,SAAS,YAAY,QAAkB;AACtC,SAAO,OAAO,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,EAAE,KAAK,IAAI;AACrD;AAEA,SAAS,UAAU,MAAc,QAAkB;AAClD,SAAO,QAAQ,IAAI;AAAA,EAClB,YAAY,MAAM,CAAC;AAAA;AAErB;AAEA,SAAS,WAAW,OAAiB;AACpC,SAAO,GAAG,MAAM,KAAK,MAAM,CAAC;AAAA;AAC7B;AAEA,SAAS,cAAc,YAAsB,CAAC,GAAG;AAChD,SAAO,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C1F;AAAA,IACA,UAAU,OAAO,KAAK,SAAS;AAC9B,YAAM,QAAkB,CAAC,cAAc,QAAQ,cAAc,CAAC;AAE9D,iBAAW,QAAQ,QAAQ,OAAO;AACjC,cAAM,cAAc,QAAQ,MAAM,IAAI;AAEtC,YAAI,gBAAgB,OAAO;AAC1B;AAAA,QACD;AAEA,cAAM,kBAAkB;AAAA,UACvB;AAAA,UACA,gBAAgB,OAAO,CAAC,IAAI;AAAA,UAC5B;AAAA,QACD;AAEA,cAAM,KAAK,GAAG,eAAe;AAAA,MAC9B;AAEA,YAAM,YAAY,0BAA0B,IAAI,iBAAiB,YAAY,UAAU;AAEvF,YAAM,iBAAiB,IAAI,YAAY;AAAA,QACtC,kBAAkB,SAAS;AAAA,QAC3B,WAAW,KAAK;AAAA,QAChB;AAAA,MACD;AACA,YAAM,eAAe,MAAM;AAE3B,UAAI,YAAY,IAAI,cAAc;AAElC,UAAI,QAAQ,iBAAiB,OAAO;AACnC,eAAO,KAAK;AAAA,MACb;AAEA,UAAI,YAAY;AAAA,QACf,qBAAqB,SAAS;AAAA,QAC9B;AAAA,UACC,IAAI,iBAAiB;AAAA,UACrB;AAAA,UACA,IAAI,iBAAiB;AAAA,QACtB;AAAA,QACA;AAAA,MACD;AAEA,aAAO,KAAK;AAAA,IACb;AAAA,EACD,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../index.ts"],"sourcesContent":["import { createPluginV1, getModuleExportName } from '@baeta/generator-sdk';\nimport { join, parse } from '@baeta/util-path';\n\n/**\n * Configuration options for a specific pagination type\n */\nexport interface PaginationTypeOptions {\n\t/** The GraphQL type for nodes (e.g., \"User!\") */\n\tnodeType?: string;\n\t/** The GraphQL type for cursors\n\t * @defaultValue \"ID!\"\n\t */\n\tcursorType?: string;\n\t/**\n\t * Additional fields to add to the edge type\n\t * @example edgeFields: [\"hasPhotos: Boolean!\"]\n\t */\n\tedgeFields?: string[];\n\t/**\n\t * Additional fields to add to the connection type\n\t * @example connectionFields: [\"totalCount: Int!\"]\n\t */\n\tconnectionFields?: string[];\n}\n\n/**\n * Configuration options for the pagination plugin\n */\nexport interface PaginationOptions<Keys extends string | number | symbol = string> {\n\t/**\n\t * Map of type names to their pagination configuration.\n\t * @example\n\t * ```typescript\n\t * {\n\t * // Simple configuration\n\t * User: true,\n\t *\n\t * // Advanced configuration\n\t * UserCustom: {\n\t * nodeType: \"User\",\n\t * cursorType: \"UUID!\",\n\t * connectionFields: [\"totalCount: Int!\"],\n\t * edgeFields: [\"hasPhotos: Boolean!\"]\n\t * }\n\t * }\n\t * ```\n\t */\n\ttypes: {\n\t\t[key in Keys]?: boolean | PaginationTypeOptions;\n\t};\n\t/**\n\t * Whether the node field should be nullable in all connections\n\t * @defaultValue true\n\t */\n\tnullableNode?: boolean;\n\t/**\n\t * Additional fields to add to the PageInfo type\n\t * @example [\"hasMorePages: Boolean!\"]\n\t */\n\tpageInfoFields?: string[];\n\t/**\n\t * Custom name for the pagination module\n\t * @defaultValue 'baeta-pagination'\n\t */\n\tmoduleName?: string;\n}\n\nfunction printFields(fields: string[]) {\n\treturn fields.map((field) => ` ${field}`).join('\\n');\n}\n\nfunction printType(name: string, fields: string[]) {\n\treturn `type ${name} {\n${printFields(fields)}\n}`;\n}\n\nfunction printTypes(types: string[]) {\n\treturn `${types.join('\\n\\n')}\\n`;\n}\n\nfunction printPageInfo(addFields: string[] = []) {\n\treturn printType('PageInfo', [\n\t\t...addFields,\n\t\t'hasPreviousPage: Boolean!',\n\t\t'hasNextPage: Boolean!',\n\t]);\n}\n\nfunction printResolversForType(module: string, type: string, fields: string[]) {\n\treturn `${type}: ${module}.${type}.$fields({\n${fields\n\t.map((field) => printResolverForField(module, type, field))\n\t.map(indent(4))\n\t.join(',\\n')}\n})`;\n}\n\nfunction printResolverForField(module: string, type: string, field: string) {\n\treturn `${field}: ${module}.${type}.${field}.key('${field}').undefinedAsNull()`;\n}\n\nfunction getFieldNameFromFieldWithType(field: string) {\n\tconst [fieldName] = field.split(':');\n\treturn fieldName;\n}\n\nfunction printExport(\n\tmoduleDefinitionName: string,\n\tmoduleName: string,\n\timportExt: string,\n\toptions: PaginationOptions,\n) {\n\tconst module = getModuleExportName(moduleName);\n\tconst typedef = parse(moduleDefinitionName).name + importExt;\n\n\tconst pageInfoResolver = printResolversForType(module, 'PageInfo', [\n\t\t'hasNextPage',\n\t\t'hasPreviousPage',\n\t\t...(options.pageInfoFields?.map(getFieldNameFromFieldWithType) ?? []),\n\t]);\n\n\tconst typesResolvers = Object.entries(options.types).flatMap(([type, typeOptions]) => {\n\t\tif (typeOptions == null || typeOptions === false) {\n\t\t\treturn [];\n\t\t}\n\t\tconst extraEdgeFields = (typeOptions === true ? [] : (typeOptions.edgeFields ?? [])).map(\n\t\t\tgetFieldNameFromFieldWithType,\n\t\t);\n\t\tconst extraConnectionFields = (\n\t\t\ttypeOptions === true ? [] : (typeOptions.connectionFields ?? [])\n\t\t).map(getFieldNameFromFieldWithType);\n\t\treturn [\n\t\t\tprintResolversForType(module, `${type}Connection`, [\n\t\t\t\t'pageInfo',\n\t\t\t\t'edges',\n\t\t\t\t...extraConnectionFields,\n\t\t\t]),\n\t\t\tprintResolversForType(module, `${type}Edge`, ['cursor', 'node', ...extraEdgeFields]),\n\t\t];\n\t});\n\n\treturn `import { ${module} } from \"./${typedef}\";\n\nexport default ${module}.$schema({\n${[pageInfoResolver, ...typesResolvers].map(indent(4)).join(',\\n')}\n});\n`;\n}\n\nfunction indent(size: number) {\n\treturn (text: string) =>\n\t\ttext\n\t\t\t.split('\\n')\n\t\t\t.map((line) => ' '.repeat(size) + line)\n\t\t\t.join('\\n');\n}\n\nfunction printConnectionTypes(\n\tname: string,\n\ttypeOptions: PaginationTypeOptions,\n\toptions: PaginationOptions,\n) {\n\tconst {\n\t\tcursorType = 'ID!',\n\t\tnodeType = name,\n\t\tconnectionFields = [],\n\t\tedgeFields = [],\n\t} = typeOptions;\n\n\tconst connection = printType(`${name}Connection`, [\n\t\t...connectionFields,\n\t\t'pageInfo: PageInfo!',\n\t\t`edges: [${name}Edge]`,\n\t]);\n\n\tconst edge = printType(`${name}Edge`, [\n\t\t...edgeFields,\n\t\t`cursor: ${cursorType}`,\n\t\t`node: ${nodeType}${options.nullableNode === false ? '!' : ''}`,\n\t]);\n\n\treturn [connection, edge];\n}\n\nfunction createConnectionModuleDir(modulesDir: string, moduleName: string) {\n\treturn join(modulesDir, moduleName);\n}\n\nfunction createGqlFilename(moduleDir: string) {\n\treturn `${moduleDir}/connections.gql`;\n}\n\nfunction createExportFilename(moduleDir: string) {\n\treturn `${moduleDir}/index.ts`;\n}\n\n/**\n * A plugin that generates Relay-style pagination types for GraphQL.\n * See https://baeta.io/docs/plugins/pagination for more details\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function paginationPlugin<T>(options: PaginationOptions<keyof T>) {\n\tconst { moduleName = 'baeta-pagination' } = options;\n\n\treturn createPluginV1({\n\t\tname: 'pagination',\n\t\tactionName: 'pagination connections',\n\t\twatch: (generatorOptions, watcher) => {\n\t\t\twatcher.ignore(`${createConnectionModuleDir(generatorOptions.modulesDir, moduleName)}/**`);\n\t\t},\n\t\tgenerate: async (ctx, next) => {\n\t\t\tconst types: string[] = [printPageInfo(options.pageInfoFields)];\n\n\t\t\tfor (const name in options.types) {\n\t\t\t\tconst typeOptions = options.types[name];\n\t\t\t\tif (typeOptions == null || typeOptions === false) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst connectionTypes = printConnectionTypes(\n\t\t\t\t\tname,\n\t\t\t\t\ttypeOptions === true ? {} : typeOptions,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\ttypes.push(...connectionTypes);\n\t\t\t}\n\n\t\t\tconst moduleDir = createConnectionModuleDir(ctx.generatorOptions.modulesDir, moduleName);\n\n\t\t\tconst definitionFile = ctx.fileManager.createAndAdd(\n\t\t\t\tcreateGqlFilename(moduleDir),\n\t\t\t\tprintTypes(types),\n\t\t\t\t'pagination',\n\t\t\t);\n\t\t\tawait definitionFile.write();\n\n\t\t\tctx.fileManager.add(definitionFile);\n\n\t\t\tctx.fileManager.createAndAdd(\n\t\t\t\tcreateExportFilename(moduleDir),\n\t\t\t\tprintExport(\n\t\t\t\t\tctx.generatorOptions.moduleDefinitionName,\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tctx.generatorOptions.importExtension,\n\t\t\t\t\toptions,\n\t\t\t\t),\n\t\t\t\t'pagination',\n\t\t\t);\n\n\t\t\treturn next();\n\t\t},\n\t});\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,2BAA2B;AACpD,SAAS,MAAM,aAAa;AAkE5B,SAAS,YAAY,QAAkB;AACtC,SAAO,OAAO,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,EAAE,KAAK,IAAI;AACrD;AAEA,SAAS,UAAU,MAAc,QAAkB;AAClD,SAAO,QAAQ,IAAI;AAAA,EAClB,YAAY,MAAM,CAAC;AAAA;AAErB;AAEA,SAAS,WAAW,OAAiB;AACpC,SAAO,GAAG,MAAM,KAAK,MAAM,CAAC;AAAA;AAC7B;AAEA,SAAS,cAAc,YAAsB,CAAC,GAAG;AAChD,SAAO,UAAU,YAAY;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACD,CAAC;AACF;AAEA,SAAS,sBAAsB,QAAgB,MAAc,QAAkB;AAC9E,SAAO,GAAG,IAAI,KAAK,MAAM,IAAI,IAAI;AAAA,EAChC,OACA,IAAI,CAAC,UAAU,sBAAsB,QAAQ,MAAM,KAAK,CAAC,EACzD,IAAI,OAAO,CAAC,CAAC,EACb,KAAK,KAAK,CAAC;AAAA;AAEb;AAEA,SAAS,sBAAsB,QAAgB,MAAc,OAAe;AAC3E,SAAO,GAAG,KAAK,KAAK,MAAM,IAAI,IAAI,IAAI,KAAK,SAAS,KAAK;AAC1D;AAEA,SAAS,8BAA8B,OAAe;AACrD,QAAM,CAAC,SAAS,IAAI,MAAM,MAAM,GAA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,IAAI,YAAY;AAAA,QACtC,kBAAkB,SAAS;AAAA,QAC3B,WAAW,KAAK;AAAA,QAChB;AAAA,MACD;AACA,YAAM,eAAe,MAAM;AAE3B,UAAI,YAAY,IAAI,cAAc;AAElC,UAAI,YAAY;AAAA,QACf,qBAAqB,SAAS;AAAA,QAC9B;AAAA,UACC,IAAI,iBAAiB;AAAA,UACrB;AAAA,UACA,IAAI,iBAAiB;AAAA,UACrB;AAAA,QACD;AAAA,QACA;AAAA,MACD;AAEA,aAAO,KAAK;AAAA,IACb;AAAA,EACD,CAAC;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeta/plugin-pagination",
3
- "version": "1.0.9",
3
+ "version": "2.0.0-next.0",
4
4
  "keywords": [
5
5
  "baeta",
6
6
  "graphql",
@@ -27,8 +27,8 @@
27
27
  "type": "module",
28
28
  "exports": {
29
29
  ".": {
30
- "types": "./dist/index.d.ts",
31
- "default": "./dist/index.js"
30
+ "types": "./index.ts",
31
+ "default": "./index.ts"
32
32
  }
33
33
  },
34
34
  "types": "dist/index.d.ts",
@@ -43,21 +43,21 @@
43
43
  "types": "tsc --noEmit"
44
44
  },
45
45
  "dependencies": {
46
- "@baeta/generator-sdk": "^1.0.1",
47
- "@baeta/util-path": "^1.0.1"
46
+ "@baeta/generator-sdk": "workspace:^",
47
+ "@baeta/util-path": "workspace:^"
48
48
  },
49
49
  "devDependencies": {
50
- "@baeta/builder": "^0.0.0",
51
- "@baeta/tsconfig": "^0.0.0",
52
- "@types/node": "^22.13.10",
53
- "graphql": "^16.10.0",
54
- "typescript": "^5.8.2"
50
+ "@baeta/builder": "workspace:^",
51
+ "@baeta/tsconfig": "workspace:^",
52
+ "@types/node": "^22.18.11",
53
+ "graphql": "^16.11.0",
54
+ "typescript": "^5.9.3"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "graphql": "^16.6.0"
58
58
  },
59
59
  "engines": {
60
- "node": ">=22.12.0"
60
+ "node": ">=22.20.0"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public",
@@ -68,15 +68,6 @@
68
68
  }
69
69
  }
70
70
  },
71
- "ava": {
72
- "extensions": {
73
- "ts": "module"
74
- },
75
- "nodeArguments": [
76
- "--no-warnings",
77
- "--experimental-transform-types"
78
- ]
79
- },
80
71
  "typedocOptions": {
81
72
  "entryPoints": [
82
73
  "./index.ts"
@@ -90,4 +81,4 @@
90
81
  "alphabetical-ignoring-documents"
91
82
  ]
92
83
  }
93
- }
84
+ }
package/CHANGELOG.md DELETED
@@ -1,205 +0,0 @@
1
- # @baeta/plugin-pagination
2
-
3
- ## 1.0.9
4
-
5
- ### Patch Changes
6
-
7
- - [`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update dependencies
8
-
9
- - Updated dependencies [[`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3)]:
10
- - @baeta/generator-sdk@1.0.1
11
- - @baeta/util-path@1.0.1
12
-
13
- ## 1.0.8
14
-
15
- ### Patch Changes
16
-
17
- - [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
18
-
19
- - [#165](https://github.com/andreisergiu98/baeta/pull/165) [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - mark as stable
20
-
21
- - Updated dependencies [[`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228), [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc)]:
22
- - @baeta/generator-sdk@1.0.0
23
- - @baeta/util-path@1.0.0
24
-
25
- ## 0.1.5
26
-
27
- ### Patch Changes
28
-
29
- - Updated dependencies [[`bf2d1a3`](https://github.com/andreisergiu98/baeta/commit/bf2d1a326235e5f34e723a5acc81cd7b974b913b)]:
30
- - @baeta/generator-sdk@0.1.5
31
-
32
- ## 0.1.4
33
-
34
- ### Patch Changes
35
-
36
- - [`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add readme
37
-
38
- - Updated dependencies [[`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820)]:
39
- - @baeta/generator-sdk@0.1.4
40
- - @baeta/util-path@0.1.4
41
-
42
- ## 0.1.3
43
-
44
- ### Patch Changes
45
-
46
- - [#180](https://github.com/andreisergiu98/baeta/pull/180) [`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Raise minimum required NodeJS version to 22.12.0. Drop CommonJS builds in favor of the require_esm feature from NodeJS 22.12.0 onwards.
47
-
48
- - [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise es target to 2024
49
-
50
- - Updated dependencies [[`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72), [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857)]:
51
- - @baeta/generator-sdk@0.1.3
52
- - @baeta/util-path@0.1.3
53
-
54
- ## 0.1.2
55
-
56
- ### Patch Changes
57
-
58
- - [#170](https://github.com/andreisergiu98/baeta/pull/170) [`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
59
-
60
- - Updated dependencies [[`e3fb6f8`](https://github.com/andreisergiu98/baeta/commit/e3fb6f877b4b20e248ad79cbaa3655cabe973f6b), [`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321)]:
61
- - @baeta/generator-sdk@0.1.2
62
- - @baeta/util-path@0.1.2
63
-
64
- ## 0.1.1
65
-
66
- ### Patch Changes
67
-
68
- - [`7f1958c`](https://github.com/andreisergiu98/baeta/commit/7f1958c44d1b9bed473e48c875fdaa7020c434fa) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - allow custom extension for generated file imports
69
-
70
- - [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix exports order in package.json
71
-
72
- - [#161](https://github.com/andreisergiu98/baeta/pull/161) [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
73
-
74
- - Updated dependencies [[`7f1958c`](https://github.com/andreisergiu98/baeta/commit/7f1958c44d1b9bed473e48c875fdaa7020c434fa), [`b9638eb`](https://github.com/andreisergiu98/baeta/commit/b9638eb9fb713507efa9821b4f04cc7896a997b1), [`fd3a5d2`](https://github.com/andreisergiu98/baeta/commit/fd3a5d27b497aca4b8807155e801b1c1197c5fe2), [`9d8d6a1`](https://github.com/andreisergiu98/baeta/commit/9d8d6a15d63579a2e0bdaa07b7efdcf10aff2492), [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a), [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0)]:
75
- - @baeta/generator-sdk@0.1.1
76
- - @baeta/util-path@0.1.1
77
-
78
- ## 0.1.0
79
-
80
- ### Minor Changes
81
-
82
- - [#156](https://github.com/andreisergiu98/baeta/pull/156) [`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise engine requirement to node >= 22
83
-
84
- ### Patch Changes
85
-
86
- - [#152](https://github.com/andreisergiu98/baeta/pull/152) [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update formatter
87
-
88
- - [#145](https://github.com/andreisergiu98/baeta/pull/145) [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
89
-
90
- - Updated dependencies [[`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8), [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7), [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2)]:
91
- - @baeta/generator-sdk@0.1.0
92
- - @baeta/util-path@0.1.0
93
-
94
- ## 0.0.12
95
-
96
- ### Patch Changes
97
-
98
- - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
99
-
100
- - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update typescript
101
-
102
- - Updated dependencies [[`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4), [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4)]:
103
- - @baeta/generator-sdk@0.0.14
104
- - @baeta/util-path@0.0.6
105
-
106
- ## 0.0.11
107
-
108
- ### Patch Changes
109
-
110
- - [#128](https://github.com/andreisergiu98/baeta/pull/128) [`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
111
-
112
- - Updated dependencies [[`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4)]:
113
- - @baeta/generator-sdk@0.0.13
114
- - @baeta/util-path@0.0.5
115
-
116
- ## 0.0.10
117
-
118
- ### Patch Changes
119
-
120
- - [#121](https://github.com/andreisergiu98/baeta/pull/121) [`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update Node to v20
121
-
122
- - [#51](https://github.com/andreisergiu98/baeta/pull/51) [`d94ee47`](https://github.com/andreisergiu98/baeta/commit/d94ee47bc485c541ff011290c4ac6ef0c145c83f) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add native support for file monifications
123
-
124
- - Updated dependencies [[`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454), [`d94ee47`](https://github.com/andreisergiu98/baeta/commit/d94ee47bc485c541ff011290c4ac6ef0c145c83f)]:
125
- - @baeta/generator-sdk@0.0.12
126
- - @baeta/util-path@0.0.4
127
-
128
- ## 0.0.9
129
-
130
- ### Patch Changes
131
-
132
- - [#119](https://github.com/andreisergiu98/baeta/pull/119) [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
133
-
134
- - Updated dependencies [[`18db339`](https://github.com/andreisergiu98/baeta/commit/18db339719aa309c619372d2161c5fdbc08fa316), [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a)]:
135
- - @baeta/generator-sdk@0.0.11
136
- - @baeta/util-path@0.0.3
137
-
138
- ## 0.0.8
139
-
140
- ### Patch Changes
141
-
142
- - [#102](https://github.com/andreisergiu98/baeta/pull/102) [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
143
-
144
- - [#102](https://github.com/andreisergiu98/baeta/pull/102) [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies and builder
145
-
146
- - [#106](https://github.com/andreisergiu98/baeta/pull/106) [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add compatibility with windows
147
-
148
- - Updated dependencies [[`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e)]:
149
- - @baeta/generator-sdk@0.0.10
150
- - @baeta/util-path@0.0.2
151
-
152
- ## 0.0.7
153
-
154
- ### Patch Changes
155
-
156
- - [#81](https://github.com/andreisergiu98/baeta/pull/81) [`3ff5e54`](https://github.com/andreisergiu98/baeta/commit/3ff5e54f31cf42ba2264b12309338d6e78710722) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add file transformation function from config
157
-
158
- - [#69](https://github.com/andreisergiu98/baeta/pull/69) [`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
159
-
160
- - [#91](https://github.com/andreisergiu98/baeta/pull/91) [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
161
-
162
- - Updated dependencies [[`3ff5e54`](https://github.com/andreisergiu98/baeta/commit/3ff5e54f31cf42ba2264b12309338d6e78710722), [`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37), [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546)]:
163
- - @baeta/generator-sdk@0.0.9
164
-
165
- ## 0.0.6
166
-
167
- ### Patch Changes
168
-
169
- - [#66](https://github.com/andreisergiu98/baeta/pull/66) [`9a4a021`](https://github.com/andreisergiu98/baeta/commit/9a4a0214351b70295ce4f7eecaa8c49ab0e1325b) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - replace chokidar with @parcel/watcher
170
-
171
- - Updated dependencies [[`9a4a021`](https://github.com/andreisergiu98/baeta/commit/9a4a0214351b70295ce4f7eecaa8c49ab0e1325b)]:
172
- - @baeta/generator-sdk@0.0.8
173
-
174
- ## 0.0.5
175
-
176
- ### Patch Changes
177
-
178
- - Updated dependencies []:
179
- - @baeta/generator-sdk@0.0.7
180
-
181
- ## 0.0.4
182
-
183
- ### Patch Changes
184
-
185
- - [#47](https://github.com/andreisergiu98/baeta/pull/47) [`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
186
-
187
- - [#43](https://github.com/andreisergiu98/baeta/pull/43) [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - bump dependencies
188
-
189
- - Updated dependencies [[`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9), [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2)]:
190
- - @baeta/generator-sdk@0.0.6
191
-
192
- ## 0.0.3
193
-
194
- ### Patch Changes
195
-
196
- - [`8569eca`](https://github.com/andreisergiu98/baeta/commit/8569ecaf263e24f8d17f62ea00a0cd374dd27941) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add final new line
197
-
198
- - [#31](https://github.com/andreisergiu98/baeta/pull/31) [`f122a1e`](https://github.com/andreisergiu98/baeta/commit/f122a1e2970d915ce3c24931d4309db26665c739) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - ignore generated sdl
199
-
200
- ## 0.0.2
201
-
202
- ### Patch Changes
203
-
204
- - Updated dependencies [[`9f937f4`](https://github.com/andreisergiu98/baeta/commit/9f937f47d3464a082680047414ee13a76cf6c056), [`9f937f4`](https://github.com/andreisergiu98/baeta/commit/9f937f47d3464a082680047414ee13a76cf6c056)]:
205
- - @baeta/generator-sdk@0.0.5
package/dist/index.d.ts DELETED
@@ -1,74 +0,0 @@
1
- import * as _baeta_generator_sdk from '@baeta/generator-sdk';
2
-
3
- /**
4
- * Configuration options for a specific pagination type
5
- */
6
- interface PaginationTypeOptions {
7
- /** The GraphQL type for nodes (e.g., "User!") */
8
- nodeType?: string;
9
- /** The GraphQL type for cursors
10
- * @defaultValue "ID!"
11
- */
12
- cursorType?: string;
13
- /**
14
- * Additional fields to add to the edge type
15
- * @example edgeFields: ["hasPhotos: Boolean!"]
16
- */
17
- edgeFields?: string[];
18
- /**
19
- * Additional fields to add to the connection type
20
- * @example connectionFields: ["totalCount: Int!"]
21
- */
22
- connectionFields?: string[];
23
- }
24
- /**
25
- * Configuration options for the pagination plugin
26
- */
27
- interface PaginationOptions {
28
- /**
29
- * Map of type names to their pagination configuration.
30
- * @example
31
- * ```typescript
32
- * {
33
- * // Simple configuration
34
- * User: true,
35
- *
36
- * // Advanced configuration
37
- * UserCustom: {
38
- * nodeType: "User",
39
- * cursorType: "UUID!",
40
- * connectionFields: ["totalCount: Int!"],
41
- * edgeFields: ["hasPhotos: Boolean!"]
42
- * }
43
- * }
44
- * ```
45
- */
46
- types: Record<string, boolean | PaginationTypeOptions>;
47
- /**
48
- * Whether the node field should be nullable in all connections
49
- * @defaultValue true
50
- */
51
- nullableNode?: boolean;
52
- /**
53
- * Additional fields to add to the PageInfo type
54
- * @example ["hasMorePages: Boolean!"]
55
- */
56
- pageInfoFields?: string[];
57
- /** Whether to create an export file */
58
- createExport?: boolean;
59
- /**
60
- * Custom name for the pagination module
61
- * @defaultValue 'baeta-pagination'
62
- */
63
- moduleName?: string;
64
- }
65
- /**
66
- * A plugin that generates Relay-style pagination types for GraphQL.
67
- * See https://baeta.io/docs/plugins/pagination for more details
68
- *
69
- * @param options - Configuration options for the pagination plugin
70
- * @returns A Baeta generator plugin
71
- */
72
- declare function paginationPlugin(options: PaginationOptions): _baeta_generator_sdk.GeneratorPluginV1<unknown>;
73
-
74
- export { type PaginationOptions, type PaginationTypeOptions, paginationPlugin };