@graphql-codegen/add 3.0.0 → 3.1.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/{index.cjs.js → index.js} +0 -1
- package/{index.esm.js → index.mjs} +0 -1
- package/package.json +14 -4
- package/index.cjs.js.map +0 -1
- package/index.esm.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/add",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for adding custom content to your output file",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
9
|
+
"@graphql-codegen/plugin-helpers": "^2.1.0",
|
|
10
10
|
"tslib": "~2.3.0"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
@@ -15,10 +15,20 @@
|
|
|
15
15
|
"directory": "packages/plugins/other/add"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"main": "index.
|
|
19
|
-
"module": "index.
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"module": "index.mjs",
|
|
20
20
|
"typings": "index.d.ts",
|
|
21
21
|
"typescript": {
|
|
22
22
|
"definition": "index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"require": "./index.js",
|
|
27
|
+
"import": "./index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./*": {
|
|
30
|
+
"require": "./*.js",
|
|
31
|
+
"import": "./*.mjs"
|
|
32
|
+
}
|
|
23
33
|
}
|
|
24
34
|
}
|
package/index.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../dist/plugins/other/add/src/config.js","../../../dist/plugins/other/add/src/index.js"],"sourcesContent":["export const VALID_PLACEMENTS = ['prepend', 'content', 'append'];\n//# sourceMappingURL=config.js.map","import { VALID_PLACEMENTS } from './config';\nexport const plugin = async (schema, documents, config) => {\n const placement = config.placement || 'prepend';\n const content = config.content;\n if (!VALID_PLACEMENTS.includes(placement)) {\n throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${VALID_PLACEMENTS.join(', ')})`);\n }\n if (!content) {\n throw Error(`Configuration provided for 'add' plugin is invalid: \"content\" is missing!`);\n }\n return {\n content: null,\n [placement]: Array.isArray(content) ? content : [content],\n };\n};\nexport default { plugin };\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC;;ACCpD,MAAC,MAAM,GAAG,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK;AAC3D,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC;AACpD,IAAI,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACnC,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC/C,QAAQ,MAAM,KAAK,CAAC,CAAC,+GAA+G,EAAE,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtK,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,MAAM,KAAK,CAAC,CAAC,yEAAyE,CAAC,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;AACjE,KAAK,CAAC;AACN,EAAE;AACF,cAAe,EAAE,MAAM,EAAE;;;;;"}
|
package/index.esm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../dist/plugins/other/add/src/config.js","../../../dist/plugins/other/add/src/index.js"],"sourcesContent":["export const VALID_PLACEMENTS = ['prepend', 'content', 'append'];\n//# sourceMappingURL=config.js.map","import { VALID_PLACEMENTS } from './config';\nexport const plugin = async (schema, documents, config) => {\n const placement = config.placement || 'prepend';\n const content = config.content;\n if (!VALID_PLACEMENTS.includes(placement)) {\n throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${VALID_PLACEMENTS.join(', ')})`);\n }\n if (!content) {\n throw Error(`Configuration provided for 'add' plugin is invalid: \"content\" is missing!`);\n }\n return {\n content: null,\n [placement]: Array.isArray(content) ? content : [content],\n };\n};\nexport default { plugin };\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":"AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC;;ACCpD,MAAC,MAAM,GAAG,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK;AAC3D,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC;AACpD,IAAI,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACnC,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC/C,QAAQ,MAAM,KAAK,CAAC,CAAC,+GAA+G,EAAE,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtK,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,MAAM,KAAK,CAAC,CAAC,yEAAyE,CAAC,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;AACjE,KAAK,CAAC;AACN,EAAE;AACF,cAAe,EAAE,MAAM,EAAE;;;;;"}
|