@cedarjs/graphql-server 6.0.0-rc.189 → 6.0.0-rc.221
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/dist/createGraphQLYoga.js +19 -19
- package/dist/directives/makeDirectives.d.ts +2 -2
- package/dist/directives/makeDirectives.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/makeMergedSchema.d.ts +6 -6
- package/dist/makeMergedSchema.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +8 -8
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +20 -16
- package/dist/plugins/{useRedwoodAuthContext.d.ts → useCedarAuthContext.d.ts} +2 -2
- package/dist/plugins/useCedarAuthContext.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodAuthContext.js → useCedarAuthContext.js} +2 -2
- package/dist/plugins/{useRedwoodError.d.ts → useCedarError.d.ts} +4 -4
- package/dist/plugins/useCedarError.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodError.js → useCedarError.js} +5 -5
- package/dist/plugins/{useRedwoodGlobalContextSetter.d.ts → useCedarGlobalContextSetter.d.ts} +2 -2
- package/dist/plugins/useCedarGlobalContextSetter.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodGlobalContextSetter.js → useCedarGlobalContextSetter.js} +2 -2
- package/dist/plugins/{useRedwoodLogger.d.ts → useCedarLogger.d.ts} +2 -2
- package/dist/plugins/useCedarLogger.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodLogger.js → useCedarLogger.js} +2 -2
- package/dist/plugins/{useRedwoodOpenTelemetry.d.ts → useCedarOpenTelemetry.d.ts} +3 -3
- package/dist/plugins/useCedarOpenTelemetry.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodOpenTelemetry.js → useCedarOpenTelemetry.js} +3 -3
- package/dist/plugins/{useRedwoodPopulateContext.d.ts → useCedarPopulateContext.d.ts} +2 -2
- package/dist/plugins/useCedarPopulateContext.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodPopulateContext.js → useCedarPopulateContext.js} +2 -2
- package/dist/plugins/{useRedwoodTrustedDocuments.d.ts → useCedarTrustedDocuments.d.ts} +5 -3
- package/dist/plugins/useCedarTrustedDocuments.d.ts.map +1 -0
- package/dist/plugins/{useRedwoodTrustedDocuments.js → useCedarTrustedDocuments.js} +2 -2
- package/dist/plugins/useRedwoodDirective.d.ts +9 -3
- package/dist/plugins/useRedwoodDirective.d.ts.map +1 -1
- package/dist/plugins/useRedwoodDirective.js +3 -1
- package/dist/subscriptions/makeSubscriptions.d.ts +3 -3
- package/dist/subscriptions/makeSubscriptions.d.ts.map +1 -1
- package/dist/types.d.ts +13 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -10
- package/dist/plugins/useRedwoodAuthContext.d.ts.map +0 -1
- package/dist/plugins/useRedwoodError.d.ts.map +0 -1
- package/dist/plugins/useRedwoodGlobalContextSetter.d.ts.map +0 -1
- package/dist/plugins/useRedwoodLogger.d.ts.map +0 -1
- package/dist/plugins/useRedwoodOpenTelemetry.d.ts.map +0 -1
- package/dist/plugins/useRedwoodPopulateContext.d.ts.map +0 -1
- package/dist/plugins/useRedwoodTrustedDocuments.d.ts.map +0 -1
|
@@ -13,14 +13,14 @@ import { configureGraphQLIntrospection } from "./introspection.js";
|
|
|
13
13
|
import { makeMergedSchema } from "./makeMergedSchema.js";
|
|
14
14
|
import {
|
|
15
15
|
useArmor,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
useCedarAuthContext,
|
|
17
|
+
useCedarDirective,
|
|
18
|
+
useCedarError,
|
|
19
|
+
useCedarGlobalContextSetter,
|
|
20
|
+
useCedarOpenTelemetry,
|
|
21
|
+
useCedarLogger,
|
|
22
|
+
useCedarPopulateContext,
|
|
23
|
+
useCedarTrustedDocuments
|
|
24
24
|
} from "./plugins/index.js";
|
|
25
25
|
import { makeSubscriptions } from "./subscriptions/makeSubscriptions.js";
|
|
26
26
|
const createGraphQLYoga = async ({
|
|
@@ -49,15 +49,15 @@ const createGraphQLYoga = async ({
|
|
|
49
49
|
includeScalars
|
|
50
50
|
}) => {
|
|
51
51
|
let schema;
|
|
52
|
-
let
|
|
52
|
+
let cedarDirectivePlugins = [];
|
|
53
53
|
const logger = loggerConfig.logger;
|
|
54
54
|
const isDevEnv = process.env.NODE_ENV === "development";
|
|
55
55
|
try {
|
|
56
56
|
const projectDirectives = makeDirectivesForPlugin(directives);
|
|
57
57
|
if (projectDirectives.length > 0) {
|
|
58
58
|
;
|
|
59
|
-
|
|
60
|
-
(directive) =>
|
|
59
|
+
cedarDirectivePlugins = projectDirectives.map(
|
|
60
|
+
(directive) => useCedarDirective(directive)
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
let projectSubscriptions = [];
|
|
@@ -94,14 +94,14 @@ const createGraphQLYoga = async ({
|
|
|
94
94
|
if (disableIntrospection) {
|
|
95
95
|
plugins.push(useDisableIntrospection());
|
|
96
96
|
}
|
|
97
|
-
plugins.push(
|
|
98
|
-
plugins.push(
|
|
97
|
+
plugins.push(useCedarAuthContext(getCurrentUser, authDecoder));
|
|
98
|
+
plugins.push(useCedarGlobalContextSetter());
|
|
99
99
|
if (context) {
|
|
100
|
-
plugins.push(
|
|
100
|
+
plugins.push(useCedarPopulateContext(context));
|
|
101
101
|
}
|
|
102
|
-
plugins.push(...
|
|
102
|
+
plugins.push(...cedarDirectivePlugins);
|
|
103
103
|
if (openTelemetryOptions !== void 0) {
|
|
104
|
-
plugins.push(
|
|
104
|
+
plugins.push(useCedarOpenTelemetry(openTelemetryOptions));
|
|
105
105
|
}
|
|
106
106
|
plugins.push(useArmor(logger, armorConfig));
|
|
107
107
|
const defaultAllowedOperations = [
|
|
@@ -115,12 +115,12 @@ const createGraphQLYoga = async ({
|
|
|
115
115
|
useFilterAllowedOperations(allowedOperations || defaultAllowedOperations)
|
|
116
116
|
);
|
|
117
117
|
if (trustedDocuments && !trustedDocuments.disabled) {
|
|
118
|
-
plugins.push(
|
|
118
|
+
plugins.push(useCedarTrustedDocuments(trustedDocuments));
|
|
119
119
|
}
|
|
120
120
|
if (extraPlugins && extraPlugins.length > 0) {
|
|
121
121
|
plugins.push(...extraPlugins);
|
|
122
122
|
}
|
|
123
|
-
plugins.push(
|
|
123
|
+
plugins.push(useCedarError(logger));
|
|
124
124
|
plugins.push(
|
|
125
125
|
useReadinessCheck({
|
|
126
126
|
endpoint: graphiQLEndpoint + "/readiness",
|
|
@@ -138,7 +138,7 @@ const createGraphQLYoga = async ({
|
|
|
138
138
|
}
|
|
139
139
|
})
|
|
140
140
|
);
|
|
141
|
-
plugins.push(
|
|
141
|
+
plugins.push(useCedarLogger(loggerConfig));
|
|
142
142
|
const yoga = createYoga({
|
|
143
143
|
id: healthCheckId,
|
|
144
144
|
landingPage: isDevEnv,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DocumentNode } from 'graphql';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CedarDirective, TransformerDirective, TransformerDirectiveFunc, ValidatorDirective, ValidatorDirectiveFunc } from '../plugins/useRedwoodDirective.js';
|
|
3
3
|
export type DirectiveGlobImports = Record<string, any>;
|
|
4
|
-
export declare const makeDirectivesForPlugin: (directiveGlobs: DirectiveGlobImports) =>
|
|
4
|
+
export declare const makeDirectivesForPlugin: (directiveGlobs: DirectiveGlobImports) => CedarDirective[];
|
|
5
5
|
export declare const getDirectiveName: (schema: DocumentNode) => string | undefined;
|
|
6
6
|
export declare const createValidatorDirective: (schema: DocumentNode, directiveFunc: ValidatorDirectiveFunc) => ValidatorDirective;
|
|
7
7
|
export declare const createTransformerDirective: (schema: DocumentNode, directiveFunc: TransformerDirectiveFunc) => TransformerDirective;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeDirectives.d.ts","sourceRoot":"","sources":["../../src/directives/makeDirectives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAEjD,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"makeDirectives.d.ts","sourceRoot":"","sources":["../../src/directives/makeDirectives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAEjD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,mCAAmC,CAAA;AAW1C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEtD,eAAO,MAAM,uBAAuB,GAClC,gBAAgB,oBAAoB,KACnC,cAAc,EAwBhB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,uBAMpD,CAAA;AAED,eAAO,MAAM,wBAAwB,GACnC,QAAQ,YAAY,EACpB,eAAe,sBAAsB,KACpC,kBAmBF,CAAA;AAED,eAAO,MAAM,0BAA0B,GACrC,QAAQ,YAAY,EACpB,eAAe,wBAAwB,KACtC,oBAmBF,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export * from './makeMergedSchema.js';
|
|
|
7
7
|
export * from './createGraphQLYoga.js';
|
|
8
8
|
export * from './types.js';
|
|
9
9
|
export { createValidatorDirective, createTransformerDirective, getDirectiveName, makeDirectivesForPlugin, } from './directives/makeDirectives.js';
|
|
10
|
-
export { hasDirective, DirectiveType, useRedwoodDirective, } from './plugins/useRedwoodDirective.js';
|
|
11
|
-
export type { DirectiveParams, RedwoodDirective, ValidatorDirective, ValidatorDirectiveFunc, TransformerDirective, TransformerDirectiveFunc, ValidateArgs, TransformArgs, } from './plugins/useRedwoodDirective.js';
|
|
10
|
+
export { hasDirective, DirectiveType, useCedarDirective, useRedwoodDirective, } from './plugins/useRedwoodDirective.js';
|
|
11
|
+
export type { DirectiveParams, CedarDirective, RedwoodDirective, ValidatorDirective, ValidatorDirectiveFunc, TransformerDirective, TransformerDirectiveFunc, ValidateArgs, TransformArgs, } from './plugins/useRedwoodDirective.js';
|
|
12
12
|
export * as rootSchema from './rootSchema.js';
|
|
13
13
|
export { context, setContext } from '@cedarjs/context';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,cAAc,8BAA8B,CAAA;AAE5C,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAE1B,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AAEzC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,aAAa,GACd,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAG7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,cAAc,8BAA8B,CAAA;AAE5C,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAE1B,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AAEzC,YAAY,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,aAAa,GACd,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAG7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
hasDirective,
|
|
17
17
|
DirectiveType,
|
|
18
|
+
useCedarDirective,
|
|
18
19
|
useRedwoodDirective
|
|
19
20
|
} from "./plugins/useRedwoodDirective.js";
|
|
20
21
|
import * as rootSchema from "./rootSchema.js";
|
|
@@ -29,5 +30,6 @@ export {
|
|
|
29
30
|
makeDirectivesForPlugin,
|
|
30
31
|
rootSchema,
|
|
31
32
|
setContext,
|
|
33
|
+
useCedarDirective,
|
|
32
34
|
useRedwoodDirective
|
|
33
35
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
|
|
2
2
|
import type { GraphQLSchema } from 'graphql';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { ServicesGlobImports, SdlGlobImports,
|
|
3
|
+
import type { CedarDirective } from './plugins/useRedwoodDirective.js';
|
|
4
|
+
import type { CedarSubscription } from './subscriptions/makeSubscriptions.js';
|
|
5
|
+
import type { ServicesGlobImports, SdlGlobImports, CedarScalarConfig } from './types.js';
|
|
6
6
|
export declare const makeMergedSchema: ({ sdls, services, schemaOptions, directives, subscriptions, includeScalars, }: {
|
|
7
7
|
sdls: SdlGlobImports;
|
|
8
8
|
services: ServicesGlobImports;
|
|
9
|
-
directives:
|
|
10
|
-
subscriptions:
|
|
11
|
-
includeScalars?:
|
|
9
|
+
directives: CedarDirective[];
|
|
10
|
+
subscriptions: CedarSubscription[];
|
|
11
|
+
includeScalars?: CedarScalarConfig;
|
|
12
12
|
/**
|
|
13
13
|
* A list of options passed to [makeExecutableSchema](https://www.graphql-tools.com/docs/generate-schema/#makeexecutableschemaoptions).
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeMergedSchema.d.ts","sourceRoot":"","sources":["../src/makeMergedSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAUxE,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"makeMergedSchema.d.ts","sourceRoot":"","sources":["../src/makeMergedSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAUxE,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,KAAK,EAEV,mBAAmB,EAEnB,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAuUnB,eAAO,MAAM,gBAAgB,GAAI,+EAO9B;IACD,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,cAAc,CAAC,EAAE,iBAAiB,CAAA;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAA;CACrD,kBA+CA,CAAA"}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { useArmor } from './useArmor.js';
|
|
2
|
-
export {
|
|
3
|
-
export { useRedwoodDirective } from './useRedwoodDirective.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
2
|
+
export { useCedarAuthContext } from './useCedarAuthContext.js';
|
|
3
|
+
export { useCedarDirective, useRedwoodDirective, } from './useRedwoodDirective.js';
|
|
4
|
+
export { useCedarError } from './useCedarError.js';
|
|
5
|
+
export { useCedarGlobalContextSetter } from './useCedarGlobalContextSetter.js';
|
|
6
|
+
export { useCedarLogger } from './useCedarLogger.js';
|
|
7
|
+
export { useCedarTrustedDocuments } from './useCedarTrustedDocuments.js';
|
|
8
|
+
export { useCedarPopulateContext } from './useCedarPopulateContext.js';
|
|
9
|
+
export { useCedarOpenTelemetry } from './useCedarOpenTelemetry.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { useArmor } from "./useArmor.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { useCedarAuthContext } from "./useCedarAuthContext.js";
|
|
3
|
+
import {
|
|
4
|
+
useCedarDirective,
|
|
5
|
+
useRedwoodDirective
|
|
6
|
+
} from "./useRedwoodDirective.js";
|
|
7
|
+
import { useCedarError } from "./useCedarError.js";
|
|
8
|
+
import { useCedarGlobalContextSetter } from "./useCedarGlobalContextSetter.js";
|
|
9
|
+
import { useCedarLogger } from "./useCedarLogger.js";
|
|
10
|
+
import { useCedarTrustedDocuments } from "./useCedarTrustedDocuments.js";
|
|
11
|
+
import { useCedarPopulateContext } from "./useCedarPopulateContext.js";
|
|
12
|
+
import { useCedarOpenTelemetry } from "./useCedarOpenTelemetry.js";
|
|
10
13
|
export {
|
|
11
14
|
useArmor,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
useCedarAuthContext,
|
|
16
|
+
useCedarDirective,
|
|
17
|
+
useCedarError,
|
|
18
|
+
useCedarGlobalContextSetter,
|
|
19
|
+
useCedarLogger,
|
|
20
|
+
useCedarOpenTelemetry,
|
|
21
|
+
useCedarPopulateContext,
|
|
22
|
+
useCedarTrustedDocuments,
|
|
23
|
+
useRedwoodDirective
|
|
20
24
|
};
|
|
@@ -5,5 +5,5 @@ import type { CedarGraphQLContext, GraphQLHandlerOptions } from '../types.js';
|
|
|
5
5
|
* Envelop plugin for injecting the current user into the GraphQL Context,
|
|
6
6
|
* based on custom getCurrentUser function.
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
9
|
-
//# sourceMappingURL=
|
|
8
|
+
export declare const useCedarAuthContext: (getCurrentUser: GraphQLHandlerOptions["getCurrentUser"], authDecoder?: Decoder | Decoder[]) => Plugin<CedarGraphQLContext>;
|
|
9
|
+
//# sourceMappingURL=useCedarAuthContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarAuthContext.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarAuthContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAsB,OAAO,EAAE,MAAM,cAAc,CAAA;AAG/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,gBAAgB,qBAAqB,CAAC,gBAAgB,CAAC,EACvD,cAAc,OAAO,GAAG,OAAO,EAAE,KAChC,MAAM,CAAC,mBAAmB,CA2C5B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasAuthDecoder } from "@cedarjs/api";
|
|
2
|
-
const
|
|
2
|
+
const useCedarAuthContext = (getCurrentUser, authDecoder) => {
|
|
3
3
|
return {
|
|
4
4
|
async onContextBuilding({ context, extendContext }) {
|
|
5
5
|
if (!context.cedarContext && hasAuthDecoder(authDecoder)) {
|
|
@@ -26,5 +26,5 @@ const useRedwoodAuthContext = (getCurrentUser, authDecoder) => {
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
useCedarAuthContext
|
|
30
30
|
};
|
|
@@ -2,13 +2,13 @@ import type { Plugin } from 'graphql-yoga';
|
|
|
2
2
|
import type { Logger } from '@cedarjs/api/logger';
|
|
3
3
|
import type { CedarGraphQLContext } from '../types.js';
|
|
4
4
|
/**
|
|
5
|
-
* Converts
|
|
5
|
+
* Converts CedarErrors to GraphQLErrors
|
|
6
6
|
*
|
|
7
7
|
* This is a workaround for the fact that graphql-yoga doesn't support custom error types.
|
|
8
8
|
*
|
|
9
9
|
* Yoga automatically masks unexpected errors and prevents leaking sensitive information to clients.
|
|
10
10
|
*
|
|
11
|
-
* Since
|
|
11
|
+
* Since CedarErrors (such as ServiceValidation errors) are expected,
|
|
12
12
|
* we need to convert them to GraphQLErrors so that they are not masked.
|
|
13
13
|
*
|
|
14
14
|
* See: https://the-guild.dev/graphql/yoga-server/docs/features/error-masking
|
|
@@ -16,5 +16,5 @@ import type { CedarGraphQLContext } from '../types.js';
|
|
|
16
16
|
* @param logger
|
|
17
17
|
* @returns ExecutionResult
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
20
|
-
//# sourceMappingURL=
|
|
19
|
+
export declare const useCedarError: (logger: Logger) => Plugin<CedarGraphQLContext>;
|
|
20
|
+
//# sourceMappingURL=useCedarError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarError.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAO1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,MAAM,CAAC,mBAAmB,CAsCxE,CAAA"}
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
handleStreamOrSingleExecutionResult,
|
|
3
3
|
createGraphQLError
|
|
4
4
|
} from "graphql-yoga";
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
5
|
+
import { CedarError } from "@cedarjs/api";
|
|
6
|
+
const useCedarError = (logger) => {
|
|
7
7
|
return {
|
|
8
8
|
async onExecute() {
|
|
9
9
|
return {
|
|
@@ -12,10 +12,10 @@ const useRedwoodError = (logger) => {
|
|
|
12
12
|
payload,
|
|
13
13
|
({ result, setResult }) => {
|
|
14
14
|
const errors = result.errors?.map((error) => {
|
|
15
|
-
if (error.originalError instanceof
|
|
15
|
+
if (error.originalError instanceof CedarError) {
|
|
16
16
|
logger.debug(
|
|
17
17
|
{ custom: { name: error.originalError.name } },
|
|
18
|
-
"Converting
|
|
18
|
+
"Converting CedarError to GraphQLError"
|
|
19
19
|
);
|
|
20
20
|
return createGraphQLError(error.message, {
|
|
21
21
|
extensions: error.extensions
|
|
@@ -37,5 +37,5 @@ const useRedwoodError = (logger) => {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
useCedarError
|
|
41
41
|
};
|
package/dist/plugins/{useRedwoodGlobalContextSetter.d.ts → useCedarGlobalContextSetter.d.ts}
RENAMED
|
@@ -5,5 +5,5 @@ import type { CedarGraphQLContext } from '../types.js';
|
|
|
5
5
|
* the CedarJS global context which can be imported with:
|
|
6
6
|
* `import { context } from '@cedarjs/context'`
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
9
|
-
//# sourceMappingURL=
|
|
8
|
+
export declare const useCedarGlobalContextSetter: () => Plugin<CedarGraphQLContext>;
|
|
9
|
+
//# sourceMappingURL=useCedarGlobalContextSetter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarGlobalContextSetter.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarGlobalContextSetter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAO,MAAM,CAAC,mBAAmB,CAMvE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setContext } from "@cedarjs/context";
|
|
2
|
-
const
|
|
2
|
+
const useCedarGlobalContextSetter = () => ({
|
|
3
3
|
onContextBuilding() {
|
|
4
4
|
return ({ context }) => {
|
|
5
5
|
setContext(context);
|
|
@@ -7,5 +7,5 @@ const useRedwoodGlobalContextSetter = () => ({
|
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
useCedarGlobalContextSetter
|
|
11
11
|
};
|
|
@@ -110,6 +110,6 @@ export type LoggerConfig = {
|
|
|
110
110
|
* @see https://www.envelop.dev/docs/plugins/lifecycle
|
|
111
111
|
* @returns
|
|
112
112
|
*/
|
|
113
|
-
export declare const
|
|
113
|
+
export declare const useCedarLogger: (loggerConfig: LoggerConfig) => Plugin<CedarGraphQLContext>;
|
|
114
114
|
export {};
|
|
115
|
-
//# sourceMappingURL=
|
|
115
|
+
//# sourceMappingURL=useCedarLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarLogger.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarLogger.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAI1C,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAGlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;;;;;;;;;;GAaG;AACH,KAAK,oBAAoB,GAAG;IAC1B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,EAAE,eAAe,GAAG,MAAM,CAAA;IAEhC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AA+DD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GACzB,cAAc,YAAY,KACzB,MAAM,CAAC,mBAAmB,CAgH5B,CAAA"}
|
|
@@ -39,7 +39,7 @@ const logResult = (loggerConfig, envelopLogger, operationName) => ({ result }) =
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
const
|
|
42
|
+
const useCedarLogger = (loggerConfig) => {
|
|
43
43
|
const logger = loggerConfig.logger;
|
|
44
44
|
const level = loggerConfig.options?.level || logger.level || "warn";
|
|
45
45
|
const childLogger = logger.child({
|
|
@@ -128,5 +128,5 @@ const useRedwoodLogger = (loggerConfig) => {
|
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
|
-
|
|
131
|
+
useCedarLogger
|
|
132
132
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from '@envelop/core';
|
|
2
2
|
import * as opentelemetry from '@opentelemetry/api';
|
|
3
|
-
import type {
|
|
3
|
+
import type { CedarOpenTelemetryConfig } from '../types.js';
|
|
4
4
|
export declare enum AttributeName {
|
|
5
5
|
EXECUTION_ERROR = "graphql.execute.error",
|
|
6
6
|
EXECUTION_RESULT = "graphql.execute.result",
|
|
@@ -17,6 +17,6 @@ declare const tracingSpanSymbol = "OPEN_TELEMETRY_GRAPHQL";
|
|
|
17
17
|
type PluginContext = {
|
|
18
18
|
[tracingSpanSymbol]: opentelemetry.Span;
|
|
19
19
|
};
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const useCedarOpenTelemetry: (options: CedarOpenTelemetryConfig) => Plugin<PluginContext>;
|
|
21
21
|
export {};
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=useCedarOpenTelemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarOpenTelemetry.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarOpenTelemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAuB,MAAM,eAAe,CAAA;AAKhE,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAGnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAE3D,oBAAY,aAAa;IACvB,eAAe,0BAA0B;IACzC,gBAAgB,2BAA2B;IAC3C,kBAAkB,+BAA+B;IACjD,mBAAmB,+BAA+B;IAClD,kBAAkB,8BAA8B;IAChD,oBAAoB,gCAAgC;IACpD,aAAa,0BAA0B;IACvC,wBAAwB,kCAAkC;IAC1D,4BAA4B,6BAA6B;IACzD,mBAAmB,8BAA8B;CAClD;AAGD,QAAA,MAAM,iBAAiB,2BAA2B,CAAA;AAElD,KAAK,aAAa,GAAG;IACnB,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,IAAI,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,SAAS,wBAAwB,KAChC,MAAM,CAAC,aAAa,CAgHtB,CAAA"}
|
|
@@ -17,7 +17,7 @@ var AttributeName = /* @__PURE__ */ ((AttributeName2) => {
|
|
|
17
17
|
return AttributeName2;
|
|
18
18
|
})(AttributeName || {});
|
|
19
19
|
const tracingSpanSymbol = "OPEN_TELEMETRY_GRAPHQL";
|
|
20
|
-
const
|
|
20
|
+
const useCedarOpenTelemetry = (options) => {
|
|
21
21
|
const spanKind = SpanKind.SERVER;
|
|
22
22
|
const spanAdditionalAttributes = {};
|
|
23
23
|
const tracer = opentelemetry.trace.getTracer("redwoodjs");
|
|
@@ -85,7 +85,7 @@ const useRedwoodOpenTelemetry = (options) => {
|
|
|
85
85
|
if (isAsyncIterable(result)) {
|
|
86
86
|
executionSpan.end();
|
|
87
87
|
console.warn(
|
|
88
|
-
`Plugin "
|
|
88
|
+
`Plugin "CedarOpenTelemetry" encountered an AsyncIterator which is not supported yet, so tracing data is not available for the operation.`
|
|
89
89
|
);
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
@@ -117,5 +117,5 @@ const useRedwoodOpenTelemetry = (options) => {
|
|
|
117
117
|
};
|
|
118
118
|
export {
|
|
119
119
|
AttributeName,
|
|
120
|
-
|
|
120
|
+
useCedarOpenTelemetry
|
|
121
121
|
};
|
|
@@ -5,5 +5,5 @@ import type { CedarGraphQLContext, GraphQLHandlerOptions } from '../types.js';
|
|
|
5
5
|
* by populating it with the results of a custom function
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
9
|
-
//# sourceMappingURL=
|
|
8
|
+
export declare const useCedarPopulateContext: (populateContextBuilder: NonNullable<GraphQLHandlerOptions["context"]>) => Plugin<CedarGraphQLContext>;
|
|
9
|
+
//# sourceMappingURL=useCedarPopulateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarPopulateContext.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarPopulateContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,wBAAwB,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,KACpE,MAAM,CAAC,mBAAmB,CAW5B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const useCedarPopulateContext = (populateContextBuilder) => {
|
|
2
2
|
return {
|
|
3
3
|
async onContextBuilding({ context, extendContext }) {
|
|
4
4
|
const populateContext = typeof populateContextBuilder === "function" ? await populateContextBuilder({ context }) : populateContextBuilder;
|
|
@@ -7,5 +7,5 @@ const useRedwoodPopulateContext = (populateContextBuilder) => {
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
useCedarPopulateContext
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UsePersistedOperationsOptions } from '@graphql-yoga/plugin-persisted-operations';
|
|
2
2
|
import type { Plugin } from 'graphql-yoga';
|
|
3
3
|
import type { CedarGraphQLContext } from '../types.js';
|
|
4
|
-
export type
|
|
4
|
+
export type CedarTrustedDocumentOptions = Omit<UsePersistedOperationsOptions, 'getPersistedOperation'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Whether to disable the plugin
|
|
7
7
|
* @default false
|
|
@@ -19,5 +19,7 @@ export type RedwoodTrustedDocumentOptions = Omit<UsePersistedOperationsOptions,
|
|
|
19
19
|
disabled?: false;
|
|
20
20
|
store: Readonly<Record<string, string>>;
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/** @deprecated Use `CedarTrustedDocumentOptions` instead. */
|
|
23
|
+
export type RedwoodTrustedDocumentOptions = CedarTrustedDocumentOptions;
|
|
24
|
+
export declare const useCedarTrustedDocuments: (options: CedarTrustedDocumentOptions) => Plugin<CedarGraphQLContext>;
|
|
25
|
+
//# sourceMappingURL=useCedarTrustedDocuments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedarTrustedDocuments.d.ts","sourceRoot":"","sources":["../../src/plugins/useCedarTrustedDocuments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAA;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,6BAA6B,EAC7B,uBAAuB,CACxB,GAAG;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACzC,GAAG,CACE;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,CAChE,CAAA;AAEH,6DAA6D;AAC7D,MAAM,MAAM,6BAA6B,GAAG,2BAA2B,CAAA;AAoEvE,eAAO,MAAM,wBAAwB,GACnC,SAAS,2BAA2B,KACnC,MAAM,CAAC,mBAAmB,CA8B5B,CAAA"}
|
|
@@ -23,7 +23,7 @@ const allowCedarStudioResyncMailMutations = async (request) => {
|
|
|
23
23
|
const isAllowedQuery = query === CEDAR__STUDIO_RESYNC_MAIL_RENDERERS_MUTATION || query === CEDAR__STUDIO_TEMPLATE_MUTATION;
|
|
24
24
|
return hasContentType && isAllowedQuery;
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const useCedarTrustedDocuments = (options) => {
|
|
27
27
|
return usePersistedOperations({
|
|
28
28
|
...options,
|
|
29
29
|
customErrors: {
|
|
@@ -52,5 +52,5 @@ const useRedwoodTrustedDocuments = (options) => {
|
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
useCedarTrustedDocuments
|
|
56
56
|
};
|
|
@@ -54,7 +54,9 @@ export declare enum DirectiveType {
|
|
|
54
54
|
VALIDATOR = "VALIDATOR_DIRECTIVE",
|
|
55
55
|
TRANSFORMER = "TRANSFORMER_DIRECTIVE"
|
|
56
56
|
}
|
|
57
|
-
export type
|
|
57
|
+
export type CedarDirective = ValidatorDirective | TransformerDirective;
|
|
58
|
+
/** @deprecated Use `CedarDirective` instead. */
|
|
59
|
+
export type RedwoodDirective = CedarDirective;
|
|
58
60
|
export interface ValidatorDirective extends ValidatorDirectiveOptions {
|
|
59
61
|
schema: DocumentNode;
|
|
60
62
|
}
|
|
@@ -75,9 +77,13 @@ export type DirectivePluginOptions = ValidatorDirectiveOptions | TransformerDire
|
|
|
75
77
|
export declare function hasDirective(info: GraphQLResolveInfo): boolean;
|
|
76
78
|
export declare function getDirectiveByName(fieldConfig: GraphQLFieldConfig<any, any, any>, directiveName: string): null | DirectiveNode;
|
|
77
79
|
export declare function isPromise(value: any): value is Promise<unknown>;
|
|
78
|
-
export type
|
|
80
|
+
export type UseCedarDirectiveReturn = Plugin<{
|
|
79
81
|
onResolvedValue: ValidatorDirectiveFunc | TransformerDirectiveFunc;
|
|
80
82
|
}>;
|
|
81
|
-
|
|
83
|
+
/** @deprecated Use `UseCedarDirectiveReturn` instead. */
|
|
84
|
+
export type useRedwoodDirectiveReturn = UseCedarDirectiveReturn;
|
|
85
|
+
export declare const useCedarDirective: (options: DirectivePluginOptions) => UseCedarDirectiveReturn;
|
|
86
|
+
/** @deprecated Use `useCedarDirective` instead. */
|
|
87
|
+
export declare const useRedwoodDirective: (options: DirectivePluginOptions) => UseCedarDirectiveReturn;
|
|
82
88
|
export {};
|
|
83
89
|
//# sourceMappingURL=useRedwoodDirective.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodDirective.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodDirective.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAElB,kBAAkB,EAEnB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,WAAW,eAAe,CAC9B,SAAS,GAAG,GAAG,EACf,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEnC,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,OAAO,EAAE,aAAa,CAAA;IACtB,IAAI,EAAE,kBAAkB,CAAA;IACxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,aAAa,EAAE,aAAa,CAAA;IAC5B,aAAa,EAAE,SAAS,CAAA;CACzB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,MAAM,YAAY,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAI,CAC1E,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,EAAE,8CAA8C;AACrF,eAAe,CAChB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sBAAsB,CAAC,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CACzE,IAAI,EAAE,YAAY,CAAC,cAAc,CAAC,KAC/B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,MAAM,aAAa,CAC/B,MAAM,GAAG,GAAG,EACZ,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,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AE/B,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAa9D;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC9C,aAAa,EAAE,MAAM,GACpB,IAAI,GAAG,aAAa,CAKtB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAE/D;AA8GD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;IAC3C,eAAe,EAAE,sBAAsB,GAAG,wBAAwB,CAAA;CACnE,CAAC,CAAA;AAEF,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,uBAAuB,CAAA;AAE/D,eAAO,MAAM,iBAAiB,GAC5B,SAAS,sBAAsB,KAC9B,uBAwBF,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,YA5BrB,sBAAsB,KAC9B,uBA2BiD,CAAA"}
|
|
@@ -107,7 +107,7 @@ function wrapAffectedResolvers(schema, options) {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const useCedarDirective = (options) => {
|
|
111
111
|
const wasDirectiveApplied = /* @__PURE__ */ Symbol.for(`useRedwoodDirective.${options.name}}`);
|
|
112
112
|
return {
|
|
113
113
|
onSchemaChange({ schema, replaceSchema }) {
|
|
@@ -123,6 +123,7 @@ const useRedwoodDirective = (options) => {
|
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
|
+
const useRedwoodDirective = useCedarDirective;
|
|
126
127
|
const _isValidator = (options) => {
|
|
127
128
|
return options.type === "VALIDATOR_DIRECTIVE" /* VALIDATOR */;
|
|
128
129
|
};
|
|
@@ -134,5 +135,6 @@ export {
|
|
|
134
135
|
getDirectiveByName,
|
|
135
136
|
hasDirective,
|
|
136
137
|
isPromise,
|
|
138
|
+
useCedarDirective,
|
|
137
139
|
useRedwoodDirective
|
|
138
140
|
};
|
|
@@ -5,14 +5,14 @@ import type { DocumentNode } from 'graphql';
|
|
|
5
5
|
* But not fully supported in TS
|
|
6
6
|
* {
|
|
7
7
|
* schema: DocumentNode // <-- required
|
|
8
|
-
* [string]:
|
|
8
|
+
* [string]: CedarSubscription
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export type SubscriptionGlobImports = Record<string, any>;
|
|
12
|
-
export type
|
|
12
|
+
export type CedarSubscription = {
|
|
13
13
|
schema: DocumentNode;
|
|
14
14
|
resolvers: any;
|
|
15
15
|
name: string;
|
|
16
16
|
};
|
|
17
|
-
export declare const makeSubscriptions: (SubscriptionGlobs: SubscriptionGlobImports) =>
|
|
17
|
+
export declare const makeSubscriptions: (SubscriptionGlobs: SubscriptionGlobImports) => CedarSubscription[];
|
|
18
18
|
//# sourceMappingURL=makeSubscriptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeSubscriptions.d.ts","sourceRoot":"","sources":["../../src/subscriptions/makeSubscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEzD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"makeSubscriptions.d.ts","sourceRoot":"","sources":["../../src/subscriptions/makeSubscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,GAAG,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,mBAAmB,uBAAuB,KACzC,iBAAiB,EAmBnB,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import type { AuthContextPayload, CorsConfig, Decoder } from '@cedarjs/api';
|
|
|
8
8
|
import type { CedarRequestContext } from '@cedarjs/api/runtime';
|
|
9
9
|
import type { CedarRealtimeOptions } from '@cedarjs/realtime';
|
|
10
10
|
import type { DirectiveGlobImports } from './directives/makeDirectives.js';
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
11
|
+
import type { LoggerConfig } from './plugins/useCedarLogger.js';
|
|
12
|
+
import type { CedarTrustedDocumentOptions, RedwoodTrustedDocumentOptions } from './plugins/useCedarTrustedDocuments.js';
|
|
13
|
+
import type { UseCedarDirectiveReturn, useRedwoodDirectiveReturn, DirectivePluginOptions } from './plugins/useRedwoodDirective.js';
|
|
14
14
|
export type Resolver = (...args: unknown[]) => unknown;
|
|
15
15
|
export type Services = {
|
|
16
16
|
[funcName: string]: Resolver;
|
|
@@ -33,7 +33,7 @@ export interface MakeServicesInterface {
|
|
|
33
33
|
}
|
|
34
34
|
export type MakeServices = (args: MakeServicesInterface) => ServicesGlobImports;
|
|
35
35
|
export type GraphQLTypeWithFields = GraphQLObjectType | GraphQLInterfaceType;
|
|
36
|
-
export type { useRedwoodDirectiveReturn, DirectivePluginOptions };
|
|
36
|
+
export type { UseCedarDirectiveReturn, useRedwoodDirectiveReturn, DirectivePluginOptions, CedarTrustedDocumentOptions, RedwoodTrustedDocumentOptions, };
|
|
37
37
|
export type GetCurrentUser = (decoded: AuthContextPayload[0], raw: AuthContextPayload[1], req?: AuthContextPayload[2]) => Promise<null | Record<string, unknown>>;
|
|
38
38
|
export type GenerateGraphiQLHeader = () => string;
|
|
39
39
|
export type Context = Record<string, unknown>;
|
|
@@ -65,7 +65,7 @@ export interface RedwoodGraphQLContext {
|
|
|
65
65
|
currentUser?: ThenArg<ReturnType<GetCurrentUser>> | AuthContextPayload | null;
|
|
66
66
|
[index: string]: unknown;
|
|
67
67
|
}
|
|
68
|
-
export interface
|
|
68
|
+
export interface CedarOpenTelemetryConfig {
|
|
69
69
|
/**
|
|
70
70
|
* @description Enables the creation of a span for each resolver execution.
|
|
71
71
|
*/
|
|
@@ -79,9 +79,13 @@ export interface RedwoodOpenTelemetryConfig {
|
|
|
79
79
|
*/
|
|
80
80
|
result: boolean;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
/** @deprecated Please use CedarOpenTelemetryConfig */
|
|
83
|
+
export type RedwoodOpenTelemetryConfig = CedarOpenTelemetryConfig;
|
|
84
|
+
export interface CedarScalarConfig {
|
|
83
85
|
File?: boolean;
|
|
84
86
|
}
|
|
87
|
+
/** @deprecated Please use CedarScalarConfig */
|
|
88
|
+
export type RedwoodScalarConfig = CedarScalarConfig;
|
|
85
89
|
/**
|
|
86
90
|
* GraphQLYogaOptions
|
|
87
91
|
*/
|
|
@@ -208,18 +212,18 @@ export type GraphQLYogaOptions = {
|
|
|
208
212
|
* @see https://benjie.dev/graphql/trusted-documents
|
|
209
213
|
* @see https://the-guild.dev/graphql/yoga-server/docs/features/persisted-operations
|
|
210
214
|
*/
|
|
211
|
-
trustedDocuments?:
|
|
215
|
+
trustedDocuments?: CedarTrustedDocumentOptions;
|
|
212
216
|
/**
|
|
213
217
|
* @description Configure OpenTelemetry plugin behaviour
|
|
214
218
|
*/
|
|
215
|
-
openTelemetryOptions?:
|
|
219
|
+
openTelemetryOptions?: CedarOpenTelemetryConfig;
|
|
216
220
|
/**
|
|
217
221
|
* @description Configure which scalars to include in the schema. This should match your
|
|
218
222
|
* `graphql.includeScalars` configuration in `cedar.toml`.
|
|
219
223
|
*
|
|
220
224
|
* The default is to include. You must set to `false` to exclude.
|
|
221
225
|
*/
|
|
222
|
-
includeScalars?:
|
|
226
|
+
includeScalars?: CedarScalarConfig;
|
|
223
227
|
};
|
|
224
228
|
/**
|
|
225
229
|
* @description Configure GraphQLHandler with options
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAChF,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACb,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAChF,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACb,MAAM,SAAS,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,2BAA2B,CAAC,CAAA;IAEpD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAEjC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAE/C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAE/B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,2BAA2B,CAAA;IAE9C;;OAEG;IACH,oBAAoB,CAAC,EAAE,wBAAwB,CAAA;IAE/C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAA;CACnC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,kBAAkB,EAClB,eAAe,GAAG,wBAAwB,CAC3C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/graphql-server",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.221",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -32,10 +32,9 @@
|
|
|
32
32
|
"test:watch": "yarn test --watch"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@cedarjs/api": "6.0.0-rc.
|
|
36
|
-
"@cedarjs/context": "6.0.0-rc.
|
|
35
|
+
"@cedarjs/api": "6.0.0-rc.221",
|
|
36
|
+
"@cedarjs/context": "6.0.0-rc.221",
|
|
37
37
|
"@envelop/core": "5.5.1",
|
|
38
|
-
"@envelop/depth-limit": "4.0.0",
|
|
39
38
|
"@envelop/disable-introspection": "6.0.0",
|
|
40
39
|
"@envelop/filter-operation-type": "6.0.0",
|
|
41
40
|
"@envelop/on-resolve": "4.1.1",
|
|
@@ -54,18 +53,16 @@
|
|
|
54
53
|
"uuid": "11.1.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@cedarjs/framework-tools": "6.0.0-rc.189",
|
|
60
|
-
"@cedarjs/project-config": "6.0.0-rc.189",
|
|
61
|
-
"@cedarjs/realtime": "6.0.0-rc.189",
|
|
56
|
+
"@cedarjs/framework-tools": "6.0.0-rc.221",
|
|
57
|
+
"@cedarjs/realtime": "6.0.0-rc.221",
|
|
62
58
|
"@envelop/types": "5.2.1",
|
|
59
|
+
"@escape.tech/graphql-armor-types": "0.6.0",
|
|
63
60
|
"@types/aws-lambda": "8.10.162",
|
|
64
61
|
"@types/jsonwebtoken": "9.0.10",
|
|
65
62
|
"@types/lodash": "4.17.24",
|
|
66
|
-
"@whatwg-node/fetch": "0.10.13",
|
|
67
63
|
"@whatwg-node/promise-helpers": "^1.3.0",
|
|
68
64
|
"concurrently": "9.2.4",
|
|
65
|
+
"fastify": "5.10.0",
|
|
69
66
|
"jsonwebtoken": "9.0.3",
|
|
70
67
|
"publint": "0.3.22",
|
|
71
68
|
"typescript": "5.9.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodAuthContext.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodAuthContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAsB,OAAO,EAAE,MAAM,cAAc,CAAA;AAG/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,gBAAgB,qBAAqB,CAAC,gBAAgB,CAAC,EACvD,cAAc,OAAO,GAAG,OAAO,EAAE,KAChC,MAAM,CAAC,mBAAmB,CA2C5B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodError.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAO1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,KACb,MAAM,CAAC,mBAAmB,CAsC5B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodGlobalContextSetter.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodGlobalContextSetter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,QACpC,MAAM,CAAC,mBAAmB,CAM5B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodLogger.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodLogger.ts"],"names":[],"mappings":"AAMA,O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AAE7D,oBAAY,aAAa;IACvB,eAAe,0BAA0B;IACzC,gBAAgB,2BAA2B;IAC3C,kBAAkB,+BAA+B;IACjD,mBAAmB,+BAA+B;IAClD,kBAAkB,8BAA8B;IAChD,oBAAoB,gCAAgC;IACpD,aAAa,0BAA0B;IACvC,wBAAwB,kCAAkC;IAC1D,4BAA4B,6BAA6B;IACzD,mBAAmB,8BAA8B;CAClD;AAGD,QAAA,MAAM,iBAAiB,2BAA2B,CAAA;AAElD,KAAK,aAAa,GAAG;IACnB,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,IAAI,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,uBAAuB,GAClC,SAAS,0BAA0B,KAClC,MAAM,CAAC,aAAa,CAgHtB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodPopulateContext.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodPopulateContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,wBAAwB,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,KACpE,MAAM,CAAC,mBAAmB,CAW5B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRedwoodTrustedDocuments.d.ts","sourceRoot":"","sources":["../../src/plugins/useRedwoodTrustedDocuments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAA;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,6BAA6B,EAC7B,uBAAuB,CACxB,GAAG;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACzC,GAAG,CACE;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,CAChE,CAAA;AAoEH,eAAO,MAAM,0BAA0B,GACrC,SAAS,6BAA6B,KACrC,MAAM,CAAC,mBAAmB,CA8B5B,CAAA"}
|