@playcademy/sandbox 0.12.1-beta.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 +668 -123
- package/dist/constants.js +8 -0
- package/dist/server.js +668 -123
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -697,7 +697,7 @@ var package_default;
|
|
|
697
697
|
var init_package = __esm(() => {
|
|
698
698
|
package_default = {
|
|
699
699
|
name: "@playcademy/sandbox",
|
|
700
|
-
version: "0.12.
|
|
700
|
+
version: "0.12.2-beta.1",
|
|
701
701
|
description: "Local development server for Playcademy game development",
|
|
702
702
|
type: "module",
|
|
703
703
|
exports: {
|
|
@@ -5197,6 +5197,13 @@ var init_dashboard = __esm(() => {
|
|
|
5197
5197
|
};
|
|
5198
5198
|
});
|
|
5199
5199
|
|
|
5200
|
+
// ../constants/src/embed.ts
|
|
5201
|
+
var EMBED_PASS_TTL_MS, EMBED_LAUNCH_TTL_MS, EMBED_PAGE_PATH = "/embed", EMBED_PARENT_ORIGIN_PARAM = "parentOrigin";
|
|
5202
|
+
var init_embed = __esm(() => {
|
|
5203
|
+
EMBED_PASS_TTL_MS = 60 * 1000;
|
|
5204
|
+
EMBED_LAUNCH_TTL_MS = 12 * 60 * 60 * 1000;
|
|
5205
|
+
});
|
|
5206
|
+
|
|
5200
5207
|
// ../constants/src/typescript.ts
|
|
5201
5208
|
var init_typescript = () => {};
|
|
5202
5209
|
|
|
@@ -5340,6 +5347,7 @@ var init_cloudflare = __esm(() => {
|
|
|
5340
5347
|
var init_src = __esm(() => {
|
|
5341
5348
|
init_auth();
|
|
5342
5349
|
init_dashboard();
|
|
5350
|
+
init_embed();
|
|
5343
5351
|
init_typescript();
|
|
5344
5352
|
init_domains();
|
|
5345
5353
|
init_env_vars();
|
|
@@ -19026,6 +19034,78 @@ var init_table7 = __esm(() => {
|
|
|
19026
19034
|
]);
|
|
19027
19035
|
});
|
|
19028
19036
|
|
|
19037
|
+
// ../data/src/domains/embed/table.ts
|
|
19038
|
+
var embedPartners, embedPartnerGames, embedLaunches, embedPartnersRelations, embedPartnerGamesRelations, embedLaunchesRelations;
|
|
19039
|
+
var init_table8 = __esm(() => {
|
|
19040
|
+
init_drizzle_orm();
|
|
19041
|
+
init_pg_core();
|
|
19042
|
+
init_table5();
|
|
19043
|
+
init_table3();
|
|
19044
|
+
embedPartners = pgTable("embed_partners", {
|
|
19045
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
19046
|
+
name: text("name").notNull(),
|
|
19047
|
+
clientId: text("client_id").notNull().unique(),
|
|
19048
|
+
allowedOrigins: text("allowed_origins").array().notNull().default([]),
|
|
19049
|
+
enabled: boolean("enabled").notNull().default(true),
|
|
19050
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
19051
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
19052
|
+
});
|
|
19053
|
+
embedPartnerGames = pgTable("embed_partner_games", {
|
|
19054
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
19055
|
+
partnerId: uuid("partner_id").notNull().references(() => embedPartners.id, { onDelete: "cascade" }),
|
|
19056
|
+
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
19057
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
19058
|
+
}, (table) => [
|
|
19059
|
+
uniqueIndex("embed_partner_games_partner_game_idx").on(table.partnerId, table.gameId),
|
|
19060
|
+
index("embed_partner_games_game_idx").on(table.gameId)
|
|
19061
|
+
]);
|
|
19062
|
+
embedLaunches = pgTable("embed_launches", {
|
|
19063
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
19064
|
+
partnerId: uuid("partner_id").notNull().references(() => embedPartners.id, { onDelete: "restrict" }),
|
|
19065
|
+
userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
19066
|
+
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
19067
|
+
parentOrigin: text("parent_origin").notNull(),
|
|
19068
|
+
timebackCourseId: text("timeback_course_id"),
|
|
19069
|
+
passHash: text("pass_hash").unique(),
|
|
19070
|
+
passExpiresAt: timestamp("pass_expires_at", { withTimezone: true }).notNull(),
|
|
19071
|
+
redeemedAt: timestamp("redeemed_at", { withTimezone: true }),
|
|
19072
|
+
endedAt: timestamp("ended_at", { withTimezone: true }),
|
|
19073
|
+
expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
|
|
19074
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
19075
|
+
}, (table) => [
|
|
19076
|
+
index("embed_launches_partner_idx").on(table.partnerId),
|
|
19077
|
+
index("embed_launches_user_idx").on(table.userId),
|
|
19078
|
+
index("embed_launches_game_idx").on(table.gameId)
|
|
19079
|
+
]);
|
|
19080
|
+
embedPartnersRelations = relations(embedPartners, ({ many }) => ({
|
|
19081
|
+
games: many(embedPartnerGames)
|
|
19082
|
+
}));
|
|
19083
|
+
embedPartnerGamesRelations = relations(embedPartnerGames, ({ one }) => ({
|
|
19084
|
+
partner: one(embedPartners, {
|
|
19085
|
+
fields: [embedPartnerGames.partnerId],
|
|
19086
|
+
references: [embedPartners.id]
|
|
19087
|
+
}),
|
|
19088
|
+
game: one(games, {
|
|
19089
|
+
fields: [embedPartnerGames.gameId],
|
|
19090
|
+
references: [games.id]
|
|
19091
|
+
})
|
|
19092
|
+
}));
|
|
19093
|
+
embedLaunchesRelations = relations(embedLaunches, ({ one }) => ({
|
|
19094
|
+
partner: one(embedPartners, {
|
|
19095
|
+
fields: [embedLaunches.partnerId],
|
|
19096
|
+
references: [embedPartners.id]
|
|
19097
|
+
}),
|
|
19098
|
+
user: one(users, {
|
|
19099
|
+
fields: [embedLaunches.userId],
|
|
19100
|
+
references: [users.id]
|
|
19101
|
+
}),
|
|
19102
|
+
game: one(games, {
|
|
19103
|
+
fields: [embedLaunches.gameId],
|
|
19104
|
+
references: [games.id]
|
|
19105
|
+
})
|
|
19106
|
+
}));
|
|
19107
|
+
});
|
|
19108
|
+
|
|
19029
19109
|
// ../data/src/tables.index.ts
|
|
19030
19110
|
var exports_tables_index = {};
|
|
19031
19111
|
__export(exports_tables_index, {
|
|
@@ -19038,6 +19118,12 @@ __export(exports_tables_index, {
|
|
|
19038
19118
|
deploymentProviderEnum: () => deploymentProviderEnum,
|
|
19039
19119
|
deploymentTargetEnum: () => deploymentTargetEnum,
|
|
19040
19120
|
developerStatusEnum: () => developerStatusEnum,
|
|
19121
|
+
embedLaunches: () => embedLaunches,
|
|
19122
|
+
embedLaunchesRelations: () => embedLaunchesRelations,
|
|
19123
|
+
embedPartnerGames: () => embedPartnerGames,
|
|
19124
|
+
embedPartnerGamesRelations: () => embedPartnerGamesRelations,
|
|
19125
|
+
embedPartners: () => embedPartners,
|
|
19126
|
+
embedPartnersRelations: () => embedPartnersRelations,
|
|
19041
19127
|
gameCustomHostnames: () => gameCustomHostnames,
|
|
19042
19128
|
gameDashboardUserRoleEnum: () => gameDashboardUserRoleEnum,
|
|
19043
19129
|
gameDashboardUsers: () => gameDashboardUsers,
|
|
@@ -19073,6 +19159,7 @@ var init_tables_index = __esm(() => {
|
|
|
19073
19159
|
init_table5();
|
|
19074
19160
|
init_table6();
|
|
19075
19161
|
init_table7();
|
|
19162
|
+
init_table8();
|
|
19076
19163
|
});
|
|
19077
19164
|
|
|
19078
19165
|
// ../../node_modules/.bun/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/version.js
|
|
@@ -30063,22 +30150,24 @@ async function extractZipToDirectory(zipBuffer, targetDir) {
|
|
|
30063
30150
|
try {
|
|
30064
30151
|
const zip = await import_jszip.default.loadAsync(zipBuffer);
|
|
30065
30152
|
await mkdir(targetDir, { recursive: true });
|
|
30066
|
-
const
|
|
30067
|
-
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
extractPromises.push(mkdir(dirPath, { recursive: true }).then(() => {}));
|
|
30071
|
-
} else {
|
|
30153
|
+
const entries = Object.entries(zip.files);
|
|
30154
|
+
const batchSize = 32;
|
|
30155
|
+
for (let offset = 0;offset < entries.length; offset += batchSize) {
|
|
30156
|
+
const results = await Promise.allSettled(entries.slice(offset, offset + batchSize).map(async ([relativePath, zipEntry]) => {
|
|
30072
30157
|
const filePath = join2(targetDir, relativePath);
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30158
|
+
if (zipEntry.dir) {
|
|
30159
|
+
await mkdir(filePath, { recursive: true });
|
|
30160
|
+
return;
|
|
30161
|
+
}
|
|
30162
|
+
const content = await zipEntry.async("uint8array");
|
|
30163
|
+
await mkdir(join2(filePath, ".."), { recursive: true });
|
|
30164
|
+
await writeFile(filePath, content);
|
|
30165
|
+
}));
|
|
30166
|
+
const failure = results.find((result) => result.status === "rejected");
|
|
30167
|
+
if (failure) {
|
|
30168
|
+
throw failure.reason;
|
|
30079
30169
|
}
|
|
30080
|
-
}
|
|
30081
|
-
await Promise.all(extractPromises);
|
|
30170
|
+
}
|
|
30082
30171
|
log.debug("[utils/zip] Extracted ZIP to directory", {
|
|
30083
30172
|
targetDir,
|
|
30084
30173
|
fileCount: Object.keys(zip.files).length
|
|
@@ -48843,12 +48932,56 @@ var init_schemas4 = __esm(() => {
|
|
|
48843
48932
|
});
|
|
48844
48933
|
});
|
|
48845
48934
|
|
|
48935
|
+
// ../data/src/domains/embed/schemas.ts
|
|
48936
|
+
function isLocalHostname(hostname) {
|
|
48937
|
+
return LOCAL_HOSTNAMES.has(hostname) || hostname.endsWith(".localhost");
|
|
48938
|
+
}
|
|
48939
|
+
function isCanonicalOrigin(value) {
|
|
48940
|
+
let url;
|
|
48941
|
+
try {
|
|
48942
|
+
url = new URL(value);
|
|
48943
|
+
} catch {
|
|
48944
|
+
return false;
|
|
48945
|
+
}
|
|
48946
|
+
if (url.origin !== value) {
|
|
48947
|
+
return false;
|
|
48948
|
+
}
|
|
48949
|
+
return url.protocol === "https:" || url.protocol === "http:" && isLocalHostname(url.hostname);
|
|
48950
|
+
}
|
|
48951
|
+
var LOCAL_HOSTNAMES, EmbedOriginSchema, CreateEmbedPartnerSchema, UpdateEmbedPartnerSchema, CreateEmbedLaunchSchema, RedeemEmbedPassSchema;
|
|
48952
|
+
var init_schemas5 = __esm(() => {
|
|
48953
|
+
init_esm();
|
|
48954
|
+
LOCAL_HOSTNAMES = new Set(["localhost", "127.0.0.1"]);
|
|
48955
|
+
EmbedOriginSchema = stringType().refine(isCanonicalOrigin, {
|
|
48956
|
+
message: "Origin must be a bare https origin like https://example.com, with no path or slash"
|
|
48957
|
+
});
|
|
48958
|
+
CreateEmbedPartnerSchema = objectType({
|
|
48959
|
+
name: stringType().trim().min(1).max(100),
|
|
48960
|
+
clientId: stringType().trim().min(1).max(200),
|
|
48961
|
+
allowedOrigins: arrayType(EmbedOriginSchema).max(20).default([]),
|
|
48962
|
+
allowedGameIds: arrayType(stringType().uuid().transform((id) => id.toLowerCase())).max(200).default([]),
|
|
48963
|
+
enabled: booleanType().default(true)
|
|
48964
|
+
}).strict();
|
|
48965
|
+
UpdateEmbedPartnerSchema = CreateEmbedPartnerSchema.omit({ clientId: true }).partial();
|
|
48966
|
+
CreateEmbedLaunchSchema = objectType({
|
|
48967
|
+
timebackId: stringType().trim().min(1).max(200),
|
|
48968
|
+
gameSlug: stringType().trim().min(1).max(100),
|
|
48969
|
+
parentOrigin: EmbedOriginSchema,
|
|
48970
|
+
timebackCourseId: stringType().trim().min(1).max(200).optional()
|
|
48971
|
+
}).strict();
|
|
48972
|
+
RedeemEmbedPassSchema = objectType({
|
|
48973
|
+
pass: stringType().min(1).max(200),
|
|
48974
|
+
parentOrigin: EmbedOriginSchema
|
|
48975
|
+
}).strict();
|
|
48976
|
+
});
|
|
48977
|
+
|
|
48846
48978
|
// ../data/src/schemas.index.ts
|
|
48847
48979
|
var init_schemas_index = __esm(() => {
|
|
48848
48980
|
init_schemas();
|
|
48849
48981
|
init_schemas2();
|
|
48850
48982
|
init_schemas3();
|
|
48851
48983
|
init_schemas4();
|
|
48984
|
+
init_schemas5();
|
|
48852
48985
|
});
|
|
48853
48986
|
|
|
48854
48987
|
// ../../node_modules/.bun/@timeback+core@0.3.1+0ba747e64b820dcd/node_modules/@timeback/core/dist/chunk-3j7jywnx.js
|
|
@@ -51977,7 +52110,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
51977
52110
|
}
|
|
51978
52111
|
}
|
|
51979
52112
|
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;
|
|
51980
|
-
var
|
|
52113
|
+
var init_schemas6 = __esm(() => {
|
|
51981
52114
|
init_checks2();
|
|
51982
52115
|
init_core2();
|
|
51983
52116
|
init_parse();
|
|
@@ -53614,7 +53747,7 @@ var init_core3 = __esm(() => {
|
|
|
53614
53747
|
init_core2();
|
|
53615
53748
|
init_parse();
|
|
53616
53749
|
init_errors4();
|
|
53617
|
-
|
|
53750
|
+
init_schemas6();
|
|
53618
53751
|
init_checks2();
|
|
53619
53752
|
init_versions();
|
|
53620
53753
|
init_registries();
|
|
@@ -53655,7 +53788,7 @@ function duration2(params) {
|
|
|
53655
53788
|
var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration;
|
|
53656
53789
|
var init_iso = __esm(() => {
|
|
53657
53790
|
init_core3();
|
|
53658
|
-
|
|
53791
|
+
init_schemas7();
|
|
53659
53792
|
ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
53660
53793
|
$ZodISODateTime.init(inst, def);
|
|
53661
53794
|
ZodStringFormat.init(inst, def);
|
|
@@ -53897,7 +54030,7 @@ function superRefine(fn, params) {
|
|
|
53897
54030
|
return ch;
|
|
53898
54031
|
}
|
|
53899
54032
|
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;
|
|
53900
|
-
var
|
|
54033
|
+
var init_schemas7 = __esm(() => {
|
|
53901
54034
|
init_core3();
|
|
53902
54035
|
init_core3();
|
|
53903
54036
|
init_checks3();
|
|
@@ -54350,7 +54483,7 @@ var init_external2 = __esm(() => {
|
|
|
54350
54483
|
init_locales();
|
|
54351
54484
|
init_iso();
|
|
54352
54485
|
init_coerce();
|
|
54353
|
-
|
|
54486
|
+
init_schemas7();
|
|
54354
54487
|
init_checks3();
|
|
54355
54488
|
init_errors5();
|
|
54356
54489
|
init_parse2();
|
|
@@ -64026,7 +64159,7 @@ function handleRefineResult2(result, payload, input, inst) {
|
|
|
64026
64159
|
}
|
|
64027
64160
|
}
|
|
64028
64161
|
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;
|
|
64029
|
-
var
|
|
64162
|
+
var init_schemas8 = __esm(() => {
|
|
64030
64163
|
init_checks4();
|
|
64031
64164
|
init_core4();
|
|
64032
64165
|
init_parse3();
|
|
@@ -66503,7 +66636,7 @@ var init_core5 = __esm(() => {
|
|
|
66503
66636
|
init_core4();
|
|
66504
66637
|
init_parse3();
|
|
66505
66638
|
init_errors6();
|
|
66506
|
-
|
|
66639
|
+
init_schemas8();
|
|
66507
66640
|
init_checks4();
|
|
66508
66641
|
init_versions2();
|
|
66509
66642
|
init_registries2();
|
|
@@ -66543,7 +66676,7 @@ function duration4(params) {
|
|
|
66543
66676
|
var ZodISODateTime2, ZodISODate2, ZodISOTime2, ZodISODuration2;
|
|
66544
66677
|
var init_iso2 = __esm(() => {
|
|
66545
66678
|
init_core5();
|
|
66546
|
-
|
|
66679
|
+
init_schemas9();
|
|
66547
66680
|
ZodISODateTime2 = /* @__PURE__ */ $constructor2("ZodISODateTime", (inst, def) => {
|
|
66548
66681
|
$ZodISODateTime2.init(inst, def);
|
|
66549
66682
|
ZodStringFormat2.init(inst, def);
|
|
@@ -66821,7 +66954,7 @@ function superRefine2(fn, params) {
|
|
|
66821
66954
|
return _superRefine(fn, params);
|
|
66822
66955
|
}
|
|
66823
66956
|
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;
|
|
66824
|
-
var
|
|
66957
|
+
var init_schemas9 = __esm(() => {
|
|
66825
66958
|
init_core5();
|
|
66826
66959
|
init_core5();
|
|
66827
66960
|
init_json_schema_processors();
|
|
@@ -67478,7 +67611,7 @@ var init_external3 = __esm(() => {
|
|
|
67478
67611
|
init_locales2();
|
|
67479
67612
|
init_iso2();
|
|
67480
67613
|
init_coerce2();
|
|
67481
|
-
|
|
67614
|
+
init_schemas9();
|
|
67482
67615
|
init_checks5();
|
|
67483
67616
|
init_errors7();
|
|
67484
67617
|
init_parse4();
|
|
@@ -80389,11 +80522,8 @@ function normalizeText2(value) {
|
|
|
80389
80522
|
function normalizeTestType(value) {
|
|
80390
80523
|
return normalizeText2(value).replaceAll("-", " ");
|
|
80391
80524
|
}
|
|
80392
|
-
function isUuidLike(value) {
|
|
80393
|
-
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
80394
|
-
}
|
|
80395
80525
|
function hasReadableStandardLabel(standard) {
|
|
80396
|
-
return Boolean(standard.name || standard.identifier || !
|
|
80526
|
+
return Boolean(standard.name || standard.identifier || !isValidUUID(standard.id));
|
|
80397
80527
|
}
|
|
80398
80528
|
function isAllowedGradeLevelTestType(value) {
|
|
80399
80529
|
const normalizedType = normalizeTestType(value);
|
|
@@ -80706,6 +80836,7 @@ var GRADE_LEVEL_TEST_TYPES, naturalTitleSort;
|
|
|
80706
80836
|
var init_timeback_grade_level_results_util = __esm(() => {
|
|
80707
80837
|
init_constants2();
|
|
80708
80838
|
init_qti();
|
|
80839
|
+
init_src9();
|
|
80709
80840
|
GRADE_LEVEL_TEST_TYPES = [
|
|
80710
80841
|
"placement",
|
|
80711
80842
|
"test out",
|
|
@@ -81164,7 +81295,8 @@ class TimebackAdminService {
|
|
|
81164
81295
|
const entries = await Promise.all(courseIds.map(async (courseId) => {
|
|
81165
81296
|
const roster = await client.roster.getCourseRoster(courseId, {
|
|
81166
81297
|
includeInactive: options?.includeInactive,
|
|
81167
|
-
includeUsers: false
|
|
81298
|
+
includeUsers: false,
|
|
81299
|
+
userSourcedId: studentId
|
|
81168
81300
|
});
|
|
81169
81301
|
const matches = roster.filter((entry) => entry.enrollment.user.sourcedId === studentId).toSorted((a, b) => {
|
|
81170
81302
|
const aActive = a.enrollment.status === "active";
|
|
@@ -92867,6 +92999,348 @@ var init_player = __esm(() => {
|
|
|
92867
92999
|
init_leaderboard_service();
|
|
92868
93000
|
});
|
|
92869
93001
|
|
|
93002
|
+
// ../api-core/src/utils/account.util.ts
|
|
93003
|
+
function resolveStudentAccount(byEmail, hasTimebackSignIn) {
|
|
93004
|
+
if (!byEmail) {
|
|
93005
|
+
return "create";
|
|
93006
|
+
}
|
|
93007
|
+
return byEmail.emailVerified && !byEmail.timebackId && !hasTimebackSignIn ? "link" : "conflict";
|
|
93008
|
+
}
|
|
93009
|
+
|
|
93010
|
+
// ../api-core/src/utils/lti.util.ts
|
|
93011
|
+
function generateUsername(email) {
|
|
93012
|
+
const baseUsername = (email.split("@")[0] || "user").toLowerCase();
|
|
93013
|
+
const cleanUsername = baseUsername.replace(/[^a-z0-9]/g, "");
|
|
93014
|
+
const randomSuffix = Math.random().toString(36).substring(2, 7);
|
|
93015
|
+
return `${cleanUsername}_${randomSuffix}`;
|
|
93016
|
+
}
|
|
93017
|
+
function extractRedirectPath(targetUri, currentHost) {
|
|
93018
|
+
try {
|
|
93019
|
+
const targetUrl = new URL(targetUri);
|
|
93020
|
+
if (targetUrl.hostname === currentHost) {
|
|
93021
|
+
return targetUrl.pathname + targetUrl.search;
|
|
93022
|
+
}
|
|
93023
|
+
} catch {}
|
|
93024
|
+
return "/";
|
|
93025
|
+
}
|
|
93026
|
+
function validateLtiClaims(claims) {
|
|
93027
|
+
const messageType = claims["https://purl.imsglobal.org/spec/lti/claim/message_type"];
|
|
93028
|
+
const version = claims["https://purl.imsglobal.org/spec/lti/claim/version"];
|
|
93029
|
+
if (messageType !== "LtiResourceLinkRequest") {
|
|
93030
|
+
return `Invalid LTI message type: ${messageType}`;
|
|
93031
|
+
}
|
|
93032
|
+
if (version !== "1.3.0") {
|
|
93033
|
+
return `Unsupported LTI version: ${version}`;
|
|
93034
|
+
}
|
|
93035
|
+
return null;
|
|
93036
|
+
}
|
|
93037
|
+
var init_lti_util = () => {};
|
|
93038
|
+
|
|
93039
|
+
// ../api-core/src/services/account.service.ts
|
|
93040
|
+
import * as crypto4 from "node:crypto";
|
|
93041
|
+
|
|
93042
|
+
class AccountService {
|
|
93043
|
+
deps;
|
|
93044
|
+
constructor(deps) {
|
|
93045
|
+
this.deps = deps;
|
|
93046
|
+
}
|
|
93047
|
+
async resolveTimebackStudent(timebackId) {
|
|
93048
|
+
const byTimebackId = await this.findByTimebackId(timebackId);
|
|
93049
|
+
if (byTimebackId) {
|
|
93050
|
+
setAttributes({ "app.account.student_resolution": "existing" });
|
|
93051
|
+
return byTimebackId;
|
|
93052
|
+
}
|
|
93053
|
+
const profile = await this.fetchOneRosterProfile(timebackId);
|
|
93054
|
+
const byEmailMatches = await this.deps.db.query.users.findMany({
|
|
93055
|
+
where: sql`lower(${users.email}) = lower(${profile.email})`,
|
|
93056
|
+
limit: 2
|
|
93057
|
+
});
|
|
93058
|
+
const byEmail = byEmailMatches.length === 1 ? byEmailMatches[0] : undefined;
|
|
93059
|
+
if (byEmail?.timebackId === timebackId) {
|
|
93060
|
+
return byEmail;
|
|
93061
|
+
}
|
|
93062
|
+
const resolution = byEmailMatches.length > 1 ? "conflict" : resolveStudentAccount(byEmail, await this.hasTimebackSignIn(byEmail));
|
|
93063
|
+
setAttributes({ "app.account.student_resolution": resolution });
|
|
93064
|
+
if (resolution === "conflict") {
|
|
93065
|
+
throw new ConflictError("This student's email belongs to another account");
|
|
93066
|
+
}
|
|
93067
|
+
if (byEmail && resolution === "link") {
|
|
93068
|
+
return this.link(byEmail, timebackId);
|
|
93069
|
+
}
|
|
93070
|
+
return this.create(profile, timebackId);
|
|
93071
|
+
}
|
|
93072
|
+
async hasTimebackSignIn(user) {
|
|
93073
|
+
if (!user) {
|
|
93074
|
+
return false;
|
|
93075
|
+
}
|
|
93076
|
+
const signIn = await this.deps.db.query.accounts.findFirst({
|
|
93077
|
+
columns: { id: true },
|
|
93078
|
+
where: and(eq(accounts.userId, user.id), inArray(accounts.providerId, [
|
|
93079
|
+
AUTH_PROVIDER_IDS.TIMEBACK,
|
|
93080
|
+
AUTH_PROVIDER_IDS.TIMEBACK_LTI,
|
|
93081
|
+
AUTH_PROVIDER_IDS.PLAYCADEMY
|
|
93082
|
+
]))
|
|
93083
|
+
});
|
|
93084
|
+
setAttributes({ "app.account.has_timeback_sign_in": signIn !== undefined });
|
|
93085
|
+
return signIn !== undefined;
|
|
93086
|
+
}
|
|
93087
|
+
findByTimebackId(timebackId) {
|
|
93088
|
+
return this.deps.db.query.users.findFirst({ where: eq(users.timebackId, timebackId) });
|
|
93089
|
+
}
|
|
93090
|
+
async concurrentWinner(timebackId) {
|
|
93091
|
+
const winner = await this.findByTimebackId(timebackId);
|
|
93092
|
+
if (!winner) {
|
|
93093
|
+
throw new ConflictError("This student's email belongs to another account");
|
|
93094
|
+
}
|
|
93095
|
+
return winner;
|
|
93096
|
+
}
|
|
93097
|
+
async link(account, timebackId) {
|
|
93098
|
+
const [linked] = await this.deps.db.update(users).set({ timebackId, updatedAt: new Date }).where(and(eq(users.id, account.id), isNull(users.timebackId))).returning();
|
|
93099
|
+
return linked ?? this.concurrentWinner(timebackId);
|
|
93100
|
+
}
|
|
93101
|
+
async create(profile, timebackId) {
|
|
93102
|
+
const now = new Date;
|
|
93103
|
+
let created;
|
|
93104
|
+
try {
|
|
93105
|
+
[created] = await this.deps.db.insert(users).values({
|
|
93106
|
+
id: crypto4.randomUUID(),
|
|
93107
|
+
email: profile.email.toLowerCase(),
|
|
93108
|
+
emailVerified: true,
|
|
93109
|
+
username: generateUsername(profile.email),
|
|
93110
|
+
name: profile.name,
|
|
93111
|
+
timebackId,
|
|
93112
|
+
createdAt: now,
|
|
93113
|
+
updatedAt: now
|
|
93114
|
+
}).returning();
|
|
93115
|
+
} catch (error) {
|
|
93116
|
+
if (isUniqueViolation(error)) {
|
|
93117
|
+
return this.concurrentWinner(timebackId);
|
|
93118
|
+
}
|
|
93119
|
+
throw error;
|
|
93120
|
+
}
|
|
93121
|
+
if (!created) {
|
|
93122
|
+
throw new InternalError("Failed to create user");
|
|
93123
|
+
}
|
|
93124
|
+
return created;
|
|
93125
|
+
}
|
|
93126
|
+
async fetchOneRosterProfile(timebackId) {
|
|
93127
|
+
if (!this.deps.timeback) {
|
|
93128
|
+
throw new ServiceUnavailableError("Timeback is not available in this environment");
|
|
93129
|
+
}
|
|
93130
|
+
const record = await this.deps.timeback.api.oneroster.users.get(timebackId).catch((error) => {
|
|
93131
|
+
if (isApiError(error) && error.statusCode === 404) {
|
|
93132
|
+
return null;
|
|
93133
|
+
}
|
|
93134
|
+
setAttributes({
|
|
93135
|
+
"app.account.student_resolution": "timeback_unavailable",
|
|
93136
|
+
"app.timeback.status_code": isApiError(error) ? error.statusCode : undefined
|
|
93137
|
+
});
|
|
93138
|
+
throw new ServiceUnavailableError("Timeback is unavailable; retry shortly");
|
|
93139
|
+
});
|
|
93140
|
+
if (!record) {
|
|
93141
|
+
throw new NotFoundError("Timeback student", timebackId);
|
|
93142
|
+
}
|
|
93143
|
+
if (!record.email) {
|
|
93144
|
+
throw new NotFoundError("Email for Timeback student", timebackId);
|
|
93145
|
+
}
|
|
93146
|
+
const fullName = [record.givenName, record.familyName].filter(Boolean).join(" ");
|
|
93147
|
+
return {
|
|
93148
|
+
email: record.email,
|
|
93149
|
+
name: fullName || record.email.split("@")[0] || "Timeback User"
|
|
93150
|
+
};
|
|
93151
|
+
}
|
|
93152
|
+
}
|
|
93153
|
+
var init_account_service = __esm(async () => {
|
|
93154
|
+
init_drizzle_orm();
|
|
93155
|
+
init_src();
|
|
93156
|
+
init_tables_index();
|
|
93157
|
+
init_spans();
|
|
93158
|
+
init_errors2();
|
|
93159
|
+
init_lti_util();
|
|
93160
|
+
await init_errors8();
|
|
93161
|
+
});
|
|
93162
|
+
|
|
93163
|
+
// ../api-core/src/utils/embed.util.ts
|
|
93164
|
+
function canPartnerLaunch(partner, origin, gameId) {
|
|
93165
|
+
return partner.enabled && partner.allowedOrigins.includes(origin) && partner.games.some((grant) => grant.gameId === gameId);
|
|
93166
|
+
}
|
|
93167
|
+
function embedPageUrl(hubOrigin, slug, parentOrigin) {
|
|
93168
|
+
const url = new URL(`${EMBED_PAGE_PATH}/${encodeURIComponent(slug)}`, hubOrigin);
|
|
93169
|
+
url.searchParams.set(EMBED_PARENT_ORIGIN_PARAM, parentOrigin);
|
|
93170
|
+
return url.toString();
|
|
93171
|
+
}
|
|
93172
|
+
var init_embed_util = __esm(() => {
|
|
93173
|
+
init_src();
|
|
93174
|
+
});
|
|
93175
|
+
|
|
93176
|
+
// ../api-core/src/services/embed.service.ts
|
|
93177
|
+
class EmbedService {
|
|
93178
|
+
deps;
|
|
93179
|
+
constructor(deps) {
|
|
93180
|
+
this.deps = deps;
|
|
93181
|
+
}
|
|
93182
|
+
async getPartnerByClientId(clientId) {
|
|
93183
|
+
const partner = await this.deps.db.query.embedPartners.findFirst({
|
|
93184
|
+
where: eq(embedPartners.clientId, clientId)
|
|
93185
|
+
});
|
|
93186
|
+
if (!partner?.enabled) {
|
|
93187
|
+
throw new AccessDeniedError("This client is not an approved embed partner");
|
|
93188
|
+
}
|
|
93189
|
+
setAttributes({ "app.embed.partner_id": partner.id });
|
|
93190
|
+
return partner;
|
|
93191
|
+
}
|
|
93192
|
+
async isFrameOriginAllowed(origin, slug) {
|
|
93193
|
+
const grants = await this.deps.db.select({
|
|
93194
|
+
enabled: embedPartners.enabled,
|
|
93195
|
+
allowedOrigins: embedPartners.allowedOrigins,
|
|
93196
|
+
gameId: embedPartnerGames.gameId
|
|
93197
|
+
}).from(embedPartnerGames).innerJoin(embedPartners, eq(embedPartners.id, embedPartnerGames.partnerId)).innerJoin(games, eq(games.id, embedPartnerGames.gameId)).where(eq(games.slug, slug));
|
|
93198
|
+
return grants.some((grant) => canPartnerLaunch({ ...grant, games: [grant] }, origin, grant.gameId));
|
|
93199
|
+
}
|
|
93200
|
+
async createLaunch(partner, input) {
|
|
93201
|
+
const game = await this.deps.db.query.games.findFirst({
|
|
93202
|
+
where: eq(games.slug, input.gameSlug),
|
|
93203
|
+
columns: { id: true, slug: true }
|
|
93204
|
+
});
|
|
93205
|
+
if (!game) {
|
|
93206
|
+
throw new NotFoundError("Game", input.gameSlug);
|
|
93207
|
+
}
|
|
93208
|
+
setAttributes({ "app.game.id": game.id, "app.game.slug": game.slug });
|
|
93209
|
+
const grants = await this.grantsFor(partner.id, game.id);
|
|
93210
|
+
if (!canPartnerLaunch({ ...partner, games: grants }, input.parentOrigin, game.id)) {
|
|
93211
|
+
throw new AccessDeniedError("This partner may not launch that game into that origin");
|
|
93212
|
+
}
|
|
93213
|
+
setAttributes({ "app.user.timeback_id": input.timebackId });
|
|
93214
|
+
const user = await this.deps.resolveTimebackStudent(input.timebackId);
|
|
93215
|
+
const pass = await generateSecureRandomString(PASS_LENGTH);
|
|
93216
|
+
const now = Date.now();
|
|
93217
|
+
const passExpiresAt = new Date(now + EMBED_PASS_TTL_MS);
|
|
93218
|
+
const [launch] = await this.deps.db.insert(embedLaunches).values({
|
|
93219
|
+
partnerId: partner.id,
|
|
93220
|
+
userId: user.id,
|
|
93221
|
+
gameId: game.id,
|
|
93222
|
+
parentOrigin: input.parentOrigin,
|
|
93223
|
+
timebackCourseId: input.timebackCourseId ?? null,
|
|
93224
|
+
passHash: await sha256Hex(pass),
|
|
93225
|
+
passExpiresAt,
|
|
93226
|
+
expiresAt: new Date(now + EMBED_LAUNCH_TTL_MS)
|
|
93227
|
+
}).returning({ id: embedLaunches.id });
|
|
93228
|
+
if (!launch) {
|
|
93229
|
+
throw new InternalError("Failed to create embed launch");
|
|
93230
|
+
}
|
|
93231
|
+
setAttributes({ "app.launch.id": launch.id, "app.user.id": user.id });
|
|
93232
|
+
return { launchId: launch.id, pass, passExpiresAt, gameSlug: game.slug };
|
|
93233
|
+
}
|
|
93234
|
+
async redeemLaunch(input, timeZone) {
|
|
93235
|
+
const launch = await this.consumePass(input);
|
|
93236
|
+
try {
|
|
93237
|
+
const user = await this.deps.db.query.users.findFirst({
|
|
93238
|
+
where: eq(users.id, launch.userId)
|
|
93239
|
+
});
|
|
93240
|
+
if (!user) {
|
|
93241
|
+
throw new NotFoundError("User", launch.userId);
|
|
93242
|
+
}
|
|
93243
|
+
const [game, profile, token] = await Promise.all([
|
|
93244
|
+
this.deps.getGameForStudent(launch.gameId, user),
|
|
93245
|
+
this.deps.getGameProfile(user, launch.gameId, timeZone),
|
|
93246
|
+
this.deps.mintGameToken(launch.gameId, user.id)
|
|
93247
|
+
]);
|
|
93248
|
+
await this.deps.db.update(embedLaunches).set({ redeemedAt: new Date }).where(eq(embedLaunches.id, launch.id));
|
|
93249
|
+
return {
|
|
93250
|
+
launchId: launch.id,
|
|
93251
|
+
token,
|
|
93252
|
+
user,
|
|
93253
|
+
game,
|
|
93254
|
+
profile,
|
|
93255
|
+
timebackCourseId: launch.timebackCourseId
|
|
93256
|
+
};
|
|
93257
|
+
} catch (error) {
|
|
93258
|
+
setAttributes({ "app.embed.outcome": "prepare_failed" });
|
|
93259
|
+
await this.endLaunch(launch.id);
|
|
93260
|
+
throw error;
|
|
93261
|
+
}
|
|
93262
|
+
}
|
|
93263
|
+
async renewToken(partner, launchId) {
|
|
93264
|
+
setAttributes({ "app.launch.id": launchId });
|
|
93265
|
+
const launch = await this.deps.db.query.embedLaunches.findFirst({
|
|
93266
|
+
where: and(eq(embedLaunches.id, launchId), eq(embedLaunches.partnerId, partner.id))
|
|
93267
|
+
});
|
|
93268
|
+
if (!launch) {
|
|
93269
|
+
setAttributes({ "app.embed.outcome": "not_found" });
|
|
93270
|
+
throw new NotFoundError("Embed launch", launchId);
|
|
93271
|
+
}
|
|
93272
|
+
setAttributes({ "app.game.id": launch.gameId, "app.user.id": launch.userId });
|
|
93273
|
+
const grants = await this.grantsFor(partner.id, launch.gameId);
|
|
93274
|
+
const outcome = renewalRefusal(launch, () => canPartnerLaunch({ ...partner, games: grants }, launch.parentOrigin, launch.gameId));
|
|
93275
|
+
setAttributes({ "app.embed.outcome": outcome ?? "renewed" });
|
|
93276
|
+
if (outcome) {
|
|
93277
|
+
throw new AccessDeniedError("This launch has ended");
|
|
93278
|
+
}
|
|
93279
|
+
return this.deps.mintGameToken(launch.gameId, launch.userId);
|
|
93280
|
+
}
|
|
93281
|
+
grantsFor(partnerId, gameId) {
|
|
93282
|
+
return this.deps.db.query.embedPartnerGames.findMany({
|
|
93283
|
+
where: and(eq(embedPartnerGames.partnerId, partnerId), eq(embedPartnerGames.gameId, gameId)),
|
|
93284
|
+
columns: { gameId: true }
|
|
93285
|
+
});
|
|
93286
|
+
}
|
|
93287
|
+
async endLaunch(launchId) {
|
|
93288
|
+
await this.deps.db.update(embedLaunches).set({ endedAt: sql`coalesce(${embedLaunches.endedAt}, now())`, passHash: null }).where(eq(embedLaunches.id, launchId));
|
|
93289
|
+
}
|
|
93290
|
+
async consumePass(input) {
|
|
93291
|
+
const now = new Date;
|
|
93292
|
+
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();
|
|
93293
|
+
if (!launch) {
|
|
93294
|
+
setAttributes({ "app.embed.outcome": "pass_rejected" });
|
|
93295
|
+
throw new UnauthorizedError("This launch pass is not valid");
|
|
93296
|
+
}
|
|
93297
|
+
setAttributes({
|
|
93298
|
+
"app.launch.id": launch.id,
|
|
93299
|
+
"app.game.id": launch.gameId,
|
|
93300
|
+
"app.embed.partner_id": launch.partnerId,
|
|
93301
|
+
"app.user.id": launch.userId
|
|
93302
|
+
});
|
|
93303
|
+
const [partner, grants] = await Promise.all([
|
|
93304
|
+
this.deps.db.query.embedPartners.findFirst({
|
|
93305
|
+
where: eq(embedPartners.id, launch.partnerId),
|
|
93306
|
+
columns: { enabled: true, allowedOrigins: true }
|
|
93307
|
+
}),
|
|
93308
|
+
this.grantsFor(launch.partnerId, launch.gameId)
|
|
93309
|
+
]);
|
|
93310
|
+
const originMatches = launch.parentOrigin === input.parentOrigin;
|
|
93311
|
+
const stillAllowed = partner !== undefined && canPartnerLaunch({ ...partner, games: grants }, launch.parentOrigin, launch.gameId);
|
|
93312
|
+
if (!originMatches || !stillAllowed) {
|
|
93313
|
+
await this.endLaunch(launch.id);
|
|
93314
|
+
setAttributes({
|
|
93315
|
+
"app.embed.outcome": originMatches ? "partner_disallowed" : "origin_mismatch"
|
|
93316
|
+
});
|
|
93317
|
+
throw new UnauthorizedError("This launch pass is not valid");
|
|
93318
|
+
}
|
|
93319
|
+
return launch;
|
|
93320
|
+
}
|
|
93321
|
+
}
|
|
93322
|
+
function renewalRefusal(launch, isAllowed) {
|
|
93323
|
+
if (!launch.redeemedAt) {
|
|
93324
|
+
return "not_started";
|
|
93325
|
+
}
|
|
93326
|
+
if (launch.endedAt) {
|
|
93327
|
+
return "ended";
|
|
93328
|
+
}
|
|
93329
|
+
if (launch.expiresAt <= new Date) {
|
|
93330
|
+
return "expired";
|
|
93331
|
+
}
|
|
93332
|
+
return isAllowed() ? undefined : "partner_disallowed";
|
|
93333
|
+
}
|
|
93334
|
+
var PASS_LENGTH = 43;
|
|
93335
|
+
var init_embed_service = __esm(() => {
|
|
93336
|
+
init_drizzle_orm();
|
|
93337
|
+
init_src();
|
|
93338
|
+
init_tables_index();
|
|
93339
|
+
init_spans();
|
|
93340
|
+
init_errors2();
|
|
93341
|
+
init_embed_util();
|
|
93342
|
+
});
|
|
93343
|
+
|
|
92870
93344
|
// ../api-core/src/services/lti.service.ts
|
|
92871
93345
|
class LtiService {
|
|
92872
93346
|
deps;
|
|
@@ -92932,7 +93406,7 @@ class SessionService {
|
|
|
92932
93406
|
}
|
|
92933
93407
|
async resolveGame(gameIdOrSlug) {
|
|
92934
93408
|
const db = this.deps.db;
|
|
92935
|
-
const isUuid =
|
|
93409
|
+
const isUuid = isValidUUID(gameIdOrSlug);
|
|
92936
93410
|
const game = isUuid ? await db.query.games.findFirst({
|
|
92937
93411
|
where: eq(games.id, gameIdOrSlug),
|
|
92938
93412
|
columns: { id: true, slug: true }
|
|
@@ -92955,6 +93429,7 @@ var init_session_service = __esm(() => {
|
|
|
92955
93429
|
init_drizzle_orm();
|
|
92956
93430
|
init_tables_index();
|
|
92957
93431
|
init_spans();
|
|
93432
|
+
init_src9();
|
|
92958
93433
|
init_errors2();
|
|
92959
93434
|
});
|
|
92960
93435
|
|
|
@@ -93230,21 +93705,41 @@ var init_verify_service = __esm(() => {
|
|
|
93230
93705
|
|
|
93231
93706
|
// ../api-core/src/services/factory/standalone.ts
|
|
93232
93707
|
function createStandaloneServices(deps) {
|
|
93233
|
-
const { db, auth, timeback } = deps;
|
|
93708
|
+
const { db, auth, timeback, getGameForStudent, getTimebackData } = deps;
|
|
93234
93709
|
const lti = new LtiService({ db });
|
|
93235
93710
|
const session = new SessionService({ db, mintGameToken: auth.mintGameToken.bind(auth) });
|
|
93711
|
+
const account = new AccountService({ db, timeback });
|
|
93236
93712
|
const user = new UserService({ db, timeback });
|
|
93713
|
+
const embed = new EmbedService({
|
|
93714
|
+
db,
|
|
93715
|
+
mintGameToken: auth.mintGameToken.bind(auth),
|
|
93716
|
+
resolveTimebackStudent: (timebackId) => account.resolveTimebackStudent(timebackId),
|
|
93717
|
+
getGameForStudent,
|
|
93718
|
+
getGameProfile: async (student, gameId, timeZone) => {
|
|
93719
|
+
const [profile, timebackData] = await Promise.all([
|
|
93720
|
+
user.getMe(student, gameId, timeZone),
|
|
93721
|
+
student.timebackId ? getTimebackData(student.id, gameId).catch(() => {
|
|
93722
|
+
setAttributes({ "app.embed.timeback_context": "unavailable" });
|
|
93723
|
+
return;
|
|
93724
|
+
}) : undefined
|
|
93725
|
+
]);
|
|
93726
|
+
return { ...profile, timeback: timebackData };
|
|
93727
|
+
}
|
|
93728
|
+
});
|
|
93237
93729
|
const verify = new VerifyService({
|
|
93238
93730
|
db,
|
|
93239
93731
|
validateGameToken: auth.validateGameToken.bind(auth)
|
|
93240
93732
|
});
|
|
93241
|
-
return { lti, session, user, verify };
|
|
93733
|
+
return { account, embed, lti, session, user, verify };
|
|
93242
93734
|
}
|
|
93243
|
-
var init_standalone = __esm(() => {
|
|
93735
|
+
var init_standalone = __esm(async () => {
|
|
93736
|
+
init_spans();
|
|
93737
|
+
init_embed_service();
|
|
93244
93738
|
init_lti_service();
|
|
93245
93739
|
init_session_service();
|
|
93246
93740
|
init_user_service();
|
|
93247
93741
|
init_verify_service();
|
|
93742
|
+
await init_account_service();
|
|
93248
93743
|
});
|
|
93249
93744
|
|
|
93250
93745
|
// ../api-core/src/services/factory/index.ts
|
|
@@ -93287,7 +93782,13 @@ function createServices(ctx) {
|
|
|
93287
93782
|
verifyAssessmentToken: auth.verifyAssessmentToken.bind(auth),
|
|
93288
93783
|
...gaming.validators
|
|
93289
93784
|
});
|
|
93290
|
-
const standalone = createStandaloneServices({
|
|
93785
|
+
const standalone = createStandaloneServices({
|
|
93786
|
+
db,
|
|
93787
|
+
auth,
|
|
93788
|
+
timeback,
|
|
93789
|
+
getGameForStudent: (gameId, student) => gaming.services.game.getById(gameId, student),
|
|
93790
|
+
getTimebackData: (userId, gameId) => platform.timeback.getUserData(userId, gameId)
|
|
93791
|
+
});
|
|
93291
93792
|
return {
|
|
93292
93793
|
...infra,
|
|
93293
93794
|
...player,
|
|
@@ -93300,8 +93801,10 @@ var init_factory = __esm(async () => {
|
|
|
93300
93801
|
init_game3();
|
|
93301
93802
|
init_infra2();
|
|
93302
93803
|
init_player();
|
|
93303
|
-
|
|
93304
|
-
|
|
93804
|
+
await __promiseAll([
|
|
93805
|
+
init_platform2(),
|
|
93806
|
+
init_standalone()
|
|
93807
|
+
]);
|
|
93305
93808
|
});
|
|
93306
93809
|
|
|
93307
93810
|
// ../api-core/src/types/context.type.ts
|
|
@@ -93435,6 +93938,17 @@ function defineControllerNames(namespace, handlers) {
|
|
|
93435
93938
|
return handlers;
|
|
93436
93939
|
}
|
|
93437
93940
|
|
|
93941
|
+
// ../api-core/src/utils/game-token.util.ts
|
|
93942
|
+
async function withTunnelUrl(ctx, token) {
|
|
93943
|
+
const baseUrl = ctx.config.isLocal ? await getTunnelUrl(ctx.config.baseUrl).catch(() => {
|
|
93944
|
+
return;
|
|
93945
|
+
}) : undefined;
|
|
93946
|
+
return { ...token, baseUrl };
|
|
93947
|
+
}
|
|
93948
|
+
var init_game_token_util = __esm(() => {
|
|
93949
|
+
init_tunnel();
|
|
93950
|
+
});
|
|
93951
|
+
|
|
93438
93952
|
// ../api-core/src/utils/assessment-artifact-backfill.util.ts
|
|
93439
93953
|
var init_assessment_artifact_backfill_util = __esm(() => {
|
|
93440
93954
|
init_tables_index();
|
|
@@ -93444,37 +93958,8 @@ var init_assessment_artifact_backfill_util = __esm(() => {
|
|
|
93444
93958
|
init_timeback_review_mapping_util();
|
|
93445
93959
|
});
|
|
93446
93960
|
|
|
93447
|
-
// ../api-core/src/utils/lti.util.ts
|
|
93448
|
-
function generateUsername(email) {
|
|
93449
|
-
const baseUsername = (email.split("@")[0] || "user").toLowerCase();
|
|
93450
|
-
const cleanUsername = baseUsername.replace(/[^a-z0-9]/g, "");
|
|
93451
|
-
const randomSuffix = Math.random().toString(36).substring(2, 7);
|
|
93452
|
-
return `${cleanUsername}_${randomSuffix}`;
|
|
93453
|
-
}
|
|
93454
|
-
function extractRedirectPath(targetUri, currentHost) {
|
|
93455
|
-
try {
|
|
93456
|
-
const targetUrl = new URL(targetUri);
|
|
93457
|
-
if (targetUrl.hostname === currentHost) {
|
|
93458
|
-
return targetUrl.pathname + targetUrl.search;
|
|
93459
|
-
}
|
|
93460
|
-
} catch {}
|
|
93461
|
-
return "/";
|
|
93462
|
-
}
|
|
93463
|
-
function validateLtiClaims(claims) {
|
|
93464
|
-
const messageType = claims["https://purl.imsglobal.org/spec/lti/claim/message_type"];
|
|
93465
|
-
const version = claims["https://purl.imsglobal.org/spec/lti/claim/version"];
|
|
93466
|
-
if (messageType !== "LtiResourceLinkRequest") {
|
|
93467
|
-
return `Invalid LTI message type: ${messageType}`;
|
|
93468
|
-
}
|
|
93469
|
-
if (version !== "1.3.0") {
|
|
93470
|
-
return `Unsupported LTI version: ${version}`;
|
|
93471
|
-
}
|
|
93472
|
-
return null;
|
|
93473
|
-
}
|
|
93474
|
-
var init_lti_util = () => {};
|
|
93475
|
-
|
|
93476
93961
|
// ../api-core/src/utils/lti-provisioning.ts
|
|
93477
|
-
import * as
|
|
93962
|
+
import * as crypto5 from "node:crypto";
|
|
93478
93963
|
async function provisionLtiUser(db, claims) {
|
|
93479
93964
|
const database = db;
|
|
93480
93965
|
const email = claims.email;
|
|
@@ -93505,7 +93990,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
93505
93990
|
});
|
|
93506
93991
|
if (!existingLtiAccount) {
|
|
93507
93992
|
const [account] = await tx.insert(accounts).values({
|
|
93508
|
-
id:
|
|
93993
|
+
id: crypto5.randomUUID(),
|
|
93509
93994
|
userId: existingUser.id,
|
|
93510
93995
|
accountId: ltiTimebackId,
|
|
93511
93996
|
providerId,
|
|
@@ -93524,7 +94009,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
93524
94009
|
setAttribute("app.lti.provision", "linked_account");
|
|
93525
94010
|
return existingUser;
|
|
93526
94011
|
}
|
|
93527
|
-
const newUserId =
|
|
94012
|
+
const newUserId = crypto5.randomUUID();
|
|
93528
94013
|
const createdUser = await database.transaction(async (tx) => {
|
|
93529
94014
|
const [insertedUser] = await tx.insert(users).values({
|
|
93530
94015
|
id: newUserId,
|
|
@@ -93539,7 +94024,7 @@ async function provisionLtiUser(db, claims) {
|
|
|
93539
94024
|
throw new InternalError("Failed to create user");
|
|
93540
94025
|
}
|
|
93541
94026
|
await tx.insert(accounts).values({
|
|
93542
|
-
id:
|
|
94027
|
+
id: crypto5.randomUUID(),
|
|
93543
94028
|
userId: newUserId,
|
|
93544
94029
|
accountId: ltiTimebackId,
|
|
93545
94030
|
providerId,
|
|
@@ -93649,6 +94134,7 @@ var init_validation_util = __esm(() => {
|
|
|
93649
94134
|
// ../api-core/src/utils/index.ts
|
|
93650
94135
|
var init_utils7 = __esm(() => {
|
|
93651
94136
|
init_auth_util();
|
|
94137
|
+
init_game_token_util();
|
|
93652
94138
|
init_assessment_runtime_lock_util();
|
|
93653
94139
|
init_assessment_artifact_envelope_util();
|
|
93654
94140
|
init_assessment_artifact_backfill_util();
|
|
@@ -93922,6 +94408,9 @@ function createSandboxAuthProvider() {
|
|
|
93922
94408
|
return null;
|
|
93923
94409
|
}
|
|
93924
94410
|
},
|
|
94411
|
+
async verifyEmbedPartnerToken() {
|
|
94412
|
+
return null;
|
|
94413
|
+
},
|
|
93925
94414
|
async mintPlatformServiceToken(gameId, studentId) {
|
|
93926
94415
|
return mintSandboxServiceToken("playcademy-game-metrics", { gameId, studentId });
|
|
93927
94416
|
},
|
|
@@ -108317,7 +108806,7 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
|
|
|
108317
108806
|
import process22 from "process";
|
|
108318
108807
|
import os2 from "os";
|
|
108319
108808
|
import tty from "tty";
|
|
108320
|
-
import { randomUUID as
|
|
108809
|
+
import { randomUUID as randomUUID3 } from "crypto";
|
|
108321
108810
|
function assembleStyles() {
|
|
108322
108811
|
const codes = /* @__PURE__ */ new Map;
|
|
108323
108812
|
for (const [groupName, group] of Object.entries(styles2)) {
|
|
@@ -110984,7 +111473,7 @@ var __create2, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2,
|
|
|
110984
111473
|
__defProp2(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
|
|
110985
111474
|
}
|
|
110986
111475
|
return to;
|
|
110987
|
-
}, __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) => {
|
|
111476
|
+
}, __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) => {
|
|
110988
111477
|
let isLastCharLower = false;
|
|
110989
111478
|
let isLastCharUpper = false;
|
|
110990
111479
|
let isLastLastCharUpper = false;
|
|
@@ -111019,7 +111508,7 @@ var __create2, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2,
|
|
|
111019
111508
|
return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
|
|
111020
111509
|
}, generateDrizzleJson = (imports, prevId, schemaFilters, casing2) => {
|
|
111021
111510
|
const prepared = prepareFromExports(imports);
|
|
111022
|
-
const id =
|
|
111511
|
+
const id = randomUUID3();
|
|
111023
111512
|
const snapshot = generatePgSnapshot(prepared.tables, prepared.enums, prepared.schemas, prepared.sequences, prepared.roles, prepared.policies, prepared.views, prepared.matViews, casing2, schemaFilters);
|
|
111024
111513
|
return fillPgSnapshot({
|
|
111025
111514
|
serialized: snapshot,
|
|
@@ -117932,7 +118421,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
117932
118421
|
using: stringType2().optional(),
|
|
117933
118422
|
tablespace: stringType2().optional()
|
|
117934
118423
|
}).strict();
|
|
117935
|
-
|
|
118424
|
+
table9 = objectType2({
|
|
117936
118425
|
name: stringType2(),
|
|
117937
118426
|
schema: stringType2(),
|
|
117938
118427
|
columns: recordType2(stringType2(), column2),
|
|
@@ -117961,7 +118450,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
117961
118450
|
gelSchemaExternal = objectType2({
|
|
117962
118451
|
version: literalType2("1"),
|
|
117963
118452
|
dialect: literalType2("gel"),
|
|
117964
|
-
tables: arrayType2(
|
|
118453
|
+
tables: arrayType2(table9),
|
|
117965
118454
|
enums: arrayType2(enumSchemaV1),
|
|
117966
118455
|
schemas: arrayType2(objectType2({ name: stringType2() })),
|
|
117967
118456
|
_meta: objectType2({
|
|
@@ -117973,7 +118462,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
|
|
|
117973
118462
|
gelSchemaInternal = objectType2({
|
|
117974
118463
|
version: literalType2("1"),
|
|
117975
118464
|
dialect: literalType2("gel"),
|
|
117976
|
-
tables: recordType2(stringType2(),
|
|
118465
|
+
tables: recordType2(stringType2(), table9),
|
|
117977
118466
|
enums: recordType2(stringType2(), enumSchema),
|
|
117978
118467
|
schemas: recordType2(stringType2(), stringType2()),
|
|
117979
118468
|
views: recordType2(stringType2(), view2).default({}),
|
|
@@ -130968,7 +131457,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
130968
131457
|
ViewBaseConfig2 = Symbol.for("drizzle:ViewBaseConfig");
|
|
130969
131458
|
}
|
|
130970
131459
|
});
|
|
130971
|
-
|
|
131460
|
+
init_table9 = __esm2({
|
|
130972
131461
|
"../drizzle-orm/dist/table.js"() {
|
|
130973
131462
|
init_entity2();
|
|
130974
131463
|
init_table_utils2();
|
|
@@ -131018,7 +131507,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
131018
131507
|
init_tracing2();
|
|
131019
131508
|
init_view_common3();
|
|
131020
131509
|
init_column2();
|
|
131021
|
-
|
|
131510
|
+
init_table9();
|
|
131022
131511
|
_a21 = entityKind2;
|
|
131023
131512
|
FakePrimitiveParam = class {
|
|
131024
131513
|
};
|
|
@@ -131364,7 +131853,7 @@ globstar while`, file, fr, pattern, pr, swallowee);
|
|
|
131364
131853
|
init_column2();
|
|
131365
131854
|
init_entity2();
|
|
131366
131855
|
init_sql5();
|
|
131367
|
-
|
|
131856
|
+
init_table9();
|
|
131368
131857
|
init_view_common3();
|
|
131369
131858
|
_a28 = entityKind2;
|
|
131370
131859
|
ColumnAliasProxyHandler2 = class {
|
|
@@ -131539,7 +132028,7 @@ params: ${params}`);
|
|
|
131539
132028
|
init_entity2();
|
|
131540
132029
|
init_sql5();
|
|
131541
132030
|
init_subquery2();
|
|
131542
|
-
|
|
132031
|
+
init_table9();
|
|
131543
132032
|
init_view_common3();
|
|
131544
132033
|
textDecoder2 = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
131545
132034
|
}
|
|
@@ -132791,7 +133280,7 @@ params: ${params}`);
|
|
|
132791
133280
|
init_table22 = __esm2({
|
|
132792
133281
|
"../drizzle-orm/dist/pg-core/table.js"() {
|
|
132793
133282
|
init_entity2();
|
|
132794
|
-
|
|
133283
|
+
init_table9();
|
|
132795
133284
|
init_all2();
|
|
132796
133285
|
InlineForeignKeys2 = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
132797
133286
|
EnableRLS2 = Symbol.for("drizzle:EnableRLS");
|
|
@@ -132851,7 +133340,7 @@ params: ${params}`);
|
|
|
132851
133340
|
"../drizzle-orm/dist/sql/expressions/conditions.js"() {
|
|
132852
133341
|
init_column2();
|
|
132853
133342
|
init_entity2();
|
|
132854
|
-
|
|
133343
|
+
init_table9();
|
|
132855
133344
|
init_sql5();
|
|
132856
133345
|
eq2 = (left, right) => {
|
|
132857
133346
|
return sql4`${left} = ${bindIfParam2(right, left)}`;
|
|
@@ -132886,7 +133375,7 @@ params: ${params}`);
|
|
|
132886
133375
|
});
|
|
132887
133376
|
init_relations2 = __esm2({
|
|
132888
133377
|
"../drizzle-orm/dist/relations.js"() {
|
|
132889
|
-
|
|
133378
|
+
init_table9();
|
|
132890
133379
|
init_column2();
|
|
132891
133380
|
init_entity2();
|
|
132892
133381
|
init_primary_keys2();
|
|
@@ -133100,7 +133589,7 @@ params: ${params}`);
|
|
|
133100
133589
|
init_relations2();
|
|
133101
133590
|
init_sql22();
|
|
133102
133591
|
init_subquery2();
|
|
133103
|
-
|
|
133592
|
+
init_table9();
|
|
133104
133593
|
init_utils22();
|
|
133105
133594
|
init_view_common3();
|
|
133106
133595
|
}
|
|
@@ -133359,7 +133848,7 @@ params: ${params}`);
|
|
|
133359
133848
|
init_casing2 = __esm2({
|
|
133360
133849
|
"../drizzle-orm/dist/casing.js"() {
|
|
133361
133850
|
init_entity2();
|
|
133362
|
-
|
|
133851
|
+
init_table9();
|
|
133363
133852
|
_a135 = entityKind2;
|
|
133364
133853
|
CasingCache2 = class {
|
|
133365
133854
|
constructor(casing2) {
|
|
@@ -133421,7 +133910,7 @@ params: ${params}`);
|
|
|
133421
133910
|
init_sql22();
|
|
133422
133911
|
init_sql5();
|
|
133423
133912
|
init_subquery2();
|
|
133424
|
-
|
|
133913
|
+
init_table9();
|
|
133425
133914
|
init_utils22();
|
|
133426
133915
|
init_view_common3();
|
|
133427
133916
|
init_view_base2();
|
|
@@ -134005,7 +134494,7 @@ params: ${params}`);
|
|
|
134005
134494
|
init_selection_proxy2();
|
|
134006
134495
|
init_sql5();
|
|
134007
134496
|
init_subquery2();
|
|
134008
|
-
|
|
134497
|
+
init_table9();
|
|
134009
134498
|
init_tracing2();
|
|
134010
134499
|
init_utils22();
|
|
134011
134500
|
init_utils22();
|
|
@@ -134626,7 +135115,7 @@ params: ${params}`);
|
|
|
134626
135115
|
init_table22();
|
|
134627
135116
|
init_sql5();
|
|
134628
135117
|
init_subquery2();
|
|
134629
|
-
|
|
135118
|
+
init_table9();
|
|
134630
135119
|
init_view_common3();
|
|
134631
135120
|
init_checks6();
|
|
134632
135121
|
init_foreign_keys2();
|
|
@@ -134643,7 +135132,7 @@ params: ${params}`);
|
|
|
134643
135132
|
init_entity2();
|
|
134644
135133
|
init_query_promise2();
|
|
134645
135134
|
init_selection_proxy2();
|
|
134646
|
-
|
|
135135
|
+
init_table9();
|
|
134647
135136
|
init_tracing2();
|
|
134648
135137
|
init_utils22();
|
|
134649
135138
|
init_utils42();
|
|
@@ -134713,7 +135202,7 @@ params: ${params}`);
|
|
|
134713
135202
|
init_query_promise2();
|
|
134714
135203
|
init_selection_proxy2();
|
|
134715
135204
|
init_sql5();
|
|
134716
|
-
|
|
135205
|
+
init_table9();
|
|
134717
135206
|
init_tracing2();
|
|
134718
135207
|
init_utils22();
|
|
134719
135208
|
init_utils42();
|
|
@@ -134908,7 +135397,7 @@ params: ${params}`);
|
|
|
134908
135397
|
init_selection_proxy2();
|
|
134909
135398
|
init_sql5();
|
|
134910
135399
|
init_subquery2();
|
|
134911
|
-
|
|
135400
|
+
init_table9();
|
|
134912
135401
|
init_utils22();
|
|
134913
135402
|
init_view_common3();
|
|
134914
135403
|
init_utils42();
|
|
@@ -137710,7 +138199,7 @@ ORDER BY
|
|
|
137710
138199
|
init_table32 = __esm2({
|
|
137711
138200
|
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
|
137712
138201
|
init_entity2();
|
|
137713
|
-
|
|
138202
|
+
init_table9();
|
|
137714
138203
|
init_all22();
|
|
137715
138204
|
InlineForeignKeys22 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
|
137716
138205
|
SQLiteTable = class extends (_e32 = Table2, _d3 = entityKind2, _c7 = Table2.Symbol.Columns, _b151 = InlineForeignKeys22, _a207 = Table2.Symbol.ExtraConfigBuilder, _e32) {
|
|
@@ -137812,7 +138301,7 @@ ORDER BY
|
|
|
137812
138301
|
init_entity2();
|
|
137813
138302
|
init_sql5();
|
|
137814
138303
|
init_subquery2();
|
|
137815
|
-
|
|
138304
|
+
init_table9();
|
|
137816
138305
|
init_view_common3();
|
|
137817
138306
|
init_checks22();
|
|
137818
138307
|
init_foreign_keys22();
|
|
@@ -137828,7 +138317,7 @@ ORDER BY
|
|
|
137828
138317
|
init_query_promise2();
|
|
137829
138318
|
init_selection_proxy2();
|
|
137830
138319
|
init_table32();
|
|
137831
|
-
|
|
138320
|
+
init_table9();
|
|
137832
138321
|
init_utils22();
|
|
137833
138322
|
init_utils72();
|
|
137834
138323
|
SQLiteDeleteBase = class extends (_b152 = QueryPromise2, _a213 = entityKind2, _b152) {
|
|
@@ -137923,7 +138412,7 @@ ORDER BY
|
|
|
137923
138412
|
init_columns22();
|
|
137924
138413
|
init_table32();
|
|
137925
138414
|
init_subquery2();
|
|
137926
|
-
|
|
138415
|
+
init_table9();
|
|
137927
138416
|
init_utils22();
|
|
137928
138417
|
init_view_common3();
|
|
137929
138418
|
init_view_base22();
|
|
@@ -138501,7 +138990,7 @@ ORDER BY
|
|
|
138501
138990
|
init_selection_proxy2();
|
|
138502
138991
|
init_sql5();
|
|
138503
138992
|
init_subquery2();
|
|
138504
|
-
|
|
138993
|
+
init_table9();
|
|
138505
138994
|
init_utils22();
|
|
138506
138995
|
init_view_common3();
|
|
138507
138996
|
init_utils72();
|
|
@@ -138864,7 +139353,7 @@ ORDER BY
|
|
|
138864
139353
|
init_query_promise2();
|
|
138865
139354
|
init_sql5();
|
|
138866
139355
|
init_table32();
|
|
138867
|
-
|
|
139356
|
+
init_table9();
|
|
138868
139357
|
init_utils22();
|
|
138869
139358
|
init_utils72();
|
|
138870
139359
|
init_query_builder32();
|
|
@@ -138987,7 +139476,7 @@ ORDER BY
|
|
|
138987
139476
|
init_selection_proxy2();
|
|
138988
139477
|
init_table32();
|
|
138989
139478
|
init_subquery2();
|
|
138990
|
-
|
|
139479
|
+
init_table9();
|
|
138991
139480
|
init_utils22();
|
|
138992
139481
|
init_view_common3();
|
|
138993
139482
|
init_utils72();
|
|
@@ -141595,7 +142084,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
141595
142084
|
init_table42 = __esm2({
|
|
141596
142085
|
"../drizzle-orm/dist/mysql-core/table.js"() {
|
|
141597
142086
|
init_entity2();
|
|
141598
|
-
|
|
142087
|
+
init_table9();
|
|
141599
142088
|
init_all3();
|
|
141600
142089
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
|
141601
142090
|
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind2, _c10 = Table2.Symbol.Columns, _b238 = InlineForeignKeys3, _a319 = Table2.Symbol.ExtraConfigBuilder, _e4) {
|
|
@@ -141658,7 +142147,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
141658
142147
|
init_entity2();
|
|
141659
142148
|
init_dist9();
|
|
141660
142149
|
init_subquery2();
|
|
141661
|
-
|
|
142150
|
+
init_table9();
|
|
141662
142151
|
init_view_common3();
|
|
141663
142152
|
init_checks32();
|
|
141664
142153
|
init_foreign_keys3();
|
|
@@ -141674,7 +142163,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
141674
142163
|
init_entity2();
|
|
141675
142164
|
init_query_promise2();
|
|
141676
142165
|
init_selection_proxy2();
|
|
141677
|
-
|
|
142166
|
+
init_table9();
|
|
141678
142167
|
init_utils82();
|
|
141679
142168
|
MySqlDeleteBase = class extends (_b239 = QueryPromise2, _a3222 = entityKind2, _b239) {
|
|
141680
142169
|
constructor(table6, session, dialect6, withList) {
|
|
@@ -141754,7 +142243,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
141754
142243
|
init_expressions2();
|
|
141755
142244
|
init_sql5();
|
|
141756
142245
|
init_subquery2();
|
|
141757
|
-
|
|
142246
|
+
init_table9();
|
|
141758
142247
|
init_utils22();
|
|
141759
142248
|
init_view_common3();
|
|
141760
142249
|
init_common4();
|
|
@@ -142520,7 +143009,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
142520
143009
|
init_selection_proxy2();
|
|
142521
143010
|
init_sql5();
|
|
142522
143011
|
init_subquery2();
|
|
142523
|
-
|
|
143012
|
+
init_table9();
|
|
142524
143013
|
init_utils22();
|
|
142525
143014
|
init_view_common3();
|
|
142526
143015
|
init_utils82();
|
|
@@ -142920,7 +143409,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
142920
143409
|
init_entity2();
|
|
142921
143410
|
init_query_promise2();
|
|
142922
143411
|
init_sql5();
|
|
142923
|
-
|
|
143412
|
+
init_table9();
|
|
142924
143413
|
init_utils22();
|
|
142925
143414
|
init_utils82();
|
|
142926
143415
|
init_query_builder4();
|
|
@@ -143024,7 +143513,7 @@ ${withStyle.errorWarning(`We've found duplicated view name across ${source_defau
|
|
|
143024
143513
|
init_entity2();
|
|
143025
143514
|
init_query_promise2();
|
|
143026
143515
|
init_selection_proxy2();
|
|
143027
|
-
|
|
143516
|
+
init_table9();
|
|
143028
143517
|
init_utils22();
|
|
143029
143518
|
init_utils82();
|
|
143030
143519
|
_a331 = entityKind2;
|
|
@@ -145832,7 +146321,7 @@ AND
|
|
|
145832
146321
|
init_table52 = __esm2({
|
|
145833
146322
|
"../drizzle-orm/dist/singlestore-core/table.js"() {
|
|
145834
146323
|
init_entity2();
|
|
145835
|
-
|
|
146324
|
+
init_table9();
|
|
145836
146325
|
init_all4();
|
|
145837
146326
|
SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind2, _b319 = Table2.Symbol.Columns, _a419 = Table2.Symbol.ExtraConfigBuilder, _d5) {
|
|
145838
146327
|
constructor() {
|
|
@@ -145883,7 +146372,7 @@ AND
|
|
|
145883
146372
|
init_entity2();
|
|
145884
146373
|
init_sql5();
|
|
145885
146374
|
init_subquery2();
|
|
145886
|
-
|
|
146375
|
+
init_table9();
|
|
145887
146376
|
init_indexes4();
|
|
145888
146377
|
init_primary_keys4();
|
|
145889
146378
|
init_table52();
|
|
@@ -145895,7 +146384,7 @@ AND
|
|
|
145895
146384
|
init_entity2();
|
|
145896
146385
|
init_query_promise2();
|
|
145897
146386
|
init_selection_proxy2();
|
|
145898
|
-
|
|
146387
|
+
init_table9();
|
|
145899
146388
|
init_utils10();
|
|
145900
146389
|
SingleStoreDeleteBase = class extends (_b320 = QueryPromise2, _a422 = entityKind2, _b320) {
|
|
145901
146390
|
constructor(table6, session, dialect6, withList) {
|
|
@@ -145960,7 +146449,7 @@ AND
|
|
|
145960
146449
|
init_entity2();
|
|
145961
146450
|
init_query_promise2();
|
|
145962
146451
|
init_sql5();
|
|
145963
|
-
|
|
146452
|
+
init_table9();
|
|
145964
146453
|
init_utils22();
|
|
145965
146454
|
init_utils10();
|
|
145966
146455
|
_a423 = entityKind2;
|
|
@@ -146058,7 +146547,7 @@ AND
|
|
|
146058
146547
|
init_expressions2();
|
|
146059
146548
|
init_sql5();
|
|
146060
146549
|
init_subquery2();
|
|
146061
|
-
|
|
146550
|
+
init_table9();
|
|
146062
146551
|
init_utils22();
|
|
146063
146552
|
init_view_common3();
|
|
146064
146553
|
init_common5();
|
|
@@ -146589,7 +147078,7 @@ AND
|
|
|
146589
147078
|
init_selection_proxy2();
|
|
146590
147079
|
init_sql5();
|
|
146591
147080
|
init_subquery2();
|
|
146592
|
-
|
|
147081
|
+
init_table9();
|
|
146593
147082
|
init_utils22();
|
|
146594
147083
|
init_utils10();
|
|
146595
147084
|
_a426 = entityKind2;
|
|
@@ -146958,7 +147447,7 @@ AND
|
|
|
146958
147447
|
init_entity2();
|
|
146959
147448
|
init_query_promise2();
|
|
146960
147449
|
init_selection_proxy2();
|
|
146961
|
-
|
|
147450
|
+
init_table9();
|
|
146962
147451
|
init_utils22();
|
|
146963
147452
|
init_utils10();
|
|
146964
147453
|
_a430 = entityKind2;
|
|
@@ -149568,6 +150057,69 @@ var init_domain_controller = __esm(() => {
|
|
|
149568
150057
|
});
|
|
149569
150058
|
});
|
|
149570
150059
|
|
|
150060
|
+
// ../api-core/src/controllers/embed.controller.ts
|
|
150061
|
+
function requireUuidParam(value, name2) {
|
|
150062
|
+
if (!value) {
|
|
150063
|
+
throw ApiError.badRequest(`Missing ${name2}`);
|
|
150064
|
+
}
|
|
150065
|
+
if (!isValidUUID(value)) {
|
|
150066
|
+
throw ApiError.unprocessableEntity(`${name2} must be a valid UUID format`);
|
|
150067
|
+
}
|
|
150068
|
+
return value;
|
|
150069
|
+
}
|
|
150070
|
+
async function requirePartner(ctx) {
|
|
150071
|
+
const header = ctx.request.headers.get("Authorization");
|
|
150072
|
+
const token = header?.startsWith("Bearer ") ? header.slice("Bearer ".length) : "";
|
|
150073
|
+
const verified = token ? await ctx.providers.auth.verifyEmbedPartnerToken(token) : null;
|
|
150074
|
+
if (!verified) {
|
|
150075
|
+
throw ApiError.unauthorized("A valid embed partner access token is required");
|
|
150076
|
+
}
|
|
150077
|
+
return ctx.services.embed.getPartnerByClientId(verified.clientId);
|
|
150078
|
+
}
|
|
150079
|
+
async function createLaunch(ctx) {
|
|
150080
|
+
const partner = await requirePartner(ctx);
|
|
150081
|
+
const body2 = await parseRequestBody(ctx.request, CreateEmbedLaunchSchema);
|
|
150082
|
+
const launch = await ctx.services.embed.createLaunch(partner, body2);
|
|
150083
|
+
return {
|
|
150084
|
+
launchId: launch.launchId,
|
|
150085
|
+
pass: launch.pass,
|
|
150086
|
+
passExpiresAt: launch.passExpiresAt.toISOString(),
|
|
150087
|
+
embedUrl: embedPageUrl(ctx.url.origin, launch.gameSlug, body2.parentOrigin)
|
|
150088
|
+
};
|
|
150089
|
+
}
|
|
150090
|
+
async function renewToken(ctx) {
|
|
150091
|
+
const partner = await requirePartner(ctx);
|
|
150092
|
+
const launchId = requireUuidParam(ctx.params.launchId, "launchId");
|
|
150093
|
+
return withTunnelUrl(ctx, await ctx.services.embed.renewToken(partner, launchId));
|
|
150094
|
+
}
|
|
150095
|
+
async function redeemPass(ctx) {
|
|
150096
|
+
const body2 = await parseRequestBody(ctx.request, RedeemEmbedPassSchema);
|
|
150097
|
+
const launch = await ctx.services.embed.redeemLaunch(body2, ctx.request.headers.get(PLAYCADEMY_BROWSER_TIME_ZONE_HEADER));
|
|
150098
|
+
return {
|
|
150099
|
+
launchId: launch.launchId,
|
|
150100
|
+
token: await withTunnelUrl(ctx, launch.token),
|
|
150101
|
+
userId: launch.user.id,
|
|
150102
|
+
game: launch.game,
|
|
150103
|
+
timebackCourseId: launch.timebackCourseId,
|
|
150104
|
+
localDay: launch.profile.localDay,
|
|
150105
|
+
timeback: launch.profile.timeback
|
|
150106
|
+
};
|
|
150107
|
+
}
|
|
150108
|
+
var embed2;
|
|
150109
|
+
var init_embed_controller = __esm(() => {
|
|
150110
|
+
init_src();
|
|
150111
|
+
init_schemas_index();
|
|
150112
|
+
init_src9();
|
|
150113
|
+
init_errors2();
|
|
150114
|
+
init_utils7();
|
|
150115
|
+
init_embed_util();
|
|
150116
|
+
embed2 = defineControllerNames("embed", {
|
|
150117
|
+
createLaunch,
|
|
150118
|
+
redeemPass,
|
|
150119
|
+
renewToken
|
|
150120
|
+
});
|
|
150121
|
+
});
|
|
150122
|
+
|
|
149571
150123
|
// ../api-core/src/controllers/game-member.controller.ts
|
|
149572
150124
|
function requireUserId2(userId) {
|
|
149573
150125
|
if (!userId) {
|
|
@@ -150097,7 +150649,6 @@ var MintTokenBody, mintToken, sessions2;
|
|
|
150097
150649
|
var init_session_controller = __esm(() => {
|
|
150098
150650
|
init_esm();
|
|
150099
150651
|
init_spans();
|
|
150100
|
-
init_tunnel();
|
|
150101
150652
|
init_errors2();
|
|
150102
150653
|
init_utils7();
|
|
150103
150654
|
MintTokenBody = objectType({
|
|
@@ -150113,14 +150664,7 @@ var init_session_controller = __esm(() => {
|
|
|
150113
150664
|
reason = MintTokenBody.parse(await ctx.request.clone().json()).reason;
|
|
150114
150665
|
} catch {}
|
|
150115
150666
|
setAttribute("app.token.reason", reason ?? "initial");
|
|
150116
|
-
|
|
150117
|
-
let baseUrl;
|
|
150118
|
-
if (ctx.config.isLocal) {
|
|
150119
|
-
try {
|
|
150120
|
-
baseUrl = await getTunnelUrl(ctx.config.baseUrl);
|
|
150121
|
-
} catch {}
|
|
150122
|
-
}
|
|
150123
|
-
return { token, exp, baseUrl };
|
|
150667
|
+
return withTunnelUrl(ctx, await ctx.services.session.mintToken(gameIdOrSlug, ctx.user.id));
|
|
150124
150668
|
});
|
|
150125
150669
|
sessions2 = defineControllerNames("sessions", {
|
|
150126
150670
|
mintToken
|
|
@@ -151184,6 +151728,7 @@ var init_controllers = __esm(() => {
|
|
|
151184
151728
|
init_deployment_state_controller();
|
|
151185
151729
|
init_developer_controller();
|
|
151186
151730
|
init_domain_controller();
|
|
151731
|
+
init_embed_controller();
|
|
151187
151732
|
init_game_member_controller();
|
|
151188
151733
|
init_game_controller();
|
|
151189
151734
|
init_kv_controller();
|
|
@@ -151428,7 +151973,7 @@ var init_crud = __esm(async () => {
|
|
|
151428
151973
|
});
|
|
151429
151974
|
|
|
151430
151975
|
// src/routes/platform/games/uploads.ts
|
|
151431
|
-
import { randomUUID as
|
|
151976
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
151432
151977
|
async function initiateHandler(c) {
|
|
151433
151978
|
const user = c.get("user");
|
|
151434
151979
|
if (!user) {
|
|
@@ -151448,7 +151993,7 @@ async function initiateHandler(c) {
|
|
|
151448
151993
|
}
|
|
151449
151994
|
}, 422);
|
|
151450
151995
|
}
|
|
151451
|
-
const uploadToken = `sandbox-upload-${
|
|
151996
|
+
const uploadToken = `sandbox-upload-${randomUUID4()}`;
|
|
151452
151997
|
const version = `v${Date.now()}`;
|
|
151453
151998
|
pendingUploads.set(uploadToken, {
|
|
151454
151999
|
gameId: body2.gameId,
|