@graphql-codegen/java-common 2.2.3-alpha-d8d060f00.0 → 2.2.3-alpha-20220805095358-8b7e687d1

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/java-common",
3
- "version": "2.2.3-alpha-d8d060f00.0",
3
+ "version": "2.2.3-alpha-20220805095358-8b7e687d1",
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": "^2.6.1-alpha-d8d060f00.0",
10
- "@graphql-codegen/visitor-plugin-common": "2.12.1-alpha-d8d060f00.0",
9
+ "@graphql-codegen/plugin-helpers": "2.6.2-alpha-20220805095358-8b7e687d1",
10
+ "@graphql-codegen/visitor-plugin-common": "2.12.1-alpha-20220805095358-8b7e687d1",
11
11
  "auto-bind": "~4.0.0",
12
12
  "min-indent": "1.0.1",
13
13
  "tslib": "~2.4.0",
@@ -29,7 +29,7 @@
29
29
  "exports": {
30
30
  ".": {
31
31
  "require": {
32
- "types": "./typings/index.d.ts",
32
+ "types": "./typings/index.d.cts",
33
33
  "default": "./cjs/index.js"
34
34
  },
35
35
  "import": {
@@ -0,0 +1,3 @@
1
+ export * from './java-declaration-block.cjs';
2
+ export * from './scalars.cjs';
3
+ export * from './utils.cjs';
@@ -0,0 +1,58 @@
1
+ import { StringValueNode, NameNode } from 'graphql';
2
+ export declare type Access = 'private' | 'public' | 'protected';
3
+ export declare type Kind = 'class' | 'interface' | 'enum';
4
+ export declare type MemberFlags = {
5
+ transient?: boolean;
6
+ final?: boolean;
7
+ volatile?: boolean;
8
+ static?: boolean;
9
+ };
10
+ export declare type ClassMember = {
11
+ value: string;
12
+ name: string;
13
+ access: Access;
14
+ type: string;
15
+ annotations: string[];
16
+ flags: MemberFlags;
17
+ };
18
+ export declare type ClassMethod = {
19
+ methodAnnotations: string[];
20
+ args: Partial<ClassMember>[];
21
+ implementation: string;
22
+ name: string;
23
+ access: Access;
24
+ returnType: string | null;
25
+ returnTypeAnnotations: string[];
26
+ flags: MemberFlags;
27
+ };
28
+ export declare class JavaDeclarationBlock {
29
+ _name: string;
30
+ _extendStr: string[];
31
+ _implementsStr: string[];
32
+ _kind: Kind;
33
+ _access: Access;
34
+ _final: boolean;
35
+ _static: boolean;
36
+ _block: any;
37
+ _comment: any;
38
+ _annotations: string[];
39
+ _members: ClassMember[];
40
+ _methods: ClassMethod[];
41
+ _nestedClasses: JavaDeclarationBlock[];
42
+ nestedClass(nstCls: JavaDeclarationBlock): JavaDeclarationBlock;
43
+ access(access: Access): JavaDeclarationBlock;
44
+ asKind(kind: Kind): JavaDeclarationBlock;
45
+ final(): JavaDeclarationBlock;
46
+ static(): JavaDeclarationBlock;
47
+ annotate(annotations: string[]): JavaDeclarationBlock;
48
+ withComment(comment: string | StringValueNode | null): JavaDeclarationBlock;
49
+ withBlock(block: string): JavaDeclarationBlock;
50
+ extends(extendStr: string[]): JavaDeclarationBlock;
51
+ implements(implementsStr: string[]): JavaDeclarationBlock;
52
+ withName(name: string | NameNode): JavaDeclarationBlock;
53
+ private printMember;
54
+ private printMethod;
55
+ addClassMember(name: string, type: string, value: string, typeAnnotations?: string[], access?: Access, flags?: MemberFlags): JavaDeclarationBlock;
56
+ addClassMethod(name: string, returnType: string | null, impl: string, args?: Partial<ClassMember>[], returnTypeAnnotations?: string[], access?: Access, flags?: MemberFlags, methodAnnotations?: string[]): JavaDeclarationBlock;
57
+ get string(): string;
58
+ }
@@ -0,0 +1,7 @@
1
+ export declare const JAVA_SCALARS: {
2
+ ID: string;
3
+ String: string;
4
+ Boolean: string;
5
+ Int: string;
6
+ Float: string;
7
+ };
@@ -0,0 +1,4 @@
1
+ import { TypeNode } from 'graphql';
2
+ export declare function buildPackageNameFromPath(path: string): string;
3
+ export declare function wrapTypeWithModifiers(baseType: string, typeNode: TypeNode, listType?: string): string;
4
+ export declare function stripIndent(string: string): string;