@graphql-codegen/java-common 2.2.6 → 3.0.0-alpha-20230524082546-d7e1d0a4a
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.
|
@@ -166,7 +166,9 @@ ${(0, visitor_plugin_common_1.indentMultiline)(method.implementation)}
|
|
|
166
166
|
: null;
|
|
167
167
|
const before = '{';
|
|
168
168
|
const after = '}';
|
|
169
|
-
const block = [before, members, methods, nestedClasses, this._block, after]
|
|
169
|
+
const block = [before, members, methods, nestedClasses, this._block, after]
|
|
170
|
+
.filter(f => f)
|
|
171
|
+
.join('\n');
|
|
170
172
|
result += block;
|
|
171
173
|
return (this._comment ? this._comment : '') + result + '\n';
|
|
172
174
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { indentMultiline, transformComment } from '@graphql-codegen/visitor-plugin-common';
|
|
2
2
|
import { stripIndent } from './utils.js';
|
|
3
3
|
export class JavaDeclarationBlock {
|
|
4
4
|
constructor() {
|
|
@@ -163,7 +163,9 @@ ${indentMultiline(method.implementation)}
|
|
|
163
163
|
: null;
|
|
164
164
|
const before = '{';
|
|
165
165
|
const after = '}';
|
|
166
|
-
const block = [before, members, methods, nestedClasses, this._block, after]
|
|
166
|
+
const block = [before, members, methods, nestedClasses, this._block, after]
|
|
167
|
+
.filter(f => f)
|
|
168
|
+
.join('\n');
|
|
167
169
|
result += block;
|
|
168
170
|
return (this._comment ? this._comment : '') + result + '\n';
|
|
169
171
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/java-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha-20230524082546-d7e1d0a4a",
|
|
4
4
|
"description": "GraphQL Code Generator utils library for developing Java plugins",
|
|
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 || ^16.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-codegen/plugin-helpers": "^
|
|
9
|
+
"@graphql-codegen/plugin-helpers": "^3.0.0",
|
|
10
10
|
"@graphql-codegen/visitor-plugin-common": "2.13.1",
|
|
11
11
|
"auto-bind": "~4.0.0",
|
|
12
12
|
"min-indent": "1.0.1",
|
|
@@ -15,10 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/dotansimha/graphql-code-generator.git",
|
|
18
|
+
"url": "https://github.com/dotansimha/graphql-code-generator-community.git",
|
|
19
19
|
"directory": "packages/plugins/java/common"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">= 16.0.0"
|
|
24
|
+
},
|
|
22
25
|
"main": "cjs/index.js",
|
|
23
26
|
"module": "esm/index.js",
|
|
24
27
|
"typings": "typings/index.d.ts",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
import { NameNode, StringValueNode } from 'graphql';
|
|
2
|
+
export type Access = 'private' | 'public' | 'protected';
|
|
3
|
+
export type Kind = 'class' | 'interface' | 'enum';
|
|
4
|
+
export type MemberFlags = {
|
|
5
5
|
transient?: boolean;
|
|
6
6
|
final?: boolean;
|
|
7
7
|
volatile?: boolean;
|
|
8
8
|
static?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ClassMember = {
|
|
11
11
|
value: string;
|
|
12
12
|
name: string;
|
|
13
13
|
access: Access;
|
|
@@ -15,7 +15,7 @@ export declare type ClassMember = {
|
|
|
15
15
|
annotations: string[];
|
|
16
16
|
flags: MemberFlags;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ClassMethod = {
|
|
19
19
|
methodAnnotations: string[];
|
|
20
20
|
args: Partial<ClassMember>[];
|
|
21
21
|
implementation: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
import { NameNode, StringValueNode } from 'graphql';
|
|
2
|
+
export type Access = 'private' | 'public' | 'protected';
|
|
3
|
+
export type Kind = 'class' | 'interface' | 'enum';
|
|
4
|
+
export type MemberFlags = {
|
|
5
5
|
transient?: boolean;
|
|
6
6
|
final?: boolean;
|
|
7
7
|
volatile?: boolean;
|
|
8
8
|
static?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ClassMember = {
|
|
11
11
|
value: string;
|
|
12
12
|
name: string;
|
|
13
13
|
access: Access;
|
|
@@ -15,7 +15,7 @@ export declare type ClassMember = {
|
|
|
15
15
|
annotations: string[];
|
|
16
16
|
flags: MemberFlags;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ClassMethod = {
|
|
19
19
|
methodAnnotations: string[];
|
|
20
20
|
args: Partial<ClassMember>[];
|
|
21
21
|
implementation: string;
|