@depup/graphql-codegen__add 6.0.0-depup.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/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @depup/graphql-codegen__add
2
+
3
+ > Dependency-bumped version of [@graphql-codegen/add](https://www.npmjs.com/package/@graphql-codegen/add)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/graphql-codegen__add
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [@graphql-codegen/add](https://www.npmjs.com/package/@graphql-codegen/add) @ 6.0.0 |
17
+ | Processed | 2026-03-17 |
18
+ | Smoke test | passed |
19
+ | Deps updated | 2 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | @graphql-codegen/plugin-helpers | ^6.0.0 | ^6.2.0 |
26
+ | tslib | ~2.6.0 | ^2.8.1 |
27
+
28
+ ---
29
+
30
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/@graphql-codegen/add
31
+
32
+ License inherited from the original package.
package/changes.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "bumped": {
3
+ "@graphql-codegen/plugin-helpers": {
4
+ "from": "^6.0.0",
5
+ "to": "^6.2.0"
6
+ },
7
+ "tslib": {
8
+ "from": "~2.6.0",
9
+ "to": "^2.8.1"
10
+ }
11
+ },
12
+ "timestamp": "2026-03-17T16:31:48.739Z",
13
+ "totalUpdated": 2
14
+ }
package/cjs/config.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VALID_PLACEMENTS = void 0;
4
+ exports.VALID_PLACEMENTS = ['prepend', 'content', 'append'];
package/cjs/index.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.plugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const config_js_1 = require("./config.js");
6
+ tslib_1.__exportStar(require("./config.js"), exports);
7
+ const plugin = async (schema, documents, config) => {
8
+ const placement = config.placement || 'prepend';
9
+ const { content } = config;
10
+ if (!config_js_1.VALID_PLACEMENTS.includes(placement)) {
11
+ throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${config_js_1.VALID_PLACEMENTS.join(', ')})`);
12
+ }
13
+ if (!content) {
14
+ throw Error(`Configuration provided for 'add' plugin is invalid: "content" is missing!`);
15
+ }
16
+ return {
17
+ content: null,
18
+ [placement]: Array.isArray(content) ? content : [content],
19
+ };
20
+ };
21
+ exports.plugin = plugin;
22
+ exports.default = { plugin: exports.plugin };
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
package/esm/config.js ADDED
@@ -0,0 +1 @@
1
+ export const VALID_PLACEMENTS = ['prepend', 'content', 'append'];
package/esm/index.js ADDED
@@ -0,0 +1,17 @@
1
+ import { VALID_PLACEMENTS } from './config.js';
2
+ export * from './config.js';
3
+ export const plugin = async (schema, documents, config) => {
4
+ const placement = config.placement || 'prepend';
5
+ const { content } = config;
6
+ if (!VALID_PLACEMENTS.includes(placement)) {
7
+ throw Error(`Configuration provided for 'add' plugin is invalid: value of 'placement' field is not valid (valid values are: ${VALID_PLACEMENTS.join(', ')})`);
8
+ }
9
+ if (!content) {
10
+ throw Error(`Configuration provided for 'add' plugin is invalid: "content" is missing!`);
11
+ }
12
+ return {
13
+ content: null,
14
+ [placement]: Array.isArray(content) ? content : [content],
15
+ };
16
+ };
17
+ export default { plugin };
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@depup/graphql-codegen__add",
3
+ "version": "6.0.0-depup.0",
4
+ "description": "[DepUp] GraphQL Code Generator plugin for adding custom content to your output file",
5
+ "peerDependencies": {
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 || ^16.0.0"
7
+ },
8
+ "dependencies": {
9
+ "@graphql-codegen/plugin-helpers": "^6.2.0",
10
+ "tslib": "^2.8.1"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/dotansimha/graphql-code-generator.git",
15
+ "directory": "packages/plugins/other/add"
16
+ },
17
+ "license": "MIT",
18
+ "engines": {
19
+ "node": ">=16"
20
+ },
21
+ "main": "cjs/index.js",
22
+ "module": "esm/index.js",
23
+ "typings": "typings/index.d.ts",
24
+ "typescript": {
25
+ "definition": "typings/index.d.ts"
26
+ },
27
+ "type": "module",
28
+ "exports": {
29
+ ".": {
30
+ "require": {
31
+ "types": "./typings/index.d.cts",
32
+ "default": "./cjs/index.js"
33
+ },
34
+ "import": {
35
+ "types": "./typings/index.d.ts",
36
+ "default": "./esm/index.js"
37
+ },
38
+ "default": {
39
+ "types": "./typings/index.d.ts",
40
+ "default": "./esm/index.js"
41
+ }
42
+ },
43
+ "./package.json": "./package.json"
44
+ },
45
+ "keywords": [
46
+ "depup",
47
+ "dependency-bumped",
48
+ "updated-deps",
49
+ "@graphql-codegen/add"
50
+ ],
51
+ "depup": {
52
+ "changes": {
53
+ "@graphql-codegen/plugin-helpers": {
54
+ "from": "^6.0.0",
55
+ "to": "^6.2.0"
56
+ },
57
+ "tslib": {
58
+ "from": "~2.6.0",
59
+ "to": "^2.8.1"
60
+ }
61
+ },
62
+ "depsUpdated": 2,
63
+ "originalPackage": "@graphql-codegen/add",
64
+ "originalVersion": "6.0.0",
65
+ "processedAt": "2026-03-17T16:31:52.902Z",
66
+ "smokeTest": "passed"
67
+ }
68
+ }
@@ -0,0 +1,13 @@
1
+ export interface AddPluginConfig {
2
+ /**
3
+ * @default prepend
4
+ * @description Allow you to choose where to add the content.
5
+ */
6
+ placement?: 'prepend' | 'content' | 'append';
7
+ /**
8
+ * @description The actual content you wish to add, either a string or array of strings.
9
+ * You can also specify a path to a local file and the content if it will be loaded by codegen.
10
+ */
11
+ content: string | string[];
12
+ }
13
+ export declare const VALID_PLACEMENTS: AddPluginConfig['placement'][];
@@ -0,0 +1,13 @@
1
+ export interface AddPluginConfig {
2
+ /**
3
+ * @default prepend
4
+ * @description Allow you to choose where to add the content.
5
+ */
6
+ placement?: 'prepend' | 'content' | 'append';
7
+ /**
8
+ * @description The actual content you wish to add, either a string or array of strings.
9
+ * You can also specify a path to a local file and the content if it will be loaded by codegen.
10
+ */
11
+ content: string | string[];
12
+ }
13
+ export declare const VALID_PLACEMENTS: AddPluginConfig['placement'][];
@@ -0,0 +1,8 @@
1
+ import { PluginFunction } from '@graphql-codegen/plugin-helpers';
2
+ import { AddPluginConfig } from './config.cjs';
3
+ export * from './config.cjs';
4
+ export declare const plugin: PluginFunction<AddPluginConfig>;
5
+ declare const _default: {
6
+ plugin: PluginFunction<AddPluginConfig>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { PluginFunction } from '@graphql-codegen/plugin-helpers';
2
+ import { AddPluginConfig } from './config.js';
3
+ export * from './config.js';
4
+ export declare const plugin: PluginFunction<AddPluginConfig>;
5
+ declare const _default: {
6
+ plugin: PluginFunction<AddPluginConfig>;
7
+ };
8
+ export default _default;