attio 0.0.1-experimental.20240530 → 0.0.1-experimental.20240614
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/attio.d.ts +3 -0
- package/lib/attio.d.ts.map +1 -0
- package/lib/attio.js +10 -0
- package/lib/attio.js.map +1 -0
- package/lib/build/client/create-client-build-config.d.ts +6 -0
- package/lib/build/client/create-client-build-config.d.ts.map +1 -0
- package/lib/build/client/create-client-build-config.js +26 -0
- package/lib/build/client/create-client-build-config.js.map +1 -0
- package/lib/build/client/generate-client-entry.d.ts +6 -0
- package/lib/build/client/generate-client-entry.d.ts.map +1 -0
- package/lib/build/client/generate-client-entry.js +30 -0
- package/lib/build/client/generate-client-entry.js.map +1 -0
- package/lib/build/get-module-hash.d.ts +2 -0
- package/lib/build/get-module-hash.d.ts.map +1 -0
- package/lib/build/get-module-hash.js +5 -0
- package/lib/build/get-module-hash.js.map +1 -0
- package/lib/build/proxy-server-modules-plugin.d.ts +5 -0
- package/lib/build/proxy-server-modules-plugin.d.ts.map +1 -0
- package/lib/build/proxy-server-modules-plugin.js +35 -0
- package/lib/build/proxy-server-modules-plugin.js.map +1 -0
- package/lib/build/server/create-server-build-config.d.ts +3 -0
- package/lib/build/server/create-server-build-config.d.ts.map +1 -0
- package/lib/build/server/create-server-build-config.js +22 -0
- package/lib/build/server/create-server-build-config.js.map +1 -0
- package/lib/build/server/generate-server-entry.d.ts +5 -0
- package/lib/build/server/generate-server-entry.d.ts.map +1 -0
- package/lib/build/server/generate-server-entry.js +46 -0
- package/lib/build/server/generate-server-entry.js.map +1 -0
- package/lib/build.d.ts +1 -4
- package/lib/build.d.ts.map +1 -1
- package/lib/build.js +5 -54
- package/lib/build.js.map +1 -1
- package/lib/commands/build.d.ts +0 -1
- package/lib/commands/build.d.ts.map +1 -1
- package/lib/commands/build.js +23 -19
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/dev.d.ts +3 -0
- package/lib/commands/dev.d.ts.map +1 -0
- package/lib/commands/dev.js +73 -0
- package/lib/commands/dev.js.map +1 -0
- package/lib/commands/index.d.ts +30 -0
- package/lib/commands/index.d.ts.map +1 -0
- package/lib/commands/{scaffold.js → index.js} +56 -21
- package/lib/commands/index.js.map +1 -0
- package/lib/components/Disclaimer.d.ts +3 -0
- package/lib/components/Disclaimer.d.ts.map +1 -0
- package/lib/components/Disclaimer.js +10 -0
- package/lib/components/Disclaimer.js.map +1 -0
- package/lib/components/InitialInstructions.d.ts +5 -0
- package/lib/components/InitialInstructions.d.ts.map +1 -0
- package/lib/components/InitialInstructions.js +59 -0
- package/lib/components/InitialInstructions.js.map +1 -0
- package/lib/components/Logo.d.ts +3 -0
- package/lib/components/Logo.d.ts.map +1 -0
- package/lib/components/Logo.js +11 -0
- package/lib/components/Logo.js.map +1 -0
- package/lib/components/Select.d.ts +2 -1
- package/lib/components/Select.d.ts.map +1 -1
- package/lib/components/Select.js +2 -2
- package/lib/components/Select.js.map +1 -1
- package/lib/components/{TypeScriptError.d.ts → TypeScriptErrors.d.ts} +1 -1
- package/lib/components/TypeScriptErrors.d.ts.map +1 -0
- package/lib/components/{TypeScriptError.js → TypeScriptErrors.js} +1 -1
- package/lib/components/TypeScriptErrors.js.map +1 -0
- package/lib/hooks/useFullScreen.d.ts.map +1 -1
- package/lib/hooks/useFullScreen.js +5 -5
- package/lib/hooks/useFullScreen.js.map +1 -1
- package/lib/machines/build-machine.d.ts +1694 -32
- package/lib/machines/build-machine.d.ts.map +1 -1
- package/lib/machines/build-machine.js +107 -41
- package/lib/machines/build-machine.js.map +1 -1
- package/lib/machines/build-orchestrator.d.ts +16 -0
- package/lib/machines/build-orchestrator.d.ts.map +1 -0
- package/lib/machines/build-orchestrator.js +2 -0
- package/lib/machines/build-orchestrator.js.map +1 -0
- package/lib/machines/dev-machine.d.ts +2083 -0
- package/lib/machines/dev-machine.d.ts.map +1 -0
- package/lib/machines/dev-machine.js +224 -0
- package/lib/machines/dev-machine.js.map +1 -0
- package/lib/machines/js-machine.d.ts +240 -0
- package/lib/machines/js-machine.d.ts.map +1 -0
- package/lib/machines/js-machine.js +166 -0
- package/lib/machines/js-machine.js.map +1 -0
- package/lib/machines/scaffold-machine.d.ts +77 -44
- package/lib/machines/scaffold-machine.d.ts.map +1 -1
- package/lib/machines/scaffold-machine.js +168 -112
- package/lib/machines/scaffold-machine.js.map +1 -1
- package/lib/machines/ts-machine.d.ts +149 -0
- package/lib/machines/ts-machine.d.ts.map +1 -0
- package/lib/machines/ts-machine.js +103 -0
- package/lib/machines/ts-machine.js.map +1 -0
- package/lib/templates/common/README.md +6 -0
- package/lib/templates/javascript/.eslintignore +0 -1
- package/lib/templates/javascript/eslint.config.js +43 -0
- package/lib/templates/javascript/package.json +8 -6
- package/lib/templates/javascript/{counter-action.jsx → src/app/record/counter-action.jsx} +1 -1
- package/lib/templates/typescript/.eslintignore +0 -1
- package/lib/templates/typescript/eslint.config.js +50 -0
- package/lib/templates/typescript/package.json +11 -6
- package/lib/templates/typescript/{counter-action.tsx → src/app/record/counter-action.tsx} +1 -1
- package/lib/templates/typescript/tsconfig.json +2 -6
- package/lib/util/typescript.d.ts +1 -1
- package/lib/util/typescript.d.ts.map +1 -1
- package/lib/util/typescript.js +5 -1
- package/lib/util/typescript.js.map +1 -1
- package/lib/util/upload-bundle.d.ts +62 -0
- package/lib/util/upload-bundle.d.ts.map +1 -0
- package/lib/util/upload-bundle.js +144 -0
- package/lib/util/upload-bundle.js.map +1 -0
- package/package.json +7 -3
- package/lib/cli.d.ts +0 -3
- package/lib/cli.d.ts.map +0 -1
- package/lib/cli.js +0 -5
- package/lib/cli.js.map +0 -1
- package/lib/commands/scaffold.d.ts +0 -10
- package/lib/commands/scaffold.d.ts.map +0 -1
- package/lib/commands/scaffold.js.map +0 -1
- package/lib/commands/watch.d.ts +0 -3
- package/lib/commands/watch.d.ts.map +0 -1
- package/lib/commands/watch.js +0 -56
- package/lib/commands/watch.js.map +0 -1
- package/lib/components/TypeScriptError.d.ts.map +0 -1
- package/lib/components/TypeScriptError.js.map +0 -1
- package/lib/machines/watch-machine.d.ts +0 -199
- package/lib/machines/watch-machine.d.ts.map +0 -1
- package/lib/machines/watch-machine.js +0 -218
- package/lib/machines/watch-machine.js.map +0 -1
- package/lib/templates/javascript/eslint.cjs +0 -1
- package/lib/templates/typescript/eslint.cjs +0 -6
- /package/lib/templates/javascript/{actions.jsx → src/app/record/actions.jsx} +0 -0
- /package/lib/templates/typescript/{actions.tsx → src/app/record/actions.tsx} +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { TypeScriptError } from "../util/typescript.js";
|
|
2
|
+
import { TypeScriptOrchestrator } from "./build-orchestrator.js";
|
|
3
|
+
export interface Context {
|
|
4
|
+
errors?: Array<TypeScriptError>;
|
|
5
|
+
parentRef: TypeScriptOrchestrator;
|
|
6
|
+
time?: Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const tsMachine: import("xstate").StateMachine<Context, {
|
|
9
|
+
type: "Change";
|
|
10
|
+
} | {
|
|
11
|
+
type: "Result";
|
|
12
|
+
errors?: {
|
|
13
|
+
text: string;
|
|
14
|
+
location?: {
|
|
15
|
+
file: string;
|
|
16
|
+
line: number;
|
|
17
|
+
lineText: string;
|
|
18
|
+
character: number;
|
|
19
|
+
} | undefined;
|
|
20
|
+
}[] | undefined;
|
|
21
|
+
time: Date;
|
|
22
|
+
}, {
|
|
23
|
+
[x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
src: "validate";
|
|
26
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
|
|
27
|
+
id: string | undefined;
|
|
28
|
+
}, import("xstate").Values<{
|
|
29
|
+
clearError: {
|
|
30
|
+
type: "clearError";
|
|
31
|
+
params: import("xstate").NonReducibleUnknown;
|
|
32
|
+
};
|
|
33
|
+
raiseErrored: {
|
|
34
|
+
type: "raiseErrored";
|
|
35
|
+
params: import("xstate").NonReducibleUnknown;
|
|
36
|
+
};
|
|
37
|
+
raiseSuccess: {
|
|
38
|
+
type: "raiseSuccess";
|
|
39
|
+
params: import("xstate").NonReducibleUnknown;
|
|
40
|
+
};
|
|
41
|
+
setTime: {
|
|
42
|
+
type: "setTime";
|
|
43
|
+
params: {
|
|
44
|
+
time: Date;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
clearTime: {
|
|
48
|
+
type: "clearTime";
|
|
49
|
+
params: import("xstate").NonReducibleUnknown;
|
|
50
|
+
};
|
|
51
|
+
setErrors: {
|
|
52
|
+
type: "setErrors";
|
|
53
|
+
params: {
|
|
54
|
+
errors?: {
|
|
55
|
+
text: string;
|
|
56
|
+
location?: {
|
|
57
|
+
file: string;
|
|
58
|
+
line: number;
|
|
59
|
+
lineText: string;
|
|
60
|
+
character: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
}[] | undefined;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}>, {
|
|
66
|
+
type: "has errors";
|
|
67
|
+
params: {
|
|
68
|
+
errors?: {
|
|
69
|
+
text: string;
|
|
70
|
+
location?: {
|
|
71
|
+
file: string;
|
|
72
|
+
line: number;
|
|
73
|
+
lineText: string;
|
|
74
|
+
character: number;
|
|
75
|
+
} | undefined;
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
};
|
|
78
|
+
}, never, "Success" | "Errored" | "Validating", string, {
|
|
79
|
+
parentRef: TypeScriptOrchestrator;
|
|
80
|
+
}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
|
|
81
|
+
type: "Change";
|
|
82
|
+
} | {
|
|
83
|
+
type: "Result";
|
|
84
|
+
errors?: {
|
|
85
|
+
text: string;
|
|
86
|
+
location?: {
|
|
87
|
+
file: string;
|
|
88
|
+
line: number;
|
|
89
|
+
lineText: string;
|
|
90
|
+
character: number;
|
|
91
|
+
} | undefined;
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
time: Date;
|
|
94
|
+
}, {
|
|
95
|
+
src: "validate";
|
|
96
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
|
|
97
|
+
id: string | undefined;
|
|
98
|
+
}, import("xstate").Values<{
|
|
99
|
+
clearError: {
|
|
100
|
+
type: "clearError";
|
|
101
|
+
params: import("xstate").NonReducibleUnknown;
|
|
102
|
+
};
|
|
103
|
+
raiseErrored: {
|
|
104
|
+
type: "raiseErrored";
|
|
105
|
+
params: import("xstate").NonReducibleUnknown;
|
|
106
|
+
};
|
|
107
|
+
raiseSuccess: {
|
|
108
|
+
type: "raiseSuccess";
|
|
109
|
+
params: import("xstate").NonReducibleUnknown;
|
|
110
|
+
};
|
|
111
|
+
setTime: {
|
|
112
|
+
type: "setTime";
|
|
113
|
+
params: {
|
|
114
|
+
time: Date;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
clearTime: {
|
|
118
|
+
type: "clearTime";
|
|
119
|
+
params: import("xstate").NonReducibleUnknown;
|
|
120
|
+
};
|
|
121
|
+
setErrors: {
|
|
122
|
+
type: "setErrors";
|
|
123
|
+
params: {
|
|
124
|
+
errors?: {
|
|
125
|
+
text: string;
|
|
126
|
+
location?: {
|
|
127
|
+
file: string;
|
|
128
|
+
line: number;
|
|
129
|
+
lineText: string;
|
|
130
|
+
character: number;
|
|
131
|
+
} | undefined;
|
|
132
|
+
}[] | undefined;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}>, {
|
|
136
|
+
type: "has errors";
|
|
137
|
+
params: {
|
|
138
|
+
errors?: {
|
|
139
|
+
text: string;
|
|
140
|
+
location?: {
|
|
141
|
+
file: string;
|
|
142
|
+
line: number;
|
|
143
|
+
lineText: string;
|
|
144
|
+
character: number;
|
|
145
|
+
} | undefined;
|
|
146
|
+
}[] | undefined;
|
|
147
|
+
};
|
|
148
|
+
}, never, string, import("xstate").EventObject>>;
|
|
149
|
+
//# sourceMappingURL=ts-machine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-machine.d.ts","sourceRoot":"","sources":["../../src/machines/ts-machine.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,eAAe,EAIlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAA;AAG9D,MAAM,WAAW,OAAO;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IAC/B,SAAS,EAAE,sBAAsB,CAAA;IACjC,IAAI,CAAC,EAAE,IAAI,CAAA;CACd;AAID,eAAO,MAAM,SAAS;UAFF,QAAQ;;UAAW,QAAQ;;;;;;;;;;UAAyC,IAAI;;;;;;;;;;;;;;;;;;;;;;;kBAoDvD,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA9CR,sBAAsB;;UANnC,QAAQ;;UAAW,QAAQ;;;;;;;;;;UAAyC,IAAI;;;;;;;;;;;;;;;;;;;;;kBAoDvD,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAuDvC,CAAA"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { sendTo, assign, setup, fromCallback } from "xstate";
|
|
3
|
+
import { getDiagnostics, readConfig, typeScriptErrorSchema, } from "../util/typescript.js";
|
|
4
|
+
export const tsMachine = setup({
|
|
5
|
+
types: {
|
|
6
|
+
context: {},
|
|
7
|
+
events: {},
|
|
8
|
+
input: {},
|
|
9
|
+
},
|
|
10
|
+
guards: {
|
|
11
|
+
"has errors": (_, params) => { var _a; return Boolean((_a = params.errors) === null || _a === void 0 ? void 0 : _a.length); },
|
|
12
|
+
},
|
|
13
|
+
actors: {
|
|
14
|
+
validate: fromCallback(({ sendBack }) => {
|
|
15
|
+
const validate = async () => {
|
|
16
|
+
var _a;
|
|
17
|
+
try {
|
|
18
|
+
const program = await readConfig(path.resolve("tsconfig.json"));
|
|
19
|
+
if (program === "Not a TypeScript project") {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const errors = await getDiagnostics(program);
|
|
23
|
+
if (errors.length) {
|
|
24
|
+
sendBack({ type: "Result", errors, time: new Date() });
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
sendBack({ type: "Result", time: new Date() });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
sendBack({
|
|
32
|
+
type: "Result",
|
|
33
|
+
errors: [
|
|
34
|
+
typeScriptErrorSchema.parse({ text: (_a = e.message) !== null && _a !== void 0 ? _a : "ERROR" }),
|
|
35
|
+
],
|
|
36
|
+
time: new Date(),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
validate();
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
actions: {
|
|
44
|
+
clearError: assign({
|
|
45
|
+
errors: () => undefined,
|
|
46
|
+
}),
|
|
47
|
+
clearTime: assign({
|
|
48
|
+
time: () => undefined,
|
|
49
|
+
}),
|
|
50
|
+
raiseErrored: sendTo(({ context }) => context.parentRef, { type: "TypeScript Error" }),
|
|
51
|
+
raiseSuccess: sendTo(({ context }) => context.parentRef, { type: "TypeScript Success" }),
|
|
52
|
+
setErrors: assign({
|
|
53
|
+
errors: (_, params) => params.errors,
|
|
54
|
+
}),
|
|
55
|
+
setTime: assign({
|
|
56
|
+
time: (_, params) => params.time,
|
|
57
|
+
}),
|
|
58
|
+
},
|
|
59
|
+
}).createMachine({
|
|
60
|
+
id: "TypeScript Machine",
|
|
61
|
+
context: ({ input }) => ({
|
|
62
|
+
parentRef: input.parentRef,
|
|
63
|
+
}),
|
|
64
|
+
states: {
|
|
65
|
+
Validating: {
|
|
66
|
+
on: {
|
|
67
|
+
Result: [
|
|
68
|
+
{
|
|
69
|
+
target: "Errored",
|
|
70
|
+
actions: [
|
|
71
|
+
{
|
|
72
|
+
type: "setErrors",
|
|
73
|
+
params: ({ event }) => event,
|
|
74
|
+
},
|
|
75
|
+
{ type: "setTime", params: ({ event }) => event },
|
|
76
|
+
],
|
|
77
|
+
guard: { type: "has errors", params: ({ event }) => event },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
target: "Success",
|
|
81
|
+
reenter: true,
|
|
82
|
+
actions: ["clearError", { type: "setTime", params: ({ event }) => event }],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
invoke: {
|
|
87
|
+
src: "validate",
|
|
88
|
+
},
|
|
89
|
+
entry: "clearTime",
|
|
90
|
+
},
|
|
91
|
+
Errored: {
|
|
92
|
+
entry: "raiseErrored",
|
|
93
|
+
},
|
|
94
|
+
Success: {
|
|
95
|
+
entry: "raiseSuccess",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
initial: "Validating",
|
|
99
|
+
on: {
|
|
100
|
+
Change: ".Validating",
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=ts-machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-machine.js","sourceRoot":"","sources":["../../src/machines/ts-machine.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,QAAQ,CAAA;AAE1D,OAAO,EAEH,cAAc,EACd,UAAU,EACV,qBAAqB,GACxB,MAAM,uBAAuB,CAAA;AAY9B,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;IAC3B,KAAK,EAAE;QACH,OAAO,EAAE,EAAa;QACtB,MAAM,EAAE,EAAW;QACnB,KAAK,EAAE,EAAyC;KACnD;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,CAAC,CAAC,EAAE,M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AAE,SAAS;wBACjB,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,CAAC,YAAY,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,EAAC,CAAC;qBACzE;iBACJ;aACJ;YAED,MAAM,EAAE;gBACJ,GAAG,EAAE,UAAU;aAClB;YAED,KAAK,EAAE,WAAW;SACrB;QAED,OAAO,EAAE;YACL,KAAK,EAAE,cAAc;SACxB;QAED,OAAO,EAAE;YACL,KAAK,EAAE,cAAc;SACxB;KACJ;IAED,OAAO,EAAE,YAAY;IAErB,EAAE,EAAE;QACA,MAAM,EAAE,aAAa;KACxB;CACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const {FlatCompat} = require("@eslint/eslintrc")
|
|
2
|
+
const js = require("@eslint/js")
|
|
3
|
+
const reactPlugin = require("eslint-plugin-react")
|
|
4
|
+
const reactHooksPlugin = require("eslint-plugin-react-hooks")
|
|
5
|
+
|
|
6
|
+
const compat = new FlatCompat({
|
|
7
|
+
baseDirectory: __dirname,
|
|
8
|
+
recommendedConfig: js.configs.recommended,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
module.exports = [
|
|
12
|
+
...compat.extends("eslint:recommended"),
|
|
13
|
+
...compat.extends("plugin:react/recommended"),
|
|
14
|
+
{
|
|
15
|
+
files: ["src/**/*.{js,jsx}"],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parserOptions: {
|
|
18
|
+
ecmaFeatures: {
|
|
19
|
+
jsx: true,
|
|
20
|
+
},
|
|
21
|
+
ecmaVersion: 12,
|
|
22
|
+
sourceType: "module",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
plugins: {
|
|
26
|
+
"react": reactPlugin,
|
|
27
|
+
"react-hooks": reactHooksPlugin,
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
"react/jsx-key": "error",
|
|
31
|
+
"react-hooks/rules-of-hooks": "error",
|
|
32
|
+
"react-hooks/exhaustive-deps": "error",
|
|
33
|
+
},
|
|
34
|
+
settings: {
|
|
35
|
+
react: {
|
|
36
|
+
version: "detect",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
ignores: ["node_modules/", "dist/"],
|
|
42
|
+
},
|
|
43
|
+
]
|
|
@@ -8,17 +8,19 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "attio dev",
|
|
10
10
|
"build": "attio build",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"lint": "eslint 'src/**/*.{js,ts,tsx}'"
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"lint": "eslint 'src/**/*.{js,jsx}'"
|
|
14
13
|
},
|
|
15
|
-
"prettier": "@attio/eslint-plugin/prettier",
|
|
16
14
|
"devDependencies": {
|
|
17
|
-
"eslint": "^
|
|
15
|
+
"eslint": "^8.57.0",
|
|
16
|
+
"eslint-plugin-react": "^7.34.2",
|
|
17
|
+
"eslint-plugin-react-hooks": "^4.6.2"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@attio/extension-sdk": "0.0.1-experimental.20240605.3",
|
|
21
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
22
|
+
"@eslint/js": "^9.4.0",
|
|
20
23
|
"attio": "latest",
|
|
21
|
-
"@attio/client-extension-sdk": "workspace:^",
|
|
22
24
|
"react": "18.3.1"
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const {FlatCompat} = require("@eslint/eslintrc")
|
|
2
|
+
const js = require("@eslint/js")
|
|
3
|
+
const reactPlugin = require("eslint-plugin-react")
|
|
4
|
+
const reactHooksPlugin = require("eslint-plugin-react-hooks")
|
|
5
|
+
const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin")
|
|
6
|
+
const typescriptParser = require("@typescript-eslint/parser")
|
|
7
|
+
|
|
8
|
+
const compat = new FlatCompat({
|
|
9
|
+
baseDirectory: __dirname,
|
|
10
|
+
recommendedConfig: js.configs.recommended,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
module.exports = [
|
|
14
|
+
...compat.extends("eslint:recommended"),
|
|
15
|
+
...compat.extends("plugin:react/recommended"),
|
|
16
|
+
...compat.extends("plugin:@typescript-eslint/recommended"),
|
|
17
|
+
{
|
|
18
|
+
languageOptions: {
|
|
19
|
+
parser: typescriptParser,
|
|
20
|
+
parserOptions: {
|
|
21
|
+
ecmaFeatures: {
|
|
22
|
+
jsx: true,
|
|
23
|
+
},
|
|
24
|
+
ecmaVersion: 12,
|
|
25
|
+
sourceType: "module",
|
|
26
|
+
project: ["./tsconfig.json"],
|
|
27
|
+
tsconfigRootDir: __dirname,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
plugins: {
|
|
31
|
+
"react": reactPlugin,
|
|
32
|
+
"react-hooks": reactHooksPlugin,
|
|
33
|
+
"@typescript-eslint": typescriptEslintPlugin,
|
|
34
|
+
},
|
|
35
|
+
rules: {
|
|
36
|
+
"react/jsx-key": "error",
|
|
37
|
+
"react-hooks/rules-of-hooks": "error",
|
|
38
|
+
"react-hooks/exhaustive-deps": "error",
|
|
39
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
40
|
+
},
|
|
41
|
+
settings: {
|
|
42
|
+
react: {
|
|
43
|
+
version: "detect",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
ignores: ["node_modules/", "dist/"],
|
|
49
|
+
},
|
|
50
|
+
]
|
|
@@ -8,18 +8,23 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "attio dev",
|
|
10
10
|
"build": "attio build",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"lint": "eslint 'src/**/*.{js,ts,tsx}'"
|
|
11
|
+
"clean": "rm -rf lib && rm -rf dist",
|
|
12
|
+
"lint": "eslint \"src/**/*.{ts,tsx,js,tsx}\""
|
|
14
13
|
},
|
|
15
|
-
"prettier": "@attio/eslint-plugin/prettier",
|
|
16
14
|
"devDependencies": {
|
|
17
|
-
"
|
|
15
|
+
"@types/react": "18.3.3",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
17
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
18
|
+
"eslint": "^8.57.0",
|
|
19
|
+
"eslint-plugin-react": "^7.34.2",
|
|
20
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
18
21
|
"typescript": "5.4.5"
|
|
19
22
|
},
|
|
20
23
|
"dependencies": {
|
|
24
|
+
"@attio/extension-sdk": "0.0.1-experimental.20240605.3",
|
|
25
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
26
|
+
"@eslint/js": "^9.4.0",
|
|
21
27
|
"attio": "latest",
|
|
22
|
-
"@attio/client-extension-sdk": "workspace:^",
|
|
23
28
|
"react": "18.3.1"
|
|
24
29
|
}
|
|
25
30
|
}
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"removeComments": true,
|
|
28
28
|
"resolveJsonModule": true,
|
|
29
29
|
"rootDir": "src",
|
|
30
|
+
"skipLibCheck": true,
|
|
30
31
|
"sourceMap": true,
|
|
31
32
|
"strict": true,
|
|
32
33
|
"strictBindCallApply": true,
|
|
@@ -34,13 +35,8 @@
|
|
|
34
35
|
"strictNullChecks": true,
|
|
35
36
|
"strictPropertyInitialization": true,
|
|
36
37
|
"target": "ES2019",
|
|
37
|
-
"types": ["@attio/
|
|
38
|
+
"types": ["@attio/extension-sdk"],
|
|
38
39
|
},
|
|
39
|
-
"references": [
|
|
40
|
-
{
|
|
41
|
-
"path": "../../libraries/react/client-extension-sdk"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
40
|
"exclude": [
|
|
45
41
|
"node_modules"
|
|
46
42
|
],
|
package/lib/util/typescript.d.ts
CHANGED
|
@@ -36,6 +36,6 @@ export declare const typeScriptErrorSchema: z.ZodObject<{
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
}>;
|
|
38
38
|
export type TypeScriptError = z.infer<typeof typeScriptErrorSchema>;
|
|
39
|
-
export declare const readConfig: (configFile: string) => Promise<ts.Program>;
|
|
39
|
+
export declare const readConfig: (configFile: string) => Promise<ts.Program | "Not a TypeScript project">;
|
|
40
40
|
export declare const getDiagnostics: (program: ts.Program) => Promise<Array<TypeScriptError>>;
|
|
41
41
|
//# sourceMappingURL=typescript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/util/typescript.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,OAAO,IAAI,EAAE,EAAC,MAAM,YAAY,CAAA;AACxC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AA6BrB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/util/typescript.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,OAAO,IAAI,EAAE,EAAC,MAAM,YAAY,CAAA;AACxC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AA6BrB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,UAAU,eACP,MAAM,KACnB,QAAQ,GAAG,OAAO,GAAG,0BAA0B,CAoB5C,CAAA;AAEN,eAAO,MAAM,cAAc,YAAmB,GAAG,OAAO,KAAG,QAAQ,MAAM,eAAe,CAAC,CA2BxF,CAAA"}
|
package/lib/util/typescript.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createReadStream } from "fs";
|
|
1
|
+
import { existsSync, createReadStream } from "fs";
|
|
2
2
|
import { createInterface } from "readline";
|
|
3
3
|
import { default as ts } from "typescript";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -36,6 +36,10 @@ export const typeScriptErrorSchema = z.object({
|
|
|
36
36
|
.optional(),
|
|
37
37
|
});
|
|
38
38
|
export const readConfig = async (configFile) => new Promise((resolve, reject) => {
|
|
39
|
+
if (!existsSync(configFile)) {
|
|
40
|
+
resolve("Not a TypeScript project");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
39
43
|
const { config, error } = ts.readConfigFile(configFile, ts.sys.readFile);
|
|
40
44
|
if (error) {
|
|
41
45
|
reject(typeScriptErrorSchema.parse({ text: ts.formatDiagnostic(error, formatHost) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/util/typescript.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/util/typescript.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,IAAI,CAAA;AAC/C,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AACxC,OAAO,EAAC,OAAO,IAAI,EAAE,EAAC,MAAM,YAAY,CAAA;AACxC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC9C,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,iBAAiB,GAAG,eAAe,CAAC;QACtC,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ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,IAAI,CAAC,QAAQ;oBAC9B,IAAI;oBACJ,SAAS;oBACT,QAAQ;iBACX;aACJ,CAAC,CAAA;QACN,CAAC;aAAM,CAAC;YACJ,OAAO,qBAAqB,CAAC,KAAK,CAAC,EAAC,IAAI,EAAC,CAAC,CAAA;QAC9C,CAAC;IACL,CAAC,CAAC,CACL,CAAA;IAED,OAAO,MAAM,CAAA;AACjB,CAAC,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const createDevVersionSchema: z.ZodObject<{
|
|
3
|
+
integration_id: z.ZodString;
|
|
4
|
+
integration_dev_version_id: z.ZodString;
|
|
5
|
+
client_bundle_upload_url: z.ZodString;
|
|
6
|
+
server_bundle_upload_url: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
integration_id: string;
|
|
9
|
+
integration_dev_version_id: string;
|
|
10
|
+
client_bundle_upload_url: string;
|
|
11
|
+
server_bundle_upload_url: string;
|
|
12
|
+
}, {
|
|
13
|
+
integration_id: string;
|
|
14
|
+
integration_dev_version_id: string;
|
|
15
|
+
client_bundle_upload_url: string;
|
|
16
|
+
server_bundle_upload_url: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type DevVersion = z.infer<typeof createDevVersionSchema>;
|
|
19
|
+
export declare const createDevVersion: (token: string, devSlug: string, integrationId: string) => Promise<{
|
|
20
|
+
integration_id: string;
|
|
21
|
+
integration_dev_version_id: string;
|
|
22
|
+
client_bundle_upload_url: string;
|
|
23
|
+
server_bundle_upload_url: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const startUpload: (token: string, devSlug: string, integrationId: string, devVersionId: string) => Promise<{
|
|
26
|
+
integration_dev_version_id: string;
|
|
27
|
+
client_bundle_upload_url: string;
|
|
28
|
+
server_bundle_upload_url: string;
|
|
29
|
+
integration_dev_version_bundle_id: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const initialConfigSchema: z.ZodObject<{
|
|
32
|
+
token: z.ZodString;
|
|
33
|
+
developer_slug: z.ZodString;
|
|
34
|
+
integration_slug: z.ZodString;
|
|
35
|
+
integration_title: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
token: string;
|
|
38
|
+
developer_slug: string;
|
|
39
|
+
integration_slug: string;
|
|
40
|
+
integration_title: string;
|
|
41
|
+
}, {
|
|
42
|
+
token: string;
|
|
43
|
+
developer_slug: string;
|
|
44
|
+
integration_slug: string;
|
|
45
|
+
integration_title: string;
|
|
46
|
+
}>;
|
|
47
|
+
export type InitialConfig = z.infer<typeof initialConfigSchema>;
|
|
48
|
+
export declare const configFileName = ".attio.json";
|
|
49
|
+
export type InitialConfigError = "No config file" | "Invalid config file";
|
|
50
|
+
export declare const loadInitialConfig: () => InitialConfig | InitialConfigError;
|
|
51
|
+
export declare const loadConfig: () => Promise<{
|
|
52
|
+
developer_account_id: string;
|
|
53
|
+
developer_account_member_id: string;
|
|
54
|
+
integration_id: string;
|
|
55
|
+
token: string;
|
|
56
|
+
developer_slug: string;
|
|
57
|
+
integration_slug: string;
|
|
58
|
+
integration_title: string;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const completeBundleUpload: (token: string, devSlug: string, integrationId: string, devVersionId: string, bundleId: string) => Promise<true>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=upload-bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-bundle.d.ts","sourceRoot":"","sources":["../../src/util/upload-bundle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AA8DrB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;EAK1B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE/D,eAAO,MAAM,gBAAgB,UAAiB,MAAM,WAAW,MAAM,iBAAiB,MAAM;;;;;EAU3F,CAAA;AAQD,eAAO,MAAM,WAAW,UACb,MAAM,WACJ,MAAM,iBACA,MAAM,gBACP,MAAM;;;;;EAWvB,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAQ/D,eAAO,MAAM,cAAc,gBAAgB,CAAA;AAG3C,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,qBAAqB,CAAA;AAEzE,eAAO,MAAM,iBAAiB,QAAO,aAAa,GAAG,kBAOpD,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;EAgCtB,CAAA;AAMD,eAAO,MAAM,oBAAoB,UACtB,MAAM,WACJ,MAAM,iBACA,MAAM,gBACP,MAAM,YACV,MAAM,kBAgBnB,CAAA"}
|