attio 0.0.1-experimental.20241002 → 0.0.1-experimental.20241003
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/lib/build.js +2 -2
- package/lib/client/hooks/use-query.d.ts +1 -1
- package/lib/client/icon.d.ts +1 -1
- package/lib/client/run-query.d.ts +1 -1
- package/lib/commands/connection/add.js +1 -1
- package/lib/commands/dev.js +6 -6
- package/lib/components/BuildError.js +2 -2
- package/lib/components/CodeGenErrors.js +22 -0
- package/lib/graphql/generate-operations.js +63 -33
- package/lib/graphql/parse-schema.js +28 -18
- package/lib/machines/build-machine.js +35 -17
- package/lib/machines/code-gen-machine.js +5 -11
- package/lib/machines/dev-machine.js +3 -7
- package/lib/templates/javascript/eslint.config.js +1 -0
- package/lib/templates/typescript/eslint.config.js +2 -0
- package/lib/templates/typescript/tsconfig.json +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lint.cjs +42 -0
- package/package.json +1 -4
- package/lib/graphql/generate-types.js +0 -109
- package/lib/graphql.d.ts +0 -4
- package/lib/util/update-operation-types.js +0 -13
package/lib/build.js
CHANGED
|
@@ -13,6 +13,6 @@ const buildErrorSchema = z.object({
|
|
|
13
13
|
}),
|
|
14
14
|
});
|
|
15
15
|
export const errorSchema = z.object({
|
|
16
|
-
errors: z.array(buildErrorSchema),
|
|
17
|
-
warnings: z.array(buildErrorSchema),
|
|
16
|
+
errors: z.array(buildErrorSchema).optional(),
|
|
17
|
+
warnings: z.array(buildErrorSchema).optional(),
|
|
18
18
|
});
|
package/lib/client/icon.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type Icon = AttioIcon | `${string}.png`;
|
|
2
|
-
export type AttioIcon = "Activity" | "AlignArrowUp" | "AlignBlockCenter" | "AlignBlockLeft" | "AlignBlockRight" | "AlignCenter" | "AlignLeft" | "AlignRight" | "Apps" | "Archive" | "ArrowDown" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowLeft" | "ArrowLeftRight" | "ArrowRight" | "ArrowsRefresh" | "ArrowUp" | "ArrowUpDown" | "ArrowUpLeft" | "ArrowUpRight" | "ArrowUpRightCircle" | "At" | "Attachment" | "Attributes" | "AttributesPlus" | "Automation" | "Bank" | "BarChart" | "Bold" | "BracketsCross" | "Breakpoint" | "BrowserExtension" | "BulletList" | "CalendarArrowLeft" | "CalendarArrowRight" | "CalendarClock" | "Calendar" | "CalendarArrowLeft" | "CalendarArrowRight" | "CalendarClock" | "CalendarDate" | "CalendarMinus" | "CalendarPlus" | "Caption" | "Change" | "Changelog" | "Check" | "CheckCircle" | "CheckDouble" | "CheckSquare" | "CheckSquarePlus" | "ChevronDown" | "ChevronDownChevronUp" | "ChevronLeft" | "ChevronRight" | "ChevronRightDouble" | "ChevronUp" | "ChevronUpChevronDown" | "CircleEmpty" | "CircleFilled" | "ClassifyRecord" | "ClassifyText" | "Clock" | "ClockDelay" | "Code" | "Collapse" | "Collapsed" | "CollapsedHover" | "CollapseHover" | "CollapseScreen" | "Collection" | "CollectionPlus" | "ColumnPlus" | "Columns" | "ColumnsPlus" | "Command" | "Comment" | "CommentPlus" | "Comments" | "Companies" | "Company" | "CompanyPlus" | "ConditionDown" | "Confetti" | "Copy" | "CreditCard" | "Cross" | "CrossCircle" | "Currency" | "
|
|
2
|
+
export type AttioIcon = "Activity" | "AlignArrowUp" | "AlignBlockCenter" | "AlignBlockLeft" | "AlignBlockRight" | "AlignCenter" | "AlignLeft" | "AlignRight" | "Apps" | "Archive" | "ArrowDown" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowLeft" | "ArrowLeftRight" | "ArrowRight" | "ArrowsRefresh" | "ArrowUp" | "ArrowUpDown" | "ArrowUpLeft" | "ArrowUpRight" | "ArrowUpRightCircle" | "At" | "Attachment" | "Attributes" | "AttributesPlus" | "Automation" | "Bank" | "BarChart" | "Bold" | "BracketsCross" | "Breakpoint" | "BrowserExtension" | "BulletList" | "CalendarArrowLeft" | "CalendarArrowRight" | "CalendarClock" | "Calendar" | "CalendarArrowLeft" | "CalendarArrowRight" | "CalendarClock" | "CalendarDate" | "CalendarMinus" | "CalendarPlus" | "Caption" | "Change" | "Changelog" | "Check" | "CheckCircle" | "CheckDouble" | "CheckSquare" | "CheckSquarePlus" | "ChevronDown" | "ChevronDownChevronUp" | "ChevronLeft" | "ChevronRight" | "ChevronRightDouble" | "ChevronUp" | "ChevronUpChevronDown" | "CircleEmpty" | "CircleFilled" | "ClassifyRecord" | "ClassifyText" | "Clock" | "ClockDelay" | "Code" | "Collapse" | "Collapsed" | "CollapsedHover" | "CollapseHover" | "CollapseScreen" | "Collection" | "CollectionPlus" | "ColumnPlus" | "Columns" | "ColumnsPlus" | "Command" | "Comment" | "CommentPlus" | "Comments" | "Companies" | "Company" | "CompanyPlus" | "ConditionDown" | "Confetti" | "Copy" | "CreditCard" | "Cross" | "CrossCircle" | "Currency" | "CustomTemplates" | "TemplatesCog" | "TemplatesEdit" | "TemplatesPlus" | "Dashboard" | "DashboardPlus" | "Data" | "DataText" | "Deal" | "Description" | "Desktop" | "Dollar" | "DollarArrowUp" | "DotsHorizontal" | "DotsVertical" | "Download" | "DragHandle" | "Duplicate" | "Edit" | "EditDisabled" | "Education" | "Email" | "EmailArrowLeft" | "EmailArrowRight" | "EmailDraft" | "EmailMass" | "EmailMassPlus" | "EmailMinus" | "EmailPlus" | "EmailTemplate" | "EmailTemplatePlus" | "EmojiAdd" | "EmptyCircle" | "Enter" | "Equals" | "EstimatedArr" | "Euro" | "EverythingBagel" | "ExpandScreen" | "Eye" | "EyeHide" | "Feedback" | "FileCsv" | "Filter" | "FilterAdd" | "FilterFunnel" | "Flash" | "Folder" | "FolderPlus" | "Forbid" | "FunnelChart" | "FunnelStepsChart" | "GalleryView" | "Gbp" | "GitBranch" | "Globe" | "GlobeHemisphereEast" | "Grid" | "Growth" | "Hand" | "Handshake" | "Hashtag" | "HelpCircle" | "Image" | "ImportExport" | "Inbox" | "InboxCross" | "InboxNotification" | "InfoCircle" | "Input" | "Italic" | "Key" | "KeyboardKey" | "LineChart" | "Link" | "List" | "ListArrowLeft" | "ListEdit" | "ListFlash" | "ListMinus" | "ListPlus" | "ListSearch" | "ListView" | "Location" | "Locked" | "LogOut" | "MapChart" | "Maximise" | "Merge" | "Message" | "Minimise" | "Minus" | "MinusSquare" | "MobilePhone" | "Moon" | "More" | "Move" | "MultiSelect" | "Name" | "None" | "Note" | "NotePlus" | "NoteTemplate" | "NoteTemplateArrowRight" | "NoteTemplatePlus" | "NumberList" | "ObjectIcon" | "ObjectPlaceholder" | "ObjectPlus" | "PanelLeft" | "PanelRight" | "Paste" | "Pause" | "Percentage" | "Phone" | "PhoneArrowLeft" | "PhoneArrowRight" | "PhoneBusy" | "PhoneCancel" | "PhoneCheck" | "PhoneCross" | "PhoneMissed" | "PhoneNoAnswer" | "PieChart" | "Pin" | "Pinned" | "Placeholder" | "Play" | "Plus" | "PlusSquare" | "Pointer" | "PromptCompletion" | "Record" | "RecordDetailEdit" | "RecordEdit" | "RecordFlash" | "RecordPlus" | "RecordSearch" | "Reference" | "RelationshipConnect" | "RemoveCircle" | "Rename" | "Repeat" | "Replace" | "Reply" | "Report" | "ReportPlus" | "Reset" | "RingBell" | "Robot" | "Rocket" | "Rows" | "RowsPlus" | "Sales" | "Search" | "SearchMinus" | "SearchPlus" | "SectionArrowDown" | "SectionArrowUp" | "Select" | "SelfServed" | "Send" | "SendAdd" | "SendEdit" | "ServiceBell" | "Sessions" | "Settings" | "SettingsArrowRight" | "SettingsCheck" | "SettingsMinus" | "Share" | "ShieldLocker" | "Shortcut" | "ShortcutMinus" | "ShortcutPlus" | "ShowRightSidebar" | "Signature" | "SingleMetricChart" | "SnapGrid" | "SortAscending" | "SortDescending" | "SortPlus" | "Spreadsheet" | "SquareEmpty" | "SquareFilled" | "SquareStrength" | "StageChanged" | "Star" | "StarCross" | "Status" | "Strength" | "Subscription" | "SummariseRecord" | "Sun" | "Switch" | "Table" | "Tag" | "Templates" | "TestTube" | "Text" | "TextIndentLeft" | "TextIndentRight" | "ThumbsDown" | "ThumbsUp" | "TidyUp" | "TimeChart" | "TimeInStatus" | "Timestamp" | "Trash" | "Trigger" | "TriggerPlus" | "Undo" | "Unlink" | "Upload" | "User" | "UserArrowLeft" | "UserArrowRight" | "UserFlash" | "UserHeart" | "UserKey" | "UserMinus" | "UserPhone" | "UserPlaceholder" | "UserPlus" | "Users" | "VideoCamera" | "View" | "ViewPlus" | "Voicemail" | "WarningCircle" | "WarningTriangle" | "Webhooks" | "WorkflowCredit" | "WorkflowRun" | "WorkflowsEdit" | "WorkflowsPlaceholder" | "WorkflowsPlus" | "Workspace";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Imperatively runs a GraphQL query.
|
|
3
3
|
*/
|
|
4
4
|
export declare function runQuery(query: string, variableValues?: Record<string, any>): Promise<any>;
|
|
5
|
-
export type Query<Variables, Result> = {
|
|
5
|
+
export type Query<Variables extends Record<string, any>, Result> = {
|
|
6
6
|
__data: Result;
|
|
7
7
|
__variables: Variables;
|
|
8
8
|
} & string;
|
|
@@ -102,7 +102,7 @@ export default function AddConnection({ options: { slug, label, description, typ
|
|
|
102
102
|
React.createElement(Select, { items: connectionTypes, onSelect: (connectionType) => send({ type: "Choose Connection Type", connectionType }) })))),
|
|
103
103
|
snapshot.matches("Ask for global") && (React.createElement(React.Fragment, null,
|
|
104
104
|
React.createElement(Box, null,
|
|
105
|
-
React.createElement(Text, null, "
|
|
105
|
+
React.createElement(Text, null, "Is this a global connection?")),
|
|
106
106
|
React.createElement(Box, null,
|
|
107
107
|
React.createElement(Select, { items: [
|
|
108
108
|
{ value: true, label: "Yes" },
|
package/lib/commands/dev.js
CHANGED
|
@@ -5,6 +5,7 @@ import { option } from "pastel";
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { renderBuildErrors } from "../components/BuildError.js";
|
|
8
|
+
import { CodeGenError } from "../components/CodeGenErrors.js";
|
|
8
9
|
import { InitialInstructions } from "../components/InitialInstructions.js";
|
|
9
10
|
import { ScrollBox } from "../components/ScrollBox.js";
|
|
10
11
|
import { renderTypeScriptErrors } from "../components/TypeScriptErrors.js";
|
|
@@ -28,7 +29,8 @@ export default function Dev({ options: { debug } }) {
|
|
|
28
29
|
const jsTime = snapshot.children.javascript?.getSnapshot().context.time;
|
|
29
30
|
const tsErrors = snapshot.children.typescript?.getSnapshot().context.errors;
|
|
30
31
|
const tsTime = snapshot.children.typescript?.getSnapshot().context.time;
|
|
31
|
-
const
|
|
32
|
+
const codeGenError = snapshot.children["code-gen"]?.getSnapshot().context.error;
|
|
33
|
+
const hasErrors = Boolean(jsError || tsErrors || codeGenError);
|
|
32
34
|
const isNoConfig = snapshot.matches("No Config");
|
|
33
35
|
React.useEffect(() => {
|
|
34
36
|
if (isNoConfig) {
|
|
@@ -57,10 +59,7 @@ export default function Dev({ options: { debug } }) {
|
|
|
57
59
|
React.createElement(Text, null,
|
|
58
60
|
"Code Gen:",
|
|
59
61
|
" ",
|
|
60
|
-
JSON.stringify(snapshot.children["code-gen"]?.getSnapshot()?.value),
|
|
61
|
-
" ",
|
|
62
|
-
snapshot.children["code-gen"]?.getSnapshot().context.error
|
|
63
|
-
?.message)),
|
|
62
|
+
JSON.stringify(snapshot.children["code-gen"]?.getSnapshot()?.value))),
|
|
64
63
|
snapshot.context.devVersion?.app_id && (React.createElement(Box, null,
|
|
65
64
|
React.createElement(Text, null,
|
|
66
65
|
"App ID: ",
|
|
@@ -101,5 +100,6 @@ export default function Dev({ options: { debug } }) {
|
|
|
101
100
|
React.createElement(Text, null, "Press \"o\" to open GraphQL Explorer")))),
|
|
102
101
|
hasErrors && (React.createElement(ScrollBox, { borderStyle: "round", padding: 1 },
|
|
103
102
|
jsError && renderBuildErrors(jsError),
|
|
104
|
-
tsErrors && renderTypeScriptErrors(tsErrors)
|
|
103
|
+
tsErrors && renderTypeScriptErrors(tsErrors),
|
|
104
|
+
codeGenError && React.createElement(CodeGenError, { error: codeGenError })))));
|
|
105
105
|
}
|
|
@@ -34,7 +34,7 @@ const Error = React.forwardRef(({ message, level }, ref) => (React.createElement
|
|
|
34
34
|
React.createElement(Text, { color: "greenBright" }, "^")))))))));
|
|
35
35
|
export function renderBuildErrors({ errors, warnings }) {
|
|
36
36
|
return [
|
|
37
|
-
...errors.map((error, index) => (React.createElement(Error, { key: `BuildError-${index}`, message: error, level: "error" }))),
|
|
38
|
-
...warnings.map((error, index) => (React.createElement(Error, { key: `BuildError-${index}`, message: error, level: "warning" }))),
|
|
37
|
+
...(errors ?? []).map((error, index) => (React.createElement(Error, { key: `BuildError-${index}`, message: error, level: "error" }))),
|
|
38
|
+
...(warnings ?? []).map((error, index) => (React.createElement(Error, { key: `BuildError-${index}`, message: error, level: "warning" }))),
|
|
39
39
|
];
|
|
40
40
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { codeFrameColumns } from "@babel/code-frame";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export const CodeGenError = React.forwardRef(({ error }, ref) => {
|
|
5
|
+
return (React.createElement(Box, { flexDirection: "column", ref: ref },
|
|
6
|
+
React.createElement(Box, null,
|
|
7
|
+
React.createElement(Text, { color: "red" },
|
|
8
|
+
React.createElement(Text, { backgroundColor: "red", color: "white" },
|
|
9
|
+
" ",
|
|
10
|
+
"GRAPHQL ERROR",
|
|
11
|
+
" "),
|
|
12
|
+
" ",
|
|
13
|
+
React.createElement(Text, null, error.message))),
|
|
14
|
+
React.createElement(Box, { paddingTop: 1, flexDirection: "column" },
|
|
15
|
+
React.createElement(Box, null,
|
|
16
|
+
React.createElement(Text, null, codeFrameColumns(error.source, {
|
|
17
|
+
start: {
|
|
18
|
+
line: error.locations[0].line,
|
|
19
|
+
column: error.locations[0].column,
|
|
20
|
+
},
|
|
21
|
+
}))))));
|
|
22
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
-
import { parse, visit, validate, print, OperationTypeNode, isObjectType, isListType, isNonNullType, isInputObjectType, isEnumType, getNamedType, } from "graphql";
|
|
2
|
+
import { parse, visit, validate, print, OperationTypeNode, GraphQLError as OfficialGraphQLError, isObjectType, isListType, isNonNullType, isInputObjectType, isEnumType, getNamedType, validateSchema, } from "graphql";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { format } from "prettier";
|
|
5
|
+
import { getLineAndColumn, GraphQLError } from "./parse-schema.js";
|
|
5
6
|
function findGraphQLFiles(dir) {
|
|
6
7
|
const files = [];
|
|
7
8
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
@@ -91,26 +92,16 @@ function generateOperationFunction(graphqlFileName, operationName, variableDefin
|
|
|
91
92
|
const typeName = `${operationName.charAt(0).toUpperCase() + operationName.slice(1)}`;
|
|
92
93
|
const returnType = generateReturnType(selectionSet, schema);
|
|
93
94
|
let input;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const varType = schema.getType(print(
|
|
95
|
+
const variables = variableDefinitions
|
|
96
|
+
.map((def) => {
|
|
97
|
+
const varType = schema.getType(print(def.type).replace(/[!]/g, ""));
|
|
97
98
|
const varTypeString = isInputObjectType(varType)
|
|
98
99
|
? generateInputObjectTypeDefinition(varType)
|
|
99
100
|
: generateTypeDefinition(varType);
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
.map((def) => {
|
|
105
|
-
const varType = schema.getType(print(def.type).replace(/[!]/g, ""));
|
|
106
|
-
const varTypeString = isInputObjectType(varType)
|
|
107
|
-
? generateInputObjectTypeDefinition(varType)
|
|
108
|
-
: generateTypeDefinition(varType);
|
|
109
|
-
return `${def.variable.name.value}: ${varTypeString}`;
|
|
110
|
-
})
|
|
111
|
-
.join(", ");
|
|
112
|
-
input = `export interface ${typeName}Variables { ${variables} }`;
|
|
113
|
-
}
|
|
101
|
+
return `${def.variable.name.value}: ${varTypeString}`;
|
|
102
|
+
})
|
|
103
|
+
.join(", ");
|
|
104
|
+
input = `export interface ${typeName}Variables { ${variables} }`;
|
|
114
105
|
return `
|
|
115
106
|
declare module "./${graphqlFileName}" {
|
|
116
107
|
${input}
|
|
@@ -123,29 +114,68 @@ declare module "./${graphqlFileName}" {
|
|
|
123
114
|
`;
|
|
124
115
|
}
|
|
125
116
|
export async function generateOperationFromQuery(graphqlFileName, query, schema) {
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
let ast;
|
|
118
|
+
try {
|
|
119
|
+
ast = parse(query);
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
if (e instanceof OfficialGraphQLError) {
|
|
123
|
+
throw new GraphQLError(e.message, e.locations ?? [{ line: 1, column: 1 }], query, graphqlFileName);
|
|
124
|
+
}
|
|
125
|
+
throw e;
|
|
126
|
+
}
|
|
127
|
+
let operation = "";
|
|
128
|
+
const schemaErrors = validateSchema(schema);
|
|
129
|
+
if (schemaErrors.length > 0) {
|
|
130
|
+
throw new Error(`Schema validation errors: ${schemaErrors.map((e) => e.message).join("\n")}`);
|
|
131
|
+
}
|
|
128
132
|
const validationErrors = validate(schema, ast);
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
const filteredErrors = validationErrors.filter((error) => !error.message.includes("is not executable"));
|
|
134
|
+
const firstError = filteredErrors[0];
|
|
135
|
+
if (firstError) {
|
|
136
|
+
throw new GraphQLError(firstError.message, firstError.locations ?? [{ line: 1, column: 1 }], query, graphqlFileName);
|
|
131
137
|
}
|
|
132
138
|
visit(ast, {
|
|
133
139
|
OperationDefinition(node) {
|
|
134
|
-
if (node.name
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
if (node.name) {
|
|
141
|
+
switch (node.operation) {
|
|
142
|
+
case OperationTypeNode.MUTATION:
|
|
143
|
+
case OperationTypeNode.SUBSCRIPTION:
|
|
144
|
+
throw new GraphQLError(`Only queries are supported, found ${node.operation}`, node.loc ? [getLineAndColumn(query, node.loc)] : [{ line: 1, column: 1 }], query, graphqlFileName);
|
|
145
|
+
case OperationTypeNode.QUERY:
|
|
146
|
+
if (operation) {
|
|
147
|
+
throw new GraphQLError(`Only one query is allowed per .graphql file`, node.loc
|
|
148
|
+
? [getLineAndColumn(query, node.loc)]
|
|
149
|
+
: [{ line: 1, column: 1 }], query, graphqlFileName);
|
|
150
|
+
}
|
|
151
|
+
const operationName = node.name.value;
|
|
152
|
+
const variableDefinitions = node.variableDefinitions || [];
|
|
153
|
+
operation = generateOperationFunction(graphqlFileName, operationName, variableDefinitions, schema, node.selectionSet);
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
return node.operation;
|
|
157
|
+
}
|
|
138
158
|
}
|
|
139
159
|
},
|
|
140
160
|
});
|
|
141
|
-
return format(
|
|
161
|
+
return format(operation, { parser: "typescript" });
|
|
142
162
|
}
|
|
143
163
|
export async function generateOperations(rootDir, schema) {
|
|
144
164
|
const graphqlFiles = findGraphQLFiles(rootDir);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
await Promise.all(graphqlFiles.map(async (file) => {
|
|
166
|
+
const content = await fs.promises.readFile(file, "utf-8");
|
|
167
|
+
const operation = await generateOperationFromQuery(path.basename(file), content, schema);
|
|
168
|
+
const formattedOperation = await format(`/**
|
|
169
|
+
* ****************************************************
|
|
170
|
+
* THIS FILE IS AUTO-GENERATED AT DEVELOPMENT TIME.
|
|
171
|
+
*
|
|
172
|
+
* DO NOT EDIT DIRECTLY OR COMMIT IT TO SOURCE CONTROL.
|
|
173
|
+
* ****************************************************
|
|
174
|
+
*/
|
|
175
|
+
import {Query } from "attio/client"
|
|
176
|
+
|
|
177
|
+
${operation}
|
|
178
|
+
`, { parser: "typescript" });
|
|
179
|
+
await fs.promises.writeFile(`${file}.d.ts`, formattedOperation);
|
|
180
|
+
}));
|
|
151
181
|
}
|
|
@@ -2,27 +2,41 @@ import { codeFrameColumns } from "@babel/code-frame";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import { parse, validateSchema, buildASTSchema } from "graphql";
|
|
4
4
|
import { validateSDL } from "graphql/validation/validate.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export class GraphQLError extends Error {
|
|
6
|
+
constructor(message, locations, source, filename) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.locations = locations;
|
|
9
|
+
this.source = source;
|
|
10
|
+
this.filename = filename;
|
|
11
|
+
}
|
|
12
|
+
toString() {
|
|
13
|
+
const { line, column } = this.locations[0];
|
|
14
|
+
return `${this.message}\n\n${this.filename}:${this.locations[0].line}\n\n${codeFrameColumns(this.source, {
|
|
9
15
|
start: { line, column },
|
|
10
|
-
})
|
|
11
|
-
.join(`\n\n`)}\n`;
|
|
16
|
+
})}\n`;
|
|
12
17
|
}
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
}
|
|
19
|
+
export function getLineAndColumn(source, location) {
|
|
20
|
+
let line = 1;
|
|
21
|
+
let column = 1;
|
|
22
|
+
for (let i = 0; i < location.start; i++) {
|
|
23
|
+
if (source[i] === "\n") {
|
|
24
|
+
line++;
|
|
25
|
+
column = 1;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
column++;
|
|
29
|
+
}
|
|
15
30
|
}
|
|
31
|
+
return { line, column };
|
|
16
32
|
}
|
|
17
33
|
export function parseSchemaString(schemaString, schemaPath) {
|
|
18
34
|
let parsedSchema;
|
|
19
35
|
try {
|
|
20
36
|
parsedSchema = parse(schemaString);
|
|
21
37
|
}
|
|
22
|
-
catch (
|
|
23
|
-
throw
|
|
24
|
-
code: `GRAPHQL_SYNTAX_ERROR`,
|
|
25
|
-
});
|
|
38
|
+
catch (e) {
|
|
39
|
+
throw new GraphQLError(e.message, e.locations, schemaString, schemaPath);
|
|
26
40
|
}
|
|
27
41
|
parsedSchema = {
|
|
28
42
|
...parsedSchema,
|
|
@@ -42,16 +56,12 @@ export function parseSchemaString(schemaString, schemaPath) {
|
|
|
42
56
|
};
|
|
43
57
|
const sdlValidationErrors = validateSDL(parsedSchema);
|
|
44
58
|
if (sdlValidationErrors.length) {
|
|
45
|
-
throw
|
|
46
|
-
code: `GRAPHQL_SCHEMA_ERROR`,
|
|
47
|
-
});
|
|
59
|
+
throw new GraphQLError(sdlValidationErrors[0].message, sdlValidationErrors[0].locations ?? [{ line: 1, column: 1 }], schemaString, schemaPath);
|
|
48
60
|
}
|
|
49
61
|
const schema = buildASTSchema(parsedSchema, { assumeValid: false, assumeValidSDL: false });
|
|
50
62
|
const schemaValidationErrors = validateSchema(schema);
|
|
51
63
|
if (schemaValidationErrors.length > 0) {
|
|
52
|
-
throw
|
|
53
|
-
code: `GRAPHQL_SCHEMA_ERROR`,
|
|
54
|
-
});
|
|
64
|
+
throw new GraphQLError(schemaValidationErrors[0].message, schemaValidationErrors[0].locations ?? [{ line: 1, column: 1 }], schemaString, schemaPath);
|
|
55
65
|
}
|
|
56
66
|
return {
|
|
57
67
|
source: schemaString,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assign, setup } from "xstate";
|
|
2
|
+
import { codeGenMachine } from "./code-gen-machine.js";
|
|
2
3
|
import { jsMachine } from "./js-machine.js";
|
|
3
4
|
import { tsMachine } from "./ts-machine.js";
|
|
4
5
|
const processes = ["javascript", "typescript"];
|
|
@@ -9,8 +10,9 @@ export const buildMachine = setup({
|
|
|
9
10
|
children: {},
|
|
10
11
|
},
|
|
11
12
|
actors: {
|
|
12
|
-
typescript: tsMachine,
|
|
13
|
-
javascript: jsMachine,
|
|
13
|
+
"typescript": tsMachine,
|
|
14
|
+
"javascript": jsMachine,
|
|
15
|
+
"code-gen": codeGenMachine,
|
|
14
16
|
},
|
|
15
17
|
guards: {
|
|
16
18
|
"all done": ({ context }) => context.failed.length + context.successful.length === processes.length,
|
|
@@ -68,10 +70,15 @@ export const buildMachine = setup({
|
|
|
68
70
|
},
|
|
69
71
|
},
|
|
70
72
|
initial: "Building",
|
|
73
|
+
invoke: {
|
|
74
|
+
src: "javascript",
|
|
75
|
+
id: "javascript",
|
|
76
|
+
input: ({ self }) => ({ parentRef: self, write: true }),
|
|
77
|
+
},
|
|
71
78
|
},
|
|
72
79
|
TypeScript: {
|
|
73
80
|
states: {
|
|
74
|
-
Validating: {
|
|
81
|
+
"Validating": {
|
|
75
82
|
on: {
|
|
76
83
|
"TypeScript Success": {
|
|
77
84
|
target: "Waiting",
|
|
@@ -88,15 +95,38 @@ export const buildMachine = setup({
|
|
|
88
95
|
},
|
|
89
96
|
},
|
|
90
97
|
},
|
|
98
|
+
invoke: {
|
|
99
|
+
src: "typescript",
|
|
100
|
+
id: "typescript",
|
|
101
|
+
input: ({ self }) => ({ parentRef: self }),
|
|
102
|
+
},
|
|
91
103
|
},
|
|
92
|
-
Waiting: {
|
|
104
|
+
"Waiting": {
|
|
93
105
|
always: {
|
|
94
106
|
target: "#Build Machine.All Done",
|
|
95
107
|
guard: "all done",
|
|
96
108
|
},
|
|
97
109
|
},
|
|
110
|
+
"Code Generating": {
|
|
111
|
+
on: {
|
|
112
|
+
"Code Generation Done": "Validating",
|
|
113
|
+
"Error": {
|
|
114
|
+
target: "Waiting",
|
|
115
|
+
actions: {
|
|
116
|
+
type: "setError",
|
|
117
|
+
params: { process: "typescript" },
|
|
118
|
+
},
|
|
119
|
+
reenter: true,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
invoke: {
|
|
123
|
+
src: "code-gen",
|
|
124
|
+
id: "code-gen",
|
|
125
|
+
input: ({ self }) => ({ parentRef: self }),
|
|
126
|
+
},
|
|
127
|
+
},
|
|
98
128
|
},
|
|
99
|
-
initial: "
|
|
129
|
+
initial: "Code Generating",
|
|
100
130
|
},
|
|
101
131
|
},
|
|
102
132
|
},
|
|
@@ -114,16 +144,4 @@ export const buildMachine = setup({
|
|
|
114
144
|
},
|
|
115
145
|
},
|
|
116
146
|
initial: "Building",
|
|
117
|
-
invoke: [
|
|
118
|
-
{
|
|
119
|
-
src: "javascript",
|
|
120
|
-
id: "javascript",
|
|
121
|
-
input: ({ self }) => ({ parentRef: self, write: true }),
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
src: "typescript",
|
|
125
|
-
id: "typescript",
|
|
126
|
-
input: ({ self }) => ({ parentRef: self }),
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
147
|
});
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { sendTo, assign, setup, fromCallback } from "xstate";
|
|
2
|
+
import { generateOperations } from "../graphql/generate-operations.js";
|
|
2
3
|
import { parseSchema } from "../graphql/parse-schema.js";
|
|
3
4
|
import { findNodeModulesPath } from "../util/find-node-modules-path.js";
|
|
4
|
-
import { updateOperationTypes } from "../util/update-operation-types.js";
|
|
5
5
|
export const codeGenMachine = setup({
|
|
6
6
|
types: {
|
|
7
7
|
context: {},
|
|
8
8
|
events: {},
|
|
9
9
|
input: {},
|
|
10
10
|
},
|
|
11
|
-
guards: {
|
|
12
|
-
"all finished": (_, params) => params.finished.length === 2,
|
|
13
|
-
},
|
|
14
11
|
actors: {
|
|
15
12
|
loadSchema: fromCallback(({ sendBack }) => {
|
|
16
13
|
const loadSchema = async () => {
|
|
@@ -30,17 +27,14 @@ export const codeGenMachine = setup({
|
|
|
30
27
|
loadSchema();
|
|
31
28
|
}),
|
|
32
29
|
generateOperations: fromCallback(({ sendBack, input }) => {
|
|
33
|
-
|
|
30
|
+
generateOperations(".", input.schema)
|
|
34
31
|
.then(() => sendBack({ type: "Done" }))
|
|
35
32
|
.catch((error) => sendBack({ type: "Error", error }));
|
|
36
33
|
}),
|
|
37
34
|
},
|
|
38
35
|
actions: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
setOperationsFinished: assign({
|
|
43
|
-
finished: (_, params) => params.finished.concat("operations.ts"),
|
|
36
|
+
clearError: assign({
|
|
37
|
+
error: () => undefined,
|
|
44
38
|
}),
|
|
45
39
|
setError: assign({
|
|
46
40
|
error: (_, params) => params.error,
|
|
@@ -54,7 +48,6 @@ export const codeGenMachine = setup({
|
|
|
54
48
|
id: "GraphQL Code Generation Machine",
|
|
55
49
|
context: ({ input }) => ({
|
|
56
50
|
schema: null,
|
|
57
|
-
finished: [],
|
|
58
51
|
parentRef: input.parentRef,
|
|
59
52
|
}),
|
|
60
53
|
states: {
|
|
@@ -82,6 +75,7 @@ export const codeGenMachine = setup({
|
|
|
82
75
|
on: {
|
|
83
76
|
Done: {
|
|
84
77
|
target: "Done",
|
|
78
|
+
actions: "clearError",
|
|
85
79
|
},
|
|
86
80
|
Error: {
|
|
87
81
|
target: "Errored",
|
|
@@ -117,13 +117,9 @@ export const devMachine = setup({
|
|
|
117
117
|
upload().catch((error) => sendBack({ type: "Upload Error", error }));
|
|
118
118
|
}),
|
|
119
119
|
"watch": fromCallback(({ sendBack }) => {
|
|
120
|
-
const watcher = chokidar.watch([
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
"src/webhooks",
|
|
124
|
-
"src/events",
|
|
125
|
-
".env",
|
|
126
|
-
]);
|
|
120
|
+
const watcher = chokidar.watch(["src/app", "src/assets", "src/webhooks", "src/events", ".env"], {
|
|
121
|
+
ignored: "**/*.graphql.d.ts",
|
|
122
|
+
});
|
|
127
123
|
watcher.on("ready", () => watcher.on("all", () => {
|
|
128
124
|
sendBack({ type: "Change" });
|
|
129
125
|
}));
|
|
@@ -39,7 +39,9 @@ module.exports = [
|
|
|
39
39
|
"react-hooks/rules-of-hooks": "error",
|
|
40
40
|
"react-hooks/exhaustive-deps": "error",
|
|
41
41
|
"@typescript-eslint/no-unused-vars": "error",
|
|
42
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
42
43
|
"attio/attio-client-import": "error",
|
|
44
|
+
"attio/server-default-export": "error",
|
|
43
45
|
},
|
|
44
46
|
settings: {
|
|
45
47
|
react: {
|
package/lib/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../client/icon.ts","../client/hooks/use-dialog.ts","../client/hooks/use-async-cache.ts","../client/run-query.ts","../client/hooks/use-query.ts","../client/object-slug.ts","../client/hooks/use-record.ts","../client/hooks/index.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../client/components/action.ts","../client/components/combobox.ts","../client/components/multistep.ts","../client/components/section.ts","../client/components/text-block.ts","../client/components/row.ts","../client/components/index.ts","../client/util/prettify.ts","../client/forms/array.ts","../client/forms/connection.ts","../client/forms/number.ts","../client/forms/string.ts","../client/forms/path.ts","../client/forms/build.ts","../client/forms/index.ts","../client/index.ts","../server/env.ts","../server/index.ts","../global.d.ts","../graphql.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/fetch.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/utils.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/filter-boolean.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/is-array.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/json-parse.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/array-includes.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/set-has.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/map-has.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/array-index-of.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/recommended.d.ts","../reset.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"f72d8575c77821f28733999b95615b7501e7095d28db0dc8f7c9f34609d6f04c","signature":"79a084ce9e11a255f2e4893ba68de839a16b794f2544dbed9fe5a7529454c560"},{"version":"844d0fe11d180ff5d41d391c5584c611f3b412188514d826a62f17330e481ad4","signature":"0249b9e77f851bc73c9176778306271596abc653d1ed9d9918c302d0899723a6"},{"version":"2c12bdfae58ba6e9a5cedf914afbd84f8356decdd3b9be009c9bfa3dbd66199e","signature":"47d4ecc821c23c1174f7b8c01da7ad0644a44529d331c6f66e783b280a896cab"},{"version":"a06209b4c542b8b8cf0830024e0f70c04a895bfcba1b251b5f3efec0e83af8f3","signature":"3b7b1a5eeaccb21ed1886a182fabe796edf317afdedc5f0f2d8f9326d2910625"},{"version":"4204bb2bfa31fb8c5a79d9620cf4eee17fc1a12cae4d04d8228cea00a63367ce","signature":"7cc5826e869470552e5a26108825ade3ec99bc336be29223d17a9b2fd95e88fc"},{"version":"111a7bdd0e13f9ba800aea82b496c711b59e988242bad4feb894688845be3eee","signature":"eea233968f029246924644d2a28e1bd4abe4b08b31fa51b00f3738a8e952127b"},{"version":"36fa95c395be998b924620713898173458002fa24e039830840cf4dbbed9a603","signature":"8f3e905197e70fa4396655c202cdac1add46d7c7ec48c0c98faf98b4c0a5ee7c"},{"version":"e90b1f312db588a04d15d112b51505ce10506bfd913514e693b08678163aa7fa","signature":"ec1e544dbd8ea7bee1220f74f069a1e39aa61a8e4b6c23ad610aaedad417ce9e"},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"ba7617784f6b9aeac5e20c5eea869bbc3ef31b905f59c796b0fd401dae17c111","a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"e6f3077b1780226627f76085397d10c77a4d851c7154fd4b3f1eb114f4c2e56d","affectsGlobalScope":true},{"version":"d62227cc97d2ef5a1d660eb3f5f7401ee817eb04cd5b17e80a525b19b2c84866","signature":"1a149671998490721108b340a95d52c4128f8d23c7314e016f2368c5cd558325"},{"version":"817921079e04452de37d0a3e592c8fb99924b1040f191b0bcc149e5b104ce2e4","signature":"4a3fa9ac0ac0af8ae9727194fa28ab15035abbe990e5e4c0fce832213c9f5b06"},{"version":"4013f5bf6ad4b01970c84779ac0f5aa7dff45f980b02136871772c719ff0c2ec","signature":"2b8f7172bf3d49cdaf2390babf886138b2b492c0ae60dc7876d566b319a5a44f"},{"version":"94a37269a0052cfa1def2751a7d91f7e6476a394fc08ffcc9f5314154b29646e","signature":"e2fc9b408ad727e8761cf7a85f324da0bb56b7b0b3673b0f647256bf77b050db"},{"version":"8c9717d1c9d28f3289a9b4ec0a9d897d4e2835c2f3e8fe77ac9c7af7d3b540d9","signature":"c929975005c3b0ae0b0a2451f80a8f7c0ea1ed89c072d7d3e914cbf600cdcf30"},{"version":"74a19abbe964a8293dc94743f7edb99aa26e3ef34ac002454a1e192e0132b8c8","signature":"9898e0feb7e652f0017d7c5094fb9ecaa2ba6b6bdab550789d5203194e3cd76b"},{"version":"9b000b551c95015f2e90e7cdbbb4826ff4319588953d64ac2f732581af35e93f","signature":"2bb44fc83b73600f019686a4f96dfa05e9a08d3865966be284ec396a026d00ce"},{"version":"f3d8b45c64db8e04d5c17a786e0bb3cedf28cf17e5e1cf64ca508dfb9be8b445","signature":"6160ae0bbe477143d1305f9dc83625cd982fb58cf7dfe4adaf8b9d1481a82435"},{"version":"afa57c88f1bea064f16f6dba1206c3863e71d3fb7a00a6398971bcdccbefc593","signature":"141aa96babfcb37a57e9dc74d95393fefb2e92f44cc9425fda5c467e3c7a9a83"},{"version":"94be7578556f3db00602ec6236e42fe1bf6df9bb307b3b81361b6536f9c1c0f2","signature":"804a38c3d2fe3d058e6bbafe81ff7a299261da665c62368032edffebb91ff229"},{"version":"1a483af8287923289e2776cb8e8c8d2aa46c0c5909e117bc4c5605d01da05fdb","signature":"042ff16beba5930ece1c186f8de4de8affb2dc6e6b4c33dad8bd32cd5d83573f"},{"version":"7988459a6b99b77e589b9e886e3bbcbab381ebad33a17b4274dd18b2236fdfa8","signature":"f1a904a63fd33d7f89a7f4fef830de331c87465d9bc1ca53528aca7fcec32e48"},{"version":"e333158e6b08b9cd292c5ed44935632b3f2eb18a8c0a308ed6a0e625254750c5","signature":"ec5c3e44710b6ad56394097f39ad70b6159742ed25904d899a83e5577afcb270"},{"version":"6e143100738665d1e6f9d2602d2585e6fdf4f7d182295cc94cb19af075c0c057","signature":"8d8e62ea8c0ec2fad6325d85bf14066caee3b3cbfce5d08f879494ff4bed1ac7"},{"version":"8c832f9ff9a1bdc5b95ee9d43dc6f31845c44318077c88e3f9a746e0eac31e28","signature":"3287beca90968f9de79dec808de661a6d10255ffd903b1004dc8287d9c263e52"},{"version":"db52d35c6ddcb9e4a504d9a93891d053aeddfa85c729d9481ba80cab776d8df6","signature":"0a1dbf0c0aa5d4c0fc939586be7edda08c0a15b817e85bbc437684bc176f334f"},{"version":"73d6d7e1ae65fb7b5c0f971a34f0ed823a0ed6adfd3bd29cb3a314db6c5fd753","signature":"cfe58d764a530a5002ed4d0522dab853f933241401c935623422e8e81ffb4455"},{"version":"d451cdef607074a6c7ebddd909134275d6a5c90ba5101602ac42bc104e3ac186","signature":"bc4d5577f1d018085f8eb29b89242d551625586e131d52fee4b0c27c7e1746a9"},{"version":"e0918784966cad929cb82e5d775a213a651269418b511d3c1ca65d740e226176","affectsGlobalScope":true},"2acbbca74119f1fb45d6c2563ad2da963714eb7741a643c510fb108e195d6905","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true},"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","d69a3298a197fe5d59edba0ec23b4abf2c8e7b8c6718eac97833633cd664e4c9",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true},"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","d4f9d3ae2fe1ae199e1c832cca2c44f45e0b305dfa2808afdd51249b6f4a5163","7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"9c611eff81287837680c1f4496daf9e737d6f3a1ff17752207814b8f8e1265af","affectsGlobalScope":true},"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","b5d4e3e524f2eead4519c8e819eaf7fa44a27c22418eff1b7b2d0ebc5fdc510d","afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true},{"version":"46755a4afc53df75f0bfce72259fb971daac826b0cdd8c4eaccad2755a817403","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024",{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","21c56c6e8eeacef15f63f373a29fab6a2b36e4705be7a528aae8c51469e2737b",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447",{"version":"98e4a7b236b99d95ba3b38f30392dc9370020002350dab42e78ae1a6353dcdd3","affectsGlobalScope":true},{"version":"dcf299a72c98d55f888980dffe2cd19020cdef6cbb32a0b28ef30b496ef7642d","affectsGlobalScope":true},{"version":"2e707bebde6153d06452cb3d03a9889a922853da46caf00f5fcc358c490bd6b1","affectsGlobalScope":true},{"version":"22f9c4223c59fd47ea5aadee362aec0b1adc9a6e58f58d9d848d71732f676abf","affectsGlobalScope":true},{"version":"8c5c8110577288007799018d817ecec25fe3eb3aefba99fc8720eb7c1bcd306e","affectsGlobalScope":true},{"version":"db41487da1c62b8a2e9aeaba4b79b9e2270452cfca0165bacb22ab50b2fb9bed","affectsGlobalScope":true},{"version":"eb0d8eac52f68a5fd4f4e8119040c907ca182f45f883e29b5e61cb9eeecb068a","affectsGlobalScope":true},{"version":"1bc1de3b1f094ed8f0612239c11d3163c1b1d7e197ecc6c1606051a3be8bfb5d","affectsGlobalScope":true},{"version":"78eebaa895ec3bfc488e0f2a7a05d573604be33f692187381ba8108cfe31b8c4","affectsGlobalScope":true},"5fc07ceecfafaba4308ea6c954298a259294fe3736b1e3cecda45ef626653769","289235dc0bf9e32f655ebd3a49b7992a122c1ddc9ada0a71fd1337cbac17dfe7"],"root":[[46,53],[59,78]],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"allowUmdGlobalAccess":false,"allowUnreachableCode":false,"allowUnusedLabels":false,"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":false,"emitDeclarationOnly":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":1,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","removeComments":false,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":6},"fileIdsList":[[166],[165,167,168,169,170,171,172,173],[79],[114],[115,120,148],[116,127,128,135,145,156],[116,117,127,135],[118,157],[119,120,128,136],[120,145,153],[121,123,127,135],[114,122],[123,124],[127],[125,127],[114,127],[127,128,129,145,156],[127,128,129,142,145,148],[112,115,161],[123,127,130,135,145,156],[127,128,130,131,135,145,153,156],[130,132,145,153,156],[79,80,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],[127,133],[134,156,161],[123,127,135,145],[89,93,156],[89,145,156],[84],[86,89,153,156],[135,153],[164],[84,164],[86,89,135,156],[81,82,85,88,115,127,145,156],[81,87],[85,89,115,148,156,164],[115,164],[105,115,164],[83,84,164],[89],[83,84,85,86,87,88,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,106,107,108,109,110,111],[89,96,97],[87,89,97,98],[88],[81,84,89],[89,93,97,98],[93],[87,89,92,156],[81,86,87,89,93,96],[115,145],[84,89,105,115,161,164],[136],[137],[114,138],[139,155,161],[140],[141],[127,142,143],[142,144,157,159],[115,127,145,146,147,148],[115,145,147],[145,146],[148],[149],[114,145],[127,151,152],[151,152],[120,135,145,153],[154],[135,155],[115,130,141,156],[120,157],[145,158],[134,159],[160],[115,120,127,129,138,145,156,159,161],[145,162],[54,55,56,57],[46,58],[59,60,61,62,63,64],[58],[65,71],[67,68,69,70,72],[66,67,68,69,70],[47,48,50,52],[49],[51],[46,49,53,65,67,68,69,70,71,72,73],[75]],"referencedMap":[[170,1],[173,1],[167,1],[172,1],[174,2],[171,1],[79,3],[80,3],[114,4],[115,5],[116,6],[117,7],[118,8],[119,9],[120,10],[121,11],[122,12],[123,13],[124,13],[126,14],[125,15],[127,16],[128,17],[129,18],[113,19],[130,20],[131,21],[132,22],[164,23],[133,24],[134,25],[135,26],[96,27],[103,28],[95,27],[110,29],[87,30],[86,31],[109,32],[104,33],[107,34],[89,35],[88,36],[84,37],[83,38],[106,39],[85,40],[90,41],[94,41],[112,42],[111,41],[98,43],[99,44],[101,45],[97,46],[100,47],[105,32],[92,48],[93,49],[102,50],[82,51],[108,52],[136,53],[137,54],[138,55],[139,56],[140,57],[141,58],[142,59],[143,59],[144,60],[145,61],[147,62],[146,63],[148,64],[149,65],[150,66],[151,67],[152,68],[153,69],[154,70],[155,71],[156,72],[157,73],[158,74],[159,75],[160,76],[161,77],[162,78],[58,79],[59,80],[65,81],[61,82],[64,82],[62,82],[63,82],[72,83],[73,84],[71,85],[53,86],[50,87],[52,88],[74,89],[76,90]],"exportedModulesMap":[[170,1],[173,1],[167,1],[172,1],[174,2],[171,1],[79,3],[80,3],[114,4],[115,5],[116,6],[117,7],[118,8],[119,9],[120,10],[121,11],[122,12],[123,13],[124,13],[126,14],[125,15],[127,16],[128,17],[129,18],[113,19],[130,20],[131,21],[132,22],[164,23],[133,24],[134,25],[135,26],[96,27],[103,28],[95,27],[110,29],[87,30],[86,31],[109,32],[104,33],[107,34],[89,35],[88,36],[84,37],[83,38],[106,39],[85,40],[90,41],[94,41],[112,42],[111,41],[98,43],[99,44],[101,45],[97,46],[100,47],[105,32],[92,48],[93,49],[102,50],[82,51],[108,52],[136,53],[137,54],[138,55],[139,56],[140,57],[141,58],[142,59],[143,59],[144,60],[145,61],[147,62],[146,63],[148,64],[149,65],[150,66],[151,67],[152,68],[153,69],[154,70],[155,71],[156,72],[157,73],[158,74],[159,75],[160,76],[161,77],[162,78],[58,79],[59,80],[65,81],[61,82],[64,82],[62,82],[63,82],[72,83],[73,84],[71,85],[53,86],[50,87],[52,88],[74,89],[76,90]],"semanticDiagnosticsPerFile":[170,173,165,167,168,169,172,174,171,166,79,80,114,115,116,117,118,119,120,121,122,123,124,126,125,127,128,129,113,163,130,131,132,164,133,134,135,96,103,95,110,87,86,109,104,107,89,88,84,83,106,85,90,91,94,81,112,111,98,99,101,97,100,105,92,93,102,82,108,136,137,138,139,140,141,142,143,144,145,147,146,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,56,54,58,57,55,44,45,9,8,2,10,11,12,13,14,15,16,17,3,18,4,19,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,59,60,65,61,64,62,63,67,72,68,73,69,71,70,53,48,47,50,52,46,74,51,49,66,77,78,175,75,76],"latestChangedDtsFile":"./server/index.d.ts"},"version":"5.4.5"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../client/icon.ts","../client/hooks/use-dialog.ts","../client/hooks/use-async-cache.ts","../client/run-query.ts","../client/hooks/use-query.ts","../client/object-slug.ts","../client/hooks/use-record.ts","../client/hooks/index.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../client/components/action.ts","../client/components/combobox.ts","../client/components/multistep.ts","../client/components/section.ts","../client/components/text-block.ts","../client/components/row.ts","../client/components/index.ts","../client/util/prettify.ts","../client/forms/array.ts","../client/forms/connection.ts","../client/forms/number.ts","../client/forms/string.ts","../client/forms/path.ts","../client/forms/build.ts","../client/forms/index.ts","../client/index.ts","../server/env.ts","../server/index.ts","../global.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/fetch.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/utils.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/filter-boolean.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/is-array.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/json-parse.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/array-includes.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/set-has.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/map-has.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/array-index-of.d.ts","../../../../node_modules/@total-typescript/ts-reset/dist/recommended.d.ts","../reset.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"6d926f2cb301b2a97ceaf4ea3f3d1ac8d4e5d07a7976743998230b641ef4279a","signature":"f2f25ef79d522fff3996d4395186cbe73598047729f7aa38f3dbdf473629b5dd"},{"version":"844d0fe11d180ff5d41d391c5584c611f3b412188514d826a62f17330e481ad4","signature":"0249b9e77f851bc73c9176778306271596abc653d1ed9d9918c302d0899723a6"},{"version":"2c12bdfae58ba6e9a5cedf914afbd84f8356decdd3b9be009c9bfa3dbd66199e","signature":"47d4ecc821c23c1174f7b8c01da7ad0644a44529d331c6f66e783b280a896cab"},{"version":"366b8908afa217843af5fc60f3486c87b9379e795995e441a44b06bc9335e5ed","signature":"51975ef3406912ec1e5cae4e4f06e109e68b19d573f794d36c4c53a344d6199d"},{"version":"a301aa4f39c9dfc341c8c62f26a14b6b6f48b7fb19bae241ed8dc5dea147ee33","signature":"448152f03b5199d7fd7c6a64248d34095ec1c0cf6ad853249a473d9d56ee7bcd"},{"version":"111a7bdd0e13f9ba800aea82b496c711b59e988242bad4feb894688845be3eee","signature":"eea233968f029246924644d2a28e1bd4abe4b08b31fa51b00f3738a8e952127b"},{"version":"36fa95c395be998b924620713898173458002fa24e039830840cf4dbbed9a603","signature":"8f3e905197e70fa4396655c202cdac1add46d7c7ec48c0c98faf98b4c0a5ee7c"},{"version":"e90b1f312db588a04d15d112b51505ce10506bfd913514e693b08678163aa7fa","signature":"ec1e544dbd8ea7bee1220f74f069a1e39aa61a8e4b6c23ad610aaedad417ce9e"},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"ba7617784f6b9aeac5e20c5eea869bbc3ef31b905f59c796b0fd401dae17c111","a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"e6f3077b1780226627f76085397d10c77a4d851c7154fd4b3f1eb114f4c2e56d","affectsGlobalScope":true},{"version":"d62227cc97d2ef5a1d660eb3f5f7401ee817eb04cd5b17e80a525b19b2c84866","signature":"1a149671998490721108b340a95d52c4128f8d23c7314e016f2368c5cd558325"},{"version":"817921079e04452de37d0a3e592c8fb99924b1040f191b0bcc149e5b104ce2e4","signature":"4a3fa9ac0ac0af8ae9727194fa28ab15035abbe990e5e4c0fce832213c9f5b06"},{"version":"4013f5bf6ad4b01970c84779ac0f5aa7dff45f980b02136871772c719ff0c2ec","signature":"2b8f7172bf3d49cdaf2390babf886138b2b492c0ae60dc7876d566b319a5a44f"},{"version":"94a37269a0052cfa1def2751a7d91f7e6476a394fc08ffcc9f5314154b29646e","signature":"e2fc9b408ad727e8761cf7a85f324da0bb56b7b0b3673b0f647256bf77b050db"},{"version":"8c9717d1c9d28f3289a9b4ec0a9d897d4e2835c2f3e8fe77ac9c7af7d3b540d9","signature":"c929975005c3b0ae0b0a2451f80a8f7c0ea1ed89c072d7d3e914cbf600cdcf30"},{"version":"74a19abbe964a8293dc94743f7edb99aa26e3ef34ac002454a1e192e0132b8c8","signature":"9898e0feb7e652f0017d7c5094fb9ecaa2ba6b6bdab550789d5203194e3cd76b"},{"version":"9b000b551c95015f2e90e7cdbbb4826ff4319588953d64ac2f732581af35e93f","signature":"2bb44fc83b73600f019686a4f96dfa05e9a08d3865966be284ec396a026d00ce"},{"version":"f3d8b45c64db8e04d5c17a786e0bb3cedf28cf17e5e1cf64ca508dfb9be8b445","signature":"6160ae0bbe477143d1305f9dc83625cd982fb58cf7dfe4adaf8b9d1481a82435"},{"version":"afa57c88f1bea064f16f6dba1206c3863e71d3fb7a00a6398971bcdccbefc593","signature":"141aa96babfcb37a57e9dc74d95393fefb2e92f44cc9425fda5c467e3c7a9a83"},{"version":"94be7578556f3db00602ec6236e42fe1bf6df9bb307b3b81361b6536f9c1c0f2","signature":"804a38c3d2fe3d058e6bbafe81ff7a299261da665c62368032edffebb91ff229"},{"version":"1a483af8287923289e2776cb8e8c8d2aa46c0c5909e117bc4c5605d01da05fdb","signature":"042ff16beba5930ece1c186f8de4de8affb2dc6e6b4c33dad8bd32cd5d83573f"},{"version":"7988459a6b99b77e589b9e886e3bbcbab381ebad33a17b4274dd18b2236fdfa8","signature":"f1a904a63fd33d7f89a7f4fef830de331c87465d9bc1ca53528aca7fcec32e48"},{"version":"e333158e6b08b9cd292c5ed44935632b3f2eb18a8c0a308ed6a0e625254750c5","signature":"ec5c3e44710b6ad56394097f39ad70b6159742ed25904d899a83e5577afcb270"},{"version":"6e143100738665d1e6f9d2602d2585e6fdf4f7d182295cc94cb19af075c0c057","signature":"8d8e62ea8c0ec2fad6325d85bf14066caee3b3cbfce5d08f879494ff4bed1ac7"},{"version":"8c832f9ff9a1bdc5b95ee9d43dc6f31845c44318077c88e3f9a746e0eac31e28","signature":"3287beca90968f9de79dec808de661a6d10255ffd903b1004dc8287d9c263e52"},{"version":"db52d35c6ddcb9e4a504d9a93891d053aeddfa85c729d9481ba80cab776d8df6","signature":"0a1dbf0c0aa5d4c0fc939586be7edda08c0a15b817e85bbc437684bc176f334f"},{"version":"73d6d7e1ae65fb7b5c0f971a34f0ed823a0ed6adfd3bd29cb3a314db6c5fd753","signature":"cfe58d764a530a5002ed4d0522dab853f933241401c935623422e8e81ffb4455"},{"version":"d451cdef607074a6c7ebddd909134275d6a5c90ba5101602ac42bc104e3ac186","signature":"bc4d5577f1d018085f8eb29b89242d551625586e131d52fee4b0c27c7e1746a9"},{"version":"e0918784966cad929cb82e5d775a213a651269418b511d3c1ca65d740e226176","affectsGlobalScope":true},"efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true},"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","d69a3298a197fe5d59edba0ec23b4abf2c8e7b8c6718eac97833633cd664e4c9",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true},"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","d4f9d3ae2fe1ae199e1c832cca2c44f45e0b305dfa2808afdd51249b6f4a5163","7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"9c611eff81287837680c1f4496daf9e737d6f3a1ff17752207814b8f8e1265af","affectsGlobalScope":true},"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","b5d4e3e524f2eead4519c8e819eaf7fa44a27c22418eff1b7b2d0ebc5fdc510d","afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true},{"version":"46755a4afc53df75f0bfce72259fb971daac826b0cdd8c4eaccad2755a817403","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024",{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","21c56c6e8eeacef15f63f373a29fab6a2b36e4705be7a528aae8c51469e2737b",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447",{"version":"98e4a7b236b99d95ba3b38f30392dc9370020002350dab42e78ae1a6353dcdd3","affectsGlobalScope":true},{"version":"dcf299a72c98d55f888980dffe2cd19020cdef6cbb32a0b28ef30b496ef7642d","affectsGlobalScope":true},{"version":"2e707bebde6153d06452cb3d03a9889a922853da46caf00f5fcc358c490bd6b1","affectsGlobalScope":true},{"version":"22f9c4223c59fd47ea5aadee362aec0b1adc9a6e58f58d9d848d71732f676abf","affectsGlobalScope":true},{"version":"8c5c8110577288007799018d817ecec25fe3eb3aefba99fc8720eb7c1bcd306e","affectsGlobalScope":true},{"version":"db41487da1c62b8a2e9aeaba4b79b9e2270452cfca0165bacb22ab50b2fb9bed","affectsGlobalScope":true},{"version":"eb0d8eac52f68a5fd4f4e8119040c907ca182f45f883e29b5e61cb9eeecb068a","affectsGlobalScope":true},{"version":"1bc1de3b1f094ed8f0612239c11d3163c1b1d7e197ecc6c1606051a3be8bfb5d","affectsGlobalScope":true},{"version":"78eebaa895ec3bfc488e0f2a7a05d573604be33f692187381ba8108cfe31b8c4","affectsGlobalScope":true},"5fc07ceecfafaba4308ea6c954298a259294fe3736b1e3cecda45ef626653769","289235dc0bf9e32f655ebd3a49b7992a122c1ddc9ada0a71fd1337cbac17dfe7"],"root":[[46,53],[59,77]],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"allowUmdGlobalAccess":false,"allowUnreachableCode":false,"allowUnusedLabels":false,"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":false,"emitDeclarationOnly":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":1,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","removeComments":false,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":6},"fileIdsList":[[165],[164,166,167,168,169,170,171,172],[78],[113],[114,119,147],[115,126,127,134,144,155],[115,116,126,134],[117,156],[118,119,127,135],[119,144,152],[120,122,126,134],[113,121],[122,123],[126],[124,126],[113,126],[126,127,128,144,155],[126,127,128,141,144,147],[111,114,160],[122,126,129,134,144,155],[126,127,129,130,134,144,152,155],[129,131,144,152,155],[78,79,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162],[126,132],[133,155,160],[122,126,134,144],[88,92,155],[88,144,155],[83],[85,88,152,155],[134,152],[163],[83,163],[85,88,134,155],[80,81,84,87,114,126,144,155],[80,86],[84,88,114,147,155,163],[114,163],[104,114,163],[82,83,163],[88],[82,83,84,85,86,87,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,105,106,107,108,109,110],[88,95,96],[86,88,96,97],[87],[80,83,88],[88,92,96,97],[92],[86,88,91,155],[80,85,86,88,92,95],[114,144],[83,88,104,114,160,163],[135],[136],[113,137],[138,154,160],[139],[140],[126,141,142],[141,143,156,158],[114,126,144,145,146,147],[114,144,146],[144,145],[147],[148],[113,144],[126,150,151],[150,151],[119,134,144,152],[153],[134,154],[114,129,140,155],[119,156],[144,157],[133,158],[159],[114,119,126,128,137,144,155,158,160],[144,161],[54,55,56,57],[46,58],[59,60,61,62,63,64],[58],[65,71],[67,68,69,70,72],[66,67,68,69,70],[47,48,50,52],[49],[51],[46,49,53,65,67,68,69,70,71,72,73],[75]],"referencedMap":[[169,1],[172,1],[166,1],[171,1],[173,2],[170,1],[78,3],[79,3],[113,4],[114,5],[115,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,13],[125,14],[124,15],[126,16],[127,17],[128,18],[112,19],[129,20],[130,21],[131,22],[163,23],[132,24],[133,25],[134,26],[95,27],[102,28],[94,27],[109,29],[86,30],[85,31],[108,32],[103,33],[106,34],[88,35],[87,36],[83,37],[82,38],[105,39],[84,40],[89,41],[93,41],[111,42],[110,41],[97,43],[98,44],[100,45],[96,46],[99,47],[104,32],[91,48],[92,49],[101,50],[81,51],[107,52],[135,53],[136,54],[137,55],[138,56],[139,57],[140,58],[141,59],[142,59],[143,60],[144,61],[146,62],[145,63],[147,64],[148,65],[149,66],[150,67],[151,68],[152,69],[153,70],[154,71],[155,72],[156,73],[157,74],[158,75],[159,76],[160,77],[161,78],[58,79],[59,80],[65,81],[61,82],[64,82],[62,82],[63,82],[72,83],[73,84],[71,85],[53,86],[50,87],[52,88],[74,89],[76,90]],"exportedModulesMap":[[169,1],[172,1],[166,1],[171,1],[173,2],[170,1],[78,3],[79,3],[113,4],[114,5],[115,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,13],[125,14],[124,15],[126,16],[127,17],[128,18],[112,19],[129,20],[130,21],[131,22],[163,23],[132,24],[133,25],[134,26],[95,27],[102,28],[94,27],[109,29],[86,30],[85,31],[108,32],[103,33],[106,34],[88,35],[87,36],[83,37],[82,38],[105,39],[84,40],[89,41],[93,41],[111,42],[110,41],[97,43],[98,44],[100,45],[96,46],[99,47],[104,32],[91,48],[92,49],[101,50],[81,51],[107,52],[135,53],[136,54],[137,55],[138,56],[139,57],[140,58],[141,59],[142,59],[143,60],[144,61],[146,62],[145,63],[147,64],[148,65],[149,66],[150,67],[151,68],[152,69],[153,70],[154,71],[155,72],[156,73],[157,74],[158,75],[159,76],[160,77],[161,78],[58,79],[59,80],[65,81],[61,82],[64,82],[62,82],[63,82],[72,83],[73,84],[71,85],[53,86],[50,87],[52,88],[74,89],[76,90]],"semanticDiagnosticsPerFile":[169,172,164,166,167,168,171,173,170,165,78,79,113,114,115,116,117,118,119,120,121,122,123,125,124,126,127,128,112,162,129,130,131,163,132,133,134,95,102,94,109,86,85,108,103,106,88,87,83,82,105,84,89,90,93,80,111,110,97,98,100,96,99,104,91,92,101,81,107,135,136,137,138,139,140,141,142,143,144,146,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,56,54,58,57,55,44,45,9,8,2,10,11,12,13,14,15,16,17,3,18,4,19,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,59,60,65,61,64,62,63,67,72,68,73,69,71,70,53,48,47,50,52,46,74,51,49,66,77,174,75,76],"latestChangedDtsFile":"./server/index.d.ts"},"version":"5.4.5"}
|
package/lint.cjs
CHANGED
|
@@ -33,5 +33,47 @@ module.exports = {
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
+
"server-default-export": {
|
|
37
|
+
meta: {
|
|
38
|
+
type: "problem",
|
|
39
|
+
docs: {
|
|
40
|
+
description: "Ensure server files have a default exported async function",
|
|
41
|
+
category: "Possible Errors",
|
|
42
|
+
recommended: true,
|
|
43
|
+
},
|
|
44
|
+
fixable: null,
|
|
45
|
+
},
|
|
46
|
+
create(context) {
|
|
47
|
+
return {
|
|
48
|
+
Program(node) {
|
|
49
|
+
const filename = context.getFilename()
|
|
50
|
+
if (filename.endsWith(".server.ts") || filename.endsWith(".server.js")) {
|
|
51
|
+
const hasDefaultExportAsyncFunction = node.body.some(
|
|
52
|
+
(statement) =>
|
|
53
|
+
statement.type === "ExportDefaultDeclaration" &&
|
|
54
|
+
statement.declaration.type === "FunctionDeclaration" &&
|
|
55
|
+
statement.declaration.async === true
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
if (!hasDefaultExportAsyncFunction) {
|
|
59
|
+
if (filename.endsWith(".server.ts")) {
|
|
60
|
+
context.report({
|
|
61
|
+
node,
|
|
62
|
+
message:
|
|
63
|
+
"Server files (.server.ts) must have a default exported async function",
|
|
64
|
+
})
|
|
65
|
+
} else if (filename.endsWith(".server.js")) {
|
|
66
|
+
context.report({
|
|
67
|
+
node,
|
|
68
|
+
message:
|
|
69
|
+
"Server files (.server.js) must have a default exported async function",
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
},
|
|
36
78
|
},
|
|
37
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attio",
|
|
3
|
-
"version": "0.0.1-experimental.
|
|
3
|
+
"version": "0.0.1-experimental.20241003",
|
|
4
4
|
"bin": "lib/attio.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -19,9 +19,6 @@
|
|
|
19
19
|
"./global": {
|
|
20
20
|
"types": "./global.d.ts"
|
|
21
21
|
},
|
|
22
|
-
"./graphql": {
|
|
23
|
-
"types": "./lib/graphql.d.ts"
|
|
24
|
-
},
|
|
25
22
|
"./server": {
|
|
26
23
|
"types": "./server.d.ts"
|
|
27
24
|
},
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { isObjectType, isInputObjectType, isScalarType, isEnumType, isListType, isNonNullType, } from "graphql";
|
|
2
|
-
import { format } from "prettier";
|
|
3
|
-
function countTypeUsages(schema) {
|
|
4
|
-
const typeUsages = new Map();
|
|
5
|
-
Object.values(schema.getTypeMap()).forEach((type) => {
|
|
6
|
-
if ((isObjectType(type) || isInputObjectType(type)) && !type.name.startsWith("__")) {
|
|
7
|
-
Object.values(type.getFields()).forEach((field) => {
|
|
8
|
-
let fieldType = field.type;
|
|
9
|
-
while (isListType(fieldType) || isNonNullType(fieldType)) {
|
|
10
|
-
fieldType = fieldType.ofType;
|
|
11
|
-
}
|
|
12
|
-
if (isObjectType(fieldType) || isInputObjectType(fieldType)) {
|
|
13
|
-
const usage = typeUsages.get(fieldType.name) || { count: 0, type: fieldType };
|
|
14
|
-
usage.count++;
|
|
15
|
-
typeUsages.set(fieldType.name, usage);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return typeUsages;
|
|
21
|
-
}
|
|
22
|
-
function generateFieldType(type, schema, typeUsages, seenTypes = new Set()) {
|
|
23
|
-
if (isListType(type)) {
|
|
24
|
-
return `Array<${generateFieldType(type.ofType, schema, typeUsages, seenTypes)}>`;
|
|
25
|
-
}
|
|
26
|
-
if (isNonNullType(type)) {
|
|
27
|
-
return generateFieldType(type.ofType, schema, typeUsages, seenTypes);
|
|
28
|
-
}
|
|
29
|
-
if (isScalarType(type)) {
|
|
30
|
-
switch (type.name) {
|
|
31
|
-
case "ID":
|
|
32
|
-
case "String":
|
|
33
|
-
return "string";
|
|
34
|
-
case "Int":
|
|
35
|
-
case "Float":
|
|
36
|
-
return "number";
|
|
37
|
-
case "Boolean":
|
|
38
|
-
return "boolean";
|
|
39
|
-
default:
|
|
40
|
-
return "any";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (isEnumType(type)) {
|
|
44
|
-
return type
|
|
45
|
-
.getValues()
|
|
46
|
-
.map((v) => `'${v.name}'`)
|
|
47
|
-
.join(" | ");
|
|
48
|
-
}
|
|
49
|
-
if (isObjectType(type) || isInputObjectType(type)) {
|
|
50
|
-
const usage = typeUsages.get(type.name);
|
|
51
|
-
if (usage && usage.count > 1) {
|
|
52
|
-
return type.name;
|
|
53
|
-
}
|
|
54
|
-
if (seenTypes.has(type.name)) {
|
|
55
|
-
return type.name;
|
|
56
|
-
}
|
|
57
|
-
seenTypes.add(type.name);
|
|
58
|
-
const fields = type.getFields();
|
|
59
|
-
let inlineType = "{";
|
|
60
|
-
Object.entries(fields).forEach(([fieldName, field]) => {
|
|
61
|
-
const fieldType = generateFieldType(field.type, schema, typeUsages, new Set(seenTypes));
|
|
62
|
-
inlineType += `${fieldName}: ${fieldType};`;
|
|
63
|
-
});
|
|
64
|
-
inlineType += "}";
|
|
65
|
-
return inlineType;
|
|
66
|
-
}
|
|
67
|
-
return "any";
|
|
68
|
-
}
|
|
69
|
-
function generateDocComment(description) {
|
|
70
|
-
if (!description)
|
|
71
|
-
return "";
|
|
72
|
-
const lines = description.split("\n");
|
|
73
|
-
if (lines.length === 1) {
|
|
74
|
-
return `/** ${description} */`;
|
|
75
|
-
}
|
|
76
|
-
return `/**\n * ${lines.join("\n * ")}\n */`;
|
|
77
|
-
}
|
|
78
|
-
function generateType(type, schema, typeUsages) {
|
|
79
|
-
let typeString = "";
|
|
80
|
-
const typeComment = generateDocComment(type.description ?? "");
|
|
81
|
-
if (typeComment) {
|
|
82
|
-
typeString += `${typeComment}\n`;
|
|
83
|
-
}
|
|
84
|
-
typeString += `export type ${type.name.charAt(0).toUpperCase() + type.name.slice(1)} = {`;
|
|
85
|
-
const fields = type.getFields();
|
|
86
|
-
Object.entries(fields).forEach(([fieldName, field]) => {
|
|
87
|
-
typeString += "\n";
|
|
88
|
-
const fieldComment = generateDocComment(field.description);
|
|
89
|
-
if (fieldComment) {
|
|
90
|
-
typeString += `${fieldComment}\n`;
|
|
91
|
-
}
|
|
92
|
-
const fieldType = generateFieldType(field.type, schema, typeUsages);
|
|
93
|
-
typeString += `${fieldName}: ${fieldType};`;
|
|
94
|
-
});
|
|
95
|
-
typeString += "\n};";
|
|
96
|
-
return typeString;
|
|
97
|
-
}
|
|
98
|
-
export async function generateTypesFromSchema(schema) {
|
|
99
|
-
const typeUsages = countTypeUsages(schema);
|
|
100
|
-
let types = "";
|
|
101
|
-
const typeMap = schema.getTypeMap();
|
|
102
|
-
Object.values(typeMap).forEach((type) => {
|
|
103
|
-
if ((isObjectType(type) || isInputObjectType(type)) && !type.name.startsWith("__")) {
|
|
104
|
-
types += generateType(type, schema, typeUsages);
|
|
105
|
-
types += "\n\n";
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return await format(types, { parser: "typescript" });
|
|
109
|
-
}
|
package/lib/graphql.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from "fs";
|
|
2
|
-
import { format } from "prettier";
|
|
3
|
-
import { generateOperations } from "../graphql/generate-operations.js";
|
|
4
|
-
import { findNodeModulesPath } from "./find-node-modules-path.js";
|
|
5
|
-
export async function updateOperationTypes(schema) {
|
|
6
|
-
const filePath = await findNodeModulesPath(["lib", "graphql.d.ts"]);
|
|
7
|
-
if (!filePath) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const unformattedTypescript = await generateOperations(".", schema);
|
|
11
|
-
const typescript = await format(unformattedTypescript, { parser: "typescript" });
|
|
12
|
-
await fs.writeFile(filePath, `import type { Query } from "./client/index.js";\n\n${typescript}`);
|
|
13
|
-
}
|