graphql-codegen-registry 0.0.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/CHANGELOG.md +7 -0
- package/README.md +18 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.js +8 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/preset/index.d.ts +4 -0
- package/dist/preset/index.js +20 -0
- package/dist/preset/index.js.map +1 -0
- package/package.json +71 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# GraphQL Codegen Registry
|
|
2
|
+
|
|
3
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
+
[![License][license-src]][license-href]
|
|
6
|
+
|
|
7
|
+
Type-safe operations registry and validation for GraphQL Codegen.
|
|
8
|
+
|
|
9
|
+
✨ [Release Notes](/CHANGELOG.md)
|
|
10
|
+
|
|
11
|
+
<!-- Badges -->
|
|
12
|
+
|
|
13
|
+
[npm-version-src]: https://img.shields.io/npm/v/graphql-codegen-registry/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
14
|
+
[npm-version-href]: https://npmjs.com/package/graphql-codegen-registry
|
|
15
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/graphql-codegen-registry.svg?style=flat&colorA=020420&colorB=00DC82
|
|
16
|
+
[npm-downloads-href]: https://npm.chart.dev/graphql-codegen-registry
|
|
17
|
+
[license-src]: https://img.shields.io/npm/l/graphql-codegen-registry.svg?style=flat&colorA=020420&colorB=00DC82
|
|
18
|
+
[license-href]: https://npmjs.com/package/graphql-codegen-registry
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/plugin/index.ts"],"sourcesContent":["import type { CodegenPlugin } from \"@graphql-codegen/plugin-helpers\";\n\nconst plugin: CodegenPlugin = {\n plugin() {\n return \"// Generated by graphql-codegen-registry\\n\\n\";\n },\n};\n\nexport default plugin;\n"],"mappings":";AAEA,MAAM,SAAwB,EAC5B,SAAS;AACP,QAAO;GAEV"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/preset/index.ts
|
|
2
|
+
const preset = { buildGeneratesSection: async (options) => {
|
|
3
|
+
return [{
|
|
4
|
+
filename: options.baseOutputDir,
|
|
5
|
+
plugins: [
|
|
6
|
+
{ typescript: {} },
|
|
7
|
+
{ "typescript-operations": {} },
|
|
8
|
+
{ "graphql-codegen-registry/plugin": {} }
|
|
9
|
+
],
|
|
10
|
+
pluginMap: options.pluginMap,
|
|
11
|
+
config: options.config,
|
|
12
|
+
documents: options.documents,
|
|
13
|
+
schema: options.schema,
|
|
14
|
+
schemaAst: options.schemaAst
|
|
15
|
+
}];
|
|
16
|
+
} };
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { preset as default };
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/preset/index.ts"],"sourcesContent":["import type { Types } from \"@graphql-codegen/plugin-helpers\";\n\nexport type RegistryConfig = {};\n\nconst preset: Types.OutputPreset<RegistryConfig> = {\n buildGeneratesSection: async (options) => {\n const plugins: Types.ConfiguredPlugin[] = [\n {\n typescript: {},\n },\n {\n \"typescript-operations\": {},\n },\n { \"graphql-codegen-registry/plugin\": {} },\n ];\n\n return [\n {\n filename: options.baseOutputDir,\n plugins,\n pluginMap: options.pluginMap,\n config: options.config,\n documents: options.documents,\n schema: options.schema,\n schemaAst: options.schemaAst,\n },\n ];\n },\n};\n\nexport default preset;\n"],"mappings":";AAIA,MAAM,SAA6C,EACjD,uBAAuB,OAAO,YAAY;AAWxC,QAAO,CACL;EACE,UAAU,QAAQ;EAClB,SAbsC;GACxC,EACE,YAAY,EAAE,EACf;GACD,EACE,yBAAyB,EAAE,EAC5B;GACD,EAAE,mCAAmC,EAAE,EAAE;GAC1C;EAMG,WAAW,QAAQ;EACnB,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACnB,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACpB,CACF;GAEJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "graphql-codegen-registry",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Type-safe operations registry and validation for GraphQL Codegen.",
|
|
5
|
+
"homepage": "https://github.com/lewebsimple/graphql-codegen-registry#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/lewebsimple/graphql-codegen-registry/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "AGPL-3.0-only",
|
|
10
|
+
"author": "Pascal Martineau <pascal@lewebsimple.ca>",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/lewebsimple/graphql-codegen-registry.git"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"CHANGELOG.md",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/preset/index.d.ts",
|
|
24
|
+
"default": "./dist/preset/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./plugin": {
|
|
27
|
+
"types": "./dist/plugin/index.d.ts",
|
|
28
|
+
"default": "./dist/plugin/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@graphql-codegen/plugin-helpers": "^6.1.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@graphql-codegen/typescript": "^5.0.8",
|
|
39
|
+
"@graphql-codegen/typescript-operations": "^5.0.8",
|
|
40
|
+
"@types/node": "^25.3.3",
|
|
41
|
+
"changelogen": "^0.6.2",
|
|
42
|
+
"husky": "^9.1.7",
|
|
43
|
+
"lint-staged": "^16.3.1",
|
|
44
|
+
"oxfmt": "^0.36.0",
|
|
45
|
+
"oxlint": "^1.51.0",
|
|
46
|
+
"rolldown": "1.0.0-rc.5",
|
|
47
|
+
"typescript": "^5.9.3"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@graphql-codegen/typescript": "^5.0.0",
|
|
51
|
+
"@graphql-codegen/typescript-operations": "^5.0.0"
|
|
52
|
+
},
|
|
53
|
+
"lint-staged": {
|
|
54
|
+
"*.{ts,json,md}": [
|
|
55
|
+
"oxlint --fix",
|
|
56
|
+
"oxfmt"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"changelog": {
|
|
60
|
+
"noAuthors": true,
|
|
61
|
+
"types": {
|
|
62
|
+
"chore": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "rolldown --config ./rolldown.config.ts && tsc",
|
|
67
|
+
"format": "oxfmt .",
|
|
68
|
+
"lint": "oxlint . --fix",
|
|
69
|
+
"release": "pnpm lint && pnpm build && changelogen --release --push && pnpm publish"
|
|
70
|
+
}
|
|
71
|
+
}
|