@innovatorved/code-lab 0.1.13 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * Zod Schemas and Inferred TypeScript Types for code-lab v0.1.10
3
+ * Zod Schemas and Inferred TypeScript Types for code-lab v0.2.0
4
4
  */
5
5
  export declare const GuidedStepSchema: z.ZodObject<{
6
6
  id: z.ZodString;
@@ -34,22 +34,24 @@ export declare const GuidedStepSchema: z.ZodObject<{
34
34
  testNames?: string[];
35
35
  }>;
36
36
  export type GuidedStep = z.infer<typeof GuidedStepSchema>;
37
+ export declare const LanguageIdSchema: z.ZodEnum<["js", "ts", "cpp"]>;
38
+ export type LanguageId = z.infer<typeof LanguageIdSchema>;
37
39
  export declare const LanguageBundleSchema: z.ZodObject<{
38
- language: z.ZodDefault<z.ZodEnum<["js", "ts"]>>;
40
+ language: z.ZodDefault<z.ZodEnum<["js", "ts", "cpp"]>>;
39
41
  files: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
40
42
  starterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
41
43
  solutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
42
44
  entry: z.ZodOptional<z.ZodString>;
43
45
  testEntry: z.ZodOptional<z.ZodString>;
44
46
  }, "strip", z.ZodTypeAny, {
45
- language?: "js" | "ts";
47
+ language?: "js" | "ts" | "cpp";
46
48
  files?: Record<string, string>;
47
49
  starterFiles?: Record<string, string>;
48
50
  solutionFiles?: Record<string, string>;
49
51
  entry?: string;
50
52
  testEntry?: string;
51
53
  }, {
52
- language?: "js" | "ts";
54
+ language?: "js" | "ts" | "cpp";
53
55
  files?: Record<string, string>;
54
56
  starterFiles?: Record<string, string>;
55
57
  solutionFiles?: Record<string, string>;
@@ -91,13 +93,16 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
91
93
  }>, "many">>;
92
94
  stepIndex: z.ZodDefault<z.ZodNumber>;
93
95
  mode: z.ZodDefault<z.ZodEnum<["guided", "sandbox"]>>;
94
- language: z.ZodOptional<z.ZodEnum<["js", "ts"]>>;
95
- lang: z.ZodOptional<z.ZodEnum<["js", "ts"]>>;
96
+ language: z.ZodOptional<z.ZodEnum<["js", "ts", "cpp"]>>;
97
+ lang: z.ZodOptional<z.ZodEnum<["js", "ts", "cpp"]>>;
96
98
  starterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
97
99
  solutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
98
100
  tsStarterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
99
101
  tsSolutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
100
102
  tsFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
103
+ cppStarterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
104
+ cppSolutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
105
+ cppFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
101
106
  summary: z.ZodOptional<z.ZodString>;
102
107
  onStepComplete: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
103
108
  id: z.ZodString;
@@ -133,7 +138,7 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
133
138
  onLabComplete: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
134
139
  }, "strip", z.ZodTypeAny, {
135
140
  mode?: "guided" | "sandbox";
136
- language?: "js" | "ts";
141
+ language?: "js" | "ts" | "cpp";
137
142
  starterFiles?: Record<string, string>;
138
143
  solutionFiles?: Record<string, string>;
139
144
  steps?: {
@@ -148,10 +153,13 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
148
153
  testNames?: string[];
149
154
  }[];
150
155
  stepIndex?: number;
151
- lang?: "js" | "ts";
156
+ lang?: "js" | "ts" | "cpp";
152
157
  tsStarterFiles?: Record<string, string>;
153
158
  tsSolutionFiles?: Record<string, string>;
154
159
  tsFiles?: Record<string, string>;
160
+ cppStarterFiles?: Record<string, string>;
161
+ cppSolutionFiles?: Record<string, string>;
162
+ cppFiles?: Record<string, string>;
155
163
  summary?: string;
156
164
  onStepComplete?: (args_0: {
157
165
  symbol?: string;
@@ -167,7 +175,7 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
167
175
  onLabComplete?: (args_0: string, ...args: unknown[]) => void;
168
176
  }, {
169
177
  mode?: "guided" | "sandbox";
170
- language?: "js" | "ts";
178
+ language?: "js" | "ts" | "cpp";
171
179
  starterFiles?: Record<string, string>;
172
180
  solutionFiles?: Record<string, string>;
173
181
  steps?: {
@@ -182,10 +190,13 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
182
190
  testNames?: string[];
183
191
  }[];
184
192
  stepIndex?: number;
185
- lang?: "js" | "ts";
193
+ lang?: "js" | "ts" | "cpp";
186
194
  tsStarterFiles?: Record<string, string>;
187
195
  tsSolutionFiles?: Record<string, string>;
188
196
  tsFiles?: Record<string, string>;
197
+ cppStarterFiles?: Record<string, string>;
198
+ cppSolutionFiles?: Record<string, string>;
199
+ cppFiles?: Record<string, string>;
189
200
  summary?: string;
190
201
  onStepComplete?: (args_0: {
191
202
  symbol?: string;
@@ -201,6 +212,85 @@ export declare const GuidedLabExtensionOptionsSchema: z.ZodObject<{
201
212
  onLabComplete?: (args_0: string, ...args: unknown[]) => void;
202
213
  }>;
203
214
  export type GuidedLabExtensionOptions = z.infer<typeof GuidedLabExtensionOptionsSchema>;
215
+ export declare const CppToolchainProgressSchema: z.ZodObject<{
216
+ stage: z.ZodEnum<["downloading", "caching", "extracting", "compiling", "linking", "ready"]>;
217
+ loadedBytes: z.ZodOptional<z.ZodNumber>;
218
+ totalBytes: z.ZodOptional<z.ZodNumber>;
219
+ percent: z.ZodOptional<z.ZodNumber>;
220
+ message: z.ZodOptional<z.ZodString>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ message?: string;
223
+ stage?: "downloading" | "caching" | "extracting" | "compiling" | "linking" | "ready";
224
+ loadedBytes?: number;
225
+ totalBytes?: number;
226
+ percent?: number;
227
+ }, {
228
+ message?: string;
229
+ stage?: "downloading" | "caching" | "extracting" | "compiling" | "linking" | "ready";
230
+ loadedBytes?: number;
231
+ totalBytes?: number;
232
+ percent?: number;
233
+ }>;
234
+ export type CppToolchainProgress = z.infer<typeof CppToolchainProgressSchema>;
235
+ export declare const CppExtensionOptionsSchema: z.ZodObject<{
236
+ toolchainUrl: z.ZodOptional<z.ZodString>;
237
+ clangWasmUrl: z.ZodOptional<z.ZodString>;
238
+ clangUrl: z.ZodOptional<z.ZodString>;
239
+ lldWasmUrl: z.ZodOptional<z.ZodString>;
240
+ lldUrl: z.ZodOptional<z.ZodString>;
241
+ sysrootTarUrl: z.ZodOptional<z.ZodString>;
242
+ sysrootUrl: z.ZodOptional<z.ZodString>;
243
+ cacheInIndexedDB: z.ZodDefault<z.ZodBoolean>;
244
+ preload: z.ZodDefault<z.ZodBoolean>;
245
+ std: z.ZodDefault<z.ZodEnum<["c++17", "c++20", "c++23"]>>;
246
+ optLevel: z.ZodDefault<z.ZodEnum<["-O0", "-O1", "-O2", "-O3"]>>;
247
+ flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
248
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
249
+ extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
250
+ files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
251
+ starterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
252
+ solutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
253
+ onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
254
+ }, "strip", z.ZodTypeAny, {
255
+ files?: Record<string, string>;
256
+ starterFiles?: Record<string, string>;
257
+ solutionFiles?: Record<string, string>;
258
+ toolchainUrl?: string;
259
+ clangWasmUrl?: string;
260
+ clangUrl?: string;
261
+ lldWasmUrl?: string;
262
+ lldUrl?: string;
263
+ sysrootTarUrl?: string;
264
+ sysrootUrl?: string;
265
+ cacheInIndexedDB?: boolean;
266
+ preload?: boolean;
267
+ std?: "c++17" | "c++20" | "c++23";
268
+ optLevel?: "-O0" | "-O1" | "-O2" | "-O3";
269
+ flags?: string[];
270
+ headers?: Record<string, string>;
271
+ extraHeaders?: Record<string, string>;
272
+ onProgress?: (args_0: any, ...args: unknown[]) => void;
273
+ }, {
274
+ files?: Record<string, string>;
275
+ starterFiles?: Record<string, string>;
276
+ solutionFiles?: Record<string, string>;
277
+ toolchainUrl?: string;
278
+ clangWasmUrl?: string;
279
+ clangUrl?: string;
280
+ lldWasmUrl?: string;
281
+ lldUrl?: string;
282
+ sysrootTarUrl?: string;
283
+ sysrootUrl?: string;
284
+ cacheInIndexedDB?: boolean;
285
+ preload?: boolean;
286
+ std?: "c++17" | "c++20" | "c++23";
287
+ optLevel?: "-O0" | "-O1" | "-O2" | "-O3";
288
+ flags?: string[];
289
+ headers?: Record<string, string>;
290
+ extraHeaders?: Record<string, string>;
291
+ onProgress?: (args_0: any, ...args: unknown[]) => void;
292
+ }>;
293
+ export type CppExtensionOptions = z.infer<typeof CppExtensionOptionsSchema>;
204
294
  export declare const CloneProgressPhaseSchema: z.ZodEnum<["connecting", "metadata", "downloading", "mounting", "ready", "error"]>;
205
295
  export type CloneProgressPhase = z.infer<typeof CloneProgressPhaseSchema>;
206
296
  export declare const CloneProgressEventSchema: z.ZodObject<{
@@ -210,12 +300,12 @@ export declare const CloneProgressEventSchema: z.ZodObject<{
210
300
  total: z.ZodOptional<z.ZodNumber>;
211
301
  }, "strip", z.ZodTypeAny, {
212
302
  message?: string;
213
- phase?: "error" | "connecting" | "metadata" | "downloading" | "mounting" | "ready";
303
+ phase?: "error" | "downloading" | "ready" | "connecting" | "metadata" | "mounting";
214
304
  loaded?: number;
215
305
  total?: number;
216
306
  }, {
217
307
  message?: string;
218
- phase?: "error" | "connecting" | "metadata" | "downloading" | "mounting" | "ready";
308
+ phase?: "error" | "downloading" | "ready" | "connecting" | "metadata" | "mounting";
219
309
  loaded?: number;
220
310
  total?: number;
221
311
  }>;
@@ -232,6 +322,7 @@ export declare const GitHubCloneOptionsSchema: z.ZodObject<{
232
322
  onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
233
323
  fetchImpl: z.ZodOptional<z.ZodAny>;
234
324
  }, "strip", z.ZodTypeAny, {
325
+ onProgress?: (args_0: any, ...args: unknown[]) => void;
235
326
  intoRoot?: boolean;
236
327
  targetDir?: string;
237
328
  branch?: string;
@@ -240,9 +331,9 @@ export declare const GitHubCloneOptionsSchema: z.ZodObject<{
240
331
  maxFileSize?: number;
241
332
  concurrency?: number;
242
333
  clearExisting?: boolean;
243
- onProgress?: (args_0: any, ...args: unknown[]) => void;
244
334
  fetchImpl?: any;
245
335
  }, {
336
+ onProgress?: (args_0: any, ...args: unknown[]) => void;
246
337
  intoRoot?: boolean;
247
338
  targetDir?: string;
248
339
  branch?: string;
@@ -251,7 +342,6 @@ export declare const GitHubCloneOptionsSchema: z.ZodObject<{
251
342
  maxFileSize?: number;
252
343
  concurrency?: number;
253
344
  clearExisting?: boolean;
254
- onProgress?: (args_0: any, ...args: unknown[]) => void;
255
345
  fetchImpl?: any;
256
346
  }>;
257
347
  export type GitHubCloneOptions = z.infer<typeof GitHubCloneOptionsSchema>;
@@ -330,12 +420,12 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
330
420
  openTabs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
331
421
  activeFile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
422
  mode: z.ZodOptional<z.ZodEnum<["guided", "sandbox"]>>;
333
- lang: z.ZodOptional<z.ZodEnum<["js", "ts"]>>;
423
+ lang: z.ZodOptional<z.ZodEnum<["js", "ts", "cpp"]>>;
334
424
  labId: z.ZodOptional<z.ZodString>;
335
425
  }, "strip", z.ZodTypeAny, {
336
426
  mode?: "guided" | "sandbox";
337
427
  files?: Record<string, string>;
338
- lang?: "js" | "ts";
428
+ lang?: "js" | "ts" | "cpp";
339
429
  version?: number;
340
430
  timestamp?: number;
341
431
  openTabs?: string[];
@@ -344,7 +434,7 @@ export declare const WorkspaceSnapshotSchema: z.ZodObject<{
344
434
  }, {
345
435
  mode?: "guided" | "sandbox";
346
436
  files?: Record<string, string>;
347
- lang?: "js" | "ts";
437
+ lang?: "js" | "ts" | "cpp";
348
438
  version?: number;
349
439
  timestamp?: number;
350
440
  openTabs?: string[];
@@ -414,10 +504,13 @@ export declare const WorkbenchOptionsSchema: z.ZodObject<{
414
504
  tsFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
415
505
  tsStarterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
416
506
  tsSolutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
507
+ cppFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
508
+ cppStarterFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
509
+ cppSolutionFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
417
510
  guided: z.ZodOptional<z.ZodAny>;
418
511
  mode: z.ZodOptional<z.ZodEnum<["guided", "sandbox"]>>;
419
- language: z.ZodOptional<z.ZodEnum<["js", "ts"]>>;
420
- lang: z.ZodOptional<z.ZodEnum<["js", "ts"]>>;
512
+ language: z.ZodOptional<z.ZodEnum<["js", "ts", "cpp"]>>;
513
+ lang: z.ZodOptional<z.ZodEnum<["js", "ts", "cpp"]>>;
421
514
  stepIndex: z.ZodOptional<z.ZodNumber>;
422
515
  onStepComplete: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodNumber], z.ZodUnknown>, z.ZodVoid>>;
423
516
  onLabComplete: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
@@ -425,7 +518,7 @@ export declare const WorkbenchOptionsSchema: z.ZodObject<{
425
518
  mode?: "guided" | "sandbox";
426
519
  id?: string;
427
520
  title?: string;
428
- language?: "js" | "ts";
521
+ language?: "js" | "ts" | "cpp";
429
522
  files?: Record<string, string>;
430
523
  starterFiles?: Record<string, string>;
431
524
  solutionFiles?: Record<string, string>;
@@ -444,10 +537,13 @@ export declare const WorkbenchOptionsSchema: z.ZodObject<{
444
537
  }[];
445
538
  stepIndex?: number;
446
539
  guided?: any;
447
- lang?: "js" | "ts";
540
+ lang?: "js" | "ts" | "cpp";
448
541
  tsStarterFiles?: Record<string, string>;
449
542
  tsSolutionFiles?: Record<string, string>;
450
543
  tsFiles?: Record<string, string>;
544
+ cppStarterFiles?: Record<string, string>;
545
+ cppSolutionFiles?: Record<string, string>;
546
+ cppFiles?: Record<string, string>;
451
547
  summary?: string;
452
548
  onStepComplete?: (args_0: any, args_1: number, ...args: unknown[]) => void;
453
549
  onLabComplete?: (args_0: string, ...args: unknown[]) => void;
@@ -474,7 +570,7 @@ export declare const WorkbenchOptionsSchema: z.ZodObject<{
474
570
  mode?: "guided" | "sandbox";
475
571
  id?: string;
476
572
  title?: string;
477
- language?: "js" | "ts";
573
+ language?: "js" | "ts" | "cpp";
478
574
  files?: Record<string, string>;
479
575
  starterFiles?: Record<string, string>;
480
576
  solutionFiles?: Record<string, string>;
@@ -493,10 +589,13 @@ export declare const WorkbenchOptionsSchema: z.ZodObject<{
493
589
  }[];
494
590
  stepIndex?: number;
495
591
  guided?: any;
496
- lang?: "js" | "ts";
592
+ lang?: "js" | "ts" | "cpp";
497
593
  tsStarterFiles?: Record<string, string>;
498
594
  tsSolutionFiles?: Record<string, string>;
499
595
  tsFiles?: Record<string, string>;
596
+ cppStarterFiles?: Record<string, string>;
597
+ cppSolutionFiles?: Record<string, string>;
598
+ cppFiles?: Record<string, string>;
500
599
  summary?: string;
501
600
  onStepComplete?: (args_0: any, args_1: number, ...args: unknown[]) => void;
502
601
  onLabComplete?: (args_0: string, ...args: unknown[]) => void;
@@ -4058,8 +4058,9 @@ var GuidedStepSchema = external_exports.object({
4058
4058
  hint: external_exports.string().optional(),
4059
4059
  testNames: external_exports.array(external_exports.string()).optional()
4060
4060
  });
4061
+ var LanguageIdSchema = external_exports.enum(["js", "ts", "cpp"]);
4061
4062
  var LanguageBundleSchema = external_exports.object({
4062
- language: external_exports.enum(["js", "ts"]).default("js"),
4063
+ language: LanguageIdSchema.default("js"),
4063
4064
  files: external_exports.record(external_exports.string()).default({}),
4064
4065
  starterFiles: external_exports.record(external_exports.string()).optional(),
4065
4066
  solutionFiles: external_exports.record(external_exports.string()).optional(),
@@ -4070,17 +4071,47 @@ var GuidedLabExtensionOptionsSchema = external_exports.object({
4070
4071
  steps: external_exports.array(GuidedStepSchema).default([]),
4071
4072
  stepIndex: external_exports.number().int().nonnegative().default(0),
4072
4073
  mode: external_exports.enum(["guided", "sandbox"]).default("guided"),
4073
- language: external_exports.enum(["js", "ts"]).optional(),
4074
- lang: external_exports.enum(["js", "ts"]).optional(),
4074
+ language: LanguageIdSchema.optional(),
4075
+ lang: LanguageIdSchema.optional(),
4075
4076
  starterFiles: external_exports.record(external_exports.string()).optional(),
4076
4077
  solutionFiles: external_exports.record(external_exports.string()).optional(),
4077
4078
  tsStarterFiles: external_exports.record(external_exports.string()).optional(),
4078
4079
  tsSolutionFiles: external_exports.record(external_exports.string()).optional(),
4079
4080
  tsFiles: external_exports.record(external_exports.string()).optional(),
4081
+ cppStarterFiles: external_exports.record(external_exports.string()).optional(),
4082
+ cppSolutionFiles: external_exports.record(external_exports.string()).optional(),
4083
+ cppFiles: external_exports.record(external_exports.string()).optional(),
4080
4084
  summary: external_exports.string().optional(),
4081
4085
  onStepComplete: external_exports.function().args(GuidedStepSchema, external_exports.number()).returns(external_exports.void()).optional(),
4082
4086
  onLabComplete: external_exports.function().args(external_exports.string()).returns(external_exports.void()).optional()
4083
4087
  });
4088
+ var CppToolchainProgressSchema = external_exports.object({
4089
+ stage: external_exports.enum(["downloading", "caching", "extracting", "compiling", "linking", "ready"]),
4090
+ loadedBytes: external_exports.number().optional(),
4091
+ totalBytes: external_exports.number().optional(),
4092
+ percent: external_exports.number().optional(),
4093
+ message: external_exports.string().optional()
4094
+ });
4095
+ var CppExtensionOptionsSchema = external_exports.object({
4096
+ toolchainUrl: external_exports.string().optional(),
4097
+ clangWasmUrl: external_exports.string().optional(),
4098
+ clangUrl: external_exports.string().optional(),
4099
+ lldWasmUrl: external_exports.string().optional(),
4100
+ lldUrl: external_exports.string().optional(),
4101
+ sysrootTarUrl: external_exports.string().optional(),
4102
+ sysrootUrl: external_exports.string().optional(),
4103
+ cacheInIndexedDB: external_exports.boolean().default(true),
4104
+ preload: external_exports.boolean().default(false),
4105
+ std: external_exports.enum(["c++17", "c++20", "c++23"]).default("c++20"),
4106
+ optLevel: external_exports.enum(["-O0", "-O1", "-O2", "-O3"]).default("-O2"),
4107
+ flags: external_exports.array(external_exports.string()).default(["-O2", "-Wall", "-Wextra"]),
4108
+ headers: external_exports.record(external_exports.string()).optional(),
4109
+ extraHeaders: external_exports.record(external_exports.string()).optional(),
4110
+ files: external_exports.record(external_exports.string()).optional(),
4111
+ starterFiles: external_exports.record(external_exports.string()).optional(),
4112
+ solutionFiles: external_exports.record(external_exports.string()).optional(),
4113
+ onProgress: external_exports.function().args(external_exports.any()).returns(external_exports.void()).optional()
4114
+ });
4084
4115
  var CloneProgressPhaseSchema = external_exports.enum([
4085
4116
  "connecting",
4086
4117
  "metadata",
@@ -4137,7 +4168,7 @@ var WorkspaceSnapshotSchema = external_exports.object({
4137
4168
  openTabs: external_exports.array(external_exports.string()).default([]),
4138
4169
  activeFile: external_exports.string().nullable().optional(),
4139
4170
  mode: external_exports.enum(["guided", "sandbox"]).optional(),
4140
- lang: external_exports.enum(["js", "ts"]).optional(),
4171
+ lang: LanguageIdSchema.optional(),
4141
4172
  labId: external_exports.string().optional()
4142
4173
  });
4143
4174
  var WorkbenchOptionsSchema = external_exports.object({
@@ -4173,10 +4204,13 @@ var WorkbenchOptionsSchema = external_exports.object({
4173
4204
  tsFiles: external_exports.record(external_exports.string()).optional(),
4174
4205
  tsStarterFiles: external_exports.record(external_exports.string()).optional(),
4175
4206
  tsSolutionFiles: external_exports.record(external_exports.string()).optional(),
4207
+ cppFiles: external_exports.record(external_exports.string()).optional(),
4208
+ cppStarterFiles: external_exports.record(external_exports.string()).optional(),
4209
+ cppSolutionFiles: external_exports.record(external_exports.string()).optional(),
4176
4210
  guided: external_exports.any().optional(),
4177
4211
  mode: external_exports.enum(["guided", "sandbox"]).optional(),
4178
- language: external_exports.enum(["js", "ts"]).optional(),
4179
- lang: external_exports.enum(["js", "ts"]).optional(),
4212
+ language: LanguageIdSchema.optional(),
4213
+ lang: LanguageIdSchema.optional(),
4180
4214
  stepIndex: external_exports.number().int().optional(),
4181
4215
  onStepComplete: external_exports.function().args(external_exports.any(), external_exports.number()).returns(external_exports.void()).optional(),
4182
4216
  onLabComplete: external_exports.function().args(external_exports.string()).returns(external_exports.void()).optional()
@@ -4247,6 +4281,8 @@ var GitStateSummarySchema = external_exports.object({
4247
4281
  export {
4248
4282
  CloneProgressEventSchema,
4249
4283
  CloneProgressPhaseSchema,
4284
+ CppExtensionOptionsSchema,
4285
+ CppToolchainProgressSchema,
4250
4286
  DiagnosticItemSchema,
4251
4287
  DiagnosticSeveritySchema,
4252
4288
  GitFileChangeTypeSchema,
@@ -4256,6 +4292,7 @@ export {
4256
4292
  GuidedLabExtensionOptionsSchema,
4257
4293
  GuidedStepSchema,
4258
4294
  LanguageBundleSchema,
4295
+ LanguageIdSchema,
4259
4296
  RuntimeExecuteOptionsSchema,
4260
4297
  SearchOptionsSchema,
4261
4298
  StoredProjectSchema,
package/dist/schemas.js CHANGED
@@ -21,6 +21,8 @@ var schemas_exports = {};
21
21
  __export(schemas_exports, {
22
22
  CloneProgressEventSchema: () => CloneProgressEventSchema,
23
23
  CloneProgressPhaseSchema: () => CloneProgressPhaseSchema,
24
+ CppExtensionOptionsSchema: () => CppExtensionOptionsSchema,
25
+ CppToolchainProgressSchema: () => CppToolchainProgressSchema,
24
26
  DiagnosticItemSchema: () => DiagnosticItemSchema,
25
27
  DiagnosticSeveritySchema: () => DiagnosticSeveritySchema,
26
28
  GitFileChangeTypeSchema: () => GitFileChangeTypeSchema,
@@ -30,6 +32,7 @@ __export(schemas_exports, {
30
32
  GuidedLabExtensionOptionsSchema: () => GuidedLabExtensionOptionsSchema,
31
33
  GuidedStepSchema: () => GuidedStepSchema,
32
34
  LanguageBundleSchema: () => LanguageBundleSchema,
35
+ LanguageIdSchema: () => LanguageIdSchema,
33
36
  RuntimeExecuteOptionsSchema: () => RuntimeExecuteOptionsSchema,
34
37
  SearchOptionsSchema: () => SearchOptionsSchema,
35
38
  StoredProjectSchema: () => StoredProjectSchema,
@@ -4092,8 +4095,9 @@ var GuidedStepSchema = external_exports.object({
4092
4095
  hint: external_exports.string().optional(),
4093
4096
  testNames: external_exports.array(external_exports.string()).optional()
4094
4097
  });
4098
+ var LanguageIdSchema = external_exports.enum(["js", "ts", "cpp"]);
4095
4099
  var LanguageBundleSchema = external_exports.object({
4096
- language: external_exports.enum(["js", "ts"]).default("js"),
4100
+ language: LanguageIdSchema.default("js"),
4097
4101
  files: external_exports.record(external_exports.string()).default({}),
4098
4102
  starterFiles: external_exports.record(external_exports.string()).optional(),
4099
4103
  solutionFiles: external_exports.record(external_exports.string()).optional(),
@@ -4104,17 +4108,47 @@ var GuidedLabExtensionOptionsSchema = external_exports.object({
4104
4108
  steps: external_exports.array(GuidedStepSchema).default([]),
4105
4109
  stepIndex: external_exports.number().int().nonnegative().default(0),
4106
4110
  mode: external_exports.enum(["guided", "sandbox"]).default("guided"),
4107
- language: external_exports.enum(["js", "ts"]).optional(),
4108
- lang: external_exports.enum(["js", "ts"]).optional(),
4111
+ language: LanguageIdSchema.optional(),
4112
+ lang: LanguageIdSchema.optional(),
4109
4113
  starterFiles: external_exports.record(external_exports.string()).optional(),
4110
4114
  solutionFiles: external_exports.record(external_exports.string()).optional(),
4111
4115
  tsStarterFiles: external_exports.record(external_exports.string()).optional(),
4112
4116
  tsSolutionFiles: external_exports.record(external_exports.string()).optional(),
4113
4117
  tsFiles: external_exports.record(external_exports.string()).optional(),
4118
+ cppStarterFiles: external_exports.record(external_exports.string()).optional(),
4119
+ cppSolutionFiles: external_exports.record(external_exports.string()).optional(),
4120
+ cppFiles: external_exports.record(external_exports.string()).optional(),
4114
4121
  summary: external_exports.string().optional(),
4115
4122
  onStepComplete: external_exports.function().args(GuidedStepSchema, external_exports.number()).returns(external_exports.void()).optional(),
4116
4123
  onLabComplete: external_exports.function().args(external_exports.string()).returns(external_exports.void()).optional()
4117
4124
  });
4125
+ var CppToolchainProgressSchema = external_exports.object({
4126
+ stage: external_exports.enum(["downloading", "caching", "extracting", "compiling", "linking", "ready"]),
4127
+ loadedBytes: external_exports.number().optional(),
4128
+ totalBytes: external_exports.number().optional(),
4129
+ percent: external_exports.number().optional(),
4130
+ message: external_exports.string().optional()
4131
+ });
4132
+ var CppExtensionOptionsSchema = external_exports.object({
4133
+ toolchainUrl: external_exports.string().optional(),
4134
+ clangWasmUrl: external_exports.string().optional(),
4135
+ clangUrl: external_exports.string().optional(),
4136
+ lldWasmUrl: external_exports.string().optional(),
4137
+ lldUrl: external_exports.string().optional(),
4138
+ sysrootTarUrl: external_exports.string().optional(),
4139
+ sysrootUrl: external_exports.string().optional(),
4140
+ cacheInIndexedDB: external_exports.boolean().default(true),
4141
+ preload: external_exports.boolean().default(false),
4142
+ std: external_exports.enum(["c++17", "c++20", "c++23"]).default("c++20"),
4143
+ optLevel: external_exports.enum(["-O0", "-O1", "-O2", "-O3"]).default("-O2"),
4144
+ flags: external_exports.array(external_exports.string()).default(["-O2", "-Wall", "-Wextra"]),
4145
+ headers: external_exports.record(external_exports.string()).optional(),
4146
+ extraHeaders: external_exports.record(external_exports.string()).optional(),
4147
+ files: external_exports.record(external_exports.string()).optional(),
4148
+ starterFiles: external_exports.record(external_exports.string()).optional(),
4149
+ solutionFiles: external_exports.record(external_exports.string()).optional(),
4150
+ onProgress: external_exports.function().args(external_exports.any()).returns(external_exports.void()).optional()
4151
+ });
4118
4152
  var CloneProgressPhaseSchema = external_exports.enum([
4119
4153
  "connecting",
4120
4154
  "metadata",
@@ -4171,7 +4205,7 @@ var WorkspaceSnapshotSchema = external_exports.object({
4171
4205
  openTabs: external_exports.array(external_exports.string()).default([]),
4172
4206
  activeFile: external_exports.string().nullable().optional(),
4173
4207
  mode: external_exports.enum(["guided", "sandbox"]).optional(),
4174
- lang: external_exports.enum(["js", "ts"]).optional(),
4208
+ lang: LanguageIdSchema.optional(),
4175
4209
  labId: external_exports.string().optional()
4176
4210
  });
4177
4211
  var WorkbenchOptionsSchema = external_exports.object({
@@ -4207,10 +4241,13 @@ var WorkbenchOptionsSchema = external_exports.object({
4207
4241
  tsFiles: external_exports.record(external_exports.string()).optional(),
4208
4242
  tsStarterFiles: external_exports.record(external_exports.string()).optional(),
4209
4243
  tsSolutionFiles: external_exports.record(external_exports.string()).optional(),
4244
+ cppFiles: external_exports.record(external_exports.string()).optional(),
4245
+ cppStarterFiles: external_exports.record(external_exports.string()).optional(),
4246
+ cppSolutionFiles: external_exports.record(external_exports.string()).optional(),
4210
4247
  guided: external_exports.any().optional(),
4211
4248
  mode: external_exports.enum(["guided", "sandbox"]).optional(),
4212
- language: external_exports.enum(["js", "ts"]).optional(),
4213
- lang: external_exports.enum(["js", "ts"]).optional(),
4249
+ language: LanguageIdSchema.optional(),
4250
+ lang: LanguageIdSchema.optional(),
4214
4251
  stepIndex: external_exports.number().int().optional(),
4215
4252
  onStepComplete: external_exports.function().args(external_exports.any(), external_exports.number()).returns(external_exports.void()).optional(),
4216
4253
  onLabComplete: external_exports.function().args(external_exports.string()).returns(external_exports.void()).optional()