@graphql-codegen/typescript-enum-array 2.1.2-alpha-78670e76d.0 → 2.2.0-alpha-2fbcdb6d3.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/cjs/config.js
ADDED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.plugin = void 0;
|
|
5
4
|
function getEnumTypeMap(schema) {
|
|
6
5
|
var _a;
|
|
7
6
|
const typeMap = schema.getTypeMap();
|
|
@@ -37,7 +36,5 @@ const plugin = (schema, _documents, config) => {
|
|
|
37
36
|
}
|
|
38
37
|
return result;
|
|
39
38
|
};
|
|
40
|
-
const index = { plugin };
|
|
41
|
-
|
|
42
|
-
exports.default = index;
|
|
43
39
|
exports.plugin = plugin;
|
|
40
|
+
exports.default = { plugin: exports.plugin };
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
package/esm/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -24,7 +24,7 @@ function buildImportStatement(enums, importFrom) {
|
|
|
24
24
|
const names = Object.values(enums).map(e => e.name);
|
|
25
25
|
return [`import { ${names.join(', ')} } from "${importFrom}";`];
|
|
26
26
|
}
|
|
27
|
-
const plugin = (schema, _documents, config) => {
|
|
27
|
+
export const plugin = (schema, _documents, config) => {
|
|
28
28
|
const enums = getEnumTypeMap(schema);
|
|
29
29
|
const content = enums.map(buildArrayDefinition).join('\n');
|
|
30
30
|
const result = { content };
|
|
@@ -33,7 +33,4 @@ const plugin = (schema, _documents, config) => {
|
|
|
33
33
|
}
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export default index;
|
|
39
|
-
export { plugin };
|
|
36
|
+
export default { plugin };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-enum-array",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha-2fbcdb6d3.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for adding const array",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
9
|
+
"@graphql-codegen/plugin-helpers": "^2.5.0-alpha-2fbcdb6d3.0",
|
|
10
10
|
"tslib": "~2.4.0"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
@@ -15,21 +15,28 @@
|
|
|
15
15
|
"directory": "packages/plugins/typescript/enum-array"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"main": "index.js",
|
|
19
|
-
"module": "index.
|
|
20
|
-
"typings": "index.d.ts",
|
|
18
|
+
"main": "cjs/index.js",
|
|
19
|
+
"module": "esm/index.js",
|
|
20
|
+
"typings": "typings/index.d.ts",
|
|
21
21
|
"typescript": {
|
|
22
|
-
"definition": "index.d.ts"
|
|
22
|
+
"definition": "typings/index.d.ts"
|
|
23
23
|
},
|
|
24
|
+
"type": "module",
|
|
24
25
|
"exports": {
|
|
25
|
-
"./package.json": "./package.json",
|
|
26
26
|
".": {
|
|
27
|
-
"require":
|
|
28
|
-
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./typings/index.d.ts",
|
|
29
|
+
"default": "./cjs/index.js"
|
|
30
|
+
},
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./typings/index.d.ts",
|
|
33
|
+
"default": "./esm/index.js"
|
|
34
|
+
},
|
|
35
|
+
"default": {
|
|
36
|
+
"types": "./typings/index.d.ts",
|
|
37
|
+
"default": "./esm/index.js"
|
|
38
|
+
}
|
|
29
39
|
},
|
|
30
|
-
"
|
|
31
|
-
"require": "./*.js",
|
|
32
|
-
"import": "./*.mjs"
|
|
33
|
-
}
|
|
40
|
+
"./package.json": "./package.json"
|
|
34
41
|
}
|
|
35
|
-
}
|
|
42
|
+
}
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers';
|
|
2
|
-
import { EnumArrayPluginConfig } from './config';
|
|
2
|
+
import { EnumArrayPluginConfig } from './config.js';
|
|
3
3
|
export declare const plugin: PluginFunction<EnumArrayPluginConfig>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
plugin: PluginFunction<EnumArrayPluginConfig, Types.PluginOutput>;
|