@cedarjs/graphql-server 5.0.7-next.338 → 5.0.7
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/cjs/cors.d.ts +10 -0
- package/dist/cjs/cors.d.ts.map +1 -0
- package/dist/cjs/cors.js +70 -0
- package/dist/cjs/createGraphQLYoga.d.ts +6 -0
- package/dist/cjs/createGraphQLYoga.d.ts.map +1 -0
- package/dist/cjs/createGraphQLYoga.js +193 -0
- package/dist/cjs/directives/makeDirectives.d.ts +8 -0
- package/dist/cjs/directives/makeDirectives.d.ts.map +1 -0
- package/dist/cjs/directives/makeDirectives.js +89 -0
- package/dist/cjs/errors.d.ts +32 -0
- package/dist/cjs/errors.d.ts.map +1 -0
- package/dist/cjs/errors.js +101 -0
- package/dist/cjs/functions/graphql.d.ts +15 -0
- package/dist/cjs/functions/graphql.d.ts.map +1 -0
- package/dist/cjs/functions/graphql.js +201 -0
- package/dist/cjs/functions/useRequireAuth.d.ts +12 -0
- package/dist/cjs/functions/useRequireAuth.d.ts.map +1 -0
- package/dist/cjs/functions/useRequireAuth.js +70 -0
- package/dist/cjs/global.api-auto-imports.d.ts +7 -0
- package/dist/cjs/global.api-auto-imports.d.ts.map +1 -0
- package/dist/cjs/global.api-auto-imports.js +1 -0
- package/dist/cjs/globalContext.d.ts +25 -0
- package/dist/cjs/globalContext.d.ts.map +1 -0
- package/dist/cjs/globalContext.js +55 -0
- package/dist/cjs/globalContextStore.d.ts +9 -0
- package/dist/cjs/globalContextStore.d.ts.map +1 -0
- package/dist/cjs/globalContextStore.js +35 -0
- package/dist/cjs/graphiql.d.ts +8 -0
- package/dist/cjs/graphiql.d.ts.map +1 -0
- package/dist/cjs/graphiql.js +45 -0
- package/dist/cjs/index.d.ts +14 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +75 -0
- package/dist/cjs/introspection.d.ts +7 -0
- package/dist/cjs/introspection.d.ts.map +1 -0
- package/dist/cjs/introspection.js +36 -0
- package/dist/cjs/makeMergedSchema.d.ts +17 -0
- package/dist/cjs/makeMergedSchema.d.ts.map +1 -0
- package/dist/cjs/makeMergedSchema.js +283 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/plugins/index.d.ts +10 -0
- package/dist/cjs/plugins/index.d.ts.map +1 -0
- package/dist/cjs/plugins/index.js +52 -0
- package/dist/cjs/plugins/useArmor.d.ts +4 -0
- package/dist/cjs/plugins/useArmor.d.ts.map +1 -0
- package/dist/cjs/plugins/useArmor.js +69 -0
- package/dist/{plugins/useCedarAuthContext.d.ts → cjs/plugins/useRedwoodAuthContext.d.ts} +2 -2
- package/dist/cjs/plugins/useRedwoodAuthContext.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodAuthContext.js +74 -0
- package/dist/cjs/plugins/useRedwoodDirective.d.ts +83 -0
- package/dist/cjs/plugins/useRedwoodDirective.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodDirective.js +166 -0
- package/dist/{plugins/useCedarError.d.ts → cjs/plugins/useRedwoodError.d.ts} +4 -4
- package/dist/cjs/plugins/useRedwoodError.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodError.js +62 -0
- package/dist/{plugins/useCedarGlobalContextSetter.d.ts → cjs/plugins/useRedwoodGlobalContextSetter.d.ts} +2 -2
- package/dist/cjs/plugins/useRedwoodGlobalContextSetter.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodGlobalContextSetter.js +35 -0
- package/dist/{plugins/useCedarLogger.d.ts → cjs/plugins/useRedwoodLogger.d.ts} +2 -2
- package/dist/cjs/plugins/useRedwoodLogger.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodLogger.js +156 -0
- package/dist/{plugins/useCedarOpenTelemetry.d.ts → cjs/plugins/useRedwoodOpenTelemetry.d.ts} +3 -3
- package/dist/cjs/plugins/useRedwoodOpenTelemetry.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodOpenTelemetry.js +156 -0
- package/dist/{plugins/useCedarPopulateContext.d.ts → cjs/plugins/useRedwoodPopulateContext.d.ts} +2 -2
- package/dist/cjs/plugins/useRedwoodPopulateContext.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodPopulateContext.js +35 -0
- package/dist/{plugins/useCedarTrustedDocuments.d.ts → cjs/plugins/useRedwoodTrustedDocuments.d.ts} +3 -5
- package/dist/cjs/plugins/useRedwoodTrustedDocuments.d.ts.map +1 -0
- package/dist/cjs/plugins/useRedwoodTrustedDocuments.js +80 -0
- package/dist/cjs/rootSchema.d.ts +25 -0
- package/dist/cjs/rootSchema.d.ts.map +1 -0
- package/dist/cjs/rootSchema.js +108 -0
- package/dist/cjs/subscriptions/makeSubscriptions.d.ts +18 -0
- package/dist/cjs/subscriptions/makeSubscriptions.d.ts.map +1 -0
- package/dist/cjs/subscriptions/makeSubscriptions.js +40 -0
- package/dist/cjs/types.d.ts +231 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +16 -0
- 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 +0 -2
- 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 +16 -20
- package/dist/plugins/useRedwoodAuthContext.d.ts +9 -0
- package/dist/plugins/useRedwoodAuthContext.d.ts.map +1 -0
- package/dist/plugins/useRedwoodAuthContext.js +50 -0
- package/dist/plugins/useRedwoodDirective.d.ts +3 -9
- package/dist/plugins/useRedwoodDirective.d.ts.map +1 -1
- package/dist/plugins/useRedwoodDirective.js +1 -3
- package/dist/plugins/useRedwoodError.d.ts +20 -0
- package/dist/plugins/useRedwoodError.d.ts.map +1 -0
- package/dist/plugins/{useCedarError.js → useRedwoodError.js} +5 -5
- package/dist/plugins/useRedwoodGlobalContextSetter.d.ts +9 -0
- package/dist/plugins/useRedwoodGlobalContextSetter.d.ts.map +1 -0
- package/dist/plugins/{useCedarGlobalContextSetter.js → useRedwoodGlobalContextSetter.js} +2 -2
- package/dist/plugins/useRedwoodLogger.d.ts +115 -0
- package/dist/plugins/useRedwoodLogger.d.ts.map +1 -0
- package/dist/plugins/{useCedarLogger.js → useRedwoodLogger.js} +2 -2
- package/dist/plugins/useRedwoodOpenTelemetry.d.ts +22 -0
- package/dist/plugins/useRedwoodOpenTelemetry.d.ts.map +1 -0
- package/dist/plugins/{useCedarOpenTelemetry.js → useRedwoodOpenTelemetry.js} +3 -3
- package/dist/plugins/useRedwoodPopulateContext.d.ts +9 -0
- package/dist/plugins/useRedwoodPopulateContext.d.ts.map +1 -0
- package/dist/plugins/{useCedarPopulateContext.js → useRedwoodPopulateContext.js} +2 -2
- package/dist/plugins/useRedwoodTrustedDocuments.d.ts +23 -0
- package/dist/plugins/useRedwoodTrustedDocuments.d.ts.map +1 -0
- package/dist/plugins/{useCedarTrustedDocuments.js → useRedwoodTrustedDocuments.js} +13 -20
- package/dist/subscriptions/makeSubscriptions.d.ts +3 -3
- package/dist/subscriptions/makeSubscriptions.d.ts.map +1 -1
- package/dist/types.d.ts +9 -13
- package/dist/types.d.ts.map +1 -1
- package/package.json +24 -16
- package/dist/plugins/useCedarAuthContext.d.ts.map +0 -1
- package/dist/plugins/useCedarAuthContext.js +0 -30
- package/dist/plugins/useCedarError.d.ts.map +0 -1
- package/dist/plugins/useCedarGlobalContextSetter.d.ts.map +0 -1
- package/dist/plugins/useCedarLogger.d.ts.map +0 -1
- package/dist/plugins/useCedarOpenTelemetry.d.ts.map +0 -1
- package/dist/plugins/useCedarPopulateContext.d.ts.map +0 -1
- package/dist/plugins/useCedarTrustedDocuments.d.ts.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var useRedwoodPopulateContext_exports = {};
|
|
20
|
+
__export(useRedwoodPopulateContext_exports, {
|
|
21
|
+
useRedwoodPopulateContext: () => useRedwoodPopulateContext
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(useRedwoodPopulateContext_exports);
|
|
24
|
+
const useRedwoodPopulateContext = (populateContextBuilder) => {
|
|
25
|
+
return {
|
|
26
|
+
async onContextBuilding({ context, extendContext }) {
|
|
27
|
+
const populateContext = typeof populateContextBuilder === "function" ? await populateContextBuilder({ context }) : populateContextBuilder;
|
|
28
|
+
extendContext(populateContext);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
useRedwoodPopulateContext
|
|
35
|
+
});
|
package/dist/{plugins/useCedarTrustedDocuments.d.ts → cjs/plugins/useRedwoodTrustedDocuments.d.ts}
RENAMED
|
@@ -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 RedwoodTrustedDocumentOptions = Omit<UsePersistedOperationsOptions, 'getPersistedOperation'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Whether to disable the plugin
|
|
7
7
|
* @default false
|
|
@@ -19,7 +19,5 @@ export type CedarTrustedDocumentOptions = Omit<UsePersistedOperationsOptions, 'g
|
|
|
19
19
|
disabled?: false;
|
|
20
20
|
store: Readonly<Record<string, string>>;
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare const useCedarTrustedDocuments: (options: CedarTrustedDocumentOptions) => Plugin<CedarGraphQLContext>;
|
|
25
|
-
//# sourceMappingURL=useCedarTrustedDocuments.d.ts.map
|
|
22
|
+
export declare const useRedwoodTrustedDocuments: (options: RedwoodTrustedDocumentOptions) => Plugin<CedarGraphQLContext>;
|
|
23
|
+
//# sourceMappingURL=useRedwoodTrustedDocuments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var useRedwoodTrustedDocuments_exports = {};
|
|
20
|
+
__export(useRedwoodTrustedDocuments_exports, {
|
|
21
|
+
useRedwoodTrustedDocuments: () => useRedwoodTrustedDocuments
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(useRedwoodTrustedDocuments_exports);
|
|
24
|
+
var import_plugin_persisted_operations = require("@graphql-yoga/plugin-persisted-operations");
|
|
25
|
+
const CEDAR__AUTH_GET_CURRENT_USER_QUERY = '{"query":"query __CEDAR__AUTH_GET_CURRENT_USER { cedar { currentUser } }"}';
|
|
26
|
+
const CEDAR__STUDIO_RESYNC_MAIL_RENDERERS_MUTATION = '{"query":"mutation { resyncMailRenderers }"}';
|
|
27
|
+
const CEDAR__STUDIO_TEMPLATE_MUTATION = '{"query":"mutation { resyncMailTemplate }"}';
|
|
28
|
+
const allowCedarAuthCurrentUserQuery = async (request) => {
|
|
29
|
+
const headers = request.headers;
|
|
30
|
+
const hasContentType = headers.get("content-type") === "application/json";
|
|
31
|
+
const hasAuthProvider = !!headers.get("auth-provider");
|
|
32
|
+
const hasAuthorization = !!headers.get("authorization");
|
|
33
|
+
const hasAllowedHeaders = hasContentType && hasAuthProvider && hasAuthorization;
|
|
34
|
+
const query = await request.text();
|
|
35
|
+
const hasAllowedQuery = query === CEDAR__AUTH_GET_CURRENT_USER_QUERY;
|
|
36
|
+
return hasAllowedHeaders && hasAllowedQuery;
|
|
37
|
+
};
|
|
38
|
+
const allowCedarStudioResyncMailMutations = async (request) => {
|
|
39
|
+
const isLocalDevelopment = process.env.NODE_ENV === "development";
|
|
40
|
+
if (!isLocalDevelopment) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const headers = request.headers;
|
|
44
|
+
const hasContentType = headers.get("content-type") === "application/json";
|
|
45
|
+
const query = await request.text();
|
|
46
|
+
const isAllowedQuery = query === CEDAR__STUDIO_RESYNC_MAIL_RENDERERS_MUTATION || query === CEDAR__STUDIO_TEMPLATE_MUTATION;
|
|
47
|
+
return hasContentType && isAllowedQuery;
|
|
48
|
+
};
|
|
49
|
+
const useRedwoodTrustedDocuments = (options) => {
|
|
50
|
+
return (0, import_plugin_persisted_operations.usePersistedOperations)({
|
|
51
|
+
...options,
|
|
52
|
+
customErrors: {
|
|
53
|
+
persistedQueryOnly: "Use Trusted Only!",
|
|
54
|
+
...options.customErrors
|
|
55
|
+
},
|
|
56
|
+
getPersistedOperation(sha256Hash) {
|
|
57
|
+
return options.store ? options.store[sha256Hash] : null;
|
|
58
|
+
},
|
|
59
|
+
allowArbitraryOperations: async (request) => {
|
|
60
|
+
if (options.allowArbitraryOperations !== void 0) {
|
|
61
|
+
if (typeof options.allowArbitraryOperations === "boolean") {
|
|
62
|
+
if (options.allowArbitraryOperations) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (typeof options.allowArbitraryOperations === "function") {
|
|
67
|
+
const result = await options.allowArbitraryOperations(request);
|
|
68
|
+
if (result === true) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return allowCedarAuthCurrentUserQuery(request) || allowCedarStudioResyncMailMutations(request);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
78
|
+
0 && (module.exports = {
|
|
79
|
+
useRedwoodTrustedDocuments
|
|
80
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BigIntResolver, DateResolver, TimeResolver, DateTimeResolver, JSONResolver, JSONObjectResolver, ByteResolver } from 'graphql-scalars';
|
|
2
|
+
/**
|
|
3
|
+
* This adds scalar types for dealing with Date, Time, DateTime, and JSON.
|
|
4
|
+
* This also adds a root Query type which is needed to start the GraphQL server on a fresh install.
|
|
5
|
+
*
|
|
6
|
+
* NOTE: When you add a new Scalar type you must add it to
|
|
7
|
+
* "generateTypeDefGraphQL" in @cedarjs/internal.
|
|
8
|
+
*/
|
|
9
|
+
export declare const schema: import("graphql").DocumentNode;
|
|
10
|
+
export declare const scalarSchemas: {
|
|
11
|
+
File: import("graphql").DocumentNode;
|
|
12
|
+
};
|
|
13
|
+
export type ScalarSchemaKeys = keyof typeof scalarSchemas;
|
|
14
|
+
export interface Resolvers {
|
|
15
|
+
BigInt: typeof BigIntResolver;
|
|
16
|
+
Date: typeof DateResolver;
|
|
17
|
+
Time: typeof TimeResolver;
|
|
18
|
+
DateTime: typeof DateTimeResolver;
|
|
19
|
+
JSON: typeof JSONResolver;
|
|
20
|
+
JSONObject: typeof JSONObjectResolver;
|
|
21
|
+
Query: Record<string, unknown>;
|
|
22
|
+
Byte: typeof ByteResolver;
|
|
23
|
+
}
|
|
24
|
+
export declare const resolvers: Resolvers;
|
|
25
|
+
//# sourceMappingURL=rootSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rootSchema.d.ts","sourceRoot":"","sources":["../../src/rootSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACb,MAAM,iBAAiB,CAAA;AAMxB;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,gCAyClB,CAAA;AAED,eAAO,MAAM,aAAa;;CAIzB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,aAAa,CAAA;AAEzD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,cAAc,CAAA;IAC7B,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,QAAQ,EAAE,OAAO,gBAAgB,CAAA;IACjC,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,UAAU,EAAE,OAAO,kBAAkB,CAAA;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,IAAI,EAAE,OAAO,YAAY,CAAA;CAC1B;AAED,eAAO,MAAM,SAAS,EAAE,SA0BvB,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var rootSchema_exports = {};
|
|
20
|
+
__export(rootSchema_exports, {
|
|
21
|
+
resolvers: () => resolvers,
|
|
22
|
+
scalarSchemas: () => scalarSchemas,
|
|
23
|
+
schema: () => schema
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(rootSchema_exports);
|
|
26
|
+
var import_graphql_scalars = require("graphql-scalars");
|
|
27
|
+
var import_graphql_tag = require("graphql-tag");
|
|
28
|
+
var import_api = require("@cedarjs/api");
|
|
29
|
+
const schema = import_graphql_tag.gql`
|
|
30
|
+
scalar BigInt
|
|
31
|
+
scalar Date
|
|
32
|
+
scalar Time
|
|
33
|
+
scalar DateTime
|
|
34
|
+
scalar JSON
|
|
35
|
+
scalar JSONObject
|
|
36
|
+
scalar Byte
|
|
37
|
+
|
|
38
|
+
"""
|
|
39
|
+
The Cedar Root Schema
|
|
40
|
+
|
|
41
|
+
Defines details about Cedar such as the current user and version information.
|
|
42
|
+
"""
|
|
43
|
+
type Cedar {
|
|
44
|
+
"The version of CedarJS."
|
|
45
|
+
version: String
|
|
46
|
+
"The current user."
|
|
47
|
+
currentUser: JSON
|
|
48
|
+
"The version of Prisma."
|
|
49
|
+
prismaVersion: String
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type Redwood {
|
|
53
|
+
"The version of CedarJS."
|
|
54
|
+
version: String @deprecated(reason: "Use the Cedar type instead.")
|
|
55
|
+
"The current user."
|
|
56
|
+
currentUser: JSON @deprecated(reason: "Use the Cedar type instead.")
|
|
57
|
+
"The version of Prisma."
|
|
58
|
+
prismaVersion: String @deprecated(reason: "Use the Cedar type instead.")
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
About the Cedar queries.
|
|
63
|
+
"""
|
|
64
|
+
type Query {
|
|
65
|
+
"Fetches the Cedar root schema."
|
|
66
|
+
redwood: Redwood @deprecated(reason: "Use 'cedar' instead.")
|
|
67
|
+
"Fetches the Cedar root schema."
|
|
68
|
+
cedar: Cedar
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
const scalarSchemas = {
|
|
72
|
+
File: import_graphql_tag.gql`
|
|
73
|
+
scalar File
|
|
74
|
+
`
|
|
75
|
+
};
|
|
76
|
+
const resolvers = {
|
|
77
|
+
BigInt: import_graphql_scalars.BigIntResolver,
|
|
78
|
+
Date: import_graphql_scalars.DateResolver,
|
|
79
|
+
Time: import_graphql_scalars.TimeResolver,
|
|
80
|
+
DateTime: import_graphql_scalars.DateTimeResolver,
|
|
81
|
+
JSON: import_graphql_scalars.JSONResolver,
|
|
82
|
+
JSONObject: import_graphql_scalars.JSONObjectResolver,
|
|
83
|
+
Query: {
|
|
84
|
+
// TODO: Remove this in the next major release. Don't forget to also update
|
|
85
|
+
// `validateSchema.ts`
|
|
86
|
+
redwood: () => ({
|
|
87
|
+
version: import_api.cedarVersion,
|
|
88
|
+
prismaVersion: import_api.prismaVersion,
|
|
89
|
+
currentUser: (_args, context) => {
|
|
90
|
+
return context?.currentUser;
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
cedar: () => ({
|
|
94
|
+
version: import_api.cedarVersion,
|
|
95
|
+
prismaVersion: import_api.prismaVersion,
|
|
96
|
+
currentUser: (_args, context) => {
|
|
97
|
+
return context?.currentUser;
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
Byte: import_graphql_scalars.ByteResolver
|
|
102
|
+
};
|
|
103
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
+
0 && (module.exports = {
|
|
105
|
+
resolvers,
|
|
106
|
+
scalarSchemas,
|
|
107
|
+
schema
|
|
108
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DocumentNode } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* We want SubscriptionsGlobs type to be an object with this shape:
|
|
4
|
+
*
|
|
5
|
+
* But not fully supported in TS
|
|
6
|
+
* {
|
|
7
|
+
* schema: DocumentNode // <-- required
|
|
8
|
+
* [string]: RedwoodSubscription
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export type SubscriptionGlobImports = Record<string, any>;
|
|
12
|
+
export type RedwoodSubscription = {
|
|
13
|
+
schema: DocumentNode;
|
|
14
|
+
resolvers: any;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const makeSubscriptions: (SubscriptionGlobs: SubscriptionGlobImports) => RedwoodSubscription[];
|
|
18
|
+
//# sourceMappingURL=makeSubscriptions.d.ts.map
|
|
@@ -0,0 +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,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,GAAG,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,mBAAmB,uBAAuB,KACzC,mBAAmB,EAmBrB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var makeSubscriptions_exports = {};
|
|
20
|
+
__export(makeSubscriptions_exports, {
|
|
21
|
+
makeSubscriptions: () => makeSubscriptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(makeSubscriptions_exports);
|
|
24
|
+
const makeSubscriptions = (SubscriptionGlobs) => {
|
|
25
|
+
return Object.entries(SubscriptionGlobs).flatMap(
|
|
26
|
+
([importedGlobName, exports2]) => {
|
|
27
|
+
const [SubscriptionNameFromFile] = importedGlobName.split("_").slice(-2);
|
|
28
|
+
const subscription = {
|
|
29
|
+
schema: exports2.schema,
|
|
30
|
+
resolvers: exports2[SubscriptionNameFromFile] || exports2.default,
|
|
31
|
+
name: SubscriptionNameFromFile
|
|
32
|
+
};
|
|
33
|
+
return [subscription];
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
makeSubscriptions
|
|
40
|
+
});
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { AllowedOperations } from '@envelop/filter-operation-type';
|
|
2
|
+
import type { GraphQLArmorConfig } from '@escape.tech/graphql-armor-types';
|
|
3
|
+
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
|
|
4
|
+
import type { APIGatewayProxyEvent, Context as LambdaContext } from 'aws-lambda';
|
|
5
|
+
import type { GraphQLObjectType, GraphQLInterfaceType, DocumentNode } from 'graphql';
|
|
6
|
+
import type { Plugin } from 'graphql-yoga';
|
|
7
|
+
import type { AuthContextPayload, CorsConfig, Decoder } from '@cedarjs/api';
|
|
8
|
+
import type { CedarRequestContext } from '@cedarjs/api/runtime';
|
|
9
|
+
import type { CedarRealtimeOptions } from '@cedarjs/realtime';
|
|
10
|
+
import type { DirectiveGlobImports } from './directives/makeDirectives.js';
|
|
11
|
+
import type { useRedwoodDirectiveReturn, DirectivePluginOptions } from './plugins/useRedwoodDirective.js';
|
|
12
|
+
import type { LoggerConfig } from './plugins/useRedwoodLogger.js';
|
|
13
|
+
import type { RedwoodTrustedDocumentOptions } from './plugins/useRedwoodTrustedDocuments.js';
|
|
14
|
+
export type Resolver = (...args: unknown[]) => unknown;
|
|
15
|
+
export type Services = {
|
|
16
|
+
[funcName: string]: Resolver;
|
|
17
|
+
};
|
|
18
|
+
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
|
19
|
+
export type ResolverArgs<TRoot> = {
|
|
20
|
+
root: ThenArg<TRoot>;
|
|
21
|
+
};
|
|
22
|
+
export type SdlGlobImports = {
|
|
23
|
+
[key: string]: {
|
|
24
|
+
schema: DocumentNode;
|
|
25
|
+
resolvers: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type ServicesGlobImports = {
|
|
29
|
+
[serviceName: string]: Services;
|
|
30
|
+
};
|
|
31
|
+
export interface MakeServicesInterface {
|
|
32
|
+
services: ServicesGlobImports;
|
|
33
|
+
}
|
|
34
|
+
export type MakeServices = (args: MakeServicesInterface) => ServicesGlobImports;
|
|
35
|
+
export type GraphQLTypeWithFields = GraphQLObjectType | GraphQLInterfaceType;
|
|
36
|
+
export type { useRedwoodDirectiveReturn, DirectivePluginOptions };
|
|
37
|
+
export type GetCurrentUser = (decoded: AuthContextPayload[0], raw: AuthContextPayload[1], req?: AuthContextPayload[2]) => Promise<null | Record<string, unknown>>;
|
|
38
|
+
export type GenerateGraphiQLHeader = () => string;
|
|
39
|
+
export type Context = Record<string, unknown>;
|
|
40
|
+
export type ContextFunction = (...args: any[]) => Context | Promise<Context>;
|
|
41
|
+
export type ArmorConfig = {
|
|
42
|
+
logContext?: boolean;
|
|
43
|
+
logErrors?: boolean;
|
|
44
|
+
} & GraphQLArmorConfig;
|
|
45
|
+
/**
|
|
46
|
+
* This is an interface so you can extend it inside your application when needed
|
|
47
|
+
*/
|
|
48
|
+
export interface CedarGraphQLContext {
|
|
49
|
+
request?: Request;
|
|
50
|
+
cedarContext?: CedarRequestContext;
|
|
51
|
+
event?: APIGatewayProxyEvent;
|
|
52
|
+
requestContext?: LambdaContext | undefined;
|
|
53
|
+
currentUser?: ThenArg<ReturnType<GetCurrentUser>> | AuthContextPayload | null;
|
|
54
|
+
[index: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* This is an interface so you can extend it inside your application when needed
|
|
58
|
+
* @deprecated Please use CedarGraphQLContext
|
|
59
|
+
*/
|
|
60
|
+
export interface RedwoodGraphQLContext {
|
|
61
|
+
request?: Request;
|
|
62
|
+
cedarContext?: CedarRequestContext;
|
|
63
|
+
event?: APIGatewayProxyEvent;
|
|
64
|
+
requestContext: LambdaContext | undefined;
|
|
65
|
+
currentUser?: ThenArg<ReturnType<GetCurrentUser>> | AuthContextPayload | null;
|
|
66
|
+
[index: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
export interface RedwoodOpenTelemetryConfig {
|
|
69
|
+
/**
|
|
70
|
+
* @description Enables the creation of a span for each resolver execution.
|
|
71
|
+
*/
|
|
72
|
+
resolvers: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @description Includes the execution result in the span attributes.
|
|
75
|
+
*/
|
|
76
|
+
variables: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* @description Includes the variables in the span attributes.
|
|
79
|
+
*/
|
|
80
|
+
result: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface RedwoodScalarConfig {
|
|
83
|
+
File?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* GraphQLYogaOptions
|
|
87
|
+
*/
|
|
88
|
+
export type GraphQLYogaOptions = {
|
|
89
|
+
/**
|
|
90
|
+
* @description The identifier used in the GraphQL health check response.
|
|
91
|
+
* It verifies readiness when sent as a header in the readiness check request.
|
|
92
|
+
*
|
|
93
|
+
* By default, the identifier is `yoga` as seen in the HTTP response header `x-yoga-id: yoga`
|
|
94
|
+
*/
|
|
95
|
+
healthCheckId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* @description Customize GraphQL Logger
|
|
98
|
+
*
|
|
99
|
+
* Collect resolver timings, and exposes trace data for
|
|
100
|
+
* an individual request under extensions as part of the GraphQL response.
|
|
101
|
+
*/
|
|
102
|
+
loggerConfig: LoggerConfig;
|
|
103
|
+
/**
|
|
104
|
+
* @description Modify the resolver and global context.
|
|
105
|
+
*/
|
|
106
|
+
context?: Context | ContextFunction;
|
|
107
|
+
/**
|
|
108
|
+
* @description An async function that maps the auth token retrieved from the
|
|
109
|
+
* request headers to an object.
|
|
110
|
+
* Is it executed when the `auth-provider` contains one of the supported
|
|
111
|
+
* providers.
|
|
112
|
+
*/
|
|
113
|
+
getCurrentUser?: GetCurrentUser;
|
|
114
|
+
/**
|
|
115
|
+
* @description A callback when an unhandled exception occurs. Use this to disconnect your prisma instance.
|
|
116
|
+
*/
|
|
117
|
+
onException?: () => void;
|
|
118
|
+
/**
|
|
119
|
+
* @description Services passed from the glob import:
|
|
120
|
+
* import services from 'src/services\/**\/*.{js,ts}'
|
|
121
|
+
*/
|
|
122
|
+
services: ServicesGlobImports;
|
|
123
|
+
/**
|
|
124
|
+
* @description SDLs (schema definitions) passed from the glob import:
|
|
125
|
+
* import sdls from 'src/graphql\/**\/*.{js,ts}'
|
|
126
|
+
*/
|
|
127
|
+
sdls: SdlGlobImports;
|
|
128
|
+
/**
|
|
129
|
+
* @description Directives passed from the glob import:
|
|
130
|
+
* import directives from 'src/directives/**\/*.{js,ts}'
|
|
131
|
+
*/
|
|
132
|
+
directives?: DirectiveGlobImports;
|
|
133
|
+
/**
|
|
134
|
+
* @description A list of options passed to [makeExecutableSchema]
|
|
135
|
+
* (https://www.graphql-tools.com/docs/generate-schema/#makeexecutableschemaoptions).
|
|
136
|
+
*/
|
|
137
|
+
schemaOptions?: Partial<IExecutableSchemaDefinition>;
|
|
138
|
+
/**
|
|
139
|
+
* @description CORS configuration
|
|
140
|
+
*/
|
|
141
|
+
cors?: CorsConfig;
|
|
142
|
+
/**
|
|
143
|
+
* @description Customize GraphQL Armor plugin configuration
|
|
144
|
+
*
|
|
145
|
+
* @see https://escape-technologies.github.io/graphql-armor/docs/configuration/examples
|
|
146
|
+
*/
|
|
147
|
+
armorConfig?: ArmorConfig;
|
|
148
|
+
/**
|
|
149
|
+
* @description Customize the default error message used to mask errors.
|
|
150
|
+
*
|
|
151
|
+
* By default, the masked error message is "Something went wrong"
|
|
152
|
+
*
|
|
153
|
+
* @see https://github.com/dotansimha/envelop/blob/main/packages/core/docs/use-masked-errors.md
|
|
154
|
+
*/
|
|
155
|
+
defaultError?: string;
|
|
156
|
+
/**
|
|
157
|
+
* @description Only allows the specified operation types (e.g. subscription, query or mutation).
|
|
158
|
+
*
|
|
159
|
+
* By default, only allow query and mutation (ie, do not allow subscriptions).
|
|
160
|
+
*
|
|
161
|
+
* An array of GraphQL's OperationTypeNode enums:
|
|
162
|
+
* - OperationTypeNode.SUBSCRIPTION
|
|
163
|
+
* - OperationTypeNode.QUERY
|
|
164
|
+
* - OperationTypeNode.MUTATION
|
|
165
|
+
*
|
|
166
|
+
* @see https://github.com/dotansimha/envelop/tree/main/packages/plugins/filter-operation-type
|
|
167
|
+
*/
|
|
168
|
+
allowedOperations?: AllowedOperations;
|
|
169
|
+
/**
|
|
170
|
+
* @description Custom Envelop plugins
|
|
171
|
+
*/
|
|
172
|
+
extraPlugins?: Plugin[];
|
|
173
|
+
/**
|
|
174
|
+
* @description Auth-provider specific token decoder
|
|
175
|
+
*/
|
|
176
|
+
authDecoder?: Decoder | Decoder[];
|
|
177
|
+
/**
|
|
178
|
+
* @description Customize the GraphiQL Endpoint that appears in the location bar of the GraphQL Playground
|
|
179
|
+
*
|
|
180
|
+
* Defaults to '/graphql' as this value must match the name of the `graphql` function on the api-side.
|
|
181
|
+
*/
|
|
182
|
+
graphiQLEndpoint?: string;
|
|
183
|
+
/**
|
|
184
|
+
* @description Allow GraphiQL playground.
|
|
185
|
+
* By default, GraphiQL playground is disabled in production. Explicitly set this to true or false to override in all environments.
|
|
186
|
+
*/
|
|
187
|
+
allowGraphiQL?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* @description Allow schema introspection.
|
|
190
|
+
* By default, schema introspection is disabled in production. Explicitly set this to true or false to override in all environments.
|
|
191
|
+
*/
|
|
192
|
+
allowIntrospection?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* @description Function that returns custom headers (as string) for GraphiQL.
|
|
195
|
+
*
|
|
196
|
+
* Headers must set auth-provider, Authorization and (if using dbAuth) the encrypted cookie.
|
|
197
|
+
*/
|
|
198
|
+
generateGraphiQLHeader?: GenerateGraphiQLHeader;
|
|
199
|
+
/**
|
|
200
|
+
* @description Configure Cedar Realtime plugin with subscriptions and live queries
|
|
201
|
+
*
|
|
202
|
+
* Only supported in a server deploy and not allowed with GraphQLHandler config
|
|
203
|
+
*/
|
|
204
|
+
realtime?: CedarRealtimeOptions;
|
|
205
|
+
/**
|
|
206
|
+
* @description Configure Trusted Documents options
|
|
207
|
+
*
|
|
208
|
+
* @see https://benjie.dev/graphql/trusted-documents
|
|
209
|
+
* @see https://the-guild.dev/graphql/yoga-server/docs/features/persisted-operations
|
|
210
|
+
*/
|
|
211
|
+
trustedDocuments?: RedwoodTrustedDocumentOptions;
|
|
212
|
+
/**
|
|
213
|
+
* @description Configure OpenTelemetry plugin behaviour
|
|
214
|
+
*/
|
|
215
|
+
openTelemetryOptions?: RedwoodOpenTelemetryConfig;
|
|
216
|
+
/**
|
|
217
|
+
* @description Configure which scalars to include in the schema. This should match your
|
|
218
|
+
* `graphql.includeScalars` configuration in `cedar.toml`.
|
|
219
|
+
*
|
|
220
|
+
* The default is to include. You must set to `false` to exclude.
|
|
221
|
+
*/
|
|
222
|
+
includeScalars?: RedwoodScalarConfig;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* @description Configure GraphQLHandler with options
|
|
226
|
+
*
|
|
227
|
+
* Note: Cedar Realtime is not supported
|
|
228
|
+
*/
|
|
229
|
+
export type GraphQLHandlerOptions = GraphQLYogaOptions;
|
|
230
|
+
export type GraphiQLOptions = Pick<GraphQLYogaOptions, 'allowGraphiQL' | 'generateGraphiQLHeader'>;
|
|
231
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;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zB;;;;;;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,6BAA6B,CAAA;IAEhD;;OAEG;IACH,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;IAEjD;;;;;OAKG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAA;CACrC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,kBAAkB,EAClB,eAAe,GAAG,wBAAwB,CAC3C,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|