@webiny/handler-graphql 6.0.0-beta.0 → 6.0.0-rc.1
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 +9 -5
- package/ResolverDecoration.d.ts +6 -0
- package/ResolverDecoration.js +19 -0
- package/ResolverDecoration.js.map +1 -0
- package/builtInTypes/AnyScalar.d.ts +1 -1
- package/builtInTypes/AnyScalar.js +2 -8
- package/builtInTypes/AnyScalar.js.map +1 -1
- package/builtInTypes/DateScalar.d.ts +1 -1
- package/builtInTypes/DateScalar.js +7 -10
- package/builtInTypes/DateScalar.js.map +1 -1
- package/builtInTypes/DateTimeScalar.d.ts +1 -1
- package/builtInTypes/DateTimeScalar.js +7 -10
- package/builtInTypes/DateTimeScalar.js.map +1 -1
- package/builtInTypes/DateTimeZScalar.d.ts +1 -1
- package/builtInTypes/DateTimeZScalar.js +8 -15
- package/builtInTypes/DateTimeZScalar.js.map +1 -1
- package/builtInTypes/IconScalar.d.ts +10 -0
- package/builtInTypes/IconScalar.js +93 -0
- package/builtInTypes/IconScalar.js.map +1 -0
- package/builtInTypes/JsonScalar.d.ts +1 -1
- package/builtInTypes/JsonScalar.js +2 -8
- package/builtInTypes/JsonScalar.js.map +1 -1
- package/builtInTypes/LongScalar.d.ts +1 -1
- package/builtInTypes/LongScalar.js +8 -15
- package/builtInTypes/LongScalar.js.map +1 -1
- package/builtInTypes/NumberScalar.d.ts +1 -1
- package/builtInTypes/NumberScalar.js +9 -16
- package/builtInTypes/NumberScalar.js.map +1 -1
- package/builtInTypes/RefInputScalar.d.ts +1 -1
- package/builtInTypes/RefInputScalar.js +8 -8
- package/builtInTypes/RefInputScalar.js.map +1 -1
- package/builtInTypes/TimeScalar.d.ts +1 -1
- package/builtInTypes/TimeScalar.js +9 -16
- package/builtInTypes/TimeScalar.js.map +1 -1
- package/builtInTypes/index.d.ts +10 -9
- package/builtInTypes/index.js +10 -104
- package/builtInTypes/index.js.map +1 -1
- package/createGraphQLHandler.d.ts +3 -3
- package/createGraphQLHandler.js +25 -35
- package/createGraphQLHandler.js.map +1 -1
- package/createGraphQLSchema.d.ts +4 -4
- package/createGraphQLSchema.js +68 -41
- package/createGraphQLSchema.js.map +1 -1
- package/createRequestBody.d.ts +2 -0
- package/createRequestBody.js +26 -0
- package/createRequestBody.js.map +1 -0
- package/createResolverDecorator.d.ts +2 -0
- package/createResolverDecorator.js +5 -0
- package/createResolverDecorator.js.map +1 -0
- package/debugPlugins.d.ts +2 -2
- package/debugPlugins.js +4 -11
- package/debugPlugins.js.map +1 -1
- package/errors.js +2 -10
- package/errors.js.map +1 -1
- package/exports/api/graphql.d.ts +2 -0
- package/exports/api/graphql.js +4 -0
- package/exports/api/graphql.js.map +1 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaBuilder.d.ts +16 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaBuilder.js +64 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaBuilder.js.map +1 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaComposer.d.ts +13 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaComposer.js +29 -0
- package/features/GraphQLSchemaBuilder/GraphQLSchemaComposer.js.map +1 -0
- package/features/GraphQLSchemaBuilder/abstractions.d.ts +34 -0
- package/features/GraphQLSchemaBuilder/abstractions.js +5 -0
- package/features/GraphQLSchemaBuilder/abstractions.js.map +1 -0
- package/features/GraphQLSchemaBuilder/feature.d.ts +1 -0
- package/features/GraphQLSchemaBuilder/feature.js +10 -0
- package/features/GraphQLSchemaBuilder/feature.js.map +1 -0
- package/graphql/abstractions.core.d.ts +11 -0
- package/graphql/abstractions.core.js +10 -0
- package/graphql/abstractions.core.js.map +1 -0
- package/graphql/abstractions.d.ts +2 -0
- package/graphql/abstractions.js +4 -0
- package/graphql/abstractions.js.map +1 -0
- package/graphql/abstractions.public.d.ts +19 -0
- package/graphql/abstractions.public.js +12 -0
- package/graphql/abstractions.public.js.map +1 -0
- package/index.d.ts +10 -6
- package/index.js +11 -59
- package/index.js.map +1 -1
- package/interceptConsole.js +1 -8
- package/interceptConsole.js.map +1 -1
- package/package.json +23 -26
- package/plugins/GraphQLSchemaPlugin.d.ts +7 -3
- package/plugins/GraphQLSchemaPlugin.js +11 -12
- package/plugins/GraphQLSchemaPlugin.js.map +1 -1
- package/plugins/index.d.ts +1 -1
- package/plugins/index.js +1 -16
- package/plugins/index.js.map +1 -1
- package/processRequestBody.d.ts +4 -4
- package/processRequestBody.js +10 -10
- package/processRequestBody.js.map +1 -1
- package/responses.js +5 -16
- package/responses.js.map +1 -1
- package/types.d.ts +20 -13
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +3 -0
- package/utils/index.js.map +1 -0
- package/utils/resolve.d.ts +21 -0
- package/utils/resolve.js +19 -0
- package/utils/resolve.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/handler-graphql",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-rc.1",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"repository": {
|
|
@@ -14,37 +15,33 @@
|
|
|
14
15
|
"Adrian Smijulj <adrian@webiny.com>"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@graphql-tools/
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@webiny/
|
|
22
|
-
"@webiny/
|
|
18
|
+
"@graphql-tools/merge": "9.1.7",
|
|
19
|
+
"@graphql-tools/resolvers-composition": "7.0.26",
|
|
20
|
+
"@graphql-tools/schema": "10.0.31",
|
|
21
|
+
"@graphql-tools/utils": "11.0.0",
|
|
22
|
+
"@webiny/api": "6.0.0-rc.1",
|
|
23
|
+
"@webiny/di": "0.2.3",
|
|
24
|
+
"@webiny/error": "6.0.0-rc.1",
|
|
25
|
+
"@webiny/feature": "6.0.0-rc.1",
|
|
26
|
+
"@webiny/handler": "6.0.0-rc.1",
|
|
27
|
+
"@webiny/plugins": "6.0.0-rc.1",
|
|
28
|
+
"@webiny/utils": "6.0.0-rc.1",
|
|
23
29
|
"boolean": "3.2.0",
|
|
24
|
-
"graphql": "
|
|
25
|
-
"graphql-scalars": "1.
|
|
26
|
-
"graphql-tag": "2.12.6"
|
|
30
|
+
"graphql": "16.12.0",
|
|
31
|
+
"graphql-scalars": "1.25.0",
|
|
32
|
+
"graphql-tag": "2.12.6",
|
|
33
|
+
"zod": "3.25.76"
|
|
27
34
|
},
|
|
28
35
|
"devDependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@webiny/project-utils": "6.0.0-beta.0",
|
|
35
|
-
"jest": "29.7.0",
|
|
36
|
-
"jest-mock-console": "1.3.0",
|
|
37
|
-
"rimraf": "5.0.5",
|
|
38
|
-
"ttypescript": "1.5.15",
|
|
39
|
-
"typescript": "4.7.4"
|
|
36
|
+
"@webiny/build-tools": "6.0.0-rc.1",
|
|
37
|
+
"@webiny/handler-aws": "6.0.0-rc.1",
|
|
38
|
+
"rimraf": "6.1.3",
|
|
39
|
+
"typescript": "5.9.3",
|
|
40
|
+
"vitest": "4.0.18"
|
|
40
41
|
},
|
|
41
42
|
"publishConfig": {
|
|
42
43
|
"access": "public",
|
|
43
44
|
"directory": "dist"
|
|
44
45
|
},
|
|
45
|
-
"
|
|
46
|
-
"build": "yarn webiny run build",
|
|
47
|
-
"watch": "yarn webiny run watch"
|
|
48
|
-
},
|
|
49
|
-
"gitHead": "aa8dbfbbd5ad13ec271adba6f2431e02991a300f"
|
|
46
|
+
"gitHead": "36d702721ff9ed39fb21d6f5fe7922a2a8716e63"
|
|
50
47
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
+
import type { Context } from "@webiny/api/types.js";
|
|
1
2
|
import { Plugin } from "@webiny/plugins";
|
|
2
|
-
import { GraphQLSchemaDefinition, Resolvers,
|
|
3
|
-
import { Context } from "@webiny/api/types";
|
|
3
|
+
import type { GraphQLSchemaDefinition, ResolverDecorators, Resolvers, TypeDefs } from "../types.js";
|
|
4
4
|
export interface IGraphQLSchemaPlugin<TContext = Context> extends Plugin {
|
|
5
5
|
schema: GraphQLSchemaDefinition<TContext>;
|
|
6
|
+
isApplicable: (context: TContext) => boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface GraphQLSchemaPluginConfig<TContext> {
|
|
8
|
-
typeDefs?:
|
|
9
|
+
typeDefs?: TypeDefs;
|
|
9
10
|
resolvers?: Resolvers<TContext>;
|
|
11
|
+
resolverDecorators?: ResolverDecorators;
|
|
12
|
+
isApplicable?: (context: TContext) => boolean;
|
|
10
13
|
}
|
|
11
14
|
export declare class GraphQLSchemaPlugin<TContext = Context> extends Plugin implements IGraphQLSchemaPlugin<TContext> {
|
|
12
15
|
static readonly type: string;
|
|
13
16
|
protected config: GraphQLSchemaPluginConfig<TContext>;
|
|
14
17
|
constructor(config: GraphQLSchemaPluginConfig<TContext>);
|
|
15
18
|
get schema(): GraphQLSchemaDefinition<TContext>;
|
|
19
|
+
isApplicable(context: TContext): boolean;
|
|
16
20
|
}
|
|
17
21
|
export declare const createGraphQLSchemaPlugin: <T = Context>(config: GraphQLSchemaPluginConfig<T>) => GraphQLSchemaPlugin<T>;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createGraphQLSchemaPlugin = exports.GraphQLSchemaPlugin = void 0;
|
|
7
|
-
var _plugins = require("@webiny/plugins");
|
|
8
|
-
class GraphQLSchemaPlugin extends _plugins.Plugin {
|
|
1
|
+
import { Plugin } from "@webiny/plugins";
|
|
2
|
+
export class GraphQLSchemaPlugin extends Plugin {
|
|
9
3
|
static type = "graphql-schema";
|
|
10
4
|
constructor(config) {
|
|
11
5
|
super();
|
|
@@ -14,14 +8,19 @@ class GraphQLSchemaPlugin extends _plugins.Plugin {
|
|
|
14
8
|
get schema() {
|
|
15
9
|
return {
|
|
16
10
|
typeDefs: this.config.typeDefs || "",
|
|
17
|
-
resolvers: this.config.resolvers
|
|
11
|
+
resolvers: this.config.resolvers,
|
|
12
|
+
resolverDecorators: this.config.resolverDecorators
|
|
18
13
|
};
|
|
19
14
|
}
|
|
15
|
+
isApplicable(context) {
|
|
16
|
+
if (this.config.isApplicable) {
|
|
17
|
+
return this.config.isApplicable(context);
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
const createGraphQLSchemaPlugin = config => {
|
|
22
|
+
export const createGraphQLSchemaPlugin = config => {
|
|
23
23
|
return new GraphQLSchemaPlugin(config);
|
|
24
24
|
};
|
|
25
|
-
exports.createGraphQLSchemaPlugin = createGraphQLSchemaPlugin;
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=GraphQLSchemaPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Plugin","GraphQLSchemaPlugin","type","constructor","config","schema","typeDefs","resolvers","resolverDecorators","isApplicable","context","createGraphQLSchemaPlugin"],"sources":["GraphQLSchemaPlugin.ts"],"sourcesContent":["import type { Context } from \"@webiny/api/types.js\";\nimport { Plugin } from \"@webiny/plugins\";\nimport type { GraphQLSchemaDefinition, ResolverDecorators, Resolvers, TypeDefs } from \"~/types.js\";\n\nexport interface IGraphQLSchemaPlugin<TContext = Context> extends Plugin {\n schema: GraphQLSchemaDefinition<TContext>;\n isApplicable: (context: TContext) => boolean;\n}\n\nexport interface GraphQLSchemaPluginConfig<TContext> {\n typeDefs?: TypeDefs;\n resolvers?: Resolvers<TContext>;\n resolverDecorators?: ResolverDecorators;\n isApplicable?: (context: TContext) => boolean;\n}\n\nexport class GraphQLSchemaPlugin<TContext = Context>\n extends Plugin\n implements IGraphQLSchemaPlugin<TContext>\n{\n public static override readonly type: string = \"graphql-schema\";\n protected config: GraphQLSchemaPluginConfig<TContext>;\n\n constructor(config: GraphQLSchemaPluginConfig<TContext>) {\n super();\n this.config = config;\n }\n\n get schema(): GraphQLSchemaDefinition<TContext> {\n return {\n typeDefs: this.config.typeDefs || \"\",\n resolvers: this.config.resolvers,\n resolverDecorators: this.config.resolverDecorators\n };\n }\n\n isApplicable(context: TContext): boolean {\n if (this.config.isApplicable) {\n return this.config.isApplicable(context);\n }\n return true;\n }\n}\n\nexport const createGraphQLSchemaPlugin = <T = Context>(config: GraphQLSchemaPluginConfig<T>) => {\n return new GraphQLSchemaPlugin<T>(config);\n};\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,iBAAiB;AAexC,OAAO,MAAMC,mBAAmB,SACpBD,MAAM,CAElB;EACI,OAAgCE,IAAI,GAAW,gBAAgB;EAG/DC,WAAWA,CAACC,MAA2C,EAAE;IACrD,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEA,IAAIC,MAAMA,CAAA,EAAsC;IAC5C,OAAO;MACHC,QAAQ,EAAE,IAAI,CAACF,MAAM,CAACE,QAAQ,IAAI,EAAE;MACpCC,SAAS,EAAE,IAAI,CAACH,MAAM,CAACG,SAAS;MAChCC,kBAAkB,EAAE,IAAI,CAACJ,MAAM,CAACI;IACpC,CAAC;EACL;EAEAC,YAAYA,CAACC,OAAiB,EAAW;IACrC,IAAI,IAAI,CAACN,MAAM,CAACK,YAAY,EAAE;MAC1B,OAAO,IAAI,CAACL,MAAM,CAACK,YAAY,CAACC,OAAO,CAAC;IAC5C;IACA,OAAO,IAAI;EACf;AACJ;AAEA,OAAO,MAAMC,yBAAyB,GAAiBP,MAAoC,IAAK;EAC5F,OAAO,IAAIH,mBAAmB,CAAIG,MAAM,CAAC;AAC7C,CAAC","ignoreList":[]}
|
package/plugins/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./GraphQLSchemaPlugin";
|
|
1
|
+
export * from "./GraphQLSchemaPlugin.js";
|
package/plugins/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _GraphQLSchemaPlugin = require("./GraphQLSchemaPlugin");
|
|
7
|
-
Object.keys(_GraphQLSchemaPlugin).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _GraphQLSchemaPlugin[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _GraphQLSchemaPlugin[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from "./GraphQLSchemaPlugin.js";
|
|
17
2
|
|
|
18
3
|
//# sourceMappingURL=index.js.map
|
package/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./GraphQLSchemaPlugin.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
package/processRequestBody.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecutionResult, GraphQLSchema } from "graphql";
|
|
2
|
-
import { GraphQLRequestBody } from "./types";
|
|
3
|
-
import { Context } from "@webiny/api/types";
|
|
4
|
-
export declare const processRequestBody: <TData = Record<string, any>, TExtensions = Record<string, any>>(requestBody: GraphQLRequestBody | GraphQLRequestBody[], schema: GraphQLSchema, context: Context) => Promise<ExecutionResult<TData, TExtensions> | ExecutionResult<TData, TExtensions
|
|
1
|
+
import type { ExecutionResult, GraphQLSchema } from "graphql";
|
|
2
|
+
import type { GraphQLRequestBody } from "./types.js";
|
|
3
|
+
import type { Context } from "@webiny/api/types.js";
|
|
4
|
+
export declare const processRequestBody: <TData = Record<string, any>, TExtensions = Record<string, any>>(requestBody: GraphQLRequestBody | GraphQLRequestBody[], schema: GraphQLSchema, context: Context) => Promise<ExecutionResult<TData, TExtensions>[] | ExecutionResult<TData, TExtensions>>;
|
package/processRequestBody.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.processRequestBody = void 0;
|
|
7
|
-
var _graphql = require("graphql");
|
|
1
|
+
import { graphql } from "graphql";
|
|
8
2
|
const executeGraphQl = async (body, schema, context) => {
|
|
9
3
|
const {
|
|
10
4
|
query,
|
|
@@ -16,7 +10,14 @@ const executeGraphQl = async (body, schema, context) => {
|
|
|
16
10
|
schema,
|
|
17
11
|
context
|
|
18
12
|
}));
|
|
19
|
-
const result = await
|
|
13
|
+
const result = await graphql({
|
|
14
|
+
schema,
|
|
15
|
+
source: query,
|
|
16
|
+
rootValue: {},
|
|
17
|
+
contextValue: context,
|
|
18
|
+
variableValues: variables,
|
|
19
|
+
operationName
|
|
20
|
+
});
|
|
20
21
|
context.plugins.byType("graphql-after-query").forEach(pl => {
|
|
21
22
|
pl.apply({
|
|
22
23
|
result,
|
|
@@ -27,7 +28,7 @@ const executeGraphQl = async (body, schema, context) => {
|
|
|
27
28
|
});
|
|
28
29
|
return result;
|
|
29
30
|
};
|
|
30
|
-
const processRequestBody = async (requestBody, schema, context) => {
|
|
31
|
+
export const processRequestBody = async (requestBody, schema, context) => {
|
|
31
32
|
if (Array.isArray(requestBody)) {
|
|
32
33
|
const results = [];
|
|
33
34
|
for (const body of requestBody) {
|
|
@@ -38,6 +39,5 @@ const processRequestBody = async (requestBody, schema, context) => {
|
|
|
38
39
|
}
|
|
39
40
|
return await executeGraphQl(requestBody, schema, context);
|
|
40
41
|
};
|
|
41
|
-
exports.processRequestBody = processRequestBody;
|
|
42
42
|
|
|
43
43
|
//# sourceMappingURL=processRequestBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["graphql","executeGraphQl","body","schema","context","query","variables","operationName","plugins","byType","forEach","pl","apply","result","source","rootValue","contextValue","variableValues","processRequestBody","requestBody","Array","isArray","results","push"],"sources":["processRequestBody.ts"],"sourcesContent":["import type { ExecutionResult, GraphQLSchema } from \"graphql\";\nimport { graphql } from \"graphql\";\nimport type {\n GraphQLAfterQueryPlugin,\n GraphQLBeforeQueryPlugin,\n GraphQLRequestBody\n} from \"~/types.js\";\nimport type { Context } from \"@webiny/api/types.js\";\n\nconst executeGraphQl = async <TData = Record<string, any>, TExtensions = Record<string, any>>(\n body: GraphQLRequestBody,\n schema: GraphQLSchema,\n context: Context\n): Promise<ExecutionResult<TData, TExtensions>> => {\n const { query, variables, operationName } = body;\n\n context.plugins\n .byType<GraphQLBeforeQueryPlugin>(\"graphql-before-query\")\n .forEach(pl => pl.apply({ body, schema, context }));\n\n const result = await graphql({\n schema,\n source: query,\n rootValue: {},\n contextValue: context,\n variableValues: variables,\n operationName\n });\n\n context.plugins.byType<GraphQLAfterQueryPlugin>(\"graphql-after-query\").forEach(pl => {\n pl.apply({ result, body, schema, context });\n });\n\n return result as ExecutionResult<TData, TExtensions>;\n};\n\nexport const processRequestBody = async <\n TData = Record<string, any>,\n TExtensions = Record<string, any>\n>(\n requestBody: GraphQLRequestBody | GraphQLRequestBody[],\n schema: GraphQLSchema,\n context: Context\n): Promise<ExecutionResult<TData, TExtensions>[] | ExecutionResult<TData, TExtensions>> => {\n if (Array.isArray(requestBody)) {\n const results: ExecutionResult<TData, TExtensions>[] = [];\n for (const body of requestBody) {\n const result = await executeGraphQl<TData, TExtensions>(body, schema, context);\n results.push(result);\n }\n return results;\n }\n return await executeGraphQl<TData, TExtensions>(requestBody, schema, context);\n};\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,SAAS;AAQjC,MAAMC,cAAc,GAAG,MAAAA,CACnBC,IAAwB,EACxBC,MAAqB,EACrBC,OAAgB,KAC+B;EAC/C,MAAM;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAc,CAAC,GAAGL,IAAI;EAEhDE,OAAO,CAACI,OAAO,CACVC,MAAM,CAA2B,sBAAsB,CAAC,CACxDC,OAAO,CAACC,EAAE,IAAIA,EAAE,CAACC,KAAK,CAAC;IAAEV,IAAI;IAAEC,MAAM;IAAEC;EAAQ,CAAC,CAAC,CAAC;EAEvD,MAAMS,MAAM,GAAG,MAAMb,OAAO,CAAC;IACzBG,MAAM;IACNW,MAAM,EAAET,KAAK;IACbU,SAAS,EAAE,CAAC,CAAC;IACbC,YAAY,EAAEZ,OAAO;IACrBa,cAAc,EAAEX,SAAS;IACzBC;EACJ,CAAC,CAAC;EAEFH,OAAO,CAACI,OAAO,CAACC,MAAM,CAA0B,qBAAqB,CAAC,CAACC,OAAO,CAACC,EAAE,IAAI;IACjFA,EAAE,CAACC,KAAK,CAAC;MAAEC,MAAM;MAAEX,IAAI;MAAEC,MAAM;MAAEC;IAAQ,CAAC,CAAC;EAC/C,CAAC,CAAC;EAEF,OAAOS,MAAM;AACjB,CAAC;AAED,OAAO,MAAMK,kBAAkB,GAAG,MAAAA,CAI9BC,WAAsD,EACtDhB,MAAqB,EACrBC,OAAgB,KACuE;EACvF,IAAIgB,KAAK,CAACC,OAAO,CAACF,WAAW,CAAC,EAAE;IAC5B,MAAMG,OAA8C,GAAG,EAAE;IACzD,KAAK,MAAMpB,IAAI,IAAIiB,WAAW,EAAE;MAC5B,MAAMN,MAAM,GAAG,MAAMZ,cAAc,CAAqBC,IAAI,EAAEC,MAAM,EAAEC,OAAO,CAAC;MAC9EkB,OAAO,CAACC,IAAI,CAACV,MAAM,CAAC;IACxB;IACA,OAAOS,OAAO;EAClB;EACA,OAAO,MAAMrB,cAAc,CAAqBkB,WAAW,EAAEhB,MAAM,EAAEC,OAAO,CAAC;AACjF,CAAC","ignoreList":[]}
|
package/responses.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Response = exports.NotFoundResponse = exports.ListResponse = exports.ListErrorResponse = exports.ErrorResponse = void 0;
|
|
7
1
|
const defaultParams = {
|
|
8
2
|
code: "",
|
|
9
3
|
message: "",
|
|
10
4
|
data: null,
|
|
11
5
|
stack: null
|
|
12
6
|
};
|
|
13
|
-
class ErrorResponse {
|
|
7
|
+
export class ErrorResponse {
|
|
14
8
|
constructor(params) {
|
|
15
9
|
this.data = null;
|
|
16
10
|
const debug = process.env.DEBUG === "true";
|
|
@@ -28,8 +22,7 @@ class ErrorResponse {
|
|
|
28
22
|
};
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
|
-
|
|
32
|
-
class NotFoundResponse extends ErrorResponse {
|
|
25
|
+
export class NotFoundResponse extends ErrorResponse {
|
|
33
26
|
constructor(message) {
|
|
34
27
|
super({
|
|
35
28
|
code: "NOT_FOUND",
|
|
@@ -37,8 +30,7 @@ class NotFoundResponse extends ErrorResponse {
|
|
|
37
30
|
});
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
|
-
|
|
41
|
-
class ListErrorResponse {
|
|
33
|
+
export class ListErrorResponse {
|
|
42
34
|
constructor(params) {
|
|
43
35
|
this.meta = null;
|
|
44
36
|
this.data = null;
|
|
@@ -57,21 +49,18 @@ class ListErrorResponse {
|
|
|
57
49
|
};
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
|
-
|
|
61
|
-
class Response {
|
|
52
|
+
export class Response {
|
|
62
53
|
constructor(data) {
|
|
63
54
|
this.data = data;
|
|
64
55
|
this.error = null;
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
|
-
|
|
68
|
-
class ListResponse {
|
|
58
|
+
export class ListResponse {
|
|
69
59
|
constructor(data, meta) {
|
|
70
60
|
this.data = Array.isArray(data) ? data : [];
|
|
71
61
|
this.meta = meta || {};
|
|
72
62
|
this.error = null;
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
|
-
exports.ListResponse = ListResponse;
|
|
76
65
|
|
|
77
66
|
//# sourceMappingURL=responses.js.map
|
package/responses.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultParams","code","message","data","stack","ErrorResponse","constructor","params","debug","process","env","DEBUG","error","
|
|
1
|
+
{"version":3,"names":["defaultParams","code","message","data","stack","ErrorResponse","constructor","params","debug","process","env","DEBUG","error","NotFoundResponse","ListErrorResponse","meta","Response","ListResponse","Array","isArray"],"sources":["responses.ts"],"sourcesContent":["export interface ErrorResponseParams {\n message: string;\n code?: string;\n data?: any;\n stack?: string | null;\n}\n\nconst defaultParams: Required<ErrorResponseParams> = {\n code: \"\",\n message: \"\",\n data: null,\n stack: null\n};\n\nexport class ErrorResponse {\n public readonly data: null;\n public readonly error: {\n code: string;\n message: string;\n data: any;\n stack: string | null;\n };\n\n constructor(params: ErrorResponseParams) {\n this.data = null;\n\n const debug = process.env.DEBUG === \"true\";\n\n // Ensure `stack` is either `string` or `null`.\n let stack = defaultParams.stack;\n if (debug && params.stack) {\n stack = params.stack;\n }\n\n this.error = {\n code: params.code || defaultParams.code,\n message: params.message || defaultParams.message,\n data: params.data || defaultParams.data,\n stack: stack\n };\n }\n}\n\nexport class NotFoundResponse extends ErrorResponse {\n constructor(message: string) {\n super({\n code: \"NOT_FOUND\",\n message\n });\n }\n}\n\nexport class ListErrorResponse {\n public readonly data: null;\n public readonly meta: null;\n public readonly error: {\n code: string;\n message: string;\n data: any;\n stack: string | null;\n };\n\n constructor(params: ErrorResponseParams) {\n this.meta = null;\n this.data = null;\n\n const debug = process.env.DEBUG === \"true\";\n\n // Ensure `stack` is either `string` or `null`.\n let stack = defaultParams.stack;\n if (debug && params.stack) {\n stack = params.stack;\n }\n\n this.error = {\n code: params.code || defaultParams.code,\n message: params.message || defaultParams.message,\n data: params.data || defaultParams.data,\n stack: stack\n };\n }\n}\n\nexport class Response<T = any> {\n public readonly data: T;\n public readonly error: null;\n\n constructor(data: T) {\n this.data = data;\n this.error = null;\n }\n}\n\nexport class ListResponse<T, M> {\n public readonly data: Array<T>;\n public readonly meta: M;\n public readonly error: null;\n\n constructor(data: Array<T>, meta?: M) {\n this.data = Array.isArray(data) ? data : [];\n this.meta = meta || ({} as M);\n this.error = null;\n }\n}\n"],"mappings":"AAOA,MAAMA,aAA4C,GAAG;EACjDC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,EAAE;EACXC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,aAAa,CAAC;EASvBC,WAAWA,CAACC,MAA2B,EAAE;IACrC,IAAI,CAACJ,IAAI,GAAG,IAAI;IAEhB,MAAMK,KAAK,GAAGC,OAAO,CAACC,GAAG,CAACC,KAAK,KAAK,MAAM;;IAE1C;IACA,IAAIP,KAAK,GAAGJ,aAAa,CAACI,KAAK;IAC/B,IAAII,KAAK,IAAID,MAAM,CAACH,KAAK,EAAE;MACvBA,KAAK,GAAGG,MAAM,CAACH,KAAK;IACxB;IAEA,IAAI,CAACQ,KAAK,GAAG;MACTX,IAAI,EAAEM,MAAM,CAACN,IAAI,IAAID,aAAa,CAACC,IAAI;MACvCC,OAAO,EAAEK,MAAM,CAACL,OAAO,IAAIF,aAAa,CAACE,OAAO;MAChDC,IAAI,EAAEI,MAAM,CAACJ,IAAI,IAAIH,aAAa,CAACG,IAAI;MACvCC,KAAK,EAAEA;IACX,CAAC;EACL;AACJ;AAEA,OAAO,MAAMS,gBAAgB,SAASR,aAAa,CAAC;EAChDC,WAAWA,CAACJ,OAAe,EAAE;IACzB,KAAK,CAAC;MACFD,IAAI,EAAE,WAAW;MACjBC;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMY,iBAAiB,CAAC;EAU3BR,WAAWA,CAACC,MAA2B,EAAE;IACrC,IAAI,CAACQ,IAAI,GAAG,IAAI;IAChB,IAAI,CAACZ,IAAI,GAAG,IAAI;IAEhB,MAAMK,KAAK,GAAGC,OAAO,CAACC,GAAG,CAACC,KAAK,KAAK,MAAM;;IAE1C;IACA,IAAIP,KAAK,GAAGJ,aAAa,CAACI,KAAK;IAC/B,IAAII,KAAK,IAAID,MAAM,CAACH,KAAK,EAAE;MACvBA,KAAK,GAAGG,MAAM,CAACH,KAAK;IACxB;IAEA,IAAI,CAACQ,KAAK,GAAG;MACTX,IAAI,EAAEM,MAAM,CAACN,IAAI,IAAID,aAAa,CAACC,IAAI;MACvCC,OAAO,EAAEK,MAAM,CAACL,OAAO,IAAIF,aAAa,CAACE,OAAO;MAChDC,IAAI,EAAEI,MAAM,CAACJ,IAAI,IAAIH,aAAa,CAACG,IAAI;MACvCC,KAAK,EAAEA;IACX,CAAC;EACL;AACJ;AAEA,OAAO,MAAMY,QAAQ,CAAU;EAI3BV,WAAWA,CAACH,IAAO,EAAE;IACjB,IAAI,CAACA,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACS,KAAK,GAAG,IAAI;EACrB;AACJ;AAEA,OAAO,MAAMK,YAAY,CAAO;EAK5BX,WAAWA,CAACH,IAAc,EAAEY,IAAQ,EAAE;IAClC,IAAI,CAACZ,IAAI,GAAGe,KAAK,CAACC,OAAO,CAAChB,IAAI,CAAC,GAAGA,IAAI,GAAG,EAAE;IAC3C,IAAI,CAACY,IAAI,GAAGA,IAAI,IAAK,CAAC,CAAO;IAC7B,IAAI,CAACH,KAAK,GAAG,IAAI;EACrB;AACJ","ignoreList":[]}
|
package/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { GraphQLScalarType, GraphQLFieldResolver as BaseGraphQLFieldResolver, GraphQLSchema } from "graphql";
|
|
2
|
-
import { Plugin } from "@webiny/plugins/types";
|
|
3
|
-
import { Context } from "@webiny/api/types";
|
|
4
|
-
import { RouteMethodPath } from "@webiny/handler/types";
|
|
1
|
+
import type { GraphQLScalarType, GraphQLFieldResolver as BaseGraphQLFieldResolver, GraphQLSchema } from "graphql";
|
|
2
|
+
import type { Plugin } from "@webiny/plugins/types.js";
|
|
3
|
+
import type { Context, GenericRecord } from "@webiny/api/types.js";
|
|
4
|
+
import type { RouteMethodPath } from "@webiny/handler/types.js";
|
|
5
|
+
import type { ResolversComposition } from "@graphql-tools/resolvers-composition";
|
|
6
|
+
import type { IResolvers, TypeSource } from "@graphql-tools/utils";
|
|
5
7
|
export interface GraphQLScalarPlugin extends Plugin {
|
|
6
8
|
type: "graphql-scalar";
|
|
7
9
|
scalar: GraphQLScalarType;
|
|
@@ -10,19 +12,24 @@ export interface HandlerGraphQLOptions {
|
|
|
10
12
|
path?: RouteMethodPath;
|
|
11
13
|
debug?: boolean | string;
|
|
12
14
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
+
export type GraphQLFieldResolver<TSource = any, TArgs = any, TContext = Context> = BaseGraphQLFieldResolver<TSource, TContext, TArgs>;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `TypeDefs` instead.
|
|
18
|
+
*/
|
|
19
|
+
export type Types = TypeDefs;
|
|
20
|
+
export type TypeDefs = TypeSource;
|
|
15
21
|
export interface GraphQLSchemaPluginTypeArgs {
|
|
16
22
|
context?: any;
|
|
17
23
|
args?: any;
|
|
18
24
|
source?: any;
|
|
19
25
|
}
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export interface GraphQLSchemaDefinition<TContext> {
|
|
24
|
-
typeDefs:
|
|
26
|
+
export type Resolvers<TContext> = IResolvers<any, TContext>;
|
|
27
|
+
export type ResolverDecorator<TSource = any, TContext = any, TArgs = any> = ResolversComposition<GraphQLFieldResolver<TSource, TContext, TArgs>>;
|
|
28
|
+
export type ResolverDecorators = GenericRecord<string, ResolverDecorator[]>;
|
|
29
|
+
export interface GraphQLSchemaDefinition<TContext = any> {
|
|
30
|
+
typeDefs: TypeDefs;
|
|
25
31
|
resolvers?: Resolvers<TContext>;
|
|
32
|
+
resolverDecorators?: ResolverDecorators;
|
|
26
33
|
}
|
|
27
34
|
export interface GraphQLSchemaPlugin<TContext extends Context = Context> extends Plugin {
|
|
28
35
|
type: "graphql-schema";
|
|
@@ -30,8 +37,8 @@ export interface GraphQLSchemaPlugin<TContext extends Context = Context> extends
|
|
|
30
37
|
}
|
|
31
38
|
export interface GraphQLRequestBody {
|
|
32
39
|
query: string;
|
|
33
|
-
variables
|
|
34
|
-
operationName
|
|
40
|
+
variables?: Record<string, any> | null;
|
|
41
|
+
operationName?: string;
|
|
35
42
|
}
|
|
36
43
|
export interface GraphQLBeforeQueryPlugin<TContext extends Context = Context> extends Plugin {
|
|
37
44
|
type: "graphql-before-query";
|
package/types.js
CHANGED
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {\n GraphQLScalarType,\n GraphQLFieldResolver as BaseGraphQLFieldResolver,\n GraphQLSchema\n} from \"graphql\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { Context } from \"@webiny/api/types\";\nimport { RouteMethodPath } from \"@webiny/handler/types\";\n\nexport interface GraphQLScalarPlugin extends Plugin {\n type: \"graphql-scalar\";\n scalar: GraphQLScalarType;\n}\n\nexport interface HandlerGraphQLOptions {\n path?: RouteMethodPath;\n debug?: boolean | string;\n}\n\nexport type GraphQLFieldResolver<\n TSource = any,\n TArgs = any,\n TContext = Context\n> = BaseGraphQLFieldResolver<TSource, TContext, TArgs>;\n\n
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n GraphQLScalarType,\n GraphQLFieldResolver as BaseGraphQLFieldResolver,\n GraphQLSchema\n} from \"graphql\";\nimport type { Plugin } from \"@webiny/plugins/types.js\";\nimport type { Context, GenericRecord } from \"@webiny/api/types.js\";\nimport type { RouteMethodPath } from \"@webiny/handler/types.js\";\nimport type { ResolversComposition } from \"@graphql-tools/resolvers-composition\";\nimport type { IResolvers, TypeSource } from \"@graphql-tools/utils\";\n\nexport interface GraphQLScalarPlugin extends Plugin {\n type: \"graphql-scalar\";\n scalar: GraphQLScalarType;\n}\n\nexport interface HandlerGraphQLOptions {\n path?: RouteMethodPath;\n debug?: boolean | string;\n}\n\nexport type GraphQLFieldResolver<\n TSource = any,\n TArgs = any,\n TContext = Context\n> = BaseGraphQLFieldResolver<TSource, TContext, TArgs>;\n\n/**\n * @deprecated Use `TypeDefs` instead.\n */\nexport type Types = TypeDefs;\nexport type TypeDefs = TypeSource;\n\nexport interface GraphQLSchemaPluginTypeArgs {\n context?: any;\n args?: any;\n source?: any;\n}\n\nexport type Resolvers<TContext> = IResolvers<any, TContext>;\n\nexport type ResolverDecorator<TSource = any, TContext = any, TArgs = any> = ResolversComposition<\n GraphQLFieldResolver<TSource, TContext, TArgs>\n>;\n\nexport type ResolverDecorators = GenericRecord<string, ResolverDecorator[]>;\n\nexport interface GraphQLSchemaDefinition<TContext = any> {\n typeDefs: TypeDefs;\n resolvers?: Resolvers<TContext>;\n resolverDecorators?: ResolverDecorators;\n}\n\nexport interface GraphQLSchemaPlugin<TContext extends Context = Context> extends Plugin {\n type: \"graphql-schema\";\n schema: GraphQLSchemaDefinition<TContext>;\n}\n\nexport interface GraphQLRequestBody {\n query: string;\n variables?: Record<string, any> | null;\n operationName?: string;\n}\n\nexport interface GraphQLBeforeQueryPlugin<TContext extends Context = Context> extends Plugin {\n type: \"graphql-before-query\";\n apply(params: { body: GraphQLRequestBody; schema: GraphQLSchema; context: TContext }): void;\n}\n\nexport interface GraphQLAfterQueryPlugin<TContext extends Context = Context> extends Plugin {\n type: \"graphql-after-query\";\n apply(params: {\n result: any;\n body: GraphQLRequestBody;\n schema: GraphQLSchema;\n context: TContext;\n }): void;\n}\n"],"mappings":"","ignoreList":[]}
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resolve.js";
|
package/utils/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./resolve.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "../responses.js";
|
|
2
|
+
import type { GenericRecord } from "@webiny/api/types.js";
|
|
3
|
+
export interface Meta {
|
|
4
|
+
totalCount: number;
|
|
5
|
+
hasMoreItems: boolean;
|
|
6
|
+
cursor: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const emptyResolver: () => {};
|
|
9
|
+
interface ResolveCallable<T = GenericRecord> {
|
|
10
|
+
(): Promise<T>;
|
|
11
|
+
}
|
|
12
|
+
export declare const resolve: <T = GenericRecord>(fn: ResolveCallable<T>) => Promise<ErrorResponse | Response<Awaited<T>>>;
|
|
13
|
+
interface ResolveListCallable<T> {
|
|
14
|
+
(): Promise<IListResult<T>>;
|
|
15
|
+
}
|
|
16
|
+
interface IListResult<T = GenericRecord> {
|
|
17
|
+
items: T[];
|
|
18
|
+
meta: Meta;
|
|
19
|
+
}
|
|
20
|
+
export declare const resolveList: <T = GenericRecord>(fn: ResolveListCallable<T>) => Promise<ListErrorResponse | ListResponse<T, Meta>>;
|
|
21
|
+
export {};
|
package/utils/resolve.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "../responses.js";
|
|
2
|
+
export const emptyResolver = () => ({});
|
|
3
|
+
export const resolve = async fn => {
|
|
4
|
+
try {
|
|
5
|
+
return new Response(await fn());
|
|
6
|
+
} catch (ex) {
|
|
7
|
+
return new ErrorResponse(ex);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const resolveList = async fn => {
|
|
11
|
+
try {
|
|
12
|
+
const result = await fn();
|
|
13
|
+
return new ListResponse(result.items, result.meta);
|
|
14
|
+
} catch (ex) {
|
|
15
|
+
return new ListErrorResponse(ex);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ErrorResponse","ListErrorResponse","ListResponse","Response","emptyResolver","resolve","fn","ex","resolveList","result","items","meta"],"sources":["resolve.ts"],"sourcesContent":["import { ErrorResponse, ListErrorResponse, ListResponse, Response } from \"~/responses.js\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\n\nexport interface Meta {\n totalCount: number;\n hasMoreItems: boolean;\n cursor: string | null;\n}\n\nexport const emptyResolver = () => ({});\n\ninterface ResolveCallable<T = GenericRecord> {\n (): Promise<T>;\n}\n\nexport const resolve = async <T = GenericRecord>(fn: ResolveCallable<T>) => {\n try {\n return new Response(await fn());\n } catch (ex) {\n return new ErrorResponse(ex);\n }\n};\n\ninterface ResolveListCallable<T> {\n (): Promise<IListResult<T>>;\n}\n\ninterface IListResult<T = GenericRecord> {\n items: T[];\n meta: Meta;\n}\n\nexport const resolveList = async <T = GenericRecord>(fn: ResolveListCallable<T>) => {\n try {\n const result = (await fn()) as IListResult<T>;\n return new ListResponse(result.items, result.meta);\n } catch (ex) {\n return new ListErrorResponse(ex);\n }\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,iBAAiB,EAAEC,YAAY,EAAEC,QAAQ;AASjE,OAAO,MAAMC,aAAa,GAAGA,CAAA,MAAO,CAAC,CAAC,CAAC;AAMvC,OAAO,MAAMC,OAAO,GAAG,MAA0BC,EAAsB,IAAK;EACxE,IAAI;IACA,OAAO,IAAIH,QAAQ,CAAC,MAAMG,EAAE,CAAC,CAAC,CAAC;EACnC,CAAC,CAAC,OAAOC,EAAE,EAAE;IACT,OAAO,IAAIP,aAAa,CAACO,EAAE,CAAC;EAChC;AACJ,CAAC;AAWD,OAAO,MAAMC,WAAW,GAAG,MAA0BF,EAA0B,IAAK;EAChF,IAAI;IACA,MAAMG,MAAM,GAAI,MAAMH,EAAE,CAAC,CAAoB;IAC7C,OAAO,IAAIJ,YAAY,CAACO,MAAM,CAACC,KAAK,EAAED,MAAM,CAACE,IAAI,CAAC;EACtD,CAAC,CAAC,OAAOJ,EAAE,EAAE;IACT,OAAO,IAAIN,iBAAiB,CAACM,EAAE,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
|