@playcademy/sandbox 0.12.1 → 0.12.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +652 -109
- package/dist/constants.js +8 -0
- package/dist/server.js +652 -109
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2517,7 +2517,7 @@ var package_default;
|
|
|
2517
2517
|
var init_package = __esm(() => {
|
|
2518
2518
|
package_default = {
|
|
2519
2519
|
name: "@playcademy/sandbox",
|
|
2520
|
-
version: "0.12.1",
|
|
2520
|
+
version: "0.12.2-beta.1",
|
|
2521
2521
|
description: "Local development server for Playcademy game development",
|
|
2522
2522
|
type: "module",
|
|
2523
2523
|
exports: {
|
|
@@ -7017,6 +7017,13 @@ var init_dashboard = __esm(() => {
|
|
|
7017
7017
|
};
|
|
7018
7018
|
});
|
|
7019
7019
|
|
|
7020
|
+
// ../constants/src/embed.ts
|
|
7021
|
+
var EMBED_PASS_TTL_MS, EMBED_LAUNCH_TTL_MS, EMBED_PAGE_PATH = "/embed", EMBED_PARENT_ORIGIN_PARAM = "parentOrigin";
|
|
7022
|
+
var init_embed = __esm(() => {
|
|
7023
|
+
EMBED_PASS_TTL_MS = 60 * 1000;
|
|
7024
|
+
EMBED_LAUNCH_TTL_MS = 12 * 60 * 60 * 1000;
|
|
7025
|
+
});
|
|
7026
|
+
|
|
7020
7027
|
// ../constants/src/typescript.ts
|
|
7021
7028
|
var init_typescript = () => {};
|
|
7022
7029
|
|
|
@@ -7160,6 +7167,7 @@ var init_cloudflare = __esm(() => {
|
|
|
7160
7167
|
var init_src = __esm(() => {
|
|
7161
7168
|
init_auth();
|
|
7162
7169
|
init_dashboard();
|
|
7170
|
+
init_embed();
|
|
7163
7171
|
init_typescript();
|
|
7164
7172
|
init_domains();
|
|
7165
7173
|
init_env_vars();
|
|
@@ -20846,6 +20854,78 @@ var init_table7 = __esm(() => {
|
|
|
20846
20854
|
]);
|
|
20847
20855
|
});
|
|
20848
20856
|
|
|
20857
|
+
// ../data/src/domains/embed/table.ts
|
|
20858
|
+
var embedPartners, embedPartnerGames, embedLaunches, embedPartnersRelations, embedPartnerGamesRelations, embedLaunchesRelations;
|
|
20859
|
+
var init_table8 = __esm(() => {
|
|
20860
|
+
init_drizzle_orm();
|
|
20861
|
+
init_pg_core();
|
|
20862
|
+
init_table5();
|
|
20863
|
+
init_table3();
|
|
20864
|
+
embedPartners = pgTable("embed_partners", {
|
|
20865
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
20866
|
+
name: text("name").notNull(),
|
|
20867
|
+
clientId: text("client_id").notNull().unique(),
|
|
20868
|
+
allowedOrigins: text("allowed_origins").array().notNull().default([]),
|
|
20869
|
+
enabled: boolean("enabled").notNull().default(true),
|
|
20870
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
20871
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
20872
|
+
});
|
|
20873
|
+
embedPartnerGames = pgTable("embed_partner_games", {
|
|
20874
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
20875
|
+
partnerId: uuid("partner_id").notNull().references(() => embedPartners.id, { onDelete: "cascade" }),
|
|
20876
|
+
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
20877
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
20878
|
+
}, (table) => [
|
|
20879
|
+
uniqueIndex("embed_partner_games_partner_game_idx").on(table.partnerId, table.gameId),
|
|
20880
|
+
index("embed_partner_games_game_idx").on(table.gameId)
|
|
20881
|
+
]);
|
|
20882
|
+
embedLaunches = pgTable("embed_launches", {
|
|
20883
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
20884
|
+
partnerId: uuid("partner_id").notNull().references(() => embedPartners.id, { onDelete: "restrict" }),
|
|
20885
|
+
userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
20886
|
+
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
20887
|
+
parentOrigin: text("parent_origin").notNull(),
|
|
20888
|
+
timebackCourseId: text("timeback_course_id"),
|
|
20889
|
+
passHash: text("pass_hash").unique(),
|
|
20890
|
+
passExpiresAt: timestamp("pass_expires_at", { withTimezone: true }).notNull(),
|
|
20891
|
+
redeemedAt: timestamp("redeemed_at", { withTimezone: true }),
|
|
20892
|
+
endedAt: timestamp("ended_at", { withTimezone: true }),
|
|
20893
|
+
expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
|
|
20894
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
20895
|
+
}, (table) => [
|
|
20896
|
+
index("embed_launches_partner_idx").on(table.partnerId),
|
|
20897
|
+
index("embed_launches_user_idx").on(table.userId),
|
|
20898
|
+
index("embed_launches_game_idx").on(table.gameId)
|
|
20899
|
+
]);
|
|
20900
|
+
embedPartnersRelations = relations(embedPartners, ({ many }) => ({
|
|
20901
|
+
games: many(embedPartnerGames)
|
|
20902
|
+
}));
|
|
20903
|
+
embedPartnerGamesRelations = relations(embedPartnerGames, ({ one }) => ({
|
|
20904
|
+
partner: one(embedPartners, {
|
|
20905
|
+
fields: [embedPartnerGames.partnerId],
|
|
20906
|
+
references: [embedPartners.id]
|
|
20907
|
+
}),
|
|
20908
|
+
game: one(games, {
|
|
20909
|
+
fields: [embedPartnerGames.gameId],
|
|
20910
|
+
references: [games.id]
|
|
20911
|
+
})
|
|
20912
|
+
}));
|
|
20913
|
+
embedLaunchesRelations = relations(embedLaunches, ({ one }) => ({
|
|
20914
|
+
partner: one(embedPartners, {
|
|
20915
|
+
fields: [embedLaunches.partnerId],
|
|
20916
|
+
references: [embedPartners.id]
|
|
20917
|
+
}),
|
|
20918
|
+
user: one(users, {
|
|
20919
|
+
fields: [embedLaunches.userId],
|
|
20920
|
+
references: [users.id]
|
|
20921
|
+
}),
|
|
20922
|
+
game: one(games, {
|
|
20923
|
+
fields: [embedLaunches.gameId],
|
|
20924
|
+
references: [games.id]
|
|
20925
|
+
})
|
|
20926
|
+
}));
|
|
20927
|
+
});
|
|
20928
|
+
|
|
20849
20929
|
// ../data/src/tables.index.ts
|
|
20850
20930
|
var exports_tables_index = {};
|
|
20851
20931
|
__export(exports_tables_index, {
|
|
@@ -20858,6 +20938,12 @@ __export(exports_tables_index, {
|
|
|
20858
20938
|
deploymentProviderEnum: () => deploymentProviderEnum,
|
|
20859
20939
|
deploymentTargetEnum: () => deploymentTargetEnum,
|
|
20860
20940
|
developerStatusEnum: () => developerStatusEnum,
|
|
20941
|
+
embedLaunches: () => embedLaunches,
|
|
20942
|
+
embedLaunchesRelations: () => embedLaunchesRelations,
|
|
20943
|
+
embedPartnerGames: () => embedPartnerGames,
|
|
20944
|
+
embedPartnerGamesRelations: () => embedPartnerGamesRelations,
|
|
20945
|
+
embedPartners: () => embedPartners,
|
|
20946
|
+
embedPartnersRelations: () => embedPartnersRelations,
|
|
20861
20947
|
gameCustomHostnames: () => gameCustomHostnames,
|
|
20862
20948
|
gameDashboardUserRoleEnum: () => gameDashboardUserRoleEnum,
|
|
20863
20949
|
gameDashboardUsers: () => gameDashboardUsers,
|
|
@@ -20893,6 +20979,7 @@ var init_tables_index = __esm(() => {
|
|
|
20893
20979
|
init_table5();
|
|
20894
20980
|
init_table6();
|
|
20895
20981
|
init_table7();
|
|
20982
|
+
init_table8();
|
|
20896
20983
|
});
|
|
20897
20984
|
|
|
20898
20985
|
// ../../node_modules/.bun/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/version.js
|
|
@@ -50665,12 +50752,56 @@ var init_schemas4 = __esm(() => {
|
|
|
50665
50752
|
});
|
|
50666
50753
|
});
|
|
50667
50754
|
|
|
50755
|
+
// ../data/src/domains/embed/schemas.ts
|
|
50756
|
+
function isLocalHostname(hostname) {
|
|
50757
|
+
return LOCAL_HOSTNAMES.has(hostname) || hostname.endsWith(".localhost");
|
|
50758
|
+
}
|
|
50759
|
+
function isCanonicalOrigin(value) {
|
|
50760
|
+
let url;
|
|
50761
|
+
try {
|
|
50762
|
+
url = new URL(value);
|
|
50763
|
+
} catch {
|
|
50764
|
+
return false;
|
|
50765
|
+
}
|
|
50766
|
+
if (url.origin !== value) {
|
|
50767
|
+
return false;
|
|
50768
|
+
}
|
|
50769
|
+
return url.protocol === "https:" || url.protocol === "http:" && isLocalHostname(url.hostname);
|
|
50770
|
+
}
|
|
50771
|
+
var LOCAL_HOSTNAMES, EmbedOriginSchema, CreateEmbedPartnerSchema, UpdateEmbedPartnerSchema, CreateEmbedLaunchSchema, RedeemEmbedPassSchema;
|
|
50772
|
+
var init_schemas5 = __esm(() => {
|
|
50773
|
+
init_esm();
|
|
50774
|
+
LOCAL_HOSTNAMES = new Set(["localhost", "127.0.0.1"]);
|
|
50775
|
+
EmbedOriginSchema = stringType().refine(isCanonicalOrigin, {
|
|
50776
|
+
message: "Origin must be a bare https origin like https://example.com, with no path or slash"
|
|
50777
|
+
});
|
|
50778
|
+
CreateEmbedPartnerSchema = objectType({
|
|
50779
|
+
name: stringType().trim().min(1).max(100),
|
|
50780
|
+
clientId: stringType().trim().min(1).max(200),
|
|
50781
|
+
allowedOrigins: arrayType(EmbedOriginSchema).max(20).default([]),
|
|
50782
|
+
allowedGameIds: arrayType(stringType().uuid().transform((id) => id.toLowerCase())).max(200).default([]),
|
|
50783
|
+
enabled: booleanType().default(true)
|
|
50784
|
+
}).strict();
|
|
50785
|
+
UpdateEmbedPartnerSchema = CreateEmbedPartnerSchema.omit({ clientId: true }).partial();
|
|
50786
|
+
CreateEmbedLaunchSchema = objectType({
|
|
50787
|
+
timebackId: stringType().trim().min(1).max(200),
|
|
50788
|
+
gameSlug: stringType().trim().min(1).max(100),
|
|
50789
|
+
parentOrigin: EmbedOriginSchema,
|
|
50790
|
+
timebackCourseId: stringType().trim().min(1).max(200).optional()
|
|
50791
|
+
}).strict();
|
|
50792
|
+
RedeemEmbedPassSchema = objectType({
|
|
50793
|
+
pass: stringType().min(1).max(200),
|
|
50794
|
+
parentOrigin: EmbedOriginSchema
|
|
50795
|
+
}).strict();
|
|
50796
|
+
});
|
|
50797
|
+
|
|
50668
50798
|
// ../data/src/schemas.index.ts
|
|
50669
50799
|
var init_schemas_index = __esm(() => {
|
|
50670
50800
|
init_schemas();
|
|
50671
50801
|
init_schemas2();
|
|
50672
50802
|
init_schemas3();
|
|
50673
50803
|
init_schemas4();
|
|
50804
|
+
init_schemas5();
|
|
50674
50805
|
});
|
|
50675
50806
|
|
|
50676
50807
|
// ../../node_modules/.bun/@timeback+core@0.3.1+0ba747e64b820dcd/node_modules/@timeback/core/dist/chunk-3j7jywnx.js
|
|
@@ -53799,7 +53930,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
53799
53930
|
}
|
|
53800
53931
|
}
|
|
53801
53932
|
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodUnknown, $ZodNever, $ZodArray, $ZodObject, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodReadonly, $ZodCustom;
|
|
53802
|
-
var
|
|
53933
|
+
var init_schemas6 = __esm(() => {
|
|
53803
53934
|
init_checks2();
|
|
53804
53935
|
init_core2();
|
|
53805
53936
|
init_parse();
|
|
@@ -55436,7 +55567,7 @@ var init_core3 = __esm(() => {
|
|
|
55436
55567
|
init_core2();
|
|
55437
55568
|
init_parse();
|
|
55438
55569
|
init_errors4();
|
|
55439
|
-
|
|
55570
|
+
init_schemas6();
|
|
55440
55571
|
init_checks2();
|
|
55441
55572
|
init_versions();
|
|
55442
55573
|
init_registries();
|
|
@@ -55477,7 +55608,7 @@ function duration2(params) {
|
|
|
55477
55608
|
var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration;
|
|
55478
55609
|
var init_iso = __esm(() => {
|
|
55479
55610
|
init_core3();
|
|
55480
|
-
|
|
55611
|
+
init_schemas7();
|
|
55481
55612
|
ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
55482
55613
|
$ZodISODateTime.init(inst, def);
|
|
55483
55614
|
ZodStringFormat.init(inst, def);
|
|
@@ -55719,7 +55850,7 @@ function superRefine(fn, params) {
|
|
|
55719
55850
|
return ch;
|
|
55720
55851
|
}
|
|
55721
55852
|
var ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodReadonly2, ZodCustom;
|
|
55722
|
-
var
|
|
55853
|
+
var init_schemas7 = __esm(() => {
|
|
55723
55854
|
init_core3();
|
|
55724
55855
|
init_core3();
|
|
55725
55856
|
init_checks3();
|
|
@@ -56172,7 +56303,7 @@ var init_external2 = __esm(() => {
|
|
|
56172
56303
|
init_locales();
|
|
56173
56304
|
init_iso();
|
|
56174
56305
|
init_coerce();
|
|
56175
|
-
|
|
56306
|
+
init_schemas7();
|
|
56176
56307
|
init_checks3();
|
|
56177
56308
|
init_errors5();
|
|
56178
56309
|
init_parse2();
|
|
@@ -65848,7 +65979,7 @@ function handleRefineResult2(result, payload, input, inst) {
|
|
|
65848
65979
|
}
|
|
65849
65980
|
}
|
|
65850
65981
|
var $ZodType2, $ZodString2, $ZodStringFormat2, $ZodGUID2, $ZodUUID2, $ZodEmail2, $ZodURL2, $ZodEmoji2, $ZodNanoID2, $ZodCUID3, $ZodCUID22, $ZodULID2, $ZodXID2, $ZodKSUID2, $ZodISODateTime2, $ZodISODate2, $ZodISOTime2, $ZodISODuration2, $ZodIPv42, $ZodIPv62, $ZodCIDRv42, $ZodCIDRv62, $ZodBase642, $ZodBase64URL2, $ZodE1642, $ZodJWT2, $ZodNumber2, $ZodNumberFormat2, $ZodBoolean2, $ZodUnknown2, $ZodNever2, $ZodArray2, $ZodObject2, $ZodObjectJIT, $ZodUnion2, $ZodDiscriminatedUnion2, $ZodIntersection2, $ZodRecord2, $ZodEnum2, $ZodLiteral2, $ZodTransform2, $ZodOptional2, $ZodExactOptional, $ZodNullable2, $ZodDefault2, $ZodPrefault2, $ZodNonOptional2, $ZodCatch2, $ZodPipe2, $ZodReadonly2, $ZodCustom2;
|
|
65851
|
-
var
|
|
65982
|
+
var init_schemas8 = __esm(() => {
|
|
65852
65983
|
init_checks4();
|
|
65853
65984
|
init_core4();
|
|
65854
65985
|
init_parse3();
|
|
@@ -68325,7 +68456,7 @@ var init_core5 = __esm(() => {
|
|
|
68325
68456
|
init_core4();
|
|
68326
68457
|
init_parse3();
|
|
68327
68458
|
init_errors6();
|
|
68328
|
-
|
|
68459
|
+
init_schemas8();
|
|
68329
68460
|
init_checks4();
|
|
68330
68461
|
init_versions2();
|
|
68331
68462
|
init_registries2();
|
|
@@ -68365,7 +68496,7 @@ function duration4(params) {
|
|
|
68365
68496
|
var ZodISODateTime2, ZodISODate2, ZodISOTime2, ZodISODuration2;
|
|
68366
68497
|
var init_iso2 = __esm(() => {
|
|
68367
68498
|
init_core5();
|
|
68368
|
-
|
|
68499
|
+
init_schemas9();
|
|
68369
68500
|
ZodISODateTime2 = /* @__PURE__ */ $constructor2("ZodISODateTime", (inst, def) => {
|
|
68370
68501
|
$ZodISODateTime2.init(inst, def);
|
|
68371
68502
|
ZodStringFormat2.init(inst, def);
|
|
@@ -68643,7 +68774,7 @@ function superRefine2(fn, params) {
|
|
|
68643
68774
|
return _superRefine(fn, params);
|
|
68644
68775
|
}
|
|
68645
68776
|
var _installedGroups, ZodType3, _ZodString2, ZodString3, ZodStringFormat2, ZodEmail2, ZodGUID2, ZodUUID2, ZodURL2, ZodEmoji2, ZodNanoID2, ZodCUID3, ZodCUID22, ZodULID2, ZodXID2, ZodKSUID2, ZodIPv42, ZodIPv62, ZodCIDRv42, ZodCIDRv62, ZodBase642, ZodBase64URL2, ZodE1642, ZodJWT2, ZodNumber3, ZodNumberFormat2, ZodBoolean3, ZodUnknown3, ZodNever3, ZodArray3, ZodObject3, ZodUnion3, ZodDiscriminatedUnion3, ZodIntersection3, ZodRecord3, ZodEnum3, ZodLiteral3, ZodTransform2, ZodOptional3, ZodExactOptional, ZodNullable3, ZodDefault3, ZodPrefault2, ZodNonOptional2, ZodCatch3, ZodPipe2, ZodReadonly3, ZodCustom2;
|
|
68646
|
-
var
|
|
68777
|
+
var init_schemas9 = __esm(() => {
|
|
68647
68778
|
init_core5();
|
|
68648
68779
|
init_core5();
|
|
68649
68780
|
init_json_schema_processors();
|
|
@@ -69300,7 +69431,7 @@ var init_external3 = __esm(() => {
|
|
|
69300
69431
|
init_locales2();
|
|
69301
69432
|
init_iso2();
|
|
69302
69433
|
init_coerce2();
|
|
69303
|
-
|
|
69434
|
+
init_schemas9();
|
|
69304
69435
|
init_checks5();
|
|
69305
69436
|
init_errors7();
|
|
69306
69437
|
init_parse4();
|
|
@@ -82211,11 +82342,8 @@ function normalizeText2(value) {
|
|
|
82211
82342
|
function normalizeTestType(value) {
|
|
82212
82343
|
return normalizeText2(value).replaceAll("-", " ");
|
|
82213
82344
|
}
|
|
82214
|
-
function isUuidLike(value) {
|
|
82215
|
-
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
82216
|
-
}
|
|
82217
82345
|
function hasReadableStandardLabel(standard) {
|
|
82218
|
-
return Boolean(standard.name || standard.identifier || !
|
|
82346
|
+
return Boolean(standard.name || standard.identifier || !isValidUUID(standard.id));
|
|
82219
82347
|
}
|
|
82220
82348
|
function isAllowedGradeLevelTestType(value) {
|
|
82221
82349
|
const normalizedType = normalizeTestType(value);
|
|
@@ -82528,6 +82656,7 @@ var GRADE_LEVEL_TEST_TYPES, naturalTitleSort;
|
|
|
82528
82656
|
var init_timeback_grade_level_results_util = __esm(() => {
|
|
82529
82657
|
init_constants2();
|
|
82530
82658
|
init_qti();
|
|
82659
|
+
init_src9();
|
|
82531
82660
|
GRADE_LEVEL_TEST_TYPES = [
|
|
82532
82661
|
"placement",
|
|
82533
82662
|
"test out",
|
|
@@ -82986,7 +83115,8 @@ class TimebackAdminService {
|
|
|
82986
83115
|
const entries = await Promise.all(courseIds.map(async (courseId) => {
|
|
82987
83116
|
const roster = await client.roster.getCourseRoster(courseId, {
|
|
82988
83117
|
includeInactive: options?.includeInactive,
|
|
82989
|
-
includeUsers: false
|
|
83118
|
+
includeUsers: false,
|
|
83119
|
+
userSourcedId: studentId
|
|
82990
83120
|
});
|
|
82991
83121
|
const matches = roster.filter((entry) => entry.enrollment.user.sourcedId === studentId).toSorted((a, b) => {
|
|
82992
83122
|
const aActive = a.enrollment.status === "active";
|
|
@@ -94689,6 +94819,348 @@ var init_player = __esm(() => {
|
|
|
94689
94819
|
init_leaderboard_service();
|
|
94690
94820
|
});
|
|
94691
94821
|
|
|
94822
|
+
// ../api-core/src/utils/account.util.ts
|
|
94823
|
+
function resolveStudentAccount(byEmail, hasTimebackSignIn) {
|
|
94824
|
+
if (!byEmail) {
|
|
94825
|
+
return "create";
|
|
94826
|
+
}
|
|
94827
|
+
return byEmail.emailVerified && !byEmail.timebackId && !hasTimebackSignIn ? "link" : "conflict";
|
|
94828
|
+
}
|
|
94829
|
+
|
|
94830
|
+
// ../api-core/src/utils/lti.util.ts
|
|
94831
|
+
function generateUsername(email) {
|
|
94832
|
+
const baseUsername = (email.split("@")[0] || "user").toLowerCase();
|
|
94833
|
+
const cleanUsername = baseUsername.replace(/[^a-z0-9]/g, "");
|
|
94834
|
+
const randomSuffix = Math.random().toString(36).substring(2, 7);
|
|
94835
|
+
return `${cleanUsername}_${randomSuffix}`;
|
|
94836
|
+
}
|
|
94837
|
+
function extractRedirectPath(targetUri, currentHost) {
|
|
94838
|
+
try {
|
|
94839
|
+
const targetUrl = new URL(targetUri);
|
|
94840
|
+
if (targetUrl.hostname === currentHost) {
|
|
94841
|
+
return targetUrl.pathname + targetUrl.search;
|
|
94842
|
+
}
|
|
94843
|
+
} catch {}
|
|
94844
|
+
return "/";
|
|
94845
|
+
}
|
|
94846
|
+
function validateLtiClaims(claims) {
|
|
94847
|
+
const messageType = claims["https://purl.imsglobal.org/spec/lti/claim/message_type"];
|
|
94848
|
+
const version = claims["https://purl.imsglobal.org/spec/lti/claim/version"];
|
|
94849
|
+
if (messageType !== "LtiResourceLinkRequest") {
|
|
94850
|
+
return `Invalid LTI message type: ${messageType}`;
|
|
94851
|
+
}
|
|
94852
|
+
if (version !== "1.3.0") {
|
|
94853
|
+
return `Unsupported LTI version: ${version}`;
|
|
94854
|
+
}
|
|
94855
|
+
return null;
|
|
94856
|
+
}
|
|
94857
|
+
var init_lti_util = () => {};
|
|
94858
|
+
|
|
94859
|
+
// ../api-core/src/services/account.service.ts
|
|
94860
|
+
import * as crypto4 from "node:crypto";
|
|
94861
|
+
|
|
94862
|
+
class AccountService {
|
|
94863
|
+
deps;
|
|
94864
|
+
constructor(deps) {
|
|
94865
|
+
this.deps = deps;
|
|
94866
|
+
}
|
|
94867
|
+
async resolveTimebackStudent(timebackId) {
|
|
94868
|
+
const byTimebackId = await this.findByTimebackId(timebackId);
|
|
94869
|
+
if (byTimebackId) {
|
|
94870
|
+
setAttributes({ "app.account.student_resolution": "existing" });
|
|
94871
|
+
return byTimebackId;
|
|
94872
|
+
}
|
|
94873
|
+
const profile = await this.fetchOneRosterProfile(timebackId);
|
|
94874
|
+
const byEmailMatches = await this.deps.db.query.users.findMany({
|
|
94875
|
+
where: sql`lower(${users.email}) = lower(${profile.email})`,
|
|
94876
|
+
limit: 2
|
|
94877
|
+
});
|
|
94878
|
+
const byEmail = byEmailMatches.length === 1 ? byEmailMatches[0] : undefined;
|
|
94879
|
+
if (byEmail?.timebackId === timebackId) {
|
|
94880
|
+
return byEmail;
|
|
94881
|
+
}
|
|
94882
|
+
const resolution = byEmailMatches.length > 1 ? "conflict" : resolveStudentAccount(byEmail, await this.hasTimebackSignIn(byEmail));
|
|
94883
|
+
setAttributes({ "app.account.student_resolution": resolution });
|
|
94884
|
+
if (resolution === "conflict") {
|
|
94885
|
+
throw new ConflictError("This student's email belongs to another account");
|
|
94886
|
+
}
|
|
94887
|
+
if (byEmail && resolution === "link") {
|
|
94888
|
+
return this.link(byEmail, timebackId);
|
|
94889
|
+
}
|
|
94890
|
+
return this.create(profile, timebackId);
|
|
94891
|
+
}
|
|
94892
|
+
async hasTimebackSignIn(user) {
|
|
94893
|
+
if (!user) {
|
|
94894
|
+
return false;
|
|
94895
|
+
}
|
|
94896
|
+
const signIn = await this.deps.db.query.accounts.findFirst({
|
|
94897
|
+
columns: { id: true },
|
|
94898
|
+
where: and(eq(accounts.userId, user.id), inArray(accounts.providerId, [
|
|
94899
|
+
AUTH_PROVIDER_IDS.TIMEBACK,
|
|
94900
|
+
AUTH_PROVIDER_IDS.TIMEBACK_LTI,
|
|
94901
|
+
AUTH_PROVIDER_IDS.PLAYCADEMY
|
|
94902
|
+
]))
|
|
94903
|
+
});
|
|
94904
|
+
setAttributes({ "app.account.has_timeback_sign_in": signIn !== undefined });
|
|
94905
|
+
return signIn !== undefined;
|
|
94906
|
+
}
|
|
94907
|
+
findByTimebackId(timebackId) {
|
|
94908
|
+
return this.deps.db.query.users.findFirst({ where: eq(users.timebackId, timebackId) });
|
|
94909
|
+
}
|
|
94910
|
+
async concurrentWinner(timebackId) {
|
|
94911
|
+
const winner = await this.findByTimebackId(timebackId);
|
|
94912
|
+
if (!winner) {
|
|
94913
|
+
throw new ConflictError("This student's email belongs to another account");
|
|
94914
|
+
}
|
|
94915
|
+
return winner;
|
|
94916
|
+
}
|
|
94917
|
+
async link(account, timebackId) {
|
|
94918
|
+
const [linked] = await this.deps.db.update(users).set({ timebackId, updatedAt: new Date }).where(and(eq(users.id, account.id), isNull(users.timebackId))).returning();
|
|
94919
|
+
return linked ?? this.concurrentWinner(timebackId);
|
|
94920
|
+
}
|
|
94921
|
+
async create(profile, timebackId) {
|
|
94922
|
+
const now = new Date;
|
|
94923
|
+
let created;
|
|
94924
|
+
try {
|
|
94925
|
+
[created] = await this.deps.db.insert(users).values({
|
|
94926
|
+
id: crypto4.randomUUID(),
|
|
94927
|
+
email: profile.email.toLowerCase(),
|
|
94928
|
+
emailVerified: true,
|
|
94929
|
+
username: generateUsername(profile.email),
|
|
94930
|
+
name: profile.name,
|
|
94931
|
+
timebackId,
|
|
94932
|
+
createdAt: now,
|
|
94933
|
+
updatedAt: now
|
|
94934
|
+
}).returning();
|
|
94935
|
+
} catch (error) {
|
|
94936
|
+
if (isUniqueViolation(error)) {
|
|
94937
|
+
return this.concurrentWinner(timebackId);
|
|
94938
|
+
}
|
|
94939
|
+
throw error;
|
|
94940
|
+
}
|
|
94941
|
+
if (!created) {
|
|
94942
|
+
throw new InternalError("Failed to create user");
|
|
94943
|
+
}
|
|
94944
|
+
return created;
|
|
94945
|
+
}
|
|
94946
|
+
async fetchOneRosterProfile(timebackId) {
|
|
94947
|
+
if (!this.deps.timeback) {
|
|
94948
|
+
throw new ServiceUnavailableError("Timeback is not available in this environment");
|
|
94949
|
+
}
|
|
94950
|
+
const record = await this.deps.timeback.api.oneroster.users.get(timebackId).catch((error) => {
|
|
94951
|
+
if (isApiError(error) && error.statusCode === 404) {
|
|
94952
|
+
return null;
|
|
94953
|
+
}
|
|
94954
|
+
setAttributes({
|
|
94955
|
+
"app.account.student_resolution": "timeback_unavailable",
|
|
94956
|
+
"app.timeback.status_code": isApiError(error) ? error.statusCode : undefined
|
|
94957
|
+
});
|
|
94958
|
+
throw new ServiceUnavailableError("Timeback is unavailable; retry shortly");
|
|
94959
|
+
});
|
|
94960
|
+
if (!record) {
|
|
94961
|
+
throw new NotFoundError("Timeback student", timebackId);
|
|
94962
|
+
}
|
|
94963
|
+
if (!record.email) {
|
|
94964
|
+
throw new NotFoundError("Email for Timeback student", timebackId);
|
|
94965
|
+
}
|
|
94966
|
+
const fullName = [record.givenName, record.familyName].filter(Boolean).join(" ");
|
|
94967
|
+
return {
|
|
94968
|
+
email: record.email,
|
|
94969
|
+
name: fullName || record.email.split("@")[0] || "Timeback User"
|
|
94970
|
+
};
|
|
94971
|
+
}
|
|
94972
|
+
}
|
|
94973
|
+
var init_account_service = __esm(async () => {
|
|
94974
|
+
init_drizzle_orm();
|
|
94975
|
+
init_src();
|
|
94976
|
+
init_tables_index();
|
|
94977
|
+
init_spans();
|
|
94978
|
+
init_errors2();
|
|
94979
|
+
init_lti_util();
|
|
94980
|
+
await init_errors8();
|
|
94981
|
+
});
|
|
94982
|
+
|
|
94983
|
+
// ../api-core/src/utils/embed.util.ts
|
|
94984
|
+
function canPartnerLaunch(partner, origin, gameId) {
|
|
94985
|
+
return partner.enabled && partner.allowedOrigins.includes(origin) && partner.games.some((grant) => grant.gameId === gameId);
|
|
94986
|
+
}
|
|
94987
|
+
function embedPageUrl(hubOrigin, slug, parentOrigin) {
|
|
94988
|
+
const url = new URL(`${EMBED_PAGE_PATH}/${encodeURIComponent(slug)}`, hubOrigin);
|
|
94989
|
+
url.searchParams.set(EMBED_PARENT_ORIGIN_PARAM, parentOrigin);
|
|
94990
|
+
return url.toString();
|
|
94991
|
+
}
|
|
94992
|
+
var init_embed_util = __esm(() => {
|
|
94993
|
+
init_src();
|
|
94994
|
+
});
|
|
94995
|
+
|
|
94996
|
+
// ../api-core/src/services/embed.service.ts
|
|
94997
|
+
class EmbedService {
|
|
94998
|
+
deps;
|
|
94999
|
+
constructor(deps) {
|
|
95000
|
+
this.deps = deps;
|
|
95001
|
+
}
|
|
95002
|
+
async getPartnerByClientId(clientId) {
|
|
95003
|
+
const partner = await this.deps.db.query.embedPartners.findFirst({
|
|
95004
|
+
where: eq(embedPartners.clientId, clientId)
|
|
95005
|
+
});
|
|
95006
|
+
if (!partner?.enabled) {
|
|
95007
|
+
throw new AccessDeniedError("This client is not an approved embed partner");
|
|
95008
|
+
}
|
|
95009
|
+
setAttributes({ "app.embed.partner_id": partner.id });
|
|
95010
|
+
return partner;
|
|
95011
|
+
}
|
|
95012
|
+
async isFrameOriginAllowed(origin, slug) {
|
|
95013
|
+
const grants = await this.deps.db.select({
|
|
95014
|
+
enabled: embedPartners.enabled,
|
|
95015
|
+
allowedOrigins: embedPartners.allowedOrigins,
|
|
95016
|
+
gameId: embedPartnerGames.gameId
|
|
95017
|
+
}).from(embedPartnerGames).innerJoin(embedPartners, eq(embedPartners.id, embedPartnerGames.partnerId)).innerJoin(games, eq(games.id, embedPartnerGames.gameId)).where(eq(games.slug, slug));
|
|
95018
|
+
return grants.some((grant) => canPartnerLaunch({ ...grant, games: [grant] }, origin, grant.gameId));
|
|
95019
|
+
}
|
|
95020
|
+
async createLaunch(partner, input) {
|
|
95021
|
+
const game = await this.deps.db.query.games.findFirst({
|
|
95022
|
+
where: eq(games.slug, input.gameSlug),
|
|
95023
|
+
columns: { id: true, slug: true }
|
|
95024
|
+
});
|
|
95025
|
+
if (!game) {
|
|
95026
|
+
throw new NotFoundError("Game", input.gameSlug);
|
|
95027
|
+
}
|
|
95028
|
+
setAttributes({ "app.game.id": game.id, "app.game.slug": game.slug });
|
|
95029
|
+
const grants = await this.grantsFor(partner.id, game.id);
|
|
95030
|
+
if (!canPartnerLaunch({ ...partner, games: grants }, input.parentOrigin, game.id)) {
|
|
95031
|
+
throw new AccessDeniedError("This partner may not launch that game into that origin");
|
|
95032
|
+
}
|
|
95033
|
+
setAttributes({ "app.user.timeback_id": input.timebackId });
|
|
95034
|
+
const user = await this.deps.resolveTimebackStudent(input.timebackId);
|
|
95035
|
+
const pass = await generateSecureRandomString(PASS_LENGTH);
|
|
95036
|
+
const now = Date.now();
|
|
95037
|
+
const passExpiresAt = new Date(now + EMBED_PASS_TTL_MS);
|
|
95038
|
+
const [launch] = await this.deps.db.insert(embedLaunches).values({
|
|
95039
|
+
partnerId: partner.id,
|
|
95040
|
+
userId: user.id,
|
|
95041
|
+
gameId: game.id,
|
|
95042
|
+
parentOrigin: input.parentOrigin,
|
|
95043
|
+
timebackCourseId: input.timebackCourseId ?? null,
|
|
95044
|
+
passHash: await sha256Hex(pass),
|
|
95045
|
+
passExpiresAt,
|
|
95046
|
+
expiresAt: new Date(now + EMBED_LAUNCH_TTL_MS)
|
|
95047
|
+
}).returning({ id: embedLaunches.id });
|
|
95048
|
+
if (!launch) {
|
|
95049
|
+
throw new InternalError("Failed to create embed launch");
|
|
95050
|
+
}
|
|
95051
|
+
setAttributes({ "app.launch.id": launch.id, "app.user.id": user.id });
|
|
95052
|
+
return { launchId: launch.id, pass, passExpiresAt, gameSlug: game.slug };
|
|
95053
|
+
}
|
|
95054
|
+
async redeemLaunch(input, timeZone) {
|
|
95055
|
+
const launch = await this.consumePass(input);
|
|
95056
|
+
try {
|
|
95057
|
+
const user = await this.deps.db.query.users.findFirst({
|
|
95058
|
+
where: eq(users.id, launch.userId)
|
|
95059
|
+
});
|
|
95060
|
+
if (!user) {
|
|
95061
|
+
throw new NotFoundError("User", launch.userId);
|
|
95062
|
+
}
|
|
95063
|
+
const [game, profile, token] = await Promise.all([
|
|
95064
|
+
this.deps.getGameForStudent(launch.gameId, user),
|
|
95065
|
+
this.deps.getGameProfile(user, launch.gameId, timeZone),
|
|
95066
|
+
this.deps.mintGameToken(launch.gameId, user.id)
|
|
95067
|
+
]);
|
|
95068
|
+
await this.deps.db.update(embedLaunches).set({ redeemedAt: new Date }).where(eq(embedLaunches.id, launch.id));
|
|
95069
|
+
return {
|
|
95070
|
+
launchId: launch.id,
|
|
95071
|
+
token,
|
|
95072
|
+
user,
|
|
95073
|
+
game,
|
|
95074
|
+
profile,
|
|
95075
|
+
timebackCourseId: launch.timebackCourseId
|
|
95076
|
+
};
|
|
95077
|
+
} catch (error) {
|
|
95078
|
+
setAttributes({ "app.embed.outcome": "prepare_failed" });
|
|
95079
|
+
await this.endLaunch(launch.id);
|
|
95080
|
+
throw error;
|
|
95081
|
+
}
|
|
95082
|
+
}
|
|
95083
|
+
async renewToken(partner, launchId) {
|
|
95084
|
+
setAttributes({ "app.launch.id": launchId });
|
|
95085
|
+
const launch = await this.deps.db.query.embedLaunches.findFirst({
|
|
95086
|
+
where: and(eq(embedLaunches.id, launchId), eq(embedLaunches.partnerId, partner.id))
|
|
95087
|
+
});
|
|
95088
|
+
if (!launch) {
|
|
95089
|
+
setAttributes({ "app.embed.outcome": "not_found" });
|
|
95090
|
+
throw new NotFoundError("Embed launch", launchId);
|
|
95091
|
+
}
|
|
95092
|
+
setAttributes({ "app.game.id": launch.gameId, "app.user.id": launch.userId });
|
|
95093
|
+
const grants = await this.grantsFor(partner.id, launch.gameId);
|
|
95094
|
+
const outcome = renewalRefusal(launch, () => canPartnerLaunch({ ...partner, games: grants }, launch.parentOrigin, launch.gameId));
|
|
95095
|
+
setAttributes({ "app.embed.outcome": outcome ?? "renewed" });
|
|
95096
|
+
if (outcome) {
|
|
95097
|
+
throw new AccessDeniedError("This launch has ended");
|
|
95098
|
+
}
|
|
95099
|
+
return this.deps.mintGameToken(launch.gameId, launch.userId);
|
|
95100
|
+
}
|
|
95101
|
+
grantsFor(partnerId, gameId) {
|
|
95102
|
+
return this.deps.db.query.embedPartnerGames.findMany({
|
|
95103
|
+
where: and(eq(embedPartnerGames.partnerId, partnerId), eq(embedPartnerGames.gameId, gameId)),
|
|
95104
|
+
columns: { gameId: true }
|
|
95105
|
+
});
|
|
95106
|
+
}
|
|
95107
|
+
async endLaunch(launchId) {
|
|
95108
|
+
await this.deps.db.update(embedLaunches).set({ endedAt: sql`coalesce(${embedLaunches.endedAt}, now())`, passHash: null }).where(eq(embedLaunches.id, launchId));
|
|
95109
|
+
}
|
|
95110
|
+
async consumePass(input) {
|
|
95111
|
+
const now = new Date;
|
|
95112
|
+
const [launch] = await this.deps.db.update(embedLaunches).set({ passHash: null }).where(and(eq(embedLaunches.passHash, await sha256Hex(input.pass)), gt(embedLaunches.passExpiresAt, now), isNull(embedLaunches.endedAt))).returning();
|
|
95113
|
+
if (!launch) {
|
|
95114
|
+
setAttributes({ "app.embed.outcome": "pass_rejected" });
|
|
95115
|
+
throw new UnauthorizedError("This launch pass is not valid");
|
|
95116
|
+
}
|
|
95117
|
+
setAttributes({
|
|
95118
|
+
"app.launch.id": launch.id,
|
|
95119
|
+
"app.game.id": launch.gameId,
|
|
95120
|
+
"app.embed.partner_id": launch.partnerId,
|
|
95121
|
+
"app.user.id": launch.userId
|
|
95122
|
+
});
|
|
95123
|
+
const [partner, grants] = await Promise.all([
|
|
95124
|
+
this.deps.db.query.embedPartners.findFirst({
|
|
95125
|
+
where: eq(embedPartners.id, launch.partnerId),
|
|
95126
|
+
columns: { enabled: true, allowedOrigins: true }
|
|
95127
|
+
}),
|
|
95128
|
+
this.grantsFor(launch.partnerId, launch.gameId)
|
|
95129
|
+
]);
|
|
95130
|
+
const originMatches = launch.parentOrigin === input.parentOrigin;
|
|
95131
|
+
const stillAllowed = partner !== undefined && canPartnerLaunch({ ...partner, games: grants }, launch.parentOrigin, launch.gameId);
|
|
95132
|
+
if (!originMatches || !stillAllowed) {
|
|
95133
|
+
await this.endLaunch(launch.id);
|
|
95134
|
+
setAttributes({
|
|
95135
|
+
"app.embed.outcome": originMatches ? "partner_disallowed" : "origin_mismatch"
|
|
95136
|
+
});
|
|
95137
|
+
throw new UnauthorizedError("This launch pass is not valid");
|
|
95138
|
+
}
|
|
95139
|
+
return launch;
|
|
95140
|
+
}
|
|
95141
|
+
}
|
|
95142
|
+
function renewalRefusal(launch, isAllowed) {
|
|
95143
|
+
if (!launch.redeemedAt) {
|
|
95144
|
+
return "not_started";
|
|
95145
|
+
}
|
|
95146
|
+
if (launch.endedAt) {
|
|
95147
|
+
return "ended";
|
|
95148
|
+
}
|
|
95149
|
+
if (launch.expiresAt <= new Date) {
|
|
95150
|
+
return "expired";
|
|
95151
|
+
}
|
|
95152
|
+
return isAllowed() ? undefined : "partner_disallowed";
|
|
95153
|
+
}
|
|
95154
|
+
var PASS_LENGTH = 43;
|
|
95155
|
+
var init_embed_service = __esm(() => {
|
|
95156
|
+
init_drizzle_orm();
|
|
95157
|
+
init_src();
|
|
95158
|
+
init_tables_index();
|
|
95159
|
+
init_spans();
|
|
95160
|
+
init_errors2();
|
|
95161
|
+
init_embed_util();
|
|
95162
|
+
});
|
|
95163
|
+
|
|
94692
95164
|
// ../api-core/src/services/lti.service.ts
|
|
94693
95165
|
class LtiService {
|
|
94694
95166
|
deps;
|
|
@@ -94754,7 +95226,7 @@ class SessionService {
|
|
|
94754
95226
|
}
|
|
94755
95227
|
async resolveGame(gameIdOrSlug) {
|
|
94756
95228
|
const db = this.deps.db;
|
|
94757
|
-
const isUuid =
|
|
95229
|
+
const isUuid = isValidUUID(gameIdOrSlug);
|
|
94758
95230
|
const game = isUuid ? await db.query.games.findFirst({
|
|
94759
95231
|
where: eq(games.id, gameIdOrSlug),
|
|
94760
95232
|
columns: { id: true, slug: true }
|
|
@@ -94777,6 +95249,7 @@ var init_session_service = __esm(() => {
|
|
|
94777
95249
|
init_drizzle_orm();
|
|
94778
95250
|
init_tables_index();
|
|
94779
95251
|
init_spans();
|
|
95252
|
+
init_src9();
|
|
94780
95253
|
init_errors2();
|
|
94781
95254
|
});
|
|
94782
95255
|
|
|
@@ -95052,21 +95525,41 @@ var init_verify_service = __esm(() => {
|
|
|
95052
95525
|
|
|
95053
95526
|
// ../api-core/src/services/factory/standalone.ts
|
|
95054
95527
|
function createStandaloneServices(deps) {
|
|
95055
|
-
const { db, auth, timeback } = deps;
|
|
95528
|
+
const { db, auth, timeback, getGameForStudent, getTimebackData } = deps;
|
|
95056
95529
|
const lti = new LtiService({ db });
|
|
95057
95530
|
const session = new SessionService({ db, mintGameToken: auth.mintGameToken.bind(auth) });
|
|
95531
|
+
const account = new AccountService({ db, timeback });
|
|
95058
95532
|
const user = new UserService({ db, timeback });
|
|
95533
|
+
const embed = new EmbedService({
|
|
95534
|
+
db,
|
|
95535
|
+
mintGameToken: auth.mintGameToken.bind(auth),
|
|
95536
|
+
resolveTimebackStudent: (timebackId) => account.resolveTimebackStudent(timebackId),
|
|
95537
|
+
getGameForStudent,
|
|
95538
|
+
getGameProfile: async (student, gameId, timeZone) => {
|
|
95539
|
+
const [profile, timebackData] = await Promise.all([
|
|
95540
|
+
user.getMe(student, gameId, timeZone),
|
|
95541
|
+
student.timebackId ? getTimebackData(student.id, gameId).catch(() => {
|
|
95542
|
+
setAttributes({ "app.embed.timeback_context": "unavailable" });
|
|
95543
|
+
return;
|
|
95544
|
+
}) : undefined
|
|
95545
|
+
]);
|
|
95546
|
+
return { ...profile, timeback: timebackData };
|
|
95547
|
+
}
|
|
95548
|
+
});
|
|
95059
95549
|
const verify = new VerifyService({
|
|
95060
95550
|
db,
|
|
95061
95551
|
validateGameToken: auth.validateGameToken.bind(auth)
|
|
95062
95552
|
});
|
|
95063
|
-
return { lti, session, user, verify };
|
|
95553
|
+
return { account, embed, lti, session, user, verify };
|
|
95064
95554
|
}
|
|
95065
|
-
var init_standalone = __esm(() => {
|
|
95555
|
+
var init_standalone = __esm(async () => {
|
|
95556
|
+
init_spans();
|
|
95557
|
+
init_embed_service();
|
|
95066
95558
|
init_lti_service();
|
|
95067
95559
|
init_session_service();
|
|
95068
95560
|
init_user_service();
|
|
95069
95561
|
init_verify_service();
|
|
95562
|
+
await init_account_service();
|
|
95070
95563
|
});
|
|
95071
95564
|
|
|
95072
95565
|
// ../api-core/src/services/factory/index.ts
|
|
@@ -95109,7 +95602,13 @@ function createServices(ctx) {
|
|
|
95109
95602
|
verifyAssessmentToken: auth.verifyAssessmentToken.bind(auth),
|
|
95110
95603
|
...gaming.validators
|
|
95111
95604
|
});
|
|
95112
|
-
const standalone = createStandaloneServices({
|
|
95605
|
+
const standalone = createStandaloneServices({
|
|
95606
|
+
db,
|
|
95607
|
+
auth,
|
|
95608
|
+
timeback,
|
|
95609
|
+
getGameForStudent: (gameId, student) => gaming.services.game.getById(gameId, student),
|
|
95610
|
+
getTimebackData: (userId, gameId) => platform.timeback.getUserData(userId, gameId)
|
|
95611
|
+
});
|
|
95113
95612
|
return {
|
|
95114
95613
|
...infra,
|
|
95115
95614
|
...player,
|
|
@@ -95122,8 +95621,10 @@ var init_factory = __esm(async () => {
|
|
|
95122
95621
|
init_game3();
|
|
95123
95622
|
init_infra2();
|
|
95124
95623
|
init_player();
|
|
95125
|
-
|
|
95126
|
-
|
|
95624
|
+
await __promiseAll([
|
|
95625
|
+
init_platform2(),
|
|
95626
|
+
init_standalone()
|
|
95627
|
+
]);
|
|
95127
95628
|
});
|
|
95128
95629
|
|
|
95129
95630
|
// ../api-core/src/types/context.type.ts
|
|
@@ -95257,6 +95758,17 @@ function defineControllerNames(namespace, handlers) {
|
|
|
95257
95758
|
return handlers;
|
|
95258
95759
|
}
|
|
95259
95760
|
|
|
95761
|
+
// ../api-core/src/utils/game-token.util.ts
|
|
95762
|
+
async function withTunnelUrl(ctx, token) {
|
|
95763
|
+
const baseUrl = ctx.config.isLocal ? await getTunnelUrl(ctx.config.baseUrl).catch(() => {
|
|
95764
|
+
return;
|
|
95765
|
+
}) : undefined;
|
|
95766
|
+
return { ...token, baseUrl };
|
|
95767
|
+
}
|
|
95768
|
+
var init_game_token_util = __esm(() => {
|
|
95769
|
+
init_tunnel();
|
|
95770
|
+
});
|
|
95771
|
+
|
|
95260
95772
|
// ../api-core/src/utils/assessment-artifact-backfill.util.ts
|
|
95261
95773
|
var init_assessment_artifact_backfill_util = __esm(() => {
|
|
95262
95774
|
init_tables_index();
|
|
@@ -95266,37 +95778,8 @@ var init_assessment_artifact_backfill_util = __esm(() => {
|
|
|
95266
95778
|
init_timeback_review_mapping_util();
|
|
95267
95779
|
});
|
|
95268
95780
|
|
|
95269
|
-
// ../api-core/src/utils/lti.util.ts
|
|
95270
|
-
function generateUsername(email) {
|
|
95271
|
-
const baseUsername = (email.split("@")[0] || "user").toLowerCase();
|
|
95272
|
-
const cleanUsername = baseUsername.replace(/[^a-z0-9]/g, "");
|
|
95273
|
-
const randomSuffix = Math.random().toString(36).substring(2, 7);
|
|
95274
|
-
return `${cleanUsername}_${randomSuffix}`;
|
|
95275
|
-
}
|
|
95276
|
-
function extractRedirectPath(targetUri, currentHost) {
|
|
95277
|
-
try {
|
|
95278
|
-
const targetUrl = new URL(targetUri);
|
|
95279
|
-
if (targetUrl.hostname === currentHost) {
|
|
95280
|
-
return targetUrl.pathname + targetUrl.search;
|
|
95281
|
-
}
|
|
95282
|
-
} catch {}
|
|
95283
|
-
return "/";
|
|
95284
|
-
}
|
|
95285
|
-
function validateLtiClaims(claims) {
|
|
95286
|
-
const messageType = claims["https://purl.imsglobal.org/spec/lti/claim/message_type"];
|
|
95287
|
-
const version = claims["https://purl.imsglobal.org/spec/lti/claim/version"];
|
|
95288
|
-
if (messageType !== "LtiResourceLinkRequest") {
|
|
95289
|
-
return `Invalid LTI message type: ${messageType}`;
|
|
95290
|
-
}
|
|
95291
|
-
if (version !== "1.3.0") {
|
|
95292
|
-
return `Unsupported LTI version: ${version}`;
|
|
95293
|
-
}
|
|
95294
|
-
return null;
|
|
95295
|
-
}
|
|
95296
|
-
var init_lti_util = () => {};
|
|
95297
|
-
|
|
95298
95781
|
// ../api-core/src/utils/lti-provisioning.ts
|
|
95299
|
-
import * as
|
|
95782
|
+
import * as crypto5 from "node:crypto";
|
|
95300
95783
|
async function provisionLtiUser(db, claims) {
|
|
95301
95784
|
const database = db;
|
|
95302
95785
|
const email = claims.email;
|
|
@@ -95327,7 +95810,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
95327
95810
|
});
|
|
95328
95811
|
if (!existingLtiAccount) {
|
|
95329
95812
|
const [account] = await tx.insert(accounts).values({
|
|
95330
|
-
id:
|
|
95813
|
+
id: crypto5.randomUUID(),
|
|
95331
95814
|
userId: existingUser.id,
|
|
95332
95815
|
accountId: ltiTimebackId,
|
|
95333
95816
|
providerId,
|
|
@@ -95346,7 +95829,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
95346
95829
|
setAttribute("app.lti.provision", "linked_account");
|
|
95347
95830
|
return existingUser;
|
|
95348
95831
|
}
|
|
95349
|
-
const newUserId =
|
|
95832
|
+
const newUserId = crypto5.randomUUID();
|
|
95350
95833
|
const createdUser = await database.transaction(async (tx) => {
|
|
95351
95834
|
const [insertedUser] = await tx.insert(users).values({
|
|
95352
95835
|
id: newUserId,
|
|
@@ -95361,7 +95844,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
95361
95844
|
throw new InternalError("Failed to create user");
|
|
95362
95845
|
}
|
|
95363
95846
|
await tx.insert(accounts).values({
|
|
95364
|
-
id:
|
|
95847
|
+
id: crypto5.randomUUID(),
|
|
95365
95848
|
userId: newUserId,
|
|
95366
95849
|
accountId: ltiTimebackId,
|
|
95367
95850
|
providerId,
|
|
@@ -95471,6 +95954,7 @@ var init_validation_util = __esm(() => {
|
|
|
95471
95954
|
// ../api-core/src/utils/index.ts
|
|
95472
95955
|
var init_utils7 = __esm(() => {
|
|
95473
95956
|
init_auth_util();
|
|
95957
|
+
init_game_token_util();
|
|
95474
95958
|
init_assessment_runtime_lock_util();
|
|
95475
95959
|
init_assessment_artifact_envelope_util();
|
|
95476
95960
|
init_assessment_artifact_backfill_util();
|
|
@@ -95744,6 +96228,9 @@ function createSandboxAuthProvider() {
|
|
|
95744
96228
|
return null;
|
|
95745
96229
|
}
|
|
95746
96230
|
},
|
|
96231
|
+
async verifyEmbedPartnerToken() {
|
|
96232
|
+
return null;
|
|
96233
|
+
},
|
|
95747
96234
|
async mintPlatformServiceToken(gameId, studentId) {
|
|
95748
96235
|
return mintSandboxServiceToken("playcademy-game-metrics", { gameId, studentId });
|
|
95749
96236
|
},
|
|
@@ -110139,7 +110626,7 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
|
|
|
110139
110626
|
import process22 from "process";
|
|
110140
110627
|
import os2 from "os";
|
|
110141
110628
|
import tty from "tty";
|
|
110142
|
-
import { randomUUID as
|
|
110629
|
+
import { randomUUID as randomUUID3 } from "crypto";
|
|
110143
110630
|
function assembleStyles() {
|
|
110144
110631
|
const codes = /* @__PURE__ */ new Map;
|
|
110145
110632
|
for (const [groupName, group] of Object.entries(styles2)) {
|
|
@@ -112806,7 +113293,7 @@ var __create2, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2,
|
|
|
112806
113293
|
__defProp2(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
|
|
112807
113294
|
}
|
|
112808
113295
|
return to;
|
|
112809
|
-
}, __toESM5 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(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_browser2, require_inherits2, require_common3, require_sync, require_wrappy, require_once, require_inflight, require_glob, require_readline, require_src3, require_utils4, require_lodash, require_hanji, originUUID, snapshotVersion, mapValues, mapKeys, mapEntries, customMapEntries, init_global2, util3, objectUtil2, ZodParsedType2, getParsedType2, init_util5, ZodIssueCode4, ZodError4, init_ZodError2, errorMap2, en_default4, init_en4, overrideErrorMap2, init_errors9, makeIssue2, ParseStatus2, INVALID3, DIRTY2, OK2, isAborted2, isDirty2, isValid2, isAsync2, init_parseUtil2, init_typeAliases2, errorUtil2, init_errorUtil2, ParseInputLazyPath2, handleResult2, ZodType4, cuidRegex2, cuid2Regex2, ulidRegex2, uuidRegex2, nanoidRegex2, jwtRegex2, durationRegex2, emailRegex2, _emojiRegex2, emojiRegex2, ipv4Regex2, ipv4CidrRegex2, ipv6Regex2, ipv6CidrRegex2, base64Regex2, base64urlRegex2, dateRegexSource2, dateRegex2, ZodString4, ZodNumber4, ZodBigInt2, ZodBoolean4, ZodDate2, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown4, ZodNever4, ZodVoid2, ZodArray4, ZodObject4, ZodUnion4, getDiscriminator2, ZodDiscriminatedUnion4, ZodIntersection4, ZodTuple2, ZodRecord4, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral4, ZodEnum4, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional4, ZodNullable4, ZodDefault4, ZodCatch4, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly4, late2, ZodFirstPartyTypeKind3, stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, coerce2, init_types6, init_external4, init_v32, init_esm2, enumSchema, enumSchemaV1, indexColumn, index2, fk, sequenceSchema, roleSchema, sequenceSquashed, column2, checkConstraint, columnSquashed, compositePK, uniqueConstraint, policy, policySquashed, viewWithOption, matViewWithOption, mergedViewWithOption, view2, table8, 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_utils8, import_hanji, warning, error3, 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_util2, 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_lib5, 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, sep3, 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, _a3, Column2, init_column2, _a22, ColumnBuilder2, init_column_builder2, TableName2, init_table_utils2, _a32, 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, version4, init_version2, otel2, rawTracer2, tracer2, init_tracing2, ViewBaseConfig2, init_view_common3, Schema2, Columns2, ExtraConfigColumns2, OriginalName2, BaseName2, IsAlias2, ExtraConfigBuilder2, IsDrizzleTable2, _a20, _b11, _c, _d, _e3, _f, _g, _h, _i, _j, Table2, init_table8, _a21, FakePrimitiveParam, _a222, StringChunk2, _a23, _SQL, SQL2, _a24, Name2, noopDecoder2, noopEncoder2, noopMapper2, _a25, Param2, _a26, Placeholder2, IsDrizzleView2, _a27, _b12, _c2, View3, init_sql5, _a28, ColumnAliasProxyHandler2, _a29, TableAliasProxyHandler2, _a30, RelationTableAliasProxyHandler, init_alias3, _a31, _b13, DrizzleError2, DrizzleQueryError2, _a322, _b14, TransactionRollbackError2, init_errors22, _a33, ConsoleLogWriter2, _a34, DefaultLogger2, _a35, NoopLogger2, init_logger3, init_operations, _a36, _b15, QueryPromise2, init_query_promise2, textDecoder2, 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, ne4, gt3, gte2, lt4, 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_dist9, init_alias22, _a128, CheckBuilder2, _a129, Check2, init_checks6, 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, union22, 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_schema4, _a165, Cache2, _a166, _b119, NoopCache2, init_cache2, _a167, PgPreparedQuery2, _a168, PgSession2, _a169, _b120, PgTransaction2, init_session3, init_subquery22, init_utils52, init_pg_core2, vectorOps, init_vector32, sqlToStr, init_utils62, indexName, generatePgSnapshot, trimChar, fromDatabase, defaultForColumn, getColumnsInfoQuery, init_pgSerializer, import_hanji4, Select, init_selector_ui, init_alias32, _a170, CheckBuilder22, _a171, Check22, 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, _e32, SQLiteTable, sqliteTable, init_table32, _a208, IndexBuilderOn22, _a209, IndexBuilder22, _a210, Index4, init_indexes22, _a211, PrimaryKeyBuilder22, _a212, PrimaryKey22, init_primary_keys22, init_utils72, _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, union32, unionAll22, intersect22, except22, init_select32, _a221, QueryBuilder22, init_query_builder32, _a2222, 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_checks32, _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_utils82, _a3222, _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, import_hanji5, import_hanji6, UPPERCASE, LOWERCASE, LEADING_CAPITAL, IDENTIFIER, SEPARATORS, LEADING_SEPARATORS, SEPARATORS_AND_IDENTIFIER, NUMBERS_AND_IDENTIFIER, preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
113296
|
+
}, __toESM5 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(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_browser2, require_inherits2, require_common3, require_sync, require_wrappy, require_once, require_inflight, require_glob, require_readline, require_src3, require_utils4, require_lodash, require_hanji, originUUID, snapshotVersion, mapValues, mapKeys, mapEntries, customMapEntries, init_global2, util3, objectUtil2, ZodParsedType2, getParsedType2, init_util5, ZodIssueCode4, ZodError4, init_ZodError2, errorMap2, en_default4, init_en4, overrideErrorMap2, init_errors9, makeIssue2, ParseStatus2, INVALID3, DIRTY2, OK2, isAborted2, isDirty2, isValid2, isAsync2, init_parseUtil2, init_typeAliases2, errorUtil2, init_errorUtil2, ParseInputLazyPath2, handleResult2, ZodType4, cuidRegex2, cuid2Regex2, ulidRegex2, uuidRegex2, nanoidRegex2, jwtRegex2, durationRegex2, emailRegex2, _emojiRegex2, emojiRegex2, ipv4Regex2, ipv4CidrRegex2, ipv6Regex2, ipv6CidrRegex2, base64Regex2, base64urlRegex2, dateRegexSource2, dateRegex2, ZodString4, ZodNumber4, ZodBigInt2, ZodBoolean4, ZodDate2, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown4, ZodNever4, ZodVoid2, ZodArray4, ZodObject4, ZodUnion4, getDiscriminator2, ZodDiscriminatedUnion4, ZodIntersection4, ZodTuple2, ZodRecord4, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral4, ZodEnum4, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional4, ZodNullable4, ZodDefault4, ZodCatch4, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly4, late2, ZodFirstPartyTypeKind3, stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, coerce2, init_types6, init_external4, init_v32, init_esm2, enumSchema, enumSchemaV1, indexColumn, index2, fk, sequenceSchema, roleSchema, sequenceSquashed, column2, checkConstraint, columnSquashed, compositePK, uniqueConstraint, policy, policySquashed, viewWithOption, matViewWithOption, mergedViewWithOption, view2, table9, 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_utils8, import_hanji, warning, error3, 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_util2, 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_lib5, 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, sep3, 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, _a3, Column2, init_column2, _a22, ColumnBuilder2, init_column_builder2, TableName2, init_table_utils2, _a32, 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, version4, init_version2, otel2, rawTracer2, tracer2, init_tracing2, ViewBaseConfig2, init_view_common3, Schema2, Columns2, ExtraConfigColumns2, OriginalName2, BaseName2, IsAlias2, ExtraConfigBuilder2, IsDrizzleTable2, _a20, _b11, _c, _d, _e3, _f, _g, _h, _i, _j, Table2, init_table9, _a21, FakePrimitiveParam, _a222, StringChunk2, _a23, _SQL, SQL2, _a24, Name2, noopDecoder2, noopEncoder2, noopMapper2, _a25, Param2, _a26, Placeholder2, IsDrizzleView2, _a27, _b12, _c2, View3, init_sql5, _a28, ColumnAliasProxyHandler2, _a29, TableAliasProxyHandler2, _a30, RelationTableAliasProxyHandler, init_alias3, _a31, _b13, DrizzleError2, DrizzleQueryError2, _a322, _b14, TransactionRollbackError2, init_errors22, _a33, ConsoleLogWriter2, _a34, DefaultLogger2, _a35, NoopLogger2, init_logger3, init_operations, _a36, _b15, QueryPromise2, init_query_promise2, textDecoder2, 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, ne4, gt3, gte2, lt4, 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_dist9, init_alias22, _a128, CheckBuilder2, _a129, Check2, init_checks6, 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, union22, 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_schema4, _a165, Cache2, _a166, _b119, NoopCache2, init_cache2, _a167, PgPreparedQuery2, _a168, PgSession2, _a169, _b120, PgTransaction2, init_session3, init_subquery22, init_utils52, init_pg_core2, vectorOps, init_vector32, sqlToStr, init_utils62, indexName, generatePgSnapshot, trimChar, fromDatabase, defaultForColumn, getColumnsInfoQuery, init_pgSerializer, import_hanji4, Select, init_selector_ui, init_alias32, _a170, CheckBuilder22, _a171, Check22, 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, _e32, SQLiteTable, sqliteTable, init_table32, _a208, IndexBuilderOn22, _a209, IndexBuilder22, _a210, Index4, init_indexes22, _a211, PrimaryKeyBuilder22, _a212, PrimaryKey22, init_primary_keys22, init_utils72, _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, union32, unionAll22, intersect22, except22, init_select32, _a221, QueryBuilder22, init_query_builder32, _a2222, 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_checks32, _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_utils82, _a3222, _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, import_hanji5, import_hanji6, UPPERCASE, LOWERCASE, LEADING_CAPITAL, IDENTIFIER, SEPARATORS, LEADING_SEPARATORS, SEPARATORS_AND_IDENTIFIER, NUMBERS_AND_IDENTIFIER, preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
112810
113297
|
let isLastCharLower = false;
|
|
112811
113298
|
let isLastCharUpper = false;
|
|
112812
113299
|
let isLastLastCharUpper = false;
|
|
@@ -112841,7 +113328,7 @@ var __create2, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2,
|
|
|
112841
113328
|
return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
|
|
112842
113329
|
}, generateDrizzleJson = (imports, prevId, schemaFilters, casing2) => {
|
|
112843
113330
|
const prepared = prepareFromExports(imports);
|
|
112844
|
-
const id =
|
|
113331
|
+
const id = randomUUID3();
|
|
112845
113332
|
const snapshot = generatePgSnapshot(prepared.tables, prepared.enums, prepared.schemas, prepared.sequences, prepared.roles, prepared.policies, prepared.views, prepared.matViews, casing2, schemaFilters);
|
|
112846
113333
|
return fillPgSnapshot({
|
|
112847
113334
|
serialized: snapshot,
|
|
@@ -119754,7 +120241,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
119754
120241
|
using: stringType2().optional(),
|
|
119755
120242
|
tablespace: stringType2().optional()
|
|
119756
120243
|
}).strict();
|
|
119757
|
-
|
|
120244
|
+
table9 = objectType2({
|
|
119758
120245
|
name: stringType2(),
|
|
119759
120246
|
schema: stringType2(),
|
|
119760
120247
|
columns: recordType2(stringType2(), column2),
|
|
@@ -119783,7 +120270,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
119783
120270
|
gelSchemaExternal = objectType2({
|
|
119784
120271
|
version: literalType2("1"),
|
|
119785
120272
|
dialect: literalType2("gel"),
|
|
119786
|
-
tables: arrayType2(
|
|
120273
|
+
tables: arrayType2(table9),
|
|
119787
120274
|
enums: arrayType2(enumSchemaV1),
|
|
119788
120275
|
schemas: arrayType2(objectType2({ name: stringType2() })),
|
|
119789
120276
|
_meta: objectType2({
|
|
@@ -119795,7 +120282,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
119795
120282
|
gelSchemaInternal = objectType2({
|
|
119796
120283
|
version: literalType2("1"),
|
|
119797
120284
|
dialect: literalType2("gel"),
|
|
119798
|
-
tables: recordType2(stringType2(),
|
|
120285
|
+
tables: recordType2(stringType2(), table9),
|
|
119799
120286
|
enums: recordType2(stringType2(), enumSchema),
|
|
119800
120287
|
schemas: recordType2(stringType2(), stringType2()),
|
|
119801
120288
|
views: recordType2(stringType2(), view2).default({}),
|
|
@@ -132790,7 +133277,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
132790
133277
|
ViewBaseConfig2 = Symbol.for("drizzle:ViewBaseConfig");
|
|
132791
133278
|
}
|
|
132792
133279
|
});
|
|
132793
|
-
|
|
133280
|
+
init_table9 = __esm2({
|
|
132794
133281
|
"../drizzle-orm/dist/table.js"() {
|
|
132795
133282
|
init_entity2();
|
|
132796
133283
|
init_table_utils2();
|
|
@@ -132840,7 +133327,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
132840
133327
|
init_tracing2();
|
|
132841
133328
|
init_view_common3();
|
|
132842
133329
|
init_column2();
|
|
132843
|
-
|
|
133330
|
+
init_table9();
|
|
132844
133331
|
_a21 = entityKind2;
|
|
132845
133332
|
FakePrimitiveParam = class {
|
|
132846
133333
|
};
|
|
@@ -133186,7 +133673,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
133186
133673
|
init_column2();
|
|
133187
133674
|
init_entity2();
|
|
133188
133675
|
init_sql5();
|
|
133189
|
-
|
|
133676
|
+
init_table9();
|
|
133190
133677
|
init_view_common3();
|
|
133191
133678
|
_a28 = entityKind2;
|
|
133192
133679
|
ColumnAliasProxyHandler2 = class {
|
|
@@ -133361,7 +133848,7 @@ params: ${params}`);
|
|
|
133361
133848
|
init_entity2();
|
|
133362
133849
|
init_sql5();
|
|
133363
133850
|
init_subquery2();
|
|
133364
|
-
|
|
133851
|
+
init_table9();
|
|
133365
133852
|
init_view_common3();
|
|
133366
133853
|
textDecoder2 = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
133367
133854
|
}
|
|
@@ -134613,7 +135100,7 @@ params: ${params}`);
|
|
|
134613
135100
|
init_table22 = __esm2({
|
|
134614
135101
|
"../drizzle-orm/dist/pg-core/table.js"() {
|
|
134615
135102
|
init_entity2();
|
|
134616
|
-
|
|
135103
|
+
init_table9();
|
|
134617
135104
|
init_all2();
|
|
134618
135105
|
InlineForeignKeys2 = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
134619
135106
|
EnableRLS2 = Symbol.for("drizzle:EnableRLS");
|
|
@@ -134673,7 +135160,7 @@ params: ${params}`);
|
|
|
134673
135160
|
"../drizzle-orm/dist/sql/expressions/conditions.js"() {
|
|
134674
135161
|
init_column2();
|
|
134675
135162
|
init_entity2();
|
|
134676
|
-
|
|
135163
|
+
init_table9();
|
|
134677
135164
|
init_sql5();
|
|
134678
135165
|
eq2 = (left, right) => {
|
|
134679
135166
|
return sql4`${left} = ${bindIfParam2(right, left)}`;
|
|
@@ -134708,7 +135195,7 @@ params: ${params}`);
|
|
|
134708
135195
|
});
|
|
134709
135196
|
init_relations2 = __esm2({
|
|
134710
135197
|
"../drizzle-orm/dist/relations.js"() {
|
|
134711
|
-
|
|
135198
|
+
init_table9();
|
|
134712
135199
|
init_column2();
|
|
134713
135200
|
init_entity2();
|
|
134714
135201
|
init_primary_keys2();
|
|
@@ -134922,7 +135409,7 @@ params: ${params}`);
|
|
|
134922
135409
|
init_relations2();
|
|
134923
135410
|
init_sql22();
|
|
134924
135411
|
init_subquery2();
|
|
134925
|
-
|
|
135412
|
+
init_table9();
|
|
134926
135413
|
init_utils22();
|
|
134927
135414
|
init_view_common3();
|
|
134928
135415
|
}
|
|
@@ -135181,7 +135668,7 @@ params: ${params}`);
|
|
|
135181
135668
|
init_casing2 = __esm2({
|
|
135182
135669
|
"../drizzle-orm/dist/casing.js"() {
|
|
135183
135670
|
init_entity2();
|
|
135184
|
-
|
|
135671
|
+
init_table9();
|
|
135185
135672
|
_a135 = entityKind2;
|
|
135186
135673
|
CasingCache2 = class {
|
|
135187
135674
|
constructor(casing2) {
|
|
@@ -135243,7 +135730,7 @@ params: ${params}`);
|
|
|
135243
135730
|
init_sql22();
|
|
135244
135731
|
init_sql5();
|
|
135245
135732
|
init_subquery2();
|
|
135246
|
-
|
|
135733
|
+
init_table9();
|
|
135247
135734
|
init_utils22();
|
|
135248
135735
|
init_view_common3();
|
|
135249
135736
|
init_view_base2();
|
|
@@ -135827,7 +136314,7 @@ params: ${params}`);
|
|
|
135827
136314
|
init_selection_proxy2();
|
|
135828
136315
|
init_sql5();
|
|
135829
136316
|
init_subquery2();
|
|
135830
|
-
|
|
136317
|
+
init_table9();
|
|
135831
136318
|
init_tracing2();
|
|
135832
136319
|
init_utils22();
|
|
135833
136320
|
init_utils22();
|
|
@@ -136448,7 +136935,7 @@ params: ${params}`);
|
|
|
136448
136935
|
init_table22();
|
|
136449
136936
|
init_sql5();
|
|
136450
136937
|
init_subquery2();
|
|
136451
|
-
|
|
136938
|
+
init_table9();
|
|
136452
136939
|
init_view_common3();
|
|
136453
136940
|
init_checks6();
|
|
136454
136941
|
init_foreign_keys2();
|
|
@@ -136465,7 +136952,7 @@ params: ${params}`);
|
|
|
136465
136952
|
init_entity2();
|
|
136466
136953
|
init_query_promise2();
|
|
136467
136954
|
init_selection_proxy2();
|
|
136468
|
-
|
|
136955
|
+
init_table9();
|
|
136469
136956
|
init_tracing2();
|
|
136470
136957
|
init_utils22();
|
|
136471
136958
|
init_utils42();
|
|
@@ -136535,7 +137022,7 @@ params: ${params}`);
|
|
|
136535
137022
|
init_query_promise2();
|
|
136536
137023
|
init_selection_proxy2();
|
|
136537
137024
|
init_sql5();
|
|
136538
|
-
|
|
137025
|
+
init_table9();
|
|
136539
137026
|
init_tracing2();
|
|
136540
137027
|
init_utils22();
|
|
136541
137028
|
init_utils42();
|
|
@@ -136730,7 +137217,7 @@ params: ${params}`);
|
|
|
136730
137217
|
init_selection_proxy2();
|
|
136731
137218
|
init_sql5();
|
|
136732
137219
|
init_subquery2();
|
|
136733
|
-
|
|
137220
|
+
init_table9();
|
|
136734
137221
|
init_utils22();
|
|
136735
137222
|
init_view_common3();
|
|
136736
137223
|
init_utils42();
|
|
@@ -139532,7 +140019,7 @@ ORDER BY
|
|
|
139532
140019
|
init_table32 = __esm2({
|
|
139533
140020
|
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
|
139534
140021
|
init_entity2();
|
|
139535
|
-
|
|
140022
|
+
init_table9();
|
|
139536
140023
|
init_all22();
|
|
139537
140024
|
InlineForeignKeys22 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
|
139538
140025
|
SQLiteTable = class extends (_e32 = Table2, _d3 = entityKind2, _c7 = Table2.Symbol.Columns, _b151 = InlineForeignKeys22, _a207 = Table2.Symbol.ExtraConfigBuilder, _e32) {
|
|
@@ -139634,7 +140121,7 @@ ORDER BY
|
|
|
139634
140121
|
init_entity2();
|
|
139635
140122
|
init_sql5();
|
|
139636
140123
|
init_subquery2();
|
|
139637
|
-
|
|
140124
|
+
init_table9();
|
|
139638
140125
|
init_view_common3();
|
|
139639
140126
|
init_checks22();
|
|
139640
140127
|
init_foreign_keys22();
|
|
@@ -139650,7 +140137,7 @@ ORDER BY
|
|
|
139650
140137
|
init_query_promise2();
|
|
139651
140138
|
init_selection_proxy2();
|
|
139652
140139
|
init_table32();
|
|
139653
|
-
|
|
140140
|
+
init_table9();
|
|
139654
140141
|
init_utils22();
|
|
139655
140142
|
init_utils72();
|
|
139656
140143
|
SQLiteDeleteBase = class extends (_b152 = QueryPromise2, _a213 = entityKind2, _b152) {
|
|
@@ -139745,7 +140232,7 @@ ORDER BY
|
|
|
139745
140232
|
init_columns22();
|
|
139746
140233
|
init_table32();
|
|
139747
140234
|
init_subquery2();
|
|
139748
|
-
|
|
140235
|
+
init_table9();
|
|
139749
140236
|
init_utils22();
|
|
139750
140237
|
init_view_common3();
|
|
139751
140238
|
init_view_base22();
|
|
@@ -140323,7 +140810,7 @@ ORDER BY
|
|
|
140323
140810
|
init_selection_proxy2();
|
|
140324
140811
|
init_sql5();
|
|
140325
140812
|
init_subquery2();
|
|
140326
|
-
|
|
140813
|
+
init_table9();
|
|
140327
140814
|
init_utils22();
|
|
140328
140815
|
init_view_common3();
|
|
140329
140816
|
init_utils72();
|
|
@@ -140686,7 +141173,7 @@ ORDER BY
|
|
|
140686
141173
|
init_query_promise2();
|
|
140687
141174
|
init_sql5();
|
|
140688
141175
|
init_table32();
|
|
140689
|
-
|
|
141176
|
+
init_table9();
|
|
140690
141177
|
init_utils22();
|
|
140691
141178
|
init_utils72();
|
|
140692
141179
|
init_query_builder32();
|
|
@@ -140809,7 +141296,7 @@ ORDER BY
|
|
|
140809
141296
|
init_selection_proxy2();
|
|
140810
141297
|
init_table32();
|
|
140811
141298
|
init_subquery2();
|
|
140812
|
-
|
|
141299
|
+
init_table9();
|
|
140813
141300
|
init_utils22();
|
|
140814
141301
|
init_view_common3();
|
|
140815
141302
|
init_utils72();
|
|
@@ -143417,7 +143904,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
143417
143904
|
init_table42 = __esm2({
|
|
143418
143905
|
"../drizzle-orm/dist/mysql-core/table.js"() {
|
|
143419
143906
|
init_entity2();
|
|
143420
|
-
|
|
143907
|
+
init_table9();
|
|
143421
143908
|
init_all3();
|
|
143422
143909
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
|
143423
143910
|
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind2, _c10 = Table2.Symbol.Columns, _b238 = InlineForeignKeys3, _a319 = Table2.Symbol.ExtraConfigBuilder, _e4) {
|
|
@@ -143480,7 +143967,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
143480
143967
|
init_entity2();
|
|
143481
143968
|
init_dist9();
|
|
143482
143969
|
init_subquery2();
|
|
143483
|
-
|
|
143970
|
+
init_table9();
|
|
143484
143971
|
init_view_common3();
|
|
143485
143972
|
init_checks32();
|
|
143486
143973
|
init_foreign_keys3();
|
|
@@ -143496,7 +143983,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
143496
143983
|
init_entity2();
|
|
143497
143984
|
init_query_promise2();
|
|
143498
143985
|
init_selection_proxy2();
|
|
143499
|
-
|
|
143986
|
+
init_table9();
|
|
143500
143987
|
init_utils82();
|
|
143501
143988
|
MySqlDeleteBase = class extends (_b239 = QueryPromise2, _a3222 = entityKind2, _b239) {
|
|
143502
143989
|
constructor(table6, session, dialect6, withList) {
|
|
@@ -143576,7 +144063,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
143576
144063
|
init_expressions2();
|
|
143577
144064
|
init_sql5();
|
|
143578
144065
|
init_subquery2();
|
|
143579
|
-
|
|
144066
|
+
init_table9();
|
|
143580
144067
|
init_utils22();
|
|
143581
144068
|
init_view_common3();
|
|
143582
144069
|
init_common4();
|
|
@@ -144342,7 +144829,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
144342
144829
|
init_selection_proxy2();
|
|
144343
144830
|
init_sql5();
|
|
144344
144831
|
init_subquery2();
|
|
144345
|
-
|
|
144832
|
+
init_table9();
|
|
144346
144833
|
init_utils22();
|
|
144347
144834
|
init_view_common3();
|
|
144348
144835
|
init_utils82();
|
|
@@ -144742,7 +145229,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
144742
145229
|
init_entity2();
|
|
144743
145230
|
init_query_promise2();
|
|
144744
145231
|
init_sql5();
|
|
144745
|
-
|
|
145232
|
+
init_table9();
|
|
144746
145233
|
init_utils22();
|
|
144747
145234
|
init_utils82();
|
|
144748
145235
|
init_query_builder4();
|
|
@@ -144846,7 +145333,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
144846
145333
|
init_entity2();
|
|
144847
145334
|
init_query_promise2();
|
|
144848
145335
|
init_selection_proxy2();
|
|
144849
|
-
|
|
145336
|
+
init_table9();
|
|
144850
145337
|
init_utils22();
|
|
144851
145338
|
init_utils82();
|
|
144852
145339
|
_a331 = entityKind2;
|
|
@@ -147654,7 +148141,7 @@ AND
|
|
|
147654
148141
|
init_table52 = __esm2({
|
|
147655
148142
|
"../drizzle-orm/dist/singlestore-core/table.js"() {
|
|
147656
148143
|
init_entity2();
|
|
147657
|
-
|
|
148144
|
+
init_table9();
|
|
147658
148145
|
init_all4();
|
|
147659
148146
|
SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind2, _b319 = Table2.Symbol.Columns, _a419 = Table2.Symbol.ExtraConfigBuilder, _d5) {
|
|
147660
148147
|
constructor() {
|
|
@@ -147705,7 +148192,7 @@ AND
|
|
|
147705
148192
|
init_entity2();
|
|
147706
148193
|
init_sql5();
|
|
147707
148194
|
init_subquery2();
|
|
147708
|
-
|
|
148195
|
+
init_table9();
|
|
147709
148196
|
init_indexes4();
|
|
147710
148197
|
init_primary_keys4();
|
|
147711
148198
|
init_table52();
|
|
@@ -147717,7 +148204,7 @@ AND
|
|
|
147717
148204
|
init_entity2();
|
|
147718
148205
|
init_query_promise2();
|
|
147719
148206
|
init_selection_proxy2();
|
|
147720
|
-
|
|
148207
|
+
init_table9();
|
|
147721
148208
|
init_utils10();
|
|
147722
148209
|
SingleStoreDeleteBase = class extends (_b320 = QueryPromise2, _a422 = entityKind2, _b320) {
|
|
147723
148210
|
constructor(table6, session, dialect6, withList) {
|
|
@@ -147782,7 +148269,7 @@ AND
|
|
|
147782
148269
|
init_entity2();
|
|
147783
148270
|
init_query_promise2();
|
|
147784
148271
|
init_sql5();
|
|
147785
|
-
|
|
148272
|
+
init_table9();
|
|
147786
148273
|
init_utils22();
|
|
147787
148274
|
init_utils10();
|
|
147788
148275
|
_a423 = entityKind2;
|
|
@@ -147880,7 +148367,7 @@ AND
|
|
|
147880
148367
|
init_expressions2();
|
|
147881
148368
|
init_sql5();
|
|
147882
148369
|
init_subquery2();
|
|
147883
|
-
|
|
148370
|
+
init_table9();
|
|
147884
148371
|
init_utils22();
|
|
147885
148372
|
init_view_common3();
|
|
147886
148373
|
init_common5();
|
|
@@ -148411,7 +148898,7 @@ AND
|
|
|
148411
148898
|
init_selection_proxy2();
|
|
148412
148899
|
init_sql5();
|
|
148413
148900
|
init_subquery2();
|
|
148414
|
-
|
|
148901
|
+
init_table9();
|
|
148415
148902
|
init_utils22();
|
|
148416
148903
|
init_utils10();
|
|
148417
148904
|
_a426 = entityKind2;
|
|
@@ -148780,7 +149267,7 @@ AND
|
|
|
148780
149267
|
init_entity2();
|
|
148781
149268
|
init_query_promise2();
|
|
148782
149269
|
init_selection_proxy2();
|
|
148783
|
-
|
|
149270
|
+
init_table9();
|
|
148784
149271
|
init_utils22();
|
|
148785
149272
|
init_utils10();
|
|
148786
149273
|
_a430 = entityKind2;
|
|
@@ -151390,6 +151877,69 @@ var init_domain_controller = __esm(() => {
|
|
|
151390
151877
|
});
|
|
151391
151878
|
});
|
|
151392
151879
|
|
|
151880
|
+
// ../api-core/src/controllers/embed.controller.ts
|
|
151881
|
+
function requireUuidParam(value, name2) {
|
|
151882
|
+
if (!value) {
|
|
151883
|
+
throw ApiError.badRequest(`Missing ${name2}`);
|
|
151884
|
+
}
|
|
151885
|
+
if (!isValidUUID(value)) {
|
|
151886
|
+
throw ApiError.unprocessableEntity(`${name2} must be a valid UUID format`);
|
|
151887
|
+
}
|
|
151888
|
+
return value;
|
|
151889
|
+
}
|
|
151890
|
+
async function requirePartner(ctx) {
|
|
151891
|
+
const header = ctx.request.headers.get("Authorization");
|
|
151892
|
+
const token = header?.startsWith("Bearer ") ? header.slice("Bearer ".length) : "";
|
|
151893
|
+
const verified = token ? await ctx.providers.auth.verifyEmbedPartnerToken(token) : null;
|
|
151894
|
+
if (!verified) {
|
|
151895
|
+
throw ApiError.unauthorized("A valid embed partner access token is required");
|
|
151896
|
+
}
|
|
151897
|
+
return ctx.services.embed.getPartnerByClientId(verified.clientId);
|
|
151898
|
+
}
|
|
151899
|
+
async function createLaunch(ctx) {
|
|
151900
|
+
const partner = await requirePartner(ctx);
|
|
151901
|
+
const body2 = await parseRequestBody(ctx.request, CreateEmbedLaunchSchema);
|
|
151902
|
+
const launch = await ctx.services.embed.createLaunch(partner, body2);
|
|
151903
|
+
return {
|
|
151904
|
+
launchId: launch.launchId,
|
|
151905
|
+
pass: launch.pass,
|
|
151906
|
+
passExpiresAt: launch.passExpiresAt.toISOString(),
|
|
151907
|
+
embedUrl: embedPageUrl(ctx.url.origin, launch.gameSlug, body2.parentOrigin)
|
|
151908
|
+
};
|
|
151909
|
+
}
|
|
151910
|
+
async function renewToken(ctx) {
|
|
151911
|
+
const partner = await requirePartner(ctx);
|
|
151912
|
+
const launchId = requireUuidParam(ctx.params.launchId, "launchId");
|
|
151913
|
+
return withTunnelUrl(ctx, await ctx.services.embed.renewToken(partner, launchId));
|
|
151914
|
+
}
|
|
151915
|
+
async function redeemPass(ctx) {
|
|
151916
|
+
const body2 = await parseRequestBody(ctx.request, RedeemEmbedPassSchema);
|
|
151917
|
+
const launch = await ctx.services.embed.redeemLaunch(body2, ctx.request.headers.get(PLAYCADEMY_BROWSER_TIME_ZONE_HEADER));
|
|
151918
|
+
return {
|
|
151919
|
+
launchId: launch.launchId,
|
|
151920
|
+
token: await withTunnelUrl(ctx, launch.token),
|
|
151921
|
+
userId: launch.user.id,
|
|
151922
|
+
game: launch.game,
|
|
151923
|
+
timebackCourseId: launch.timebackCourseId,
|
|
151924
|
+
localDay: launch.profile.localDay,
|
|
151925
|
+
timeback: launch.profile.timeback
|
|
151926
|
+
};
|
|
151927
|
+
}
|
|
151928
|
+
var embed2;
|
|
151929
|
+
var init_embed_controller = __esm(() => {
|
|
151930
|
+
init_src();
|
|
151931
|
+
init_schemas_index();
|
|
151932
|
+
init_src9();
|
|
151933
|
+
init_errors2();
|
|
151934
|
+
init_utils7();
|
|
151935
|
+
init_embed_util();
|
|
151936
|
+
embed2 = defineControllerNames("embed", {
|
|
151937
|
+
createLaunch,
|
|
151938
|
+
redeemPass,
|
|
151939
|
+
renewToken
|
|
151940
|
+
});
|
|
151941
|
+
});
|
|
151942
|
+
|
|
151393
151943
|
// ../api-core/src/controllers/game-member.controller.ts
|
|
151394
151944
|
function requireUserId2(userId) {
|
|
151395
151945
|
if (!userId) {
|
|
@@ -151919,7 +152469,6 @@ var MintTokenBody, mintToken, sessions2;
|
|
|
151919
152469
|
var init_session_controller = __esm(() => {
|
|
151920
152470
|
init_esm();
|
|
151921
152471
|
init_spans();
|
|
151922
|
-
init_tunnel();
|
|
151923
152472
|
init_errors2();
|
|
151924
152473
|
init_utils7();
|
|
151925
152474
|
MintTokenBody = objectType({
|
|
@@ -151935,14 +152484,7 @@ var init_session_controller = __esm(() => {
|
|
|
151935
152484
|
reason = MintTokenBody.parse(await ctx.request.clone().json()).reason;
|
|
151936
152485
|
} catch {}
|
|
151937
152486
|
setAttribute("app.token.reason", reason ?? "initial");
|
|
151938
|
-
|
|
151939
|
-
let baseUrl;
|
|
151940
|
-
if (ctx.config.isLocal) {
|
|
151941
|
-
try {
|
|
151942
|
-
baseUrl = await getTunnelUrl(ctx.config.baseUrl);
|
|
151943
|
-
} catch {}
|
|
151944
|
-
}
|
|
151945
|
-
return { token, exp, baseUrl };
|
|
152487
|
+
return withTunnelUrl(ctx, await ctx.services.session.mintToken(gameIdOrSlug, ctx.user.id));
|
|
151946
152488
|
});
|
|
151947
152489
|
sessions2 = defineControllerNames("sessions", {
|
|
151948
152490
|
mintToken
|
|
@@ -153006,6 +153548,7 @@ var init_controllers = __esm(() => {
|
|
|
153006
153548
|
init_deployment_state_controller();
|
|
153007
153549
|
init_developer_controller();
|
|
153008
153550
|
init_domain_controller();
|
|
153551
|
+
init_embed_controller();
|
|
153009
153552
|
init_game_member_controller();
|
|
153010
153553
|
init_game_controller();
|
|
153011
153554
|
init_kv_controller();
|
|
@@ -153250,7 +153793,7 @@ var init_crud = __esm(async () => {
|
|
|
153250
153793
|
});
|
|
153251
153794
|
|
|
153252
153795
|
// src/routes/platform/games/uploads.ts
|
|
153253
|
-
import { randomUUID as
|
|
153796
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
153254
153797
|
async function initiateHandler(c) {
|
|
153255
153798
|
const user = c.get("user");
|
|
153256
153799
|
if (!user) {
|
|
@@ -153270,7 +153813,7 @@ async function initiateHandler(c) {
|
|
|
153270
153813
|
}
|
|
153271
153814
|
}, 422);
|
|
153272
153815
|
}
|
|
153273
|
-
const uploadToken = `sandbox-upload-${
|
|
153816
|
+
const uploadToken = `sandbox-upload-${randomUUID4()}`;
|
|
153274
153817
|
const version = `v${Date.now()}`;
|
|
153275
153818
|
pendingUploads.set(uploadToken, {
|
|
153276
153819
|
gameId: body2.gameId,
|