grafast 0.0.1-0.9 → 0.0.1-1.2
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/LICENSES.txt +3 -3
- package/dist/args.d.ts +1 -1
- package/dist/bucket.d.ts +2 -3
- package/dist/config.d.ts +12 -2
- package/dist/constraints.d.ts +1 -1
- package/dist/engine/LayerPlan.d.ts +6 -5
- package/dist/engine/OperationPlan.d.ts +7 -9
- package/dist/engine/OutputPlan.d.ts +12 -12
- package/dist/engine/executeBucket.d.ts +2 -2
- package/dist/engine/executeOutputPlan.d.ts +4 -4
- package/dist/envelop.js +54 -1
- package/dist/error.d.ts +9 -0
- package/dist/establishOperationPlan.d.ts +19 -3
- package/dist/exportAs.d.ts +1 -1
- package/dist/grafastGraphql.d.ts +2 -2
- package/dist/graphqlCollectFields.d.ts +2 -2
- package/dist/index.d.ts +9 -8
- package/dist/index.js +13 -15
- package/dist/input.d.ts +2 -2
- package/dist/interfaces.d.ts +68 -59
- package/dist/makeGrafastSchema.d.ts +7 -7
- package/dist/operationPlan-input.d.ts +6 -0
- package/dist/polymorphic.d.ts +1 -1
- package/dist/prepare.d.ts +7 -0
- package/dist/step.d.ts +11 -11
- package/dist/steps/{__trackedObject.d.ts → __trackedValue.d.ts} +5 -5
- package/dist/steps/connection.d.ts +9 -9
- package/dist/steps/constant.d.ts +1 -1
- package/dist/steps/deepEval.d.ts +1 -1
- package/dist/steps/each.d.ts +1 -1
- package/dist/steps/error.d.ts +2 -2
- package/dist/steps/filter.d.ts +2 -2
- package/dist/steps/first.d.ts +1 -1
- package/dist/steps/graphqlResolver.d.ts +13 -19
- package/dist/steps/groupBy.d.ts +2 -2
- package/dist/steps/index.d.ts +4 -5
- package/dist/steps/lambda.d.ts +5 -7
- package/dist/steps/list.d.ts +5 -10
- package/dist/steps/listTransform.d.ts +7 -7
- package/dist/steps/listen.d.ts +3 -3
- package/dist/steps/loadMany.d.ts +3 -3
- package/dist/steps/loadOne.d.ts +2 -2
- package/dist/steps/node.d.ts +0 -1
- package/dist/steps/object.d.ts +10 -10
- package/dist/steps/partitionByIndex.d.ts +1 -1
- package/dist/steps/proxy.d.ts +8 -2
- package/dist/steps/{map.d.ts → remapKeys.d.ts} +7 -8
- package/dist/steps/reverse.d.ts +1 -1
- package/dist/steps/setter.d.ts +5 -5
- package/dist/thereCanBeOnlyOne.d.ts +2 -0
- package/dist/utils.d.ts +25 -17
- package/package.json +4 -4
- package/dist/opPlan-input.d.ts +0 -6
package/dist/LICENSES.txt
CHANGED
|
@@ -110,7 +110,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
110
110
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
111
111
|
|
|
112
112
|
--------------------------------------------------------------------------------
|
|
113
|
-
debug v4.3.
|
|
113
|
+
debug v4.3.4 - Josh Junon <josh.junon@protonmail.com>
|
|
114
114
|
git://github.com/debug-js/debug.git
|
|
115
115
|
--------------------------------------------------------------------------------
|
|
116
116
|
|
|
@@ -254,7 +254,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
--------------------------------------------------------------------------------
|
|
257
|
-
tamedevil v0.0.0-
|
|
257
|
+
tamedevil v0.0.0-1.1 - Benjie Gillam <benjie@jemjie.com>
|
|
258
258
|
git+https://github.com/graphile/heart.git
|
|
259
259
|
--------------------------------------------------------------------------------
|
|
260
260
|
|
|
@@ -281,7 +281,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
--------------------------------------------------------------------------------
|
|
284
|
-
tslib v2.
|
|
284
|
+
tslib v2.5.0 - Microsoft Corp.
|
|
285
285
|
https://github.com/Microsoft/tslib.git
|
|
286
286
|
--------------------------------------------------------------------------------
|
|
287
287
|
|
package/dist/args.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ExecutionArgs } from "graphql";
|
|
2
|
-
export declare function hookArgs(args: ExecutionArgs,
|
|
2
|
+
export declare function hookArgs(args: ExecutionArgs, resolvedPreset: GraphileConfig.ResolvedPreset, ctx: Partial<Grafast.RequestContext>): ExecutionArgs | PromiseLike<ExecutionArgs>;
|
|
3
3
|
//# sourceMappingURL=args.d.ts.map
|
package/dist/bucket.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { LayerPlan } from "./engine/LayerPlan";
|
|
2
2
|
import type { MetaByMetaKey } from "./engine/OperationPlan";
|
|
3
3
|
import type { ExecutionEventEmitter } from "./interfaces.js";
|
|
4
|
-
export interface
|
|
4
|
+
export interface RequestTools {
|
|
5
5
|
readonly eventEmitter: ExecutionEventEmitter | undefined;
|
|
6
6
|
metaByMetaKey: MetaByMetaKey;
|
|
7
|
-
insideGraphQL:
|
|
7
|
+
insideGraphQL: false;
|
|
8
8
|
}
|
|
9
9
|
export interface Bucket {
|
|
10
10
|
layerPlan: LayerPlan;
|
|
11
11
|
size: number;
|
|
12
|
-
noDepsList: readonly undefined[];
|
|
13
12
|
polymorphicPathList: readonly string[];
|
|
14
13
|
store: Map<number, any[]>;
|
|
15
14
|
isComplete: boolean;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import type { AsyncHooks, PluginHook } from "graphile-config";
|
|
2
2
|
export declare const NULL_PRESET: GraphileConfig.ResolvedPreset;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type GraphileConfigModule = typeof import("graphile-config");
|
|
4
|
+
type PromiseOrValue<T> = T | Promise<T>;
|
|
5
5
|
export declare function withGraphileConfig<T>(callback: (graphileConfig: GraphileConfigModule | null) => PromiseOrValue<T>): PromiseOrValue<T>;
|
|
6
|
+
declare const $$skipHooks: unique symbol;
|
|
7
|
+
declare const $$hooksForPreset: unique symbol;
|
|
8
|
+
declare global {
|
|
9
|
+
namespace GraphileConfig {
|
|
10
|
+
interface ResolvedPreset {
|
|
11
|
+
[$$hooksForPreset]?: null | AsyncHooks<GraphileConfig.GrafastHooks>;
|
|
12
|
+
[$$skipHooks]?: Record<string, boolean>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
6
16
|
export declare function withHooks<TResult>(resolvedPreset: GraphileConfig.ResolvedPreset, callback: (hooks: AsyncHooks<GraphileConfig.GrafastHooks> | null) => PromiseOrValue<TResult>): PromiseOrValue<TResult>;
|
|
7
17
|
export declare function hook<THookName extends keyof GraphileConfig.GrafastHooks>(resolvedPreset: GraphileConfig.ResolvedPreset, hookName: THookName, ...args: Parameters<GraphileConfig.GrafastHooks[THookName] extends PluginHook<infer U> ? U : never>): PromiseOrValue<void>;
|
|
8
18
|
export {};
|
package/dist/constraints.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface IsEmptyConstraint {
|
|
|
24
24
|
path: (string | number)[];
|
|
25
25
|
isEmpty: boolean;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type Constraint = ValueConstraint | EqualityConstraint | ExistsConstraint | LengthConstraint | IsEmptyConstraint;
|
|
28
28
|
export declare function matchesConstraints(constraints: Constraint[], object: unknown): boolean;
|
|
29
29
|
export {};
|
|
30
30
|
//# sourceMappingURL=constraints.d.ts.map
|
|
@@ -22,6 +22,7 @@ export interface LayerPlanReasonSubscription {
|
|
|
22
22
|
}
|
|
23
23
|
export interface LayerPlanReasonMutationField {
|
|
24
24
|
type: "mutationField";
|
|
25
|
+
mutationIndex: number;
|
|
25
26
|
}
|
|
26
27
|
export interface LayerPlanReasonDefer {
|
|
27
28
|
type: "defer";
|
|
@@ -39,11 +40,11 @@ export interface LayerPlanReasonSubroutine {
|
|
|
39
40
|
export declare function isBranchingLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
40
41
|
export declare function isDeferredLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
41
42
|
export declare function isPolymorphicLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
42
|
-
export
|
|
43
|
-
export
|
|
43
|
+
export type LayerPlanReason = LayerPlanReasonRoot | LayerPlanReasonNullableField | LayerPlanReasonListItem | LayerPlanReasonSubscription | LayerPlanReasonMutationField | LayerPlanReasonDefer | LayerPlanReasonPolymorphic | LayerPlanReasonSubroutine;
|
|
44
|
+
export type HasParent<A extends LayerPlanReason> = A extends any ? A extends {
|
|
44
45
|
parentStep: ExecutableStep;
|
|
45
46
|
} ? A : never : never;
|
|
46
|
-
export
|
|
47
|
+
export type LayerPlanReasonsWithParentStep = HasParent<LayerPlanReason>;
|
|
47
48
|
export interface LayerPlanPhase {
|
|
48
49
|
normalSteps?: Array<{
|
|
49
50
|
step: ExecutableStep;
|
|
@@ -61,7 +62,7 @@ export declare class LayerPlan<TReason extends LayerPlanReason = LayerPlanReason
|
|
|
61
62
|
polymorphicPaths: ReadonlySet<string>;
|
|
62
63
|
id: number;
|
|
63
64
|
readonly rootStep: ExecutableStep | null;
|
|
64
|
-
|
|
65
|
+
copyStepIds: number[];
|
|
65
66
|
children: LayerPlan[];
|
|
66
67
|
steps: ExecutableStep[];
|
|
67
68
|
pendingSteps: ExecutableStep[];
|
|
@@ -74,7 +75,7 @@ export declare class LayerPlan<TReason extends LayerPlanReason = LayerPlanReason
|
|
|
74
75
|
getStep(id: number, requestingStep: ExecutableStep): ExecutableStep;
|
|
75
76
|
_addStep(step: ExecutableStep): number;
|
|
76
77
|
_addModifierStep(step: ModifierStep<any>): string;
|
|
77
|
-
makeNewBucketCallback(inner: TE): typeof this.newBucket;
|
|
78
|
+
makeNewBucketCallback(this: LayerPlan<TReason>, inner: TE): typeof this.newBucket;
|
|
78
79
|
finalize(): void;
|
|
79
80
|
newBucket(parentBucket: Bucket): Bucket | null;
|
|
80
81
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { FragmentDefinitionNode, GraphQLObjectType, GraphQLSchema, GraphQLUnionType, OperationDefinitionNode } from "graphql";
|
|
2
2
|
import type { Constraint } from "../constraints.js";
|
|
3
3
|
import type { ModifierStep } from "../index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { __TrackedValueStep, __ValueStep, ExecutableStep } from "../index.js";
|
|
5
5
|
import type { PrintPlanGraphOptions } from "../mermaid.js";
|
|
6
6
|
import type { LayerPlanReasonSubroutine } from "./LayerPlan.js";
|
|
7
7
|
import { LayerPlan } from "./LayerPlan.js";
|
|
8
8
|
import { OutputPlan } from "./OutputPlan.js";
|
|
9
9
|
import { StepTracker } from "./StepTracker.js";
|
|
10
10
|
export declare const POLYMORPHIC_ROOT_PATH = "";
|
|
11
|
-
export
|
|
11
|
+
export type OperationPlanPhase = "init" | "plan" | "validate" | "optimize" | "finalize" | "ready";
|
|
12
12
|
export interface MetaByMetaKey {
|
|
13
13
|
[metaKey: string | number | symbol]: Record<string, any>;
|
|
14
14
|
}
|
|
@@ -46,19 +46,17 @@ export declare class OperationPlan {
|
|
|
46
46
|
readonly variableValuesStep: __ValueStep<{
|
|
47
47
|
[key: string]: any;
|
|
48
48
|
}>;
|
|
49
|
-
readonly trackedVariableValuesStep:
|
|
49
|
+
readonly trackedVariableValuesStep: __TrackedValueStep<{
|
|
50
50
|
[key: string]: any;
|
|
51
51
|
}>;
|
|
52
52
|
readonly contextConstraints: Constraint[];
|
|
53
|
-
readonly contextStep: __ValueStep<
|
|
54
|
-
|
|
55
|
-
}>;
|
|
56
|
-
readonly trackedContextStep: __TrackedObjectStep<{
|
|
53
|
+
readonly contextStep: __ValueStep<Grafast.Context>;
|
|
54
|
+
readonly trackedContextStep: __TrackedValueStep<{
|
|
57
55
|
[key: string]: any;
|
|
58
56
|
}>;
|
|
59
57
|
readonly rootValueConstraints: Constraint[];
|
|
60
58
|
readonly rootValueStep: __ValueStep<any>;
|
|
61
|
-
readonly trackedRootValueStep:
|
|
59
|
+
readonly trackedRootValueStep: __TrackedValueStep<any>;
|
|
62
60
|
makeMetaByMetaKey: () => MetaByMetaKey;
|
|
63
61
|
readonly itemStepIdByListStepId: {
|
|
64
62
|
[listStepId: number]: number | undefined;
|
|
@@ -91,7 +89,7 @@ export declare class OperationPlan {
|
|
|
91
89
|
private track;
|
|
92
90
|
private validateSteps;
|
|
93
91
|
private replaceStep;
|
|
94
|
-
processSteps(actionDescription: string, fromStepId: number, order: "dependents-first" | "dependencies-first", callback: (plan: ExecutableStep
|
|
92
|
+
processSteps(actionDescription: string, fromStepId: number, order: "dependents-first" | "dependencies-first", callback: (plan: ExecutableStep) => ExecutableStep): void;
|
|
95
93
|
private getPeers;
|
|
96
94
|
private isImmoveable;
|
|
97
95
|
private hoistStep;
|
|
@@ -6,50 +6,50 @@ import type { JSONValue, LocationDetails } from "../interfaces.js";
|
|
|
6
6
|
import type { ExecutableStep } from "../step.js";
|
|
7
7
|
import type { PayloadRoot } from "./executeOutputPlan.js";
|
|
8
8
|
import type { LayerPlan } from "./LayerPlan.js";
|
|
9
|
-
export
|
|
9
|
+
export type OutputPlanTypeIntrospection = {
|
|
10
10
|
mode: "introspection";
|
|
11
11
|
field: FieldNode;
|
|
12
12
|
variableNames: string[];
|
|
13
13
|
introspectionCacheByVariableValues: LRU<string, JSONValue>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type OutputPlanTypeRoot = {
|
|
16
16
|
mode: "root";
|
|
17
17
|
typeName: string;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type OutputPlanTypeObject = {
|
|
20
20
|
mode: "object";
|
|
21
21
|
typeName: string;
|
|
22
22
|
deferLabel: string | undefined;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type OutputPlanTypePolymorphicObject = {
|
|
25
25
|
mode: "polymorphic";
|
|
26
26
|
typeNames: string[];
|
|
27
27
|
deferLabel: string | undefined;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type OutputPlanTypeArray = {
|
|
30
30
|
mode: "array";
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type OutputPlanTypeLeaf = {
|
|
33
33
|
mode: "leaf";
|
|
34
34
|
serialize: GraphQLScalarType["serialize"];
|
|
35
35
|
graphqlType: GraphQLScalarType | GraphQLEnumType;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type OutputPlanTypeNull = {
|
|
38
38
|
mode: "null";
|
|
39
39
|
};
|
|
40
|
-
export
|
|
41
|
-
export
|
|
40
|
+
export type OutputPlanType = OutputPlanTypeRoot | OutputPlanTypeObject | OutputPlanTypePolymorphicObject | OutputPlanTypeLeaf | OutputPlanTypeNull | OutputPlanTypeArray | OutputPlanTypeIntrospection;
|
|
41
|
+
export type OutputPlanKeyValueOutputPlan = {
|
|
42
42
|
type: "outputPlan";
|
|
43
43
|
outputPlan: OutputPlan;
|
|
44
44
|
isNonNull: boolean;
|
|
45
45
|
locationDetails: LocationDetails;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type OutputPlanKeyValueTypeName = {
|
|
48
48
|
type: "__typename";
|
|
49
49
|
locationDetails: LocationDetails;
|
|
50
50
|
};
|
|
51
|
-
export
|
|
52
|
-
export
|
|
51
|
+
export type OutputPlanKeyValue = OutputPlanKeyValueOutputPlan | OutputPlanKeyValueTypeName;
|
|
52
|
+
export type OutputPlanKeyValueOutputPlanWithCachedBits = OutputPlanKeyValueOutputPlan & {
|
|
53
53
|
layerPlanId: number;
|
|
54
54
|
};
|
|
55
55
|
export declare class OutputPlan<TType extends OutputPlanType = OutputPlanType> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Bucket,
|
|
1
|
+
import type { Bucket, RequestTools } from "../bucket.js";
|
|
2
2
|
import type { PromiseOrDirect } from "../interfaces.js";
|
|
3
|
-
export declare function executeBucket(bucket: Bucket, requestContext:
|
|
3
|
+
export declare function executeBucket(bucket: Bucket, requestContext: RequestTools): PromiseOrDirect<void>;
|
|
4
4
|
export declare function newBucket(spec: Pick<Bucket, "layerPlan" | "store" | "size" | "hasErrors" | "polymorphicPathList">): Bucket;
|
|
5
5
|
//# sourceMappingURL=executeBucket.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { GraphQLError } from "graphql";
|
|
2
|
-
import type { Bucket,
|
|
2
|
+
import type { Bucket, RequestTools } from "../bucket.js";
|
|
3
3
|
import type { JSONValue } from "../interfaces.js";
|
|
4
4
|
import type { OutputPlan } from "./OutputPlan.js";
|
|
5
|
-
export
|
|
5
|
+
export type OutputPath = Array<string | number>;
|
|
6
6
|
export interface OutputStream {
|
|
7
7
|
asyncIterable: AsyncIterableIterator<any>;
|
|
8
8
|
}
|
|
9
9
|
export interface PayloadRoot {
|
|
10
|
-
insideGraphQL:
|
|
10
|
+
insideGraphQL: false;
|
|
11
11
|
errors: GraphQLError[];
|
|
12
12
|
queue: Array<SubsequentPayloadSpec>;
|
|
13
13
|
streams: Array<SubsequentStreamSpec>;
|
|
@@ -16,7 +16,7 @@ export interface PayloadRoot {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
export interface OutputPlanContext {
|
|
19
|
-
requestContext:
|
|
19
|
+
requestContext: RequestTools;
|
|
20
20
|
root: PayloadRoot;
|
|
21
21
|
path: ReadonlyArray<string | number>;
|
|
22
22
|
}
|
package/dist/envelop.js
CHANGED
|
@@ -1 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
const { Buffer } = require('node:buffer');
|
|
2
|
+
const { scryptSync, createDecipheriv } = require('node:crypto');
|
|
3
|
+
const pkgName = "grafast";
|
|
4
|
+
const pkgVersion = "0.0.1-1.2";
|
|
5
|
+
|
|
6
|
+
const RESET = '\x1b[0m';
|
|
7
|
+
const BOLD_BLACK_ON_RED = '\x1b[40;31;1;7m';
|
|
8
|
+
const RED = '\x1b[31m';
|
|
9
|
+
const BOLD = '\x1b[1m';
|
|
10
|
+
const BOLD_BLUE = '\x1b[34;1m';
|
|
11
|
+
const BOLD_BLUE_UNDERLINED = '\x1b[34;1;4m';
|
|
12
|
+
|
|
13
|
+
const iSponsorGraphile = `${RESET}${BOLD_BLUE}I_SPONSOR_GRAPHILE${RESET}${RED}`;
|
|
14
|
+
const website = `${RESET}${BOLD_BLUE_UNDERLINED}https://grafast.org${RESET}`;
|
|
15
|
+
const errorPrefix = `${BOLD_BLACK_ON_RED}[ ERROR ]${RESET} ${RED}`;
|
|
16
|
+
const errorSuffix = `${RESET}
|
|
17
|
+
${BOLD_BLACK_ON_RED}[ CONTEXT ]${RESET} ${RED}You are attempting to run pre-release software that is only available to Graphile sponsors.${RESET}
|
|
18
|
+
|
|
19
|
+
Please refer to the ${website} documentation for the right code to use with this version '${BOLD}${pkgName}@${pkgVersion}${RESET}'.${RESET}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const password = process.env.I_SPONSOR_GRAPHILE;
|
|
23
|
+
if (typeof password !== 'string') {
|
|
24
|
+
console.error(
|
|
25
|
+
`${errorPrefix}You must set the ${iSponsorGraphile} environmental variable to the shared secret to use this pre-release software.${errorSuffix}`,
|
|
26
|
+
);
|
|
27
|
+
process.exit(42);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const algorithm = "aes-192-cbc";
|
|
31
|
+
const salt = "We wouldn't be able to do so much OSS without sponsorship. 8570924948557124";
|
|
32
|
+
const key = scryptSync(password, salt, 24);
|
|
33
|
+
const ivBuffer = Buffer.from("Py5JDLke/uvEKRIqg7Womw==", "base64");
|
|
34
|
+
const iv = new Uint8Array(ivBuffer.buffer, ivBuffer.byteOffset, ivBuffer.length);
|
|
35
|
+
const decipher = createDecipheriv(algorithm, key, iv);
|
|
36
|
+
const encrypted = "KX0PnHCnZsMWKRnyXvIziG/UOZR9ye0Cwx9Ya/dlM1GZMcDbIFSi1wmCpN488+FVBcbr2zpMBLAoWi8gvGgUSV4rEu+Z71Gu4E2FuwA2egHvC5T+abvD71VpglIPfENIV9koeVGMy2y8q9Y6u0L+IVFDCvnIZbPuv8eMyyX9PbyV6tnJglbh+9/+ajLMF94YGeUbstYsLy1RtArVf0OcQ7mIZpthIRnXY4Otx3AuYn0MS2teYpeCB48gHCVPGm1pVpk4ovlEMfS0zAsSPRRNAfq/NirbTfVVCimyDFScL/50Hab1ukFrvZFcrNLJJJXYGwCQmSUXN8bi7/P78pUAWTkgj4GmgXlSpoC+nKSzh4mcbwjuXNmJ4gPD3G+otWyXDDpzgU5ajgPq3DDP6Vl8uLpP3tObepFIT4oCCPbyvAE34nomttQ0c2MUY0H9iOj+Xp7CLZzS+vrl6Fz6H+0WseWukKy2RdEvZX3e/DR03FGaXlvCqneWM+7qEvLb2wsXDF+wcHmDq/NBKAwUyGZquv8bAN49R99A873kVCJ8gUZPmDsg/X8P3K92FXof0GQKa7o5mKFu3wttTBaUtfatLQFp+bE7JuoOzdgZ5jGDJiTmeMToyutbfr3tMZC60KL70npvTleaizUYjHfitHMHD9OsrMOnRZohgaLPbR69QKlnUw1mJ0imunLSaSN+TNV0taHN6dr+rKE0OzI9E+tO1QupwerU44ZhJgsUsj+ze/beWXsMxIJIJ5YK+MjKLAKcb/alsa0rzTFtHX3EsrJ1trwXGTeggXZ+N7ZhxjA/MBUSOXfaX+ci9bC/Kfs6eAz13DWBmBn8hX+0AAGF/w7fAr7senKviSDamlhmC4hluTvOEoecFTkd3PcslFEkIXzgXkLmqzQx/C7CwttjZ7lY99tBrsp3ZOdthUd8R2ztwxEPqTujQ0rw/ILx0YB5oLw6LzLyjoZDD/rTfUBaj/4NbQnmdmN9yaPJ6w0unxgFGhE1gIt+eAIP7MZsQmmCkYKKLxsILhqp+LwaIhgFBsPv/rceR+IRHTJ3JWuOMQqzOqEsgHgy+CUE/sWGKtmy4HgIMc3S0/uVjCReEFDMfTeLm9PmEVu59U6r3GMF4hrTap4mtf8YdUw7Wqxi4EK0dhvgqw0rW37tPNAz4AenwCpgnfwJgvY3EIoqUac5yRNTM5lT9FTXc2cyUcnp2TVK7oad08xefXF6wQGI7UaAUwXETBP5Q8hyGUy4PTX4JT4xZFrBabWThGYFGpVR7LlfWX1NcyOtiQPwuioQ5yVJ+XQv7pHwZC6SI9ILrwN5NhV1strlr+hDZ1cY2ZFAxMTGxhDH2EuTEIefJ6otKETk/ZMfUU4Kew8TU3viIfprLlKjDi80LeDyxKKoYv3F5Zwpso5exrKTh/ItRp9NTxFjeh52STnsd2qQRdQfF6mOatomfiwwj4AQYU0BNyzbsCbii6Mr97jYV/SPX+7+v1mcvxTY+GQoszWkqX0KkaPR3qPX8pKeuUbmTg6upgUi8e8iOnj3oc64ktrIjqHpXQfqBZxTtGJstNl56cDAkx83A5ELmBaiILhAjJZT+elX2kRUs60r+UvaSKU2Nn2SbmdeZt0Tt2ot6xElR8zofZSg8fqeLKy14zR2EX8x9PcY7dvT+XQ1L3D8CAlo0gD+XA8b9r7WlsKwJwk2NduHjSAo5EU+HWUEtBfdKBFVjdI5f3U9H00eWp3q42da2ggTDkIkuyfK3qFHsNw8M+mvaUDB15OavAAvBHozr83P6mZrSYPTUnQ5UuywEKSEXjAVzl5lRy9FwiD754fu0cJ+In4Yk60tOj4="
|
|
37
|
+
let decrypted;
|
|
38
|
+
try {
|
|
39
|
+
decrypted = decipher.update(encrypted, 'base64', 'utf8') + decipher.final('utf8');
|
|
40
|
+
} catch (e) {
|
|
41
|
+
console.error(
|
|
42
|
+
`${errorPrefix}The value for the ${iSponsorGraphile} environmental variable (value: '${password.slice(
|
|
43
|
+
0,
|
|
44
|
+
2,
|
|
45
|
+
)}...${password.slice(-2)}') is incorrect.${errorSuffix}`,
|
|
46
|
+
);
|
|
47
|
+
process.exit(42);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Convince Node to allow ESM named imports
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// Load our decrypted module
|
|
54
|
+
eval(decrypted);
|
package/dist/error.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { $$extensions } from "./interfaces.js";
|
|
2
|
+
import { $$safeError } from "./interfaces.js";
|
|
1
3
|
export interface GrafastError extends Error {
|
|
2
4
|
originalError: Error;
|
|
5
|
+
[$$extensions]?: Record<string, any>;
|
|
3
6
|
}
|
|
4
7
|
export declare const $$error: unique symbol;
|
|
5
8
|
export declare class _GrafastError extends Error implements GrafastError {
|
|
@@ -10,4 +13,10 @@ export declare class _GrafastError extends Error implements GrafastError {
|
|
|
10
13
|
}
|
|
11
14
|
export declare function newGrafastError(error: Error, planId: number | null): _GrafastError;
|
|
12
15
|
export declare function isGrafastError(value: any): value is GrafastError;
|
|
16
|
+
export declare class SafeError extends Error {
|
|
17
|
+
extensions?: Record<string, any> | undefined;
|
|
18
|
+
[$$safeError]: boolean;
|
|
19
|
+
constructor(message: string, extensions?: Record<string, any> | undefined, errorOptions?: ErrorOptions);
|
|
20
|
+
}
|
|
21
|
+
export declare function isSafeError(error: Error): error is SafeError;
|
|
13
22
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
import LRU from "@graphile/lru";
|
|
1
2
|
import type { FragmentDefinitionNode, GraphQLSchema, OperationDefinitionNode } from "graphql";
|
|
2
3
|
import { OperationPlan } from "./index.js";
|
|
3
|
-
import type {
|
|
4
|
-
|
|
4
|
+
import type { BaseGraphQLRootValue, BaseGraphQLVariables } from "./interfaces.js";
|
|
5
|
+
type Fragments = {
|
|
5
6
|
[key: string]: FragmentDefinitionNode;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
interface LinkedList<T> {
|
|
9
|
+
value: T;
|
|
10
|
+
next: LinkedList<T> | null;
|
|
11
|
+
}
|
|
12
|
+
interface Cache {
|
|
13
|
+
possibleOperationPlans: LinkedList<OperationPlan>;
|
|
14
|
+
fragments: Fragments;
|
|
15
|
+
}
|
|
16
|
+
type CacheByOperation = LRU<OperationDefinitionNode, Cache>;
|
|
17
|
+
declare const $$cacheByOperation: unique symbol;
|
|
18
|
+
declare module "graphql" {
|
|
19
|
+
interface GraphQLSchema {
|
|
20
|
+
[$$cacheByOperation]?: CacheByOperation;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare function establishOperationPlan<TVariables extends BaseGraphQLVariables = BaseGraphQLVariables, TContext extends Grafast.Context = Grafast.Context, TRootValue extends BaseGraphQLRootValue = BaseGraphQLRootValue>(schema: GraphQLSchema, operation: OperationDefinitionNode, fragments: Fragments, variableValues: TVariables, context: TContext, rootValue: TRootValue): OperationPlan;
|
|
8
24
|
export {};
|
|
9
25
|
//# sourceMappingURL=establishOperationPlan.d.ts.map
|
package/dist/exportAs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function exportAs<T>(moduleName: string, thing: T, exportName: string): T;
|
|
1
|
+
export declare function exportAs<T extends object>(moduleName: string, thing: T, exportName: string | string[]): T;
|
|
2
2
|
export declare function exportAsMany(moduleName: string, all: {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}): void;
|
package/dist/grafastGraphql.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AsyncExecutionResult, ExecutionResult, GraphQLArgs } from "graphql";
|
|
2
2
|
import type { PromiseOrValue } from "graphql/jsutils/PromiseOrValue";
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function grafast(args: GraphQLArgs, resolvedPreset?: GraphileConfig.ResolvedPreset, ctx?: Partial<Grafast.RequestContext>): PromiseOrValue<ExecutionResult | AsyncGenerator<AsyncExecutionResult, void, undefined>>;
|
|
4
|
+
export declare function grafastSync(args: GraphQLArgs, resolvedPreset?: GraphileConfig.ResolvedPreset, ctx?: Partial<Grafast.RequestContext>): ExecutionResult;
|
|
5
5
|
//# sourceMappingURL=grafastGraphql.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FieldNode, SelectionNode } from "graphql";
|
|
2
2
|
import { GraphQLObjectType } from "graphql";
|
|
3
3
|
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
4
|
-
import type {
|
|
5
|
-
export declare function evalDirectiveArg<T = unknown>(selection: SelectionNode, directiveName: string, argumentName: string, variableValuesStep:
|
|
4
|
+
import type { __TrackedValueStep } from "./steps/index.js";
|
|
5
|
+
export declare function evalDirectiveArg<T = unknown>(selection: SelectionNode, directiveName: string, argumentName: string, variableValuesStep: __TrackedValueStep): T | undefined;
|
|
6
6
|
export interface SelectionSetDigest {
|
|
7
7
|
label: string | undefined;
|
|
8
8
|
fields: Map<string, FieldNode[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./thereCanBeOnlyOne.js";
|
|
2
|
+
import { exportAs, exportAsMany } from "./exportAs.js";
|
|
2
3
|
import { grafastPrint } from "./grafastPrint.js";
|
|
3
4
|
import { EnumPlans, FieldPlans, GrafastPlans, InputObjectPlans, InterfaceOrUnionPlans, makeGrafastSchema, ObjectPlans, ScalarPlans } from "./makeGrafastSchema.js";
|
|
4
5
|
import { PrintPlanGraphOptions } from "./mermaid.js";
|
|
5
6
|
import { defer, Deferred } from "./deferred.js";
|
|
6
7
|
import { isDev, noop } from "./dev.js";
|
|
7
8
|
import { OperationPlan } from "./engine/OperationPlan.js";
|
|
8
|
-
import { GrafastError, isGrafastError } from "./error.js";
|
|
9
|
+
import { GrafastError, isGrafastError, isSafeError, SafeError } from "./error.js";
|
|
9
10
|
import { execute } from "./execute.js";
|
|
10
|
-
import {
|
|
11
|
+
import { grafast, grafastSync } from "./grafastGraphql.js";
|
|
11
12
|
import { InputStep } from "./input.js";
|
|
12
|
-
import { $$bypassGraphQL, $$
|
|
13
|
-
import { polymorphicWrap
|
|
13
|
+
import { $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim, ArgumentApplyPlanResolver, ArgumentInputPlanResolver, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, EnumValueApplyPlanResolver, EventCallback, EventMapKey, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, FieldArgs, FieldInfo, FieldPlanResolver, GrafastArgumentConfig, GrafastArgumentExtensions, GrafastEnumValueExtensions, GrafastFieldConfig, GrafastFieldConfigArgumentMap, GrafastFieldExtensions, GrafastInputFieldConfig, GrafastInputFieldExtensions, GrafastObjectTypeExtensions, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, GrafastValuesList, InputObjectFieldApplyPlanResolver, InputObjectFieldInputPlanResolver, InputObjectTypeInputPlanResolver, JSONArray, JSONObject, JSONValue, NodeIdCodec, NodeIdHandler, OutputPlanForType, PolymorphicData, PromiseOrDirect, ScalarPlanResolver, StepOptimizeOptions, StepStreamOptions, TypedEventEmitter } from "./interfaces.js";
|
|
14
|
+
import { polymorphicWrap } from "./polymorphic.js";
|
|
14
15
|
import { assertListCapableStep, BaseStep, ExecutableStep, isExecutableStep, isListCapableStep, isModifierStep, isObjectLikeStep, isStreamableStep, ListCapableStep, ModifierStep, ObjectLikeStep, PolymorphicStep, StreamableStep, UnbatchedExecutableStep } from "./step.js";
|
|
15
|
-
import { __InputListStep, __InputObjectStep, __InputStaticLeafStep, __ItemStep, __ListTransformStep,
|
|
16
|
+
import { __InputListStep, __InputObjectStep, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __ValueStep, access, AccessStep, ActualKeyByDesiredKey, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, debugPlans, deepEval, DeepEvalStep, each, EdgeCapableStep, EdgeStep, error, ErrorStep, filter, FilterPlanMemo, first, FirstStep, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, lambda, LambdaStep, last, LastStep, list, listen, ListenStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, loadMany, LoadManyCallback, loadManyCallback, LoadManyOptions, LoadManySingleRecordStep, LoadManyStep, loadOne, LoadOneCallback, loadOneCallback, LoadOneOptions, LoadOneStep, node, NodeStep, object, ObjectPlanMeta, ObjectStep, operationPlan, PageInfoCapableStep, partitionByIndex, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, setter, SetterCapableStep, SetterStep, specFromNodeId } from "./steps/index.js";
|
|
16
17
|
import { stringifyPayload } from "./stringifyPayload.js";
|
|
17
18
|
import { stripAnsi } from "./stripAnsi.js";
|
|
18
19
|
import { subscribe } from "./subscribe.js";
|
|
19
|
-
import { arrayOfLength, arraysMatch, getEnumValueConfig,
|
|
20
|
+
import { arrayOfLength, arraysMatch, getEnumValueConfig, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, inputObjectFieldSpec, InputObjectTypeSpec, isPromiseLike, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, objectFieldSpec, objectSpec, ObjectTypeFields, ObjectTypeSpec, stepADependsOnStepB, stepAMayDependOnStepB, stepsAreInSamePhase } from "./utils.js";
|
|
20
21
|
export { isAsyncIterable } from "iterall";
|
|
21
|
-
export { __InputListStep, __InputObjectStep, __InputStaticLeafStep, __ItemStep, __ListTransformStep,
|
|
22
|
+
export { __InputListStep, __InputObjectStep, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __ValueStep, $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim, access, AccessStep, ActualKeyByDesiredKey, ArgumentApplyPlanResolver, ArgumentInputPlanResolver, arrayOfLength, arraysMatch, assertListCapableStep, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, BaseStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, debugPlans, deepEval, DeepEvalStep, defer, Deferred, each, EdgeCapableStep, EdgeStep, EnumPlans, EnumValueApplyPlanResolver, error, ErrorStep, EventCallback, EventMapKey, ExecutableStep, execute, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, exportAs, exportAsMany, FieldArgs, FieldInfo, FieldPlanResolver, FieldPlans, filter, FilterPlanMemo, first, FirstStep, getEnumValueConfig, grafast, GrafastArgumentConfig, GrafastArgumentExtensions, GrafastEnumValueExtensions, GrafastError, GrafastFieldConfig, GrafastFieldConfigArgumentMap, GrafastFieldExtensions, grafast as grafastGraphql, grafastSync as grafastGraphqlSync, GrafastInputFieldConfig, GrafastInputFieldConfigMap, GrafastInputFieldExtensions, GrafastInputObjectType, GrafastObjectType, GrafastObjectTypeExtensions, GrafastPlans, grafastPrint, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, grafastSync, GrafastValuesList, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, InputObjectFieldApplyPlanResolver, InputObjectFieldInputPlanResolver, inputObjectFieldSpec, InputObjectPlans, InputObjectTypeInputPlanResolver, InputObjectTypeSpec, InputStep, InterfaceOrUnionPlans, isDev, isExecutableStep, isGrafastError, isListCapableStep, isModifierStep, isObjectLikeStep, isPromiseLike, isSafeError, isStreamableStep, JSONArray, JSONObject, JSONValue, lambda, LambdaStep, last, LastStep, list, ListCapableStep, listen, ListenStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, loadMany, LoadManyCallback, loadManyCallback, LoadManyOptions, LoadManySingleRecordStep, LoadManyStep, loadOne, LoadOneCallback, loadOneCallback, LoadOneOptions, LoadOneStep, makeGrafastSchema, ModifierStep, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, node, NodeIdCodec, NodeIdHandler, NodeStep, noop, object, objectFieldSpec, ObjectLikeStep, ObjectPlanMeta, ObjectPlans, objectSpec, ObjectStep, ObjectTypeFields, ObjectTypeSpec, OperationPlan, operationPlan, OutputPlanForType, PageInfoCapableStep, partitionByIndex, PolymorphicData, PolymorphicStep, polymorphicWrap, PrintPlanGraphOptions, PromiseOrDirect, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, SafeError, ScalarPlanResolver, ScalarPlans, setter, SetterCapableStep, SetterStep, specFromNodeId, stepADependsOnStepB, stepAMayDependOnStepB, StepOptimizeOptions, stepsAreInSamePhase, StepStreamOptions, StreamableStep, stringifyPayload, stripAnsi, subscribe, TypedEventEmitter, UnbatchedExecutableStep, };
|
|
22
23
|
export { hookArgs } from "./args.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|