tempest.games 0.1.46 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/app/assets/index-C6lk2a-1.css +1 -0
- package/app/assets/index-DhXAmgc-.js +109 -0
- package/app/index.html +2 -2
- package/bin/backend.bun.js +339 -77
- package/bin/backend.worker.game.bun.js +2 -2
- package/bin/backend.worker.tribunal.bun.js +67 -67
- package/bin/frontend.bun.js +28 -28
- package/bin/setup-db.bun.js +72 -64
- package/drizzle/0011_slimy_onslaught.sql +17 -0
- package/drizzle/0012_brown_silvermane.sql +2 -0
- package/drizzle/0013_moaning_titanium_man.sql +1 -0
- package/drizzle/0014_ambiguous_blacklash.sql +2 -0
- package/drizzle/0015_careful_newton_destine.sql +7 -0
- package/drizzle/0016_whole_iceman.sql +4 -0
- package/drizzle/0017_sparkling_matthew_murdock.sql +9 -0
- package/drizzle/meta/0011_snapshot.json +479 -0
- package/drizzle/meta/0012_snapshot.json +486 -0
- package/drizzle/meta/0013_snapshot.json +486 -0
- package/drizzle/meta/0014_snapshot.json +487 -0
- package/drizzle/meta/0015_snapshot.json +487 -0
- package/drizzle/meta/0016_snapshot.json +487 -0
- package/drizzle/meta/0017_snapshot.json +487 -0
- package/drizzle/meta/_journal.json +49 -0
- package/package.json +19 -5
- package/app/assets/index-BAZ8dbVE.js +0 -106
- package/app/assets/index-k4NBGR4H.css +0 -1
package/bin/setup-db.bun.js
CHANGED
|
@@ -1947,7 +1947,7 @@ function osUsername() {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
|
|
1950
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
1950
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/entity.js
|
|
1951
1951
|
var entityKind = Symbol.for("drizzle:entityKind");
|
|
1952
1952
|
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
1953
1953
|
function is(value, type) {
|
|
@@ -1972,7 +1972,7 @@ function is(value, type) {
|
|
|
1972
1972
|
return false;
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
1975
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
1975
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/logger.js
|
|
1976
1976
|
class ConsoleLogWriter {
|
|
1977
1977
|
static [entityKind] = "ConsoleLogWriter";
|
|
1978
1978
|
write(message) {
|
|
@@ -2004,7 +2004,7 @@ class NoopLogger {
|
|
|
2004
2004
|
logQuery() {}
|
|
2005
2005
|
}
|
|
2006
2006
|
|
|
2007
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2007
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/query-promise.js
|
|
2008
2008
|
class QueryPromise {
|
|
2009
2009
|
static [entityKind] = "QueryPromise";
|
|
2010
2010
|
[Symbol.toStringTag] = "QueryPromise";
|
|
@@ -2025,7 +2025,7 @@ class QueryPromise {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
2027
|
|
|
2028
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2028
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/column.js
|
|
2029
2029
|
class Column {
|
|
2030
2030
|
constructor(table, config) {
|
|
2031
2031
|
this.table = table;
|
|
@@ -2075,20 +2075,20 @@ class Column {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
2077
|
|
|
2078
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2078
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/table.utils.js
|
|
2079
2079
|
var TableName = Symbol.for("drizzle:Name");
|
|
2080
2080
|
|
|
2081
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2081
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/tracing-utils.js
|
|
2082
2082
|
function iife(fn, ...args) {
|
|
2083
2083
|
return fn(...args);
|
|
2084
2084
|
}
|
|
2085
2085
|
|
|
2086
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2086
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/unique-constraint.js
|
|
2087
2087
|
function uniqueKeyName(table, columns) {
|
|
2088
2088
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
2089
2089
|
}
|
|
2090
2090
|
|
|
2091
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2091
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/common.js
|
|
2092
2092
|
class PgColumn extends Column {
|
|
2093
2093
|
constructor(table, config) {
|
|
2094
2094
|
if (!config.uniqueName) {
|
|
@@ -2137,7 +2137,7 @@ class ExtraConfigColumn extends PgColumn {
|
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
|
|
2140
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2140
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
2141
2141
|
class PgEnumObjectColumn extends PgColumn {
|
|
2142
2142
|
static [entityKind] = "PgEnumObjectColumn";
|
|
2143
2143
|
enum;
|
|
@@ -2167,7 +2167,7 @@ class PgEnumColumn extends PgColumn {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
}
|
|
2169
2169
|
|
|
2170
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2170
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/subquery.js
|
|
2171
2171
|
class Subquery {
|
|
2172
2172
|
static [entityKind] = "Subquery";
|
|
2173
2173
|
constructor(sql, selection, alias, isWith = false) {
|
|
@@ -2185,10 +2185,10 @@ class WithSubquery extends Subquery {
|
|
|
2185
2185
|
static [entityKind] = "WithSubquery";
|
|
2186
2186
|
}
|
|
2187
2187
|
|
|
2188
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2189
|
-
var version = "0.
|
|
2188
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/version.js
|
|
2189
|
+
var version = "0.43.1";
|
|
2190
2190
|
|
|
2191
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2191
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/tracing.js
|
|
2192
2192
|
var otel;
|
|
2193
2193
|
var rawTracer;
|
|
2194
2194
|
var tracer = {
|
|
@@ -2215,10 +2215,10 @@ var tracer = {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
};
|
|
2217
2217
|
|
|
2218
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2218
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/view-common.js
|
|
2219
2219
|
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
2220
2220
|
|
|
2221
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2221
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/table.js
|
|
2222
2222
|
var Schema = Symbol.for("drizzle:Schema");
|
|
2223
2223
|
var Columns = Symbol.for("drizzle:Columns");
|
|
2224
2224
|
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -2262,7 +2262,7 @@ function getTableUniqueName(table) {
|
|
|
2262
2262
|
return `${table[Schema] ?? "public"}.${table[TableName]}`;
|
|
2263
2263
|
}
|
|
2264
2264
|
|
|
2265
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2265
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/sql/sql.js
|
|
2266
2266
|
function isSQLWrapper(value) {
|
|
2267
2267
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
2268
2268
|
}
|
|
@@ -2635,7 +2635,7 @@ Subquery.prototype.getSQL = function() {
|
|
|
2635
2635
|
return new SQL([this]);
|
|
2636
2636
|
};
|
|
2637
2637
|
|
|
2638
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2638
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/alias.js
|
|
2639
2639
|
class ColumnAliasProxyHandler {
|
|
2640
2640
|
constructor(table) {
|
|
2641
2641
|
this.table = table;
|
|
@@ -2714,7 +2714,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
|
2714
2714
|
}));
|
|
2715
2715
|
}
|
|
2716
2716
|
|
|
2717
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2717
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/selection-proxy.js
|
|
2718
2718
|
class SelectionProxyHandler {
|
|
2719
2719
|
static [entityKind] = "SelectionProxyHandler";
|
|
2720
2720
|
config;
|
|
@@ -2766,7 +2766,7 @@ class SelectionProxyHandler {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
2768
|
|
|
2769
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2769
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/utils.js
|
|
2770
2770
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
2771
2771
|
const nullifyMap = {};
|
|
2772
2772
|
const result = columns.reduce((result2, { path, field }, columnIndex) => {
|
|
@@ -2911,7 +2911,7 @@ function isConfig(data) {
|
|
|
2911
2911
|
return false;
|
|
2912
2912
|
}
|
|
2913
2913
|
|
|
2914
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2914
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/delete.js
|
|
2915
2915
|
class PgDeleteBase extends QueryPromise {
|
|
2916
2916
|
constructor(table, session, dialect, withList) {
|
|
2917
2917
|
super();
|
|
@@ -2967,7 +2967,7 @@ class PgDeleteBase extends QueryPromise {
|
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
2969
|
|
|
2970
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
2970
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/casing.js
|
|
2971
2971
|
function toSnakeCase(input) {
|
|
2972
2972
|
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
|
|
2973
2973
|
return words.map((word) => word.toLowerCase()).join("_");
|
|
@@ -3020,7 +3020,7 @@ class CasingCache {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3023
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/errors.js
|
|
3024
3024
|
class DrizzleError extends Error {
|
|
3025
3025
|
static [entityKind] = "DrizzleError";
|
|
3026
3026
|
constructor({ message, cause }) {
|
|
@@ -3037,7 +3037,7 @@ class TransactionRollbackError extends DrizzleError {
|
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
3039
|
|
|
3040
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3040
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/date.js
|
|
3041
3041
|
class PgDate extends PgColumn {
|
|
3042
3042
|
static [entityKind] = "PgDate";
|
|
3043
3043
|
getSQLType() {
|
|
@@ -3057,7 +3057,7 @@ class PgDateString extends PgColumn {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
3059
|
|
|
3060
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3060
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/json.js
|
|
3061
3061
|
class PgJson extends PgColumn {
|
|
3062
3062
|
static [entityKind] = "PgJson";
|
|
3063
3063
|
constructor(table, config) {
|
|
@@ -3081,7 +3081,7 @@ class PgJson extends PgColumn {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
3083
|
|
|
3084
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3084
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/jsonb.js
|
|
3085
3085
|
class PgJsonb extends PgColumn {
|
|
3086
3086
|
static [entityKind] = "PgJsonb";
|
|
3087
3087
|
constructor(table, config) {
|
|
@@ -3105,7 +3105,7 @@ class PgJsonb extends PgColumn {
|
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
3107
|
|
|
3108
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3108
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/numeric.js
|
|
3109
3109
|
class PgNumeric extends PgColumn {
|
|
3110
3110
|
static [entityKind] = "PgNumeric";
|
|
3111
3111
|
precision;
|
|
@@ -3131,7 +3131,7 @@ class PgNumeric extends PgColumn {
|
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
3133
|
|
|
3134
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3134
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/time.js
|
|
3135
3135
|
class PgTime extends PgColumn {
|
|
3136
3136
|
static [entityKind] = "PgTime";
|
|
3137
3137
|
withTimezone;
|
|
@@ -3147,7 +3147,7 @@ class PgTime extends PgColumn {
|
|
|
3147
3147
|
}
|
|
3148
3148
|
}
|
|
3149
3149
|
|
|
3150
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3150
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/timestamp.js
|
|
3151
3151
|
class PgTimestamp extends PgColumn {
|
|
3152
3152
|
static [entityKind] = "PgTimestamp";
|
|
3153
3153
|
withTimezone;
|
|
@@ -3183,7 +3183,7 @@ class PgTimestampString extends PgColumn {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
3185
3185
|
|
|
3186
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3186
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/columns/uuid.js
|
|
3187
3187
|
class PgUUID extends PgColumn {
|
|
3188
3188
|
static [entityKind] = "PgUUID";
|
|
3189
3189
|
getSQLType() {
|
|
@@ -3191,7 +3191,7 @@ class PgUUID extends PgColumn {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
}
|
|
3193
3193
|
|
|
3194
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3194
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/table.js
|
|
3195
3195
|
var InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
3196
3196
|
var EnableRLS = Symbol.for("drizzle:EnableRLS");
|
|
3197
3197
|
|
|
@@ -3207,7 +3207,7 @@ class PgTable extends Table {
|
|
|
3207
3207
|
[Table.Symbol.ExtraConfigColumns] = {};
|
|
3208
3208
|
}
|
|
3209
3209
|
|
|
3210
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3210
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/primary-keys.js
|
|
3211
3211
|
class PrimaryKeyBuilder {
|
|
3212
3212
|
static [entityKind] = "PgPrimaryKeyBuilder";
|
|
3213
3213
|
columns;
|
|
@@ -3235,7 +3235,7 @@ class PrimaryKey {
|
|
|
3235
3235
|
}
|
|
3236
3236
|
}
|
|
3237
3237
|
|
|
3238
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3238
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
3239
3239
|
function bindIfParam(value, column) {
|
|
3240
3240
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
3241
3241
|
return new Param(value, column);
|
|
@@ -3340,7 +3340,7 @@ function notIlike(column, value) {
|
|
|
3340
3340
|
return sql`${column} not ilike ${value}`;
|
|
3341
3341
|
}
|
|
3342
3342
|
|
|
3343
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3343
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/sql/expressions/select.js
|
|
3344
3344
|
function asc(column) {
|
|
3345
3345
|
return sql`${column} asc`;
|
|
3346
3346
|
}
|
|
@@ -3348,7 +3348,7 @@ function desc(column) {
|
|
|
3348
3348
|
return sql`${column} desc`;
|
|
3349
3349
|
}
|
|
3350
3350
|
|
|
3351
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3351
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/relations.js
|
|
3352
3352
|
class Relation {
|
|
3353
3353
|
constructor(sourceTable, referencedTable, relationName) {
|
|
3354
3354
|
this.sourceTable = sourceTable;
|
|
@@ -3568,12 +3568,12 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
|
3568
3568
|
return result;
|
|
3569
3569
|
}
|
|
3570
3570
|
|
|
3571
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3571
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/view-base.js
|
|
3572
3572
|
class PgViewBase extends View {
|
|
3573
3573
|
static [entityKind] = "PgViewBase";
|
|
3574
3574
|
}
|
|
3575
3575
|
|
|
3576
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
3576
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/dialect.js
|
|
3577
3577
|
class PgDialect {
|
|
3578
3578
|
static [entityKind] = "PgDialect";
|
|
3579
3579
|
casing;
|
|
@@ -3707,20 +3707,21 @@ class PgDialect {
|
|
|
3707
3707
|
}
|
|
3708
3708
|
const table = joinMeta.table;
|
|
3709
3709
|
const lateralSql = joinMeta.lateral ? sql` lateral` : undefined;
|
|
3710
|
+
const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;
|
|
3710
3711
|
if (is(table, PgTable)) {
|
|
3711
3712
|
const tableName = table[PgTable.Symbol.Name];
|
|
3712
3713
|
const tableSchema = table[PgTable.Symbol.Schema];
|
|
3713
3714
|
const origTableName = table[PgTable.Symbol.OriginalName];
|
|
3714
3715
|
const alias = tableName === origTableName ? undefined : joinMeta.alias;
|
|
3715
|
-
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}
|
|
3716
|
+
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}`);
|
|
3716
3717
|
} else if (is(table, View)) {
|
|
3717
3718
|
const viewName = table[ViewBaseConfig].name;
|
|
3718
3719
|
const viewSchema = table[ViewBaseConfig].schema;
|
|
3719
3720
|
const origViewName = table[ViewBaseConfig].originalName;
|
|
3720
3721
|
const alias = viewName === origViewName ? undefined : joinMeta.alias;
|
|
3721
|
-
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${viewSchema ? sql`${sql.identifier(viewSchema)}.` : undefined}${sql.identifier(origViewName)}${alias && sql` ${sql.identifier(alias)}`}
|
|
3722
|
+
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${viewSchema ? sql`${sql.identifier(viewSchema)}.` : undefined}${sql.identifier(origViewName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}`);
|
|
3722
3723
|
} else {
|
|
3723
|
-
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${table}
|
|
3724
|
+
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${table}${onSql}`);
|
|
3724
3725
|
}
|
|
3725
3726
|
if (index < joins.length - 1) {
|
|
3726
3727
|
joinsArray.push(sql` `);
|
|
@@ -3789,7 +3790,7 @@ class PgDialect {
|
|
|
3789
3790
|
clauseSql.append(sql` of ${sql.join(Array.isArray(lockingClause.config.of) ? lockingClause.config.of : [lockingClause.config.of], sql`, `)}`);
|
|
3790
3791
|
}
|
|
3791
3792
|
if (lockingClause.config.noWait) {
|
|
3792
|
-
clauseSql.append(sql`
|
|
3793
|
+
clauseSql.append(sql` nowait`);
|
|
3793
3794
|
} else if (lockingClause.config.skipLocked) {
|
|
3794
3795
|
clauseSql.append(sql` skip locked`);
|
|
3795
3796
|
}
|
|
@@ -4130,7 +4131,7 @@ class PgDialect {
|
|
|
4130
4131
|
}
|
|
4131
4132
|
}
|
|
4132
4133
|
|
|
4133
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4134
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/query-builders/query-builder.js
|
|
4134
4135
|
class TypedQueryBuilder {
|
|
4135
4136
|
static [entityKind] = "TypedQueryBuilder";
|
|
4136
4137
|
getSelectedFields() {
|
|
@@ -4138,7 +4139,7 @@ class TypedQueryBuilder {
|
|
|
4138
4139
|
}
|
|
4139
4140
|
}
|
|
4140
4141
|
|
|
4141
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4142
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/select.js
|
|
4142
4143
|
class PgSelectBuilder {
|
|
4143
4144
|
static [entityKind] = "PgSelectBuilder";
|
|
4144
4145
|
fields;
|
|
@@ -4214,7 +4215,7 @@ class PgSelectQueryBuilderBase extends TypedQueryBuilder {
|
|
|
4214
4215
|
this.tableName = getTableLikeName(table);
|
|
4215
4216
|
this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
|
|
4216
4217
|
}
|
|
4217
|
-
createJoin(joinType) {
|
|
4218
|
+
createJoin(joinType, lateral) {
|
|
4218
4219
|
return (table, on) => {
|
|
4219
4220
|
const baseTableName = this.tableName;
|
|
4220
4221
|
const tableName = getTableLikeName(table);
|
|
@@ -4238,7 +4239,7 @@ class PgSelectQueryBuilderBase extends TypedQueryBuilder {
|
|
|
4238
4239
|
if (!this.config.joins) {
|
|
4239
4240
|
this.config.joins = [];
|
|
4240
4241
|
}
|
|
4241
|
-
this.config.joins.push({ on, table, joinType, alias: tableName });
|
|
4242
|
+
this.config.joins.push({ on, table, joinType, alias: tableName, lateral });
|
|
4242
4243
|
if (typeof tableName === "string") {
|
|
4243
4244
|
switch (joinType) {
|
|
4244
4245
|
case "left": {
|
|
@@ -4250,6 +4251,7 @@ class PgSelectQueryBuilderBase extends TypedQueryBuilder {
|
|
|
4250
4251
|
this.joinsNotNullableMap[tableName] = true;
|
|
4251
4252
|
break;
|
|
4252
4253
|
}
|
|
4254
|
+
case "cross":
|
|
4253
4255
|
case "inner": {
|
|
4254
4256
|
this.joinsNotNullableMap[tableName] = true;
|
|
4255
4257
|
break;
|
|
@@ -4264,10 +4266,14 @@ class PgSelectQueryBuilderBase extends TypedQueryBuilder {
|
|
|
4264
4266
|
return this;
|
|
4265
4267
|
};
|
|
4266
4268
|
}
|
|
4267
|
-
leftJoin = this.createJoin("left");
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4269
|
+
leftJoin = this.createJoin("left", false);
|
|
4270
|
+
leftJoinLateral = this.createJoin("left", true);
|
|
4271
|
+
rightJoin = this.createJoin("right", false);
|
|
4272
|
+
innerJoin = this.createJoin("inner", false);
|
|
4273
|
+
innerJoinLateral = this.createJoin("inner", true);
|
|
4274
|
+
fullJoin = this.createJoin("full", false);
|
|
4275
|
+
crossJoin = this.createJoin("cross", false);
|
|
4276
|
+
crossJoinLateral = this.createJoin("cross", true);
|
|
4271
4277
|
createSetOperator(type, isAll) {
|
|
4272
4278
|
return (rightSelection) => {
|
|
4273
4279
|
const rightSelect = typeof rightSelection === "function" ? rightSelection(getPgSetOperators()) : rightSelection;
|
|
@@ -4427,7 +4433,7 @@ var intersectAll = createSetOperator("intersect", true);
|
|
|
4427
4433
|
var except = createSetOperator("except", false);
|
|
4428
4434
|
var exceptAll = createSetOperator("except", true);
|
|
4429
4435
|
|
|
4430
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4436
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/query-builder.js
|
|
4431
4437
|
class QueryBuilder {
|
|
4432
4438
|
static [entityKind] = "PgQueryBuilder";
|
|
4433
4439
|
dialect;
|
|
@@ -4505,7 +4511,7 @@ class QueryBuilder {
|
|
|
4505
4511
|
}
|
|
4506
4512
|
}
|
|
4507
4513
|
|
|
4508
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4514
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/insert.js
|
|
4509
4515
|
class PgInsertBuilder {
|
|
4510
4516
|
constructor(table, session, dialect, withList, overridingSystemValue_) {
|
|
4511
4517
|
this.table = table;
|
|
@@ -4624,7 +4630,7 @@ class PgInsertBase extends QueryPromise {
|
|
|
4624
4630
|
}
|
|
4625
4631
|
}
|
|
4626
4632
|
|
|
4627
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4633
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/refresh-materialized-view.js
|
|
4628
4634
|
class PgRefreshMaterializedView extends QueryPromise {
|
|
4629
4635
|
constructor(view, session, dialect) {
|
|
4630
4636
|
super();
|
|
@@ -4675,7 +4681,7 @@ class PgRefreshMaterializedView extends QueryPromise {
|
|
|
4675
4681
|
};
|
|
4676
4682
|
}
|
|
4677
4683
|
|
|
4678
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4684
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/update.js
|
|
4679
4685
|
class PgUpdateBuilder {
|
|
4680
4686
|
constructor(table, session, dialect, withList) {
|
|
4681
4687
|
this.table = table;
|
|
@@ -4825,7 +4831,7 @@ class PgUpdateBase extends QueryPromise {
|
|
|
4825
4831
|
}
|
|
4826
4832
|
}
|
|
4827
4833
|
|
|
4828
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4834
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/count.js
|
|
4829
4835
|
class PgCountBuilder extends SQL {
|
|
4830
4836
|
constructor(params) {
|
|
4831
4837
|
super(PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
|
@@ -4866,7 +4872,7 @@ class PgCountBuilder extends SQL {
|
|
|
4866
4872
|
}
|
|
4867
4873
|
}
|
|
4868
4874
|
|
|
4869
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4875
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/query.js
|
|
4870
4876
|
class RelationalQueryBuilder {
|
|
4871
4877
|
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
|
|
4872
4878
|
this.fullSchema = fullSchema;
|
|
@@ -4949,7 +4955,7 @@ class PgRelationalQuery extends QueryPromise {
|
|
|
4949
4955
|
}
|
|
4950
4956
|
}
|
|
4951
4957
|
|
|
4952
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4958
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/query-builders/raw.js
|
|
4953
4959
|
class PgRaw extends QueryPromise {
|
|
4954
4960
|
constructor(execute, sql2, query, mapBatchResult) {
|
|
4955
4961
|
super();
|
|
@@ -4976,7 +4982,7 @@ class PgRaw extends QueryPromise {
|
|
|
4976
4982
|
}
|
|
4977
4983
|
}
|
|
4978
4984
|
|
|
4979
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
4985
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/db.js
|
|
4980
4986
|
class PgDatabase {
|
|
4981
4987
|
constructor(dialect, session, schema) {
|
|
4982
4988
|
this.dialect = dialect;
|
|
@@ -5100,7 +5106,7 @@ class PgDatabase {
|
|
|
5100
5106
|
}
|
|
5101
5107
|
}
|
|
5102
5108
|
|
|
5103
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
5109
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/pg-core/session.js
|
|
5104
5110
|
class PgPreparedQuery {
|
|
5105
5111
|
constructor(query) {
|
|
5106
5112
|
this.query = query;
|
|
@@ -5170,7 +5176,7 @@ class PgTransaction extends PgDatabase {
|
|
|
5170
5176
|
}
|
|
5171
5177
|
}
|
|
5172
5178
|
|
|
5173
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
5179
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/postgres-js/session.js
|
|
5174
5180
|
class PostgresJsPreparedQuery extends PgPreparedQuery {
|
|
5175
5181
|
constructor(client, queryString, params, logger, fields, _isResponseInArrayMode, customResultMapper) {
|
|
5176
5182
|
super({ sql: queryString, params });
|
|
@@ -5278,7 +5284,7 @@ class PostgresJsTransaction extends PgTransaction {
|
|
|
5278
5284
|
}
|
|
5279
5285
|
}
|
|
5280
5286
|
|
|
5281
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
5287
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/postgres-js/driver.js
|
|
5282
5288
|
class PostgresJsDatabase extends PgDatabase {
|
|
5283
5289
|
static [entityKind] = "PostgresJsDatabase";
|
|
5284
5290
|
}
|
|
@@ -5342,7 +5348,7 @@ function drizzle(...params) {
|
|
|
5342
5348
|
drizzle2.mock = mock;
|
|
5343
5349
|
})(drizzle || (drizzle = {}));
|
|
5344
5350
|
|
|
5345
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
5351
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/migrator.js
|
|
5346
5352
|
import crypto2 from "crypto";
|
|
5347
5353
|
import fs2 from "fs";
|
|
5348
5354
|
function readMigrationFiles(config) {
|
|
@@ -5374,13 +5380,13 @@ function readMigrationFiles(config) {
|
|
|
5374
5380
|
return migrationQueries;
|
|
5375
5381
|
}
|
|
5376
5382
|
|
|
5377
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.
|
|
5383
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.43.1_bun-types@1.2.10_postgres@3.4.5/node_modules/drizzle-orm/postgres-js/migrator.js
|
|
5378
5384
|
async function migrate(db, config) {
|
|
5379
5385
|
const migrations = readMigrationFiles(config);
|
|
5380
5386
|
await db.dialect.migrate(migrations, db.session, config);
|
|
5381
5387
|
}
|
|
5382
5388
|
|
|
5383
|
-
// ../../node_modules/.pnpm/@t3-oss+env-core@0.13.0_arktype@2.1.20_typescript@5.8.3_valibot@1.0.0_typescript@5.8.3__zod@3.24.
|
|
5389
|
+
// ../../node_modules/.pnpm/@t3-oss+env-core@0.13.0_arktype@2.1.20_typescript@5.8.3_valibot@1.0.0_typescript@5.8.3__zod@3.24.3/node_modules/@t3-oss/env-core/dist/index.js
|
|
5384
5390
|
function ensureSynchronous(value, message) {
|
|
5385
5391
|
if (value instanceof Promise) {
|
|
5386
5392
|
throw new Error(message);
|
|
@@ -13473,12 +13479,14 @@ var env2 = createEnv({
|
|
|
13473
13479
|
RUN_WORKERS_FROM_SOURCE: maybeBool.pipe((s) => s === `true`),
|
|
13474
13480
|
FRONTEND_PORT: str.pipe((s) => Number.parseInt(s, 10)),
|
|
13475
13481
|
FRONTEND_ORIGINS: str.pipe.try((s) => JSON.parse(s), type(`string[]`)),
|
|
13476
|
-
|
|
13482
|
+
API_KEY_OPENAI: type(`string | undefined`),
|
|
13483
|
+
API_KEY_RESEND: type(`string | undefined`)
|
|
13477
13484
|
},
|
|
13478
13485
|
clientPrefix: `VITE_`,
|
|
13479
13486
|
client: {
|
|
13480
13487
|
VITE_BACKEND_ORIGIN: str,
|
|
13481
|
-
|
|
13488
|
+
VITE_DEV_FRONTEND_HOST: type(`string | undefined`),
|
|
13489
|
+
VITE_DEV_HTTPS: maybeBool.pipe((s) => s === `true`)
|
|
13482
13490
|
},
|
|
13483
13491
|
runtimeEnv: import.meta.env,
|
|
13484
13492
|
emptyStringAsUndefined: true
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
CREATE TYPE "public"."accountAction" AS ENUM('emailConfirm', 'passwordReset', 'emailChange');--> statement-breakpoint
|
|
2
|
+
CREATE TABLE "userTokens" (
|
|
3
|
+
"userId" uuid PRIMARY KEY NOT NULL,
|
|
4
|
+
"action" "accountAction" NOT NULL,
|
|
5
|
+
"token" varchar(255) NOT NULL,
|
|
6
|
+
"expiresAt" timestamp with time zone NOT NULL
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
ALTER TABLE "userChanges" DISABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
10
|
+
DROP TABLE "userChanges" CASCADE;--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "users" RENAME COLUMN "email" TO "emailOffered";--> statement-breakpoint
|
|
12
|
+
DROP INDEX "emailUniqueIndex";--> statement-breakpoint
|
|
13
|
+
ALTER TABLE "users" ADD COLUMN "emailVerified" varchar(254);--> statement-breakpoint
|
|
14
|
+
ALTER TABLE "userTokens" ADD CONSTRAINT "userTokens_userId_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
15
|
+
CREATE UNIQUE INDEX "emailVerifiedUniqueIndex" ON "users" USING btree (lower("emailVerified"));--> statement-breakpoint
|
|
16
|
+
DROP TYPE "public"."trackedUserColumnName";--> statement-breakpoint
|
|
17
|
+
CREATE TYPE "public"."trackedUserColumnName" AS ENUM('username', 'emailOffered', 'emailVerified', 'password', 'userRole');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "userTokens" ALTER COLUMN "token" SET DATA TYPE varchar(9);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ALTER TABLE "userTokens" RENAME COLUMN "token" TO "code";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "userTokens" RENAME COLUMN "wrongTokenCount" TO "wrongCodeCount";--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "userTokens" ALTER COLUMN "action" SET DATA TYPE text;--> statement-breakpoint
|
|
4
|
+
DROP TYPE "public"."accountAction";--> statement-breakpoint
|
|
5
|
+
CREATE TYPE "public"."accountAction" AS ENUM('cooldown', 'confirmEmail', 'login', 'resetPassword');--> statement-breakpoint
|
|
6
|
+
ALTER TABLE "userTokens" ALTER COLUMN "action" SET DATA TYPE "public"."accountAction" USING "action"::"public"."accountAction";--> statement-breakpoint
|
|
7
|
+
ALTER TABLE "users" ALTER COLUMN "password" DROP NOT NULL;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
ALTER TABLE "userTokens" RENAME TO "accountActions";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "accountActions" DROP CONSTRAINT "userTokens_userId_users_id_fk";
|
|
3
|
+
--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "accountActions" ADD CONSTRAINT "accountActions_userId_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
ALTER TABLE "loginHistory" RENAME TO "signInHistory";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "signInHistory" RENAME COLUMN "loginTime" TO "signInTime";--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "signInHistory" DROP CONSTRAINT "loginHistory_userId_users_id_fk";
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "accountActions" ALTER COLUMN "action" SET DATA TYPE text;--> statement-breakpoint
|
|
6
|
+
DROP TYPE "public"."accountAction";--> statement-breakpoint
|
|
7
|
+
CREATE TYPE "public"."accountAction" AS ENUM('cooldown', 'confirmEmail', 'signIn', 'resetPassword');--> statement-breakpoint
|
|
8
|
+
ALTER TABLE "accountActions" ALTER COLUMN "action" SET DATA TYPE "public"."accountAction" USING "action"::"public"."accountAction";--> statement-breakpoint
|
|
9
|
+
ALTER TABLE "signInHistory" ADD CONSTRAINT "signInHistory_userId_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
|