@playcademy/sandbox 0.3.12 → 0.3.14

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/server.js CHANGED
@@ -282,7 +282,7 @@ var init_auth = __esm(() => {
282
282
  });
283
283
 
284
284
  // ../constants/src/typescript.ts
285
- var TSC_PACKAGE = "@typescript/native-preview", USE_NATIVE_TSC;
285
+ var TSC_PACKAGE = "typescript", USE_NATIVE_TSC;
286
286
  var init_typescript = __esm(() => {
287
287
  USE_NATIVE_TSC = TSC_PACKAGE.includes("native-preview");
288
288
  });
@@ -350,11 +350,16 @@ var init_overworld = __esm(() => {
350
350
  var PLATFORM_TIMEZONE = "America/New_York";
351
351
 
352
352
  // ../constants/src/timeback.ts
353
- var TIMEBACK_ORG_SOURCED_ID = "PLAYCADEMY";
354
- var init_timeback2 = () => {};
353
+ var TIMEBACK_ROUTES, TIMEBACK_ORG_SOURCED_ID = "PLAYCADEMY";
354
+ var init_timeback2 = __esm(() => {
355
+ TIMEBACK_ROUTES = {
356
+ END_ACTIVITY: "/integrations/timeback/end-activity",
357
+ GET_XP: "/integrations/timeback/xp"
358
+ };
359
+ });
355
360
 
356
361
  // ../constants/src/workers.ts
357
- var WORKER_NAMING;
362
+ var WORKER_NAMING, SECRETS_PREFIX = "secrets_";
358
363
  var init_workers = __esm(() => {
359
364
  WORKER_NAMING = {
360
365
  STAGING_PREFIX: "staging-",
@@ -1224,7 +1229,7 @@ var package_default;
1224
1229
  var init_package = __esm(() => {
1225
1230
  package_default = {
1226
1231
  name: "@playcademy/sandbox",
1227
- version: "0.3.12",
1232
+ version: "0.3.14",
1228
1233
  description: "Local development server for Playcademy game development",
1229
1234
  type: "module",
1230
1235
  exports: {
@@ -15815,8 +15820,9 @@ class SecretsService {
15815
15820
  }
15816
15821
  }
15817
15822
  }
15818
- var logger21, SECRETS_PREFIX = "secrets_", INTERNAL_SECRET_KEYS;
15823
+ var logger21, INTERNAL_SECRET_KEYS;
15819
15824
  var init_secrets_service = __esm(() => {
15825
+ init_src();
15820
15826
  init_src2();
15821
15827
  init_config2();
15822
15828
  init_errors();
@@ -15825,6 +15831,33 @@ var init_secrets_service = __esm(() => {
15825
15831
  INTERNAL_SECRET_KEYS = ["PLAYCADEMY_API_KEY", "GAME_ID", "PLAYCADEMY_BASE_URL"];
15826
15832
  });
15827
15833
 
15834
+ // ../edge-play/src/constants.ts
15835
+ var ROUTES;
15836
+ var init_constants2 = __esm(() => {
15837
+ init_src();
15838
+ ROUTES = {
15839
+ INDEX: "/api",
15840
+ HEALTH: "/api/health",
15841
+ TIMEBACK: {
15842
+ END_ACTIVITY: `/api${TIMEBACK_ROUTES.END_ACTIVITY}`,
15843
+ GET_XP: `/api${TIMEBACK_ROUTES.GET_XP}`
15844
+ }
15845
+ };
15846
+ });
15847
+
15848
+ // ../edge-play/src/entry/setup.ts
15849
+ function prefixSecrets(secrets) {
15850
+ const prefixed = {};
15851
+ for (const [key, value] of Object.entries(secrets)) {
15852
+ prefixed[SECRETS_PREFIX + key] = value;
15853
+ }
15854
+ return prefixed;
15855
+ }
15856
+ var init_setup = __esm(() => {
15857
+ init_src();
15858
+ init_constants2();
15859
+ });
15860
+
15828
15861
  // ../api-core/src/services/seed.service.ts
15829
15862
  class SeedService {
15830
15863
  ctx;
@@ -15839,7 +15872,7 @@ class SeedService {
15839
15872
  }
15840
15873
  return cf;
15841
15874
  }
15842
- async seed(slug2, code, user) {
15875
+ async seed(slug2, code, user, secrets) {
15843
15876
  const cf = this.getCloudflare();
15844
15877
  const game = await this.ctx.services.game.validateDeveloperAccessBySlug(user, slug2);
15845
15878
  const isProd = isProduction2(this.ctx.config);
@@ -15851,10 +15884,11 @@ class SeedService {
15851
15884
  gameId: game.id,
15852
15885
  slug: slug2,
15853
15886
  deploymentId,
15854
- codeLength: code.length
15887
+ codeLength: code.length,
15888
+ secretCount: secrets ? Object.keys(secrets).length : 0
15855
15889
  });
15856
15890
  try {
15857
- const workerResponse = await this.deployAndExecuteSeedWorker(cf, seedDeploymentId, game.id, deploymentId, code);
15891
+ const workerResponse = await this.deployAndExecuteSeedWorker(cf, seedDeploymentId, game.id, deploymentId, code, secrets);
15858
15892
  logger22.info("Seed completed", {
15859
15893
  gameId: game.id,
15860
15894
  slug: slug2,
@@ -15926,7 +15960,7 @@ class SeedService {
15926
15960
  });
15927
15961
  }
15928
15962
  }
15929
- async deployAndExecuteSeedWorker(cf, seedDeploymentId, gameId, deploymentId, workerCode) {
15963
+ async deployAndExecuteSeedWorker(cf, seedDeploymentId, gameId, deploymentId, workerCode, secrets) {
15930
15964
  try {
15931
15965
  const result = await cf.deploy(seedDeploymentId, workerCode, {
15932
15966
  GAME_ID: gameId,
@@ -15936,6 +15970,13 @@ class SeedService {
15936
15970
  keepAssets: false
15937
15971
  });
15938
15972
  logger22.info("Worker deployed", { seedDeploymentId, url: result.url });
15973
+ if (secrets && Object.keys(secrets).length > 0) {
15974
+ await cf.setSecrets(seedDeploymentId, prefixSecrets(secrets));
15975
+ logger22.info("Secrets bound to worker", {
15976
+ seedDeploymentId,
15977
+ count: Object.keys(secrets).length
15978
+ });
15979
+ }
15939
15980
  return await this.executeSeedWorker(result.url, seedDeploymentId);
15940
15981
  } finally {
15941
15982
  await this.cleanupSeedWorker(cf, seedDeploymentId);
@@ -16051,6 +16092,7 @@ class SeedService {
16051
16092
  }
16052
16093
  var logger22;
16053
16094
  var init_seed_service = __esm(() => {
16095
+ init_setup();
16054
16096
  init_src2();
16055
16097
  init_config2();
16056
16098
  init_errors();
@@ -16518,7 +16560,7 @@ function isTimebackSubject(value) {
16518
16560
  function isTimebackGrade(value) {
16519
16561
  return typeof value === "number" && Number.isInteger(value) && GRADE_VALUES.includes(value);
16520
16562
  }
16521
- var __esm2 = (fn, res) => () => (fn && (res = fn(fn = 0)), res), ACHIEVEMENT_IDS2, ACHIEVEMENT_DEFINITIONS2, init_achievements2, init_auth2 = () => {}, TSC_PACKAGE2 = "@typescript/native-preview", USE_NATIVE_TSC2, init_typescript2, init_character2 = () => {}, PLAYCADEMY_BASE_URLS, init_domains2, init_env_vars2 = () => {}, ITEM_SLUGS2, CURRENCIES2, BADGES2, init_overworld2, TIMEBACK_CALIPER_SENSORS, TIMEBACK_ORG_SOURCED_ID2 = "PLAYCADEMY", TIMEBACK_ORG_NAME = "Playcademy Studios", TIMEBACK_ORG_TYPE = "department", TIMEBACK_COURSE_DEFAULTS, TIMEBACK_RESOURCE_DEFAULTS, TIMEBACK_COMPONENT_DEFAULTS, TIMEBACK_COMPONENT_RESOURCE_DEFAULTS, init_timeback3, init_workers2 = () => {}, init_src5, TIMEBACK_API_URLS, TIMEBACK_AUTH_URLS, CALIPER_API_URLS, ONEROSTER_ENDPOINTS, CALIPER_ENDPOINTS, CALIPER_CONSTANTS, TIMEBACK_EVENT_TYPES, TIMEBACK_ACTIONS, TIMEBACK_TYPES, ACTIVITY_METRIC_TYPES, TIME_METRIC_TYPES, TIMEBACK_SUBJECTS, TIMEBACK_GRADE_LEVELS, TIMEBACK_GRADE_LEVEL_LABELS, CALIPER_SUBJECTS, ONEROSTER_STATUS, SCORE_STATUS, ENV_VARS, HTTP_DEFAULTS, AUTH_DEFAULTS, CACHE_DEFAULTS, CONFIG_DEFAULTS, PLAYCADEMY_DEFAULTS, RESOURCE_DEFAULTS, HTTP_STATUS, ERROR_NAMES, init_constants2, isObject = (value) => typeof value === "object" && value !== null, SUBJECT_VALUES, GRADE_VALUES;
16563
+ var __esm2 = (fn, res) => () => (fn && (res = fn(fn = 0)), res), ACHIEVEMENT_IDS2, ACHIEVEMENT_DEFINITIONS2, init_achievements2, init_auth2 = () => {}, TSC_PACKAGE2 = "typescript", USE_NATIVE_TSC2, init_typescript2, init_character2 = () => {}, PLAYCADEMY_BASE_URLS, init_domains2, init_env_vars2 = () => {}, ITEM_SLUGS2, CURRENCIES2, BADGES2, init_overworld2, TIMEBACK_CALIPER_SENSORS, TIMEBACK_ORG_SOURCED_ID2 = "PLAYCADEMY", TIMEBACK_ORG_NAME = "Playcademy Studios", TIMEBACK_ORG_TYPE = "department", TIMEBACK_COURSE_DEFAULTS, TIMEBACK_RESOURCE_DEFAULTS, TIMEBACK_COMPONENT_DEFAULTS, TIMEBACK_COMPONENT_RESOURCE_DEFAULTS, init_timeback3, init_workers2 = () => {}, init_src5, TIMEBACK_API_URLS, TIMEBACK_AUTH_URLS, CALIPER_API_URLS, ONEROSTER_ENDPOINTS, CALIPER_ENDPOINTS, CALIPER_CONSTANTS, TIMEBACK_EVENT_TYPES, TIMEBACK_ACTIONS, TIMEBACK_TYPES, ACTIVITY_METRIC_TYPES, TIME_METRIC_TYPES, TIMEBACK_SUBJECTS, TIMEBACK_GRADE_LEVELS, TIMEBACK_GRADE_LEVEL_LABELS, CALIPER_SUBJECTS, ONEROSTER_STATUS, SCORE_STATUS, ENV_VARS, HTTP_DEFAULTS, AUTH_DEFAULTS, CACHE_DEFAULTS, CONFIG_DEFAULTS, PLAYCADEMY_DEFAULTS, RESOURCE_DEFAULTS, HTTP_STATUS, ERROR_NAMES, init_constants3, isObject = (value) => typeof value === "object" && value !== null, SUBJECT_VALUES, GRADE_VALUES;
16522
16564
  var init_types7 = __esm(() => {
16523
16565
  init_achievements2 = __esm2(() => {
16524
16566
  ACHIEVEMENT_IDS2 = {
@@ -16695,7 +16737,7 @@ var init_types7 = __esm(() => {
16695
16737
  init_timeback3();
16696
16738
  init_workers2();
16697
16739
  });
16698
- init_constants2 = __esm2(() => {
16740
+ init_constants3 = __esm2(() => {
16699
16741
  init_src5();
16700
16742
  TIMEBACK_API_URLS = {
16701
16743
  production: "https://api.alpha-1edtech.ai",
@@ -16870,7 +16912,7 @@ var init_types7 = __esm(() => {
16870
16912
  timebackSdk: "TimebackSDKError"
16871
16913
  };
16872
16914
  });
16873
- init_constants2();
16915
+ init_constants3();
16874
16916
  SUBJECT_VALUES = TIMEBACK_SUBJECTS;
16875
16917
  GRADE_VALUES = TIMEBACK_GRADE_LEVELS;
16876
16918
  });
@@ -17435,6 +17477,48 @@ class TimebackService {
17435
17477
  inProgress: result.inProgress
17436
17478
  };
17437
17479
  }
17480
+ async getStudentXp(timebackId, options) {
17481
+ const client = this.requireClient();
17482
+ const db2 = this.ctx.db;
17483
+ let courseIds = [];
17484
+ if (options?.gameId) {
17485
+ const conditions2 = [eq(gameTimebackIntegrations.gameId, options.gameId)];
17486
+ if (options.grade !== undefined && options.subject) {
17487
+ conditions2.push(eq(gameTimebackIntegrations.grade, options.grade));
17488
+ conditions2.push(eq(gameTimebackIntegrations.subject, options.subject));
17489
+ }
17490
+ const integrations = await db2.query.gameTimebackIntegrations.findMany({
17491
+ where: and(...conditions2)
17492
+ });
17493
+ courseIds = integrations.map((i2) => i2.courseId);
17494
+ if (courseIds.length === 0) {
17495
+ logger27.debug("No integrations found for game, returning 0 XP", {
17496
+ timebackId,
17497
+ gameId: options.gameId,
17498
+ grade: options.grade,
17499
+ subject: options.subject
17500
+ });
17501
+ return {
17502
+ totalXp: 0,
17503
+ ...options?.include?.today && { todayXp: 0 },
17504
+ ...options?.include?.perCourse && { courses: [] }
17505
+ };
17506
+ }
17507
+ }
17508
+ const result = await client.getStudentXp(timebackId, {
17509
+ courseIds: courseIds.length > 0 ? courseIds : undefined,
17510
+ include: options?.include
17511
+ });
17512
+ logger27.debug("Retrieved student XP", {
17513
+ timebackId,
17514
+ gameId: options?.gameId,
17515
+ grade: options?.grade,
17516
+ subject: options?.subject,
17517
+ totalXp: result.totalXp,
17518
+ courseCount: result.courses?.length
17519
+ });
17520
+ return result;
17521
+ }
17438
17522
  }
17439
17523
  var logger27;
17440
17524
  var init_timeback_service = __esm(() => {
@@ -17758,6 +17842,7 @@ var init_services = __esm(() => {
17758
17842
  });
17759
17843
 
17760
17844
  // ../timeback/dist/index.js
17845
+ import { stdout as stdout2 } from "process";
17761
17846
  function deriveSourcedIds(courseId) {
17762
17847
  return {
17763
17848
  course: courseId,
@@ -17854,6 +17939,117 @@ function isTimebackSubject2(value) {
17854
17939
  function isTimebackGrade2(value) {
17855
17940
  return typeof value === "number" && Number.isInteger(value) && GRADE_VALUES2.includes(value);
17856
17941
  }
17942
+ function stripAnsi2(text3) {
17943
+ return text3.replace(/\x1B\[[0-9;]*[a-zA-Z]/g, "");
17944
+ }
17945
+
17946
+ class Spinner2 {
17947
+ tasks = new Map;
17948
+ frameIndex = 0;
17949
+ intervalId = null;
17950
+ renderCount = 0;
17951
+ previousLineCount = 0;
17952
+ printedTasks = new Set;
17953
+ indent;
17954
+ constructor(taskIds, texts, options) {
17955
+ this.indent = options?.indent ?? 0;
17956
+ taskIds.forEach((id, index2) => {
17957
+ this.tasks.set(id, {
17958
+ text: texts[index2] || "",
17959
+ status: "pending"
17960
+ });
17961
+ });
17962
+ }
17963
+ start() {
17964
+ if (isInteractive2) {
17965
+ stdout2.write(cursor2.hide);
17966
+ this.render();
17967
+ this.intervalId = setInterval(() => {
17968
+ this.frameIndex = (this.frameIndex + 1) % SPINNER_FRAMES2.length;
17969
+ this.render();
17970
+ }, SPINNER_INTERVAL2);
17971
+ }
17972
+ }
17973
+ updateTask(taskId, status, finalText) {
17974
+ const task = this.tasks.get(taskId);
17975
+ if (task) {
17976
+ task.status = status;
17977
+ if (finalText)
17978
+ task.finalText = finalText;
17979
+ if (!isInteractive2) {
17980
+ this.renderNonInteractive(taskId, task);
17981
+ }
17982
+ }
17983
+ }
17984
+ renderNonInteractive(taskId, task) {
17985
+ const key = `${taskId}-${task.status}`;
17986
+ if (this.printedTasks.has(key))
17987
+ return;
17988
+ this.printedTasks.add(key);
17989
+ const indentStr = " ".repeat(this.indent);
17990
+ let line3 = "";
17991
+ switch (task.status) {
17992
+ case "running":
17993
+ line3 = `${indentStr}[RUNNING] ${stripAnsi2(task.text)}`;
17994
+ break;
17995
+ case "success":
17996
+ line3 = `${indentStr}[SUCCESS] ${stripAnsi2(task.finalText || task.text)}`;
17997
+ break;
17998
+ case "error":
17999
+ line3 = `${indentStr}[ERROR] Failed: ${stripAnsi2(task.text)}`;
18000
+ break;
18001
+ }
18002
+ console.log(line3);
18003
+ }
18004
+ render() {
18005
+ if (this.previousLineCount > 0) {
18006
+ stdout2.write(cursor2.up(this.previousLineCount));
18007
+ }
18008
+ const spinner2 = SPINNER_FRAMES2[this.frameIndex];
18009
+ const indentStr = " ".repeat(this.indent);
18010
+ const visibleTasks = Array.from(this.tasks.values()).filter((task) => task.status !== "pending");
18011
+ for (const task of visibleTasks) {
18012
+ stdout2.write(`\r${cursor2.clearLine}`);
18013
+ let line3 = "";
18014
+ switch (task.status) {
18015
+ case "running":
18016
+ line3 = `${indentStr}${colors22.blue}${spinner2}${styles2.reset} ${task.text}`;
18017
+ break;
18018
+ case "success":
18019
+ line3 = `${indentStr}${colors22.green}${CHECK_MARK2}${styles2.reset} ${task.finalText || task.text}`;
18020
+ break;
18021
+ case "error":
18022
+ line3 = `${indentStr}${colors22.red}${CROSS_MARK2}${styles2.reset} Failed: ${task.text}`;
18023
+ break;
18024
+ }
18025
+ console.log(line3);
18026
+ }
18027
+ this.previousLineCount = visibleTasks.length;
18028
+ this.renderCount++;
18029
+ }
18030
+ stop() {
18031
+ if (this.intervalId) {
18032
+ clearInterval(this.intervalId);
18033
+ this.intervalId = null;
18034
+ }
18035
+ if (isInteractive2) {
18036
+ this.render();
18037
+ stdout2.write(cursor2.show);
18038
+ } else {
18039
+ this.tasks.forEach((task, taskId) => {
18040
+ if (task.status !== "pending") {
18041
+ this.renderNonInteractive(taskId, task);
18042
+ }
18043
+ });
18044
+ }
18045
+ }
18046
+ }
18047
+ function kebabToTitleCase(kebabStr) {
18048
+ return kebabStr.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
18049
+ }
18050
+ function formatDateYMD(date3 = new Date) {
18051
+ return date3.toISOString().split("T")[0];
18052
+ }
17857
18053
  async function deleteTimebackResources(client, courseId) {
17858
18054
  const sourcedIds = deriveSourcedIds(courseId);
17859
18055
  const { fetchTimebackConfig: fetchTimebackConfig2 } = await Promise.resolve().then(() => (init_verify(), exports_verify));
@@ -19013,9 +19209,6 @@ class MasteryTracker {
19013
19209
  return total;
19014
19210
  }
19015
19211
  }
19016
- function kebabToTitleCase(kebabStr) {
19017
- return kebabStr.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
19018
- }
19019
19212
  function validateProgressData(progressData) {
19020
19213
  if (!progressData.subject) {
19021
19214
  throw new ConfigurationError("subject", "Subject is required for Caliper events. Provide it in progressData.subject");
@@ -19038,30 +19231,39 @@ function validateSessionData(sessionData) {
19038
19231
  throw new ConfigurationError("sensorUrl", 'Sensor URL is required for Caliper events. Provide it in sessionData.sensorUrl (e.g., "https://hub.playcademy.net/p/your-game")');
19039
19232
  }
19040
19233
  }
19041
- function calculateXp(durationSeconds, accuracy, isFirstAttempt) {
19042
- const durationMinutes = durationSeconds / 60;
19043
- const baseXp = durationMinutes * 1;
19044
- let multiplier;
19045
- if (isFirstAttempt) {
19046
- if (accuracy === 1) {
19047
- multiplier = 1.25;
19048
- } else if (accuracy >= 0.8) {
19049
- multiplier = 1;
19050
- } else if (accuracy >= 0.65) {
19051
- multiplier = 0.5;
19052
- } else {
19053
- multiplier = 0;
19054
- }
19234
+ function getAttemptMultiplier(attemptNumber) {
19235
+ switch (attemptNumber) {
19236
+ case 1:
19237
+ return 1;
19238
+ case 2:
19239
+ return 0.5;
19240
+ case 3:
19241
+ return 0.25;
19242
+ default:
19243
+ return 0;
19244
+ }
19245
+ }
19246
+ function getAccuracyMultiplier(accuracy) {
19247
+ if (!Number.isFinite(accuracy) || accuracy < 0) {
19248
+ return 0;
19249
+ }
19250
+ if (accuracy >= PERFECT_ACCURACY_THRESHOLD) {
19251
+ return 1.25;
19252
+ } else if (accuracy >= 0.8) {
19253
+ return 1;
19055
19254
  } else {
19056
- if (accuracy === 1) {
19057
- multiplier = 1;
19058
- } else if (accuracy >= 0.8) {
19059
- multiplier = 0.5;
19060
- } else {
19061
- multiplier = 0;
19062
- }
19255
+ return 0;
19063
19256
  }
19064
- return Math.round(baseXp * multiplier * 10) / 10;
19257
+ }
19258
+ function calculateXp(durationSeconds, accuracy, attemptNumber) {
19259
+ if (!Number.isFinite(durationSeconds) || durationSeconds <= 0) {
19260
+ return 0;
19261
+ }
19262
+ const durationMinutes = durationSeconds / 60;
19263
+ const baseXp = durationMinutes * 1;
19264
+ const accuracyMultiplier = getAccuracyMultiplier(accuracy);
19265
+ const attemptMultiplier = getAttemptMultiplier(attemptNumber);
19266
+ return Math.round(baseXp * accuracyMultiplier * attemptMultiplier * 10) / 10;
19065
19267
  }
19066
19268
 
19067
19269
  class ProgressRecorder {
@@ -19084,8 +19286,7 @@ class ProgressRecorder {
19084
19286
  const { score, totalQuestions, correctQuestions, xpEarned, masteredUnits, attemptNumber } = progressData;
19085
19287
  const actualLineItemId = await this.resolveAssessmentLineItem(activityId, activityName, progressData.classId, ids);
19086
19288
  const currentAttemptNumber = await this.resolveAttemptNumber(attemptNumber, score, studentId, actualLineItemId);
19087
- const isFirstActiveAttempt = currentAttemptNumber === 1;
19088
- const calculatedXp = this.calculateXpForProgress(progressData, totalQuestions, correctQuestions, xpEarned, isFirstActiveAttempt);
19289
+ const calculatedXp = this.calculateXpForProgress(progressData, totalQuestions, correctQuestions, xpEarned, currentAttemptNumber);
19089
19290
  let extensions = progressData.extensions;
19090
19291
  const masteryProgress = await this.masteryTracker.checkProgress({
19091
19292
  studentId,
@@ -19156,18 +19357,18 @@ class ProgressRecorder {
19156
19357
  }
19157
19358
  return 1;
19158
19359
  }
19159
- calculateXpForProgress(progressData, totalQuestions, correctQuestions, xpEarned, isFirstAttempt) {
19360
+ calculateXpForProgress(progressData, totalQuestions, correctQuestions, xpEarned, attemptNumber) {
19160
19361
  if (xpEarned !== undefined) {
19161
19362
  log3.debug("[ProgressRecorder] Using provided XP", { xpEarned });
19162
19363
  return xpEarned;
19163
19364
  }
19164
19365
  if (progressData.sessionDurationSeconds && totalQuestions && correctQuestions) {
19165
19366
  const accuracy = correctQuestions / totalQuestions;
19166
- const calculatedXp = calculateXp(progressData.sessionDurationSeconds, accuracy, isFirstAttempt);
19367
+ const calculatedXp = calculateXp(progressData.sessionDurationSeconds, accuracy, attemptNumber);
19167
19368
  log3.debug("[ProgressRecorder] Calculated XP", {
19168
19369
  durationSeconds: progressData.sessionDurationSeconds,
19169
19370
  accuracy,
19170
- isFirstAttempt,
19371
+ attemptNumber,
19171
19372
  calculatedXp
19172
19373
  });
19173
19374
  return calculatedXp;
@@ -20124,6 +20325,70 @@ class TimebackClient {
20124
20325
  this.cacheManager.setEnrollments(studentId, enrollments);
20125
20326
  return enrollments;
20126
20327
  }
20328
+ async getStudentXp(studentId, options) {
20329
+ await this._ensureAuthenticated();
20330
+ const enrollments = await this.edubridge.enrollments.listByUser(studentId);
20331
+ const filteredEnrollments = options?.courseIds?.length ? enrollments.filter((e) => options.courseIds.includes(e.course.id)) : enrollments;
20332
+ if (filteredEnrollments.length === 0) {
20333
+ return {
20334
+ totalXp: 0,
20335
+ ...options?.include?.today && { todayXp: 0 },
20336
+ ...options?.include?.perCourse && { courses: [] }
20337
+ };
20338
+ }
20339
+ const analyticsResults = await Promise.all(filteredEnrollments.map(async (enrollment) => {
20340
+ try {
20341
+ const analytics = await this.edubridge.analytics.getEnrollmentFacts(enrollment.id);
20342
+ return { enrollment, analytics };
20343
+ } catch (error) {
20344
+ log3.warn("[TimebackClient] Failed to fetch analytics for enrollment", {
20345
+ enrollmentId: enrollment.id,
20346
+ error
20347
+ });
20348
+ return { enrollment, analytics: null };
20349
+ }
20350
+ }));
20351
+ const today = formatDateYMD();
20352
+ let totalXp = 0;
20353
+ let todayXp = 0;
20354
+ const courses = [];
20355
+ for (const { enrollment, analytics } of analyticsResults) {
20356
+ let courseXp = 0;
20357
+ let courseTodayXp = 0;
20358
+ if (analytics?.facts) {
20359
+ for (const [date3, subjects] of Object.entries(analytics.facts)) {
20360
+ for (const subjectData of Object.values(subjects)) {
20361
+ const xp = subjectData.activityMetrics?.xpEarned ?? 0;
20362
+ courseXp += xp;
20363
+ if (date3 === today) {
20364
+ courseTodayXp += xp;
20365
+ }
20366
+ }
20367
+ }
20368
+ }
20369
+ totalXp += courseXp;
20370
+ todayXp += courseTodayXp;
20371
+ if (options?.include?.perCourse) {
20372
+ const gradeStr = enrollment.course.grades?.[0];
20373
+ const parsedGrade = gradeStr ? parseInt(gradeStr, 10) : 0;
20374
+ const grade = isTimebackGrade2(parsedGrade) ? parsedGrade : 0;
20375
+ const subjectStr = enrollment.course.subjects?.[0];
20376
+ const subject = subjectStr && isTimebackSubject2(subjectStr) ? subjectStr : "None";
20377
+ courses.push({
20378
+ grade,
20379
+ subject,
20380
+ title: enrollment.course.title,
20381
+ totalXp: courseXp,
20382
+ ...options?.include?.today && { todayXp: courseTodayXp }
20383
+ });
20384
+ }
20385
+ }
20386
+ return {
20387
+ totalXp,
20388
+ ...options?.include?.today && { todayXp },
20389
+ ...options?.include?.perCourse && { courses }
20390
+ };
20391
+ }
20127
20392
  clearCaches() {
20128
20393
  this.cacheManager.clearAll();
20129
20394
  }
@@ -20160,7 +20425,7 @@ var __defProp2, __export2 = (target, all) => {
20160
20425
  configurable: true,
20161
20426
  set: (newValue) => all[name3] = () => newValue
20162
20427
  });
20163
- }, __esm3 = (fn, res) => () => (fn && (res = fn(fn = 0)), res), ACHIEVEMENT_IDS3, ACHIEVEMENT_DEFINITIONS3, init_achievements3, init_auth3 = () => {}, TSC_PACKAGE3 = "@typescript/native-preview", USE_NATIVE_TSC3, init_typescript3, init_character3 = () => {}, PLAYCADEMY_BASE_URLS2, init_domains3, init_env_vars3 = () => {}, ITEM_SLUGS3, CURRENCIES3, BADGES3, init_overworld3, TIMEBACK_CALIPER_SENSORS2, TIMEBACK_ORG_SOURCED_ID3 = "PLAYCADEMY", TIMEBACK_ORG_NAME2 = "Playcademy Studios", TIMEBACK_ORG_TYPE2 = "department", TIMEBACK_COURSE_DEFAULTS2, TIMEBACK_RESOURCE_DEFAULTS2, TIMEBACK_COMPONENT_DEFAULTS2, TIMEBACK_COMPONENT_RESOURCE_DEFAULTS2, init_timeback4, init_workers3 = () => {}, init_src6, TIMEBACK_API_URLS2, TIMEBACK_AUTH_URLS2, CALIPER_API_URLS2, ONEROSTER_ENDPOINTS2, CALIPER_ENDPOINTS2, createOneRosterUrls = (baseUrl) => {
20428
+ }, __esm3 = (fn, res) => () => (fn && (res = fn(fn = 0)), res), ACHIEVEMENT_IDS3, ACHIEVEMENT_DEFINITIONS3, init_achievements3, init_auth3 = () => {}, TSC_PACKAGE3 = "typescript", USE_NATIVE_TSC3, init_typescript3, init_character3 = () => {}, PLAYCADEMY_BASE_URLS2, init_domains3, init_env_vars3 = () => {}, ITEM_SLUGS3, CURRENCIES3, BADGES3, init_overworld3, TIMEBACK_CALIPER_SENSORS2, TIMEBACK_ORG_SOURCED_ID3 = "PLAYCADEMY", TIMEBACK_ORG_NAME2 = "Playcademy Studios", TIMEBACK_ORG_TYPE2 = "department", TIMEBACK_COURSE_DEFAULTS2, TIMEBACK_RESOURCE_DEFAULTS2, TIMEBACK_COMPONENT_DEFAULTS2, TIMEBACK_COMPONENT_RESOURCE_DEFAULTS2, init_timeback4, init_workers3 = () => {}, init_src6, TIMEBACK_API_URLS2, TIMEBACK_AUTH_URLS2, CALIPER_API_URLS2, ONEROSTER_ENDPOINTS2, CALIPER_ENDPOINTS2, createOneRosterUrls = (baseUrl) => {
20164
20429
  const effective = baseUrl || TIMEBACK_API_URLS2.production;
20165
20430
  const base = effective.replace(/\/$/, "");
20166
20431
  return {
@@ -20168,7 +20433,7 @@ var __defProp2, __export2 = (target, all) => {
20168
20433
  course: (courseId) => `${base}${ONEROSTER_ENDPOINTS2.courses}/${courseId}`,
20169
20434
  componentResource: (resourceId) => `${base}${ONEROSTER_ENDPOINTS2.componentResources}/${resourceId}`
20170
20435
  };
20171
- }, CALIPER_CONSTANTS2, TIMEBACK_EVENT_TYPES2, TIMEBACK_ACTIONS2, TIMEBACK_TYPES2, ACTIVITY_METRIC_TYPES2, TIME_METRIC_TYPES2, TIMEBACK_SUBJECTS2, TIMEBACK_GRADE_LEVELS2, TIMEBACK_GRADE_LEVEL_LABELS2, CALIPER_SUBJECTS2, ONEROSTER_STATUS2, SCORE_STATUS2, ENV_VARS2, HTTP_DEFAULTS2, AUTH_DEFAULTS2, CACHE_DEFAULTS2, CONFIG_DEFAULTS2, PLAYCADEMY_DEFAULTS2, RESOURCE_DEFAULTS2, HTTP_STATUS2, ERROR_NAMES2, init_constants3, exports_verify, init_verify, TimebackError, TimebackApiError, TimebackAuthenticationError, StudentNotFoundError, ConfigurationError, ResourceNotFoundError, isObject2 = (value) => typeof value === "object" && value !== null, SUBJECT_VALUES2, GRADE_VALUES2, isBrowser2 = () => {
20436
+ }, CALIPER_CONSTANTS2, TIMEBACK_EVENT_TYPES2, TIMEBACK_ACTIONS2, TIMEBACK_TYPES2, ACTIVITY_METRIC_TYPES2, TIME_METRIC_TYPES2, TIMEBACK_SUBJECTS2, TIMEBACK_GRADE_LEVELS2, TIMEBACK_GRADE_LEVEL_LABELS2, CALIPER_SUBJECTS2, ONEROSTER_STATUS2, SCORE_STATUS2, ENV_VARS2, HTTP_DEFAULTS2, AUTH_DEFAULTS2, CACHE_DEFAULTS2, CONFIG_DEFAULTS2, PLAYCADEMY_DEFAULTS2, RESOURCE_DEFAULTS2, HTTP_STATUS2, ERROR_NAMES2, init_constants4, exports_verify, init_verify, TimebackError, TimebackApiError, TimebackAuthenticationError, StudentNotFoundError, ConfigurationError, ResourceNotFoundError, isObject2 = (value) => typeof value === "object" && value !== null, SUBJECT_VALUES2, GRADE_VALUES2, isBrowser2 = () => {
20172
20437
  const g = globalThis;
20173
20438
  return typeof g.window !== "undefined" && typeof g.document !== "undefined";
20174
20439
  }, isProduction3 = () => {
@@ -20315,7 +20580,7 @@ var __defProp2, __export2 = (target, all) => {
20315
20580
  log: (level, message, context) => performLog2(level, message, context, scopeName),
20316
20581
  scope: (name3) => createLogger2(scopeName ? `${scopeName}.${name3}` : name3)
20317
20582
  };
20318
- }, log3, TimebackAuthError, exports_external2, util3, objectUtil2, ZodParsedType2, getParsedType2 = (data) => {
20583
+ }, log3, colors22, styles2, cursor2, isInteractive2, SPINNER_FRAMES2, CHECK_MARK2, CROSS_MARK2, SPINNER_INTERVAL2 = 80, TimebackAuthError, PERFECT_ACCURACY_THRESHOLD = 0.999999, exports_external2, util3, objectUtil2, ZodParsedType2, getParsedType2 = (data) => {
20319
20584
  const t = typeof data;
20320
20585
  switch (t) {
20321
20586
  case "undefined":
@@ -20707,7 +20972,7 @@ var init_dist3 = __esm(() => {
20707
20972
  init_timeback4();
20708
20973
  init_workers3();
20709
20974
  });
20710
- init_constants3 = __esm3(() => {
20975
+ init_constants4 = __esm3(() => {
20711
20976
  init_src6();
20712
20977
  TIMEBACK_API_URLS2 = {
20713
20978
  production: "https://api.alpha-1edtech.ai",
@@ -20888,9 +21153,9 @@ var init_dist3 = __esm(() => {
20888
21153
  fetchTimebackConfig: () => fetchTimebackConfig
20889
21154
  });
20890
21155
  init_verify = __esm3(() => {
20891
- init_constants3();
21156
+ init_constants4();
20892
21157
  });
20893
- init_constants3();
21158
+ init_constants4();
20894
21159
  TimebackError = class TimebackError extends Error {
20895
21160
  constructor(message) {
20896
21161
  super(message);
@@ -20947,7 +21212,7 @@ var init_dist3 = __esm(() => {
20947
21212
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
20948
21213
  }
20949
21214
  };
20950
- init_constants3();
21215
+ init_constants4();
20951
21216
  SUBJECT_VALUES2 = TIMEBACK_SUBJECTS2;
20952
21217
  GRADE_VALUES2 = TIMEBACK_GRADE_LEVELS2;
20953
21218
  colors3 = {
@@ -20967,9 +21232,53 @@ var init_dist3 = __esm(() => {
20967
21232
  error: 3
20968
21233
  };
20969
21234
  log3 = createLogger2();
21235
+ colors22 = {
21236
+ black: "\x1B[30m",
21237
+ red: "\x1B[31m",
21238
+ green: "\x1B[32m",
21239
+ yellow: "\x1B[33m",
21240
+ blue: "\x1B[34m",
21241
+ magenta: "\x1B[35m",
21242
+ cyan: "\x1B[36m",
21243
+ white: "\x1B[37m",
21244
+ gray: "\x1B[90m"
21245
+ };
21246
+ styles2 = {
21247
+ reset: "\x1B[0m",
21248
+ bold: "\x1B[1m",
21249
+ dim: "\x1B[2m",
21250
+ italic: "\x1B[3m",
21251
+ underline: "\x1B[4m"
21252
+ };
21253
+ cursor2 = {
21254
+ hide: "\x1B[?25l",
21255
+ show: "\x1B[?25h",
21256
+ up: (n) => `\x1B[${n}A`,
21257
+ down: (n) => `\x1B[${n}B`,
21258
+ forward: (n) => `\x1B[${n}C`,
21259
+ back: (n) => `\x1B[${n}D`,
21260
+ clearLine: "\x1B[K",
21261
+ clearScreen: "\x1B[2J",
21262
+ home: "\x1B[H"
21263
+ };
21264
+ isInteractive2 = typeof process !== "undefined" && process.stdout?.isTTY && !process.env.CI && process.env.TERM !== "dumb";
21265
+ SPINNER_FRAMES2 = [
21266
+ 10251,
21267
+ 10265,
21268
+ 10297,
21269
+ 10296,
21270
+ 10300,
21271
+ 10292,
21272
+ 10278,
21273
+ 10279,
21274
+ 10247,
21275
+ 10255
21276
+ ].map((code) => String.fromCodePoint(code));
21277
+ CHECK_MARK2 = String.fromCodePoint(10004);
21278
+ CROSS_MARK2 = String.fromCodePoint(10006);
20970
21279
  init_verify();
20971
- init_constants3();
20972
- init_constants3();
21280
+ init_constants4();
21281
+ init_constants4();
20973
21282
  if (process.env.DEBUG === "true") {
20974
21283
  process.env.TERM = "dumb";
20975
21284
  }
@@ -20981,13 +21290,13 @@ var init_dist3 = __esm(() => {
20981
21290
  this.name = ERROR_NAMES2.timebackAuth;
20982
21291
  }
20983
21292
  };
20984
- init_constants3();
20985
- init_constants3();
20986
- init_constants3();
20987
- init_constants3();
20988
- init_constants3();
20989
- init_constants3();
20990
- init_constants3();
21293
+ init_constants4();
21294
+ init_constants4();
21295
+ init_constants4();
21296
+ init_constants4();
21297
+ init_constants4();
21298
+ init_constants4();
21299
+ init_constants4();
20991
21300
  exports_external2 = {};
20992
21301
  __export2(exports_external2, {
20993
21302
  void: () => voidType2,
@@ -24545,7 +24854,7 @@ var init_http_exception = () => {};
24545
24854
 
24546
24855
  // ../../node_modules/hono/dist/request/constants.js
24547
24856
  var GET_MATCH_RESULT;
24548
- var init_constants4 = __esm(() => {
24857
+ var init_constants5 = __esm(() => {
24549
24858
  GET_MATCH_RESULT = Symbol();
24550
24859
  });
24551
24860
 
@@ -24809,7 +25118,7 @@ var init_url = __esm(() => {
24809
25118
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_), HonoRequest;
24810
25119
  var init_request = __esm(() => {
24811
25120
  init_http_exception();
24812
- init_constants4();
25121
+ init_constants5();
24813
25122
  init_body();
24814
25123
  init_url();
24815
25124
  HonoRequest = class {
@@ -25139,7 +25448,7 @@ var init_router = __esm(() => {
25139
25448
 
25140
25449
  // ../../node_modules/hono/dist/utils/constants.js
25141
25450
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
25142
- var init_constants5 = () => {};
25451
+ var init_constants6 = () => {};
25143
25452
 
25144
25453
  // ../../node_modules/hono/dist/hono-base.js
25145
25454
  var notFoundHandler = (c) => {
@@ -25361,7 +25670,7 @@ var init_hono_base = __esm(() => {
25361
25670
  init_compose();
25362
25671
  init_context2();
25363
25672
  init_router();
25364
- init_constants5();
25673
+ init_constants6();
25365
25674
  init_url();
25366
25675
  });
25367
25676
 
@@ -33728,29 +34037,29 @@ is not a problem with esbuild. You need to fix your environment instead.
33728
34037
  let responseCallbacks = {};
33729
34038
  let nextRequestID = 0;
33730
34039
  let nextBuildKey = 0;
33731
- let stdout2 = new Uint8Array(16 * 1024);
34040
+ let stdout3 = new Uint8Array(16 * 1024);
33732
34041
  let stdoutUsed = 0;
33733
34042
  let readFromStdout = (chunk) => {
33734
34043
  let limit = stdoutUsed + chunk.length;
33735
- if (limit > stdout2.length) {
34044
+ if (limit > stdout3.length) {
33736
34045
  let swap = new Uint8Array(limit * 2);
33737
- swap.set(stdout2);
33738
- stdout2 = swap;
34046
+ swap.set(stdout3);
34047
+ stdout3 = swap;
33739
34048
  }
33740
- stdout2.set(chunk, stdoutUsed);
34049
+ stdout3.set(chunk, stdoutUsed);
33741
34050
  stdoutUsed += chunk.length;
33742
34051
  let offset = 0;
33743
34052
  while (offset + 4 <= stdoutUsed) {
33744
- let length = readUInt32LE(stdout2, offset);
34053
+ let length = readUInt32LE(stdout3, offset);
33745
34054
  if (offset + 4 + length > stdoutUsed) {
33746
34055
  break;
33747
34056
  }
33748
34057
  offset += 4;
33749
- handleIncomingPacket(stdout2.subarray(offset, offset + length));
34058
+ handleIncomingPacket(stdout3.subarray(offset, offset + length));
33750
34059
  offset += length;
33751
34060
  }
33752
34061
  if (offset > 0) {
33753
- stdout2.copyWithin(0, offset, stdoutUsed);
34062
+ stdout3.copyWithin(0, offset, stdoutUsed);
33754
34063
  stdoutUsed -= offset;
33755
34064
  }
33756
34065
  };
@@ -35236,12 +35545,12 @@ More information: The file containing the code for esbuild's JavaScript API (${_
35236
35545
  child.stdin.on("error", afterClose);
35237
35546
  child.on("error", afterClose);
35238
35547
  const stdin = child.stdin;
35239
- const stdout2 = child.stdout;
35240
- stdout2.on("data", readFromStdout);
35241
- stdout2.on("end", afterClose);
35548
+ const stdout3 = child.stdout;
35549
+ stdout3.on("data", readFromStdout);
35550
+ stdout3.on("end", afterClose);
35242
35551
  stopService = () => {
35243
35552
  stdin.destroy();
35244
- stdout2.destroy();
35553
+ stdout3.destroy();
35245
35554
  child.kill();
35246
35555
  initializeWasCalled = false;
35247
35556
  longLivedService = undefined;
@@ -35252,8 +35561,8 @@ More information: The file containing the code for esbuild's JavaScript API (${_
35252
35561
  if (stdin.unref) {
35253
35562
  stdin.unref();
35254
35563
  }
35255
- if (stdout2.unref) {
35256
- stdout2.unref();
35564
+ if (stdout3.unref) {
35565
+ stdout3.unref();
35257
35566
  }
35258
35567
  const refs = {
35259
35568
  ref() {
@@ -35324,13 +35633,13 @@ More information: The file containing the code for esbuild's JavaScript API (${_
35324
35633
  esbuild: node_exports
35325
35634
  });
35326
35635
  callback(service);
35327
- let stdout2 = child_process.execFileSync(command, args2.concat(`--service=${"0.25.10"}`), {
35636
+ let stdout3 = child_process.execFileSync(command, args2.concat(`--service=${"0.25.10"}`), {
35328
35637
  cwd: defaultWD,
35329
35638
  windowsHide: true,
35330
35639
  input: stdin,
35331
35640
  maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
35332
35641
  });
35333
- readFromStdout(stdout2);
35642
+ readFromStdout(stdout3);
35334
35643
  afterClose(null);
35335
35644
  };
35336
35645
  var randomFileName = () => {
@@ -41066,33 +41375,33 @@ import tty from "tty";
41066
41375
  import { randomUUID } from "crypto";
41067
41376
  function assembleStyles() {
41068
41377
  const codes = /* @__PURE__ */ new Map;
41069
- for (const [groupName, group] of Object.entries(styles2)) {
41378
+ for (const [groupName, group] of Object.entries(styles3)) {
41070
41379
  for (const [styleName, style] of Object.entries(group)) {
41071
- styles2[styleName] = {
41380
+ styles3[styleName] = {
41072
41381
  open: `\x1B[${style[0]}m`,
41073
41382
  close: `\x1B[${style[1]}m`
41074
41383
  };
41075
- group[styleName] = styles2[styleName];
41384
+ group[styleName] = styles3[styleName];
41076
41385
  codes.set(style[0], style[1]);
41077
41386
  }
41078
- Object.defineProperty(styles2, groupName, {
41387
+ Object.defineProperty(styles3, groupName, {
41079
41388
  value: group,
41080
41389
  enumerable: false
41081
41390
  });
41082
41391
  }
41083
- Object.defineProperty(styles2, "codes", {
41392
+ Object.defineProperty(styles3, "codes", {
41084
41393
  value: codes,
41085
41394
  enumerable: false
41086
41395
  });
41087
- styles2.color.close = "\x1B[39m";
41088
- styles2.bgColor.close = "\x1B[49m";
41089
- styles2.color.ansi = wrapAnsi16();
41090
- styles2.color.ansi256 = wrapAnsi256();
41091
- styles2.color.ansi16m = wrapAnsi16m();
41092
- styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
41093
- styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
41094
- styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
41095
- Object.defineProperties(styles2, {
41396
+ styles3.color.close = "\x1B[39m";
41397
+ styles3.bgColor.close = "\x1B[49m";
41398
+ styles3.color.ansi = wrapAnsi16();
41399
+ styles3.color.ansi256 = wrapAnsi256();
41400
+ styles3.color.ansi16m = wrapAnsi16m();
41401
+ styles3.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
41402
+ styles3.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
41403
+ styles3.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
41404
+ Object.defineProperties(styles3, {
41096
41405
  rgbToAnsi256: {
41097
41406
  value(red, green, blue) {
41098
41407
  if (red === green && green === blue) {
@@ -41128,7 +41437,7 @@ function assembleStyles() {
41128
41437
  enumerable: false
41129
41438
  },
41130
41439
  hexToAnsi256: {
41131
- value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
41440
+ value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
41132
41441
  enumerable: false
41133
41442
  },
41134
41443
  ansi256ToAnsi: {
@@ -41166,15 +41475,15 @@ function assembleStyles() {
41166
41475
  enumerable: false
41167
41476
  },
41168
41477
  rgbToAnsi: {
41169
- value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
41478
+ value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
41170
41479
  enumerable: false
41171
41480
  },
41172
41481
  hexToAnsi: {
41173
- value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
41482
+ value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
41174
41483
  enumerable: false
41175
41484
  }
41176
41485
  });
41177
- return styles2;
41486
+ return styles3;
41178
41487
  }
41179
41488
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
41180
41489
  const prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -43738,7 +44047,7 @@ var __create2, __defProp3, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2,
43738
44047
  __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
43739
44048
  }
43740
44049
  return to;
43741
- }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value), ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles2, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default, init_ansi_styles, env, flagForceColor, supportsColor, supports_color_default, init_supports_color, init_utilities, stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles22, applyOptions, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default, init_source, require_old, require_fs, require_path, require_balanced_match, require_brace_expansion, require_minimatch, require_inherits_browser, require_inherits, require_common2, require_sync, require_wrappy, require_once, require_inflight, require_glob, require_readline, require_src2, require_utils, require_lodash, require_hanji, originUUID, snapshotVersion, mapValues, mapKeys, mapEntries, customMapEntries, init_global2, util4, objectUtil3, ZodParsedType3, getParsedType3, init_util2, ZodIssueCode3, ZodError4, init_ZodError2, errorMap3, en_default3, init_en2, overrideErrorMap3, init_errors4, makeIssue3, ParseStatus3, INVALID3, DIRTY3, OK3, isAborted3, isDirty3, isValid3, isAsync3, init_parseUtil2, init_typeAliases2, errorUtil3, init_errorUtil2, ParseInputLazyPath3, handleResult3, ZodType3, cuidRegex3, cuid2Regex3, ulidRegex3, uuidRegex3, nanoidRegex3, jwtRegex3, durationRegex3, emailRegex3, _emojiRegex3, emojiRegex3, ipv4Regex3, ipv4CidrRegex3, ipv6Regex3, ipv6CidrRegex3, base64Regex3, base64urlRegex3, dateRegexSource3, dateRegex3, ZodString3, ZodNumber3, ZodBigInt3, ZodBoolean3, ZodDate3, ZodSymbol3, ZodUndefined3, ZodNull3, ZodAny3, ZodUnknown3, ZodNever3, ZodVoid3, ZodArray3, ZodObject3, ZodUnion3, getDiscriminator3, ZodDiscriminatedUnion3, ZodIntersection3, ZodTuple3, ZodRecord3, ZodMap3, ZodSet3, ZodFunction3, ZodLazy3, ZodLiteral3, ZodEnum3, ZodNativeEnum3, ZodPromise3, ZodEffects3, ZodOptional3, ZodNullable3, ZodDefault3, ZodCatch3, ZodNaN3, BRAND3, ZodBranded3, ZodPipeline3, ZodReadonly3, late3, ZodFirstPartyTypeKind3, stringType3, numberType3, nanType3, bigIntType3, booleanType3, dateType3, symbolType3, undefinedType3, nullType3, anyType3, unknownType3, neverType3, voidType3, arrayType3, objectType3, strictObjectType3, unionType3, discriminatedUnionType3, intersectionType3, tupleType3, recordType3, mapType3, setType3, functionType3, lazyType3, literalType3, enumType3, nativeEnumType3, promiseType3, effectsType3, optionalType3, nullableType3, preprocessType3, pipelineType3, coerce3, init_types8, init_external2, init_v32, init_esm2, enumSchema, enumSchemaV1, indexColumn, index2, fk, sequenceSchema, roleSchema, sequenceSquashed, column2, checkConstraint, columnSquashed, compositePK, uniqueConstraint, policy, policySquashed, viewWithOption, matViewWithOption, mergedViewWithOption, view2, table15, schemaHash, kitInternals, gelSchemaExternal, gelSchemaInternal, tableSquashed, gelSchemaSquashed, gelSchema, dryGel, init_gelSchema, index22, fk2, column22, tableV3, compositePK2, uniqueConstraint2, checkConstraint2, tableV4, table22, viewMeta, view22, kitInternals2, dialect2, schemaHash2, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema2, tableSquashedV4, tableSquashed2, viewSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql, init_mysqlSchema, indexV2, columnV2, tableV2, enumSchemaV12, enumSchema2, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn2, index3, indexV4, indexV5, indexV6, fk3, sequenceSchema2, roleSchema2, sequenceSquashed2, columnV7, column3, checkConstraint3, columnSquashed2, tableV32, compositePK3, uniqueConstraint3, policy2, policySquashed2, viewWithOption2, matViewWithOption2, mergedViewWithOption2, view3, tableV42, tableV5, tableV6, tableV7, table32, schemaHash3, kitInternals3, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaInternalV6, pgSchemaExternal, pgSchemaInternalV7, pgSchemaInternal, tableSquashed3, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashedV6, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchemaV6, pgSchemaV7, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg, init_pgSchema, index4, column4, compositePK4, uniqueConstraint4, table42, viewMeta2, kitInternals4, dialect22, schemaHash4, schemaInternal2, schema22, tableSquashed4, schemaSquashed2, SingleStoreSquasher, squashSingleStoreScheme, singlestoreSchema, singlestoreSchemaSquashed, backwardCompatibleSingleStoreSchema, drySingleStore, init_singlestoreSchema, index5, fk4, compositePK5, column5, tableV33, uniqueConstraint5, checkConstraint4, table52, view4, dialect3, schemaHash5, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals5, latestVersion, schemaInternal3, schemaV32, schemaV42, schemaV52, schema3, tableSquashed5, schemaSquashed3, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema, init_sqliteSchema, copy, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey, init_utils5, import_hanji, warning, error, isRenamePromptItem, ResolveColumnSelect, tableKey, ResolveSelectNamed, ResolveSelect, ResolveSchemasSelect, Spinner2, ProgressView, init_views, glob, init_serializer, fillPgSnapshot, init_migrationPreparator, require_heap, require_heap2, require_difflib, require_difflib2, require_util, require_styles, require_has_flag2, require_supports_colors, require_trap, require_zalgo, require_america, require_zebra, require_rainbow, require_random, require_colors, require_safe, require_colorize, require_lib, import_json_diff, mapArraysDiff, findAlternationsInTable, alternationsInColumn, init_jsonDiffer, parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, SingleStoreRecreateTableConvertor, convertors, init_sqlgenerator, _moveDataStatements, getOldTableName, getNewTableName, logSuggestionsAndReturn, init_sqlitePushUtils, preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSingleStoreCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumValues, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateRoleJson, prepareAlterRoleJson, prepareDropRoleJson, prepareRenameRoleJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, prepareRenamePolicyJsons, prepareRenameIndPolicyJsons, prepareCreatePolicyJsons, prepareCreateIndPolicyJsons, prepareDropPolicyJsons, prepareDropIndPolicyJsons, prepareAlterPolicyJson, prepareAlterIndPolicyJson, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCheckConstraint, prepareDeleteCheckConstraint, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql, preparePgCreateViewJson, prepareMySqlCreateViewJson, prepareSqliteCreateViewJson, prepareDropViewJson, prepareRenameViewJson, preparePgAlterViewAlterSchemaJson, preparePgAlterViewAddWithOptionJson, preparePgAlterViewDropWithOptionJson, preparePgAlterViewAlterTablespaceJson, preparePgAlterViewAlterUsingJson, prepareMySqlAlterView, init_jsonStatements, prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements, prepareSingleStoreRecreateTable, singleStoreCombineStatements, init_statementCombiner, snapshotsDiffer_exports, makeChanged, makeSelfOrChanged, makePatched, makeSelfOrPatched, columnSchema, alteredColumnSchema, enumSchema3, changedEnumSchema, tableScheme, alteredTableScheme, alteredViewCommon, alteredPgViewSchema, alteredMySqlViewSchema, diffResultScheme, diffResultSchemeMysql, diffResultSchemeSingleStore, diffResultSchemeSQLite, schemaChangeFor, nameChangeFor, nameSchemaChangeFor, columnChangeFor, applyPgSnapshotsDiff, applyMysqlSnapshotsDiff, applySingleStoreSnapshotsDiff, applySqliteSnapshotsDiff, applyLibSQLSnapshotsDiff, init_snapshotsDiffer, init_words, dialects, dialect4, commonSquashedSchema, commonSchema, init_schemaValidator, sqliteDriversLiterals, postgresqlDriversLiterals, prefixes, prefix, casingTypes, casingType, sqliteDriver, postgresDriver, driver2, configMigrations, configCommonSchema, casing, introspectParams, configIntrospectCliSchema, configGenerateSchema, configPushSchema, init_common2, withStyle, init_outputs, import_hanji2, schemasResolver, tablesResolver, viewsResolver, mySqlViewsResolver, sqliteViewsResolver, sequencesResolver, roleResolver, policyResolver, indPolicyResolver, enumsResolver, columnsResolver, promptColumnsConflicts, promptNamedConflict, promptNamedWithSchemasConflict, promptSchemasConflict, BREAKPOINT, init_migrate, posixClasses, braceEscape, regexpEscape, rangesToString, parseClass, init_brace_expressions, escape, init_escape, unescape, init_unescape, import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match2, globUnescape, globMagic, regExpEscape, Minimatch, init_mjs, entityKind2, hasOwnEntityKind2, init_entity2, _a, Column2, init_column2, _a2, ColumnBuilder2, init_column_builder2, TableName2, init_table_utils2, _a3, ForeignKeyBuilder2, _a4, ForeignKey2, init_foreign_keys2, init_tracing_utils2, _a5, UniqueConstraintBuilder, _a6, UniqueOnConstraintBuilder, _a7, UniqueConstraint, init_unique_constraint2, init_array2, _a8, _b, PgColumnBuilder2, _a9, _b2, PgColumn2, _a10, _b3, ExtraConfigColumn2, _a11, IndexedColumn2, _a12, _b4, PgArrayBuilder2, _a13, _b5, _PgArray, PgArray2, init_common22, _a14, _b6, PgEnumObjectColumnBuilder2, _a15, _b7, PgEnumObjectColumn2, isPgEnumSym2, _a16, _b8, PgEnumColumnBuilder2, _a17, _b9, PgEnumColumn2, init_enum2, _a18, Subquery2, _a19, _b10, WithSubquery2, init_subquery2, version2, init_version2, otel2, rawTracer2, tracer2, init_tracing2, ViewBaseConfig2, init_view_common3, Schema2, Columns2, ExtraConfigColumns2, OriginalName2, BaseName2, IsAlias2, ExtraConfigBuilder2, IsDrizzleTable2, _a20, _b11, _c, _d, _e2, _f, _g, _h, _i, _j, Table2, init_table15, _a21, FakePrimitiveParam, _a22, StringChunk2, _a23, _SQL, SQL2, _a24, Name2, noopDecoder2, noopEncoder2, noopMapper2, _a25, Param2, _a26, Placeholder2, IsDrizzleView2, _a27, _b12, _c2, View3, init_sql3, _a28, ColumnAliasProxyHandler2, _a29, TableAliasProxyHandler2, _a30, RelationTableAliasProxyHandler, init_alias3, _a31, _b13, DrizzleError2, DrizzleQueryError, _a32, _b14, TransactionRollbackError2, init_errors22, _a33, ConsoleLogWriter2, _a34, DefaultLogger2, _a35, NoopLogger2, init_logger3, init_operations, _a36, _b15, QueryPromise2, init_query_promise2, textDecoder, init_utils22, _a37, _b16, PgIntColumnBaseBuilder2, init_int_common2, _a38, _b17, PgBigInt53Builder2, _a39, _b18, PgBigInt532, _a40, _b19, PgBigInt64Builder2, _a41, _b20, PgBigInt642, init_bigint2, _a42, _b21, PgBigSerial53Builder2, _a43, _b22, PgBigSerial532, _a44, _b23, PgBigSerial64Builder2, _a45, _b24, PgBigSerial642, init_bigserial2, _a46, _b25, PgBooleanBuilder2, _a47, _b26, PgBoolean2, init_boolean2, _a48, _b27, PgCharBuilder2, _a49, _b28, PgChar2, init_char2, _a50, _b29, PgCidrBuilder2, _a51, _b30, PgCidr2, init_cidr2, _a52, _b31, PgCustomColumnBuilder2, _a53, _b32, PgCustomColumn2, init_custom2, _a54, _b33, PgDateColumnBaseBuilder2, init_date_common2, _a55, _b34, PgDateBuilder2, _a56, _b35, PgDate2, _a57, _b36, PgDateStringBuilder2, _a58, _b37, PgDateString2, init_date2, _a59, _b38, PgDoublePrecisionBuilder2, _a60, _b39, PgDoublePrecision2, init_double_precision2, _a61, _b40, PgInetBuilder2, _a62, _b41, PgInet2, init_inet2, _a63, _b42, PgIntegerBuilder2, _a64, _b43, PgInteger2, init_integer2, _a65, _b44, PgIntervalBuilder2, _a66, _b45, PgInterval2, init_interval2, _a67, _b46, PgJsonBuilder2, _a68, _b47, PgJson2, init_json2, _a69, _b48, PgJsonbBuilder2, _a70, _b49, PgJsonb2, init_jsonb2, _a71, _b50, PgLineBuilder2, _a72, _b51, PgLineTuple2, _a73, _b52, PgLineABCBuilder2, _a74, _b53, PgLineABC2, init_line2, _a75, _b54, PgMacaddrBuilder2, _a76, _b55, PgMacaddr2, init_macaddr2, _a77, _b56, PgMacaddr8Builder2, _a78, _b57, PgMacaddr82, init_macaddr82, _a79, _b58, PgNumericBuilder2, _a80, _b59, PgNumeric2, _a81, _b60, PgNumericNumberBuilder2, _a82, _b61, PgNumericNumber2, _a83, _b62, PgNumericBigIntBuilder2, _a84, _b63, PgNumericBigInt2, init_numeric2, _a85, _b64, PgPointTupleBuilder2, _a86, _b65, PgPointTuple2, _a87, _b66, PgPointObjectBuilder2, _a88, _b67, PgPointObject2, init_point2, init_utils32, _a89, _b68, PgGeometryBuilder2, _a90, _b69, PgGeometry2, _a91, _b70, PgGeometryObjectBuilder2, _a92, _b71, PgGeometryObject2, init_geometry2, _a93, _b72, PgRealBuilder2, _a94, _b73, PgReal2, init_real2, _a95, _b74, PgSerialBuilder2, _a96, _b75, PgSerial2, init_serial2, _a97, _b76, PgSmallIntBuilder2, _a98, _b77, PgSmallInt2, init_smallint2, _a99, _b78, PgSmallSerialBuilder2, _a100, _b79, PgSmallSerial2, init_smallserial2, _a101, _b80, PgTextBuilder2, _a102, _b81, PgText2, init_text2, _a103, _b82, PgTimeBuilder2, _a104, _b83, PgTime2, init_time2, _a105, _b84, PgTimestampBuilder2, _a106, _b85, PgTimestamp2, _a107, _b86, PgTimestampStringBuilder2, _a108, _b87, PgTimestampString2, init_timestamp2, _a109, _b88, PgUUIDBuilder2, _a110, _b89, PgUUID2, init_uuid3, _a111, _b90, PgVarcharBuilder2, _a112, _b91, PgVarchar2, init_varchar2, _a113, _b92, PgBinaryVectorBuilder2, _a114, _b93, PgBinaryVector2, init_bit2, _a115, _b94, PgHalfVectorBuilder2, _a116, _b95, PgHalfVector2, init_halfvec2, _a117, _b96, PgSparseVectorBuilder2, _a118, _b97, PgSparseVector2, init_sparsevec2, _a119, _b98, PgVectorBuilder2, _a120, _b99, PgVector2, init_vector3, init_all2, InlineForeignKeys2, EnableRLS2, _a121, _b100, _c3, _d2, _e22, _f2, PgTable2, pgTable2, init_table22, _a122, PrimaryKeyBuilder2, _a123, PrimaryKey2, init_primary_keys2, eq2, ne3, gt3, gte2, lt3, lte2, init_conditions2, init_select3, init_expressions2, _a124, Relation2, _a125, Relations2, _a126, _b101, _One, One2, _a127, _b102, _Many, Many2, init_relations2, init_aggregate2, init_vector22, init_functions2, init_sql22, dist_exports, init_dist6, init_alias22, _a128, CheckBuilder, _a129, Check, init_checks2, init_columns2, _a130, _SelectionProxyHandler, SelectionProxyHandler2, init_selection_proxy2, _a131, IndexBuilderOn2, _a132, IndexBuilder2, _a133, Index2, init_indexes2, _a134, PgPolicy, init_policies2, PgViewConfig2, init_view_common22, _a135, CasingCache2, init_casing2, _a136, _b103, PgViewBase2, init_view_base2, _a137, PgDialect2, init_dialect2, _a138, TypedQueryBuilder2, init_query_builder3, _a139, PgSelectBuilder2, _a140, _b104, PgSelectQueryBuilderBase2, _a141, _b105, PgSelectBase2, getPgSetOperators2, union2, unionAll2, intersect2, intersectAll2, except2, exceptAll2, init_select22, _a142, QueryBuilder2, init_query_builder22, _a143, DefaultViewBuilderCore, _a144, _b106, ViewBuilder, _a145, _b107, ManualViewBuilder, _a146, MaterializedViewBuilderCore, _a147, _b108, MaterializedViewBuilder, _a148, _b109, ManualMaterializedViewBuilder, _a149, _b110, _c4, PgView2, PgMaterializedViewConfig2, _a150, _b111, _c5, PgMaterializedView, init_view2, init_utils42, _a151, _b112, PgDeleteBase2, init_delete2, _a152, PgInsertBuilder2, _a153, _b113, PgInsertBase2, init_insert2, _a154, _b114, PgRefreshMaterializedView2, init_refresh_materialized_view2, init_select_types, _a155, PgUpdateBuilder2, _a156, _b115, PgUpdateBase2, init_update2, init_query_builders2, _a157, _b116, _c6, _PgCountBuilder, PgCountBuilder2, init_count2, _a158, RelationalQueryBuilder2, _a159, _b117, PgRelationalQuery2, init_query2, _a160, _b118, PgRaw2, init_raw2, _a161, PgDatabase2, init_db2, _a162, PgRole, init_roles2, _a163, PgSequence, init_sequence2, _a164, PgSchema5, init_schema3, _a165, Cache, _a166, _b119, NoopCache, init_cache, _a167, PgPreparedQuery2, _a168, PgSession2, _a169, _b120, PgTransaction2, init_session3, init_subquery22, init_utils52, init_pg_core2, vectorOps, init_vector32, sqlToStr, init_utils6, indexName, generatePgSnapshot, trimChar, fromDatabase, defaultForColumn, getColumnsInfoQuery, init_pgSerializer, import_hanji4, Select, init_selector_ui, init_alias32, _a170, CheckBuilder2, _a171, Check2, init_checks22, _a172, ForeignKeyBuilder22, _a173, ForeignKey22, init_foreign_keys22, _a174, UniqueConstraintBuilder2, _a175, UniqueOnConstraintBuilder2, _a176, UniqueConstraint2, init_unique_constraint22, _a177, _b121, SQLiteColumnBuilder, _a178, _b122, SQLiteColumn, init_common3, _a179, _b123, SQLiteBigIntBuilder, _a180, _b124, SQLiteBigInt, _a181, _b125, SQLiteBlobJsonBuilder, _a182, _b126, SQLiteBlobJson, _a183, _b127, SQLiteBlobBufferBuilder, _a184, _b128, SQLiteBlobBuffer, init_blob, _a185, _b129, SQLiteCustomColumnBuilder, _a186, _b130, SQLiteCustomColumn, init_custom22, _a187, _b131, SQLiteBaseIntegerBuilder, _a188, _b132, SQLiteBaseInteger, _a189, _b133, SQLiteIntegerBuilder, _a190, _b134, SQLiteInteger, _a191, _b135, SQLiteTimestampBuilder, _a192, _b136, SQLiteTimestamp, _a193, _b137, SQLiteBooleanBuilder, _a194, _b138, SQLiteBoolean, init_integer22, _a195, _b139, SQLiteNumericBuilder, _a196, _b140, SQLiteNumeric, _a197, _b141, SQLiteNumericNumberBuilder, _a198, _b142, SQLiteNumericNumber, _a199, _b143, SQLiteNumericBigIntBuilder, _a200, _b144, SQLiteNumericBigInt, init_numeric22, _a201, _b145, SQLiteRealBuilder, _a202, _b146, SQLiteReal, init_real22, _a203, _b147, SQLiteTextBuilder, _a204, _b148, SQLiteText, _a205, _b149, SQLiteTextJsonBuilder, _a206, _b150, SQLiteTextJson, init_text22, init_columns22, init_all22, InlineForeignKeys22, _a207, _b151, _c7, _d3, _e3, SQLiteTable, sqliteTable, init_table32, _a208, IndexBuilderOn22, _a209, IndexBuilder22, _a210, Index4, init_indexes22, _a211, PrimaryKeyBuilder22, _a212, PrimaryKey22, init_primary_keys22, init_utils7, _a213, _b152, SQLiteDeleteBase, init_delete22, _a214, _b153, SQLiteViewBase, init_view_base22, _a215, SQLiteDialect, _a216, _b154, SQLiteSyncDialect, _a217, _b155, SQLiteAsyncDialect, init_dialect22, _a218, SQLiteSelectBuilder, _a219, _b156, SQLiteSelectQueryBuilderBase, _a220, _b157, SQLiteSelectBase, getSQLiteSetOperators, union3, unionAll22, intersect22, except22, init_select32, _a221, QueryBuilder22, init_query_builder32, _a222, SQLiteInsertBuilder, _a223, _b158, SQLiteInsertBase, init_insert22, init_select_types2, _a224, SQLiteUpdateBuilder, _a225, _b159, SQLiteUpdateBase, init_update22, init_query_builders22, _a226, _b160, _c8, _SQLiteCountBuilder, SQLiteCountBuilder, init_count22, _a227, RelationalQueryBuilder22, _a228, _b161, SQLiteRelationalQuery, _a229, _b162, SQLiteSyncRelationalQuery, init_query22, _a230, _b163, SQLiteRaw, init_raw22, _a231, BaseSQLiteDatabase, init_db22, _a232, _b164, ExecuteResultSync, _a233, SQLitePreparedQuery, _a234, SQLiteSession, _a235, _b165, SQLiteTransaction, init_session22, init_subquery3, _a236, ViewBuilderCore, _a237, _b166, ViewBuilder2, _a238, _b167, ManualViewBuilder2, _a239, _b168, SQLiteView2, init_view22, init_sqlite_core, generateSqliteSnapshot, fromDatabase2, init_sqliteSerializer, getTablesFilterByExtensions, init_getTablesFilterByExtensions, init_alias4, _a240, CheckBuilder3, _a241, Check3, init_checks3, _a242, ForeignKeyBuilder3, _a243, ForeignKey3, init_foreign_keys3, _a244, UniqueConstraintBuilder3, _a245, UniqueOnConstraintBuilder3, _a246, UniqueConstraint3, init_unique_constraint3, _a247, _b169, MySqlColumnBuilder, _a248, _b170, MySqlColumn, _a249, _b171, MySqlColumnBuilderWithAutoIncrement, _a250, _b172, MySqlColumnWithAutoIncrement, init_common4, _a251, _b173, MySqlBigInt53Builder, _a252, _b174, MySqlBigInt53, _a253, _b175, MySqlBigInt64Builder, _a254, _b176, MySqlBigInt64, init_bigint22, _a255, _b177, MySqlBinaryBuilder, _a256, _b178, MySqlBinary, init_binary, _a257, _b179, MySqlBooleanBuilder, _a258, _b180, MySqlBoolean, init_boolean22, _a259, _b181, MySqlCharBuilder, _a260, _b182, MySqlChar, init_char22, _a261, _b183, MySqlCustomColumnBuilder, _a262, _b184, MySqlCustomColumn, init_custom3, _a263, _b185, MySqlDateBuilder, _a264, _b186, MySqlDate, _a265, _b187, MySqlDateStringBuilder, _a266, _b188, MySqlDateString, init_date22, _a267, _b189, MySqlDateTimeBuilder, _a268, _b190, MySqlDateTime, _a269, _b191, MySqlDateTimeStringBuilder, _a270, _b192, MySqlDateTimeString, init_datetime, _a271, _b193, MySqlDecimalBuilder, _a272, _b194, MySqlDecimal, _a273, _b195, MySqlDecimalNumberBuilder, _a274, _b196, MySqlDecimalNumber, _a275, _b197, MySqlDecimalBigIntBuilder, _a276, _b198, MySqlDecimalBigInt, init_decimal, _a277, _b199, MySqlDoubleBuilder, _a278, _b200, MySqlDouble, init_double, _a279, _b201, MySqlEnumColumnBuilder, _a280, _b202, MySqlEnumColumn, _a281, _b203, MySqlEnumObjectColumnBuilder, _a282, _b204, MySqlEnumObjectColumn, init_enum22, _a283, _b205, MySqlFloatBuilder, _a284, _b206, MySqlFloat, init_float, _a285, _b207, MySqlIntBuilder, _a286, _b208, MySqlInt, init_int, _a287, _b209, MySqlJsonBuilder, _a288, _b210, MySqlJson, init_json22, _a289, _b211, MySqlMediumIntBuilder, _a290, _b212, MySqlMediumInt, init_mediumint, _a291, _b213, MySqlRealBuilder, _a292, _b214, MySqlReal, init_real3, _a293, _b215, MySqlSerialBuilder, _a294, _b216, MySqlSerial, init_serial22, _a295, _b217, MySqlSmallIntBuilder, _a296, _b218, MySqlSmallInt, init_smallint22, _a297, _b219, MySqlTextBuilder, _a298, _b220, MySqlText, init_text3, _a299, _b221, MySqlTimeBuilder, _a300, _b222, MySqlTime, init_time22, _a301, _b223, MySqlDateColumnBaseBuilder, _a302, _b224, MySqlDateBaseColumn, init_date_common22, _a303, _b225, MySqlTimestampBuilder, _a304, _b226, MySqlTimestamp, _a305, _b227, MySqlTimestampStringBuilder, _a306, _b228, MySqlTimestampString, init_timestamp22, _a307, _b229, MySqlTinyIntBuilder, _a308, _b230, MySqlTinyInt, init_tinyint, _a309, _b231, MySqlVarBinaryBuilder, _a310, _b232, MySqlVarBinary, init_varbinary, _a311, _b233, MySqlVarCharBuilder, _a312, _b234, MySqlVarChar, init_varchar22, _a313, _b235, MySqlYearBuilder, _a314, _b236, MySqlYear, init_year, init_columns3, _a315, _b237, _c9, _MySqlCountBuilder, MySqlCountBuilder, init_count3, _a316, IndexBuilderOn3, _a317, IndexBuilder3, _a318, Index5, init_indexes3, init_all3, InlineForeignKeys3, _a319, _b238, _c10, _d4, _e4, MySqlTable, mysqlTable, init_table42, _a320, PrimaryKeyBuilder3, _a321, PrimaryKey3, init_primary_keys3, MySqlViewConfig, init_view_common32, init_utils8, _a322, _b239, MySqlDeleteBase, init_delete3, _a323, _b240, MySqlViewBase, init_view_base3, _a324, MySqlDialect, init_dialect3, _a325, MySqlSelectBuilder, _a326, _b241, MySqlSelectQueryBuilderBase, _a327, _b242, MySqlSelectBase, getMySqlSetOperators, union4, unionAll3, intersect3, intersectAll22, except3, exceptAll22, init_select4, _a328, QueryBuilder3, init_query_builder4, _a329, MySqlInsertBuilder, _a330, _b243, MySqlInsertBase, init_insert3, init_select_types3, _a331, MySqlUpdateBuilder, _a332, _b244, MySqlUpdateBase, init_update3, init_query_builders3, _a333, RelationalQueryBuilder3, _a334, _b245, MySqlRelationalQuery, init_query3, _a335, MySqlDatabase, init_db3, _a336, ViewBuilderCore2, _a337, _b246, ViewBuilder3, _a338, _b247, ManualViewBuilder3, _a339, _b248, _c11, MySqlView2, init_view3, _a340, MySqlSchema5, init_schema22, _a341, MySqlPreparedQuery, _a342, MySqlSession, _a343, _b249, MySqlTransaction, init_session32, init_subquery4, init_mysql_core, handleEnumType, generateMySqlSnapshot, fromDatabase3, init_mysqlSerializer, cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck, init_cli, gelCredentials, init_gel, libSQLCredentials, init_libsql, mysqlCredentials, init_mysql, postgresCredentials, init_postgres, singlestoreCredentials, init_singlestore, sqliteCredentials, init_sqlite, credentials, studioCliParams, studioConfig, init_studio, es5_exports, _3, es5_default, init_es5, import_hanji7, assertES5, safeRegister, migrateConfig, init_utils9, prepareFromExports, init_pgImports, init_alias5, _a344, UniqueConstraintBuilder4, _a345, UniqueOnConstraintBuilder4, _a346, UniqueConstraint4, init_unique_constraint4, _a347, _b250, SingleStoreColumnBuilder, _a348, _b251, SingleStoreColumn, _a349, _b252, SingleStoreColumnBuilderWithAutoIncrement, _a350, _b253, SingleStoreColumnWithAutoIncrement, init_common5, _a351, _b254, SingleStoreBigInt53Builder, _a352, _b255, SingleStoreBigInt53, _a353, _b256, SingleStoreBigInt64Builder, _a354, _b257, SingleStoreBigInt64, init_bigint3, _a355, _b258, SingleStoreBinaryBuilder, _a356, _b259, SingleStoreBinary, init_binary2, _a357, _b260, SingleStoreBooleanBuilder, _a358, _b261, SingleStoreBoolean, init_boolean3, _a359, _b262, SingleStoreCharBuilder, _a360, _b263, SingleStoreChar, init_char3, _a361, _b264, SingleStoreCustomColumnBuilder, _a362, _b265, SingleStoreCustomColumn, init_custom4, _a363, _b266, SingleStoreDateBuilder, _a364, _b267, SingleStoreDate, _a365, _b268, SingleStoreDateStringBuilder, _a366, _b269, SingleStoreDateString, init_date3, _a367, _b270, SingleStoreDateTimeBuilder, _a368, _b271, SingleStoreDateTime, _a369, _b272, SingleStoreDateTimeStringBuilder, _a370, _b273, SingleStoreDateTimeString, init_datetime2, _a371, _b274, SingleStoreDecimalBuilder, _a372, _b275, SingleStoreDecimal, _a373, _b276, SingleStoreDecimalNumberBuilder, _a374, _b277, SingleStoreDecimalNumber, _a375, _b278, SingleStoreDecimalBigIntBuilder, _a376, _b279, SingleStoreDecimalBigInt, init_decimal2, _a377, _b280, SingleStoreDoubleBuilder, _a378, _b281, SingleStoreDouble, init_double2, _a379, _b282, SingleStoreEnumColumnBuilder, _a380, _b283, SingleStoreEnumColumn, init_enum3, _a381, _b284, SingleStoreFloatBuilder, _a382, _b285, SingleStoreFloat, init_float2, _a383, _b286, SingleStoreIntBuilder, _a384, _b287, SingleStoreInt, init_int2, _a385, _b288, SingleStoreJsonBuilder, _a386, _b289, SingleStoreJson, init_json3, _a387, _b290, SingleStoreMediumIntBuilder, _a388, _b291, SingleStoreMediumInt, init_mediumint2, _a389, _b292, SingleStoreRealBuilder, _a390, _b293, SingleStoreReal, init_real4, _a391, _b294, SingleStoreSerialBuilder, _a392, _b295, SingleStoreSerial, init_serial3, _a393, _b296, SingleStoreSmallIntBuilder, _a394, _b297, SingleStoreSmallInt, init_smallint3, _a395, _b298, SingleStoreTextBuilder, _a396, _b299, SingleStoreText, init_text4, _a397, _b300, SingleStoreTimeBuilder, _a398, _b301, SingleStoreTime, init_time3, _a399, _b302, SingleStoreDateColumnBaseBuilder, _a400, _b303, SingleStoreDateBaseColumn, init_date_common3, _a401, _b304, SingleStoreTimestampBuilder, _a402, _b305, SingleStoreTimestamp, _a403, _b306, SingleStoreTimestampStringBuilder, _a404, _b307, SingleStoreTimestampString, init_timestamp3, _a405, _b308, SingleStoreTinyIntBuilder, _a406, _b309, SingleStoreTinyInt, init_tinyint2, _a407, _b310, SingleStoreVarBinaryBuilder, _a408, _b311, SingleStoreVarBinary, init_varbinary2, _a409, _b312, SingleStoreVarCharBuilder, _a410, _b313, SingleStoreVarChar, init_varchar3, _a411, _b314, SingleStoreVectorBuilder, _a412, _b315, SingleStoreVector, init_vector4, _a413, _b316, SingleStoreYearBuilder, _a414, _b317, SingleStoreYear, init_year2, init_columns4, _a415, _b318, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder, init_count4, _a416, IndexBuilderOn4, _a417, IndexBuilder4, _a418, Index6, init_indexes4, init_all4, _a419, _b319, _c13, _d5, SingleStoreTable, init_table52, _a420, PrimaryKeyBuilder4, _a421, PrimaryKey4, init_primary_keys4, init_utils10, _a422, _b320, SingleStoreDeleteBase, init_delete4, _a423, SingleStoreInsertBuilder, _a424, _b321, SingleStoreInsertBase, init_insert4, _a425, SingleStoreDialect, init_dialect4, _a426, SingleStoreSelectBuilder, _a427, _b322, SingleStoreSelectQueryBuilderBase, _a428, _b323, SingleStoreSelectBase, getSingleStoreSetOperators, union5, unionAll4, intersect4, except4, minus, init_select5, _a429, QueryBuilder4, init_query_builder5, init_select_types4, _a430, SingleStoreUpdateBuilder, _a431, _b324, SingleStoreUpdateBase, init_update4, init_query_builders4, _a432, SingleStoreDatabase, init_db4, _a433, SingleStoreSchema5, init_schema32, _a434, SingleStorePreparedQuery, _a435, SingleStoreSession, _a436, _b325, SingleStoreTransaction, init_session4, init_subquery5, init_singlestore_core, dialect5, generateSingleStoreSnapshot, fromDatabase4, init_singlestoreSerializer, sqliteImports_exports, prepareFromExports2, prepareFromSqliteImports, init_sqliteImports, mysqlImports_exports, prepareFromExports3, prepareFromMySqlImports, init_mysqlImports, mysqlPushUtils_exports, import_hanji8, filterStatements, logSuggestionsAndReturn2, init_mysqlPushUtils, mysqlIntrospect_exports, import_hanji9, mysqlPushIntrospect, init_mysqlIntrospect, singlestoreImports_exports, prepareFromExports4, prepareFromSingleStoreImports, init_singlestoreImports, singlestorePushUtils_exports, import_hanji10, filterStatements2, logSuggestionsAndReturn3, init_singlestorePushUtils, singlestoreIntrospect_exports, import_hanji11, singlestorePushIntrospect, init_singlestoreIntrospect, import_hanji3, pgPushIntrospect = async (db2, filters, schemaFilters, entities, tsSchema) => {
44050
+ }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value), ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles3, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default, init_ansi_styles, env, flagForceColor, supportsColor, supports_color_default, init_supports_color, init_utilities, stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles22, applyOptions, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default, init_source, require_old, require_fs, require_path, require_balanced_match, require_brace_expansion, require_minimatch, require_inherits_browser, require_inherits, require_common2, require_sync, require_wrappy, require_once, require_inflight, require_glob, require_readline, require_src2, require_utils, require_lodash, require_hanji, originUUID, snapshotVersion, mapValues, mapKeys, mapEntries, customMapEntries, init_global2, util4, objectUtil3, ZodParsedType3, getParsedType3, init_util2, ZodIssueCode3, ZodError4, init_ZodError2, errorMap3, en_default3, init_en2, overrideErrorMap3, init_errors4, makeIssue3, ParseStatus3, INVALID3, DIRTY3, OK3, isAborted3, isDirty3, isValid3, isAsync3, init_parseUtil2, init_typeAliases2, errorUtil3, init_errorUtil2, ParseInputLazyPath3, handleResult3, ZodType3, cuidRegex3, cuid2Regex3, ulidRegex3, uuidRegex3, nanoidRegex3, jwtRegex3, durationRegex3, emailRegex3, _emojiRegex3, emojiRegex3, ipv4Regex3, ipv4CidrRegex3, ipv6Regex3, ipv6CidrRegex3, base64Regex3, base64urlRegex3, dateRegexSource3, dateRegex3, ZodString3, ZodNumber3, ZodBigInt3, ZodBoolean3, ZodDate3, ZodSymbol3, ZodUndefined3, ZodNull3, ZodAny3, ZodUnknown3, ZodNever3, ZodVoid3, ZodArray3, ZodObject3, ZodUnion3, getDiscriminator3, ZodDiscriminatedUnion3, ZodIntersection3, ZodTuple3, ZodRecord3, ZodMap3, ZodSet3, ZodFunction3, ZodLazy3, ZodLiteral3, ZodEnum3, ZodNativeEnum3, ZodPromise3, ZodEffects3, ZodOptional3, ZodNullable3, ZodDefault3, ZodCatch3, ZodNaN3, BRAND3, ZodBranded3, ZodPipeline3, ZodReadonly3, late3, ZodFirstPartyTypeKind3, stringType3, numberType3, nanType3, bigIntType3, booleanType3, dateType3, symbolType3, undefinedType3, nullType3, anyType3, unknownType3, neverType3, voidType3, arrayType3, objectType3, strictObjectType3, unionType3, discriminatedUnionType3, intersectionType3, tupleType3, recordType3, mapType3, setType3, functionType3, lazyType3, literalType3, enumType3, nativeEnumType3, promiseType3, effectsType3, optionalType3, nullableType3, preprocessType3, pipelineType3, coerce3, init_types8, init_external2, init_v32, init_esm2, enumSchema, enumSchemaV1, indexColumn, index2, fk, sequenceSchema, roleSchema, sequenceSquashed, column2, checkConstraint, columnSquashed, compositePK, uniqueConstraint, policy, policySquashed, viewWithOption, matViewWithOption, mergedViewWithOption, view2, table15, schemaHash, kitInternals, gelSchemaExternal, gelSchemaInternal, tableSquashed, gelSchemaSquashed, gelSchema, dryGel, init_gelSchema, index22, fk2, column22, tableV3, compositePK2, uniqueConstraint2, checkConstraint2, tableV4, table22, viewMeta, view22, kitInternals2, dialect2, schemaHash2, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema2, tableSquashedV4, tableSquashed2, viewSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql, init_mysqlSchema, indexV2, columnV2, tableV2, enumSchemaV12, enumSchema2, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn2, index3, indexV4, indexV5, indexV6, fk3, sequenceSchema2, roleSchema2, sequenceSquashed2, columnV7, column3, checkConstraint3, columnSquashed2, tableV32, compositePK3, uniqueConstraint3, policy2, policySquashed2, viewWithOption2, matViewWithOption2, mergedViewWithOption2, view3, tableV42, tableV5, tableV6, tableV7, table32, schemaHash3, kitInternals3, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaInternalV6, pgSchemaExternal, pgSchemaInternalV7, pgSchemaInternal, tableSquashed3, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashedV6, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchemaV6, pgSchemaV7, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg, init_pgSchema, index4, column4, compositePK4, uniqueConstraint4, table42, viewMeta2, kitInternals4, dialect22, schemaHash4, schemaInternal2, schema22, tableSquashed4, schemaSquashed2, SingleStoreSquasher, squashSingleStoreScheme, singlestoreSchema, singlestoreSchemaSquashed, backwardCompatibleSingleStoreSchema, drySingleStore, init_singlestoreSchema, index5, fk4, compositePK5, column5, tableV33, uniqueConstraint5, checkConstraint4, table52, view4, dialect3, schemaHash5, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals5, latestVersion, schemaInternal3, schemaV32, schemaV42, schemaV52, schema3, tableSquashed5, schemaSquashed3, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema, init_sqliteSchema, copy, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey, init_utils5, import_hanji, warning, error, isRenamePromptItem, ResolveColumnSelect, tableKey, ResolveSelectNamed, ResolveSelect, ResolveSchemasSelect, Spinner3, ProgressView, init_views, glob, init_serializer, fillPgSnapshot, init_migrationPreparator, require_heap, require_heap2, require_difflib, require_difflib2, require_util, require_styles, require_has_flag2, require_supports_colors, require_trap, require_zalgo, require_america, require_zebra, require_rainbow, require_random, require_colors, require_safe, require_colorize, require_lib, import_json_diff, mapArraysDiff, findAlternationsInTable, alternationsInColumn, init_jsonDiffer, parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, SingleStoreRecreateTableConvertor, convertors, init_sqlgenerator, _moveDataStatements, getOldTableName, getNewTableName, logSuggestionsAndReturn, init_sqlitePushUtils, preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSingleStoreCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumValues, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateRoleJson, prepareAlterRoleJson, prepareDropRoleJson, prepareRenameRoleJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, prepareRenamePolicyJsons, prepareRenameIndPolicyJsons, prepareCreatePolicyJsons, prepareCreateIndPolicyJsons, prepareDropPolicyJsons, prepareDropIndPolicyJsons, prepareAlterPolicyJson, prepareAlterIndPolicyJson, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCheckConstraint, prepareDeleteCheckConstraint, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql, preparePgCreateViewJson, prepareMySqlCreateViewJson, prepareSqliteCreateViewJson, prepareDropViewJson, prepareRenameViewJson, preparePgAlterViewAlterSchemaJson, preparePgAlterViewAddWithOptionJson, preparePgAlterViewDropWithOptionJson, preparePgAlterViewAlterTablespaceJson, preparePgAlterViewAlterUsingJson, prepareMySqlAlterView, init_jsonStatements, prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements, prepareSingleStoreRecreateTable, singleStoreCombineStatements, init_statementCombiner, snapshotsDiffer_exports, makeChanged, makeSelfOrChanged, makePatched, makeSelfOrPatched, columnSchema, alteredColumnSchema, enumSchema3, changedEnumSchema, tableScheme, alteredTableScheme, alteredViewCommon, alteredPgViewSchema, alteredMySqlViewSchema, diffResultScheme, diffResultSchemeMysql, diffResultSchemeSingleStore, diffResultSchemeSQLite, schemaChangeFor, nameChangeFor, nameSchemaChangeFor, columnChangeFor, applyPgSnapshotsDiff, applyMysqlSnapshotsDiff, applySingleStoreSnapshotsDiff, applySqliteSnapshotsDiff, applyLibSQLSnapshotsDiff, init_snapshotsDiffer, init_words, dialects, dialect4, commonSquashedSchema, commonSchema, init_schemaValidator, sqliteDriversLiterals, postgresqlDriversLiterals, prefixes, prefix, casingTypes, casingType, sqliteDriver, postgresDriver, driver2, configMigrations, configCommonSchema, casing, introspectParams, configIntrospectCliSchema, configGenerateSchema, configPushSchema, init_common2, withStyle, init_outputs, import_hanji2, schemasResolver, tablesResolver, viewsResolver, mySqlViewsResolver, sqliteViewsResolver, sequencesResolver, roleResolver, policyResolver, indPolicyResolver, enumsResolver, columnsResolver, promptColumnsConflicts, promptNamedConflict, promptNamedWithSchemasConflict, promptSchemasConflict, BREAKPOINT, init_migrate, posixClasses, braceEscape, regexpEscape, rangesToString, parseClass, init_brace_expressions, escape, init_escape, unescape, init_unescape, import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match2, globUnescape, globMagic, regExpEscape, Minimatch, init_mjs, entityKind2, hasOwnEntityKind2, init_entity2, _a, Column2, init_column2, _a2, ColumnBuilder2, init_column_builder2, TableName2, init_table_utils2, _a3, ForeignKeyBuilder2, _a4, ForeignKey2, init_foreign_keys2, init_tracing_utils2, _a5, UniqueConstraintBuilder, _a6, UniqueOnConstraintBuilder, _a7, UniqueConstraint, init_unique_constraint2, init_array2, _a8, _b, PgColumnBuilder2, _a9, _b2, PgColumn2, _a10, _b3, ExtraConfigColumn2, _a11, IndexedColumn2, _a12, _b4, PgArrayBuilder2, _a13, _b5, _PgArray, PgArray2, init_common22, _a14, _b6, PgEnumObjectColumnBuilder2, _a15, _b7, PgEnumObjectColumn2, isPgEnumSym2, _a16, _b8, PgEnumColumnBuilder2, _a17, _b9, PgEnumColumn2, init_enum2, _a18, Subquery2, _a19, _b10, WithSubquery2, init_subquery2, version2, init_version2, otel2, rawTracer2, tracer2, init_tracing2, ViewBaseConfig2, init_view_common3, Schema2, Columns2, ExtraConfigColumns2, OriginalName2, BaseName2, IsAlias2, ExtraConfigBuilder2, IsDrizzleTable2, _a20, _b11, _c, _d, _e2, _f, _g, _h, _i, _j, Table2, init_table15, _a21, FakePrimitiveParam, _a22, StringChunk2, _a23, _SQL, SQL2, _a24, Name2, noopDecoder2, noopEncoder2, noopMapper2, _a25, Param2, _a26, Placeholder2, IsDrizzleView2, _a27, _b12, _c2, View3, init_sql3, _a28, ColumnAliasProxyHandler2, _a29, TableAliasProxyHandler2, _a30, RelationTableAliasProxyHandler, init_alias3, _a31, _b13, DrizzleError2, DrizzleQueryError, _a32, _b14, TransactionRollbackError2, init_errors22, _a33, ConsoleLogWriter2, _a34, DefaultLogger2, _a35, NoopLogger2, init_logger3, init_operations, _a36, _b15, QueryPromise2, init_query_promise2, textDecoder, init_utils22, _a37, _b16, PgIntColumnBaseBuilder2, init_int_common2, _a38, _b17, PgBigInt53Builder2, _a39, _b18, PgBigInt532, _a40, _b19, PgBigInt64Builder2, _a41, _b20, PgBigInt642, init_bigint2, _a42, _b21, PgBigSerial53Builder2, _a43, _b22, PgBigSerial532, _a44, _b23, PgBigSerial64Builder2, _a45, _b24, PgBigSerial642, init_bigserial2, _a46, _b25, PgBooleanBuilder2, _a47, _b26, PgBoolean2, init_boolean2, _a48, _b27, PgCharBuilder2, _a49, _b28, PgChar2, init_char2, _a50, _b29, PgCidrBuilder2, _a51, _b30, PgCidr2, init_cidr2, _a52, _b31, PgCustomColumnBuilder2, _a53, _b32, PgCustomColumn2, init_custom2, _a54, _b33, PgDateColumnBaseBuilder2, init_date_common2, _a55, _b34, PgDateBuilder2, _a56, _b35, PgDate2, _a57, _b36, PgDateStringBuilder2, _a58, _b37, PgDateString2, init_date2, _a59, _b38, PgDoublePrecisionBuilder2, _a60, _b39, PgDoublePrecision2, init_double_precision2, _a61, _b40, PgInetBuilder2, _a62, _b41, PgInet2, init_inet2, _a63, _b42, PgIntegerBuilder2, _a64, _b43, PgInteger2, init_integer2, _a65, _b44, PgIntervalBuilder2, _a66, _b45, PgInterval2, init_interval2, _a67, _b46, PgJsonBuilder2, _a68, _b47, PgJson2, init_json2, _a69, _b48, PgJsonbBuilder2, _a70, _b49, PgJsonb2, init_jsonb2, _a71, _b50, PgLineBuilder2, _a72, _b51, PgLineTuple2, _a73, _b52, PgLineABCBuilder2, _a74, _b53, PgLineABC2, init_line2, _a75, _b54, PgMacaddrBuilder2, _a76, _b55, PgMacaddr2, init_macaddr2, _a77, _b56, PgMacaddr8Builder2, _a78, _b57, PgMacaddr82, init_macaddr82, _a79, _b58, PgNumericBuilder2, _a80, _b59, PgNumeric2, _a81, _b60, PgNumericNumberBuilder2, _a82, _b61, PgNumericNumber2, _a83, _b62, PgNumericBigIntBuilder2, _a84, _b63, PgNumericBigInt2, init_numeric2, _a85, _b64, PgPointTupleBuilder2, _a86, _b65, PgPointTuple2, _a87, _b66, PgPointObjectBuilder2, _a88, _b67, PgPointObject2, init_point2, init_utils32, _a89, _b68, PgGeometryBuilder2, _a90, _b69, PgGeometry2, _a91, _b70, PgGeometryObjectBuilder2, _a92, _b71, PgGeometryObject2, init_geometry2, _a93, _b72, PgRealBuilder2, _a94, _b73, PgReal2, init_real2, _a95, _b74, PgSerialBuilder2, _a96, _b75, PgSerial2, init_serial2, _a97, _b76, PgSmallIntBuilder2, _a98, _b77, PgSmallInt2, init_smallint2, _a99, _b78, PgSmallSerialBuilder2, _a100, _b79, PgSmallSerial2, init_smallserial2, _a101, _b80, PgTextBuilder2, _a102, _b81, PgText2, init_text2, _a103, _b82, PgTimeBuilder2, _a104, _b83, PgTime2, init_time2, _a105, _b84, PgTimestampBuilder2, _a106, _b85, PgTimestamp2, _a107, _b86, PgTimestampStringBuilder2, _a108, _b87, PgTimestampString2, init_timestamp2, _a109, _b88, PgUUIDBuilder2, _a110, _b89, PgUUID2, init_uuid3, _a111, _b90, PgVarcharBuilder2, _a112, _b91, PgVarchar2, init_varchar2, _a113, _b92, PgBinaryVectorBuilder2, _a114, _b93, PgBinaryVector2, init_bit2, _a115, _b94, PgHalfVectorBuilder2, _a116, _b95, PgHalfVector2, init_halfvec2, _a117, _b96, PgSparseVectorBuilder2, _a118, _b97, PgSparseVector2, init_sparsevec2, _a119, _b98, PgVectorBuilder2, _a120, _b99, PgVector2, init_vector3, init_all2, InlineForeignKeys2, EnableRLS2, _a121, _b100, _c3, _d2, _e22, _f2, PgTable2, pgTable2, init_table22, _a122, PrimaryKeyBuilder2, _a123, PrimaryKey2, init_primary_keys2, eq2, ne3, gt3, gte2, lt3, lte2, init_conditions2, init_select3, init_expressions2, _a124, Relation2, _a125, Relations2, _a126, _b101, _One, One2, _a127, _b102, _Many, Many2, init_relations2, init_aggregate2, init_vector22, init_functions2, init_sql22, dist_exports, init_dist6, init_alias22, _a128, CheckBuilder, _a129, Check, init_checks2, init_columns2, _a130, _SelectionProxyHandler, SelectionProxyHandler2, init_selection_proxy2, _a131, IndexBuilderOn2, _a132, IndexBuilder2, _a133, Index2, init_indexes2, _a134, PgPolicy, init_policies2, PgViewConfig2, init_view_common22, _a135, CasingCache2, init_casing2, _a136, _b103, PgViewBase2, init_view_base2, _a137, PgDialect2, init_dialect2, _a138, TypedQueryBuilder2, init_query_builder3, _a139, PgSelectBuilder2, _a140, _b104, PgSelectQueryBuilderBase2, _a141, _b105, PgSelectBase2, getPgSetOperators2, union2, unionAll2, intersect2, intersectAll2, except2, exceptAll2, init_select22, _a142, QueryBuilder2, init_query_builder22, _a143, DefaultViewBuilderCore, _a144, _b106, ViewBuilder, _a145, _b107, ManualViewBuilder, _a146, MaterializedViewBuilderCore, _a147, _b108, MaterializedViewBuilder, _a148, _b109, ManualMaterializedViewBuilder, _a149, _b110, _c4, PgView2, PgMaterializedViewConfig2, _a150, _b111, _c5, PgMaterializedView, init_view2, init_utils42, _a151, _b112, PgDeleteBase2, init_delete2, _a152, PgInsertBuilder2, _a153, _b113, PgInsertBase2, init_insert2, _a154, _b114, PgRefreshMaterializedView2, init_refresh_materialized_view2, init_select_types, _a155, PgUpdateBuilder2, _a156, _b115, PgUpdateBase2, init_update2, init_query_builders2, _a157, _b116, _c6, _PgCountBuilder, PgCountBuilder2, init_count2, _a158, RelationalQueryBuilder2, _a159, _b117, PgRelationalQuery2, init_query2, _a160, _b118, PgRaw2, init_raw2, _a161, PgDatabase2, init_db2, _a162, PgRole, init_roles2, _a163, PgSequence, init_sequence2, _a164, PgSchema5, init_schema3, _a165, Cache, _a166, _b119, NoopCache, init_cache, _a167, PgPreparedQuery2, _a168, PgSession2, _a169, _b120, PgTransaction2, init_session3, init_subquery22, init_utils52, init_pg_core2, vectorOps, init_vector32, sqlToStr, init_utils6, indexName, generatePgSnapshot, trimChar, fromDatabase, defaultForColumn, getColumnsInfoQuery, init_pgSerializer, import_hanji4, Select, init_selector_ui, init_alias32, _a170, CheckBuilder2, _a171, Check2, init_checks22, _a172, ForeignKeyBuilder22, _a173, ForeignKey22, init_foreign_keys22, _a174, UniqueConstraintBuilder2, _a175, UniqueOnConstraintBuilder2, _a176, UniqueConstraint2, init_unique_constraint22, _a177, _b121, SQLiteColumnBuilder, _a178, _b122, SQLiteColumn, init_common3, _a179, _b123, SQLiteBigIntBuilder, _a180, _b124, SQLiteBigInt, _a181, _b125, SQLiteBlobJsonBuilder, _a182, _b126, SQLiteBlobJson, _a183, _b127, SQLiteBlobBufferBuilder, _a184, _b128, SQLiteBlobBuffer, init_blob, _a185, _b129, SQLiteCustomColumnBuilder, _a186, _b130, SQLiteCustomColumn, init_custom22, _a187, _b131, SQLiteBaseIntegerBuilder, _a188, _b132, SQLiteBaseInteger, _a189, _b133, SQLiteIntegerBuilder, _a190, _b134, SQLiteInteger, _a191, _b135, SQLiteTimestampBuilder, _a192, _b136, SQLiteTimestamp, _a193, _b137, SQLiteBooleanBuilder, _a194, _b138, SQLiteBoolean, init_integer22, _a195, _b139, SQLiteNumericBuilder, _a196, _b140, SQLiteNumeric, _a197, _b141, SQLiteNumericNumberBuilder, _a198, _b142, SQLiteNumericNumber, _a199, _b143, SQLiteNumericBigIntBuilder, _a200, _b144, SQLiteNumericBigInt, init_numeric22, _a201, _b145, SQLiteRealBuilder, _a202, _b146, SQLiteReal, init_real22, _a203, _b147, SQLiteTextBuilder, _a204, _b148, SQLiteText, _a205, _b149, SQLiteTextJsonBuilder, _a206, _b150, SQLiteTextJson, init_text22, init_columns22, init_all22, InlineForeignKeys22, _a207, _b151, _c7, _d3, _e3, SQLiteTable, sqliteTable, init_table32, _a208, IndexBuilderOn22, _a209, IndexBuilder22, _a210, Index4, init_indexes22, _a211, PrimaryKeyBuilder22, _a212, PrimaryKey22, init_primary_keys22, init_utils7, _a213, _b152, SQLiteDeleteBase, init_delete22, _a214, _b153, SQLiteViewBase, init_view_base22, _a215, SQLiteDialect, _a216, _b154, SQLiteSyncDialect, _a217, _b155, SQLiteAsyncDialect, init_dialect22, _a218, SQLiteSelectBuilder, _a219, _b156, SQLiteSelectQueryBuilderBase, _a220, _b157, SQLiteSelectBase, getSQLiteSetOperators, union3, unionAll22, intersect22, except22, init_select32, _a221, QueryBuilder22, init_query_builder32, _a222, SQLiteInsertBuilder, _a223, _b158, SQLiteInsertBase, init_insert22, init_select_types2, _a224, SQLiteUpdateBuilder, _a225, _b159, SQLiteUpdateBase, init_update22, init_query_builders22, _a226, _b160, _c8, _SQLiteCountBuilder, SQLiteCountBuilder, init_count22, _a227, RelationalQueryBuilder22, _a228, _b161, SQLiteRelationalQuery, _a229, _b162, SQLiteSyncRelationalQuery, init_query22, _a230, _b163, SQLiteRaw, init_raw22, _a231, BaseSQLiteDatabase, init_db22, _a232, _b164, ExecuteResultSync, _a233, SQLitePreparedQuery, _a234, SQLiteSession, _a235, _b165, SQLiteTransaction, init_session22, init_subquery3, _a236, ViewBuilderCore, _a237, _b166, ViewBuilder2, _a238, _b167, ManualViewBuilder2, _a239, _b168, SQLiteView2, init_view22, init_sqlite_core, generateSqliteSnapshot, fromDatabase2, init_sqliteSerializer, getTablesFilterByExtensions, init_getTablesFilterByExtensions, init_alias4, _a240, CheckBuilder3, _a241, Check3, init_checks3, _a242, ForeignKeyBuilder3, _a243, ForeignKey3, init_foreign_keys3, _a244, UniqueConstraintBuilder3, _a245, UniqueOnConstraintBuilder3, _a246, UniqueConstraint3, init_unique_constraint3, _a247, _b169, MySqlColumnBuilder, _a248, _b170, MySqlColumn, _a249, _b171, MySqlColumnBuilderWithAutoIncrement, _a250, _b172, MySqlColumnWithAutoIncrement, init_common4, _a251, _b173, MySqlBigInt53Builder, _a252, _b174, MySqlBigInt53, _a253, _b175, MySqlBigInt64Builder, _a254, _b176, MySqlBigInt64, init_bigint22, _a255, _b177, MySqlBinaryBuilder, _a256, _b178, MySqlBinary, init_binary, _a257, _b179, MySqlBooleanBuilder, _a258, _b180, MySqlBoolean, init_boolean22, _a259, _b181, MySqlCharBuilder, _a260, _b182, MySqlChar, init_char22, _a261, _b183, MySqlCustomColumnBuilder, _a262, _b184, MySqlCustomColumn, init_custom3, _a263, _b185, MySqlDateBuilder, _a264, _b186, MySqlDate, _a265, _b187, MySqlDateStringBuilder, _a266, _b188, MySqlDateString, init_date22, _a267, _b189, MySqlDateTimeBuilder, _a268, _b190, MySqlDateTime, _a269, _b191, MySqlDateTimeStringBuilder, _a270, _b192, MySqlDateTimeString, init_datetime, _a271, _b193, MySqlDecimalBuilder, _a272, _b194, MySqlDecimal, _a273, _b195, MySqlDecimalNumberBuilder, _a274, _b196, MySqlDecimalNumber, _a275, _b197, MySqlDecimalBigIntBuilder, _a276, _b198, MySqlDecimalBigInt, init_decimal, _a277, _b199, MySqlDoubleBuilder, _a278, _b200, MySqlDouble, init_double, _a279, _b201, MySqlEnumColumnBuilder, _a280, _b202, MySqlEnumColumn, _a281, _b203, MySqlEnumObjectColumnBuilder, _a282, _b204, MySqlEnumObjectColumn, init_enum22, _a283, _b205, MySqlFloatBuilder, _a284, _b206, MySqlFloat, init_float, _a285, _b207, MySqlIntBuilder, _a286, _b208, MySqlInt, init_int, _a287, _b209, MySqlJsonBuilder, _a288, _b210, MySqlJson, init_json22, _a289, _b211, MySqlMediumIntBuilder, _a290, _b212, MySqlMediumInt, init_mediumint, _a291, _b213, MySqlRealBuilder, _a292, _b214, MySqlReal, init_real3, _a293, _b215, MySqlSerialBuilder, _a294, _b216, MySqlSerial, init_serial22, _a295, _b217, MySqlSmallIntBuilder, _a296, _b218, MySqlSmallInt, init_smallint22, _a297, _b219, MySqlTextBuilder, _a298, _b220, MySqlText, init_text3, _a299, _b221, MySqlTimeBuilder, _a300, _b222, MySqlTime, init_time22, _a301, _b223, MySqlDateColumnBaseBuilder, _a302, _b224, MySqlDateBaseColumn, init_date_common22, _a303, _b225, MySqlTimestampBuilder, _a304, _b226, MySqlTimestamp, _a305, _b227, MySqlTimestampStringBuilder, _a306, _b228, MySqlTimestampString, init_timestamp22, _a307, _b229, MySqlTinyIntBuilder, _a308, _b230, MySqlTinyInt, init_tinyint, _a309, _b231, MySqlVarBinaryBuilder, _a310, _b232, MySqlVarBinary, init_varbinary, _a311, _b233, MySqlVarCharBuilder, _a312, _b234, MySqlVarChar, init_varchar22, _a313, _b235, MySqlYearBuilder, _a314, _b236, MySqlYear, init_year, init_columns3, _a315, _b237, _c9, _MySqlCountBuilder, MySqlCountBuilder, init_count3, _a316, IndexBuilderOn3, _a317, IndexBuilder3, _a318, Index5, init_indexes3, init_all3, InlineForeignKeys3, _a319, _b238, _c10, _d4, _e4, MySqlTable, mysqlTable, init_table42, _a320, PrimaryKeyBuilder3, _a321, PrimaryKey3, init_primary_keys3, MySqlViewConfig, init_view_common32, init_utils8, _a322, _b239, MySqlDeleteBase, init_delete3, _a323, _b240, MySqlViewBase, init_view_base3, _a324, MySqlDialect, init_dialect3, _a325, MySqlSelectBuilder, _a326, _b241, MySqlSelectQueryBuilderBase, _a327, _b242, MySqlSelectBase, getMySqlSetOperators, union4, unionAll3, intersect3, intersectAll22, except3, exceptAll22, init_select4, _a328, QueryBuilder3, init_query_builder4, _a329, MySqlInsertBuilder, _a330, _b243, MySqlInsertBase, init_insert3, init_select_types3, _a331, MySqlUpdateBuilder, _a332, _b244, MySqlUpdateBase, init_update3, init_query_builders3, _a333, RelationalQueryBuilder3, _a334, _b245, MySqlRelationalQuery, init_query3, _a335, MySqlDatabase, init_db3, _a336, ViewBuilderCore2, _a337, _b246, ViewBuilder3, _a338, _b247, ManualViewBuilder3, _a339, _b248, _c11, MySqlView2, init_view3, _a340, MySqlSchema5, init_schema22, _a341, MySqlPreparedQuery, _a342, MySqlSession, _a343, _b249, MySqlTransaction, init_session32, init_subquery4, init_mysql_core, handleEnumType, generateMySqlSnapshot, fromDatabase3, init_mysqlSerializer, cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck, init_cli, gelCredentials, init_gel, libSQLCredentials, init_libsql, mysqlCredentials, init_mysql, postgresCredentials, init_postgres, singlestoreCredentials, init_singlestore, sqliteCredentials, init_sqlite, credentials, studioCliParams, studioConfig, init_studio, es5_exports, _3, es5_default, init_es5, import_hanji7, assertES5, safeRegister, migrateConfig, init_utils9, prepareFromExports, init_pgImports, init_alias5, _a344, UniqueConstraintBuilder4, _a345, UniqueOnConstraintBuilder4, _a346, UniqueConstraint4, init_unique_constraint4, _a347, _b250, SingleStoreColumnBuilder, _a348, _b251, SingleStoreColumn, _a349, _b252, SingleStoreColumnBuilderWithAutoIncrement, _a350, _b253, SingleStoreColumnWithAutoIncrement, init_common5, _a351, _b254, SingleStoreBigInt53Builder, _a352, _b255, SingleStoreBigInt53, _a353, _b256, SingleStoreBigInt64Builder, _a354, _b257, SingleStoreBigInt64, init_bigint3, _a355, _b258, SingleStoreBinaryBuilder, _a356, _b259, SingleStoreBinary, init_binary2, _a357, _b260, SingleStoreBooleanBuilder, _a358, _b261, SingleStoreBoolean, init_boolean3, _a359, _b262, SingleStoreCharBuilder, _a360, _b263, SingleStoreChar, init_char3, _a361, _b264, SingleStoreCustomColumnBuilder, _a362, _b265, SingleStoreCustomColumn, init_custom4, _a363, _b266, SingleStoreDateBuilder, _a364, _b267, SingleStoreDate, _a365, _b268, SingleStoreDateStringBuilder, _a366, _b269, SingleStoreDateString, init_date3, _a367, _b270, SingleStoreDateTimeBuilder, _a368, _b271, SingleStoreDateTime, _a369, _b272, SingleStoreDateTimeStringBuilder, _a370, _b273, SingleStoreDateTimeString, init_datetime2, _a371, _b274, SingleStoreDecimalBuilder, _a372, _b275, SingleStoreDecimal, _a373, _b276, SingleStoreDecimalNumberBuilder, _a374, _b277, SingleStoreDecimalNumber, _a375, _b278, SingleStoreDecimalBigIntBuilder, _a376, _b279, SingleStoreDecimalBigInt, init_decimal2, _a377, _b280, SingleStoreDoubleBuilder, _a378, _b281, SingleStoreDouble, init_double2, _a379, _b282, SingleStoreEnumColumnBuilder, _a380, _b283, SingleStoreEnumColumn, init_enum3, _a381, _b284, SingleStoreFloatBuilder, _a382, _b285, SingleStoreFloat, init_float2, _a383, _b286, SingleStoreIntBuilder, _a384, _b287, SingleStoreInt, init_int2, _a385, _b288, SingleStoreJsonBuilder, _a386, _b289, SingleStoreJson, init_json3, _a387, _b290, SingleStoreMediumIntBuilder, _a388, _b291, SingleStoreMediumInt, init_mediumint2, _a389, _b292, SingleStoreRealBuilder, _a390, _b293, SingleStoreReal, init_real4, _a391, _b294, SingleStoreSerialBuilder, _a392, _b295, SingleStoreSerial, init_serial3, _a393, _b296, SingleStoreSmallIntBuilder, _a394, _b297, SingleStoreSmallInt, init_smallint3, _a395, _b298, SingleStoreTextBuilder, _a396, _b299, SingleStoreText, init_text4, _a397, _b300, SingleStoreTimeBuilder, _a398, _b301, SingleStoreTime, init_time3, _a399, _b302, SingleStoreDateColumnBaseBuilder, _a400, _b303, SingleStoreDateBaseColumn, init_date_common3, _a401, _b304, SingleStoreTimestampBuilder, _a402, _b305, SingleStoreTimestamp, _a403, _b306, SingleStoreTimestampStringBuilder, _a404, _b307, SingleStoreTimestampString, init_timestamp3, _a405, _b308, SingleStoreTinyIntBuilder, _a406, _b309, SingleStoreTinyInt, init_tinyint2, _a407, _b310, SingleStoreVarBinaryBuilder, _a408, _b311, SingleStoreVarBinary, init_varbinary2, _a409, _b312, SingleStoreVarCharBuilder, _a410, _b313, SingleStoreVarChar, init_varchar3, _a411, _b314, SingleStoreVectorBuilder, _a412, _b315, SingleStoreVector, init_vector4, _a413, _b316, SingleStoreYearBuilder, _a414, _b317, SingleStoreYear, init_year2, init_columns4, _a415, _b318, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder, init_count4, _a416, IndexBuilderOn4, _a417, IndexBuilder4, _a418, Index6, init_indexes4, init_all4, _a419, _b319, _c13, _d5, SingleStoreTable, init_table52, _a420, PrimaryKeyBuilder4, _a421, PrimaryKey4, init_primary_keys4, init_utils10, _a422, _b320, SingleStoreDeleteBase, init_delete4, _a423, SingleStoreInsertBuilder, _a424, _b321, SingleStoreInsertBase, init_insert4, _a425, SingleStoreDialect, init_dialect4, _a426, SingleStoreSelectBuilder, _a427, _b322, SingleStoreSelectQueryBuilderBase, _a428, _b323, SingleStoreSelectBase, getSingleStoreSetOperators, union5, unionAll4, intersect4, except4, minus, init_select5, _a429, QueryBuilder4, init_query_builder5, init_select_types4, _a430, SingleStoreUpdateBuilder, _a431, _b324, SingleStoreUpdateBase, init_update4, init_query_builders4, _a432, SingleStoreDatabase, init_db4, _a433, SingleStoreSchema5, init_schema32, _a434, SingleStorePreparedQuery, _a435, SingleStoreSession, _a436, _b325, SingleStoreTransaction, init_session4, init_subquery5, init_singlestore_core, dialect5, generateSingleStoreSnapshot, fromDatabase4, init_singlestoreSerializer, sqliteImports_exports, prepareFromExports2, prepareFromSqliteImports, init_sqliteImports, mysqlImports_exports, prepareFromExports3, prepareFromMySqlImports, init_mysqlImports, mysqlPushUtils_exports, import_hanji8, filterStatements, logSuggestionsAndReturn2, init_mysqlPushUtils, mysqlIntrospect_exports, import_hanji9, mysqlPushIntrospect, init_mysqlIntrospect, singlestoreImports_exports, prepareFromExports4, prepareFromSingleStoreImports, init_singlestoreImports, singlestorePushUtils_exports, import_hanji10, filterStatements2, logSuggestionsAndReturn3, init_singlestorePushUtils, singlestoreIntrospect_exports, import_hanji11, singlestorePushIntrospect, init_singlestoreIntrospect, import_hanji3, pgPushIntrospect = async (db2, filters, schemaFilters, entities, tsSchema) => {
43742
44051
  const matchers = filters.map((it2) => {
43743
44052
  return new Minimatch(it2);
43744
44053
  });
@@ -44207,7 +44516,7 @@ var init_api2 = __esm(() => {
44207
44516
  wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
44208
44517
  wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
44209
44518
  wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
44210
- styles2 = {
44519
+ styles3 = {
44211
44520
  modifier: {
44212
44521
  reset: [0, 0],
44213
44522
  bold: [1, 22],
@@ -44260,9 +44569,9 @@ var init_api2 = __esm(() => {
44260
44569
  bgWhiteBright: [107, 49]
44261
44570
  }
44262
44571
  };
44263
- modifierNames = Object.keys(styles2.modifier);
44264
- foregroundColorNames = Object.keys(styles2.color);
44265
- backgroundColorNames = Object.keys(styles2.bgColor);
44572
+ modifierNames = Object.keys(styles3.modifier);
44573
+ foregroundColorNames = Object.keys(styles3.color);
44574
+ backgroundColorNames = Object.keys(styles3.bgColor);
44266
44575
  colorNames = [...foregroundColorNames, ...backgroundColorNames];
44267
44576
  ansiStyles = assembleStyles();
44268
44577
  ansi_styles_default = ansiStyles;
@@ -46741,7 +47050,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
46741
47050
  exports.prepareReadLine = undefined;
46742
47051
  var prepareReadLine = () => {
46743
47052
  const stdin = process.stdin;
46744
- const stdout2 = process.stdout;
47053
+ const stdout3 = process.stdout;
46745
47054
  const readline = __require2("readline");
46746
47055
  const rl = readline.createInterface({
46747
47056
  input: stdin,
@@ -46750,7 +47059,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
46750
47059
  readline.emitKeypressEvents(stdin, rl);
46751
47060
  return {
46752
47061
  stdin,
46753
- stdout: stdout2,
47062
+ stdout: stdout3,
46754
47063
  closable: rl
46755
47064
  };
46756
47065
  };
@@ -46762,7 +47071,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
46762
47071
  var ESC = "\x1B";
46763
47072
  var CSI = `${ESC}[`;
46764
47073
  var beep = "\x07";
46765
- var cursor2 = {
47074
+ var cursor3 = {
46766
47075
  to(x5, y3) {
46767
47076
  if (!y3)
46768
47077
  return `${CSI}${x5 + 1}G`;
@@ -46806,13 +47115,13 @@ See: https://github.com/isaacs/node-glob/issues/167`);
46806
47115
  lines(count2) {
46807
47116
  let clear = "";
46808
47117
  for (let i3 = 0;i3 < count2; i3++)
46809
- clear += this.line + (i3 < count2 - 1 ? cursor2.up() : "");
47118
+ clear += this.line + (i3 < count2 - 1 ? cursor3.up() : "");
46810
47119
  if (count2)
46811
- clear += cursor2.left;
47120
+ clear += cursor3.left;
46812
47121
  return clear;
46813
47122
  }
46814
47123
  };
46815
- module2.exports = { cursor: cursor2, scroll, erase, beep };
47124
+ module2.exports = { cursor: cursor3, scroll, erase, beep };
46816
47125
  }
46817
47126
  });
46818
47127
  require_utils = __commonJS2({
@@ -47100,10 +47409,10 @@ See: https://github.com/isaacs/node-glob/issues/167`);
47100
47409
  };
47101
47410
  exports.deferred = deferred;
47102
47411
  var Terminal = class {
47103
- constructor(view5, stdin, stdout2, closable) {
47412
+ constructor(view5, stdin, stdout3, closable) {
47104
47413
  this.view = view5;
47105
47414
  this.stdin = stdin;
47106
- this.stdout = stdout2;
47415
+ this.stdout = stdout3;
47107
47416
  this.closable = closable;
47108
47417
  this.text = "";
47109
47418
  this.status = "idle";
@@ -47201,9 +47510,9 @@ See: https://github.com/isaacs/node-glob/issues/167`);
47201
47510
  };
47202
47511
  exports.TaskView = TaskView2;
47203
47512
  var TaskTerminal = class {
47204
- constructor(view5, stdout2) {
47513
+ constructor(view5, stdout3) {
47205
47514
  this.view = view5;
47206
- this.stdout = stdout2;
47515
+ this.stdout = stdout3;
47207
47516
  this.text = "";
47208
47517
  this.view.attach(this);
47209
47518
  }
@@ -47222,13 +47531,13 @@ See: https://github.com/isaacs/node-glob/issues/167`);
47222
47531
  };
47223
47532
  exports.TaskTerminal = TaskTerminal;
47224
47533
  function render7(view5) {
47225
- const { stdin, stdout: stdout2, closable } = (0, readline_1.prepareReadLine)();
47534
+ const { stdin, stdout: stdout3, closable } = (0, readline_1.prepareReadLine)();
47226
47535
  if (view5 instanceof Prompt3) {
47227
- const terminal = new Terminal(view5, stdin, stdout2, closable);
47536
+ const terminal = new Terminal(view5, stdin, stdout3, closable);
47228
47537
  terminal.requestLayout();
47229
47538
  return terminal.result();
47230
47539
  }
47231
- stdout2.write(`${view5}
47540
+ stdout3.write(`${view5}
47232
47541
  `);
47233
47542
  closable.close();
47234
47543
  return;
@@ -52886,7 +53195,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
52886
53195
  return this.state.items[this.state.selectedIdx];
52887
53196
  }
52888
53197
  };
52889
- Spinner2 = class {
53198
+ Spinner3 = class {
52890
53199
  constructor(frames) {
52891
53200
  this.frames = frames;
52892
53201
  this.offset = 0;
@@ -52907,7 +53216,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
52907
53216
  super();
52908
53217
  this.progressText = progressText;
52909
53218
  this.successText = successText;
52910
- this.spinner = new Spinner2("⣷⣯⣟⡿⢿⣻⣽⣾".split(""));
53219
+ this.spinner = new Spinner3("⣷⣯⣟⡿⢿⣻⣽⣾".split(""));
52911
53220
  this.timeout = setInterval(() => {
52912
53221
  this.spinner.tick();
52913
53222
  this.requestLayout();
@@ -53997,8 +54306,8 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
53997
54306
  });
53998
54307
  require_styles = __commonJS2({
53999
54308
  "../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/styles.js"(exports, module2) {
54000
- var styles3 = {};
54001
- module2["exports"] = styles3;
54309
+ var styles32 = {};
54310
+ module2["exports"] = styles32;
54002
54311
  var codes = {
54003
54312
  reset: [0, 0],
54004
54313
  bold: [1, 22],
@@ -54053,7 +54362,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
54053
54362
  };
54054
54363
  Object.keys(codes).forEach(function(key) {
54055
54364
  var val = codes[key];
54056
- var style = styles3[key] = [];
54365
+ var style = styles32[key] = [];
54057
54366
  style.open = "\x1B[" + val[0] + "m";
54058
54367
  style.close = "\x1B[" + val[1] + "m";
54059
54368
  });
@@ -54531,7 +54840,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
54531
54840
  builder.__proto__ = proto2;
54532
54841
  return builder;
54533
54842
  }
54534
- var styles3 = function() {
54843
+ var styles32 = function() {
54535
54844
  var ret = {};
54536
54845
  ansiStyles2.grey = ansiStyles2.gray;
54537
54846
  Object.keys(ansiStyles2).forEach(function(key) {
@@ -54544,7 +54853,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
54544
54853
  });
54545
54854
  return ret;
54546
54855
  }();
54547
- var proto2 = defineProps(function colors2() {}, styles3);
54856
+ var proto2 = defineProps(function colors2() {}, styles32);
54548
54857
  function applyStyle2() {
54549
54858
  var args2 = Array.prototype.slice.call(arguments);
54550
54859
  var str = args2.map(function(arg) {
@@ -54594,7 +54903,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
54594
54903
  };
54595
54904
  function init2() {
54596
54905
  var ret = {};
54597
- Object.keys(styles3).forEach(function(name22) {
54906
+ Object.keys(styles32).forEach(function(name22) {
54598
54907
  ret[name22] = {
54599
54908
  get: function() {
54600
54909
  return build([name22]);
@@ -81887,23 +82196,23 @@ var require_lexer = __commonJS((exports) => {
81887
82196
  ];
81888
82197
  function tokenize(input) {
81889
82198
  const tokens = [];
81890
- let cursor2 = 0;
81891
- while (cursor2 < input.length) {
82199
+ let cursor3 = 0;
82200
+ while (cursor3 < input.length) {
81892
82201
  let matched = false;
81893
82202
  for (const tokenType of tokenTypes) {
81894
- const match3 = input.slice(cursor2).match(tokenType.regex);
82203
+ const match3 = input.slice(cursor3).match(tokenType.regex);
81895
82204
  if (match3) {
81896
82205
  tokens.push({
81897
82206
  type: tokenType.tokenType,
81898
82207
  value: match3[0]
81899
82208
  });
81900
- cursor2 += match3[0].length;
82209
+ cursor3 += match3[0].length;
81901
82210
  matched = true;
81902
82211
  break;
81903
82212
  }
81904
82213
  }
81905
82214
  if (!matched) {
81906
- throw new Error(`Unexpected character at position ${cursor2}`);
82215
+ throw new Error(`Unexpected character at position ${cursor3}`);
81907
82216
  }
81908
82217
  }
81909
82218
  return tokens;
@@ -82166,13 +82475,13 @@ var require_picocolors = __commonJS((exports, module2) => {
82166
82475
  return ~index6 ? open + replaceClose(string2, close, replace, index6) + close : open + string2 + close;
82167
82476
  };
82168
82477
  var replaceClose = (string2, close, replace, index6) => {
82169
- let result = "", cursor2 = 0;
82478
+ let result = "", cursor3 = 0;
82170
82479
  do {
82171
- result += string2.substring(cursor2, index6) + replace;
82172
- cursor2 = index6 + close.length;
82173
- index6 = string2.indexOf(close, cursor2);
82480
+ result += string2.substring(cursor3, index6) + replace;
82481
+ cursor3 = index6 + close.length;
82482
+ index6 = string2.indexOf(close, cursor3);
82174
82483
  } while (~index6);
82175
- return result + string2.substring(cursor2);
82484
+ return result + string2.substring(cursor3);
82176
82485
  };
82177
82486
  var createColors = (enabled = isColorSupported) => {
82178
82487
  let f3 = enabled ? formatter : () => String;
@@ -82718,7 +83027,8 @@ var init_schemas3 = __esm(() => {
82718
83027
  });
82719
83028
  SetSecretsRequestSchema = exports_external.record(exports_external.string().min(1), exports_external.string());
82720
83029
  SeedRequestSchema = exports_external.object({
82721
- code: exports_external.string().min(1, "Seed code is required")
83030
+ code: exports_external.string().min(1, "Seed code is required"),
83031
+ secrets: exports_external.record(exports_external.string(), exports_external.string()).optional()
82722
83032
  });
82723
83033
  SchemaInfoSchema = exports_external.object({
82724
83034
  sql: exports_external.string(),
@@ -82974,9 +83284,31 @@ var init_schemas11 = __esm(() => {
82974
83284
  });
82975
83285
 
82976
83286
  // ../data/src/domains/timeback/schemas.ts
82977
- var UpdateTimebackXpRequestSchema, EndActivityRequestSchema, PopulateStudentRequestSchema, DerivedPlatformCourseConfigSchema, TimebackBaseConfigSchema, PlatformTimebackSetupRequestSchema;
83287
+ function isTimebackGrade3(value) {
83288
+ return Number.isInteger(value) && TIMEBACK_GRADES.includes(value);
83289
+ }
83290
+ function isTimebackSubject3(value) {
83291
+ return TIMEBACK_SUBJECTS3.includes(value);
83292
+ }
83293
+ var TIMEBACK_GRADES, TIMEBACK_SUBJECTS3, TimebackGradeSchema, TimebackSubjectSchema, UpdateTimebackXpRequestSchema, EndActivityRequestSchema, PopulateStudentRequestSchema, DerivedPlatformCourseConfigSchema, TimebackBaseConfigSchema, PlatformTimebackSetupRequestSchema;
82978
83294
  var init_schemas12 = __esm(() => {
82979
83295
  init_esm();
83296
+ TIMEBACK_GRADES = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
83297
+ TIMEBACK_SUBJECTS3 = [
83298
+ "Reading",
83299
+ "Language",
83300
+ "Vocabulary",
83301
+ "Social Studies",
83302
+ "Writing",
83303
+ "Science",
83304
+ "FastMath",
83305
+ "Math",
83306
+ "None"
83307
+ ];
83308
+ TimebackGradeSchema = exports_external.number().int().refine((val) => TIMEBACK_GRADES.includes(val), {
83309
+ message: `Grade must be one of: ${TIMEBACK_GRADES.join(", ")}`
83310
+ });
83311
+ TimebackSubjectSchema = exports_external.enum(TIMEBACK_SUBJECTS3);
82980
83312
  UpdateTimebackXpRequestSchema = exports_external.object({
82981
83313
  xp: exports_external.number().min(0, "XP must be a non-negative number"),
82982
83314
  userTimestamp: exports_external.string().datetime().optional()
@@ -93883,8 +94215,13 @@ var init_seed_controller = __esm(() => {
93883
94215
  }
93884
94216
  throw ApiError.badRequest("Invalid JSON body");
93885
94217
  }
93886
- logger55.debug("Seeding database", { userId: ctx.user.id, slug: slug2, codeLength: body2.code.length });
93887
- return ctx.services.seed.seed(slug2, body2.code, ctx.user);
94218
+ logger55.debug("Seeding database", {
94219
+ userId: ctx.user.id,
94220
+ slug: slug2,
94221
+ codeLength: body2.code.length,
94222
+ secretCount: body2.secrets ? Object.keys(body2.secrets).length : 0
94223
+ });
94224
+ return ctx.services.seed.seed(slug2, body2.code, ctx.user, body2.secrets);
93888
94225
  });
93889
94226
  });
93890
94227
 
@@ -94177,7 +94514,7 @@ var init_sprite_controller = __esm(() => {
94177
94514
  });
94178
94515
 
94179
94516
  // ../api-core/src/controllers/timeback.controller.ts
94180
- var logger60, getTodayXp, getTotalXp, updateTodayXp, getXpHistory, populateStudent, getUser, getUserById, setupIntegration, getIntegrations, verifyIntegration, getConfig2, deleteIntegrations, endActivity, timeback2;
94517
+ var logger60, getTodayXp, getTotalXp, updateTodayXp, getXpHistory, populateStudent, getUser, getUserById, setupIntegration, getIntegrations, verifyIntegration, getConfig2, deleteIntegrations, endActivity, getStudentXp, timeback2;
94181
94518
  var init_timeback_controller = __esm(() => {
94182
94519
  init_esm();
94183
94520
  init_schemas_index();
@@ -94320,6 +94657,46 @@ var init_timeback_controller = __esm(() => {
94320
94657
  logger60.debug("Ending activity", { userId: ctx.user.id, gameId });
94321
94658
  return ctx.services.timeback.endActivity(gameId, studentId, activityData, scoreData, timingData, xpEarned, masteredUnits, ctx.user);
94322
94659
  });
94660
+ getStudentXp = requireDeveloper(async (ctx) => {
94661
+ const timebackId = ctx.params.timebackId;
94662
+ if (!timebackId) {
94663
+ throw ApiError.badRequest("Missing timebackId parameter");
94664
+ }
94665
+ const gameId = ctx.url.searchParams.get("gameId") || undefined;
94666
+ const gradeParam = ctx.url.searchParams.get("grade");
94667
+ const subjectParam = ctx.url.searchParams.get("subject");
94668
+ if (gradeParam !== null !== (subjectParam !== null)) {
94669
+ throw ApiError.badRequest("Both grade and subject must be provided together");
94670
+ }
94671
+ let grade;
94672
+ let subject;
94673
+ if (gradeParam !== null && subjectParam !== null) {
94674
+ const parsedGrade = parseInt(gradeParam, 10);
94675
+ if (!isTimebackGrade3(parsedGrade)) {
94676
+ throw ApiError.badRequest(`Invalid grade: ${gradeParam}. Valid grades: ${TIMEBACK_GRADES.join(", ")}`);
94677
+ }
94678
+ if (!isTimebackSubject3(subjectParam)) {
94679
+ throw ApiError.badRequest(`Invalid subject: ${subjectParam}. Valid subjects: ${TIMEBACK_SUBJECTS3.join(", ")}`);
94680
+ }
94681
+ grade = parsedGrade;
94682
+ subject = subjectParam;
94683
+ }
94684
+ const includeParam = ctx.url.searchParams.get("include");
94685
+ const includeOptions = includeParam ? includeParam.split(",").map((opt) => opt.trim().toLowerCase()) : [];
94686
+ const include = {
94687
+ perCourse: includeOptions.includes("percourse"),
94688
+ today: includeOptions.includes("today")
94689
+ };
94690
+ logger60.debug("Getting student XP", {
94691
+ requesterId: ctx.user.id,
94692
+ timebackId,
94693
+ gameId,
94694
+ grade,
94695
+ subject,
94696
+ include
94697
+ });
94698
+ return ctx.services.timeback.getStudentXp(timebackId, { gameId, grade, subject, include });
94699
+ });
94323
94700
  timeback2 = {
94324
94701
  getTodayXp,
94325
94702
  getTotalXp,
@@ -94333,7 +94710,8 @@ var init_timeback_controller = __esm(() => {
94333
94710
  verifyIntegration,
94334
94711
  getConfig: getConfig2,
94335
94712
  deleteIntegrations,
94336
- endActivity
94713
+ endActivity,
94714
+ getStudentXp
94337
94715
  };
94338
94716
  });
94339
94717
 
@@ -95485,6 +95863,56 @@ var init_timeback8 = __esm(() => {
95485
95863
  }
95486
95864
  return handle2(timeback2.getUserById)(c2);
95487
95865
  });
95866
+ timebackRouter.get("/student-xp/:timebackId", async (c2) => {
95867
+ const user = c2.get("user");
95868
+ if (!user) {
95869
+ const error2 = ApiError.unauthorized("Must be logged in to get student XP");
95870
+ return c2.json(createErrorResponse(error2), error2.status);
95871
+ }
95872
+ if (shouldMockTimeback()) {
95873
+ const url = new URL(c2.req.url);
95874
+ const gradeParam = url.searchParams.get("grade");
95875
+ const subjectParam = url.searchParams.get("subject");
95876
+ const includeParam = url.searchParams.get("include") || "";
95877
+ const includeOptions = includeParam.split(",").map((opt) => opt.trim().toLowerCase());
95878
+ const includePerCourse = includeOptions.includes("percourse");
95879
+ const includeToday = includeOptions.includes("today");
95880
+ const db2 = c2.get("db");
95881
+ let enrollments = await getMockEnrollments(db2);
95882
+ if (gradeParam !== null && subjectParam !== null) {
95883
+ const grade = parseInt(gradeParam, 10);
95884
+ enrollments = enrollments.filter((e) => e.grade === grade && e.subject === subjectParam);
95885
+ }
95886
+ const hashCode = (str) => {
95887
+ let hash = 0;
95888
+ for (let i3 = 0;i3 < str.length; i3++) {
95889
+ hash = (hash << 5) - hash + str.charCodeAt(i3);
95890
+ hash |= 0;
95891
+ }
95892
+ return Math.abs(hash);
95893
+ };
95894
+ const mockCourses = enrollments.map((e) => {
95895
+ const seed3 = hashCode(`${e.grade}-${e.subject}`);
95896
+ const totalXp2 = 100 + seed3 % 900;
95897
+ const todayXp2 = seed3 % 50;
95898
+ return {
95899
+ grade: e.grade,
95900
+ subject: e.subject,
95901
+ title: `${e.subject} Grade ${e.grade}`,
95902
+ totalXp: totalXp2,
95903
+ ...includeToday && { todayXp: todayXp2 }
95904
+ };
95905
+ });
95906
+ const totalXp = mockCourses.reduce((sum3, c3) => sum3 + c3.totalXp, 0);
95907
+ const todayXp = includeToday ? mockCourses.reduce((sum3, c3) => sum3 + (c3.todayXp ?? 0), 0) : undefined;
95908
+ return c2.json({
95909
+ totalXp,
95910
+ ...includeToday && { todayXp },
95911
+ ...includePerCourse && { courses: mockCourses }
95912
+ });
95913
+ }
95914
+ return handle2(timeback2.getStudentXp)(c2);
95915
+ });
95488
95916
  });
95489
95917
 
95490
95918
  // src/routes/integrations/lti.ts