tempest.games 0.2.62 → 0.2.64
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 +14 -0
- package/app/assets/index-MKr2m6x6.js +109 -0
- package/app/index.html +1 -1
- package/bin/backend.bun.js +201 -202
- package/bin/backend.worker.game.bun.js +10 -10
- package/bin/backend.worker.tribunal.bun.js +77 -76
- package/bin/frontend.bun.js +36 -35
- package/bin/setup-db.bun.js +472 -359
- package/package.json +22 -21
- package/app/assets/index-x5An0S0o.js +0 -108
package/bin/setup-db.bun.js
CHANGED
|
@@ -1952,7 +1952,7 @@ function osUsername() {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
1954
|
|
|
1955
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
1955
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/entity.js
|
|
1956
1956
|
var entityKind = Symbol.for("drizzle:entityKind");
|
|
1957
1957
|
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
1958
1958
|
function is(value, type) {
|
|
@@ -1977,7 +1977,7 @@ function is(value, type) {
|
|
|
1977
1977
|
return false;
|
|
1978
1978
|
}
|
|
1979
1979
|
|
|
1980
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
1980
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/logger.js
|
|
1981
1981
|
class ConsoleLogWriter {
|
|
1982
1982
|
static [entityKind] = "ConsoleLogWriter";
|
|
1983
1983
|
write(message) {
|
|
@@ -2009,7 +2009,7 @@ class NoopLogger {
|
|
|
2009
2009
|
logQuery() {}
|
|
2010
2010
|
}
|
|
2011
2011
|
|
|
2012
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2012
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/query-promise.js
|
|
2013
2013
|
class QueryPromise {
|
|
2014
2014
|
static [entityKind] = "QueryPromise";
|
|
2015
2015
|
[Symbol.toStringTag] = "QueryPromise";
|
|
@@ -2030,7 +2030,7 @@ class QueryPromise {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
2032
|
|
|
2033
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2033
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/column.js
|
|
2034
2034
|
class Column {
|
|
2035
2035
|
constructor(table, config) {
|
|
2036
2036
|
this.table = table;
|
|
@@ -2080,20 +2080,20 @@ class Column {
|
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
2082
|
|
|
2083
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2083
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/table.utils.js
|
|
2084
2084
|
var TableName = Symbol.for("drizzle:Name");
|
|
2085
2085
|
|
|
2086
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2086
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/tracing-utils.js
|
|
2087
2087
|
function iife(fn, ...args) {
|
|
2088
2088
|
return fn(...args);
|
|
2089
2089
|
}
|
|
2090
2090
|
|
|
2091
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2091
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/unique-constraint.js
|
|
2092
2092
|
function uniqueKeyName(table, columns) {
|
|
2093
2093
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2096
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/common.js
|
|
2097
2097
|
class PgColumn extends Column {
|
|
2098
2098
|
constructor(table, config) {
|
|
2099
2099
|
if (!config.uniqueName) {
|
|
@@ -2142,7 +2142,7 @@ class ExtraConfigColumn extends PgColumn {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
|
|
2145
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2145
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
2146
2146
|
class PgEnumObjectColumn extends PgColumn {
|
|
2147
2147
|
static [entityKind] = "PgEnumObjectColumn";
|
|
2148
2148
|
enum;
|
|
@@ -2172,7 +2172,7 @@ class PgEnumColumn extends PgColumn {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
2174
|
|
|
2175
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2175
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/subquery.js
|
|
2176
2176
|
class Subquery {
|
|
2177
2177
|
static [entityKind] = "Subquery";
|
|
2178
2178
|
constructor(sql, fields, alias, isWith = false, usedTables = []) {
|
|
@@ -2191,10 +2191,10 @@ class WithSubquery extends Subquery {
|
|
|
2191
2191
|
static [entityKind] = "WithSubquery";
|
|
2192
2192
|
}
|
|
2193
2193
|
|
|
2194
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2195
|
-
var version = "0.44.
|
|
2194
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/version.js
|
|
2195
|
+
var version = "0.44.6";
|
|
2196
2196
|
|
|
2197
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2197
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/tracing.js
|
|
2198
2198
|
var otel;
|
|
2199
2199
|
var rawTracer;
|
|
2200
2200
|
var tracer = {
|
|
@@ -2221,10 +2221,10 @@ var tracer = {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
};
|
|
2223
2223
|
|
|
2224
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2224
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/view-common.js
|
|
2225
2225
|
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
2226
2226
|
|
|
2227
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2227
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/table.js
|
|
2228
2228
|
var Schema = Symbol.for("drizzle:Schema");
|
|
2229
2229
|
var Columns = Symbol.for("drizzle:Columns");
|
|
2230
2230
|
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -2268,7 +2268,7 @@ function getTableUniqueName(table) {
|
|
|
2268
2268
|
return `${table[Schema] ?? "public"}.${table[TableName]}`;
|
|
2269
2269
|
}
|
|
2270
2270
|
|
|
2271
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2271
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/sql/sql.js
|
|
2272
2272
|
function isSQLWrapper(value) {
|
|
2273
2273
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
2274
2274
|
}
|
|
@@ -2648,7 +2648,7 @@ Subquery.prototype.getSQL = function() {
|
|
|
2648
2648
|
return new SQL([this]);
|
|
2649
2649
|
};
|
|
2650
2650
|
|
|
2651
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2651
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/alias.js
|
|
2652
2652
|
class ColumnAliasProxyHandler {
|
|
2653
2653
|
constructor(table) {
|
|
2654
2654
|
this.table = table;
|
|
@@ -2727,7 +2727,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
|
2727
2727
|
}));
|
|
2728
2728
|
}
|
|
2729
2729
|
|
|
2730
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2730
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/selection-proxy.js
|
|
2731
2731
|
class SelectionProxyHandler {
|
|
2732
2732
|
static [entityKind] = "SelectionProxyHandler";
|
|
2733
2733
|
config;
|
|
@@ -2779,7 +2779,7 @@ class SelectionProxyHandler {
|
|
|
2779
2779
|
}
|
|
2780
2780
|
}
|
|
2781
2781
|
|
|
2782
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2782
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/utils.js
|
|
2783
2783
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
2784
2784
|
const nullifyMap = {};
|
|
2785
2785
|
const result = columns.reduce((result2, { path, field }, columnIndex) => {
|
|
@@ -2925,7 +2925,7 @@ function isConfig(data) {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
2927
2927
|
|
|
2928
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2928
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/date.js
|
|
2929
2929
|
class PgDate extends PgColumn {
|
|
2930
2930
|
static [entityKind] = "PgDate";
|
|
2931
2931
|
getSQLType() {
|
|
@@ -2945,7 +2945,7 @@ class PgDateString extends PgColumn {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
|
|
2948
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2948
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/json.js
|
|
2949
2949
|
class PgJson extends PgColumn {
|
|
2950
2950
|
static [entityKind] = "PgJson";
|
|
2951
2951
|
constructor(table, config) {
|
|
@@ -2969,7 +2969,7 @@ class PgJson extends PgColumn {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
2971
|
|
|
2972
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2972
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/jsonb.js
|
|
2973
2973
|
class PgJsonb extends PgColumn {
|
|
2974
2974
|
static [entityKind] = "PgJsonb";
|
|
2975
2975
|
constructor(table, config) {
|
|
@@ -2993,7 +2993,7 @@ class PgJsonb extends PgColumn {
|
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
|
|
2996
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
2996
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/numeric.js
|
|
2997
2997
|
class PgNumeric extends PgColumn {
|
|
2998
2998
|
static [entityKind] = "PgNumeric";
|
|
2999
2999
|
precision;
|
|
@@ -3019,7 +3019,7 @@ class PgNumeric extends PgColumn {
|
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
3021
|
|
|
3022
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3022
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/time.js
|
|
3023
3023
|
class PgTime extends PgColumn {
|
|
3024
3024
|
static [entityKind] = "PgTime";
|
|
3025
3025
|
withTimezone;
|
|
@@ -3035,7 +3035,7 @@ class PgTime extends PgColumn {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
3037
|
|
|
3038
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3038
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/timestamp.js
|
|
3039
3039
|
class PgTimestamp extends PgColumn {
|
|
3040
3040
|
static [entityKind] = "PgTimestamp";
|
|
3041
3041
|
withTimezone;
|
|
@@ -3071,7 +3071,7 @@ class PgTimestampString extends PgColumn {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
3073
|
|
|
3074
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3074
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/columns/uuid.js
|
|
3075
3075
|
class PgUUID extends PgColumn {
|
|
3076
3076
|
static [entityKind] = "PgUUID";
|
|
3077
3077
|
getSQLType() {
|
|
@@ -3079,7 +3079,7 @@ class PgUUID extends PgColumn {
|
|
|
3079
3079
|
}
|
|
3080
3080
|
}
|
|
3081
3081
|
|
|
3082
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3082
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/table.js
|
|
3083
3083
|
var InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
3084
3084
|
var EnableRLS = Symbol.for("drizzle:EnableRLS");
|
|
3085
3085
|
|
|
@@ -3095,7 +3095,7 @@ class PgTable extends Table {
|
|
|
3095
3095
|
[Table.Symbol.ExtraConfigColumns] = {};
|
|
3096
3096
|
}
|
|
3097
3097
|
|
|
3098
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3098
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/primary-keys.js
|
|
3099
3099
|
class PrimaryKeyBuilder {
|
|
3100
3100
|
static [entityKind] = "PgPrimaryKeyBuilder";
|
|
3101
3101
|
columns;
|
|
@@ -3123,7 +3123,7 @@ class PrimaryKey {
|
|
|
3123
3123
|
}
|
|
3124
3124
|
}
|
|
3125
3125
|
|
|
3126
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3126
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/casing.js
|
|
3127
3127
|
function toSnakeCase(input) {
|
|
3128
3128
|
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
|
|
3129
3129
|
return words.map((word) => word.toLowerCase()).join("_");
|
|
@@ -3176,7 +3176,7 @@ class CasingCache {
|
|
|
3176
3176
|
}
|
|
3177
3177
|
}
|
|
3178
3178
|
|
|
3179
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3179
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/errors.js
|
|
3180
3180
|
class DrizzleError extends Error {
|
|
3181
3181
|
static [entityKind] = "DrizzleError";
|
|
3182
3182
|
constructor({ message, cause }) {
|
|
@@ -3206,7 +3206,7 @@ class TransactionRollbackError extends DrizzleError {
|
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
3208
|
|
|
3209
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3209
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
3210
3210
|
function bindIfParam(value, column) {
|
|
3211
3211
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
3212
3212
|
return new Param(value, column);
|
|
@@ -3311,7 +3311,7 @@ function notIlike(column, value) {
|
|
|
3311
3311
|
return sql`${column} not ilike ${value}`;
|
|
3312
3312
|
}
|
|
3313
3313
|
|
|
3314
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3314
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/sql/expressions/select.js
|
|
3315
3315
|
function asc(column) {
|
|
3316
3316
|
return sql`${column} asc`;
|
|
3317
3317
|
}
|
|
@@ -3319,7 +3319,7 @@ function desc(column) {
|
|
|
3319
3319
|
return sql`${column} desc`;
|
|
3320
3320
|
}
|
|
3321
3321
|
|
|
3322
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3322
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/relations.js
|
|
3323
3323
|
class Relation {
|
|
3324
3324
|
constructor(sourceTable, referencedTable, relationName) {
|
|
3325
3325
|
this.sourceTable = sourceTable;
|
|
@@ -3539,12 +3539,12 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
|
3539
3539
|
return result;
|
|
3540
3540
|
}
|
|
3541
3541
|
|
|
3542
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3542
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/view-base.js
|
|
3543
3543
|
class PgViewBase extends View {
|
|
3544
3544
|
static [entityKind] = "PgViewBase";
|
|
3545
3545
|
}
|
|
3546
3546
|
|
|
3547
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
3547
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/dialect.js
|
|
3548
3548
|
class PgDialect {
|
|
3549
3549
|
static [entityKind] = "PgDialect";
|
|
3550
3550
|
casing;
|
|
@@ -4102,7 +4102,7 @@ class PgDialect {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
4104
|
|
|
4105
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4105
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/query-builders/query-builder.js
|
|
4106
4106
|
class TypedQueryBuilder {
|
|
4107
4107
|
static [entityKind] = "TypedQueryBuilder";
|
|
4108
4108
|
getSelectedFields() {
|
|
@@ -4110,7 +4110,7 @@ class TypedQueryBuilder {
|
|
|
4110
4110
|
}
|
|
4111
4111
|
}
|
|
4112
4112
|
|
|
4113
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4113
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/select.js
|
|
4114
4114
|
class PgSelectBuilder {
|
|
4115
4115
|
static [entityKind] = "PgSelectBuilder";
|
|
4116
4116
|
fields;
|
|
@@ -4428,7 +4428,7 @@ var intersectAll = createSetOperator("intersect", true);
|
|
|
4428
4428
|
var except = createSetOperator("except", false);
|
|
4429
4429
|
var exceptAll = createSetOperator("except", true);
|
|
4430
4430
|
|
|
4431
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4431
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/query-builder.js
|
|
4432
4432
|
class QueryBuilder {
|
|
4433
4433
|
static [entityKind] = "PgQueryBuilder";
|
|
4434
4434
|
dialect;
|
|
@@ -4506,7 +4506,7 @@ class QueryBuilder {
|
|
|
4506
4506
|
}
|
|
4507
4507
|
}
|
|
4508
4508
|
|
|
4509
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4509
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/utils.js
|
|
4510
4510
|
function extractUsedTable(table) {
|
|
4511
4511
|
if (is(table, PgTable)) {
|
|
4512
4512
|
return [table[Schema] ? `${table[Schema]}.${table[Table.Symbol.BaseName]}` : table[Table.Symbol.BaseName]];
|
|
@@ -4520,7 +4520,7 @@ function extractUsedTable(table) {
|
|
|
4520
4520
|
return [];
|
|
4521
4521
|
}
|
|
4522
4522
|
|
|
4523
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4523
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/delete.js
|
|
4524
4524
|
class PgDeleteBase extends QueryPromise {
|
|
4525
4525
|
constructor(table, session, dialect, withList) {
|
|
4526
4526
|
super();
|
|
@@ -4580,7 +4580,7 @@ class PgDeleteBase extends QueryPromise {
|
|
|
4580
4580
|
}
|
|
4581
4581
|
}
|
|
4582
4582
|
|
|
4583
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4583
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/insert.js
|
|
4584
4584
|
class PgInsertBuilder {
|
|
4585
4585
|
constructor(table, session, dialect, withList, overridingSystemValue_) {
|
|
4586
4586
|
this.table = table;
|
|
@@ -4703,7 +4703,7 @@ class PgInsertBase extends QueryPromise {
|
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
4705
4705
|
|
|
4706
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4706
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/refresh-materialized-view.js
|
|
4707
4707
|
class PgRefreshMaterializedView extends QueryPromise {
|
|
4708
4708
|
constructor(view, session, dialect) {
|
|
4709
4709
|
super();
|
|
@@ -4754,7 +4754,7 @@ class PgRefreshMaterializedView extends QueryPromise {
|
|
|
4754
4754
|
};
|
|
4755
4755
|
}
|
|
4756
4756
|
|
|
4757
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4757
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/update.js
|
|
4758
4758
|
class PgUpdateBuilder {
|
|
4759
4759
|
constructor(table, session, dialect, withList) {
|
|
4760
4760
|
this.table = table;
|
|
@@ -4908,7 +4908,7 @@ class PgUpdateBase extends QueryPromise {
|
|
|
4908
4908
|
}
|
|
4909
4909
|
}
|
|
4910
4910
|
|
|
4911
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4911
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/count.js
|
|
4912
4912
|
class PgCountBuilder extends SQL {
|
|
4913
4913
|
constructor(params) {
|
|
4914
4914
|
super(PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
|
@@ -4949,7 +4949,7 @@ class PgCountBuilder extends SQL {
|
|
|
4949
4949
|
}
|
|
4950
4950
|
}
|
|
4951
4951
|
|
|
4952
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
4952
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/query.js
|
|
4953
4953
|
class RelationalQueryBuilder {
|
|
4954
4954
|
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
|
|
4955
4955
|
this.fullSchema = fullSchema;
|
|
@@ -5032,7 +5032,7 @@ class PgRelationalQuery extends QueryPromise {
|
|
|
5032
5032
|
}
|
|
5033
5033
|
}
|
|
5034
5034
|
|
|
5035
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5035
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/query-builders/raw.js
|
|
5036
5036
|
class PgRaw extends QueryPromise {
|
|
5037
5037
|
constructor(execute, sql2, query, mapBatchResult) {
|
|
5038
5038
|
super();
|
|
@@ -5059,7 +5059,7 @@ class PgRaw extends QueryPromise {
|
|
|
5059
5059
|
}
|
|
5060
5060
|
}
|
|
5061
5061
|
|
|
5062
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5062
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/db.js
|
|
5063
5063
|
class PgDatabase {
|
|
5064
5064
|
constructor(dialect, session, schema) {
|
|
5065
5065
|
this.dialect = dialect;
|
|
@@ -5185,7 +5185,7 @@ class PgDatabase {
|
|
|
5185
5185
|
}
|
|
5186
5186
|
}
|
|
5187
5187
|
|
|
5188
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5188
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/cache/core/cache.js
|
|
5189
5189
|
class Cache {
|
|
5190
5190
|
static [entityKind] = "Cache";
|
|
5191
5191
|
}
|
|
@@ -5211,7 +5211,7 @@ async function hashQuery(sql2, params) {
|
|
|
5211
5211
|
return hashHex;
|
|
5212
5212
|
}
|
|
5213
5213
|
|
|
5214
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5214
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/pg-core/session.js
|
|
5215
5215
|
class PgPreparedQuery {
|
|
5216
5216
|
constructor(query, cache, queryMetadata, cacheConfig) {
|
|
5217
5217
|
this.query = query;
|
|
@@ -5343,7 +5343,7 @@ class PgTransaction extends PgDatabase {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
}
|
|
5345
5345
|
|
|
5346
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5346
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/postgres-js/session.js
|
|
5347
5347
|
class PostgresJsPreparedQuery extends PgPreparedQuery {
|
|
5348
5348
|
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, _isResponseInArrayMode, customResultMapper) {
|
|
5349
5349
|
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
|
|
@@ -5459,7 +5459,7 @@ class PostgresJsTransaction extends PgTransaction {
|
|
|
5459
5459
|
}
|
|
5460
5460
|
}
|
|
5461
5461
|
|
|
5462
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5462
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/postgres-js/driver.js
|
|
5463
5463
|
class PostgresJsDatabase extends PgDatabase {
|
|
5464
5464
|
static [entityKind] = "PostgresJsDatabase";
|
|
5465
5465
|
}
|
|
@@ -5527,7 +5527,7 @@ function drizzle(...params) {
|
|
|
5527
5527
|
drizzle2.mock = mock;
|
|
5528
5528
|
})(drizzle || (drizzle = {}));
|
|
5529
5529
|
|
|
5530
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5530
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/migrator.js
|
|
5531
5531
|
import crypto3 from "crypto";
|
|
5532
5532
|
import fs2 from "fs";
|
|
5533
5533
|
function readMigrationFiles(config) {
|
|
@@ -5559,13 +5559,13 @@ function readMigrationFiles(config) {
|
|
|
5559
5559
|
return migrationQueries;
|
|
5560
5560
|
}
|
|
5561
5561
|
|
|
5562
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.44.
|
|
5562
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251011.0_bun-types@1.3.0_@types+react@19.2.2__postgres@3.4.7/node_modules/drizzle-orm/postgres-js/migrator.js
|
|
5563
5563
|
async function migrate(db, config) {
|
|
5564
5564
|
const migrations = readMigrationFiles(config);
|
|
5565
5565
|
await db.dialect.migrate(migrations, db.session, config);
|
|
5566
5566
|
}
|
|
5567
5567
|
|
|
5568
|
-
// ../../node_modules/.pnpm/@t3-oss+env-core@0.13.8_arktype@2.1.
|
|
5568
|
+
// ../../node_modules/.pnpm/@t3-oss+env-core@0.13.8_arktype@2.1.23_typescript@5.9.3_zod@3.25.76/node_modules/@t3-oss/env-core/dist/src-Bb3GbGAa.js
|
|
5569
5569
|
function ensureSynchronous(value, message) {
|
|
5570
5570
|
if (value instanceof Promise)
|
|
5571
5571
|
throw new Error(message);
|
|
@@ -5651,7 +5651,10 @@ function createEnv(opts) {
|
|
|
5651
5651
|
return env;
|
|
5652
5652
|
}
|
|
5653
5653
|
|
|
5654
|
-
// ../../node_modules/.pnpm/@ark+
|
|
5654
|
+
// ../../node_modules/.pnpm/@ark+regex@0.0.0/node_modules/@ark/regex/out/regex.js
|
|
5655
|
+
var regex = (src, flags) => new RegExp(src, flags);
|
|
5656
|
+
Object.assign(regex, { cast: regex });
|
|
5657
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/arrays.js
|
|
5655
5658
|
var liftArray = (data) => Array.isArray(data) ? data : [data];
|
|
5656
5659
|
var spliterate = (arr, predicate) => {
|
|
5657
5660
|
const result = [[], []];
|
|
@@ -5706,7 +5709,7 @@ var groupBy = (array, discriminant) => array.reduce((result, item) => {
|
|
|
5706
5709
|
return result;
|
|
5707
5710
|
}, {});
|
|
5708
5711
|
var arrayEquals = (l, r, opts) => l.length === r.length && l.every(opts?.isEqual ? (lItem, i) => opts.isEqual(lItem, r[i]) : (lItem, i) => lItem === r[i]);
|
|
5709
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5712
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/domain.js
|
|
5710
5713
|
var hasDomain = (data, kind) => domainOf(data) === kind;
|
|
5711
5714
|
var domainOf = (data) => {
|
|
5712
5715
|
const builtinType = typeof data;
|
|
@@ -5727,7 +5730,7 @@ var jsTypeOfDescriptions = {
|
|
|
5727
5730
|
function: "a function"
|
|
5728
5731
|
};
|
|
5729
5732
|
|
|
5730
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5733
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/errors.js
|
|
5731
5734
|
class InternalArktypeError extends Error {
|
|
5732
5735
|
}
|
|
5733
5736
|
var throwInternalError = (message) => throwError(message, InternalArktypeError);
|
|
@@ -5740,8 +5743,9 @@ class ParseError extends Error {
|
|
|
5740
5743
|
}
|
|
5741
5744
|
var throwParseError = (message) => throwError(message, ParseError);
|
|
5742
5745
|
var noSuggest = (s) => ` ${s}`;
|
|
5746
|
+
var ZeroWidthSpace = "\u200B";
|
|
5743
5747
|
|
|
5744
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5748
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/flatMorph.js
|
|
5745
5749
|
var flatMorph = (o, flatMapEntry) => {
|
|
5746
5750
|
const result = {};
|
|
5747
5751
|
const inputIsArray = Array.isArray(o);
|
|
@@ -5760,7 +5764,7 @@ var flatMorph = (o, flatMapEntry) => {
|
|
|
5760
5764
|
return outputShouldBeArray ? Object.values(result) : result;
|
|
5761
5765
|
};
|
|
5762
5766
|
|
|
5763
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5767
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/records.js
|
|
5764
5768
|
var entriesOf = Object.entries;
|
|
5765
5769
|
var isKeyOf = (k, o) => (k in o);
|
|
5766
5770
|
var hasKey = (o, k) => (k in o);
|
|
@@ -5800,14 +5804,14 @@ var withAlphabetizedKeys = (o) => {
|
|
|
5800
5804
|
result[keys[i]] = o[keys[i]];
|
|
5801
5805
|
return result;
|
|
5802
5806
|
};
|
|
5803
|
-
var unset = noSuggest(
|
|
5807
|
+
var unset = noSuggest(`unset${ZeroWidthSpace}`);
|
|
5804
5808
|
var enumValues = (tsEnum) => Object.values(tsEnum).filter((v) => {
|
|
5805
5809
|
if (typeof v === "number")
|
|
5806
5810
|
return true;
|
|
5807
5811
|
return typeof tsEnum[v] !== "number";
|
|
5808
5812
|
});
|
|
5809
5813
|
|
|
5810
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5814
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/objectKinds.js
|
|
5811
5815
|
var ecmascriptConstructors = {
|
|
5812
5816
|
Array,
|
|
5813
5817
|
Boolean,
|
|
@@ -5923,7 +5927,7 @@ var constructorExtends = (ctor, base) => {
|
|
|
5923
5927
|
return false;
|
|
5924
5928
|
};
|
|
5925
5929
|
|
|
5926
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5930
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/clone.js
|
|
5927
5931
|
var deepClone = (input) => _clone(input, new Map);
|
|
5928
5932
|
var _clone = (input, seen) => {
|
|
5929
5933
|
if (typeof input !== "object" || input === null)
|
|
@@ -5949,7 +5953,7 @@ var _clone = (input, seen) => {
|
|
|
5949
5953
|
Object.defineProperties(cloned, propertyDescriptors);
|
|
5950
5954
|
return cloned;
|
|
5951
5955
|
};
|
|
5952
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5956
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/functions.js
|
|
5953
5957
|
var cached = (thunk) => {
|
|
5954
5958
|
let result = unset;
|
|
5955
5959
|
return () => result === unset ? result = thunk() : result;
|
|
@@ -5983,16 +5987,16 @@ var envHasCsp = cached(() => {
|
|
|
5983
5987
|
return true;
|
|
5984
5988
|
}
|
|
5985
5989
|
});
|
|
5986
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5990
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/generics.js
|
|
5987
5991
|
var brand = noSuggest("brand");
|
|
5988
5992
|
var inferred = noSuggest("arkInferred");
|
|
5989
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5993
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/hkt.js
|
|
5990
5994
|
var args = noSuggest("args");
|
|
5991
5995
|
|
|
5992
5996
|
class Hkt {
|
|
5993
5997
|
constructor() {}
|
|
5994
5998
|
}
|
|
5995
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
5999
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/isomorphic.js
|
|
5996
6000
|
var fileName = () => {
|
|
5997
6001
|
try {
|
|
5998
6002
|
const error = new Error;
|
|
@@ -6009,25 +6013,25 @@ var isomorphic = {
|
|
|
6009
6013
|
fileName,
|
|
6010
6014
|
env
|
|
6011
6015
|
};
|
|
6012
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6016
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/strings.js
|
|
6013
6017
|
var capitalize = (s) => s[0].toUpperCase() + s.slice(1);
|
|
6014
|
-
var anchoredRegex = (
|
|
6015
|
-
var anchoredSource = (
|
|
6016
|
-
const source = typeof
|
|
6018
|
+
var anchoredRegex = (regex2) => new RegExp(anchoredSource(regex2), typeof regex2 === "string" ? "" : regex2.flags);
|
|
6019
|
+
var anchoredSource = (regex2) => {
|
|
6020
|
+
const source = typeof regex2 === "string" ? regex2 : regex2.source;
|
|
6017
6021
|
return `^(?:${source})$`;
|
|
6018
6022
|
};
|
|
6019
6023
|
var RegexPatterns = {
|
|
6020
6024
|
negativeLookahead: (pattern) => `(?!${pattern})`,
|
|
6021
6025
|
nonCapturingGroup: (pattern) => `(?:${pattern})`
|
|
6022
6026
|
};
|
|
6023
|
-
var
|
|
6027
|
+
var Backslash = "\\";
|
|
6024
6028
|
var whitespaceChars = {
|
|
6025
6029
|
" ": 1,
|
|
6026
6030
|
"\n": 1,
|
|
6027
6031
|
"\t": 1
|
|
6028
6032
|
};
|
|
6029
6033
|
|
|
6030
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6034
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/numbers.js
|
|
6031
6035
|
var anchoredNegativeZeroPattern = /^-0\.?0*$/.source;
|
|
6032
6036
|
var positiveIntegerPattern = /[1-9]\d*/.source;
|
|
6033
6037
|
var looseDecimalPattern = /\.\d+/.source;
|
|
@@ -6089,8 +6093,8 @@ var tryParseWellFormedBigint = (def) => {
|
|
|
6089
6093
|
return throwParseError(writeMalformedNumericLiteralMessage(def, "bigint"));
|
|
6090
6094
|
}
|
|
6091
6095
|
};
|
|
6092
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6093
|
-
var arkUtilVersion = "0.
|
|
6096
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/registry.js
|
|
6097
|
+
var arkUtilVersion = "0.50.0";
|
|
6094
6098
|
var initialRegistryContents = {
|
|
6095
6099
|
version: arkUtilVersion,
|
|
6096
6100
|
filename: isomorphic.fileName(),
|
|
@@ -6129,10 +6133,10 @@ var baseNameFor = (value) => {
|
|
|
6129
6133
|
return throwInternalError(`Unexpected attempt to register serializable value of type ${domainOf(value)}`);
|
|
6130
6134
|
};
|
|
6131
6135
|
|
|
6132
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6136
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/primitive.js
|
|
6133
6137
|
var serializePrimitive = (value) => typeof value === "string" ? JSON.stringify(value) : typeof value === "bigint" ? `${value}n` : `${value}`;
|
|
6134
6138
|
|
|
6135
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6139
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/serialize.js
|
|
6136
6140
|
var snapshot = (data, opts = {}) => _serialize(data, {
|
|
6137
6141
|
onUndefined: `$ark.undefined`,
|
|
6138
6142
|
onBigInt: (n) => `$ark.bigint-${n}`,
|
|
@@ -6265,7 +6269,7 @@ var months = [
|
|
|
6265
6269
|
var timeWithUnnecessarySeconds = /:\d\d:00$/;
|
|
6266
6270
|
var pad = (value, length) => String(value).padStart(length, "0");
|
|
6267
6271
|
|
|
6268
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6272
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/path.js
|
|
6269
6273
|
var appendStringifiedKey = (path, prop, ...[opts]) => {
|
|
6270
6274
|
const stringifySymbol = opts?.stringifySymbol ?? printable;
|
|
6271
6275
|
let propAccessChain = path;
|
|
@@ -6322,7 +6326,7 @@ class ReadonlyPath extends ReadonlyArray {
|
|
|
6322
6326
|
return this.cache.stringifyAncestors = result;
|
|
6323
6327
|
}
|
|
6324
6328
|
}
|
|
6325
|
-
// ../../node_modules/.pnpm/@ark+util@0.
|
|
6329
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/scanner.js
|
|
6326
6330
|
class Scanner {
|
|
6327
6331
|
chars;
|
|
6328
6332
|
i;
|
|
@@ -6347,13 +6351,28 @@ class Scanner {
|
|
|
6347
6351
|
shiftUntil(condition) {
|
|
6348
6352
|
let shifted = "";
|
|
6349
6353
|
while (this.lookahead) {
|
|
6350
|
-
if (condition(this, shifted))
|
|
6351
|
-
|
|
6352
|
-
|
|
6354
|
+
if (condition(this, shifted))
|
|
6355
|
+
break;
|
|
6356
|
+
else
|
|
6357
|
+
shifted += this.shift();
|
|
6358
|
+
}
|
|
6359
|
+
return shifted;
|
|
6360
|
+
}
|
|
6361
|
+
shiftUntilEscapable(condition) {
|
|
6362
|
+
let shifted = "";
|
|
6363
|
+
while (this.lookahead) {
|
|
6364
|
+
if (this.lookahead === Backslash) {
|
|
6365
|
+
this.shift();
|
|
6366
|
+
if (condition(this, shifted))
|
|
6367
|
+
shifted += this.shift();
|
|
6368
|
+
else if (this.lookahead === Backslash)
|
|
6369
|
+
shifted += this.shift();
|
|
6353
6370
|
else
|
|
6354
|
-
|
|
6355
|
-
}
|
|
6356
|
-
|
|
6371
|
+
shifted += `${Backslash}${this.shift()}`;
|
|
6372
|
+
} else if (condition(this, shifted))
|
|
6373
|
+
break;
|
|
6374
|
+
else
|
|
6375
|
+
shifted += this.shift();
|
|
6357
6376
|
}
|
|
6358
6377
|
return shifted;
|
|
6359
6378
|
}
|
|
@@ -6388,9 +6407,11 @@ class Scanner {
|
|
|
6388
6407
|
return this.lookahead in tokens;
|
|
6389
6408
|
}
|
|
6390
6409
|
}
|
|
6391
|
-
|
|
6410
|
+
var writeUnmatchedGroupCloseMessage = (char, unscanned) => `Unmatched ${char}${unscanned === "" ? "" : ` before ${unscanned}`}`;
|
|
6411
|
+
var writeUnclosedGroupMessage = (missingChar) => `Missing ${missingChar}`;
|
|
6412
|
+
// ../../node_modules/.pnpm/@ark+util@0.50.0/node_modules/@ark/util/out/traits.js
|
|
6392
6413
|
var implementedTraits = noSuggest("implementedTraits");
|
|
6393
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6414
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/registry.js
|
|
6394
6415
|
var _registryName = "$ark";
|
|
6395
6416
|
var suffix = 2;
|
|
6396
6417
|
while (_registryName in globalThis)
|
|
@@ -6401,7 +6422,7 @@ var $ark = registry;
|
|
|
6401
6422
|
var reference = (name) => `${registryName}.${name}`;
|
|
6402
6423
|
var registeredReference = (value) => reference(register(value));
|
|
6403
6424
|
|
|
6404
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6425
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/compile.js
|
|
6405
6426
|
class CompiledFunction extends CastableBase {
|
|
6406
6427
|
argNames;
|
|
6407
6428
|
body = "";
|
|
@@ -6537,13 +6558,13 @@ class NodeCompiler extends CompiledFunction {
|
|
|
6537
6558
|
}
|
|
6538
6559
|
}
|
|
6539
6560
|
|
|
6540
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6561
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/utils.js
|
|
6541
6562
|
var makeRootAndArrayPropertiesMutable = (o) => flatMorph(o, (k, v) => [k, isArray(v) ? [...v] : v]);
|
|
6542
6563
|
var arkKind = noSuggest("arkKind");
|
|
6543
6564
|
var hasArkKind = (value, kind) => value?.[arkKind] === kind;
|
|
6544
6565
|
var isNode = (value) => hasArkKind(value, "root") || hasArkKind(value, "constraint");
|
|
6545
6566
|
|
|
6546
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6567
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/implement.js
|
|
6547
6568
|
var basisKinds = ["unit", "proto", "domain"];
|
|
6548
6569
|
var structuralKinds = [
|
|
6549
6570
|
"required",
|
|
@@ -6551,7 +6572,7 @@ var structuralKinds = [
|
|
|
6551
6572
|
"index",
|
|
6552
6573
|
"sequence"
|
|
6553
6574
|
];
|
|
6554
|
-
var
|
|
6575
|
+
var prestructuralKinds = [
|
|
6555
6576
|
"pattern",
|
|
6556
6577
|
"divisor",
|
|
6557
6578
|
"exactLength",
|
|
@@ -6562,12 +6583,12 @@ var refinementKinds = [
|
|
|
6562
6583
|
"before",
|
|
6563
6584
|
"after"
|
|
6564
6585
|
];
|
|
6565
|
-
var
|
|
6566
|
-
...
|
|
6567
|
-
...structuralKinds,
|
|
6586
|
+
var refinementKinds = [
|
|
6587
|
+
...prestructuralKinds,
|
|
6568
6588
|
"structure",
|
|
6569
6589
|
"predicate"
|
|
6570
6590
|
];
|
|
6591
|
+
var constraintKinds = [...refinementKinds, ...structuralKinds];
|
|
6571
6592
|
var rootKinds = [
|
|
6572
6593
|
"alias",
|
|
6573
6594
|
"union",
|
|
@@ -6631,7 +6652,7 @@ var implementNode = (_) => {
|
|
|
6631
6652
|
return implementation;
|
|
6632
6653
|
};
|
|
6633
6654
|
|
|
6634
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6655
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/toJsonSchema.js
|
|
6635
6656
|
class ToJsonSchemaError extends Error {
|
|
6636
6657
|
name = "ToJsonSchemaError";
|
|
6637
6658
|
code;
|
|
@@ -6671,7 +6692,7 @@ var ToJsonSchema = {
|
|
|
6671
6692
|
defaultConfig
|
|
6672
6693
|
};
|
|
6673
6694
|
|
|
6674
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6695
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/config.js
|
|
6675
6696
|
$ark.config ??= {};
|
|
6676
6697
|
var mergeConfigs = (base, merged) => {
|
|
6677
6698
|
if (!merged)
|
|
@@ -6726,7 +6747,7 @@ var mergeFallbacks = (base, merged) => {
|
|
|
6726
6747
|
return result;
|
|
6727
6748
|
};
|
|
6728
6749
|
var normalizeFallback = (fallback) => typeof fallback === "function" ? { default: fallback } : fallback ?? {};
|
|
6729
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6750
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/errors.js
|
|
6730
6751
|
class ArkError extends CastableBase {
|
|
6731
6752
|
[arkKind] = "error";
|
|
6732
6753
|
path;
|
|
@@ -6843,9 +6864,26 @@ class ArkErrors extends ReadonlyArray {
|
|
|
6843
6864
|
return new TraversalError(this);
|
|
6844
6865
|
}
|
|
6845
6866
|
add(error) {
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6867
|
+
const existing = this.byPath[error.propString];
|
|
6868
|
+
if (existing) {
|
|
6869
|
+
if (error === existing)
|
|
6870
|
+
return;
|
|
6871
|
+
if (existing.hasCode("union") && existing.errors.length === 0)
|
|
6872
|
+
return;
|
|
6873
|
+
const errorIntersection = error.hasCode("union") && error.errors.length === 0 ? error : new ArkError({
|
|
6874
|
+
code: "intersection",
|
|
6875
|
+
errors: existing.hasCode("intersection") ? [...existing.errors, error] : [existing, error]
|
|
6876
|
+
}, this.ctx);
|
|
6877
|
+
const existingIndex = this.indexOf(existing);
|
|
6878
|
+
this.mutable[existingIndex === -1 ? this.length : existingIndex] = errorIntersection;
|
|
6879
|
+
this.byPath[error.propString] = errorIntersection;
|
|
6880
|
+
this.addAncestorPaths(error);
|
|
6881
|
+
} else {
|
|
6882
|
+
this.byPath[error.propString] = error;
|
|
6883
|
+
this.addAncestorPaths(error);
|
|
6884
|
+
this.mutable.push(error);
|
|
6885
|
+
}
|
|
6886
|
+
this.count++;
|
|
6849
6887
|
}
|
|
6850
6888
|
transform(f) {
|
|
6851
6889
|
const result = new ArkErrors(this.ctx);
|
|
@@ -6855,9 +6893,7 @@ class ArkErrors extends ReadonlyArray {
|
|
|
6855
6893
|
}
|
|
6856
6894
|
merge(errors2) {
|
|
6857
6895
|
for (const e of errors2) {
|
|
6858
|
-
|
|
6859
|
-
continue;
|
|
6860
|
-
this._add(new ArkError({ ...e, path: [...this.ctx.path, ...e.path] }, this.ctx));
|
|
6896
|
+
this.add(new ArkError({ ...e, path: [...this.ctx.path, ...e.path] }, this.ctx));
|
|
6861
6897
|
}
|
|
6862
6898
|
}
|
|
6863
6899
|
affectsPath(path2) {
|
|
@@ -6878,26 +6914,6 @@ class ArkErrors extends ReadonlyArray {
|
|
|
6878
6914
|
return this.join(`
|
|
6879
6915
|
`);
|
|
6880
6916
|
}
|
|
6881
|
-
_add(error) {
|
|
6882
|
-
const existing = this.byPath[error.propString];
|
|
6883
|
-
if (existing) {
|
|
6884
|
-
if (existing.hasCode("union") && existing.errors.length === 0)
|
|
6885
|
-
return;
|
|
6886
|
-
const errorIntersection = error.hasCode("union") && error.errors.length === 0 ? error : new ArkError({
|
|
6887
|
-
code: "intersection",
|
|
6888
|
-
errors: existing.hasCode("intersection") ? [...existing.errors, error] : [existing, error]
|
|
6889
|
-
}, this.ctx);
|
|
6890
|
-
const existingIndex = this.indexOf(existing);
|
|
6891
|
-
this.mutable[existingIndex === -1 ? this.length : existingIndex] = errorIntersection;
|
|
6892
|
-
this.byPath[error.propString] = errorIntersection;
|
|
6893
|
-
this.addAncestorPaths(error);
|
|
6894
|
-
} else {
|
|
6895
|
-
this.byPath[error.propString] = error;
|
|
6896
|
-
this.addAncestorPaths(error);
|
|
6897
|
-
this.mutable.push(error);
|
|
6898
|
-
}
|
|
6899
|
-
this.count++;
|
|
6900
|
-
}
|
|
6901
6917
|
addAncestorPaths(error) {
|
|
6902
6918
|
for (const propString of error.path.stringifyAncestors()) {
|
|
6903
6919
|
this.byAncestorPath[propString] = append(this.byAncestorPath[propString], error);
|
|
@@ -6924,7 +6940,7 @@ var indent = (error) => error.toString().split(`
|
|
|
6924
6940
|
`).join(`
|
|
6925
6941
|
`);
|
|
6926
6942
|
|
|
6927
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
6943
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/traversal.js
|
|
6928
6944
|
class Traversal {
|
|
6929
6945
|
path = [];
|
|
6930
6946
|
errors = new ArkErrors(this);
|
|
@@ -7044,6 +7060,7 @@ class Traversal {
|
|
|
7044
7060
|
if (!morphIsNode) {
|
|
7045
7061
|
this.errors.merge(result);
|
|
7046
7062
|
}
|
|
7063
|
+
this.queuedMorphs = [];
|
|
7047
7064
|
break;
|
|
7048
7065
|
}
|
|
7049
7066
|
if (parent === undefined)
|
|
@@ -7063,7 +7080,7 @@ var traverseKey = (key, fn, ctx) => {
|
|
|
7063
7080
|
return result;
|
|
7064
7081
|
};
|
|
7065
7082
|
|
|
7066
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7083
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/node.js
|
|
7067
7084
|
class BaseNode extends Callable {
|
|
7068
7085
|
attachments;
|
|
7069
7086
|
$;
|
|
@@ -7094,7 +7111,7 @@ class BaseNode extends Callable {
|
|
|
7094
7111
|
this.attachments = attachments;
|
|
7095
7112
|
this.$ = $;
|
|
7096
7113
|
this.onFail = this.meta.onFail ?? this.$.resolvedConfig.onFail;
|
|
7097
|
-
this.includesTransform = this.hasKind("morph") || this.hasKind("structure") && this.structuralMorph !== undefined;
|
|
7114
|
+
this.includesTransform = this.hasKind("morph") || this.hasKind("structure") && this.structuralMorph !== undefined || this.hasKind("sequence") && this.inner.defaultables !== undefined;
|
|
7098
7115
|
this.includesContextualPredicate = this.hasKind("predicate") && this.inner.predicate.length !== 1;
|
|
7099
7116
|
this.isCyclic = this.kind === "alias";
|
|
7100
7117
|
this.referencesById = { [this.id]: this };
|
|
@@ -7184,10 +7201,16 @@ class BaseNode extends Callable {
|
|
|
7184
7201
|
return this(data, pipedFromCtx, null);
|
|
7185
7202
|
}
|
|
7186
7203
|
get in() {
|
|
7187
|
-
return this.cacheGetter("in", this.
|
|
7204
|
+
return this.cacheGetter("in", this.rawIn.isRoot() ? this.$.finalize(this.rawIn) : this.rawIn);
|
|
7205
|
+
}
|
|
7206
|
+
get rawIn() {
|
|
7207
|
+
return this.cacheGetter("rawIn", this.getIo("in"));
|
|
7188
7208
|
}
|
|
7189
7209
|
get out() {
|
|
7190
|
-
return this.cacheGetter("out", this.
|
|
7210
|
+
return this.cacheGetter("out", this.rawOut.isRoot() ? this.$.finalize(this.rawOut) : this.rawOut);
|
|
7211
|
+
}
|
|
7212
|
+
get rawOut() {
|
|
7213
|
+
return this.cacheGetter("rawOut", this.getIo("out"));
|
|
7191
7214
|
}
|
|
7192
7215
|
getIo(ioKind) {
|
|
7193
7216
|
if (!this.includesTransform)
|
|
@@ -7199,7 +7222,7 @@ class BaseNode extends Callable {
|
|
|
7199
7222
|
keySchemaImplementation.reduceIo(ioKind, ioInner, v);
|
|
7200
7223
|
else if (keySchemaImplementation.child) {
|
|
7201
7224
|
const childValue = v;
|
|
7202
|
-
ioInner[k] = isArray(childValue) ? childValue.map((child) => child
|
|
7225
|
+
ioInner[k] = isArray(childValue) ? childValue.map((child) => ioKind === "in" ? child.rawIn : child.rawOut) : ioKind === "in" ? childValue.rawIn : childValue.rawOut;
|
|
7203
7226
|
} else
|
|
7204
7227
|
ioInner[k] = v;
|
|
7205
7228
|
}
|
|
@@ -7406,7 +7429,7 @@ var appendUniqueNodes = (existing, refs) => appendUnique(existing, refs, {
|
|
|
7406
7429
|
isEqual: (l, r) => l.equals(r)
|
|
7407
7430
|
});
|
|
7408
7431
|
|
|
7409
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7432
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/disjoint.js
|
|
7410
7433
|
class Disjoint extends Array {
|
|
7411
7434
|
static init(kind, l, r, ctx) {
|
|
7412
7435
|
return new Disjoint({
|
|
@@ -7468,7 +7491,7 @@ var describeReasons = (l, r) => `${describeReason(l)} and ${describeReason(r)}`;
|
|
|
7468
7491
|
var describeReason = (value) => isNode(value) ? value.expression : isArray(value) ? value.map(describeReason).join(" | ") || "never" : String(value);
|
|
7469
7492
|
var writeUnsatisfiableExpressionError = (expression) => `${expression} results in an unsatisfiable type`;
|
|
7470
7493
|
|
|
7471
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7494
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/shared/intersections.js
|
|
7472
7495
|
var intersectionCache = {};
|
|
7473
7496
|
var intersectNodesRoot = (l, r, $) => intersectOrPipeNodes(l, r, {
|
|
7474
7497
|
$,
|
|
@@ -7526,7 +7549,7 @@ var pipeMorphed = (from, to, ctx) => from.distribute((fromBranch) => _pipeMorphe
|
|
|
7526
7549
|
const viableBranches = results.filter(isNode);
|
|
7527
7550
|
if (viableBranches.length === 0)
|
|
7528
7551
|
return Disjoint.init("union", from.branches, to.branches);
|
|
7529
|
-
if (viableBranches.length < from.branches.length || !from.branches.every((branch, i) => branch.
|
|
7552
|
+
if (viableBranches.length < from.branches.length || !from.branches.every((branch, i) => branch.rawIn.equals(viableBranches[i].rawIn)))
|
|
7530
7553
|
return ctx.$.parseSchema(viableBranches);
|
|
7531
7554
|
let meta;
|
|
7532
7555
|
if (viableBranches.length === 1) {
|
|
@@ -7535,7 +7558,7 @@ var pipeMorphed = (from, to, ctx) => from.distribute((fromBranch) => _pipeMorphe
|
|
|
7535
7558
|
return onlyBranch;
|
|
7536
7559
|
return ctx.$.node("morph", {
|
|
7537
7560
|
...onlyBranch.inner,
|
|
7538
|
-
in: onlyBranch.
|
|
7561
|
+
in: onlyBranch.rawIn.configure(meta, "self")
|
|
7539
7562
|
});
|
|
7540
7563
|
}
|
|
7541
7564
|
const schema = {
|
|
@@ -7562,7 +7585,7 @@ var _pipeMorphed = (from, to, ctx) => {
|
|
|
7562
7585
|
});
|
|
7563
7586
|
}
|
|
7564
7587
|
if (to.hasKind("morph")) {
|
|
7565
|
-
const inTersection = intersectOrPipeNodes(from, to.
|
|
7588
|
+
const inTersection = intersectOrPipeNodes(from, to.rawIn, ctx);
|
|
7566
7589
|
if (inTersection instanceof Disjoint)
|
|
7567
7590
|
return inTersection;
|
|
7568
7591
|
return ctx.$.node("morph", {
|
|
@@ -7576,7 +7599,7 @@ var _pipeMorphed = (from, to, ctx) => {
|
|
|
7576
7599
|
});
|
|
7577
7600
|
};
|
|
7578
7601
|
|
|
7579
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7602
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/constraint.js
|
|
7580
7603
|
class BaseConstraint extends BaseNode {
|
|
7581
7604
|
constructor(attachments, $) {
|
|
7582
7605
|
super(attachments, $);
|
|
@@ -7600,7 +7623,7 @@ class InternalPrimitiveConstraint extends BaseConstraint {
|
|
|
7600
7623
|
if (js.traversalKind === "Allows")
|
|
7601
7624
|
js.return(this.compiledCondition);
|
|
7602
7625
|
else {
|
|
7603
|
-
js.if(this.compiledNegation, () => js.line(
|
|
7626
|
+
js.if(this.compiledNegation, () => js.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`));
|
|
7604
7627
|
}
|
|
7605
7628
|
}
|
|
7606
7629
|
get errorContext() {
|
|
@@ -7646,16 +7669,16 @@ var intersectConstraints = (s) => {
|
|
|
7646
7669
|
continue;
|
|
7647
7670
|
if (result instanceof Disjoint)
|
|
7648
7671
|
return result;
|
|
7672
|
+
if (result.isRoot()) {
|
|
7673
|
+
s.roots.push(result);
|
|
7674
|
+
s.l.splice(i);
|
|
7675
|
+
return intersectConstraints(s);
|
|
7676
|
+
}
|
|
7649
7677
|
if (!matched) {
|
|
7650
|
-
if (result.isRoot()) {
|
|
7651
|
-
s.roots.push(result);
|
|
7652
|
-
s.l.splice(i);
|
|
7653
|
-
return intersectConstraints(s);
|
|
7654
|
-
}
|
|
7655
7678
|
s.l[i] = result;
|
|
7656
7679
|
matched = true;
|
|
7657
7680
|
} else if (!s.l.includes(result)) {
|
|
7658
|
-
return throwInternalError(`Unexpectedly encountered multiple distinct intersection results for refinement ${
|
|
7681
|
+
return throwInternalError(`Unexpectedly encountered multiple distinct intersection results for refinement ${head}`);
|
|
7659
7682
|
}
|
|
7660
7683
|
}
|
|
7661
7684
|
if (!matched)
|
|
@@ -7690,7 +7713,7 @@ var writeInvalidOperandMessage = (kind, expected, actual) => {
|
|
|
7690
7713
|
const actualDescription = actual.hasKind("morph") ? "a morph" : actual.isUnknown() ? "unknown" : actual.exclude(expected).defaultShortDescription;
|
|
7691
7714
|
return `${capitalize(kind)} operand must be ${expected.description} (was ${actualDescription})`;
|
|
7692
7715
|
};
|
|
7693
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7716
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/generic.js
|
|
7694
7717
|
var parseGeneric = (paramDefs, bodyDef, $) => new GenericRoot(paramDefs, bodyDef, $, $, null);
|
|
7695
7718
|
|
|
7696
7719
|
class LazyGenericBody extends Callable {
|
|
@@ -7761,7 +7784,7 @@ class GenericRoot extends Callable {
|
|
|
7761
7784
|
}
|
|
7762
7785
|
}
|
|
7763
7786
|
var writeUnsatisfiedParameterConstraintMessage = (name, constraint, arg) => `${name} must be assignable to ${constraint} (was ${arg})`;
|
|
7764
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7787
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/predicate.js
|
|
7765
7788
|
var implementation = implementNode({
|
|
7766
7789
|
kind: "predicate",
|
|
7767
7790
|
hasAssociatedError: true,
|
|
@@ -7816,7 +7839,7 @@ var Predicate = {
|
|
|
7816
7839
|
Node: PredicateNode
|
|
7817
7840
|
};
|
|
7818
7841
|
|
|
7819
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7842
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/divisor.js
|
|
7820
7843
|
var implementation2 = implementNode({
|
|
7821
7844
|
kind: "divisor",
|
|
7822
7845
|
collapsibleKey: "rule",
|
|
@@ -7869,7 +7892,7 @@ var greatestCommonDivisor = (l, r) => {
|
|
|
7869
7892
|
return greatestCommonDivisor2;
|
|
7870
7893
|
};
|
|
7871
7894
|
|
|
7872
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7895
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/range.js
|
|
7873
7896
|
class BaseRange extends InternalPrimitiveConstraint {
|
|
7874
7897
|
boundOperandKind = operandKindsByBoundKind[this.kind];
|
|
7875
7898
|
compiledActual = this.boundOperandKind === "value" ? `data` : this.boundOperandKind === "length" ? `data.length` : `data.valueOf()`;
|
|
@@ -7949,7 +7972,7 @@ var compileComparator = (kind, exclusive) => `${isKeyOf(kind, boundKindPairsByLo
|
|
|
7949
7972
|
var dateLimitToString = (limit) => typeof limit === "string" ? limit : new Date(limit).toLocaleString();
|
|
7950
7973
|
var writeUnboundableMessage = (root) => `Bounded expression ${root} must be exactly one of number, string, Array, or Date`;
|
|
7951
7974
|
|
|
7952
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
7975
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/after.js
|
|
7953
7976
|
var implementation3 = implementNode({
|
|
7954
7977
|
kind: "after",
|
|
7955
7978
|
collapsibleKey: "rule",
|
|
@@ -7983,7 +8006,7 @@ var After = {
|
|
|
7983
8006
|
Node: AfterNode
|
|
7984
8007
|
};
|
|
7985
8008
|
|
|
7986
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8009
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/before.js
|
|
7987
8010
|
var implementation4 = implementNode({
|
|
7988
8011
|
kind: "before",
|
|
7989
8012
|
collapsibleKey: "rule",
|
|
@@ -8018,7 +8041,7 @@ var Before = {
|
|
|
8018
8041
|
Node: BeforeNode
|
|
8019
8042
|
};
|
|
8020
8043
|
|
|
8021
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8044
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/exactLength.js
|
|
8022
8045
|
var implementation5 = implementNode({
|
|
8023
8046
|
kind: "exactLength",
|
|
8024
8047
|
collapsibleKey: "rule",
|
|
@@ -8066,7 +8089,7 @@ var ExactLength = {
|
|
|
8066
8089
|
Node: ExactLengthNode
|
|
8067
8090
|
};
|
|
8068
8091
|
|
|
8069
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8092
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/max.js
|
|
8070
8093
|
var implementation6 = implementNode({
|
|
8071
8094
|
kind: "max",
|
|
8072
8095
|
collapsibleKey: "rule",
|
|
@@ -8106,7 +8129,7 @@ var Max = {
|
|
|
8106
8129
|
Node: MaxNode
|
|
8107
8130
|
};
|
|
8108
8131
|
|
|
8109
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8132
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/maxLength.js
|
|
8110
8133
|
var implementation7 = implementNode({
|
|
8111
8134
|
kind: "maxLength",
|
|
8112
8135
|
collapsibleKey: "rule",
|
|
@@ -8149,7 +8172,7 @@ var MaxLength = {
|
|
|
8149
8172
|
Node: MaxLengthNode
|
|
8150
8173
|
};
|
|
8151
8174
|
|
|
8152
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8175
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/min.js
|
|
8153
8176
|
var implementation8 = implementNode({
|
|
8154
8177
|
kind: "min",
|
|
8155
8178
|
collapsibleKey: "rule",
|
|
@@ -8188,7 +8211,7 @@ var Min = {
|
|
|
8188
8211
|
Node: MinNode
|
|
8189
8212
|
};
|
|
8190
8213
|
|
|
8191
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8214
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/minLength.js
|
|
8192
8215
|
var implementation9 = implementNode({
|
|
8193
8216
|
kind: "minLength",
|
|
8194
8217
|
collapsibleKey: "rule",
|
|
@@ -8230,7 +8253,7 @@ var MinLength = {
|
|
|
8230
8253
|
Node: MinLengthNode
|
|
8231
8254
|
};
|
|
8232
8255
|
|
|
8233
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8256
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/kinds.js
|
|
8234
8257
|
var boundImplementationsByKind = {
|
|
8235
8258
|
min: Min.implementation,
|
|
8236
8259
|
max: Max.implementation,
|
|
@@ -8250,7 +8273,7 @@ var boundClassesByKind = {
|
|
|
8250
8273
|
before: Before.Node
|
|
8251
8274
|
};
|
|
8252
8275
|
|
|
8253
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8276
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/refinements/pattern.js
|
|
8254
8277
|
var implementation10 = implementNode({
|
|
8255
8278
|
kind: "pattern",
|
|
8256
8279
|
collapsibleKey: "rule",
|
|
@@ -8295,7 +8318,7 @@ var Pattern = {
|
|
|
8295
8318
|
Node: PatternNode
|
|
8296
8319
|
};
|
|
8297
8320
|
|
|
8298
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8321
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/parse.js
|
|
8299
8322
|
var schemaKindOf = (schema, allowedKinds) => {
|
|
8300
8323
|
const kind = discriminateRootKind(schema);
|
|
8301
8324
|
if (allowedKinds && !allowedKinds.includes(kind)) {
|
|
@@ -8476,7 +8499,7 @@ var possiblyCollapse = (json, toKey, allowPrimitive) => {
|
|
|
8476
8499
|
return json;
|
|
8477
8500
|
};
|
|
8478
8501
|
|
|
8479
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8502
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/prop.js
|
|
8480
8503
|
var intersectProps = (l, r, ctx) => {
|
|
8481
8504
|
if (l.key !== r.key)
|
|
8482
8505
|
return null;
|
|
@@ -8543,7 +8566,7 @@ class BaseProp extends BaseConstraint {
|
|
|
8543
8566
|
}
|
|
8544
8567
|
var writeDefaultIntersectionMessage = (lValue, rValue) => `Invalid intersection of default values ${printable(lValue)} & ${printable(rValue)}`;
|
|
8545
8568
|
|
|
8546
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8569
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/optional.js
|
|
8547
8570
|
var implementation11 = implementNode({
|
|
8548
8571
|
kind: "optional",
|
|
8549
8572
|
hasAssociatedError: false,
|
|
@@ -8580,6 +8603,14 @@ class OptionalNode extends BaseProp {
|
|
|
8580
8603
|
if ("default" in this.inner)
|
|
8581
8604
|
assertDefaultValueAssignability(this.value, this.inner.default, this.key);
|
|
8582
8605
|
}
|
|
8606
|
+
get rawIn() {
|
|
8607
|
+
const baseIn = super.rawIn;
|
|
8608
|
+
if (!this.hasDefault())
|
|
8609
|
+
return baseIn;
|
|
8610
|
+
return this.$.node("optional", omit(baseIn.inner, { default: true }), {
|
|
8611
|
+
prereduced: true
|
|
8612
|
+
});
|
|
8613
|
+
}
|
|
8583
8614
|
get outProp() {
|
|
8584
8615
|
if (!this.hasDefault())
|
|
8585
8616
|
return this;
|
|
@@ -8639,12 +8670,18 @@ var writeNonPrimitiveNonFunctionDefaultValueMessage = (key) => {
|
|
|
8639
8670
|
return `Non-primitive default ${keyDescription}must be specified as a function like () => ({my: 'object'})`;
|
|
8640
8671
|
};
|
|
8641
8672
|
|
|
8642
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
8673
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/root.js
|
|
8643
8674
|
class BaseRoot extends BaseNode {
|
|
8644
8675
|
constructor(attachments, $) {
|
|
8645
8676
|
super(attachments, $);
|
|
8646
8677
|
Object.defineProperty(this, arkKind, { value: "root", enumerable: false });
|
|
8647
8678
|
}
|
|
8679
|
+
get rawIn() {
|
|
8680
|
+
return super.rawIn;
|
|
8681
|
+
}
|
|
8682
|
+
get rawOut() {
|
|
8683
|
+
return super.rawOut;
|
|
8684
|
+
}
|
|
8648
8685
|
get internal() {
|
|
8649
8686
|
return this;
|
|
8650
8687
|
}
|
|
@@ -8663,8 +8700,8 @@ class BaseRoot extends BaseNode {
|
|
|
8663
8700
|
return throwParseError(`JSONSchema target '${opts.target}' is not supported (must be "draft-2020-12")`);
|
|
8664
8701
|
}
|
|
8665
8702
|
if (opts.io === "input")
|
|
8666
|
-
return this.
|
|
8667
|
-
return this.
|
|
8703
|
+
return this.rawIn.toJsonSchema();
|
|
8704
|
+
return this.rawOut.toJsonSchema();
|
|
8668
8705
|
}
|
|
8669
8706
|
};
|
|
8670
8707
|
}
|
|
@@ -8790,7 +8827,7 @@ class BaseRoot extends BaseNode {
|
|
|
8790
8827
|
return structure.props;
|
|
8791
8828
|
const structuralMethodName = operation === "required" ? "require" : operation === "partial" ? "optionalize" : operation;
|
|
8792
8829
|
return this.$.node("intersection", {
|
|
8793
|
-
|
|
8830
|
+
domain: "object",
|
|
8794
8831
|
structure: structure[structuralMethodName](...args2)
|
|
8795
8832
|
});
|
|
8796
8833
|
});
|
|
@@ -8905,7 +8942,7 @@ class BaseRoot extends BaseNode {
|
|
|
8905
8942
|
if (constraint.isRoot()) {
|
|
8906
8943
|
return constraint.isUnknown() ? this : throwInternalError(`Unexpected constraint node ${constraint}`);
|
|
8907
8944
|
}
|
|
8908
|
-
const operand = io === "root" ? this : this
|
|
8945
|
+
const operand = io === "root" ? this : io === "in" ? this.rawIn : this.rawOut;
|
|
8909
8946
|
if (operand.hasKind("morph") || constraint.impliedBasis && !operand.extends(constraint.impliedBasis)) {
|
|
8910
8947
|
return throwInvalidOperandError(kind, constraint.impliedBasis, this);
|
|
8911
8948
|
}
|
|
@@ -9005,13 +9042,13 @@ var writeLiteralUnionEntriesMessage = (expression) => `Props cannot be extracted
|
|
|
9005
9042
|
${expression}`;
|
|
9006
9043
|
var writeNonStructuralOperandMessage = (operation, operand) => `${operation} operand must be an object (was ${operand})`;
|
|
9007
9044
|
|
|
9008
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9045
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/utils.js
|
|
9009
9046
|
var defineRightwardIntersections = (kind, implementation12) => flatMorph(schemaKindsRightOf(kind), (i, kind2) => [
|
|
9010
9047
|
kind2,
|
|
9011
9048
|
implementation12
|
|
9012
9049
|
]);
|
|
9013
9050
|
|
|
9014
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9051
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/alias.js
|
|
9015
9052
|
var normalizeAliasSchema = (schema) => typeof schema === "string" ? { reference: schema } : schema;
|
|
9016
9053
|
var neverIfDisjoint = (result) => result instanceof Disjoint ? $ark.intrinsic.never.internal : result;
|
|
9017
9054
|
var implementation12 = implementNode({
|
|
@@ -9119,7 +9156,7 @@ var Alias = {
|
|
|
9119
9156
|
Node: AliasNode
|
|
9120
9157
|
};
|
|
9121
9158
|
|
|
9122
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9159
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/basis.js
|
|
9123
9160
|
class InternalBasis extends BaseRoot {
|
|
9124
9161
|
traverseApply = (data, ctx) => {
|
|
9125
9162
|
if (!this.traverseAllows(data, ctx))
|
|
@@ -9140,12 +9177,12 @@ class InternalBasis extends BaseRoot {
|
|
|
9140
9177
|
if (js.traversalKind === "Allows")
|
|
9141
9178
|
js.return(this.compiledCondition);
|
|
9142
9179
|
else {
|
|
9143
|
-
js.if(this.compiledNegation, () => js.line(
|
|
9180
|
+
js.if(this.compiledNegation, () => js.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`));
|
|
9144
9181
|
}
|
|
9145
9182
|
}
|
|
9146
9183
|
}
|
|
9147
9184
|
|
|
9148
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9185
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/domain.js
|
|
9149
9186
|
var implementation13 = implementNode({
|
|
9150
9187
|
kind: "domain",
|
|
9151
9188
|
hasAssociatedError: true,
|
|
@@ -9196,7 +9233,7 @@ var Domain = {
|
|
|
9196
9233
|
writeBadAllowNanMessage: (actual) => `numberAllowsNaN may only be specified with domain "number" (was ${actual})`
|
|
9197
9234
|
};
|
|
9198
9235
|
|
|
9199
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9236
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/intersection.js
|
|
9200
9237
|
var implementation14 = implementNode({
|
|
9201
9238
|
kind: "intersection",
|
|
9202
9239
|
hasAssociatedError: true,
|
|
@@ -9295,10 +9332,10 @@ var implementation14 = implementNode({
|
|
|
9295
9332
|
if (node.structure)
|
|
9296
9333
|
return node.structure.description;
|
|
9297
9334
|
const childDescriptions = [];
|
|
9298
|
-
if (node.basis && !node.
|
|
9335
|
+
if (node.basis && !node.prestructurals.some((r) => r.impl.obviatesBasisDescription))
|
|
9299
9336
|
childDescriptions.push(node.basis.description);
|
|
9300
|
-
if (node.
|
|
9301
|
-
const sortedRefinementDescriptions = node.
|
|
9337
|
+
if (node.prestructurals.length) {
|
|
9338
|
+
const sortedRefinementDescriptions = node.prestructurals.toSorted((l, r) => l.kind === "min" && r.kind === "max" ? -1 : 0).map((r) => r.description);
|
|
9302
9339
|
childDescriptions.push(...sortedRefinementDescriptions);
|
|
9303
9340
|
}
|
|
9304
9341
|
if (node.inner.predicate) {
|
|
@@ -9326,7 +9363,14 @@ ${ctx.expected}`
|
|
|
9326
9363
|
|
|
9327
9364
|
class IntersectionNode extends BaseRoot {
|
|
9328
9365
|
basis = this.inner.domain ?? this.inner.proto ?? null;
|
|
9329
|
-
|
|
9366
|
+
prestructurals = [];
|
|
9367
|
+
refinements = this.children.filter((node) => {
|
|
9368
|
+
if (!node.isRefinement())
|
|
9369
|
+
return false;
|
|
9370
|
+
if (includes(prestructuralKinds, node.kind))
|
|
9371
|
+
this.prestructurals.push(node);
|
|
9372
|
+
return true;
|
|
9373
|
+
});
|
|
9330
9374
|
structure = this.inner.structure;
|
|
9331
9375
|
expression = writeIntersectionExpression(this);
|
|
9332
9376
|
get shallowMorphs() {
|
|
@@ -9346,13 +9390,13 @@ class IntersectionNode extends BaseRoot {
|
|
|
9346
9390
|
if (ctx.currentErrorCount > errorCount)
|
|
9347
9391
|
return;
|
|
9348
9392
|
}
|
|
9349
|
-
if (this.
|
|
9350
|
-
for (let i = 0;i < this.
|
|
9351
|
-
this.
|
|
9393
|
+
if (this.prestructurals.length) {
|
|
9394
|
+
for (let i = 0;i < this.prestructurals.length - 1; i++) {
|
|
9395
|
+
this.prestructurals[i].traverseApply(data, ctx);
|
|
9352
9396
|
if (ctx.failFast && ctx.currentErrorCount > errorCount)
|
|
9353
9397
|
return;
|
|
9354
9398
|
}
|
|
9355
|
-
this.
|
|
9399
|
+
this.prestructurals.at(-1).traverseApply(data, ctx);
|
|
9356
9400
|
if (ctx.currentErrorCount > errorCount)
|
|
9357
9401
|
return;
|
|
9358
9402
|
}
|
|
@@ -9383,12 +9427,12 @@ class IntersectionNode extends BaseRoot {
|
|
|
9383
9427
|
if (this.children.length > 1)
|
|
9384
9428
|
js.returnIfFail();
|
|
9385
9429
|
}
|
|
9386
|
-
if (this.
|
|
9387
|
-
for (let i = 0;i < this.
|
|
9388
|
-
js.check(this.
|
|
9430
|
+
if (this.prestructurals.length) {
|
|
9431
|
+
for (let i = 0;i < this.prestructurals.length - 1; i++) {
|
|
9432
|
+
js.check(this.prestructurals[i]);
|
|
9389
9433
|
js.returnIfFailFast();
|
|
9390
9434
|
}
|
|
9391
|
-
js.check(this.
|
|
9435
|
+
js.check(this.prestructurals.at(-1));
|
|
9392
9436
|
if (this.structure || this.inner.predicate)
|
|
9393
9437
|
js.returnIfFail();
|
|
9394
9438
|
}
|
|
@@ -9411,10 +9455,14 @@ var Intersection = {
|
|
|
9411
9455
|
Node: IntersectionNode
|
|
9412
9456
|
};
|
|
9413
9457
|
var writeIntersectionExpression = (node) => {
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9458
|
+
if (node.structure?.expression)
|
|
9459
|
+
return node.structure.expression;
|
|
9460
|
+
const basisExpression = node.basis && !node.prestructurals.some((n) => n.impl.obviatesBasisExpression) ? node.basis.nestableExpression : "";
|
|
9461
|
+
const refinementsExpression = node.prestructurals.map((n) => n.expression).join(" & ");
|
|
9462
|
+
const fullExpression = `${basisExpression}${basisExpression ? " " : ""}${refinementsExpression}`;
|
|
9463
|
+
if (fullExpression === "Array == 0")
|
|
9464
|
+
return "[]";
|
|
9465
|
+
return fullExpression || "unknown";
|
|
9418
9466
|
};
|
|
9419
9467
|
var intersectIntersections = (l, r, ctx) => {
|
|
9420
9468
|
const baseInner = {};
|
|
@@ -9435,7 +9483,7 @@ var intersectIntersections = (l, r, ctx) => {
|
|
|
9435
9483
|
});
|
|
9436
9484
|
};
|
|
9437
9485
|
|
|
9438
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9486
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/morph.js
|
|
9439
9487
|
var implementation15 = implementNode({
|
|
9440
9488
|
kind: "morph",
|
|
9441
9489
|
hasAssociatedError: false,
|
|
@@ -9459,28 +9507,28 @@ var implementation15 = implementNode({
|
|
|
9459
9507
|
},
|
|
9460
9508
|
normalize: (schema) => schema,
|
|
9461
9509
|
defaults: {
|
|
9462
|
-
description: (node) => `a morph from ${node.
|
|
9510
|
+
description: (node) => `a morph from ${node.rawIn.description} to ${node.rawOut?.description ?? "unknown"}`
|
|
9463
9511
|
},
|
|
9464
9512
|
intersections: {
|
|
9465
9513
|
morph: (l, r, ctx) => {
|
|
9466
9514
|
if (!l.hasEqualMorphs(r)) {
|
|
9467
9515
|
return throwParseError(writeMorphIntersectionMessage(l.expression, r.expression));
|
|
9468
9516
|
}
|
|
9469
|
-
const inTersection = intersectOrPipeNodes(l.
|
|
9517
|
+
const inTersection = intersectOrPipeNodes(l.rawIn, r.rawIn, ctx);
|
|
9470
9518
|
if (inTersection instanceof Disjoint)
|
|
9471
9519
|
return inTersection;
|
|
9472
9520
|
const baseInner = {
|
|
9473
9521
|
morphs: l.morphs
|
|
9474
9522
|
};
|
|
9475
9523
|
if (l.declaredIn || r.declaredIn) {
|
|
9476
|
-
const declaredIn = intersectOrPipeNodes(l.
|
|
9524
|
+
const declaredIn = intersectOrPipeNodes(l.rawIn, r.rawIn, ctx);
|
|
9477
9525
|
if (declaredIn instanceof Disjoint)
|
|
9478
9526
|
return declaredIn.throw();
|
|
9479
9527
|
else
|
|
9480
9528
|
baseInner.declaredIn = declaredIn;
|
|
9481
9529
|
}
|
|
9482
9530
|
if (l.declaredOut || r.declaredOut) {
|
|
9483
|
-
const declaredOut = intersectOrPipeNodes(l.
|
|
9531
|
+
const declaredOut = intersectOrPipeNodes(l.rawOut, r.rawOut, ctx);
|
|
9484
9532
|
if (declaredOut instanceof Disjoint)
|
|
9485
9533
|
return declaredOut.throw();
|
|
9486
9534
|
else
|
|
@@ -9507,14 +9555,14 @@ class MorphNode extends BaseRoot {
|
|
|
9507
9555
|
lastMorph = this.inner.morphs.at(-1);
|
|
9508
9556
|
lastMorphIfNode = hasArkKind(this.lastMorph, "root") ? this.lastMorph : undefined;
|
|
9509
9557
|
introspectableIn = this.inner.in;
|
|
9510
|
-
introspectableOut = this.lastMorphIfNode ? Object.assign(this.referencesById, this.lastMorphIfNode.referencesById) && this.lastMorphIfNode.
|
|
9558
|
+
introspectableOut = this.lastMorphIfNode ? Object.assign(this.referencesById, this.lastMorphIfNode.referencesById) && this.lastMorphIfNode.rawOut : undefined;
|
|
9511
9559
|
get shallowMorphs() {
|
|
9512
9560
|
return Array.isArray(this.inner.in?.shallowMorphs) ? [...this.inner.in.shallowMorphs, ...this.morphs] : this.morphs;
|
|
9513
9561
|
}
|
|
9514
|
-
get
|
|
9515
|
-
return this.declaredIn ?? this.inner.in?.
|
|
9562
|
+
get rawIn() {
|
|
9563
|
+
return this.declaredIn ?? this.inner.in?.rawIn ?? $ark.intrinsic.unknown.internal;
|
|
9516
9564
|
}
|
|
9517
|
-
get
|
|
9565
|
+
get rawOut() {
|
|
9518
9566
|
return this.declaredOut ?? this.introspectableOut ?? $ark.intrinsic.unknown.internal;
|
|
9519
9567
|
}
|
|
9520
9568
|
declareIn(declaredIn) {
|
|
@@ -9529,14 +9577,14 @@ class MorphNode extends BaseRoot {
|
|
|
9529
9577
|
declaredOut
|
|
9530
9578
|
});
|
|
9531
9579
|
}
|
|
9532
|
-
expression = `(In: ${this.
|
|
9580
|
+
expression = `(In: ${this.rawIn.expression}) => ${this.lastMorphIfNode ? "To" : "Out"}<${this.rawOut.expression}>`;
|
|
9533
9581
|
get defaultShortDescription() {
|
|
9534
|
-
return this.
|
|
9582
|
+
return this.rawIn.meta.description ?? this.rawIn.defaultShortDescription;
|
|
9535
9583
|
}
|
|
9536
9584
|
innerToJsonSchema(ctx) {
|
|
9537
9585
|
return ctx.fallback.morph({
|
|
9538
9586
|
code: "morph",
|
|
9539
|
-
base: this.
|
|
9587
|
+
base: this.rawIn.toJsonSchemaRecurse(ctx),
|
|
9540
9588
|
out: this.introspectableOut?.toJsonSchemaRecurse(ctx) ?? null
|
|
9541
9589
|
});
|
|
9542
9590
|
}
|
|
@@ -9571,7 +9619,7 @@ var writeMorphIntersectionMessage = (lDescription, rDescription) => `The interse
|
|
|
9571
9619
|
Left: ${lDescription}
|
|
9572
9620
|
Right: ${rDescription}`;
|
|
9573
9621
|
|
|
9574
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9622
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/proto.js
|
|
9575
9623
|
var implementation16 = implementNode({
|
|
9576
9624
|
kind: "proto",
|
|
9577
9625
|
hasAssociatedError: true,
|
|
@@ -9644,7 +9692,7 @@ var Proto = {
|
|
|
9644
9692
|
writeInvalidSchemaMessage: (actual) => `instanceOf operand must be a function (was ${domainOf(actual)})`
|
|
9645
9693
|
};
|
|
9646
9694
|
|
|
9647
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
9695
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/union.js
|
|
9648
9696
|
var implementation17 = implementNode({
|
|
9649
9697
|
kind: "union",
|
|
9650
9698
|
hasAssociatedError: true,
|
|
@@ -9666,7 +9714,7 @@ var implementation17 = implementNode({
|
|
|
9666
9714
|
const matchingMorph = branches[matchingMorphIndex];
|
|
9667
9715
|
branches[matchingMorphIndex] = ctx.$.node("morph", {
|
|
9668
9716
|
...matchingMorph.inner,
|
|
9669
|
-
in: matchingMorph.
|
|
9717
|
+
in: matchingMorph.rawIn.rawOr(node.rawIn)
|
|
9670
9718
|
});
|
|
9671
9719
|
}
|
|
9672
9720
|
} else
|
|
@@ -9706,7 +9754,12 @@ var implementation17 = implementNode({
|
|
|
9706
9754
|
return describeBranches(pathDescriptions);
|
|
9707
9755
|
},
|
|
9708
9756
|
problem: (ctx) => ctx.expected,
|
|
9709
|
-
message: (ctx) =>
|
|
9757
|
+
message: (ctx) => {
|
|
9758
|
+
if (ctx.problem[0] === "[") {
|
|
9759
|
+
return `value at ${ctx.problem}`;
|
|
9760
|
+
}
|
|
9761
|
+
return ctx.problem;
|
|
9762
|
+
}
|
|
9710
9763
|
},
|
|
9711
9764
|
intersections: {
|
|
9712
9765
|
union: (l, r, ctx) => {
|
|
@@ -9759,7 +9812,7 @@ class UnionNode extends BaseRoot {
|
|
|
9759
9812
|
}
|
|
9760
9813
|
return branchGroups;
|
|
9761
9814
|
}
|
|
9762
|
-
unitBranches = this.branches.filter((n) => n.
|
|
9815
|
+
unitBranches = this.branches.filter((n) => n.rawIn.hasKind("unit"));
|
|
9763
9816
|
discriminant = this.discriminate();
|
|
9764
9817
|
discriminantJson = this.discriminant ? discriminantToJson(this.discriminant) : null;
|
|
9765
9818
|
expression = this.distribute((n) => n.nestableExpression, expressBranches);
|
|
@@ -9832,7 +9885,19 @@ class UnionNode extends BaseRoot {
|
|
|
9832
9885
|
for (const k in cases) {
|
|
9833
9886
|
const v = cases[k];
|
|
9834
9887
|
const caseCondition = k === "default" ? k : `case ${k}`;
|
|
9835
|
-
|
|
9888
|
+
let caseResult;
|
|
9889
|
+
if (v === true)
|
|
9890
|
+
caseResult = optimistic ? "data" : "true";
|
|
9891
|
+
else if (optimistic) {
|
|
9892
|
+
if (v.rootApplyStrategy === "branchedOptimistic")
|
|
9893
|
+
caseResult = js.invoke(v, { kind: "Optimistic" });
|
|
9894
|
+
else if (v.contextFreeMorph)
|
|
9895
|
+
caseResult = `${js.invoke(v)} ? ${registeredReference(v.contextFreeMorph)}(data) : "${unset}"`;
|
|
9896
|
+
else
|
|
9897
|
+
caseResult = `${js.invoke(v)} ? data : "${unset}"`;
|
|
9898
|
+
} else
|
|
9899
|
+
caseResult = js.invoke(v);
|
|
9900
|
+
js.line(`${caseCondition}: return ${caseResult}`);
|
|
9836
9901
|
}
|
|
9837
9902
|
return js;
|
|
9838
9903
|
});
|
|
@@ -9866,7 +9931,7 @@ class UnionNode extends BaseRoot {
|
|
|
9866
9931
|
const { optimistic } = js;
|
|
9867
9932
|
js.optimistic = false;
|
|
9868
9933
|
for (const branch of this.branches) {
|
|
9869
|
-
js.if(`${js.invoke(branch)}`, () => js.return(optimistic ? branch.contextFreeMorph ? `${registeredReference(branch.contextFreeMorph)}(
|
|
9934
|
+
js.if(`${js.invoke(branch)}`, () => js.return(optimistic ? branch.contextFreeMorph ? `${registeredReference(branch.contextFreeMorph)}(data)` : "data" : true));
|
|
9870
9935
|
}
|
|
9871
9936
|
js.return(optimistic ? `"${unset}"` : false);
|
|
9872
9937
|
}
|
|
@@ -9879,7 +9944,7 @@ class UnionNode extends BaseRoot {
|
|
|
9879
9944
|
return null;
|
|
9880
9945
|
if (this.unitBranches.length === this.branches.length) {
|
|
9881
9946
|
const cases2 = flatMorph(this.unitBranches, (i, n) => [
|
|
9882
|
-
`${n.
|
|
9947
|
+
`${n.rawIn.serializedValue}`,
|
|
9883
9948
|
n.hasKind("morph") ? n : true
|
|
9884
9949
|
]);
|
|
9885
9950
|
return {
|
|
@@ -9894,7 +9959,7 @@ class UnionNode extends BaseRoot {
|
|
|
9894
9959
|
const l = this.branches[lIndex];
|
|
9895
9960
|
for (let rIndex = lIndex + 1;rIndex < this.branches.length; rIndex++) {
|
|
9896
9961
|
const r = this.branches[rIndex];
|
|
9897
|
-
const result = intersectNodesRoot(l.
|
|
9962
|
+
const result = intersectNodesRoot(l.rawIn, r.rawIn, l.$);
|
|
9898
9963
|
if (!(result instanceof Disjoint))
|
|
9899
9964
|
continue;
|
|
9900
9965
|
for (const entry of result) {
|
|
@@ -9949,10 +10014,10 @@ class UnionNode extends BaseRoot {
|
|
|
9949
10014
|
}
|
|
9950
10015
|
}
|
|
9951
10016
|
}
|
|
9952
|
-
const
|
|
9953
|
-
if (!
|
|
10017
|
+
const viableCandidates = this.ordered ? viableOrderedCandidates(candidates, this.branches) : candidates;
|
|
10018
|
+
if (!viableCandidates.length)
|
|
9954
10019
|
return null;
|
|
9955
|
-
const ctx = createCaseResolutionContext(
|
|
10020
|
+
const ctx = createCaseResolutionContext(viableCandidates, this);
|
|
9956
10021
|
const cases = {};
|
|
9957
10022
|
for (const k in ctx.best.cases) {
|
|
9958
10023
|
const resolution = resolveCase(ctx, k);
|
|
@@ -9982,8 +10047,9 @@ class UnionNode extends BaseRoot {
|
|
|
9982
10047
|
});
|
|
9983
10048
|
}
|
|
9984
10049
|
}
|
|
9985
|
-
var createCaseResolutionContext = (
|
|
9986
|
-
const
|
|
10050
|
+
var createCaseResolutionContext = (viableCandidates, node) => {
|
|
10051
|
+
const ordered = viableCandidates.sort((l, r) => l.path.length === r.path.length ? Object.keys(r.cases).length - Object.keys(l.cases).length : l.path.length - r.path.length);
|
|
10052
|
+
const best = ordered[0];
|
|
9987
10053
|
const location = {
|
|
9988
10054
|
kind: best.kind,
|
|
9989
10055
|
path: best.path,
|
|
@@ -10020,7 +10086,7 @@ var resolveCase = (ctx, key) => {
|
|
|
10020
10086
|
} else if (entry.branch.hasKind("alias") && discriminantNode.hasKind("domain") && discriminantNode.domain === "object")
|
|
10021
10087
|
resolvedEntries?.push(entry);
|
|
10022
10088
|
else {
|
|
10023
|
-
if (entry.branch.
|
|
10089
|
+
if (entry.branch.rawIn.overlaps(discriminantNode)) {
|
|
10024
10090
|
const overlapping = pruneDiscriminant(entry.branch, ctx.location);
|
|
10025
10091
|
resolvedEntries?.push({
|
|
10026
10092
|
originalIndex: entry.originalIndex,
|
|
@@ -10033,7 +10099,7 @@ var resolveCase = (ctx, key) => {
|
|
|
10033
10099
|
ctx.defaultEntries = nextDefaults;
|
|
10034
10100
|
return resolvedEntries;
|
|
10035
10101
|
};
|
|
10036
|
-
var
|
|
10102
|
+
var viableOrderedCandidates = (candidates, originalBranches) => {
|
|
10037
10103
|
const viableCandidates = candidates.filter((candidate) => {
|
|
10038
10104
|
const caseGroups = Object.values(candidate.cases).map((caseCtx) => caseCtx.branchIndices);
|
|
10039
10105
|
for (let i = 0;i < caseGroups.length - 1; i++) {
|
|
@@ -10148,14 +10214,14 @@ var reduceBranches = ({ branches, ordered }) => {
|
|
|
10148
10214
|
uniquenessByIndex[j] = false;
|
|
10149
10215
|
continue;
|
|
10150
10216
|
}
|
|
10151
|
-
const intersection = intersectNodesRoot(branches[i].
|
|
10217
|
+
const intersection = intersectNodesRoot(branches[i].rawIn, branches[j].rawIn, branches[0].$);
|
|
10152
10218
|
if (intersection instanceof Disjoint)
|
|
10153
10219
|
continue;
|
|
10154
10220
|
if (!ordered)
|
|
10155
10221
|
assertDeterminateOverlap(branches[i], branches[j]);
|
|
10156
|
-
if (intersection.equals(branches[i].
|
|
10222
|
+
if (intersection.equals(branches[i].rawIn)) {
|
|
10157
10223
|
uniquenessByIndex[i] = !!ordered;
|
|
10158
|
-
} else if (intersection.equals(branches[j].
|
|
10224
|
+
} else if (intersection.equals(branches[j].rawIn))
|
|
10159
10225
|
uniquenessByIndex[j] = false;
|
|
10160
10226
|
}
|
|
10161
10227
|
}
|
|
@@ -10196,7 +10262,7 @@ var writeOrderedIntersectionMessage = (lDescription, rDescription) => `The inter
|
|
|
10196
10262
|
Left: ${lDescription}
|
|
10197
10263
|
Right: ${rDescription}`;
|
|
10198
10264
|
|
|
10199
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
10265
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/roots/unit.js
|
|
10200
10266
|
var implementation18 = implementNode({
|
|
10201
10267
|
kind: "unit",
|
|
10202
10268
|
hasAssociatedError: true,
|
|
@@ -10258,7 +10324,7 @@ var compileEqualityCheck = (unit, serializedValue, negated) => {
|
|
|
10258
10324
|
return `data ${negated ? "!" : "="}== ${serializedValue}`;
|
|
10259
10325
|
};
|
|
10260
10326
|
|
|
10261
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
10327
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/index.js
|
|
10262
10328
|
var implementation19 = implementNode({
|
|
10263
10329
|
kind: "index",
|
|
10264
10330
|
hasAssociatedError: false,
|
|
@@ -10335,7 +10401,7 @@ var Index = {
|
|
|
10335
10401
|
var writeEnumerableIndexBranches = (keys2) => `Index keys ${keys2.join(", ")} should be specified as named props.`;
|
|
10336
10402
|
var writeInvalidPropertyKeyMessage = (indexSchema) => `Indexed key definition '${indexSchema}' must be a string or symbol`;
|
|
10337
10403
|
|
|
10338
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
10404
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/required.js
|
|
10339
10405
|
var implementation20 = implementNode({
|
|
10340
10406
|
kind: "required",
|
|
10341
10407
|
hasAssociatedError: true,
|
|
@@ -10374,7 +10440,7 @@ var Required = {
|
|
|
10374
10440
|
Node: RequiredNode
|
|
10375
10441
|
};
|
|
10376
10442
|
|
|
10377
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
10443
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/sequence.js
|
|
10378
10444
|
var implementation21 = implementNode({
|
|
10379
10445
|
kind: "sequence",
|
|
10380
10446
|
hasAssociatedError: false,
|
|
@@ -10410,7 +10476,15 @@ var implementation21 = implementNode({
|
|
|
10410
10476
|
serialize: (defaults) => defaults.map((element) => [
|
|
10411
10477
|
element[0].collapsibleJson,
|
|
10412
10478
|
defaultValueSerializer(element[1])
|
|
10413
|
-
])
|
|
10479
|
+
]),
|
|
10480
|
+
reduceIo: (ioKind, inner, defaultables) => {
|
|
10481
|
+
if (ioKind === "in") {
|
|
10482
|
+
inner.optionals = defaultables.map((d) => d[0].rawIn);
|
|
10483
|
+
return;
|
|
10484
|
+
}
|
|
10485
|
+
inner.prefix = defaultables.map((d) => d[0].rawOut);
|
|
10486
|
+
return;
|
|
10487
|
+
}
|
|
10414
10488
|
},
|
|
10415
10489
|
variadic: {
|
|
10416
10490
|
child: true,
|
|
@@ -10570,12 +10644,12 @@ class SequenceNode extends BaseConstraint {
|
|
|
10570
10644
|
}
|
|
10571
10645
|
for (const [i, node] of this.defaultablesAndOptionals.entries()) {
|
|
10572
10646
|
const dataIndex = `${i + this.prefixLength}`;
|
|
10573
|
-
js.if(`${dataIndex} >=
|
|
10647
|
+
js.if(`${dataIndex} >= data.length`, () => js.traversalKind === "Allows" ? js.return(true) : js.return());
|
|
10574
10648
|
js.traverseKey(dataIndex, `data[${dataIndex}]`, node);
|
|
10575
10649
|
}
|
|
10576
10650
|
if (this.variadic) {
|
|
10577
10651
|
if (this.postfix) {
|
|
10578
|
-
js.const("firstPostfixIndex",
|
|
10652
|
+
js.const("firstPostfixIndex", `data.length${this.postfix ? `- ${this.postfix.length}` : ""}`);
|
|
10579
10653
|
}
|
|
10580
10654
|
js.for(`i < ${this.postfix ? "firstPostfixIndex" : "data.length"}`, () => js.traverseKey("i", "data[i]", this.variadic), this.prevariadic.length);
|
|
10581
10655
|
if (this.postfix) {
|
|
@@ -10712,7 +10786,7 @@ var _intersectSequences = (s) => {
|
|
|
10712
10786
|
const result = intersectOrPipeNodes(lHead.node, rHead.node, s.ctx);
|
|
10713
10787
|
if (result instanceof Disjoint) {
|
|
10714
10788
|
if (kind === "prefix" || kind === "postfix") {
|
|
10715
|
-
s.disjoint.push(...result.withPrefixKey(kind === "prefix" ? s.result.length : `-${lTail.length + 1}`, "required"));
|
|
10789
|
+
s.disjoint.push(...result.withPrefixKey(kind === "prefix" ? s.result.length : `-${lTail.length + 1}`, elementIsRequired(lHead) && elementIsRequired(rHead) ? "required" : "optional"));
|
|
10716
10790
|
s.result = [...s.result, { kind, node: $ark.intrinsic.never.internal }];
|
|
10717
10791
|
} else if (kind === "optionals" || kind === "defaultables") {
|
|
10718
10792
|
return s;
|
|
@@ -10746,8 +10820,9 @@ var _intersectSequences = (s) => {
|
|
|
10746
10820
|
s.r = rTail;
|
|
10747
10821
|
return _intersectSequences(s);
|
|
10748
10822
|
};
|
|
10823
|
+
var elementIsRequired = (el) => el.kind === "prefix" || el.kind === "postfix";
|
|
10749
10824
|
|
|
10750
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
10825
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/structure.js
|
|
10751
10826
|
var createStructuralWriter = (childStringProp) => (node) => {
|
|
10752
10827
|
if (node.props.length || node.index) {
|
|
10753
10828
|
const parts = node.index?.map((index) => index[childStringProp]) ?? [];
|
|
@@ -10793,7 +10868,7 @@ var implementation22 = implementNode({
|
|
|
10793
10868
|
child: true,
|
|
10794
10869
|
parse: constraintKeyParser("required"),
|
|
10795
10870
|
reduceIo: (ioKind, inner, nodes) => {
|
|
10796
|
-
inner.required = append(inner.required, nodes.map((node) => node
|
|
10871
|
+
inner.required = append(inner.required, nodes.map((node) => ioKind === "in" ? node.rawIn : node.rawOut));
|
|
10797
10872
|
return;
|
|
10798
10873
|
}
|
|
10799
10874
|
},
|
|
@@ -10802,11 +10877,11 @@ var implementation22 = implementNode({
|
|
|
10802
10877
|
parse: constraintKeyParser("optional"),
|
|
10803
10878
|
reduceIo: (ioKind, inner, nodes) => {
|
|
10804
10879
|
if (ioKind === "in") {
|
|
10805
|
-
inner.optional = nodes.map((node) => node.
|
|
10880
|
+
inner.optional = nodes.map((node) => node.rawIn);
|
|
10806
10881
|
return;
|
|
10807
10882
|
}
|
|
10808
10883
|
for (const node of nodes) {
|
|
10809
|
-
inner[node.outProp.kind] = append(inner[node.outProp.kind], node.outProp.
|
|
10884
|
+
inner[node.outProp.kind] = append(inner[node.outProp.kind], node.outProp.rawOut);
|
|
10810
10885
|
}
|
|
10811
10886
|
}
|
|
10812
10887
|
},
|
|
@@ -10821,8 +10896,10 @@ var implementation22 = implementNode({
|
|
|
10821
10896
|
undeclared: {
|
|
10822
10897
|
parse: (behavior) => behavior === "ignore" ? undefined : behavior,
|
|
10823
10898
|
reduceIo: (ioKind, inner, value) => {
|
|
10824
|
-
if (value
|
|
10899
|
+
if (value === "reject") {
|
|
10900
|
+
inner.undeclared = "reject";
|
|
10825
10901
|
return;
|
|
10902
|
+
}
|
|
10826
10903
|
if (ioKind === "in")
|
|
10827
10904
|
delete inner.undeclared;
|
|
10828
10905
|
else
|
|
@@ -11279,8 +11356,8 @@ class StructureNode extends BaseConstraint {
|
|
|
11279
11356
|
if (keyBranch.hasKind("morph")) {
|
|
11280
11357
|
keySchema = ctx.fallback.morph({
|
|
11281
11358
|
code: "morph",
|
|
11282
|
-
base: keyBranch.
|
|
11283
|
-
out: keyBranch.
|
|
11359
|
+
base: keyBranch.rawIn.toJsonSchemaRecurse(ctx),
|
|
11360
|
+
out: keyBranch.rawOut.toJsonSchemaRecurse(ctx)
|
|
11284
11361
|
});
|
|
11285
11362
|
}
|
|
11286
11363
|
if (!keyBranch.hasKind("intersection")) {
|
|
@@ -11412,7 +11489,7 @@ var normalizeIndex = (signature, value, $) => {
|
|
|
11412
11489
|
var typeKeyToString = (k) => hasArkKind(k, "root") ? k.expression : printable(k);
|
|
11413
11490
|
var writeInvalidKeysMessage = (o, keys2) => `Key${keys2.length === 1 ? "" : "s"} ${keys2.map(typeKeyToString).join(", ")} ${keys2.length === 1 ? "does" : "do"} not exist on ${o}`;
|
|
11414
11491
|
|
|
11415
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
11492
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/kinds.js
|
|
11416
11493
|
var nodeImplementationsByKind = {
|
|
11417
11494
|
...boundImplementationsByKind,
|
|
11418
11495
|
alias: Alias.implementation,
|
|
@@ -11465,7 +11542,7 @@ var nodeClassesByKind = {
|
|
|
11465
11542
|
structure: Structure.Node
|
|
11466
11543
|
};
|
|
11467
11544
|
|
|
11468
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
11545
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/module.js
|
|
11469
11546
|
class RootModule extends DynamicBase {
|
|
11470
11547
|
get [arkKind]() {
|
|
11471
11548
|
return "module";
|
|
@@ -11476,7 +11553,7 @@ var bindModule = (module, $) => new RootModule(flatMorph(module, (alias, value)
|
|
|
11476
11553
|
hasArkKind(value, "module") ? bindModule(value, $) : $.bindReference(value)
|
|
11477
11554
|
]));
|
|
11478
11555
|
|
|
11479
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
11556
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/scope.js
|
|
11480
11557
|
var schemaBranchesOf = (schema) => isArray(schema) ? schema : ("branches" in schema) && isArray(schema.branches) ? schema.branches : undefined;
|
|
11481
11558
|
var throwMismatchedNodeRootError = (expected, actual) => throwParseError(`Node of kind ${actual} is not valid as a ${expected} definition`);
|
|
11482
11559
|
var writeDuplicateAliasError = (alias) => `#${alias} duplicates public alias ${alias}`;
|
|
@@ -11883,12 +11960,12 @@ var node = rootSchemaScope.node;
|
|
|
11883
11960
|
var defineSchema = rootSchemaScope.defineSchema;
|
|
11884
11961
|
var genericNode = rootSchemaScope.generic;
|
|
11885
11962
|
|
|
11886
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
11963
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/structure/shared.js
|
|
11887
11964
|
var arrayIndexSource = `^(?:0|[1-9]\\d*)$`;
|
|
11888
11965
|
var arrayIndexMatcher = new RegExp(arrayIndexSource);
|
|
11889
11966
|
var arrayIndexMatcherReference = registeredReference(arrayIndexMatcher);
|
|
11890
11967
|
|
|
11891
|
-
// ../../node_modules/.pnpm/@ark+schema@0.
|
|
11968
|
+
// ../../node_modules/.pnpm/@ark+schema@0.50.0/node_modules/@ark/schema/out/intrinsic.js
|
|
11892
11969
|
var intrinsicBases = schemaScope({
|
|
11893
11970
|
bigint: "bigint",
|
|
11894
11971
|
boolean: [{ unit: false }, { unit: true }],
|
|
@@ -11940,7 +12017,7 @@ var intrinsic = {
|
|
|
11940
12017
|
emptyStructure: node("structure", {}, { prereduced: true })
|
|
11941
12018
|
};
|
|
11942
12019
|
$ark.intrinsic = { ...intrinsic };
|
|
11943
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12020
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operand/date.js
|
|
11944
12021
|
var isDateLiteral = (value) => typeof value === "string" && value[0] === "d" && (value[1] === "'" || value[1] === '"') && value.at(-1) === value[1];
|
|
11945
12022
|
var isValidDate = (d) => d.toString() !== "Invalid Date";
|
|
11946
12023
|
var extractDateLiteralSource = (literal) => literal.slice(2, -1);
|
|
@@ -11959,9 +12036,9 @@ var maybeParseDate = (source, errorOnFail) => {
|
|
|
11959
12036
|
return errorOnFail ? throwParseError(errorOnFail === true ? writeInvalidDateMessage(source) : errorOnFail) : undefined;
|
|
11960
12037
|
};
|
|
11961
12038
|
|
|
11962
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12039
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operand/enclosed.js
|
|
11963
12040
|
var parseEnclosed = (s, enclosing) => {
|
|
11964
|
-
const enclosed = s.scanner.
|
|
12041
|
+
const enclosed = s.scanner.shiftUntilEscapable(untilLookaheadIsClosing[enclosingTokens[enclosing]]);
|
|
11965
12042
|
if (s.scanner.lookahead === "")
|
|
11966
12043
|
return s.error(writeUnterminatedEnclosedMessage(enclosed, enclosing));
|
|
11967
12044
|
s.scanner.shift();
|
|
@@ -11991,11 +12068,14 @@ var enclosingChar = {
|
|
|
11991
12068
|
"'": 1,
|
|
11992
12069
|
'"': 1
|
|
11993
12070
|
};
|
|
11994
|
-
var
|
|
12071
|
+
var enclosingLiteralTokens = {
|
|
11995
12072
|
"d'": "'",
|
|
11996
12073
|
'd"': '"',
|
|
11997
12074
|
"'": "'",
|
|
11998
|
-
'"': '"'
|
|
12075
|
+
'"': '"'
|
|
12076
|
+
};
|
|
12077
|
+
var enclosingTokens = {
|
|
12078
|
+
...enclosingLiteralTokens,
|
|
11999
12079
|
"/": "/"
|
|
12000
12080
|
};
|
|
12001
12081
|
var untilLookaheadIsClosing = {
|
|
@@ -12010,34 +12090,30 @@ var enclosingCharDescriptions = {
|
|
|
12010
12090
|
};
|
|
12011
12091
|
var writeUnterminatedEnclosedMessage = (fragment2, enclosingStart) => `${enclosingStart}${fragment2} requires a closing ${enclosingCharDescriptions[enclosingTokens[enclosingStart]]}`;
|
|
12012
12092
|
|
|
12013
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12093
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/ast/validate.js
|
|
12014
12094
|
var writePrefixedPrivateReferenceMessage = (name) => `Private type references should not include '#'. Use '${name}' instead.`;
|
|
12015
12095
|
var shallowOptionalMessage = "Optional definitions like 'string?' are only valid as properties in an object or tuple";
|
|
12016
12096
|
var shallowDefaultableMessage = "Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple";
|
|
12017
12097
|
|
|
12018
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12019
|
-
var
|
|
12020
|
-
"
|
|
12021
|
-
"
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
"
|
|
12025
|
-
"
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
"
|
|
12029
|
-
"
|
|
12030
|
-
"
|
|
12031
|
-
"
|
|
12032
|
-
|
|
12033
|
-
};
|
|
12034
|
-
var
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
var writeUnpairableComparatorMessage = (comparator) => `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;
|
|
12038
|
-
var writeMultipleLeftBoundsMessage = (openLimit, openComparator, limit, comparator) => `An expression may have at most one left bound (parsed ${openLimit}${invertedComparators[openComparator]}, ${limit}${invertedComparators[comparator]})`;
|
|
12039
|
-
|
|
12040
|
-
// ../../node_modules/.pnpm/arktype@2.1.22/node_modules/arktype/out/parser/shift/operand/genericArgs.js
|
|
12098
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/tokens.js
|
|
12099
|
+
var terminatingChars = {
|
|
12100
|
+
"<": 1,
|
|
12101
|
+
">": 1,
|
|
12102
|
+
"=": 1,
|
|
12103
|
+
"|": 1,
|
|
12104
|
+
"&": 1,
|
|
12105
|
+
")": 1,
|
|
12106
|
+
"[": 1,
|
|
12107
|
+
"%": 1,
|
|
12108
|
+
",": 1,
|
|
12109
|
+
":": 1,
|
|
12110
|
+
"?": 1,
|
|
12111
|
+
"#": 1,
|
|
12112
|
+
...whitespaceChars
|
|
12113
|
+
};
|
|
12114
|
+
var lookaheadIsFinalizing = (lookahead, unscanned) => lookahead === ">" ? unscanned[0] === "=" ? unscanned[1] === "=" : unscanned.trimStart() === "" || isKeyOf(unscanned.trimStart()[0], terminatingChars) : lookahead === "=" ? unscanned[0] !== "=" : lookahead === "," || lookahead === "?";
|
|
12115
|
+
|
|
12116
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operand/genericArgs.js
|
|
12041
12117
|
var parseGenericArgs = (name, g, s) => _parseGenericArgs(name, g, s, []);
|
|
12042
12118
|
var _parseGenericArgs = (name, g, s, argNodes) => {
|
|
12043
12119
|
const argState = s.parseUntilFinalizer();
|
|
@@ -12054,9 +12130,9 @@ var _parseGenericArgs = (name, g, s, argNodes) => {
|
|
|
12054
12130
|
};
|
|
12055
12131
|
var writeInvalidGenericArgCountMessage = (name, params, argDefs) => `${name}<${params.join(", ")}> requires exactly ${params.length} args (got ${argDefs.length}${argDefs.length === 0 ? "" : `: ${argDefs.join(", ")}`})`;
|
|
12056
12132
|
|
|
12057
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12133
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operand/unenclosed.js
|
|
12058
12134
|
var parseUnenclosed = (s) => {
|
|
12059
|
-
const token = s.scanner.
|
|
12135
|
+
const token = s.scanner.shiftUntilLookahead(terminatingChars);
|
|
12060
12136
|
if (token === "keyof")
|
|
12061
12137
|
s.addPrefix("keyof");
|
|
12062
12138
|
else
|
|
@@ -12070,7 +12146,7 @@ var parseGenericInstantiation = (name, g, s) => {
|
|
|
12070
12146
|
const parsedArgs = parseGenericArgs(name, g, s);
|
|
12071
12147
|
return g(...parsedArgs);
|
|
12072
12148
|
};
|
|
12073
|
-
var unenclosedToNode = (s, token) => maybeParseReference(s, token) ?? maybeParseUnenclosedLiteral(s, token) ?? s.error(token === "" ? s.scanner.lookahead === "#" ? writePrefixedPrivateReferenceMessage(s.shiftedByOne().scanner.
|
|
12149
|
+
var unenclosedToNode = (s, token) => maybeParseReference(s, token) ?? maybeParseUnenclosedLiteral(s, token) ?? s.error(token === "" ? s.scanner.lookahead === "#" ? writePrefixedPrivateReferenceMessage(s.shiftedByOne().scanner.shiftUntilLookahead(terminatingChars)) : writeMissingOperandMessage(s) : writeUnresolvableMessage(token));
|
|
12074
12150
|
var maybeParseReference = (s, token) => {
|
|
12075
12151
|
if (s.ctx.args?.[token]) {
|
|
12076
12152
|
const arg = s.ctx.args[token];
|
|
@@ -12102,41 +12178,30 @@ var writeMissingOperandMessage = (s) => {
|
|
|
12102
12178
|
var writeMissingRightOperandMessage = (token, unscanned = "") => `Token '${token}' requires a right operand${unscanned ? ` before '${unscanned}'` : ""}`;
|
|
12103
12179
|
var writeExpressionExpectedMessage = (unscanned) => `Expected an expression${unscanned ? ` before '${unscanned}'` : ""}`;
|
|
12104
12180
|
|
|
12105
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12181
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operand/operand.js
|
|
12106
12182
|
var parseOperand = (s) => s.scanner.lookahead === "" ? s.error(writeMissingOperandMessage(s)) : s.scanner.lookahead === "(" ? s.shiftedByOne().reduceGroupOpen() : s.scanner.lookaheadIsIn(enclosingChar) ? parseEnclosed(s, s.scanner.shift()) : s.scanner.lookaheadIsIn(whitespaceChars) ? parseOperand(s.shiftedByOne()) : s.scanner.lookahead === "d" ? s.scanner.nextLookahead in enclosingQuote ? parseEnclosed(s, `${s.scanner.shift()}${s.scanner.shift()}`) : parseUnenclosed(s) : parseUnenclosed(s);
|
|
12107
12183
|
|
|
12108
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
...whitespaceChars
|
|
12128
|
-
};
|
|
12129
|
-
static finalizingLookaheads = {
|
|
12130
|
-
">": 1,
|
|
12131
|
-
",": 1,
|
|
12132
|
-
"": 1,
|
|
12133
|
-
"=": 1,
|
|
12134
|
-
"?": 1
|
|
12135
|
-
};
|
|
12136
|
-
static lookaheadIsFinalizing = (lookahead, unscanned) => lookahead === ">" ? unscanned[0] === "=" ? unscanned[1] === "=" : unscanned.trimStart() === "" || isKeyOf(unscanned.trimStart()[0], ArkTypeScanner.terminatingChars) : lookahead === "=" ? unscanned[0] !== "=" : lookahead === "," || lookahead === "?";
|
|
12137
|
-
}
|
|
12184
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/reduce/shared.js
|
|
12185
|
+
var minComparators = {
|
|
12186
|
+
">": true,
|
|
12187
|
+
">=": true
|
|
12188
|
+
};
|
|
12189
|
+
var maxComparators = {
|
|
12190
|
+
"<": true,
|
|
12191
|
+
"<=": true
|
|
12192
|
+
};
|
|
12193
|
+
var invertedComparators = {
|
|
12194
|
+
"<": ">",
|
|
12195
|
+
">": "<",
|
|
12196
|
+
"<=": ">=",
|
|
12197
|
+
">=": "<=",
|
|
12198
|
+
"==": "=="
|
|
12199
|
+
};
|
|
12200
|
+
var writeOpenRangeMessage = (min2, comparator) => `Left bounds are only valid when paired with right bounds (try ...${comparator}${min2})`;
|
|
12201
|
+
var writeUnpairableComparatorMessage = (comparator) => `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;
|
|
12202
|
+
var writeMultipleLeftBoundsMessage = (openLimit, openComparator, limit, comparator) => `An expression may have at most one left bound (parsed ${openLimit}${invertedComparators[openComparator]}, ${limit}${invertedComparators[comparator]})`;
|
|
12138
12203
|
|
|
12139
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12204
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operator/bounds.js
|
|
12140
12205
|
var parseBound = (s, start) => {
|
|
12141
12206
|
const comparator = shiftComparator(s, start);
|
|
12142
12207
|
if (s.root.hasKind("unit")) {
|
|
@@ -12207,16 +12272,17 @@ var parseRightBound = (s, comparator) => {
|
|
|
12207
12272
|
};
|
|
12208
12273
|
var writeInvalidLimitMessage = (comparator, limit, boundKind) => `Comparator ${boundKind === "left" ? invertedComparators[comparator] : comparator} must be ${boundKind === "left" ? "preceded" : "followed"} by a corresponding literal (was ${limit})`;
|
|
12209
12274
|
|
|
12210
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12275
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operator/brand.js
|
|
12211
12276
|
var parseBrand = (s) => {
|
|
12212
12277
|
s.scanner.shiftUntilNonWhitespace();
|
|
12213
|
-
const brandName = s.scanner.
|
|
12278
|
+
const brandName = s.scanner.shiftUntilLookahead(terminatingChars);
|
|
12214
12279
|
s.root = s.root.brand(brandName);
|
|
12215
12280
|
};
|
|
12216
12281
|
|
|
12217
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12282
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operator/divisor.js
|
|
12218
12283
|
var parseDivisor = (s) => {
|
|
12219
|
-
|
|
12284
|
+
s.scanner.shiftUntilNonWhitespace();
|
|
12285
|
+
const divisorToken = s.scanner.shiftUntilLookahead(terminatingChars);
|
|
12220
12286
|
const divisor2 = tryParseInteger(divisorToken, {
|
|
12221
12287
|
errorOnFail: writeInvalidDivisorMessage(divisorToken)
|
|
12222
12288
|
});
|
|
@@ -12226,15 +12292,15 @@ var parseDivisor = (s) => {
|
|
|
12226
12292
|
};
|
|
12227
12293
|
var writeInvalidDivisorMessage = (divisor2) => `% operator must be followed by a non-zero integer literal (was ${divisor2})`;
|
|
12228
12294
|
|
|
12229
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12295
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operator/operator.js
|
|
12230
12296
|
var parseOperator = (s) => {
|
|
12231
12297
|
const lookahead = s.scanner.shift();
|
|
12232
|
-
return lookahead === "" ? s.finalize("") : lookahead === "[" ? s.scanner.shift() === "]" ? s.setRoot(s.root.array()) : s.error(incompleteArrayTokenMessage) : lookahead === "|" ? s.scanner.lookahead === ">" ? s.shiftedByOne().pushRootToBranch("|>") : s.pushRootToBranch(lookahead) : lookahead === "&" ? s.pushRootToBranch(lookahead) : lookahead === ")" ? s.finalizeGroup() :
|
|
12298
|
+
return lookahead === "" ? s.finalize("") : lookahead === "[" ? s.scanner.shift() === "]" ? s.setRoot(s.root.array()) : s.error(incompleteArrayTokenMessage) : lookahead === "|" ? s.scanner.lookahead === ">" ? s.shiftedByOne().pushRootToBranch("|>") : s.pushRootToBranch(lookahead) : lookahead === "&" ? s.pushRootToBranch(lookahead) : lookahead === ")" ? s.finalizeGroup() : lookaheadIsFinalizing(lookahead, s.scanner.unscanned) ? s.finalize(lookahead) : isKeyOf(lookahead, comparatorStartChars) ? parseBound(s, lookahead) : lookahead === "%" ? parseDivisor(s) : lookahead === "#" ? parseBrand(s) : (lookahead in whitespaceChars) ? parseOperator(s) : s.error(writeUnexpectedCharacterMessage(lookahead));
|
|
12233
12299
|
};
|
|
12234
12300
|
var writeUnexpectedCharacterMessage = (char, shouldBe = "") => `'${char}' is not allowed here${shouldBe && ` (should be ${shouldBe})`}`;
|
|
12235
12301
|
var incompleteArrayTokenMessage = `Missing expected ']'`;
|
|
12236
12302
|
|
|
12237
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12303
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/shift/operator/default.js
|
|
12238
12304
|
var parseDefault = (s) => {
|
|
12239
12305
|
const baseNode = s.unsetRoot();
|
|
12240
12306
|
s.parseOperand();
|
|
@@ -12244,9 +12310,9 @@ var parseDefault = (s) => {
|
|
|
12244
12310
|
const defaultValue = defaultNode.unit instanceof Date ? () => new Date(defaultNode.unit) : defaultNode.unit;
|
|
12245
12311
|
return [baseNode, "=", defaultValue];
|
|
12246
12312
|
};
|
|
12247
|
-
var writeNonLiteralDefaultMessage = (defaultDef) => `Default value '${defaultDef}' must a literal value`;
|
|
12313
|
+
var writeNonLiteralDefaultMessage = (defaultDef) => `Default value '${defaultDef}' must be a literal value`;
|
|
12248
12314
|
|
|
12249
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12315
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/string.js
|
|
12250
12316
|
var parseString = (def, ctx) => {
|
|
12251
12317
|
const aliasResolution = ctx.$.maybeResolveRoot(def);
|
|
12252
12318
|
if (aliasResolution)
|
|
@@ -12256,7 +12322,7 @@ var parseString = (def, ctx) => {
|
|
|
12256
12322
|
if (possibleElementResolution)
|
|
12257
12323
|
return possibleElementResolution.array();
|
|
12258
12324
|
}
|
|
12259
|
-
const s = new
|
|
12325
|
+
const s = new RuntimeState(new Scanner(def), ctx);
|
|
12260
12326
|
const node3 = fullStringParse(s);
|
|
12261
12327
|
if (s.finalizer === ">")
|
|
12262
12328
|
throwParseError(writeUnexpectedCharacterMessage(">"));
|
|
@@ -12285,8 +12351,8 @@ var parseUntilFinalizer = (s) => {
|
|
|
12285
12351
|
};
|
|
12286
12352
|
var next = (s) => s.hasRoot() ? s.parseOperator() : s.parseOperand();
|
|
12287
12353
|
|
|
12288
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12289
|
-
class
|
|
12354
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/reduce/dynamic.js
|
|
12355
|
+
class RuntimeState {
|
|
12290
12356
|
root;
|
|
12291
12357
|
branches = {
|
|
12292
12358
|
prefixes: [],
|
|
@@ -12360,8 +12426,9 @@ class DynamicState {
|
|
|
12360
12426
|
finalizeGroup() {
|
|
12361
12427
|
this.finalizeBranches();
|
|
12362
12428
|
const topBranchState = this.groups.pop();
|
|
12363
|
-
if (!topBranchState)
|
|
12364
|
-
return this.error(writeUnmatchedGroupCloseMessage(this.scanner.unscanned));
|
|
12429
|
+
if (!topBranchState) {
|
|
12430
|
+
return this.error(writeUnmatchedGroupCloseMessage(")", this.scanner.unscanned));
|
|
12431
|
+
}
|
|
12365
12432
|
this.branches = topBranchState;
|
|
12366
12433
|
}
|
|
12367
12434
|
addPrefix(prefix) {
|
|
@@ -12389,7 +12456,7 @@ class DynamicState {
|
|
|
12389
12456
|
this.branches.union = null;
|
|
12390
12457
|
}
|
|
12391
12458
|
parseUntilFinalizer() {
|
|
12392
|
-
return parseUntilFinalizer(new
|
|
12459
|
+
return parseUntilFinalizer(new RuntimeState(this.scanner, this.ctx));
|
|
12393
12460
|
}
|
|
12394
12461
|
parseOperator() {
|
|
12395
12462
|
return parseOperator(this);
|
|
@@ -12421,11 +12488,11 @@ class DynamicState {
|
|
|
12421
12488
|
}
|
|
12422
12489
|
}
|
|
12423
12490
|
|
|
12424
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12491
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/generic.js
|
|
12425
12492
|
var emptyGenericParameterMessage = "An empty string is not a valid generic parameter name";
|
|
12426
12493
|
var parseGenericParamName = (scanner2, result, ctx) => {
|
|
12427
12494
|
scanner2.shiftUntilNonWhitespace();
|
|
12428
|
-
const name = scanner2.
|
|
12495
|
+
const name = scanner2.shiftUntilLookahead(terminatingChars);
|
|
12429
12496
|
if (name === "") {
|
|
12430
12497
|
if (scanner2.lookahead === "" && result.length)
|
|
12431
12498
|
return result;
|
|
@@ -12445,11 +12512,63 @@ var _parseOptionalConstraint = (scanner2, name, result, ctx) => {
|
|
|
12445
12512
|
result.push(name);
|
|
12446
12513
|
return parseGenericParamName(scanner2, result, ctx);
|
|
12447
12514
|
}
|
|
12448
|
-
const s = parseUntilFinalizer(new
|
|
12515
|
+
const s = parseUntilFinalizer(new RuntimeState(scanner2, ctx));
|
|
12449
12516
|
result.push([name, s.root]);
|
|
12450
12517
|
return parseGenericParamName(scanner2, result, ctx);
|
|
12451
12518
|
};
|
|
12452
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12519
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/fn.js
|
|
12520
|
+
class InternalFnParser extends Callable {
|
|
12521
|
+
constructor($) {
|
|
12522
|
+
const attach = {
|
|
12523
|
+
$,
|
|
12524
|
+
raw: $.fn
|
|
12525
|
+
};
|
|
12526
|
+
super((...signature) => {
|
|
12527
|
+
const returnOperatorIndex = signature.indexOf(":");
|
|
12528
|
+
const lastParamIndex = returnOperatorIndex === -1 ? signature.length - 1 : returnOperatorIndex - 1;
|
|
12529
|
+
const paramDefs = signature.slice(0, lastParamIndex + 1);
|
|
12530
|
+
const paramTuple = $.parse(paramDefs).assertHasKind("intersection");
|
|
12531
|
+
let returnType = $.intrinsic.unknown;
|
|
12532
|
+
if (returnOperatorIndex !== -1) {
|
|
12533
|
+
if (returnOperatorIndex !== signature.length - 2)
|
|
12534
|
+
return throwParseError(badFnReturnTypeMessage);
|
|
12535
|
+
returnType = $.parse(signature[returnOperatorIndex + 1]);
|
|
12536
|
+
}
|
|
12537
|
+
return (impl) => new InternalTypedFn(impl, paramTuple, returnType);
|
|
12538
|
+
}, { attach });
|
|
12539
|
+
}
|
|
12540
|
+
}
|
|
12541
|
+
|
|
12542
|
+
class InternalTypedFn extends Callable {
|
|
12543
|
+
raw;
|
|
12544
|
+
params;
|
|
12545
|
+
returns;
|
|
12546
|
+
expression;
|
|
12547
|
+
constructor(raw, params, returns) {
|
|
12548
|
+
const typedName = `typed ${raw.name}`;
|
|
12549
|
+
const typed = {
|
|
12550
|
+
[typedName]: (...args2) => {
|
|
12551
|
+
const validatedArgs = params.assert(args2);
|
|
12552
|
+
const returned = raw(...validatedArgs);
|
|
12553
|
+
return returns.assert(returned);
|
|
12554
|
+
}
|
|
12555
|
+
}[typedName];
|
|
12556
|
+
super(typed);
|
|
12557
|
+
this.raw = raw;
|
|
12558
|
+
this.params = params;
|
|
12559
|
+
this.returns = returns;
|
|
12560
|
+
let argsExpression = params.expression;
|
|
12561
|
+
if (argsExpression[0] === "[" && argsExpression.at(-1) === "]")
|
|
12562
|
+
argsExpression = argsExpression.slice(1, -1);
|
|
12563
|
+
else if (argsExpression.endsWith("[]"))
|
|
12564
|
+
argsExpression = `...${argsExpression}`;
|
|
12565
|
+
this.expression = `(${argsExpression}) => ${returns?.expression ?? "unknown"}`;
|
|
12566
|
+
}
|
|
12567
|
+
}
|
|
12568
|
+
var badFnReturnTypeMessage = `":" must be followed by exactly one return type e.g:
|
|
12569
|
+
fn("string", ":", "number")(s => s.length)`;
|
|
12570
|
+
|
|
12571
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/match.js
|
|
12453
12572
|
class InternalMatchParser extends Callable {
|
|
12454
12573
|
$;
|
|
12455
12574
|
constructor($) {
|
|
@@ -12543,7 +12662,7 @@ var throwOnDefault = (errors3) => errors3.throw();
|
|
|
12543
12662
|
var chainedAtMessage = `A key matcher must be specified before the first case i.e. match.at('foo') or match.in<object>().at('bar')`;
|
|
12544
12663
|
var doubleAtMessage = `At most one key matcher may be specified per expression`;
|
|
12545
12664
|
|
|
12546
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12665
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/property.js
|
|
12547
12666
|
var parseProperty = (def, ctx) => {
|
|
12548
12667
|
if (isArray(def)) {
|
|
12549
12668
|
if (def[1] === "=")
|
|
@@ -12556,7 +12675,7 @@ var parseProperty = (def, ctx) => {
|
|
|
12556
12675
|
var invalidOptionalKeyKindMessage = `Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }`;
|
|
12557
12676
|
var invalidDefaultableKeyKindMessage = `Only required keys may specify default values, e.g. { value: 'number = 0' }`;
|
|
12558
12677
|
|
|
12559
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12678
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/objectLiteral.js
|
|
12560
12679
|
var parseObjectLiteral = (def, ctx) => {
|
|
12561
12680
|
let spread;
|
|
12562
12681
|
const structure3 = {};
|
|
@@ -12632,16 +12751,16 @@ var appendNamedProp = (structure3, kind, inner, ctx) => {
|
|
|
12632
12751
|
};
|
|
12633
12752
|
var writeInvalidUndeclaredBehaviorMessage = (actual) => `Value of '+' key must be 'reject', 'delete', or 'ignore' (was ${printable(actual)})`;
|
|
12634
12753
|
var nonLeadingSpreadError = "Spread operator may only be used as the first key in an object";
|
|
12635
|
-
var preparseKey = (key) => typeof key === "symbol" ? { kind: "required", normalized: key } : key.at(-1) === "?" ? key.at(-2) ===
|
|
12754
|
+
var preparseKey = (key) => typeof key === "symbol" ? { kind: "required", normalized: key } : key.at(-1) === "?" ? key.at(-2) === Backslash ? { kind: "required", normalized: `${key.slice(0, -2)}?` } : {
|
|
12636
12755
|
kind: "optional",
|
|
12637
12756
|
normalized: key.slice(0, -1)
|
|
12638
|
-
} : key[0] === "[" && key.at(-1) === "]" ? { kind: "index", normalized: key.slice(1, -1) } : key[0] ===
|
|
12757
|
+
} : key[0] === "[" && key.at(-1) === "]" ? { kind: "index", normalized: key.slice(1, -1) } : key[0] === Backslash && key[1] === "[" && key.at(-1) === "]" ? { kind: "required", normalized: key.slice(1) } : key === "..." ? { kind: "spread" } : key === "+" ? { kind: "undeclared" } : {
|
|
12639
12758
|
kind: "required",
|
|
12640
12759
|
normalized: key === "\\..." ? "..." : key === "\\+" ? "+" : key
|
|
12641
12760
|
};
|
|
12642
12761
|
var writeInvalidSpreadTypeMessage = (def) => `Spread operand must resolve to an object literal type (was ${def})`;
|
|
12643
12762
|
|
|
12644
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12763
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/tupleExpressions.js
|
|
12645
12764
|
var maybeParseTupleExpression = (def, ctx) => isIndexZeroExpression(def) ? indexZeroParsers[def[0]](def, ctx) : isIndexOneExpression(def) ? indexOneParsers[def[1]](def, ctx) : null;
|
|
12646
12765
|
var parseKeyOfTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[1], ctx).keyof();
|
|
12647
12766
|
var parseBranchTuple = (def, ctx) => {
|
|
@@ -12670,7 +12789,7 @@ var parseNarrowTuple = (def, ctx) => {
|
|
|
12670
12789
|
}
|
|
12671
12790
|
return ctx.$.parseOwnDefinitionFormat(def[0], ctx).constrain("predicate", def[2]);
|
|
12672
12791
|
};
|
|
12673
|
-
var
|
|
12792
|
+
var parseMetaTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[0], ctx).configure(def[2], def[3]);
|
|
12674
12793
|
var defineIndexOneParsers = (parsers2) => parsers2;
|
|
12675
12794
|
var postfixParsers = defineIndexOneParsers({
|
|
12676
12795
|
"[]": parseArrayTuple,
|
|
@@ -12682,7 +12801,7 @@ var infixParsers = defineIndexOneParsers({
|
|
|
12682
12801
|
":": parseNarrowTuple,
|
|
12683
12802
|
"=>": parseMorphTuple,
|
|
12684
12803
|
"|>": parseBranchTuple,
|
|
12685
|
-
"@":
|
|
12804
|
+
"@": parseMetaTuple,
|
|
12686
12805
|
"=": () => throwParseError(shallowDefaultableMessage)
|
|
12687
12806
|
});
|
|
12688
12807
|
var indexOneParsers = { ...postfixParsers, ...infixParsers };
|
|
@@ -12702,7 +12821,7 @@ var indexZeroParsers = defineIndexZeroParsers({
|
|
|
12702
12821
|
var isIndexZeroExpression = (def) => indexZeroParsers[def[0]] !== undefined;
|
|
12703
12822
|
var writeInvalidConstructorMessage = (actual) => `Expected a constructor following 'instanceof' operator (was ${actual})`;
|
|
12704
12823
|
|
|
12705
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12824
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/tupleLiteral.js
|
|
12706
12825
|
var parseTupleLiteral = (def, ctx) => {
|
|
12707
12826
|
let sequences = [{}];
|
|
12708
12827
|
let i = 0;
|
|
@@ -12798,7 +12917,7 @@ var requiredPostOptionalMessage = "A required element may not follow an optional
|
|
|
12798
12917
|
var optionalOrDefaultableAfterVariadicMessage = "An optional element may not follow a variadic element";
|
|
12799
12918
|
var defaultablePostOptionalMessage = "A defaultable element may not follow an optional element without a default";
|
|
12800
12919
|
|
|
12801
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12920
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/parser/definition.js
|
|
12802
12921
|
var parseCache = {};
|
|
12803
12922
|
var parseInnerDefinition = (def, ctx) => {
|
|
12804
12923
|
if (typeof def === "string") {
|
|
@@ -12837,7 +12956,7 @@ var parseObject = (def, ctx) => {
|
|
|
12837
12956
|
var parseTuple = (def, ctx) => maybeParseTupleExpression(def, ctx) ?? parseTupleLiteral(def, ctx);
|
|
12838
12957
|
var writeBadDefinitionTypeMessage = (actual) => `Type definitions must be strings or objects (was ${actual})`;
|
|
12839
12958
|
|
|
12840
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
12959
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/type.js
|
|
12841
12960
|
class InternalTypeParser extends Callable {
|
|
12842
12961
|
constructor($) {
|
|
12843
12962
|
const attach = Object.assign({
|
|
@@ -12847,6 +12966,7 @@ class InternalTypeParser extends Callable {
|
|
|
12847
12966
|
raw: $.parse,
|
|
12848
12967
|
module: $.constructor.module,
|
|
12849
12968
|
scope: $.constructor.scope,
|
|
12969
|
+
declare: $.declare,
|
|
12850
12970
|
define: $.define,
|
|
12851
12971
|
match: $.match,
|
|
12852
12972
|
generic: $.generic,
|
|
@@ -12859,7 +12979,8 @@ class InternalTypeParser extends Callable {
|
|
|
12859
12979
|
or: $.or,
|
|
12860
12980
|
and: $.and,
|
|
12861
12981
|
merge: $.merge,
|
|
12862
|
-
pipe: $.pipe
|
|
12982
|
+
pipe: $.pipe,
|
|
12983
|
+
fn: $.fn
|
|
12863
12984
|
}, $.ambientAttachments);
|
|
12864
12985
|
super((...args2) => {
|
|
12865
12986
|
if (args2.length === 1) {
|
|
@@ -12872,13 +12993,12 @@ class InternalTypeParser extends Callable {
|
|
|
12872
12993
|
}
|
|
12873
12994
|
return $.parse(args2);
|
|
12874
12995
|
}, {
|
|
12875
|
-
bind: $,
|
|
12876
12996
|
attach
|
|
12877
12997
|
});
|
|
12878
12998
|
}
|
|
12879
12999
|
}
|
|
12880
13000
|
|
|
12881
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13001
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/scope.js
|
|
12882
13002
|
var $arkTypeRegistry = $ark;
|
|
12883
13003
|
|
|
12884
13004
|
class InternalScope extends BaseScope {
|
|
@@ -12916,7 +13036,7 @@ class InternalScope extends BaseScope {
|
|
|
12916
13036
|
];
|
|
12917
13037
|
}
|
|
12918
13038
|
parseGenericParams(def, opts) {
|
|
12919
|
-
return parseGenericParamName(new
|
|
13039
|
+
return parseGenericParamName(new Scanner(def), [], this.createParseContext({
|
|
12920
13040
|
...opts,
|
|
12921
13041
|
def,
|
|
12922
13042
|
prefix: "generic"
|
|
@@ -12955,6 +13075,7 @@ class InternalScope extends BaseScope {
|
|
|
12955
13075
|
and = (...defs) => defs.reduce((node3, def) => node3.and(this.parse(def)), this.intrinsic.unknown);
|
|
12956
13076
|
merge = (...defs) => defs.reduce((node3, def) => node3.merge(this.parse(def)), this.intrinsic.object);
|
|
12957
13077
|
pipe = (...morphs) => this.intrinsic.unknown.pipe(...morphs);
|
|
13078
|
+
fn = new InternalFnParser(this);
|
|
12958
13079
|
match = new InternalMatchParser(this);
|
|
12959
13080
|
declare = () => ({
|
|
12960
13081
|
type: this.type
|
|
@@ -12971,7 +13092,7 @@ var scope2 = Object.assign(InternalScope.scope, {
|
|
|
12971
13092
|
});
|
|
12972
13093
|
var Scope = InternalScope;
|
|
12973
13094
|
|
|
12974
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13095
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/builtins.js
|
|
12975
13096
|
class MergeHkt extends Hkt {
|
|
12976
13097
|
description = 'merge an object\'s properties onto another like `Merge(User, { isAdmin: "true" })`';
|
|
12977
13098
|
}
|
|
@@ -12981,7 +13102,7 @@ var arkBuiltins = Scope.module({
|
|
|
12981
13102
|
Merge
|
|
12982
13103
|
});
|
|
12983
13104
|
|
|
12984
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13105
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/Array.js
|
|
12985
13106
|
class liftFromHkt extends Hkt {
|
|
12986
13107
|
}
|
|
12987
13108
|
var liftFrom = genericNode("element")((args2) => {
|
|
@@ -12998,7 +13119,7 @@ var arkArray = Scope.module({
|
|
|
12998
13119
|
name: "Array"
|
|
12999
13120
|
});
|
|
13000
13121
|
|
|
13001
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13122
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/FormData.js
|
|
13002
13123
|
var value = rootSchema(["string", registry.FileConstructor]);
|
|
13003
13124
|
var parsedFormDataValue = value.rawOr(value.array());
|
|
13004
13125
|
var parsed = rootSchema({
|
|
@@ -13035,7 +13156,7 @@ var arkFormData = Scope.module({
|
|
|
13035
13156
|
name: "FormData"
|
|
13036
13157
|
});
|
|
13037
13158
|
|
|
13038
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13159
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/TypedArray.js
|
|
13039
13160
|
var TypedArray = Scope.module({
|
|
13040
13161
|
Int8: ["instanceof", Int8Array],
|
|
13041
13162
|
Uint8: ["instanceof", Uint8Array],
|
|
@@ -13052,7 +13173,7 @@ var TypedArray = Scope.module({
|
|
|
13052
13173
|
name: "TypedArray"
|
|
13053
13174
|
});
|
|
13054
13175
|
|
|
13055
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13176
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/constructors.js
|
|
13056
13177
|
var omittedPrototypes = {
|
|
13057
13178
|
Boolean: 1,
|
|
13058
13179
|
Number: 1,
|
|
@@ -13065,7 +13186,7 @@ var arkPrototypes = Scope.module({
|
|
|
13065
13186
|
FormData: arkFormData
|
|
13066
13187
|
});
|
|
13067
13188
|
|
|
13068
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13189
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/number.js
|
|
13069
13190
|
var epoch = rootSchema({
|
|
13070
13191
|
domain: {
|
|
13071
13192
|
domain: "number",
|
|
@@ -13108,13 +13229,13 @@ var number = Scope.module({
|
|
|
13108
13229
|
name: "number"
|
|
13109
13230
|
});
|
|
13110
13231
|
|
|
13111
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13112
|
-
var regexStringNode = (
|
|
13232
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/string.js
|
|
13233
|
+
var regexStringNode = (regex2, description, jsonSchemaFormat) => {
|
|
13113
13234
|
const schema = {
|
|
13114
13235
|
domain: "string",
|
|
13115
13236
|
pattern: {
|
|
13116
|
-
rule:
|
|
13117
|
-
flags:
|
|
13237
|
+
rule: regex2.source,
|
|
13238
|
+
flags: regex2.flags,
|
|
13118
13239
|
meta: description
|
|
13119
13240
|
}
|
|
13120
13241
|
};
|
|
@@ -13383,7 +13504,7 @@ var stringNumeric = Scope.module({
|
|
|
13383
13504
|
name: "string.numeric"
|
|
13384
13505
|
});
|
|
13385
13506
|
var regexPatternDescription = "a regex pattern";
|
|
13386
|
-
var
|
|
13507
|
+
var regex2 = rootSchema({
|
|
13387
13508
|
domain: "string",
|
|
13388
13509
|
predicate: {
|
|
13389
13510
|
meta: regexPatternDescription,
|
|
@@ -13426,16 +13547,7 @@ var upper = Scope.module({
|
|
|
13426
13547
|
}, {
|
|
13427
13548
|
name: "string.upper"
|
|
13428
13549
|
});
|
|
13429
|
-
var isParsableUrl = (s) =>
|
|
13430
|
-
if (URL.canParse)
|
|
13431
|
-
return URL.canParse(s);
|
|
13432
|
-
try {
|
|
13433
|
-
new URL(s);
|
|
13434
|
-
return true;
|
|
13435
|
-
} catch {
|
|
13436
|
-
return false;
|
|
13437
|
-
}
|
|
13438
|
-
};
|
|
13550
|
+
var isParsableUrl = (s) => URL.canParse(s);
|
|
13439
13551
|
var urlRoot = rootSchema({
|
|
13440
13552
|
domain: "string",
|
|
13441
13553
|
predicate: {
|
|
@@ -13498,7 +13610,7 @@ var string = Scope.module({
|
|
|
13498
13610
|
lower,
|
|
13499
13611
|
normalize,
|
|
13500
13612
|
numeric: stringNumeric,
|
|
13501
|
-
regex,
|
|
13613
|
+
regex: regex2,
|
|
13502
13614
|
semver,
|
|
13503
13615
|
trim,
|
|
13504
13616
|
upper,
|
|
@@ -13508,7 +13620,7 @@ var string = Scope.module({
|
|
|
13508
13620
|
name: "string"
|
|
13509
13621
|
});
|
|
13510
13622
|
|
|
13511
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13623
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/ts.js
|
|
13512
13624
|
var arkTsKeywords = Scope.module({
|
|
13513
13625
|
bigint: intrinsic.bigint,
|
|
13514
13626
|
boolean: intrinsic.boolean,
|
|
@@ -13596,7 +13708,7 @@ var arkTsGenerics = Scope.module({
|
|
|
13596
13708
|
Required: Required2
|
|
13597
13709
|
});
|
|
13598
13710
|
|
|
13599
|
-
// ../../node_modules/.pnpm/arktype@2.1.
|
|
13711
|
+
// ../../node_modules/.pnpm/arktype@2.1.23/node_modules/arktype/out/keywords/keywords.js
|
|
13600
13712
|
var ark = scope2({
|
|
13601
13713
|
...arkTsKeywords,
|
|
13602
13714
|
...arkTsGenerics,
|
|
@@ -13630,6 +13742,7 @@ $arkTypeRegistry.typeAttachments = {
|
|
|
13630
13742
|
};
|
|
13631
13743
|
var type = Object.assign(ark.type, $arkTypeRegistry.typeAttachments);
|
|
13632
13744
|
var match = ark.match;
|
|
13745
|
+
var fn = ark.fn;
|
|
13633
13746
|
var generic3 = ark.generic;
|
|
13634
13747
|
var schema = ark.schema;
|
|
13635
13748
|
var define = ark.define;
|
|
@@ -13700,12 +13813,12 @@ try {
|
|
|
13700
13813
|
}
|
|
13701
13814
|
}
|
|
13702
13815
|
try {
|
|
13703
|
-
console.log(`\uD83D\uDE80
|
|
13704
|
-
await sql2`
|
|
13816
|
+
console.log(`\uD83D\uDE80 Changing owner of ${env2.POSTGRES_DATABASE} to ${env2.POSTGRES_USER}...`);
|
|
13817
|
+
await sql2.unsafe(`ALTER DATABASE ${env2.POSTGRES_DATABASE} OWNER TO ${env2.POSTGRES_USER}`);
|
|
13705
13818
|
console.log(`Done!`);
|
|
13706
13819
|
} catch (thrown) {
|
|
13707
13820
|
if (thrown instanceof Error) {
|
|
13708
|
-
console.error(`\uD83D\uDCA5 Failed:`, thrown.message);
|
|
13821
|
+
console.error(`\uD83D\uDCA5 Failed to change ownership:`, thrown.message);
|
|
13709
13822
|
}
|
|
13710
13823
|
}
|
|
13711
13824
|
await sql2.end();
|