attio 0.0.1-experimental.20240606 → 0.0.1-experimental.20240614.1

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.
Files changed (83) hide show
  1. package/lib/attio.d.ts +3 -0
  2. package/lib/attio.d.ts.map +1 -0
  3. package/lib/attio.js +10 -0
  4. package/lib/attio.js.map +1 -0
  5. package/lib/build.d.ts +0 -2
  6. package/lib/build.d.ts.map +1 -1
  7. package/lib/build.js +0 -8
  8. package/lib/build.js.map +1 -1
  9. package/lib/commands/build.d.ts +0 -1
  10. package/lib/commands/build.d.ts.map +1 -1
  11. package/lib/commands/build.js +23 -19
  12. package/lib/commands/build.js.map +1 -1
  13. package/lib/commands/dev.d.ts.map +1 -1
  14. package/lib/commands/dev.js +37 -24
  15. package/lib/commands/dev.js.map +1 -1
  16. package/lib/commands/index.d.ts +30 -0
  17. package/lib/commands/index.d.ts.map +1 -0
  18. package/lib/commands/{scaffold.js → index.js} +42 -11
  19. package/lib/commands/index.js.map +1 -0
  20. package/lib/components/Disclaimer.d.ts +3 -0
  21. package/lib/components/Disclaimer.d.ts.map +1 -0
  22. package/lib/components/Disclaimer.js +10 -0
  23. package/lib/components/Disclaimer.js.map +1 -0
  24. package/lib/components/InitialInstructions.d.ts +5 -0
  25. package/lib/components/InitialInstructions.d.ts.map +1 -0
  26. package/lib/components/InitialInstructions.js +59 -0
  27. package/lib/components/InitialInstructions.js.map +1 -0
  28. package/lib/components/Logo.d.ts +3 -0
  29. package/lib/components/Logo.d.ts.map +1 -0
  30. package/lib/components/Logo.js +11 -0
  31. package/lib/components/Logo.js.map +1 -0
  32. package/lib/components/Select.d.ts +2 -1
  33. package/lib/components/Select.d.ts.map +1 -1
  34. package/lib/components/Select.js +2 -2
  35. package/lib/components/Select.js.map +1 -1
  36. package/lib/components/{TypeScriptError.d.ts → TypeScriptErrors.d.ts} +1 -1
  37. package/lib/components/TypeScriptErrors.d.ts.map +1 -0
  38. package/lib/components/{TypeScriptError.js → TypeScriptErrors.js} +1 -1
  39. package/lib/components/TypeScriptErrors.js.map +1 -0
  40. package/lib/hooks/useFullScreen.d.ts.map +1 -1
  41. package/lib/hooks/useFullScreen.js +5 -5
  42. package/lib/hooks/useFullScreen.js.map +1 -1
  43. package/lib/machines/build-machine.d.ts +1694 -32
  44. package/lib/machines/build-machine.d.ts.map +1 -1
  45. package/lib/machines/build-machine.js +107 -53
  46. package/lib/machines/build-machine.js.map +1 -1
  47. package/lib/machines/build-orchestrator.d.ts +16 -0
  48. package/lib/machines/build-orchestrator.d.ts.map +1 -0
  49. package/lib/machines/build-orchestrator.js +2 -0
  50. package/lib/machines/build-orchestrator.js.map +1 -0
  51. package/lib/machines/dev-machine.d.ts +2002 -125
  52. package/lib/machines/dev-machine.d.ts.map +1 -1
  53. package/lib/machines/dev-machine.js +161 -177
  54. package/lib/machines/dev-machine.js.map +1 -1
  55. package/lib/machines/js-machine.d.ts +240 -0
  56. package/lib/machines/js-machine.d.ts.map +1 -0
  57. package/lib/machines/js-machine.js +166 -0
  58. package/lib/machines/js-machine.js.map +1 -0
  59. package/lib/machines/scaffold-machine.d.ts +76 -46
  60. package/lib/machines/scaffold-machine.d.ts.map +1 -1
  61. package/lib/machines/scaffold-machine.js +52 -12
  62. package/lib/machines/scaffold-machine.js.map +1 -1
  63. package/lib/machines/ts-machine.d.ts +149 -0
  64. package/lib/machines/ts-machine.d.ts.map +1 -0
  65. package/lib/machines/ts-machine.js +103 -0
  66. package/lib/machines/ts-machine.js.map +1 -0
  67. package/lib/templates/javascript/eslint.config.js +1 -1
  68. package/lib/templates/typescript/eslint.config.js +1 -1
  69. package/lib/templates/typescript/package.json +1 -1
  70. package/lib/util/upload-bundle.d.ts +61 -1
  71. package/lib/util/upload-bundle.d.ts.map +1 -1
  72. package/lib/util/upload-bundle.js +41 -46
  73. package/lib/util/upload-bundle.js.map +1 -1
  74. package/package.json +4 -3
  75. package/lib/cli.d.ts +0 -3
  76. package/lib/cli.d.ts.map +0 -1
  77. package/lib/cli.js +0 -5
  78. package/lib/cli.js.map +0 -1
  79. package/lib/commands/scaffold.d.ts +0 -10
  80. package/lib/commands/scaffold.d.ts.map +0 -1
  81. package/lib/commands/scaffold.js.map +0 -1
  82. package/lib/components/TypeScriptError.d.ts.map +0 -1
  83. package/lib/components/TypeScriptError.js.map +0 -1
@@ -1,61 +1,1214 @@
1
- import * as esbuild from "esbuild";
2
- import { BuildError } from "../build.js";
3
- import { TypeScriptError } from "../util/typescript.js";
1
+ import { DevVersion, InitialConfig, InitialConfigError } from "../util/upload-bundle.js";
2
+ type IntegrationAndDevVersion = DevVersion & {
3
+ integration_id: string;
4
+ };
4
5
  interface Context {
5
- buildContexts?: Array<esbuild.BuildContext>;
6
- lastJavaScriptError?: {
7
- time: Date;
8
- error: BuildError;
9
- };
10
- lastTypeScriptError?: {
11
- time: Date;
12
- errors: Array<TypeScriptError>;
13
- };
14
- lastSuccess?: Date;
6
+ lastSuccessfulJavaScriptBuild?: Date;
7
+ jsContents: [string, string];
8
+ config?: InitialConfig;
9
+ configError?: InitialConfigError;
10
+ devVersion?: IntegrationAndDevVersion;
11
+ }
12
+ interface UploadEvent {
13
+ type: "Upload";
14
+ contents: [string, string];
15
15
  }
16
16
  export declare const devMachine: import("xstate").StateMachine<Context, {
17
- type: "Build Contexts Prepared";
18
- buildContexts: Array<esbuild.BuildContext>;
19
- } | {
20
17
  type: "Change";
21
18
  } | {
22
19
  type: "JavaScript Error";
23
- error: BuildError;
24
- time: Date;
25
- } | {
26
- type: "TypeScript Error";
27
- errors: Array<TypeScriptError>;
28
- time: Date;
29
20
  } | {
30
21
  type: "JavaScript Success";
22
+ contents: [string, string];
31
23
  time: Date;
24
+ } | {
25
+ type: "TypeScript Error";
32
26
  } | {
33
27
  type: "TypeScript Success";
34
- time: Date;
28
+ } | {
29
+ type: "Error";
30
+ } | {
31
+ type: "Success";
32
+ } | {
33
+ type: "Upload Complete";
34
+ } | {
35
+ type: "Upload Prepared";
36
+ devVersion: IntegrationAndDevVersion;
37
+ } | {
38
+ type: "Initialized";
39
+ config?: {
40
+ token: string;
41
+ developer_slug: string;
42
+ integration_slug: string;
43
+ integration_title: string;
44
+ } | undefined;
45
+ } | {
46
+ type: "Initialization Error";
47
+ error: InitialConfigError;
35
48
  }, {
36
- [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<void, import("xstate").NonReducibleUnknown>, {
37
- [k: string]: unknown;
38
- type: string;
49
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./js-machine.js").Context, {
50
+ type: "Build Contexts Prepared";
51
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
52
+ } | {
53
+ type: "Change";
54
+ } | {
55
+ type: "Result";
56
+ contents: [string, string];
57
+ error?: undefined;
58
+ time: Date;
59
+ } | {
60
+ type: "Result";
61
+ contents?: undefined;
62
+ error: {
63
+ errors: {
64
+ text: string;
65
+ location: {
66
+ length: number;
67
+ column: number;
68
+ file: string;
69
+ line: number;
70
+ lineText: string;
71
+ namespace: string;
72
+ suggestion: string;
73
+ };
74
+ }[];
75
+ warnings: {
76
+ text: string;
77
+ location: {
78
+ length: number;
79
+ column: number;
80
+ file: string;
81
+ line: number;
82
+ lineText: string;
83
+ namespace: string;
84
+ suggestion: string;
85
+ };
86
+ }[];
87
+ };
88
+ time: Date;
89
+ } | {
90
+ type: "Log";
91
+ message: string;
92
+ }, {
93
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
94
+ write: boolean;
95
+ }>, {
96
+ type: "Build Contexts Prepared";
97
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
98
+ } | {
99
+ type: "Change";
100
+ } | {
101
+ type: "Result";
102
+ contents: [string, string];
103
+ error?: undefined;
104
+ time: Date;
105
+ } | {
106
+ type: "Result";
107
+ contents?: undefined;
108
+ error: {
109
+ errors: {
110
+ text: string;
111
+ location: {
112
+ length: number;
113
+ column: number;
114
+ file: string;
115
+ line: number;
116
+ lineText: string;
117
+ namespace: string;
118
+ suggestion: string;
119
+ };
120
+ }[];
121
+ warnings: {
122
+ text: string;
123
+ location: {
124
+ length: number;
125
+ column: number;
126
+ file: string;
127
+ line: number;
128
+ lineText: string;
129
+ namespace: string;
130
+ suggestion: string;
131
+ };
132
+ }[];
133
+ };
134
+ time: Date;
135
+ } | {
136
+ type: "Log";
137
+ message: string;
138
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
139
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
140
+ write: boolean;
141
+ }>, {
142
+ type: "Build Contexts Prepared";
143
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
144
+ } | {
145
+ type: "Change";
146
+ } | {
147
+ type: "Result";
148
+ contents: [string, string];
149
+ error?: undefined;
150
+ time: Date;
151
+ } | {
152
+ type: "Result";
153
+ contents?: undefined;
154
+ error: {
155
+ errors: {
156
+ text: string;
157
+ location: {
158
+ length: number;
159
+ column: number;
160
+ file: string;
161
+ line: number;
162
+ lineText: string;
163
+ namespace: string;
164
+ suggestion: string;
165
+ };
166
+ }[];
167
+ warnings: {
168
+ text: string;
169
+ location: {
170
+ length: number;
171
+ column: number;
172
+ file: string;
173
+ line: number;
174
+ lineText: string;
175
+ namespace: string;
176
+ suggestion: string;
177
+ };
178
+ }[];
179
+ };
180
+ time: Date;
181
+ } | {
182
+ type: "Log";
183
+ message: string;
184
+ }, import("xstate").EventObject> | undefined;
185
+ }, "Preparing" | {
186
+ Watching?: "Success" | "Building" | "Errored" | undefined;
187
+ }, string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject>, {
188
+ type: "Build Contexts Prepared";
189
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
190
+ } | {
191
+ type: "Change";
192
+ } | {
193
+ type: "Result";
194
+ contents: [string, string];
195
+ error?: undefined;
196
+ time: Date;
197
+ } | {
198
+ type: "Result";
199
+ contents?: undefined;
200
+ error: {
201
+ errors: {
202
+ text: string;
203
+ location: {
204
+ length: number;
205
+ column: number;
206
+ file: string;
207
+ line: number;
208
+ lineText: string;
209
+ namespace: string;
210
+ suggestion: string;
211
+ };
212
+ }[];
213
+ warnings: {
214
+ text: string;
215
+ location: {
216
+ length: number;
217
+ column: number;
218
+ file: string;
219
+ line: number;
220
+ lineText: string;
221
+ namespace: string;
222
+ suggestion: string;
223
+ };
224
+ }[];
225
+ };
226
+ time: Date;
227
+ } | {
228
+ type: "Log";
229
+ message: string;
230
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./ts-machine.js").Context, {
231
+ type: "Change";
232
+ } | {
233
+ type: "Result";
234
+ errors?: {
235
+ text: string;
236
+ location?: {
237
+ file: string;
238
+ line: number;
239
+ lineText: string;
240
+ character: number;
241
+ } | undefined;
242
+ }[] | undefined;
243
+ time: Date;
244
+ }, {
245
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | undefined;
246
+ }, "Success" | "Errored" | "Validating", string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject>, {
247
+ type: "Change";
248
+ } | {
249
+ type: "Result";
250
+ errors?: {
251
+ text: string;
252
+ location?: {
253
+ file: string;
254
+ line: number;
255
+ lineText: string;
256
+ character: number;
257
+ } | undefined;
258
+ }[] | undefined;
259
+ time: Date;
260
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
261
+ devVersion: IntegrationAndDevVersion;
262
+ config: InitialConfig;
263
+ contents: [string, string];
264
+ }>, UploadEvent, import("xstate").EventObject> | undefined;
265
+ javascript?: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./js-machine.js").Context, {
266
+ type: "Build Contexts Prepared";
267
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
268
+ } | {
269
+ type: "Change";
270
+ } | {
271
+ type: "Result";
272
+ contents: [string, string];
273
+ error?: undefined;
274
+ time: Date;
275
+ } | {
276
+ type: "Result";
277
+ contents?: undefined;
278
+ error: {
279
+ errors: {
280
+ text: string;
281
+ location: {
282
+ length: number;
283
+ column: number;
284
+ file: string;
285
+ line: number;
286
+ lineText: string;
287
+ namespace: string;
288
+ suggestion: string;
289
+ };
290
+ }[];
291
+ warnings: {
292
+ text: string;
293
+ location: {
294
+ length: number;
295
+ column: number;
296
+ file: string;
297
+ line: number;
298
+ lineText: string;
299
+ namespace: string;
300
+ suggestion: string;
301
+ };
302
+ }[];
303
+ };
304
+ time: Date;
305
+ } | {
306
+ type: "Log";
307
+ message: string;
308
+ }, {
309
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
310
+ write: boolean;
311
+ }>, {
312
+ type: "Build Contexts Prepared";
313
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
314
+ } | {
315
+ type: "Change";
316
+ } | {
317
+ type: "Result";
318
+ contents: [string, string];
319
+ error?: undefined;
320
+ time: Date;
321
+ } | {
322
+ type: "Result";
323
+ contents?: undefined;
324
+ error: {
325
+ errors: {
326
+ text: string;
327
+ location: {
328
+ length: number;
329
+ column: number;
330
+ file: string;
331
+ line: number;
332
+ lineText: string;
333
+ namespace: string;
334
+ suggestion: string;
335
+ };
336
+ }[];
337
+ warnings: {
338
+ text: string;
339
+ location: {
340
+ length: number;
341
+ column: number;
342
+ file: string;
343
+ line: number;
344
+ lineText: string;
345
+ namespace: string;
346
+ suggestion: string;
347
+ };
348
+ }[];
349
+ };
350
+ time: Date;
351
+ } | {
352
+ type: "Log";
353
+ message: string;
354
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
355
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
356
+ write: boolean;
357
+ }>, {
358
+ type: "Build Contexts Prepared";
359
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
360
+ } | {
361
+ type: "Change";
362
+ } | {
363
+ type: "Result";
364
+ contents: [string, string];
365
+ error?: undefined;
366
+ time: Date;
367
+ } | {
368
+ type: "Result";
369
+ contents?: undefined;
370
+ error: {
371
+ errors: {
372
+ text: string;
373
+ location: {
374
+ length: number;
375
+ column: number;
376
+ file: string;
377
+ line: number;
378
+ lineText: string;
379
+ namespace: string;
380
+ suggestion: string;
381
+ };
382
+ }[];
383
+ warnings: {
384
+ text: string;
385
+ location: {
386
+ length: number;
387
+ column: number;
388
+ file: string;
389
+ line: number;
390
+ lineText: string;
391
+ namespace: string;
392
+ suggestion: string;
393
+ };
394
+ }[];
395
+ };
396
+ time: Date;
397
+ } | {
398
+ type: "Log";
399
+ message: string;
400
+ }, import("xstate").EventObject> | undefined;
401
+ }, "Preparing" | {
402
+ Watching?: "Success" | "Building" | "Errored" | undefined;
403
+ }, string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject>, {
404
+ type: "Build Contexts Prepared";
405
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
406
+ } | {
407
+ type: "Change";
408
+ } | {
409
+ type: "Result";
410
+ contents: [string, string];
411
+ error?: undefined;
412
+ time: Date;
413
+ } | {
414
+ type: "Result";
415
+ contents?: undefined;
416
+ error: {
417
+ errors: {
418
+ text: string;
419
+ location: {
420
+ length: number;
421
+ column: number;
422
+ file: string;
423
+ line: number;
424
+ lineText: string;
425
+ namespace: string;
426
+ suggestion: string;
427
+ };
428
+ }[];
429
+ warnings: {
430
+ text: string;
431
+ location: {
432
+ length: number;
433
+ column: number;
434
+ file: string;
435
+ line: number;
436
+ lineText: string;
437
+ namespace: string;
438
+ suggestion: string;
439
+ };
440
+ }[];
441
+ };
442
+ time: Date;
443
+ } | {
444
+ type: "Log";
445
+ message: string;
446
+ }, import("xstate").EventObject> | undefined;
447
+ typescript?: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./ts-machine.js").Context, {
448
+ type: "Change";
449
+ } | {
450
+ type: "Result";
451
+ errors?: {
452
+ text: string;
453
+ location?: {
454
+ file: string;
455
+ line: number;
456
+ lineText: string;
457
+ character: number;
458
+ } | undefined;
459
+ }[] | undefined;
460
+ time: Date;
461
+ }, {
462
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | undefined;
463
+ }, "Success" | "Errored" | "Validating", string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject>, {
464
+ type: "Change";
465
+ } | {
466
+ type: "Result";
467
+ errors?: {
468
+ text: string;
469
+ location?: {
470
+ file: string;
471
+ line: number;
472
+ lineText: string;
473
+ character: number;
474
+ } | undefined;
475
+ }[] | undefined;
476
+ time: Date;
39
477
  }, import("xstate").EventObject> | undefined;
40
478
  }, import("xstate").Values<{
41
- build: {
42
- src: "build";
479
+ javascript: {
480
+ src: "javascript";
481
+ logic: import("xstate").StateMachine<import("./js-machine.js").Context, {
482
+ type: "Build Contexts Prepared";
483
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
484
+ } | {
485
+ type: "Change";
486
+ } | {
487
+ type: "Result";
488
+ contents: [string, string];
489
+ error?: undefined;
490
+ time: Date;
491
+ } | {
492
+ type: "Result";
493
+ contents?: undefined;
494
+ error: {
495
+ errors: {
496
+ text: string;
497
+ location: {
498
+ length: number;
499
+ column: number;
500
+ file: string;
501
+ line: number;
502
+ lineText: string;
503
+ namespace: string;
504
+ suggestion: string;
505
+ };
506
+ }[];
507
+ warnings: {
508
+ text: string;
509
+ location: {
510
+ length: number;
511
+ column: number;
512
+ file: string;
513
+ line: number;
514
+ lineText: string;
515
+ namespace: string;
516
+ suggestion: string;
517
+ };
518
+ }[];
519
+ };
520
+ time: Date;
521
+ } | {
522
+ type: "Log";
523
+ message: string;
524
+ }, {
525
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
526
+ write: boolean;
527
+ }>, {
528
+ type: "Build Contexts Prepared";
529
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
530
+ } | {
531
+ type: "Change";
532
+ } | {
533
+ type: "Result";
534
+ contents: [string, string];
535
+ error?: undefined;
536
+ time: Date;
537
+ } | {
538
+ type: "Result";
539
+ contents?: undefined;
540
+ error: {
541
+ errors: {
542
+ text: string;
543
+ location: {
544
+ length: number;
545
+ column: number;
546
+ file: string;
547
+ line: number;
548
+ lineText: string;
549
+ namespace: string;
550
+ suggestion: string;
551
+ };
552
+ }[];
553
+ warnings: {
554
+ text: string;
555
+ location: {
556
+ length: number;
557
+ column: number;
558
+ file: string;
559
+ line: number;
560
+ lineText: string;
561
+ namespace: string;
562
+ suggestion: string;
563
+ };
564
+ }[];
565
+ };
566
+ time: Date;
567
+ } | {
568
+ type: "Log";
569
+ message: string;
570
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
571
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
572
+ write: boolean;
573
+ }>, {
574
+ type: "Build Contexts Prepared";
575
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
576
+ } | {
577
+ type: "Change";
578
+ } | {
579
+ type: "Result";
580
+ contents: [string, string];
581
+ error?: undefined;
582
+ time: Date;
583
+ } | {
584
+ type: "Result";
585
+ contents?: undefined;
586
+ error: {
587
+ errors: {
588
+ text: string;
589
+ location: {
590
+ length: number;
591
+ column: number;
592
+ file: string;
593
+ line: number;
594
+ lineText: string;
595
+ namespace: string;
596
+ suggestion: string;
597
+ };
598
+ }[];
599
+ warnings: {
600
+ text: string;
601
+ location: {
602
+ length: number;
603
+ column: number;
604
+ file: string;
605
+ line: number;
606
+ lineText: string;
607
+ namespace: string;
608
+ suggestion: string;
609
+ };
610
+ }[];
611
+ };
612
+ time: Date;
613
+ } | {
614
+ type: "Log";
615
+ message: string;
616
+ }, import("xstate").EventObject> | undefined;
617
+ }, import("xstate").Values<{
618
+ prepareBuildContext: {
619
+ src: "prepareBuildContext";
620
+ logic: import("xstate").CallbackActorLogic<{
621
+ type: "Build Contexts Prepared";
622
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
623
+ } | {
624
+ type: "Change";
625
+ } | {
626
+ type: "Result";
627
+ contents: [string, string];
628
+ error?: undefined;
629
+ time: Date;
630
+ } | {
631
+ type: "Result";
632
+ contents?: undefined;
633
+ error: {
634
+ errors: {
635
+ text: string;
636
+ location: {
637
+ length: number;
638
+ column: number;
639
+ file: string;
640
+ line: number;
641
+ lineText: string;
642
+ namespace: string;
643
+ suggestion: string;
644
+ };
645
+ }[];
646
+ warnings: {
647
+ text: string;
648
+ location: {
649
+ length: number;
650
+ column: number;
651
+ file: string;
652
+ line: number;
653
+ lineText: string;
654
+ namespace: string;
655
+ suggestion: string;
656
+ };
657
+ }[];
658
+ };
659
+ time: Date;
660
+ } | {
661
+ type: "Log";
662
+ message: string;
663
+ }, {
664
+ write: boolean;
665
+ }>;
666
+ id: string | undefined;
667
+ };
668
+ build: {
669
+ src: "build";
670
+ logic: import("xstate").CallbackActorLogic<{
671
+ type: "Build Contexts Prepared";
672
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
673
+ } | {
674
+ type: "Change";
675
+ } | {
676
+ type: "Result";
677
+ contents: [string, string];
678
+ error?: undefined;
679
+ time: Date;
680
+ } | {
681
+ type: "Result";
682
+ contents?: undefined;
683
+ error: {
684
+ errors: {
685
+ text: string;
686
+ location: {
687
+ length: number;
688
+ column: number;
689
+ file: string;
690
+ line: number;
691
+ lineText: string;
692
+ namespace: string;
693
+ suggestion: string;
694
+ };
695
+ }[];
696
+ warnings: {
697
+ text: string;
698
+ location: {
699
+ length: number;
700
+ column: number;
701
+ file: string;
702
+ line: number;
703
+ lineText: string;
704
+ namespace: string;
705
+ suggestion: string;
706
+ };
707
+ }[];
708
+ };
709
+ time: Date;
710
+ } | {
711
+ type: "Log";
712
+ message: string;
713
+ }, {
714
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
715
+ write: boolean;
716
+ }>;
717
+ id: string | undefined;
718
+ };
719
+ }>, import("xstate").Values<{
720
+ clearError: {
721
+ type: "clearError";
722
+ params: import("xstate").NonReducibleUnknown;
723
+ };
724
+ raiseErrored: {
725
+ type: "raiseErrored";
726
+ params: import("xstate").NonReducibleUnknown;
727
+ };
728
+ raiseSuccess: {
729
+ type: "raiseSuccess";
730
+ params: {
731
+ contents: [string, string];
732
+ time: Date;
733
+ };
734
+ };
735
+ setBuildContexts: {
736
+ type: "setBuildContexts";
737
+ params: {
738
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
739
+ };
740
+ };
741
+ setError: {
742
+ type: "setError";
743
+ params: {
744
+ error: {
745
+ errors: {
746
+ text: string;
747
+ location: {
748
+ length: number;
749
+ column: number;
750
+ file: string;
751
+ line: number;
752
+ lineText: string;
753
+ namespace: string;
754
+ suggestion: string;
755
+ };
756
+ }[];
757
+ warnings: {
758
+ text: string;
759
+ location: {
760
+ length: number;
761
+ column: number;
762
+ file: string;
763
+ line: number;
764
+ lineText: string;
765
+ namespace: string;
766
+ suggestion: string;
767
+ };
768
+ }[];
769
+ };
770
+ };
771
+ };
772
+ setTime: {
773
+ type: "setTime";
774
+ params: {
775
+ time: Date;
776
+ };
777
+ };
778
+ }>, {
779
+ type: "has errors";
780
+ params: {
781
+ error?: {
782
+ errors: {
783
+ text: string;
784
+ location: {
785
+ length: number;
786
+ column: number;
787
+ file: string;
788
+ line: number;
789
+ lineText: string;
790
+ namespace: string;
791
+ suggestion: string;
792
+ };
793
+ }[];
794
+ warnings: {
795
+ text: string;
796
+ location: {
797
+ length: number;
798
+ column: number;
799
+ file: string;
800
+ line: number;
801
+ lineText: string;
802
+ namespace: string;
803
+ suggestion: string;
804
+ };
805
+ }[];
806
+ } | undefined;
807
+ };
808
+ }, never, "Preparing" | {
809
+ Watching?: "Success" | "Building" | "Errored" | undefined;
810
+ }, string, {
811
+ parentRef: import("./build-orchestrator.js").JavaScriptOrchestrator;
812
+ write: boolean;
813
+ }, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
814
+ type: "Build Contexts Prepared";
815
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
816
+ } | {
817
+ type: "Change";
818
+ } | {
819
+ type: "Result";
820
+ contents: [string, string];
821
+ error?: undefined;
822
+ time: Date;
823
+ } | {
824
+ type: "Result";
825
+ contents?: undefined;
826
+ error: {
827
+ errors: {
828
+ text: string;
829
+ location: {
830
+ length: number;
831
+ column: number;
832
+ file: string;
833
+ line: number;
834
+ lineText: string;
835
+ namespace: string;
836
+ suggestion: string;
837
+ };
838
+ }[];
839
+ warnings: {
840
+ text: string;
841
+ location: {
842
+ length: number;
843
+ column: number;
844
+ file: string;
845
+ line: number;
846
+ lineText: string;
847
+ namespace: string;
848
+ suggestion: string;
849
+ };
850
+ }[];
851
+ };
852
+ time: Date;
853
+ } | {
854
+ type: "Log";
855
+ message: string;
856
+ }, import("xstate").Values<{
857
+ prepareBuildContext: {
858
+ src: "prepareBuildContext";
859
+ logic: import("xstate").CallbackActorLogic<{
860
+ type: "Build Contexts Prepared";
861
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
862
+ } | {
863
+ type: "Change";
864
+ } | {
865
+ type: "Result";
866
+ contents: [string, string];
867
+ error?: undefined;
868
+ time: Date;
869
+ } | {
870
+ type: "Result";
871
+ contents?: undefined;
872
+ error: {
873
+ errors: {
874
+ text: string;
875
+ location: {
876
+ length: number;
877
+ column: number;
878
+ file: string;
879
+ line: number;
880
+ lineText: string;
881
+ namespace: string;
882
+ suggestion: string;
883
+ };
884
+ }[];
885
+ warnings: {
886
+ text: string;
887
+ location: {
888
+ length: number;
889
+ column: number;
890
+ file: string;
891
+ line: number;
892
+ lineText: string;
893
+ namespace: string;
894
+ suggestion: string;
895
+ };
896
+ }[];
897
+ };
898
+ time: Date;
899
+ } | {
900
+ type: "Log";
901
+ message: string;
902
+ }, {
903
+ write: boolean;
904
+ }>;
905
+ id: string | undefined;
906
+ };
907
+ build: {
908
+ src: "build";
909
+ logic: import("xstate").CallbackActorLogic<{
910
+ type: "Build Contexts Prepared";
911
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
912
+ } | {
913
+ type: "Change";
914
+ } | {
915
+ type: "Result";
916
+ contents: [string, string];
917
+ error?: undefined;
918
+ time: Date;
919
+ } | {
920
+ type: "Result";
921
+ contents?: undefined;
922
+ error: {
923
+ errors: {
924
+ text: string;
925
+ location: {
926
+ length: number;
927
+ column: number;
928
+ file: string;
929
+ line: number;
930
+ lineText: string;
931
+ namespace: string;
932
+ suggestion: string;
933
+ };
934
+ }[];
935
+ warnings: {
936
+ text: string;
937
+ location: {
938
+ length: number;
939
+ column: number;
940
+ file: string;
941
+ line: number;
942
+ lineText: string;
943
+ namespace: string;
944
+ suggestion: string;
945
+ };
946
+ }[];
947
+ };
948
+ time: Date;
949
+ } | {
950
+ type: "Log";
951
+ message: string;
952
+ }, {
953
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
954
+ write: boolean;
955
+ }>;
956
+ id: string | undefined;
957
+ };
958
+ }>, import("xstate").Values<{
959
+ clearError: {
960
+ type: "clearError";
961
+ params: import("xstate").NonReducibleUnknown;
962
+ };
963
+ raiseErrored: {
964
+ type: "raiseErrored";
965
+ params: import("xstate").NonReducibleUnknown;
966
+ };
967
+ raiseSuccess: {
968
+ type: "raiseSuccess";
969
+ params: {
970
+ contents: [string, string];
971
+ time: Date;
972
+ };
973
+ };
974
+ setBuildContexts: {
975
+ type: "setBuildContexts";
976
+ params: {
977
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
978
+ };
979
+ };
980
+ setError: {
981
+ type: "setError";
982
+ params: {
983
+ error: {
984
+ errors: {
985
+ text: string;
986
+ location: {
987
+ length: number;
988
+ column: number;
989
+ file: string;
990
+ line: number;
991
+ lineText: string;
992
+ namespace: string;
993
+ suggestion: string;
994
+ };
995
+ }[];
996
+ warnings: {
997
+ text: string;
998
+ location: {
999
+ length: number;
1000
+ column: number;
1001
+ file: string;
1002
+ line: number;
1003
+ lineText: string;
1004
+ namespace: string;
1005
+ suggestion: string;
1006
+ };
1007
+ }[];
1008
+ };
1009
+ };
1010
+ };
1011
+ setTime: {
1012
+ type: "setTime";
1013
+ params: {
1014
+ time: Date;
1015
+ };
1016
+ };
1017
+ }>, {
1018
+ type: "has errors";
1019
+ params: {
1020
+ error?: {
1021
+ errors: {
1022
+ text: string;
1023
+ location: {
1024
+ length: number;
1025
+ column: number;
1026
+ file: string;
1027
+ line: number;
1028
+ lineText: string;
1029
+ namespace: string;
1030
+ suggestion: string;
1031
+ };
1032
+ }[];
1033
+ warnings: {
1034
+ text: string;
1035
+ location: {
1036
+ length: number;
1037
+ column: number;
1038
+ file: string;
1039
+ line: number;
1040
+ lineText: string;
1041
+ namespace: string;
1042
+ suggestion: string;
1043
+ };
1044
+ }[];
1045
+ } | undefined;
1046
+ };
1047
+ }, never, string, import("xstate").EventObject>>;
1048
+ id: "javascript";
1049
+ };
1050
+ typescript: {
1051
+ src: "typescript";
1052
+ logic: import("xstate").StateMachine<import("./ts-machine.js").Context, {
1053
+ type: "Change";
1054
+ } | {
1055
+ type: "Result";
1056
+ errors?: {
1057
+ text: string;
1058
+ location?: {
1059
+ file: string;
1060
+ line: number;
1061
+ lineText: string;
1062
+ character: number;
1063
+ } | undefined;
1064
+ }[] | undefined;
1065
+ time: Date;
1066
+ }, {
1067
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | undefined;
1068
+ }, {
1069
+ src: "validate";
1070
+ logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
1071
+ id: string | undefined;
1072
+ }, import("xstate").Values<{
1073
+ clearError: {
1074
+ type: "clearError";
1075
+ params: import("xstate").NonReducibleUnknown;
1076
+ };
1077
+ raiseErrored: {
1078
+ type: "raiseErrored";
1079
+ params: import("xstate").NonReducibleUnknown;
1080
+ };
1081
+ raiseSuccess: {
1082
+ type: "raiseSuccess";
1083
+ params: import("xstate").NonReducibleUnknown;
1084
+ };
1085
+ setTime: {
1086
+ type: "setTime";
1087
+ params: {
1088
+ time: Date;
1089
+ };
1090
+ };
1091
+ clearTime: {
1092
+ type: "clearTime";
1093
+ params: import("xstate").NonReducibleUnknown;
1094
+ };
1095
+ setErrors: {
1096
+ type: "setErrors";
1097
+ params: {
1098
+ errors?: {
1099
+ text: string;
1100
+ location?: {
1101
+ file: string;
1102
+ line: number;
1103
+ lineText: string;
1104
+ character: number;
1105
+ } | undefined;
1106
+ }[] | undefined;
1107
+ };
1108
+ };
1109
+ }>, {
1110
+ type: "has errors";
1111
+ params: {
1112
+ errors?: {
1113
+ text: string;
1114
+ location?: {
1115
+ file: string;
1116
+ line: number;
1117
+ lineText: string;
1118
+ character: number;
1119
+ } | undefined;
1120
+ }[] | undefined;
1121
+ };
1122
+ }, never, "Success" | "Errored" | "Validating", string, {
1123
+ parentRef: import("./build-orchestrator.js").TypeScriptOrchestrator;
1124
+ }, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
1125
+ type: "Change";
1126
+ } | {
1127
+ type: "Result";
1128
+ errors?: {
1129
+ text: string;
1130
+ location?: {
1131
+ file: string;
1132
+ line: number;
1133
+ lineText: string;
1134
+ character: number;
1135
+ } | undefined;
1136
+ }[] | undefined;
1137
+ time: Date;
1138
+ }, {
1139
+ src: "validate";
1140
+ logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
1141
+ id: string | undefined;
1142
+ }, import("xstate").Values<{
1143
+ clearError: {
1144
+ type: "clearError";
1145
+ params: import("xstate").NonReducibleUnknown;
1146
+ };
1147
+ raiseErrored: {
1148
+ type: "raiseErrored";
1149
+ params: import("xstate").NonReducibleUnknown;
1150
+ };
1151
+ raiseSuccess: {
1152
+ type: "raiseSuccess";
1153
+ params: import("xstate").NonReducibleUnknown;
1154
+ };
1155
+ setTime: {
1156
+ type: "setTime";
1157
+ params: {
1158
+ time: Date;
1159
+ };
1160
+ };
1161
+ clearTime: {
1162
+ type: "clearTime";
1163
+ params: import("xstate").NonReducibleUnknown;
1164
+ };
1165
+ setErrors: {
1166
+ type: "setErrors";
1167
+ params: {
1168
+ errors?: {
1169
+ text: string;
1170
+ location?: {
1171
+ file: string;
1172
+ line: number;
1173
+ lineText: string;
1174
+ character: number;
1175
+ } | undefined;
1176
+ }[] | undefined;
1177
+ };
1178
+ };
1179
+ }>, {
1180
+ type: "has errors";
1181
+ params: {
1182
+ errors?: {
1183
+ text: string;
1184
+ location?: {
1185
+ file: string;
1186
+ line: number;
1187
+ lineText: string;
1188
+ character: number;
1189
+ } | undefined;
1190
+ }[] | undefined;
1191
+ };
1192
+ }, never, string, import("xstate").EventObject>>;
1193
+ id: "typescript";
1194
+ };
1195
+ loadConfig: {
1196
+ src: "loadConfig";
43
1197
  logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
44
1198
  id: string | undefined;
45
1199
  };
46
- prepareBuildContext: {
47
- src: "prepareBuildContext";
1200
+ prepareUpload: {
1201
+ src: "prepareUpload";
48
1202
  logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
49
1203
  id: string | undefined;
50
1204
  };
51
1205
  upload: {
52
1206
  src: "upload";
53
- logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown>;
54
- id: string | undefined;
55
- };
56
- validateTypeScript: {
57
- src: "validateTypeScript";
58
- logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
1207
+ logic: import("xstate").CallbackActorLogic<UploadEvent, {
1208
+ devVersion: IntegrationAndDevVersion;
1209
+ config: InitialConfig;
1210
+ contents: [string, string];
1211
+ }>;
59
1212
  id: string | undefined;
60
1213
  };
61
1214
  watch: {
@@ -64,92 +1217,818 @@ export declare const devMachine: import("xstate").StateMachine<Context, {
64
1217
  id: string | undefined;
65
1218
  };
66
1219
  }>, import("xstate").Values<{
67
- clearLastJavaScriptError: {
68
- type: "clearLastJavaScriptError";
69
- params: import("xstate").NonReducibleUnknown;
70
- };
71
- clearLastTypeScriptError: {
72
- type: "clearLastTypeScriptError";
73
- params: import("xstate").NonReducibleUnknown;
74
- };
75
- setBuildContexts: {
76
- type: "setBuildContexts";
1220
+ setSuccess: {
1221
+ type: "setSuccess";
77
1222
  params: {
78
- buildContexts: Array<esbuild.BuildContext>;
1223
+ contents: [string, string];
1224
+ time: Date;
79
1225
  };
80
1226
  };
81
- setLastJavaScriptError: {
82
- type: "setLastJavaScriptError";
1227
+ upload: {
1228
+ type: "upload";
1229
+ params: [string, string];
1230
+ };
1231
+ sendChange: {
1232
+ type: "sendChange";
1233
+ params: import("xstate").NonReducibleUnknown;
1234
+ };
1235
+ setConfig: {
1236
+ type: "setConfig";
83
1237
  params: {
84
- error: BuildError;
85
- time: Date;
1238
+ config?: {
1239
+ token: string;
1240
+ developer_slug: string;
1241
+ integration_slug: string;
1242
+ integration_title: string;
1243
+ } | undefined;
86
1244
  };
87
1245
  };
88
- setLastTypeScriptError: {
89
- type: "setLastTypeScriptError";
1246
+ setConfigError: {
1247
+ type: "setConfigError";
90
1248
  params: {
91
- errors: Array<TypeScriptError>;
92
- time: Date;
1249
+ error: InitialConfigError;
93
1250
  };
94
1251
  };
95
- setLastSuccess: {
96
- type: "setLastSuccess";
1252
+ setDevVersion: {
1253
+ type: "setDevVersion";
97
1254
  params: {
98
- time: Date;
1255
+ devVersion: IntegrationAndDevVersion;
99
1256
  };
100
1257
  };
101
- }>, import("xstate").Values<{
102
- "no TypeScript error": {
103
- type: "no TypeScript error";
104
- params: unknown;
105
- };
106
- "no JavaScript error": {
107
- type: "no JavaScript error";
108
- params: unknown;
109
- };
110
- }>, never, Required<{
111
- TypeScript?: "Validating" | "Errored" | "No TypeScript Errors" | undefined;
112
- JavaScript?: "Preparing" | {
113
- Watching?: "Building" | "Errored" | "No JavaScript Errors" | "Uploading" | undefined;
114
- } | undefined;
115
- }>, string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
116
- type: "Build Contexts Prepared";
117
- buildContexts: Array<esbuild.BuildContext>;
118
- } | {
1258
+ }>, {
1259
+ type: "have dev version";
1260
+ params: unknown;
1261
+ }, never, "Read Config" | "No Config" | {
1262
+ Watching?: Required<{
1263
+ JavaScript?: "Watching" | "Building" | "Upload When Ready" | "Uploading" | undefined;
1264
+ TypeScript?: "Watching" | "Validating" | undefined;
1265
+ }> | undefined;
1266
+ }, string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
119
1267
  type: "Change";
120
1268
  } | {
121
1269
  type: "JavaScript Error";
122
- error: BuildError;
123
- time: Date;
124
- } | {
125
- type: "TypeScript Error";
126
- errors: Array<TypeScriptError>;
127
- time: Date;
128
1270
  } | {
129
1271
  type: "JavaScript Success";
1272
+ contents: [string, string];
130
1273
  time: Date;
1274
+ } | {
1275
+ type: "TypeScript Error";
131
1276
  } | {
132
1277
  type: "TypeScript Success";
133
- time: Date;
1278
+ } | {
1279
+ type: "Error";
1280
+ } | {
1281
+ type: "Success";
1282
+ } | {
1283
+ type: "Upload Complete";
1284
+ } | {
1285
+ type: "Upload Prepared";
1286
+ devVersion: IntegrationAndDevVersion;
1287
+ } | {
1288
+ type: "Initialized";
1289
+ config?: {
1290
+ token: string;
1291
+ developer_slug: string;
1292
+ integration_slug: string;
1293
+ integration_title: string;
1294
+ } | undefined;
1295
+ } | {
1296
+ type: "Initialization Error";
1297
+ error: InitialConfigError;
134
1298
  }, import("xstate").Values<{
135
- build: {
136
- src: "build";
1299
+ javascript: {
1300
+ src: "javascript";
1301
+ logic: import("xstate").StateMachine<import("./js-machine.js").Context, {
1302
+ type: "Build Contexts Prepared";
1303
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1304
+ } | {
1305
+ type: "Change";
1306
+ } | {
1307
+ type: "Result";
1308
+ contents: [string, string];
1309
+ error?: undefined;
1310
+ time: Date;
1311
+ } | {
1312
+ type: "Result";
1313
+ contents?: undefined;
1314
+ error: {
1315
+ errors: {
1316
+ text: string;
1317
+ location: {
1318
+ length: number;
1319
+ column: number;
1320
+ file: string;
1321
+ line: number;
1322
+ lineText: string;
1323
+ namespace: string;
1324
+ suggestion: string;
1325
+ };
1326
+ }[];
1327
+ warnings: {
1328
+ text: string;
1329
+ location: {
1330
+ length: number;
1331
+ column: number;
1332
+ file: string;
1333
+ line: number;
1334
+ lineText: string;
1335
+ namespace: string;
1336
+ suggestion: string;
1337
+ };
1338
+ }[];
1339
+ };
1340
+ time: Date;
1341
+ } | {
1342
+ type: "Log";
1343
+ message: string;
1344
+ }, {
1345
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
1346
+ write: boolean;
1347
+ }>, {
1348
+ type: "Build Contexts Prepared";
1349
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1350
+ } | {
1351
+ type: "Change";
1352
+ } | {
1353
+ type: "Result";
1354
+ contents: [string, string];
1355
+ error?: undefined;
1356
+ time: Date;
1357
+ } | {
1358
+ type: "Result";
1359
+ contents?: undefined;
1360
+ error: {
1361
+ errors: {
1362
+ text: string;
1363
+ location: {
1364
+ length: number;
1365
+ column: number;
1366
+ file: string;
1367
+ line: number;
1368
+ lineText: string;
1369
+ namespace: string;
1370
+ suggestion: string;
1371
+ };
1372
+ }[];
1373
+ warnings: {
1374
+ text: string;
1375
+ location: {
1376
+ length: number;
1377
+ column: number;
1378
+ file: string;
1379
+ line: number;
1380
+ lineText: string;
1381
+ namespace: string;
1382
+ suggestion: string;
1383
+ };
1384
+ }[];
1385
+ };
1386
+ time: Date;
1387
+ } | {
1388
+ type: "Log";
1389
+ message: string;
1390
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<{
1391
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1392
+ write: boolean;
1393
+ }>, {
1394
+ type: "Build Contexts Prepared";
1395
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1396
+ } | {
1397
+ type: "Change";
1398
+ } | {
1399
+ type: "Result";
1400
+ contents: [string, string];
1401
+ error?: undefined;
1402
+ time: Date;
1403
+ } | {
1404
+ type: "Result";
1405
+ contents?: undefined;
1406
+ error: {
1407
+ errors: {
1408
+ text: string;
1409
+ location: {
1410
+ length: number;
1411
+ column: number;
1412
+ file: string;
1413
+ line: number;
1414
+ lineText: string;
1415
+ namespace: string;
1416
+ suggestion: string;
1417
+ };
1418
+ }[];
1419
+ warnings: {
1420
+ text: string;
1421
+ location: {
1422
+ length: number;
1423
+ column: number;
1424
+ file: string;
1425
+ line: number;
1426
+ lineText: string;
1427
+ namespace: string;
1428
+ suggestion: string;
1429
+ };
1430
+ }[];
1431
+ };
1432
+ time: Date;
1433
+ } | {
1434
+ type: "Log";
1435
+ message: string;
1436
+ }, import("xstate").EventObject> | undefined;
1437
+ }, import("xstate").Values<{
1438
+ prepareBuildContext: {
1439
+ src: "prepareBuildContext";
1440
+ logic: import("xstate").CallbackActorLogic<{
1441
+ type: "Build Contexts Prepared";
1442
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1443
+ } | {
1444
+ type: "Change";
1445
+ } | {
1446
+ type: "Result";
1447
+ contents: [string, string];
1448
+ error?: undefined;
1449
+ time: Date;
1450
+ } | {
1451
+ type: "Result";
1452
+ contents?: undefined;
1453
+ error: {
1454
+ errors: {
1455
+ text: string;
1456
+ location: {
1457
+ length: number;
1458
+ column: number;
1459
+ file: string;
1460
+ line: number;
1461
+ lineText: string;
1462
+ namespace: string;
1463
+ suggestion: string;
1464
+ };
1465
+ }[];
1466
+ warnings: {
1467
+ text: string;
1468
+ location: {
1469
+ length: number;
1470
+ column: number;
1471
+ file: string;
1472
+ line: number;
1473
+ lineText: string;
1474
+ namespace: string;
1475
+ suggestion: string;
1476
+ };
1477
+ }[];
1478
+ };
1479
+ time: Date;
1480
+ } | {
1481
+ type: "Log";
1482
+ message: string;
1483
+ }, {
1484
+ write: boolean;
1485
+ }>;
1486
+ id: string | undefined;
1487
+ };
1488
+ build: {
1489
+ src: "build";
1490
+ logic: import("xstate").CallbackActorLogic<{
1491
+ type: "Build Contexts Prepared";
1492
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1493
+ } | {
1494
+ type: "Change";
1495
+ } | {
1496
+ type: "Result";
1497
+ contents: [string, string];
1498
+ error?: undefined;
1499
+ time: Date;
1500
+ } | {
1501
+ type: "Result";
1502
+ contents?: undefined;
1503
+ error: {
1504
+ errors: {
1505
+ text: string;
1506
+ location: {
1507
+ length: number;
1508
+ column: number;
1509
+ file: string;
1510
+ line: number;
1511
+ lineText: string;
1512
+ namespace: string;
1513
+ suggestion: string;
1514
+ };
1515
+ }[];
1516
+ warnings: {
1517
+ text: string;
1518
+ location: {
1519
+ length: number;
1520
+ column: number;
1521
+ file: string;
1522
+ line: number;
1523
+ lineText: string;
1524
+ namespace: string;
1525
+ suggestion: string;
1526
+ };
1527
+ }[];
1528
+ };
1529
+ time: Date;
1530
+ } | {
1531
+ type: "Log";
1532
+ message: string;
1533
+ }, {
1534
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1535
+ write: boolean;
1536
+ }>;
1537
+ id: string | undefined;
1538
+ };
1539
+ }>, import("xstate").Values<{
1540
+ clearError: {
1541
+ type: "clearError";
1542
+ params: import("xstate").NonReducibleUnknown;
1543
+ };
1544
+ raiseErrored: {
1545
+ type: "raiseErrored";
1546
+ params: import("xstate").NonReducibleUnknown;
1547
+ };
1548
+ raiseSuccess: {
1549
+ type: "raiseSuccess";
1550
+ params: {
1551
+ contents: [string, string];
1552
+ time: Date;
1553
+ };
1554
+ };
1555
+ setBuildContexts: {
1556
+ type: "setBuildContexts";
1557
+ params: {
1558
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1559
+ };
1560
+ };
1561
+ setError: {
1562
+ type: "setError";
1563
+ params: {
1564
+ error: {
1565
+ errors: {
1566
+ text: string;
1567
+ location: {
1568
+ length: number;
1569
+ column: number;
1570
+ file: string;
1571
+ line: number;
1572
+ lineText: string;
1573
+ namespace: string;
1574
+ suggestion: string;
1575
+ };
1576
+ }[];
1577
+ warnings: {
1578
+ text: string;
1579
+ location: {
1580
+ length: number;
1581
+ column: number;
1582
+ file: string;
1583
+ line: number;
1584
+ lineText: string;
1585
+ namespace: string;
1586
+ suggestion: string;
1587
+ };
1588
+ }[];
1589
+ };
1590
+ };
1591
+ };
1592
+ setTime: {
1593
+ type: "setTime";
1594
+ params: {
1595
+ time: Date;
1596
+ };
1597
+ };
1598
+ }>, {
1599
+ type: "has errors";
1600
+ params: {
1601
+ error?: {
1602
+ errors: {
1603
+ text: string;
1604
+ location: {
1605
+ length: number;
1606
+ column: number;
1607
+ file: string;
1608
+ line: number;
1609
+ lineText: string;
1610
+ namespace: string;
1611
+ suggestion: string;
1612
+ };
1613
+ }[];
1614
+ warnings: {
1615
+ text: string;
1616
+ location: {
1617
+ length: number;
1618
+ column: number;
1619
+ file: string;
1620
+ line: number;
1621
+ lineText: string;
1622
+ namespace: string;
1623
+ suggestion: string;
1624
+ };
1625
+ }[];
1626
+ } | undefined;
1627
+ };
1628
+ }, never, "Preparing" | {
1629
+ Watching?: "Success" | "Building" | "Errored" | undefined;
1630
+ }, string, {
1631
+ parentRef: import("./build-orchestrator.js").JavaScriptOrchestrator;
1632
+ write: boolean;
1633
+ }, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
1634
+ type: "Build Contexts Prepared";
1635
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1636
+ } | {
1637
+ type: "Change";
1638
+ } | {
1639
+ type: "Result";
1640
+ contents: [string, string];
1641
+ error?: undefined;
1642
+ time: Date;
1643
+ } | {
1644
+ type: "Result";
1645
+ contents?: undefined;
1646
+ error: {
1647
+ errors: {
1648
+ text: string;
1649
+ location: {
1650
+ length: number;
1651
+ column: number;
1652
+ file: string;
1653
+ line: number;
1654
+ lineText: string;
1655
+ namespace: string;
1656
+ suggestion: string;
1657
+ };
1658
+ }[];
1659
+ warnings: {
1660
+ text: string;
1661
+ location: {
1662
+ length: number;
1663
+ column: number;
1664
+ file: string;
1665
+ line: number;
1666
+ lineText: string;
1667
+ namespace: string;
1668
+ suggestion: string;
1669
+ };
1670
+ }[];
1671
+ };
1672
+ time: Date;
1673
+ } | {
1674
+ type: "Log";
1675
+ message: string;
1676
+ }, import("xstate").Values<{
1677
+ prepareBuildContext: {
1678
+ src: "prepareBuildContext";
1679
+ logic: import("xstate").CallbackActorLogic<{
1680
+ type: "Build Contexts Prepared";
1681
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1682
+ } | {
1683
+ type: "Change";
1684
+ } | {
1685
+ type: "Result";
1686
+ contents: [string, string];
1687
+ error?: undefined;
1688
+ time: Date;
1689
+ } | {
1690
+ type: "Result";
1691
+ contents?: undefined;
1692
+ error: {
1693
+ errors: {
1694
+ text: string;
1695
+ location: {
1696
+ length: number;
1697
+ column: number;
1698
+ file: string;
1699
+ line: number;
1700
+ lineText: string;
1701
+ namespace: string;
1702
+ suggestion: string;
1703
+ };
1704
+ }[];
1705
+ warnings: {
1706
+ text: string;
1707
+ location: {
1708
+ length: number;
1709
+ column: number;
1710
+ file: string;
1711
+ line: number;
1712
+ lineText: string;
1713
+ namespace: string;
1714
+ suggestion: string;
1715
+ };
1716
+ }[];
1717
+ };
1718
+ time: Date;
1719
+ } | {
1720
+ type: "Log";
1721
+ message: string;
1722
+ }, {
1723
+ write: boolean;
1724
+ }>;
1725
+ id: string | undefined;
1726
+ };
1727
+ build: {
1728
+ src: "build";
1729
+ logic: import("xstate").CallbackActorLogic<{
1730
+ type: "Build Contexts Prepared";
1731
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1732
+ } | {
1733
+ type: "Change";
1734
+ } | {
1735
+ type: "Result";
1736
+ contents: [string, string];
1737
+ error?: undefined;
1738
+ time: Date;
1739
+ } | {
1740
+ type: "Result";
1741
+ contents?: undefined;
1742
+ error: {
1743
+ errors: {
1744
+ text: string;
1745
+ location: {
1746
+ length: number;
1747
+ column: number;
1748
+ file: string;
1749
+ line: number;
1750
+ lineText: string;
1751
+ namespace: string;
1752
+ suggestion: string;
1753
+ };
1754
+ }[];
1755
+ warnings: {
1756
+ text: string;
1757
+ location: {
1758
+ length: number;
1759
+ column: number;
1760
+ file: string;
1761
+ line: number;
1762
+ lineText: string;
1763
+ namespace: string;
1764
+ suggestion: string;
1765
+ };
1766
+ }[];
1767
+ };
1768
+ time: Date;
1769
+ } | {
1770
+ type: "Log";
1771
+ message: string;
1772
+ }, {
1773
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1774
+ write: boolean;
1775
+ }>;
1776
+ id: string | undefined;
1777
+ };
1778
+ }>, import("xstate").Values<{
1779
+ clearError: {
1780
+ type: "clearError";
1781
+ params: import("xstate").NonReducibleUnknown;
1782
+ };
1783
+ raiseErrored: {
1784
+ type: "raiseErrored";
1785
+ params: import("xstate").NonReducibleUnknown;
1786
+ };
1787
+ raiseSuccess: {
1788
+ type: "raiseSuccess";
1789
+ params: {
1790
+ contents: [string, string];
1791
+ time: Date;
1792
+ };
1793
+ };
1794
+ setBuildContexts: {
1795
+ type: "setBuildContexts";
1796
+ params: {
1797
+ buildContexts: import("esbuild").BuildContext<import("esbuild").BuildOptions>[];
1798
+ };
1799
+ };
1800
+ setError: {
1801
+ type: "setError";
1802
+ params: {
1803
+ error: {
1804
+ errors: {
1805
+ text: string;
1806
+ location: {
1807
+ length: number;
1808
+ column: number;
1809
+ file: string;
1810
+ line: number;
1811
+ lineText: string;
1812
+ namespace: string;
1813
+ suggestion: string;
1814
+ };
1815
+ }[];
1816
+ warnings: {
1817
+ text: string;
1818
+ location: {
1819
+ length: number;
1820
+ column: number;
1821
+ file: string;
1822
+ line: number;
1823
+ lineText: string;
1824
+ namespace: string;
1825
+ suggestion: string;
1826
+ };
1827
+ }[];
1828
+ };
1829
+ };
1830
+ };
1831
+ setTime: {
1832
+ type: "setTime";
1833
+ params: {
1834
+ time: Date;
1835
+ };
1836
+ };
1837
+ }>, {
1838
+ type: "has errors";
1839
+ params: {
1840
+ error?: {
1841
+ errors: {
1842
+ text: string;
1843
+ location: {
1844
+ length: number;
1845
+ column: number;
1846
+ file: string;
1847
+ line: number;
1848
+ lineText: string;
1849
+ namespace: string;
1850
+ suggestion: string;
1851
+ };
1852
+ }[];
1853
+ warnings: {
1854
+ text: string;
1855
+ location: {
1856
+ length: number;
1857
+ column: number;
1858
+ file: string;
1859
+ line: number;
1860
+ lineText: string;
1861
+ namespace: string;
1862
+ suggestion: string;
1863
+ };
1864
+ }[];
1865
+ } | undefined;
1866
+ };
1867
+ }, never, string, import("xstate").EventObject>>;
1868
+ id: "javascript";
1869
+ };
1870
+ typescript: {
1871
+ src: "typescript";
1872
+ logic: import("xstate").StateMachine<import("./ts-machine.js").Context, {
1873
+ type: "Change";
1874
+ } | {
1875
+ type: "Result";
1876
+ errors?: {
1877
+ text: string;
1878
+ location?: {
1879
+ file: string;
1880
+ line: number;
1881
+ lineText: string;
1882
+ character: number;
1883
+ } | undefined;
1884
+ }[] | undefined;
1885
+ time: Date;
1886
+ }, {
1887
+ [x: string]: import("xstate").ActorRef<import("xstate").CallbackSnapshot<import("xstate").NonReducibleUnknown>, import("xstate").EventObject, import("xstate").EventObject> | undefined;
1888
+ }, {
1889
+ src: "validate";
1890
+ logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
1891
+ id: string | undefined;
1892
+ }, import("xstate").Values<{
1893
+ clearError: {
1894
+ type: "clearError";
1895
+ params: import("xstate").NonReducibleUnknown;
1896
+ };
1897
+ raiseErrored: {
1898
+ type: "raiseErrored";
1899
+ params: import("xstate").NonReducibleUnknown;
1900
+ };
1901
+ raiseSuccess: {
1902
+ type: "raiseSuccess";
1903
+ params: import("xstate").NonReducibleUnknown;
1904
+ };
1905
+ setTime: {
1906
+ type: "setTime";
1907
+ params: {
1908
+ time: Date;
1909
+ };
1910
+ };
1911
+ clearTime: {
1912
+ type: "clearTime";
1913
+ params: import("xstate").NonReducibleUnknown;
1914
+ };
1915
+ setErrors: {
1916
+ type: "setErrors";
1917
+ params: {
1918
+ errors?: {
1919
+ text: string;
1920
+ location?: {
1921
+ file: string;
1922
+ line: number;
1923
+ lineText: string;
1924
+ character: number;
1925
+ } | undefined;
1926
+ }[] | undefined;
1927
+ };
1928
+ };
1929
+ }>, {
1930
+ type: "has errors";
1931
+ params: {
1932
+ errors?: {
1933
+ text: string;
1934
+ location?: {
1935
+ file: string;
1936
+ line: number;
1937
+ lineText: string;
1938
+ character: number;
1939
+ } | undefined;
1940
+ }[] | undefined;
1941
+ };
1942
+ }, never, "Success" | "Errored" | "Validating", string, {
1943
+ parentRef: import("./build-orchestrator.js").TypeScriptOrchestrator;
1944
+ }, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, {
1945
+ type: "Change";
1946
+ } | {
1947
+ type: "Result";
1948
+ errors?: {
1949
+ text: string;
1950
+ location?: {
1951
+ file: string;
1952
+ line: number;
1953
+ lineText: string;
1954
+ character: number;
1955
+ } | undefined;
1956
+ }[] | undefined;
1957
+ time: Date;
1958
+ }, {
1959
+ src: "validate";
1960
+ logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
1961
+ id: string | undefined;
1962
+ }, import("xstate").Values<{
1963
+ clearError: {
1964
+ type: "clearError";
1965
+ params: import("xstate").NonReducibleUnknown;
1966
+ };
1967
+ raiseErrored: {
1968
+ type: "raiseErrored";
1969
+ params: import("xstate").NonReducibleUnknown;
1970
+ };
1971
+ raiseSuccess: {
1972
+ type: "raiseSuccess";
1973
+ params: import("xstate").NonReducibleUnknown;
1974
+ };
1975
+ setTime: {
1976
+ type: "setTime";
1977
+ params: {
1978
+ time: Date;
1979
+ };
1980
+ };
1981
+ clearTime: {
1982
+ type: "clearTime";
1983
+ params: import("xstate").NonReducibleUnknown;
1984
+ };
1985
+ setErrors: {
1986
+ type: "setErrors";
1987
+ params: {
1988
+ errors?: {
1989
+ text: string;
1990
+ location?: {
1991
+ file: string;
1992
+ line: number;
1993
+ lineText: string;
1994
+ character: number;
1995
+ } | undefined;
1996
+ }[] | undefined;
1997
+ };
1998
+ };
1999
+ }>, {
2000
+ type: "has errors";
2001
+ params: {
2002
+ errors?: {
2003
+ text: string;
2004
+ location?: {
2005
+ file: string;
2006
+ line: number;
2007
+ lineText: string;
2008
+ character: number;
2009
+ } | undefined;
2010
+ }[] | undefined;
2011
+ };
2012
+ }, never, string, import("xstate").EventObject>>;
2013
+ id: "typescript";
2014
+ };
2015
+ loadConfig: {
2016
+ src: "loadConfig";
137
2017
  logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
138
2018
  id: string | undefined;
139
2019
  };
140
- prepareBuildContext: {
141
- src: "prepareBuildContext";
2020
+ prepareUpload: {
2021
+ src: "prepareUpload";
142
2022
  logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
143
2023
  id: string | undefined;
144
2024
  };
145
2025
  upload: {
146
2026
  src: "upload";
147
- logic: import("xstate").PromiseActorLogic<void, import("xstate").NonReducibleUnknown>;
148
- id: string | undefined;
149
- };
150
- validateTypeScript: {
151
- src: "validateTypeScript";
152
- logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown>;
2027
+ logic: import("xstate").CallbackActorLogic<UploadEvent, {
2028
+ devVersion: IntegrationAndDevVersion;
2029
+ config: InitialConfig;
2030
+ contents: [string, string];
2031
+ }>;
153
2032
  id: string | undefined;
154
2033
  };
155
2034
  watch: {
@@ -158,49 +2037,47 @@ export declare const devMachine: import("xstate").StateMachine<Context, {
158
2037
  id: string | undefined;
159
2038
  };
160
2039
  }>, import("xstate").Values<{
161
- clearLastJavaScriptError: {
162
- type: "clearLastJavaScriptError";
163
- params: import("xstate").NonReducibleUnknown;
164
- };
165
- clearLastTypeScriptError: {
166
- type: "clearLastTypeScriptError";
167
- params: import("xstate").NonReducibleUnknown;
168
- };
169
- setBuildContexts: {
170
- type: "setBuildContexts";
2040
+ setSuccess: {
2041
+ type: "setSuccess";
171
2042
  params: {
172
- buildContexts: Array<esbuild.BuildContext>;
2043
+ contents: [string, string];
2044
+ time: Date;
173
2045
  };
174
2046
  };
175
- setLastJavaScriptError: {
176
- type: "setLastJavaScriptError";
2047
+ upload: {
2048
+ type: "upload";
2049
+ params: [string, string];
2050
+ };
2051
+ sendChange: {
2052
+ type: "sendChange";
2053
+ params: import("xstate").NonReducibleUnknown;
2054
+ };
2055
+ setConfig: {
2056
+ type: "setConfig";
177
2057
  params: {
178
- error: BuildError;
179
- time: Date;
2058
+ config?: {
2059
+ token: string;
2060
+ developer_slug: string;
2061
+ integration_slug: string;
2062
+ integration_title: string;
2063
+ } | undefined;
180
2064
  };
181
2065
  };
182
- setLastTypeScriptError: {
183
- type: "setLastTypeScriptError";
2066
+ setConfigError: {
2067
+ type: "setConfigError";
184
2068
  params: {
185
- errors: Array<TypeScriptError>;
186
- time: Date;
2069
+ error: InitialConfigError;
187
2070
  };
188
2071
  };
189
- setLastSuccess: {
190
- type: "setLastSuccess";
2072
+ setDevVersion: {
2073
+ type: "setDevVersion";
191
2074
  params: {
192
- time: Date;
2075
+ devVersion: IntegrationAndDevVersion;
193
2076
  };
194
2077
  };
195
- }>, import("xstate").Values<{
196
- "no TypeScript error": {
197
- type: "no TypeScript error";
198
- params: unknown;
199
- };
200
- "no JavaScript error": {
201
- type: "no JavaScript error";
202
- params: unknown;
203
- };
204
- }>, never, string, import("xstate").EventObject>>;
2078
+ }>, {
2079
+ type: "have dev version";
2080
+ params: unknown;
2081
+ }, never, string, import("xstate").EventObject>>;
205
2082
  export {};
206
2083
  //# sourceMappingURL=dev-machine.d.ts.map