@graphql-codegen/add 2.0.1-alpha-7d3e78ce.0 → 2.0.2

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 CHANGED
@@ -11,10 +11,10 @@ const plugin = async (schema, documents, config) => {
11
11
  throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${VALID_PLACEMENTS.join(', ')})`);
12
12
  }
13
13
  if (!content) {
14
- throw Error(`Configuration provided for 'add' plugin is invalid`);
14
+ throw Error(`Configuration provided for 'add' plugin is invalid: "content" is missing!`);
15
15
  }
16
16
  return {
17
- content: '',
17
+ content: null,
18
18
  [placement]: Array.isArray(content) ? content : [content],
19
19
  };
20
20
  };
package/index.cjs.js.map CHANGED
@@ -1 +1 @@
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`);\n }\n return {\n content: '',\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,kDAAkD,CAAC,CAAC,CAAC;AAC1E,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,EAAE;AACnB,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;;;;;"}
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 CHANGED
@@ -7,10 +7,10 @@ const plugin = async (schema, documents, config) => {
7
7
  throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${VALID_PLACEMENTS.join(', ')})`);
8
8
  }
9
9
  if (!content) {
10
- throw Error(`Configuration provided for 'add' plugin is invalid`);
10
+ throw Error(`Configuration provided for 'add' plugin is invalid: "content" is missing!`);
11
11
  }
12
12
  return {
13
- content: '',
13
+ content: null,
14
14
  [placement]: Array.isArray(content) ? content : [content],
15
15
  };
16
16
  };
package/index.esm.js.map CHANGED
@@ -1 +1 @@
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`);\n }\n return {\n content: '',\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,kDAAkD,CAAC,CAAC,CAAC;AAC1E,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,EAAE;AACnB,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;;;;;"}
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;;;;;"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/add",
3
- "version": "2.0.1-alpha-7d3e78ce.0",
3
+ "version": "2.0.2",
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": "1.17.8-alpha-7d3e78ce.0",
10
- "tslib": "~2.0.0"
9
+ "@graphql-codegen/plugin-helpers": "^1.18.2",
10
+ "tslib": "~2.0.1"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",