@cerefox/memory 1.0.1-beta.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cerefox.js +416 -206
- package/dist/frontend/assets/index-D9FTvsV4.js +125 -0
- package/dist/frontend/assets/index-D9FTvsV4.js.map +1 -0
- package/dist/frontend/index.html +1 -1
- package/dist/server-assets/_shared/ef-meta/index.ts +1 -1
- package/docs/guides/cli.md +7 -0
- package/docs/guides/configuration.md +2 -0
- package/docs/guides/setup-supabase.md +9 -0
- package/docs/guides/upgrading.md +3 -1
- package/package.json +1 -1
- package/dist/frontend/assets/index-6DS5ujj2.js +0 -125
- package/dist/frontend/assets/index-6DS5ujj2.js.map +0 -1
package/dist/bin/cerefox.js
CHANGED
|
@@ -7184,7 +7184,7 @@ var exports_meta = {};
|
|
|
7184
7184
|
__export(exports_meta, {
|
|
7185
7185
|
PKG_VERSION: () => PKG_VERSION
|
|
7186
7186
|
});
|
|
7187
|
-
var PKG_VERSION = "1.0.1
|
|
7187
|
+
var PKG_VERSION = "1.0.1";
|
|
7188
7188
|
var init_meta = () => {};
|
|
7189
7189
|
|
|
7190
7190
|
// ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
|
|
@@ -7792,7 +7792,7 @@ var require_tslib = __commonJS((exports, module) => {
|
|
|
7792
7792
|
});
|
|
7793
7793
|
});
|
|
7794
7794
|
|
|
7795
|
-
// ../../node_modules/.bun/@supabase+functions-js@2.
|
|
7795
|
+
// ../../node_modules/.bun/@supabase+functions-js@2.111.0/node_modules/@supabase/functions-js/dist/main/helper.js
|
|
7796
7796
|
var require_helper = __commonJS((exports) => {
|
|
7797
7797
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7798
7798
|
exports.resolveFetch = undefined;
|
|
@@ -7805,7 +7805,7 @@ var require_helper = __commonJS((exports) => {
|
|
|
7805
7805
|
exports.resolveFetch = resolveFetch;
|
|
7806
7806
|
});
|
|
7807
7807
|
|
|
7808
|
-
// ../../node_modules/.bun/@supabase+functions-js@2.
|
|
7808
|
+
// ../../node_modules/.bun/@supabase+functions-js@2.111.0/node_modules/@supabase/functions-js/dist/main/types.js
|
|
7809
7809
|
var require_types = __commonJS((exports) => {
|
|
7810
7810
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7811
7811
|
exports.FunctionRegion = exports.FunctionsHttpError = exports.FunctionsRelayError = exports.FunctionsFetchError = exports.FunctionsError = undefined;
|
|
@@ -7866,7 +7866,7 @@ var require_types = __commonJS((exports) => {
|
|
|
7866
7866
|
})(FunctionRegion || (exports.FunctionRegion = FunctionRegion = {}));
|
|
7867
7867
|
});
|
|
7868
7868
|
|
|
7869
|
-
// ../../node_modules/.bun/@supabase+functions-js@2.
|
|
7869
|
+
// ../../node_modules/.bun/@supabase+functions-js@2.111.0/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js
|
|
7870
7870
|
var require_FunctionsClient = __commonJS((exports) => {
|
|
7871
7871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7872
7872
|
exports.FunctionsClient = undefined;
|
|
@@ -7886,9 +7886,10 @@ var require_FunctionsClient = __commonJS((exports) => {
|
|
|
7886
7886
|
}
|
|
7887
7887
|
invoke(functionName_1) {
|
|
7888
7888
|
return tslib_1.__awaiter(this, arguments, undefined, function* (functionName, options = {}) {
|
|
7889
|
-
var _a;
|
|
7889
|
+
var _a, _b;
|
|
7890
7890
|
let timeoutId;
|
|
7891
7891
|
let timeoutController;
|
|
7892
|
+
let onAbort;
|
|
7892
7893
|
try {
|
|
7893
7894
|
const { headers, method, body: functionArgs, signal, timeout } = options;
|
|
7894
7895
|
let _headers = {};
|
|
@@ -7929,7 +7930,8 @@ var require_FunctionsClient = __commonJS((exports) => {
|
|
|
7929
7930
|
timeoutId = setTimeout(() => timeoutController.abort(), timeout);
|
|
7930
7931
|
if (signal) {
|
|
7931
7932
|
effectiveSignal = timeoutController.signal;
|
|
7932
|
-
|
|
7933
|
+
onAbort = () => timeoutController.abort();
|
|
7934
|
+
signal.addEventListener("abort", onAbort);
|
|
7933
7935
|
} else {
|
|
7934
7936
|
effectiveSignal = timeoutController.signal;
|
|
7935
7937
|
}
|
|
@@ -7949,7 +7951,7 @@ var require_FunctionsClient = __commonJS((exports) => {
|
|
|
7949
7951
|
if (!response.ok) {
|
|
7950
7952
|
throw new types_1.FunctionsHttpError(response);
|
|
7951
7953
|
}
|
|
7952
|
-
let responseType = ((_a = response.headers.get("Content-Type")) !== null && _a !== undefined ? _a : "text/plain").split(";")[0].trim();
|
|
7954
|
+
let responseType = ((_a = response.headers.get("Content-Type")) !== null && _a !== undefined ? _a : "text/plain").split(";")[0].trim().toLowerCase();
|
|
7953
7955
|
let data;
|
|
7954
7956
|
if (responseType === "application/json") {
|
|
7955
7957
|
data = yield response.json();
|
|
@@ -7973,6 +7975,9 @@ var require_FunctionsClient = __commonJS((exports) => {
|
|
|
7973
7975
|
if (timeoutId) {
|
|
7974
7976
|
clearTimeout(timeoutId);
|
|
7975
7977
|
}
|
|
7978
|
+
if (onAbort) {
|
|
7979
|
+
(_b = options.signal) === null || _b === undefined || _b.removeEventListener("abort", onAbort);
|
|
7980
|
+
}
|
|
7976
7981
|
}
|
|
7977
7982
|
});
|
|
7978
7983
|
}
|
|
@@ -7980,7 +7985,7 @@ var require_FunctionsClient = __commonJS((exports) => {
|
|
|
7980
7985
|
exports.FunctionsClient = FunctionsClient;
|
|
7981
7986
|
});
|
|
7982
7987
|
|
|
7983
|
-
// ../../node_modules/.bun/@supabase+functions-js@2.
|
|
7988
|
+
// ../../node_modules/.bun/@supabase+functions-js@2.111.0/node_modules/@supabase/functions-js/dist/main/index.js
|
|
7984
7989
|
var require_main = __commonJS((exports) => {
|
|
7985
7990
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7986
7991
|
exports.FunctionRegion = exports.FunctionsRelayError = exports.FunctionsHttpError = exports.FunctionsFetchError = exports.FunctionsError = exports.FunctionsClient = undefined;
|
|
@@ -8006,7 +8011,7 @@ var require_main = __commonJS((exports) => {
|
|
|
8006
8011
|
} });
|
|
8007
8012
|
});
|
|
8008
8013
|
|
|
8009
|
-
// ../../node_modules/.bun/@supabase+postgrest-js@2.
|
|
8014
|
+
// ../../node_modules/.bun/@supabase+postgrest-js@2.111.0/node_modules/@supabase/postgrest-js/dist/index.mjs
|
|
8010
8015
|
function sleep(ms, signal) {
|
|
8011
8016
|
return new Promise((resolve) => {
|
|
8012
8017
|
if (signal === null || signal === undefined ? undefined : signal.aborted) {
|
|
@@ -8817,7 +8822,7 @@ var init_dist = __esm(() => {
|
|
|
8817
8822
|
};
|
|
8818
8823
|
});
|
|
8819
8824
|
|
|
8820
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
8825
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js
|
|
8821
8826
|
var require_websocket_factory = __commonJS((exports) => {
|
|
8822
8827
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8823
8828
|
exports.WebSocketFactory = undefined;
|
|
@@ -8894,14 +8899,14 @@ Suggested solution: ${env.workaround}`;
|
|
|
8894
8899
|
exports.default = WebSocketFactory;
|
|
8895
8900
|
});
|
|
8896
8901
|
|
|
8897
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
8902
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/version.js
|
|
8898
8903
|
var require_version = __commonJS((exports) => {
|
|
8899
8904
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8900
8905
|
exports.version = undefined;
|
|
8901
|
-
exports.version = "2.
|
|
8906
|
+
exports.version = "2.111.0";
|
|
8902
8907
|
});
|
|
8903
8908
|
|
|
8904
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
8909
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/constants.js
|
|
8905
8910
|
var require_constants = __commonJS((exports) => {
|
|
8906
8911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8907
8912
|
exports.CONNECTION_STATE = exports.TRANSPORTS = exports.CHANNEL_EVENTS = exports.CHANNEL_STATES = exports.SOCKET_STATES = exports.MAX_PUSH_BUFFER_SIZE = exports.WS_CLOSE_NORMAL = exports.DEFAULT_TIMEOUT = exports.VERSION = exports.DEFAULT_VSN = exports.VSN_2_0_0 = exports.VSN_1_0_0 = exports.DEFAULT_VERSION = undefined;
|
|
@@ -8946,7 +8951,7 @@ var require_constants = __commonJS((exports) => {
|
|
|
8946
8951
|
};
|
|
8947
8952
|
});
|
|
8948
8953
|
|
|
8949
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
8954
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js
|
|
8950
8955
|
var require_serializer = __commonJS((exports) => {
|
|
8951
8956
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8952
8957
|
|
|
@@ -9098,7 +9103,7 @@ var require_serializer = __commonJS((exports) => {
|
|
|
9098
9103
|
exports.default = Serializer;
|
|
9099
9104
|
});
|
|
9100
9105
|
|
|
9101
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
9106
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js
|
|
9102
9107
|
var require_transformers = __commonJS((exports) => {
|
|
9103
9108
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9104
9109
|
exports.httpEndpointURL = exports.toTimestampString = exports.toArray = exports.toJson = exports.toNumber = exports.toBoolean = exports.convertCell = exports.convertColumn = exports.convertChangeData = exports.PostgresTypes = undefined;
|
|
@@ -10683,7 +10688,7 @@ var require_phoenix_cjs = __commonJS((exports, module) => {
|
|
|
10683
10688
|
};
|
|
10684
10689
|
});
|
|
10685
10690
|
|
|
10686
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
10691
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js
|
|
10687
10692
|
var require_presenceAdapter = __commonJS((exports) => {
|
|
10688
10693
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10689
10694
|
var phoenix_1 = require_phoenix_cjs();
|
|
@@ -10739,10 +10744,12 @@ var require_presenceAdapter = __commonJS((exports) => {
|
|
|
10739
10744
|
exports.default = PresenceAdapter;
|
|
10740
10745
|
function transformState(presences) {
|
|
10741
10746
|
return presences.metas.map((presence) => {
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10747
|
+
const descriptors = Object.getOwnPropertyDescriptors(presence);
|
|
10748
|
+
const transformedPresence = Object.defineProperties({}, descriptors);
|
|
10749
|
+
transformedPresence["presence_ref"] = transformedPresence["phx_ref"];
|
|
10750
|
+
delete transformedPresence["phx_ref"];
|
|
10751
|
+
delete transformedPresence["phx_ref_prev"];
|
|
10752
|
+
return transformedPresence;
|
|
10746
10753
|
});
|
|
10747
10754
|
}
|
|
10748
10755
|
function cloneState(state) {
|
|
@@ -10756,7 +10763,7 @@ var require_presenceAdapter = __commonJS((exports) => {
|
|
|
10756
10763
|
}
|
|
10757
10764
|
});
|
|
10758
10765
|
|
|
10759
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
10766
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js
|
|
10760
10767
|
var require_RealtimePresence = __commonJS((exports) => {
|
|
10761
10768
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10762
10769
|
exports.REALTIME_PRESENCE_LISTEN_EVENTS = undefined;
|
|
@@ -10781,7 +10788,7 @@ var require_RealtimePresence = __commonJS((exports) => {
|
|
|
10781
10788
|
exports.default = RealtimePresence;
|
|
10782
10789
|
});
|
|
10783
10790
|
|
|
10784
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
10791
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js
|
|
10785
10792
|
var require_normalizeChannelError = __commonJS((exports) => {
|
|
10786
10793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10787
10794
|
exports.normalizeChannelError = normalizeChannelError;
|
|
@@ -10804,7 +10811,7 @@ var require_normalizeChannelError = __commonJS((exports) => {
|
|
|
10804
10811
|
}
|
|
10805
10812
|
});
|
|
10806
10813
|
|
|
10807
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
10814
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js
|
|
10808
10815
|
var require_channelAdapter = __commonJS((exports) => {
|
|
10809
10816
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10810
10817
|
var constants_1 = require_constants();
|
|
@@ -10906,7 +10913,7 @@ var require_channelAdapter = __commonJS((exports) => {
|
|
|
10906
10913
|
}
|
|
10907
10914
|
});
|
|
10908
10915
|
|
|
10909
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
10916
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/RealtimePostgresFilterBuilder.js
|
|
10910
10917
|
var require_RealtimePostgresFilterBuilder = __commonJS((exports) => {
|
|
10911
10918
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10912
10919
|
exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = undefined;
|
|
@@ -10996,7 +11003,7 @@ var require_RealtimePostgresFilterBuilder = __commonJS((exports) => {
|
|
|
10996
11003
|
exports.postgresChangesFilter = postgresChangesFilter;
|
|
10997
11004
|
});
|
|
10998
11005
|
|
|
10999
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
11006
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js
|
|
11000
11007
|
var require_RealtimeChannel = __commonJS((exports) => {
|
|
11001
11008
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11002
11009
|
exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_LISTEN_TYPES = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = undefined;
|
|
@@ -11386,7 +11393,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
|
|
|
11386
11393
|
exports.default = RealtimeChannel;
|
|
11387
11394
|
});
|
|
11388
11395
|
|
|
11389
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
11396
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js
|
|
11390
11397
|
var require_socketAdapter = __commonJS((exports) => {
|
|
11391
11398
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11392
11399
|
var phoenix_1 = require_phoenix_cjs();
|
|
@@ -11499,7 +11506,7 @@ var require_socketAdapter = __commonJS((exports) => {
|
|
|
11499
11506
|
exports.default = SocketAdapter;
|
|
11500
11507
|
});
|
|
11501
11508
|
|
|
11502
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
11509
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js
|
|
11503
11510
|
var require_RealtimeClient = __commonJS((exports) => {
|
|
11504
11511
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11505
11512
|
var tslib_1 = require_tslib();
|
|
@@ -11952,7 +11959,7 @@ var require_RealtimeClient = __commonJS((exports) => {
|
|
|
11952
11959
|
exports.default = RealtimeClient;
|
|
11953
11960
|
});
|
|
11954
11961
|
|
|
11955
|
-
// ../../node_modules/.bun/@supabase+realtime-js@2.
|
|
11962
|
+
// ../../node_modules/.bun/@supabase+realtime-js@2.111.0/node_modules/@supabase/realtime-js/dist/main/index.js
|
|
11956
11963
|
var require_main2 = __commonJS((exports) => {
|
|
11957
11964
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11958
11965
|
exports.WebSocketFactory = exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_PRESENCE_LISTEN_EVENTS = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.REALTIME_LISTEN_TYPES = exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = exports.RealtimeClient = exports.RealtimeChannel = exports.RealtimePresence = undefined;
|
|
@@ -12288,7 +12295,7 @@ var init_dist2 = __esm(() => {
|
|
|
12288
12295
|
};
|
|
12289
12296
|
});
|
|
12290
12297
|
|
|
12291
|
-
// ../../node_modules/.bun/@supabase+storage-js@2.
|
|
12298
|
+
// ../../node_modules/.bun/@supabase+storage-js@2.111.0/node_modules/@supabase/storage-js/dist/index.mjs
|
|
12292
12299
|
function _typeof2(o) {
|
|
12293
12300
|
"@babel/helpers - typeof";
|
|
12294
12301
|
return _typeof2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o$1) {
|
|
@@ -12427,7 +12434,7 @@ var StorageError, StorageApiError, StorageUnknownError, resolveFetch = (customFe
|
|
|
12427
12434
|
if (bucketName.includes("/") || bucketName.includes("\\"))
|
|
12428
12435
|
return false;
|
|
12429
12436
|
return /^[\w!.\*'() &$@=;:+,?-]+$/.test(bucketName);
|
|
12430
|
-
}, _getErrorMessage = (err) => {
|
|
12437
|
+
}, encodeStoragePath = (path) => path.split("/").map(encodeURIComponent).join("/"), _getErrorMessage = (err) => {
|
|
12431
12438
|
if (typeof err === "object" && err !== null) {
|
|
12432
12439
|
const e = err;
|
|
12433
12440
|
if (typeof e.msg === "string")
|
|
@@ -12596,7 +12603,7 @@ var StorageError, StorageApiError, StorageUnknownError, resolveFetch = (customFe
|
|
|
12596
12603
|
throw error;
|
|
12597
12604
|
}
|
|
12598
12605
|
}
|
|
12599
|
-
}, DEFAULT_SEARCH_OPTIONS, DEFAULT_FILE_OPTIONS, StorageFileApi, version = "2.
|
|
12606
|
+
}, DEFAULT_SEARCH_OPTIONS, DEFAULT_FILE_OPTIONS, StorageFileApi, version = "2.111.0", DEFAULT_HEADERS, StorageBucketApi, StorageAnalyticsClient, VectorIndexApi, VectorDataApi, VectorBucketApi, StorageVectorsClient, VectorBucketScope, VectorIndexScope, StorageClient;
|
|
12600
12607
|
var init_dist3 = __esm(() => {
|
|
12601
12608
|
init_dist2();
|
|
12602
12609
|
StorageError = class extends Error {
|
|
@@ -12886,7 +12893,7 @@ var init_dist3 = __esm(() => {
|
|
|
12886
12893
|
async purgeCache(path, options, parameters) {
|
|
12887
12894
|
var _this13 = this;
|
|
12888
12895
|
return _this13.handleOperation(async () => {
|
|
12889
|
-
const _path = _this13._getFinalPath(path);
|
|
12896
|
+
const _path = encodeStoragePath(_this13._getFinalPath(path));
|
|
12890
12897
|
const query = new URLSearchParams;
|
|
12891
12898
|
if (options === null || options === undefined ? undefined : options.transformations)
|
|
12892
12899
|
query.set("transformations", "true");
|
|
@@ -13009,7 +13016,7 @@ var init_dist3 = __esm(() => {
|
|
|
13009
13016
|
if (options === null || options === undefined ? undefined : options.transformations)
|
|
13010
13017
|
query.set("transformations", "true");
|
|
13011
13018
|
const queryString = query.toString();
|
|
13012
|
-
return await remove(_this7.fetch, `${_this7.url}/cdn/${id}${queryString ? `?${queryString}` : ""}`, {}, { headers: _this7.headers }, parameters);
|
|
13019
|
+
return await remove(_this7.fetch, `${_this7.url}/cdn/${encodeStoragePath(id)}${queryString ? `?${queryString}` : ""}`, {}, { headers: _this7.headers }, parameters);
|
|
13013
13020
|
});
|
|
13014
13021
|
}
|
|
13015
13022
|
listBucketOptionsToQueryString(options) {
|
|
@@ -13329,17 +13336,17 @@ var init_dist3 = __esm(() => {
|
|
|
13329
13336
|
};
|
|
13330
13337
|
});
|
|
13331
13338
|
|
|
13332
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
13339
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/version.js
|
|
13333
13340
|
var require_version2 = __commonJS((exports) => {
|
|
13334
13341
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13335
13342
|
exports.version = undefined;
|
|
13336
|
-
exports.version = "2.
|
|
13343
|
+
exports.version = "2.111.0";
|
|
13337
13344
|
});
|
|
13338
13345
|
|
|
13339
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
13346
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/constants.js
|
|
13340
13347
|
var require_constants2 = __commonJS((exports) => {
|
|
13341
13348
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13342
|
-
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.REFRESH_FAILURE_COOLDOWN_MS = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = undefined;
|
|
13349
|
+
exports.JWKS_TTL = exports.PKCE_MAX_CONCURRENT_FLOWS = exports.PKCE_FLOW_ID_PARAM = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.REFRESH_FAILURE_COOLDOWN_MS = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = undefined;
|
|
13343
13350
|
var version_1 = require_version2();
|
|
13344
13351
|
exports.AUTO_REFRESH_TICK_DURATION_MS = 30 * 1000;
|
|
13345
13352
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -13361,10 +13368,12 @@ var require_constants2 = __commonJS((exports) => {
|
|
|
13361
13368
|
}
|
|
13362
13369
|
};
|
|
13363
13370
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
13371
|
+
exports.PKCE_FLOW_ID_PARAM = "sb_flow_id";
|
|
13372
|
+
exports.PKCE_MAX_CONCURRENT_FLOWS = 5;
|
|
13364
13373
|
exports.JWKS_TTL = 10 * 60 * 1000;
|
|
13365
13374
|
});
|
|
13366
13375
|
|
|
13367
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
13376
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
13368
13377
|
var require_errors = __commonJS((exports) => {
|
|
13369
13378
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13370
13379
|
exports.AuthInvalidJwtError = exports.AuthWeakPasswordError = exports.AuthRefreshDiscardedError = exports.AuthRetryableFetchError = exports.AuthPKCECodeVerifierMissingError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.AuthApiError = exports.AuthError = undefined;
|
|
@@ -13533,7 +13542,7 @@ var require_errors = __commonJS((exports) => {
|
|
|
13533
13542
|
exports.AuthInvalidJwtError = AuthInvalidJwtError;
|
|
13534
13543
|
});
|
|
13535
13544
|
|
|
13536
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
13545
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/base64url.js
|
|
13537
13546
|
var require_base64url = __commonJS((exports) => {
|
|
13538
13547
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13539
13548
|
exports.byteToBase64URL = byteToBase64URL;
|
|
@@ -13721,10 +13730,10 @@ var require_base64url = __commonJS((exports) => {
|
|
|
13721
13730
|
}
|
|
13722
13731
|
});
|
|
13723
13732
|
|
|
13724
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
13733
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/helpers.js
|
|
13725
13734
|
var require_helpers = __commonJS((exports) => {
|
|
13726
13735
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13727
|
-
exports.Deferred = exports.removeItemAsync = exports.getItemAsync = exports.setItemAsync = exports.looksLikeFetchResponse = exports.resolveFetch = exports.supportsLocalStorage = exports.isBrowser = undefined;
|
|
13736
|
+
exports.pkceVerifierSlotKey = exports.Deferred = exports.removeItemAsync = exports.getItemAsync = exports.setItemAsync = exports.looksLikeFetchResponse = exports.resolveFetch = exports.supportsLocalStorage = exports.isBrowser = undefined;
|
|
13728
13737
|
exports.expiresAt = expiresAt;
|
|
13729
13738
|
exports.generateCallbackId = generateCallbackId;
|
|
13730
13739
|
exports.parseParametersFromURL = parseParametersFromURL;
|
|
@@ -13733,6 +13742,13 @@ var require_helpers = __commonJS((exports) => {
|
|
|
13733
13742
|
exports.retryable = retryable;
|
|
13734
13743
|
exports.generatePKCEVerifier = generatePKCEVerifier;
|
|
13735
13744
|
exports.generatePKCEChallenge = generatePKCEChallenge;
|
|
13745
|
+
exports.validatePKCEFlowId = validatePKCEFlowId;
|
|
13746
|
+
exports.generatePKCEFlowId = generatePKCEFlowId;
|
|
13747
|
+
exports.storePKCEVerifier = storePKCEVerifier;
|
|
13748
|
+
exports.retrievePKCEVerifier = retrievePKCEVerifier;
|
|
13749
|
+
exports.removePKCEVerifier = removePKCEVerifier;
|
|
13750
|
+
exports.removeAllPKCEVerifiers = removeAllPKCEVerifiers;
|
|
13751
|
+
exports.appendFlowIdToRedirectTo = appendFlowIdToRedirectTo;
|
|
13736
13752
|
exports.getCodeChallengeAndMethod = getCodeChallengeAndMethod;
|
|
13737
13753
|
exports.parseResponseAPIVersion = parseResponseAPIVersion;
|
|
13738
13754
|
exports.validateExp = validateExp;
|
|
@@ -13924,16 +13940,103 @@ var require_helpers = __commonJS((exports) => {
|
|
|
13924
13940
|
const hashed = await sha256(verifier);
|
|
13925
13941
|
return btoa(hashed).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
13926
13942
|
}
|
|
13927
|
-
|
|
13943
|
+
var PKCE_FLOW_ID_PATTERN = /^[a-zA-Z0-9_-]{8,64}$/;
|
|
13944
|
+
function validatePKCEFlowId(flowId) {
|
|
13945
|
+
return typeof flowId === "string" && PKCE_FLOW_ID_PATTERN.test(flowId) ? flowId : null;
|
|
13946
|
+
}
|
|
13947
|
+
function generatePKCEFlowId() {
|
|
13948
|
+
if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
|
|
13949
|
+
const bytes = new Uint8Array(16);
|
|
13950
|
+
crypto.getRandomValues(bytes);
|
|
13951
|
+
return Array.from(bytes, dec2hex).join("");
|
|
13952
|
+
}
|
|
13953
|
+
let flowId = "";
|
|
13954
|
+
for (let i = 0;i < 32; i++) {
|
|
13955
|
+
flowId += Math.floor(Math.random() * 16).toString(16);
|
|
13956
|
+
}
|
|
13957
|
+
return flowId;
|
|
13958
|
+
}
|
|
13959
|
+
var pkceVerifierSlotKey = (storageKey, flowId) => `${storageKey}-flow-${flowId}-code-verifier`;
|
|
13960
|
+
exports.pkceVerifierSlotKey = pkceVerifierSlotKey;
|
|
13961
|
+
var pkceFlowIndexKey = (storageKey) => `${storageKey}-flows-code-verifier`;
|
|
13962
|
+
async function getPKCEFlowIndex(storage, storageKey) {
|
|
13963
|
+
const index = await (0, exports.getItemAsync)(storage, pkceFlowIndexKey(storageKey));
|
|
13964
|
+
return Array.isArray(index) ? index.filter((id) => validatePKCEFlowId(id) !== null) : [];
|
|
13965
|
+
}
|
|
13966
|
+
async function storePKCEVerifier(storage, storageKey, flowId, verifier, onEvictFlow) {
|
|
13967
|
+
await (0, exports.setItemAsync)(storage, (0, exports.pkceVerifierSlotKey)(storageKey, flowId), verifier);
|
|
13968
|
+
const index = (await getPKCEFlowIndex(storage, storageKey)).filter((id) => id !== flowId);
|
|
13969
|
+
index.push(flowId);
|
|
13970
|
+
while (index.length > constants_1.PKCE_MAX_CONCURRENT_FLOWS) {
|
|
13971
|
+
const evicted = index.shift();
|
|
13972
|
+
await (0, exports.removeItemAsync)(storage, (0, exports.pkceVerifierSlotKey)(storageKey, evicted));
|
|
13973
|
+
onEvictFlow === null || onEvictFlow === undefined || onEvictFlow(evicted);
|
|
13974
|
+
}
|
|
13975
|
+
await (0, exports.setItemAsync)(storage, pkceFlowIndexKey(storageKey), index);
|
|
13976
|
+
await (0, exports.setItemAsync)(storage, `${storageKey}-code-verifier`, verifier);
|
|
13977
|
+
}
|
|
13978
|
+
async function retrievePKCEVerifier(storage, storageKey, flowId) {
|
|
13979
|
+
if (flowId) {
|
|
13980
|
+
const verifier2 = await (0, exports.getItemAsync)(storage, (0, exports.pkceVerifierSlotKey)(storageKey, flowId));
|
|
13981
|
+
return { verifier: typeof verifier2 === "string" ? verifier2 : null, flowId };
|
|
13982
|
+
}
|
|
13983
|
+
const verifier = await (0, exports.getItemAsync)(storage, `${storageKey}-code-verifier`);
|
|
13984
|
+
return { verifier: typeof verifier === "string" ? verifier : null, flowId: null };
|
|
13985
|
+
}
|
|
13986
|
+
async function removePKCEVerifier(storage, storageKey, flowId) {
|
|
13987
|
+
const legacyKey = `${storageKey}-code-verifier`;
|
|
13988
|
+
if (!flowId) {
|
|
13989
|
+
await (0, exports.removeItemAsync)(storage, legacyKey);
|
|
13990
|
+
return;
|
|
13991
|
+
}
|
|
13992
|
+
const slotKey = (0, exports.pkceVerifierSlotKey)(storageKey, flowId);
|
|
13993
|
+
const slotValue = await (0, exports.getItemAsync)(storage, slotKey);
|
|
13994
|
+
await (0, exports.removeItemAsync)(storage, slotKey);
|
|
13995
|
+
const index = await getPKCEFlowIndex(storage, storageKey);
|
|
13996
|
+
const remaining = index.filter((id) => id !== flowId);
|
|
13997
|
+
if (remaining.length !== index.length) {
|
|
13998
|
+
if (remaining.length > 0) {
|
|
13999
|
+
await (0, exports.setItemAsync)(storage, pkceFlowIndexKey(storageKey), remaining);
|
|
14000
|
+
} else {
|
|
14001
|
+
await (0, exports.removeItemAsync)(storage, pkceFlowIndexKey(storageKey));
|
|
14002
|
+
}
|
|
14003
|
+
}
|
|
14004
|
+
if (slotValue != null && slotValue === await (0, exports.getItemAsync)(storage, legacyKey)) {
|
|
14005
|
+
await (0, exports.removeItemAsync)(storage, legacyKey);
|
|
14006
|
+
}
|
|
14007
|
+
}
|
|
14008
|
+
async function removeAllPKCEVerifiers(storage, storageKey) {
|
|
14009
|
+
const index = await getPKCEFlowIndex(storage, storageKey);
|
|
14010
|
+
for (const flowId of index) {
|
|
14011
|
+
await (0, exports.removeItemAsync)(storage, (0, exports.pkceVerifierSlotKey)(storageKey, flowId));
|
|
14012
|
+
}
|
|
14013
|
+
await (0, exports.removeItemAsync)(storage, pkceFlowIndexKey(storageKey));
|
|
14014
|
+
await (0, exports.removeItemAsync)(storage, `${storageKey}-code-verifier`);
|
|
14015
|
+
}
|
|
14016
|
+
function appendFlowIdToRedirectTo(redirectTo, flowId) {
|
|
14017
|
+
const hashIndex = redirectTo.indexOf("#");
|
|
14018
|
+
let base = hashIndex === -1 ? redirectTo : redirectTo.slice(0, hashIndex);
|
|
14019
|
+
const fragment = hashIndex === -1 ? "" : redirectTo.slice(hashIndex);
|
|
14020
|
+
const queryIndex = base.indexOf("?");
|
|
14021
|
+
if (queryIndex !== -1) {
|
|
14022
|
+
const path = base.slice(0, queryIndex);
|
|
14023
|
+
const remaining = base.slice(queryIndex + 1).split("&").filter((pair) => pair !== "" && pair !== constants_1.PKCE_FLOW_ID_PARAM && !pair.startsWith(`${constants_1.PKCE_FLOW_ID_PARAM}=`));
|
|
14024
|
+
base = remaining.length > 0 ? `${path}?${remaining.join("&")}` : path;
|
|
14025
|
+
}
|
|
14026
|
+
const separator = base.includes("?") ? "&" : "?";
|
|
14027
|
+
return `${base}${separator}${constants_1.PKCE_FLOW_ID_PARAM}=${encodeURIComponent(flowId)}${fragment}`;
|
|
14028
|
+
}
|
|
14029
|
+
async function getCodeChallengeAndMethod(storage, storageKey, isPasswordRecovery = false, onEvictFlow) {
|
|
13928
14030
|
const codeVerifier = generatePKCEVerifier();
|
|
13929
14031
|
let storedCodeVerifier = codeVerifier;
|
|
13930
14032
|
if (isPasswordRecovery) {
|
|
13931
14033
|
storedCodeVerifier += "/recovery";
|
|
13932
14034
|
}
|
|
13933
|
-
|
|
14035
|
+
const flowId = generatePKCEFlowId();
|
|
14036
|
+
await storePKCEVerifier(storage, storageKey, flowId, storedCodeVerifier, onEvictFlow);
|
|
13934
14037
|
const codeChallenge = await generatePKCEChallenge(codeVerifier);
|
|
13935
14038
|
const codeChallengeMethod = codeVerifier === codeChallenge ? "plain" : "s256";
|
|
13936
|
-
return [codeChallenge, codeChallengeMethod];
|
|
14039
|
+
return [codeChallenge, codeChallengeMethod, flowId];
|
|
13937
14040
|
}
|
|
13938
14041
|
var API_VERSION_REGEX = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
|
|
13939
14042
|
function parseResponseAPIVersion(response) {
|
|
@@ -14036,7 +14139,7 @@ var require_helpers = __commonJS((exports) => {
|
|
|
14036
14139
|
}
|
|
14037
14140
|
});
|
|
14038
14141
|
|
|
14039
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14142
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/fetch.js
|
|
14040
14143
|
var require_fetch = __commonJS((exports) => {
|
|
14041
14144
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14042
14145
|
exports.handleError = handleError2;
|
|
@@ -14150,7 +14253,6 @@ var require_fetch = __commonJS((exports) => {
|
|
|
14150
14253
|
try {
|
|
14151
14254
|
result = await fetcher(url, Object.assign({}, requestParams));
|
|
14152
14255
|
} catch (e) {
|
|
14153
|
-
console.error(e);
|
|
14154
14256
|
throw new errors_1.AuthRetryableFetchError(_getErrorMessage2(e), 0);
|
|
14155
14257
|
}
|
|
14156
14258
|
if (!result.ok) {
|
|
@@ -14218,14 +14320,14 @@ var require_fetch = __commonJS((exports) => {
|
|
|
14218
14320
|
}
|
|
14219
14321
|
});
|
|
14220
14322
|
|
|
14221
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14323
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/types.js
|
|
14222
14324
|
var require_types2 = __commonJS((exports) => {
|
|
14223
14325
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14224
14326
|
exports.SIGN_OUT_SCOPES = undefined;
|
|
14225
14327
|
exports.SIGN_OUT_SCOPES = ["global", "local", "others"];
|
|
14226
14328
|
});
|
|
14227
14329
|
|
|
14228
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14330
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
|
|
14229
14331
|
var require_GoTrueAdminApi = __commonJS((exports) => {
|
|
14230
14332
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14231
14333
|
var tslib_1 = require_tslib();
|
|
@@ -14672,7 +14774,7 @@ var require_GoTrueAdminApi = __commonJS((exports) => {
|
|
|
14672
14774
|
exports.default = GoTrueAdminApi;
|
|
14673
14775
|
});
|
|
14674
14776
|
|
|
14675
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14777
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
|
|
14676
14778
|
var require_local_storage = __commonJS((exports) => {
|
|
14677
14779
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14678
14780
|
exports.memoryLocalStorageAdapter = memoryLocalStorageAdapter;
|
|
@@ -14691,7 +14793,7 @@ var require_local_storage = __commonJS((exports) => {
|
|
|
14691
14793
|
}
|
|
14692
14794
|
});
|
|
14693
14795
|
|
|
14694
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14796
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/locks.js
|
|
14695
14797
|
var require_locks = __commonJS((exports) => {
|
|
14696
14798
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14697
14799
|
exports.ProcessLockAcquireTimeoutError = exports.NavigatorLockAcquireTimeoutError = exports.LockAcquireTimeoutError = exports.internals = undefined;
|
|
@@ -14865,7 +14967,7 @@ var require_locks = __commonJS((exports) => {
|
|
|
14865
14967
|
}
|
|
14866
14968
|
});
|
|
14867
14969
|
|
|
14868
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14970
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
|
|
14869
14971
|
var require_polyfills = __commonJS((exports) => {
|
|
14870
14972
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14871
14973
|
exports.polyfillGlobalThis = polyfillGlobalThis;
|
|
@@ -14889,7 +14991,7 @@ var require_polyfills = __commonJS((exports) => {
|
|
|
14889
14991
|
}
|
|
14890
14992
|
});
|
|
14891
14993
|
|
|
14892
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
14994
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js
|
|
14893
14995
|
var require_ethereum = __commonJS((exports) => {
|
|
14894
14996
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14895
14997
|
exports.getAddress = getAddress;
|
|
@@ -14966,7 +15068,7 @@ ${suffix}`;
|
|
|
14966
15068
|
}
|
|
14967
15069
|
});
|
|
14968
15070
|
|
|
14969
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
15071
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js
|
|
14970
15072
|
var require_webauthn_errors = __commonJS((exports) => {
|
|
14971
15073
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14972
15074
|
exports.WebAuthnUnknownError = exports.WebAuthnError = undefined;
|
|
@@ -15153,7 +15255,7 @@ var require_webauthn_errors = __commonJS((exports) => {
|
|
|
15153
15255
|
}
|
|
15154
15256
|
});
|
|
15155
15257
|
|
|
15156
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
15258
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js
|
|
15157
15259
|
var require_webauthn = __commonJS((exports) => {
|
|
15158
15260
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15159
15261
|
exports.WebAuthnApi = exports.DEFAULT_REQUEST_OPTIONS = exports.DEFAULT_CREATION_OPTIONS = exports.webAuthnAbortService = exports.WebAuthnAbortService = exports.identifyAuthenticationError = exports.identifyRegistrationError = exports.isWebAuthnError = exports.WebAuthnError = undefined;
|
|
@@ -15607,7 +15709,7 @@ var require_webauthn = __commonJS((exports) => {
|
|
|
15607
15709
|
exports.WebAuthnApi = WebAuthnApi;
|
|
15608
15710
|
});
|
|
15609
15711
|
|
|
15610
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
15712
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
|
|
15611
15713
|
var require_GoTrueClient = __commonJS((exports) => {
|
|
15612
15714
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15613
15715
|
var tslib_1 = require_tslib();
|
|
@@ -15906,6 +16008,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
15906
16008
|
}
|
|
15907
16009
|
async signUp(credentials) {
|
|
15908
16010
|
var _a, _b, _c;
|
|
16011
|
+
let flowId = null;
|
|
15909
16012
|
try {
|
|
15910
16013
|
let res;
|
|
15911
16014
|
if ("email" in credentials) {
|
|
@@ -15913,11 +16016,11 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
15913
16016
|
let codeChallenge = null;
|
|
15914
16017
|
let codeChallengeMethod = null;
|
|
15915
16018
|
if (this.flowType === "pkce") {
|
|
15916
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
16019
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
15917
16020
|
}
|
|
15918
16021
|
res = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/signup`, {
|
|
15919
16022
|
headers: this.headers,
|
|
15920
|
-
redirectTo: options === null || options === undefined ? undefined : options.emailRedirectTo,
|
|
16023
|
+
redirectTo: this._maybeAppendFlowIdToRedirect(options === null || options === undefined ? undefined : options.emailRedirectTo, flowId),
|
|
15921
16024
|
body: {
|
|
15922
16025
|
email,
|
|
15923
16026
|
password,
|
|
@@ -15946,7 +16049,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
15946
16049
|
}
|
|
15947
16050
|
const { data, error } = res;
|
|
15948
16051
|
if (error || !data) {
|
|
15949
|
-
await (0, helpers_1.
|
|
16052
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
15950
16053
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
15951
16054
|
}
|
|
15952
16055
|
const session = data.session;
|
|
@@ -15957,7 +16060,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
15957
16060
|
}
|
|
15958
16061
|
return this._returnResult({ data: { user, session }, error: null });
|
|
15959
16062
|
} catch (error) {
|
|
15960
|
-
await (0, helpers_1.
|
|
16063
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
15961
16064
|
if ((0, errors_1.isAuthError)(error)) {
|
|
15962
16065
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
15963
16066
|
}
|
|
@@ -16023,14 +16126,14 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16023
16126
|
skipBrowserRedirect: (_d = credentials.options) === null || _d === undefined ? undefined : _d.skipBrowserRedirect
|
|
16024
16127
|
});
|
|
16025
16128
|
}
|
|
16026
|
-
async exchangeCodeForSession(authCode) {
|
|
16129
|
+
async exchangeCodeForSession(authCode, options) {
|
|
16027
16130
|
await this.initializePromise;
|
|
16028
16131
|
if (this.lock != null) {
|
|
16029
16132
|
return this._acquireLock(this.lockAcquireTimeout, async () => {
|
|
16030
|
-
return this._exchangeCodeForSession(authCode);
|
|
16133
|
+
return this._exchangeCodeForSession(authCode, options);
|
|
16031
16134
|
});
|
|
16032
16135
|
}
|
|
16033
|
-
return this._exchangeCodeForSession(authCode);
|
|
16136
|
+
return this._exchangeCodeForSession(authCode, options);
|
|
16034
16137
|
}
|
|
16035
16138
|
async signInWithWeb3(credentials) {
|
|
16036
16139
|
const { chain } = credentials;
|
|
@@ -16234,8 +16337,13 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16234
16337
|
throw error;
|
|
16235
16338
|
}
|
|
16236
16339
|
}
|
|
16237
|
-
async _exchangeCodeForSession(authCode) {
|
|
16238
|
-
const
|
|
16340
|
+
async _exchangeCodeForSession(authCode, options) {
|
|
16341
|
+
const hasExplicitFlowId = (options === null || options === undefined ? undefined : options.flowId) != null;
|
|
16342
|
+
const requestedFlowId = hasExplicitFlowId ? (0, helpers_1.validatePKCEFlowId)(options === null || options === undefined ? undefined : options.flowId) : (0, helpers_1.isBrowser)() ? (0, helpers_1.validatePKCEFlowId)((0, helpers_1.parseParametersFromURL)(window.location.href)[constants_1.PKCE_FLOW_ID_PARAM]) : null;
|
|
16343
|
+
if (hasExplicitFlowId && !requestedFlowId) {
|
|
16344
|
+
this._debug("#_exchangeCodeForSession()", "provided flowId is not a valid flow id", options === null || options === undefined ? undefined : options.flowId);
|
|
16345
|
+
}
|
|
16346
|
+
const { verifier: storageItem, flowId } = hasExplicitFlowId && !requestedFlowId ? { verifier: null, flowId: null } : await (0, helpers_1.retrievePKCEVerifier)(this.storage, this.storageKey, requestedFlowId);
|
|
16239
16347
|
const [codeVerifier, redirectType] = (storageItem !== null && storageItem !== undefined ? storageItem : "").split("/");
|
|
16240
16348
|
try {
|
|
16241
16349
|
if (!codeVerifier && this.flowType === "pkce") {
|
|
@@ -16249,7 +16357,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16249
16357
|
},
|
|
16250
16358
|
xform: fetch_1._sessionResponse
|
|
16251
16359
|
});
|
|
16252
|
-
await (0, helpers_1.
|
|
16360
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16253
16361
|
if (error) {
|
|
16254
16362
|
throw error;
|
|
16255
16363
|
}
|
|
@@ -16266,7 +16374,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16266
16374
|
}
|
|
16267
16375
|
return this._returnResult({ data: Object.assign(Object.assign({}, data), { redirectType: redirectType !== null && redirectType !== undefined ? redirectType : null }), error });
|
|
16268
16376
|
} catch (error) {
|
|
16269
|
-
await (0, helpers_1.
|
|
16377
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16270
16378
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16271
16379
|
return this._returnResult({
|
|
16272
16380
|
data: { user: null, session: null, redirectType: null },
|
|
@@ -16311,13 +16419,14 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16311
16419
|
}
|
|
16312
16420
|
async signInWithOtp(credentials) {
|
|
16313
16421
|
var _a, _b, _c, _d, _f;
|
|
16422
|
+
let flowId = null;
|
|
16314
16423
|
try {
|
|
16315
16424
|
if ("email" in credentials) {
|
|
16316
16425
|
const { email, options } = credentials;
|
|
16317
16426
|
let codeChallenge = null;
|
|
16318
16427
|
let codeChallengeMethod = null;
|
|
16319
16428
|
if (this.flowType === "pkce") {
|
|
16320
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
16429
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
16321
16430
|
}
|
|
16322
16431
|
const { error } = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/otp`, {
|
|
16323
16432
|
headers: this.headers,
|
|
@@ -16329,7 +16438,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16329
16438
|
code_challenge: codeChallenge,
|
|
16330
16439
|
code_challenge_method: codeChallengeMethod
|
|
16331
16440
|
},
|
|
16332
|
-
redirectTo: options === null || options === undefined ? undefined : options.emailRedirectTo
|
|
16441
|
+
redirectTo: this._maybeAppendFlowIdToRedirect(options === null || options === undefined ? undefined : options.emailRedirectTo, flowId)
|
|
16333
16442
|
});
|
|
16334
16443
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
16335
16444
|
}
|
|
@@ -16352,7 +16461,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16352
16461
|
}
|
|
16353
16462
|
throw new errors_1.AuthInvalidCredentialsError("You must provide either an email or phone number.");
|
|
16354
16463
|
} catch (error) {
|
|
16355
|
-
await (0, helpers_1.
|
|
16464
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16356
16465
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16357
16466
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
16358
16467
|
}
|
|
@@ -16396,24 +16505,25 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16396
16505
|
}
|
|
16397
16506
|
}
|
|
16398
16507
|
async signInWithSSO(params) {
|
|
16399
|
-
var _a, _b, _c, _d
|
|
16508
|
+
var _a, _b, _c, _d;
|
|
16509
|
+
let flowId = null;
|
|
16400
16510
|
try {
|
|
16401
16511
|
let codeChallenge = null;
|
|
16402
16512
|
let codeChallengeMethod = null;
|
|
16403
16513
|
if (this.flowType === "pkce") {
|
|
16404
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
16514
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
16405
16515
|
}
|
|
16406
16516
|
const result = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/sso`, {
|
|
16407
|
-
body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, "providerId" in params ? { provider_id: params.providerId } : null), "domain" in params ? { domain: params.domain } : null), { redirect_to: (
|
|
16517
|
+
body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, "providerId" in params ? { provider_id: params.providerId } : null), "domain" in params ? { domain: params.domain } : null), { redirect_to: this._maybeAppendFlowIdToRedirect((_a = params.options) === null || _a === undefined ? undefined : _a.redirectTo, flowId) }), ((_b = params === null || params === undefined ? undefined : params.options) === null || _b === undefined ? undefined : _b.captchaToken) ? { gotrue_meta_security: { captcha_token: params.options.captchaToken } } : null), { skip_http_redirect: true, code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
|
|
16408
16518
|
headers: this.headers,
|
|
16409
16519
|
xform: fetch_1._ssoResponse
|
|
16410
16520
|
});
|
|
16411
|
-
if (((
|
|
16521
|
+
if (((_c = result.data) === null || _c === undefined ? undefined : _c.url) && (0, helpers_1.isBrowser)() && !((_d = params.options) === null || _d === undefined ? undefined : _d.skipBrowserRedirect)) {
|
|
16412
16522
|
window.location.assign(result.data.url);
|
|
16413
16523
|
}
|
|
16414
16524
|
return this._returnResult(result);
|
|
16415
16525
|
} catch (error) {
|
|
16416
|
-
await (0, helpers_1.
|
|
16526
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16417
16527
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16418
16528
|
return this._returnResult({ data: null, error });
|
|
16419
16529
|
}
|
|
@@ -16451,6 +16561,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16451
16561
|
}
|
|
16452
16562
|
}
|
|
16453
16563
|
async resend(credentials) {
|
|
16564
|
+
let flowId = null;
|
|
16454
16565
|
try {
|
|
16455
16566
|
const endpoint = `${this.url}/resend`;
|
|
16456
16567
|
if ("email" in credentials) {
|
|
@@ -16458,7 +16569,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16458
16569
|
let codeChallenge = null;
|
|
16459
16570
|
let codeChallengeMethod = null;
|
|
16460
16571
|
if (this.flowType === "pkce") {
|
|
16461
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
16572
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
16462
16573
|
}
|
|
16463
16574
|
const { error } = await (0, fetch_1._request)(this.fetch, "POST", endpoint, {
|
|
16464
16575
|
headers: this.headers,
|
|
@@ -16469,10 +16580,10 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16469
16580
|
code_challenge: codeChallenge,
|
|
16470
16581
|
code_challenge_method: codeChallengeMethod
|
|
16471
16582
|
},
|
|
16472
|
-
redirectTo: options === null || options === undefined ? undefined : options.emailRedirectTo
|
|
16583
|
+
redirectTo: this._maybeAppendFlowIdToRedirect(options === null || options === undefined ? undefined : options.emailRedirectTo, flowId)
|
|
16473
16584
|
});
|
|
16474
16585
|
if (error) {
|
|
16475
|
-
await (0, helpers_1.
|
|
16586
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16476
16587
|
}
|
|
16477
16588
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
16478
16589
|
} else if ("phone" in credentials) {
|
|
@@ -16492,7 +16603,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16492
16603
|
}
|
|
16493
16604
|
throw new errors_1.AuthInvalidCredentialsError("You must provide either an email or phone number and a type");
|
|
16494
16605
|
} catch (error) {
|
|
16495
|
-
await (0, helpers_1.
|
|
16606
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16496
16607
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16497
16608
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
16498
16609
|
}
|
|
@@ -16665,7 +16776,6 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16665
16776
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16666
16777
|
if ((0, errors_1.isAuthSessionMissingError)(error)) {
|
|
16667
16778
|
await this._removeSession();
|
|
16668
|
-
await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
|
|
16669
16779
|
}
|
|
16670
16780
|
return this._returnResult({ data: { user: null }, error });
|
|
16671
16781
|
}
|
|
@@ -16682,6 +16792,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16682
16792
|
return await this._updateUser(attributes, options);
|
|
16683
16793
|
}
|
|
16684
16794
|
async _updateUser(attributes, options = {}) {
|
|
16795
|
+
let flowId = null;
|
|
16685
16796
|
try {
|
|
16686
16797
|
return await this._useSession(async (result) => {
|
|
16687
16798
|
const { data: sessionData, error: sessionError } = result;
|
|
@@ -16695,11 +16806,11 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16695
16806
|
let codeChallenge = null;
|
|
16696
16807
|
let codeChallengeMethod = null;
|
|
16697
16808
|
if (this.flowType === "pkce" && attributes.email != null) {
|
|
16698
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
16809
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
16699
16810
|
}
|
|
16700
16811
|
const { data, error: userError2 } = await (0, fetch_1._request)(this.fetch, "PUT", `${this.url}/user`, {
|
|
16701
16812
|
headers: this.headers,
|
|
16702
|
-
redirectTo: options === null || options === undefined ? undefined : options.emailRedirectTo,
|
|
16813
|
+
redirectTo: this._maybeAppendFlowIdToRedirect(options === null || options === undefined ? undefined : options.emailRedirectTo, flowId),
|
|
16703
16814
|
body: Object.assign(Object.assign({}, attributes), { code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
|
|
16704
16815
|
jwt: session.access_token,
|
|
16705
16816
|
xform: fetch_1._userResponse
|
|
@@ -16713,7 +16824,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16713
16824
|
return this._returnResult({ data: { user: session.user }, error: null });
|
|
16714
16825
|
});
|
|
16715
16826
|
} catch (error) {
|
|
16716
|
-
await (0, helpers_1.
|
|
16827
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
16717
16828
|
if ((0, errors_1.isAuthError)(error)) {
|
|
16718
16829
|
return this._returnResult({ data: { user: null }, error });
|
|
16719
16830
|
}
|
|
@@ -16843,11 +16954,14 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16843
16954
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
16844
16955
|
if (!params.code)
|
|
16845
16956
|
throw new errors_1.AuthPKCEGrantCodeExchangeError("No code detected.");
|
|
16846
|
-
const { data: data2, error: error2 } = await this._exchangeCodeForSession(params.code
|
|
16957
|
+
const { data: data2, error: error2 } = await this._exchangeCodeForSession(params.code, {
|
|
16958
|
+
flowId: params[constants_1.PKCE_FLOW_ID_PARAM]
|
|
16959
|
+
});
|
|
16847
16960
|
if (error2)
|
|
16848
16961
|
throw error2;
|
|
16849
16962
|
const url = new URL(window.location.href);
|
|
16850
16963
|
url.searchParams.delete("code");
|
|
16964
|
+
url.searchParams.delete(constants_1.PKCE_FLOW_ID_PARAM);
|
|
16851
16965
|
window.history.replaceState(window.history.state, "", url.toString());
|
|
16852
16966
|
return {
|
|
16853
16967
|
data: { session: data2.session, redirectType: (_a = data2.redirectType) !== null && _a !== undefined ? _a : null },
|
|
@@ -16904,8 +17018,15 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16904
17018
|
return Boolean(params.access_token || params.error || params.error_description || params.error_code);
|
|
16905
17019
|
}
|
|
16906
17020
|
async _isPKCECallback(params) {
|
|
17021
|
+
if (!params.code) {
|
|
17022
|
+
return false;
|
|
17023
|
+
}
|
|
17024
|
+
const flowId = (0, helpers_1.validatePKCEFlowId)(params[constants_1.PKCE_FLOW_ID_PARAM]);
|
|
17025
|
+
if (flowId && await (0, helpers_1.getItemAsync)(this.storage, (0, helpers_1.pkceVerifierSlotKey)(this.storageKey, flowId))) {
|
|
17026
|
+
return true;
|
|
17027
|
+
}
|
|
16907
17028
|
const currentStorageContent = await (0, helpers_1.getItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
|
|
16908
|
-
return !!
|
|
17029
|
+
return !!currentStorageContent;
|
|
16909
17030
|
}
|
|
16910
17031
|
async signOut(options = { scope: "global" }) {
|
|
16911
17032
|
await this.initializePromise;
|
|
@@ -16921,7 +17042,6 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16921
17042
|
var _a;
|
|
16922
17043
|
const removeCurrentSession = async () => {
|
|
16923
17044
|
await this._removeSession();
|
|
16924
|
-
await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
|
|
16925
17045
|
};
|
|
16926
17046
|
const { data, error: sessionError } = result;
|
|
16927
17047
|
if (sessionError && !(0, errors_1.isAuthSessionMissingError)(sessionError)) {
|
|
@@ -16981,7 +17101,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16981
17101
|
} catch (err) {
|
|
16982
17102
|
await ((_b = this.stateChangeEmitters.get(id)) === null || _b === undefined ? undefined : _b.callback("INITIAL_SESSION", null));
|
|
16983
17103
|
this._debug("INITIAL_SESSION", "callback id", id, "error", err);
|
|
16984
|
-
if ((0, errors_1.isAuthSessionMissingError)(err)) {
|
|
17104
|
+
if ((0, errors_1.isAuthSessionMissingError)(err) || (0, errors_1.isAuthRetryableFetchError)(err) || (0, errors_1.isAuthApiError)(err) && (err.code === "refresh_token_not_found" || err.code === "refresh_token_already_used" || err.code === "session_expired")) {
|
|
16985
17105
|
console.warn(err);
|
|
16986
17106
|
} else {
|
|
16987
17107
|
console.error(err);
|
|
@@ -16992,8 +17112,9 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
16992
17112
|
async resetPasswordForEmail(email, options = {}) {
|
|
16993
17113
|
let codeChallenge = null;
|
|
16994
17114
|
let codeChallengeMethod = null;
|
|
17115
|
+
let flowId = null;
|
|
16995
17116
|
if (this.flowType === "pkce") {
|
|
16996
|
-
[codeChallenge, codeChallengeMethod] = await
|
|
17117
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod(true);
|
|
16997
17118
|
}
|
|
16998
17119
|
try {
|
|
16999
17120
|
return await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/recover`, {
|
|
@@ -17004,10 +17125,10 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17004
17125
|
gotrue_meta_security: { captcha_token: options.captchaToken }
|
|
17005
17126
|
},
|
|
17006
17127
|
headers: this.headers,
|
|
17007
|
-
redirectTo: options.redirectTo
|
|
17128
|
+
redirectTo: this._maybeAppendFlowIdToRedirect(options.redirectTo, flowId)
|
|
17008
17129
|
});
|
|
17009
17130
|
} catch (error) {
|
|
17010
|
-
await (0, helpers_1.
|
|
17131
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, flowId);
|
|
17011
17132
|
if ((0, errors_1.isAuthError)(error)) {
|
|
17012
17133
|
return this._returnResult({ data: null, error });
|
|
17013
17134
|
}
|
|
@@ -17036,18 +17157,20 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17036
17157
|
}
|
|
17037
17158
|
async linkIdentityOAuth(credentials) {
|
|
17038
17159
|
var _a;
|
|
17160
|
+
let flowId = null;
|
|
17039
17161
|
try {
|
|
17040
17162
|
const { data, error } = await this._useSession(async (result) => {
|
|
17041
17163
|
var _a2, _b, _c, _d, _f;
|
|
17042
17164
|
const { data: data2, error: error2 } = result;
|
|
17043
17165
|
if (error2)
|
|
17044
17166
|
throw error2;
|
|
17045
|
-
const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
|
|
17167
|
+
const { url, flowId: urlFlowId } = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
|
|
17046
17168
|
redirectTo: (_a2 = credentials.options) === null || _a2 === undefined ? undefined : _a2.redirectTo,
|
|
17047
17169
|
scopes: (_b = credentials.options) === null || _b === undefined ? undefined : _b.scopes,
|
|
17048
17170
|
queryParams: (_c = credentials.options) === null || _c === undefined ? undefined : _c.queryParams,
|
|
17049
17171
|
skipBrowserRedirect: true
|
|
17050
17172
|
});
|
|
17173
|
+
flowId = urlFlowId;
|
|
17051
17174
|
return await (0, fetch_1._request)(this.fetch, "GET", url, {
|
|
17052
17175
|
headers: this.headers,
|
|
17053
17176
|
jwt: (_f = (_d = data2.session) === null || _d === undefined ? undefined : _d.access_token) !== null && _f !== undefined ? _f : undefined
|
|
@@ -17059,12 +17182,15 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17059
17182
|
window.location.assign(data === null || data === undefined ? undefined : data.url);
|
|
17060
17183
|
}
|
|
17061
17184
|
return this._returnResult({
|
|
17062
|
-
data: { provider: credentials.provider, url: data === null || data === undefined ? undefined : data.url },
|
|
17185
|
+
data: { provider: credentials.provider, url: data === null || data === undefined ? undefined : data.url, flowId },
|
|
17063
17186
|
error: null
|
|
17064
17187
|
});
|
|
17065
17188
|
} catch (error) {
|
|
17066
17189
|
if ((0, errors_1.isAuthError)(error)) {
|
|
17067
|
-
return this._returnResult({
|
|
17190
|
+
return this._returnResult({
|
|
17191
|
+
data: { provider: credentials.provider, url: null, flowId },
|
|
17192
|
+
error
|
|
17193
|
+
});
|
|
17068
17194
|
}
|
|
17069
17195
|
throw error;
|
|
17070
17196
|
}
|
|
@@ -17105,7 +17231,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17105
17231
|
}
|
|
17106
17232
|
return this._returnResult({ data, error });
|
|
17107
17233
|
} catch (error) {
|
|
17108
|
-
await (0, helpers_1.
|
|
17234
|
+
await (0, helpers_1.removePKCEVerifier)(this.storage, this.storageKey, null);
|
|
17109
17235
|
if ((0, errors_1.isAuthError)(error)) {
|
|
17110
17236
|
return this._returnResult({ data: { user: null, session: null }, error });
|
|
17111
17237
|
}
|
|
@@ -17167,7 +17293,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17167
17293
|
return isValidSession;
|
|
17168
17294
|
}
|
|
17169
17295
|
async _handleProviderSignIn(provider, options) {
|
|
17170
|
-
const url = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
|
|
17296
|
+
const { url, flowId } = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
|
|
17171
17297
|
redirectTo: options.redirectTo,
|
|
17172
17298
|
scopes: options.scopes,
|
|
17173
17299
|
queryParams: options.queryParams
|
|
@@ -17176,7 +17302,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17176
17302
|
if ((0, helpers_1.isBrowser)() && !options.skipBrowserRedirect) {
|
|
17177
17303
|
window.location.assign(url);
|
|
17178
17304
|
}
|
|
17179
|
-
return { data: { provider, url }, error: null };
|
|
17305
|
+
return { data: { provider, url, flowId }, error: null };
|
|
17180
17306
|
}
|
|
17181
17307
|
async _recoverAndRefresh() {
|
|
17182
17308
|
var _a, _b;
|
|
@@ -17243,7 +17369,11 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17243
17369
|
}
|
|
17244
17370
|
} catch (err) {
|
|
17245
17371
|
this._debug(debugName, "error", err);
|
|
17246
|
-
|
|
17372
|
+
if ((0, errors_1.isAuthRetryableFetchError)(err)) {
|
|
17373
|
+
console.warn(err);
|
|
17374
|
+
} else {
|
|
17375
|
+
console.error(err);
|
|
17376
|
+
}
|
|
17247
17377
|
return;
|
|
17248
17378
|
} finally {
|
|
17249
17379
|
this._debug(debugName, "end");
|
|
@@ -17389,7 +17519,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17389
17519
|
this.lastRefreshFailure = null;
|
|
17390
17520
|
this.suppressGetSessionWarning = false;
|
|
17391
17521
|
await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey);
|
|
17392
|
-
await (0, helpers_1.
|
|
17522
|
+
await (0, helpers_1.removeAllPKCEVerifiers)(this.storage, this.storageKey);
|
|
17393
17523
|
await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey + "-user");
|
|
17394
17524
|
if (this.userStorage) {
|
|
17395
17525
|
await (0, helpers_1.removeItemAsync)(this.userStorage, this.storageKey + "-user");
|
|
@@ -17574,15 +17704,22 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17574
17704
|
}
|
|
17575
17705
|
}
|
|
17576
17706
|
async _getUrlForProvider(url, provider, options) {
|
|
17707
|
+
let redirectTo = options === null || options === undefined ? undefined : options.redirectTo;
|
|
17708
|
+
let codeChallenge = null;
|
|
17709
|
+
let codeChallengeMethod = null;
|
|
17710
|
+
let flowId = null;
|
|
17711
|
+
if (this.flowType === "pkce") {
|
|
17712
|
+
[codeChallenge, codeChallengeMethod, flowId] = await this._getCodeChallengeAndMethod();
|
|
17713
|
+
redirectTo = this._maybeAppendFlowIdToRedirect(redirectTo, flowId);
|
|
17714
|
+
}
|
|
17577
17715
|
const urlParams = [`provider=${encodeURIComponent(provider)}`];
|
|
17578
|
-
if (
|
|
17579
|
-
urlParams.push(`redirect_to=${encodeURIComponent(
|
|
17716
|
+
if (redirectTo) {
|
|
17717
|
+
urlParams.push(`redirect_to=${encodeURIComponent(redirectTo)}`);
|
|
17580
17718
|
}
|
|
17581
17719
|
if (options === null || options === undefined ? undefined : options.scopes) {
|
|
17582
17720
|
urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);
|
|
17583
17721
|
}
|
|
17584
|
-
if (
|
|
17585
|
-
const [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
|
|
17722
|
+
if (codeChallenge != null && codeChallengeMethod != null) {
|
|
17586
17723
|
const flowParams = new URLSearchParams({
|
|
17587
17724
|
code_challenge: `${encodeURIComponent(codeChallenge)}`,
|
|
17588
17725
|
code_challenge_method: `${encodeURIComponent(codeChallengeMethod)}`
|
|
@@ -17596,7 +17733,16 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
17596
17733
|
if (options === null || options === undefined ? undefined : options.skipBrowserRedirect) {
|
|
17597
17734
|
urlParams.push(`skip_http_redirect=${options.skipBrowserRedirect}`);
|
|
17598
17735
|
}
|
|
17599
|
-
return `${url}?${urlParams.join("&")}
|
|
17736
|
+
return { url: `${url}?${urlParams.join("&")}`, flowId };
|
|
17737
|
+
}
|
|
17738
|
+
_maybeAppendFlowIdToRedirect(redirectTo, flowId) {
|
|
17739
|
+
if (!redirectTo || !flowId || !this.experimental.appendPkceFlowIdToRedirects) {
|
|
17740
|
+
return redirectTo !== null && redirectTo !== undefined ? redirectTo : undefined;
|
|
17741
|
+
}
|
|
17742
|
+
return (0, helpers_1.appendFlowIdToRedirectTo)(redirectTo, flowId);
|
|
17743
|
+
}
|
|
17744
|
+
async _getCodeChallengeAndMethod(isPasswordRecovery = false) {
|
|
17745
|
+
return (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey, isPasswordRecovery, (evictedFlowId) => this._debug("#_getCodeChallengeAndMethod()", "evicted oldest pending PKCE verifier slot", evictedFlowId));
|
|
17600
17746
|
}
|
|
17601
17747
|
async _unenroll(params) {
|
|
17602
17748
|
try {
|
|
@@ -18302,7 +18448,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
18302
18448
|
exports.default = GoTrueClient;
|
|
18303
18449
|
});
|
|
18304
18450
|
|
|
18305
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
18451
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
|
|
18306
18452
|
var require_AuthAdminApi = __commonJS((exports) => {
|
|
18307
18453
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18308
18454
|
var tslib_1 = require_tslib();
|
|
@@ -18311,7 +18457,7 @@ var require_AuthAdminApi = __commonJS((exports) => {
|
|
|
18311
18457
|
exports.default = AuthAdminApi;
|
|
18312
18458
|
});
|
|
18313
18459
|
|
|
18314
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
18460
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/AuthClient.js
|
|
18315
18461
|
var require_AuthClient = __commonJS((exports) => {
|
|
18316
18462
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18317
18463
|
var tslib_1 = require_tslib();
|
|
@@ -18320,7 +18466,7 @@ var require_AuthClient = __commonJS((exports) => {
|
|
|
18320
18466
|
exports.default = AuthClient;
|
|
18321
18467
|
});
|
|
18322
18468
|
|
|
18323
|
-
// ../../node_modules/.bun/@supabase+auth-js@2.
|
|
18469
|
+
// ../../node_modules/.bun/@supabase+auth-js@2.111.0/node_modules/@supabase/auth-js/dist/main/index.js
|
|
18324
18470
|
var require_main3 = __commonJS((exports) => {
|
|
18325
18471
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18326
18472
|
exports.processLock = exports.lockInternals = exports.NavigatorLockAcquireTimeoutError = exports.navigatorLock = exports.AuthClient = exports.AuthAdminApi = exports.GoTrueClient = exports.GoTrueAdminApi = undefined;
|
|
@@ -18350,7 +18496,7 @@ var require_main3 = __commonJS((exports) => {
|
|
|
18350
18496
|
} });
|
|
18351
18497
|
});
|
|
18352
18498
|
|
|
18353
|
-
// ../../node_modules/.bun/@supabase+supabase-js@2.
|
|
18499
|
+
// ../../node_modules/.bun/@supabase+supabase-js@2.111.0/node_modules/@supabase/supabase-js/dist/index.mjs
|
|
18354
18500
|
var exports_dist = {};
|
|
18355
18501
|
__export(exports_dist, {
|
|
18356
18502
|
createClient: () => createClient,
|
|
@@ -18598,7 +18744,7 @@ function validateSupabaseUrl(supabaseUrl) {
|
|
|
18598
18744
|
}
|
|
18599
18745
|
}
|
|
18600
18746
|
function shouldShowDeprecationWarning() {
|
|
18601
|
-
if (typeof window !== "undefined")
|
|
18747
|
+
if (typeof window !== "undefined" || globalThis["Deno"] !== undefined)
|
|
18602
18748
|
return false;
|
|
18603
18749
|
const _process = globalThis["process"];
|
|
18604
18750
|
if (!_process)
|
|
@@ -18611,7 +18757,7 @@ function shouldShowDeprecationWarning() {
|
|
|
18611
18757
|
return false;
|
|
18612
18758
|
return parseInt(versionMatch[1], 10) <= 20;
|
|
18613
18759
|
}
|
|
18614
|
-
var import_functions_js, import_realtime_js, import_auth_js, version2 = "2.
|
|
18760
|
+
var import_functions_js, import_realtime_js, import_auth_js, version2 = "2.111.0", JS_ENV = "", JS_RUNTIME_VERSION, _Deno$version, _process$version, _runtimeMeta, DEFAULT_HEADERS2, DEFAULT_GLOBAL_OPTIONS, DEFAULT_DB_OPTIONS, DEFAULT_AUTH_OPTIONS, DEFAULT_REALTIME_OPTIONS, DEFAULT_TRACE_PROPAGATION_OPTIONS, otelModulePromise = null, OTEL_PKG = "@opentelemetry/api", resolveFetch2 = (customFetch) => {
|
|
18615
18761
|
if (customFetch)
|
|
18616
18762
|
return (...args) => customFetch(...args);
|
|
18617
18763
|
return (...args) => fetch(...args);
|
|
@@ -58858,7 +59004,7 @@ var init_v4_mini = __esm(() => {
|
|
|
58858
59004
|
init_mini();
|
|
58859
59005
|
});
|
|
58860
59006
|
|
|
58861
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
59007
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
58862
59008
|
function isZ4Schema(s) {
|
|
58863
59009
|
const schema = s;
|
|
58864
59010
|
return !!schema._zod;
|
|
@@ -59665,7 +59811,7 @@ var init_v4 = __esm(() => {
|
|
|
59665
59811
|
init_classic();
|
|
59666
59812
|
});
|
|
59667
59813
|
|
|
59668
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
59814
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
59669
59815
|
var LATEST_PROTOCOL_VERSION = "2025-11-25", SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task", JSONRPC_VERSION = "2.0", AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success, JSONRPCNotificationSchema, isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success, JSONRPCResultResponseSchema, isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError;
|
|
59670
59816
|
var init_types4 = __esm(() => {
|
|
59671
59817
|
init_v4();
|
|
@@ -60493,7 +60639,7 @@ var init_types4 = __esm(() => {
|
|
|
60493
60639
|
};
|
|
60494
60640
|
});
|
|
60495
60641
|
|
|
60496
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
60642
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
60497
60643
|
function isTerminal(status) {
|
|
60498
60644
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
60499
60645
|
}
|
|
@@ -60711,7 +60857,7 @@ var init_esm = __esm(() => {
|
|
|
60711
60857
|
init_zodToJsonSchema();
|
|
60712
60858
|
});
|
|
60713
60859
|
|
|
60714
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
60860
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
60715
60861
|
function getMethodLiteral(schema) {
|
|
60716
60862
|
const shape = getObjectShape(schema);
|
|
60717
60863
|
const methodSchema = shape?.method;
|
|
@@ -60736,7 +60882,7 @@ var init_zod_json_schema_compat = __esm(() => {
|
|
|
60736
60882
|
init_esm();
|
|
60737
60883
|
});
|
|
60738
60884
|
|
|
60739
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
60885
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
60740
60886
|
class Protocol {
|
|
60741
60887
|
constructor(_options) {
|
|
60742
60888
|
this._options = _options;
|
|
@@ -64583,7 +64729,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
64583
64729
|
};
|
|
64584
64730
|
});
|
|
64585
64731
|
|
|
64586
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
64732
|
+
// ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js
|
|
64587
64733
|
var require_utils2 = __commonJS((exports, module) => {
|
|
64588
64734
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
64589
64735
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -64894,7 +65040,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
64894
65040
|
};
|
|
64895
65041
|
});
|
|
64896
65042
|
|
|
64897
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
65043
|
+
// ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js
|
|
64898
65044
|
var require_schemes = __commonJS((exports, module) => {
|
|
64899
65045
|
var { isUUID } = require_utils2();
|
|
64900
65046
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -65068,7 +65214,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
65068
65214
|
};
|
|
65069
65215
|
});
|
|
65070
65216
|
|
|
65071
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
65217
|
+
// ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/index.js
|
|
65072
65218
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
65073
65219
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils2();
|
|
65074
65220
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -65082,7 +65228,12 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
65082
65228
|
}
|
|
65083
65229
|
function resolve4(baseURI, relativeURI, options) {
|
|
65084
65230
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
65085
|
-
const
|
|
65231
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
|
|
65232
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
|
|
65233
|
+
if (baseMalformed || relativeMalformed) {
|
|
65234
|
+
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
65235
|
+
}
|
|
65236
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
65086
65237
|
schemelessOptions.skipEscape = true;
|
|
65087
65238
|
return serialize(resolved, schemelessOptions);
|
|
65088
65239
|
}
|
|
@@ -65208,6 +65359,8 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
65208
65359
|
return uriTokens.join("");
|
|
65209
65360
|
}
|
|
65210
65361
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
65362
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
65363
|
+
var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
65211
65364
|
function getParseError(parsed, matches) {
|
|
65212
65365
|
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
|
|
65213
65366
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -65237,6 +65390,25 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
65237
65390
|
uri = "//" + uri;
|
|
65238
65391
|
}
|
|
65239
65392
|
}
|
|
65393
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
65394
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
65395
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
65396
|
+
malformedAuthorityOrPort = true;
|
|
65397
|
+
}
|
|
65398
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
65399
|
+
if (introducerMatch !== null) {
|
|
65400
|
+
const region = introducerMatch[1];
|
|
65401
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
65402
|
+
if (normalizedRegion.length >= 2) {
|
|
65403
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
65404
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
65405
|
+
malformedAuthorityOrPort = true;
|
|
65406
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
65407
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
65408
|
+
malformedAuthorityOrPort = true;
|
|
65409
|
+
}
|
|
65410
|
+
}
|
|
65411
|
+
}
|
|
65240
65412
|
const matches = uri.match(URI_PARSE);
|
|
65241
65413
|
if (matches) {
|
|
65242
65414
|
parsed.scheme = matches[1];
|
|
@@ -68140,7 +68312,7 @@ var require_dist3 = __commonJS((exports, module) => {
|
|
|
68140
68312
|
exports.default = formatsPlugin;
|
|
68141
68313
|
});
|
|
68142
68314
|
|
|
68143
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68315
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
68144
68316
|
function createDefaultAjvInstance() {
|
|
68145
68317
|
const ajv = new import_ajv.default({
|
|
68146
68318
|
strict: false,
|
|
@@ -68183,7 +68355,7 @@ var init_ajv_provider = __esm(() => {
|
|
|
68183
68355
|
import_ajv_formats = __toESM(require_dist3(), 1);
|
|
68184
68356
|
});
|
|
68185
68357
|
|
|
68186
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68358
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
68187
68359
|
class ExperimentalServerTasks {
|
|
68188
68360
|
constructor(_server) {
|
|
68189
68361
|
this._server = _server;
|
|
@@ -68264,7 +68436,7 @@ var init_server = __esm(() => {
|
|
|
68264
68436
|
init_types4();
|
|
68265
68437
|
});
|
|
68266
68438
|
|
|
68267
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68439
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
68268
68440
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
68269
68441
|
if (!requests) {
|
|
68270
68442
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -68299,7 +68471,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
68299
68471
|
}
|
|
68300
68472
|
}
|
|
68301
68473
|
|
|
68302
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68474
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
68303
68475
|
var Server;
|
|
68304
68476
|
var init_server2 = __esm(() => {
|
|
68305
68477
|
init_protocol();
|
|
@@ -68354,16 +68526,7 @@ var init_server2 = __esm(() => {
|
|
|
68354
68526
|
if (!methodSchema) {
|
|
68355
68527
|
throw new Error("Schema is missing a method literal");
|
|
68356
68528
|
}
|
|
68357
|
-
|
|
68358
|
-
if (isZ4Schema(methodSchema)) {
|
|
68359
|
-
const v4Schema = methodSchema;
|
|
68360
|
-
const v4Def = v4Schema._zod?.def;
|
|
68361
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
68362
|
-
} else {
|
|
68363
|
-
const v3Schema = methodSchema;
|
|
68364
|
-
const legacyDef = v3Schema._def;
|
|
68365
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
68366
|
-
}
|
|
68529
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
68367
68530
|
if (typeof methodValue !== "string") {
|
|
68368
68531
|
throw new Error("Schema method literal must be a string");
|
|
68369
68532
|
}
|
|
@@ -68640,9 +68803,17 @@ var init_server2 = __esm(() => {
|
|
|
68640
68803
|
};
|
|
68641
68804
|
});
|
|
68642
68805
|
|
|
68643
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68806
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
68644
68807
|
class ReadBuffer {
|
|
68808
|
+
constructor(options) {
|
|
68809
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
68810
|
+
}
|
|
68645
68811
|
append(chunk) {
|
|
68812
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
68813
|
+
if (newSize > this._maxBufferSize) {
|
|
68814
|
+
this.clear();
|
|
68815
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
68816
|
+
}
|
|
68646
68817
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
68647
68818
|
}
|
|
68648
68819
|
readMessage() {
|
|
@@ -68669,26 +68840,33 @@ function serializeMessage(message) {
|
|
|
68669
68840
|
return JSON.stringify(message) + `
|
|
68670
68841
|
`;
|
|
68671
68842
|
}
|
|
68843
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
68672
68844
|
var init_stdio = __esm(() => {
|
|
68673
68845
|
init_types4();
|
|
68846
|
+
STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
68674
68847
|
});
|
|
68675
68848
|
|
|
68676
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
68849
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+759ce506b1ed1a42/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
68677
68850
|
import process9 from "node:process";
|
|
68678
68851
|
|
|
68679
68852
|
class StdioServerTransport {
|
|
68680
|
-
constructor(_stdin = process9.stdin, _stdout = process9.stdout) {
|
|
68853
|
+
constructor(_stdin = process9.stdin, _stdout = process9.stdout, options) {
|
|
68681
68854
|
this._stdin = _stdin;
|
|
68682
68855
|
this._stdout = _stdout;
|
|
68683
|
-
this._readBuffer = new ReadBuffer;
|
|
68684
68856
|
this._started = false;
|
|
68685
68857
|
this._ondata = (chunk) => {
|
|
68686
|
-
|
|
68687
|
-
|
|
68858
|
+
try {
|
|
68859
|
+
this._readBuffer.append(chunk);
|
|
68860
|
+
this.processReadBuffer();
|
|
68861
|
+
} catch (error3) {
|
|
68862
|
+
this.onerror?.(error3);
|
|
68863
|
+
this.close().catch(() => {});
|
|
68864
|
+
}
|
|
68688
68865
|
};
|
|
68689
68866
|
this._onerror = (error3) => {
|
|
68690
68867
|
this.onerror?.(error3);
|
|
68691
68868
|
};
|
|
68869
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
68692
68870
|
}
|
|
68693
68871
|
async start() {
|
|
68694
68872
|
if (this._started) {
|
|
@@ -69270,7 +69448,7 @@ import { homedir as homedir4, platform } from "node:os";
|
|
|
69270
69448
|
import { dirname, join as join4 } from "node:path";
|
|
69271
69449
|
import { spawnSync } from "node:child_process";
|
|
69272
69450
|
|
|
69273
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
69451
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/date.js
|
|
69274
69452
|
/*!
|
|
69275
69453
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69276
69454
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69390,7 +69568,7 @@ class TomlDate extends Date {
|
|
|
69390
69568
|
}
|
|
69391
69569
|
}
|
|
69392
69570
|
|
|
69393
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
69571
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/error.js
|
|
69394
69572
|
/*!
|
|
69395
69573
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69396
69574
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69460,7 +69638,7 @@ ${codeblock}`, options);
|
|
|
69460
69638
|
}
|
|
69461
69639
|
}
|
|
69462
69640
|
|
|
69463
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
69641
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/primitive.js
|
|
69464
69642
|
/*!
|
|
69465
69643
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69466
69644
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69640,7 +69818,7 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
|
69640
69818
|
return date;
|
|
69641
69819
|
}
|
|
69642
69820
|
|
|
69643
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
69821
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/util.js
|
|
69644
69822
|
/*!
|
|
69645
69823
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69646
69824
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69715,6 +69893,8 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
|
69715
69893
|
let c2 = str[i];
|
|
69716
69894
|
if (c2 === "#") {
|
|
69717
69895
|
i = indexOfNewline(str, i);
|
|
69896
|
+
if (i < 0)
|
|
69897
|
+
break;
|
|
69718
69898
|
} else if (c2 === sep) {
|
|
69719
69899
|
return i + 1;
|
|
69720
69900
|
} else if (c2 === end || banNewLines && (c2 === `
|
|
@@ -69729,7 +69909,7 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
|
69729
69909
|
});
|
|
69730
69910
|
}
|
|
69731
69911
|
|
|
69732
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
69912
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/extract.js
|
|
69733
69913
|
/*!
|
|
69734
69914
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69735
69915
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69824,7 +70004,7 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
|
69824
70004
|
];
|
|
69825
70005
|
}
|
|
69826
70006
|
|
|
69827
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
70007
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/struct.js
|
|
69828
70008
|
/*!
|
|
69829
70009
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
69830
70010
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -69995,7 +70175,7 @@ function parseArray(str, ptr, depth, integersAsBigInt) {
|
|
|
69995
70175
|
return [res, ptr];
|
|
69996
70176
|
}
|
|
69997
70177
|
|
|
69998
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
70178
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/parse.js
|
|
69999
70179
|
/*!
|
|
70000
70180
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
70001
70181
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -70136,7 +70316,7 @@ function parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
|
|
|
70136
70316
|
return res;
|
|
70137
70317
|
}
|
|
70138
70318
|
|
|
70139
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
70319
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/stringify.js
|
|
70140
70320
|
/*!
|
|
70141
70321
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
70142
70322
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -70310,7 +70490,7 @@ function stringify(obj2, { maxDepth = 1000, numbersAsFloat = false } = {}) {
|
|
|
70310
70490
|
return str;
|
|
70311
70491
|
}
|
|
70312
70492
|
|
|
70313
|
-
// ../../node_modules/.bun/smol-toml@1.7.
|
|
70493
|
+
// ../../node_modules/.bun/smol-toml@1.7.1/node_modules/smol-toml/dist/index.js
|
|
70314
70494
|
/*!
|
|
70315
70495
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
70316
70496
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -70915,6 +71095,14 @@ async function action9(options) {
|
|
|
70915
71095
|
}
|
|
70916
71096
|
println(c.green(`
|
|
70917
71097
|
✓ All prerequisites satisfied.`));
|
|
71098
|
+
if (doFunctions && process.platform === "darwin" && !process.env.SUPABASE_ACCESS_TOKEN) {
|
|
71099
|
+
println(c.cyan(`
|
|
71100
|
+
ℹ Heads-up (macOS): the Supabase CLI will read its login token from the
|
|
71101
|
+
` + ` Keychain — expect a password dialog per function (click "Always Allow").
|
|
71102
|
+
` + ` To skip the dialogs entirely, put a personal access token
|
|
71103
|
+
` + ` (supabase.com/dashboard/account/tokens) in ~/.cerefox/.env:
|
|
71104
|
+
` + " SUPABASE_ACCESS_TOKEN=sbp_…"));
|
|
71105
|
+
}
|
|
70918
71106
|
let schemaMode = "unknown";
|
|
70919
71107
|
let pending = [];
|
|
70920
71108
|
if (doSchema) {
|
|
@@ -70957,11 +71145,13 @@ Plan:`));
|
|
|
70957
71145
|
⚠ --dry-run: nothing was deployed.`));
|
|
70958
71146
|
process.exit(0);
|
|
70959
71147
|
}
|
|
70960
|
-
|
|
71148
|
+
if (!options.yes) {
|
|
71149
|
+
const proceed = await confirm(`
|
|
70961
71150
|
Proceed with deployment to Supabase?`, true);
|
|
70962
|
-
|
|
70963
|
-
|
|
70964
|
-
|
|
71151
|
+
if (!proceed) {
|
|
71152
|
+
println(c.dim("Aborted."));
|
|
71153
|
+
process.exit(0);
|
|
71154
|
+
}
|
|
70965
71155
|
}
|
|
70966
71156
|
if (doSchema) {
|
|
70967
71157
|
if (schemaMode === "fresh") {
|
|
@@ -71062,7 +71252,7 @@ Proceed with deployment to Supabase?`, true);
|
|
|
71062
71252
|
println(c.dim("Verify with: cerefox doctor"));
|
|
71063
71253
|
}
|
|
71064
71254
|
function registerDeployServer(program2) {
|
|
71065
|
-
program2.command("deploy-server").description("Deploy/update the Cerefox server side (schema + RPCs + Edge Functions) on Supabase.").option("--dry-run", "Print the plan + pre-flight without deploying.").option("--schema-only", "Deploy/update only the schema + RPCs (skip Edge Functions).").option("--functions-only", "Deploy only the Edge Functions (skip the schema/RPCs).").option("--project-ref <ref>", "Supabase project ref for Edge Function deploys (default: derived from CEREFOX_SUPABASE_URL).").action(action9);
|
|
71255
|
+
program2.command("deploy-server").description("Deploy/update the Cerefox server side (schema + RPCs + Edge Functions) on Supabase.").option("--dry-run", "Print the plan + pre-flight without deploying.").option("--schema-only", "Deploy/update only the schema + RPCs (skip Edge Functions).").option("--functions-only", "Deploy only the Edge Functions (skip the schema/RPCs).").option("--project-ref <ref>", "Supabase project ref for Edge Function deploys (default: derived from CEREFOX_SUPABASE_URL).").option("--yes", "Non-interactive (skip the deployment confirmation).").action(action9);
|
|
71066
71256
|
}
|
|
71067
71257
|
|
|
71068
71258
|
// src/cli/commands/document-edit.ts
|
|
@@ -73872,7 +74062,7 @@ __export(exports_symbols, {
|
|
|
73872
74062
|
error: () => error
|
|
73873
74063
|
});
|
|
73874
74064
|
|
|
73875
|
-
// ../../node_modules/.bun/yoctocolors@2.
|
|
74065
|
+
// ../../node_modules/.bun/yoctocolors@2.2.0/node_modules/yoctocolors/base.js
|
|
73876
74066
|
import tty2 from "node:tty";
|
|
73877
74067
|
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
73878
74068
|
var format = (open, close) => {
|
|
@@ -73905,6 +74095,10 @@ var bold = format(1, 22);
|
|
|
73905
74095
|
var dim = format(2, 22);
|
|
73906
74096
|
var italic = format(3, 23);
|
|
73907
74097
|
var underline = format(4, 24);
|
|
74098
|
+
var underlineDouble = format("4:2", 24);
|
|
74099
|
+
var underlineCurly = format("4:3", 24);
|
|
74100
|
+
var underlineDotted = format("4:4", 24);
|
|
74101
|
+
var underlineDashed = format("4:5", 24);
|
|
73908
74102
|
var overline = format(53, 55);
|
|
73909
74103
|
var inverse = format(7, 27);
|
|
73910
74104
|
var hidden = format(8, 28);
|
|
@@ -73941,6 +74135,22 @@ var bgBlueBright = format(104, 49);
|
|
|
73941
74135
|
var bgMagentaBright = format(105, 49);
|
|
73942
74136
|
var bgCyanBright = format(106, 49);
|
|
73943
74137
|
var bgWhiteBright = format(107, 49);
|
|
74138
|
+
var underlineBlack = format("58;5;0", 59);
|
|
74139
|
+
var underlineRed = format("58;5;1", 59);
|
|
74140
|
+
var underlineGreen = format("58;5;2", 59);
|
|
74141
|
+
var underlineYellow = format("58;5;3", 59);
|
|
74142
|
+
var underlineBlue = format("58;5;4", 59);
|
|
74143
|
+
var underlineMagenta = format("58;5;5", 59);
|
|
74144
|
+
var underlineCyan = format("58;5;6", 59);
|
|
74145
|
+
var underlineWhite = format("58;5;7", 59);
|
|
74146
|
+
var underlineGray = format("58;5;8", 59);
|
|
74147
|
+
var underlineRedBright = format("58;5;9", 59);
|
|
74148
|
+
var underlineGreenBright = format("58;5;10", 59);
|
|
74149
|
+
var underlineYellowBright = format("58;5;11", 59);
|
|
74150
|
+
var underlineBlueBright = format("58;5;12", 59);
|
|
74151
|
+
var underlineMagentaBright = format("58;5;13", 59);
|
|
74152
|
+
var underlineCyanBright = format("58;5;14", 59);
|
|
74153
|
+
var underlineWhiteBright = format("58;5;15", 59);
|
|
73944
74154
|
|
|
73945
74155
|
// ../../node_modules/.bun/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
73946
74156
|
import process6 from "node:process";
|
|
@@ -74731,7 +74941,7 @@ import { homedir as homedir6 } from "node:os";
|
|
|
74731
74941
|
import { join as join9 } from "node:path";
|
|
74732
74942
|
|
|
74733
74943
|
// ../../_shared/ef-meta/index.ts
|
|
74734
|
-
var EF_VERSION = "1.0.
|
|
74944
|
+
var EF_VERSION = "1.0.1";
|
|
74735
74945
|
|
|
74736
74946
|
// src/cli/util/checks.ts
|
|
74737
74947
|
init_config();
|
|
@@ -76738,38 +76948,34 @@ async function action22(options) {
|
|
|
76738
76948
|
}
|
|
76739
76949
|
projectId = project.id;
|
|
76740
76950
|
}
|
|
76741
|
-
|
|
76951
|
+
const docCols = "id, title, source, metadata, created_at, updated_at, review_status, deleted_at";
|
|
76952
|
+
const selectCols = projectId ? `${docCols}, cerefox_document_projects!inner(project_id)` : docCols;
|
|
76953
|
+
let query = client.raw.from("cerefox_documents").select(selectCols).limit(limit);
|
|
76742
76954
|
query = deleted ? query.not("deleted_at", "is", null).order("deleted_at", { ascending: false, nullsFirst: false }) : query.is("deleted_at", null).order("updated_at", { ascending: false, nullsFirst: false });
|
|
76743
76955
|
if (projectId) {
|
|
76744
|
-
|
|
76745
|
-
if (junctionError) {
|
|
76746
|
-
throw systemError(`Project membership lookup failed: ${junctionError.message}`);
|
|
76747
|
-
}
|
|
76748
|
-
const docIds = (junctionRows ?? []).map((r) => r.document_id);
|
|
76749
|
-
if (docIds.length === 0) {
|
|
76750
|
-
if (options.json) {
|
|
76751
|
-
printJson([]);
|
|
76752
|
-
} else {
|
|
76753
|
-
process.stdout.write(`(no documents in project "${options.project}")
|
|
76754
|
-
`);
|
|
76755
|
-
}
|
|
76756
|
-
return;
|
|
76757
|
-
}
|
|
76758
|
-
query = query.in("id", docIds);
|
|
76956
|
+
query = query.eq("cerefox_document_projects.project_id", projectId);
|
|
76759
76957
|
}
|
|
76760
76958
|
const { data, error: error2 } = await query;
|
|
76761
76959
|
if (error2) {
|
|
76762
76960
|
throw systemError(`Could not list documents: ${error2.message}`);
|
|
76763
76961
|
}
|
|
76764
|
-
const rows = data ?? []
|
|
76962
|
+
const rows = (data ?? []).map((row) => {
|
|
76963
|
+
const { cerefox_document_projects: _junction, ...doc } = row;
|
|
76964
|
+
return doc;
|
|
76965
|
+
});
|
|
76765
76966
|
if (options.json) {
|
|
76766
76967
|
printJson(rows);
|
|
76767
76968
|
return;
|
|
76768
76969
|
}
|
|
76769
76970
|
if (rows.length === 0) {
|
|
76770
|
-
|
|
76971
|
+
if (projectId) {
|
|
76972
|
+
process.stdout.write(`(no documents in project "${options.project}")
|
|
76973
|
+
`);
|
|
76974
|
+
} else {
|
|
76975
|
+
process.stdout.write(deleted ? `(trash is empty)
|
|
76771
76976
|
` : `(no documents)
|
|
76772
76977
|
`);
|
|
76978
|
+
}
|
|
76773
76979
|
return;
|
|
76774
76980
|
}
|
|
76775
76981
|
printTable(rows.map((doc) => {
|
|
@@ -77678,15 +77884,15 @@ init_sync_self_docs();
|
|
|
77678
77884
|
// src/cli/commands/web.ts
|
|
77679
77885
|
init_cli_core();
|
|
77680
77886
|
|
|
77681
|
-
// ../../node_modules/.bun/@hono+node-server@2.0.
|
|
77887
|
+
// ../../node_modules/.bun/@hono+node-server@2.0.12+711a9a789551665d/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
|
|
77682
77888
|
var X_ALREADY_SENT = "x-hono-already-sent";
|
|
77683
77889
|
|
|
77684
|
-
// ../../node_modules/.bun/@hono+node-server@2.0.
|
|
77890
|
+
// ../../node_modules/.bun/@hono+node-server@2.0.12+711a9a789551665d/node_modules/@hono/node-server/dist/index.mjs
|
|
77685
77891
|
import { STATUS_CODES, createServer } from "node:http";
|
|
77686
77892
|
import { Http2ServerRequest, constants } from "node:http2";
|
|
77687
77893
|
import { Readable } from "node:stream";
|
|
77688
77894
|
|
|
77689
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
77895
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/helper/websocket/index.js
|
|
77690
77896
|
var WSContext = class {
|
|
77691
77897
|
#init;
|
|
77692
77898
|
constructor(init) {
|
|
@@ -77734,7 +77940,7 @@ var defineWebSocketHelper = (handler11) => {
|
|
|
77734
77940
|
};
|
|
77735
77941
|
};
|
|
77736
77942
|
|
|
77737
|
-
// ../../node_modules/.bun/@hono+node-server@2.0.
|
|
77943
|
+
// ../../node_modules/.bun/@hono+node-server@2.0.12+711a9a789551665d/node_modules/@hono/node-server/dist/index.mjs
|
|
77738
77944
|
var RequestError = class extends Error {
|
|
77739
77945
|
constructor(message, options) {
|
|
77740
77946
|
super(message, options);
|
|
@@ -77940,8 +78146,10 @@ var normalizeIncomingMethod = (method) => {
|
|
|
77940
78146
|
case "GET":
|
|
77941
78147
|
case "HEAD":
|
|
77942
78148
|
case "OPTIONS":
|
|
78149
|
+
case "PATCH":
|
|
77943
78150
|
case "POST":
|
|
77944
78151
|
case "PUT":
|
|
78152
|
+
case "QUERY":
|
|
77945
78153
|
return method;
|
|
77946
78154
|
}
|
|
77947
78155
|
const upper = method.toUpperCase();
|
|
@@ -78280,16 +78488,15 @@ var Response$1 = class Response$12 {
|
|
|
78280
78488
|
constructor(body, init) {
|
|
78281
78489
|
let headers;
|
|
78282
78490
|
this.#body = body;
|
|
78283
|
-
if (init instanceof
|
|
78491
|
+
if (init instanceof GlobalResponse) {
|
|
78284
78492
|
const cachedGlobalResponse = init[responseCache];
|
|
78285
78493
|
if (cachedGlobalResponse) {
|
|
78286
78494
|
this.#init = cachedGlobalResponse;
|
|
78287
78495
|
this[getResponseCache]();
|
|
78288
78496
|
return;
|
|
78289
|
-
} else {
|
|
78290
|
-
this.#init = init.#init;
|
|
78291
|
-
headers = new Headers(init.headers);
|
|
78292
78497
|
}
|
|
78498
|
+
this.#init = init instanceof Response$12 ? init.#init : init;
|
|
78499
|
+
headers = new Headers(init.headers);
|
|
78293
78500
|
} else
|
|
78294
78501
|
this.#init = init;
|
|
78295
78502
|
if (body == null || typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array)
|
|
@@ -79007,7 +79214,7 @@ var serve = (options, listeningListener) => {
|
|
|
79007
79214
|
return server;
|
|
79008
79215
|
};
|
|
79009
79216
|
|
|
79010
|
-
// ../../node_modules/.bun/@hono+node-server@2.0.
|
|
79217
|
+
// ../../node_modules/.bun/@hono+node-server@2.0.12+711a9a789551665d/node_modules/@hono/node-server/dist/utils/stream.mjs
|
|
79011
79218
|
import { Readable as Readable2 } from "node:stream";
|
|
79012
79219
|
import { versions as versions2 } from "node:process";
|
|
79013
79220
|
var pr54206Applied = () => {
|
|
@@ -79073,7 +79280,7 @@ var createStreamBody = (stream, useNativeReadableToWeb = useReadableToWeb) => {
|
|
|
79073
79280
|
});
|
|
79074
79281
|
};
|
|
79075
79282
|
|
|
79076
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79283
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/mime.js
|
|
79077
79284
|
var getMimeType = (filename, mimes = baseMimes) => {
|
|
79078
79285
|
const regexp = /\.([a-zA-Z0-9]+?)$/;
|
|
79079
79286
|
const match = filename.match(regexp);
|
|
@@ -79142,7 +79349,7 @@ var _baseMimes = {
|
|
|
79142
79349
|
};
|
|
79143
79350
|
var baseMimes = _baseMimes;
|
|
79144
79351
|
|
|
79145
|
-
// ../../node_modules/.bun/@hono+node-server@2.0.
|
|
79352
|
+
// ../../node_modules/.bun/@hono+node-server@2.0.12+711a9a789551665d/node_modules/@hono/node-server/dist/serve-static.mjs
|
|
79146
79353
|
import { createReadStream, existsSync as existsSync15, statSync as statSync5 } from "node:fs";
|
|
79147
79354
|
import { join as join13 } from "node:path";
|
|
79148
79355
|
var COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;
|
|
@@ -79304,7 +79511,7 @@ import { existsSync as existsSync19 } from "node:fs";
|
|
|
79304
79511
|
import { readFileSync as readFileSync17 } from "node:fs";
|
|
79305
79512
|
import { join as join17 } from "node:path";
|
|
79306
79513
|
|
|
79307
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79514
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/compose.js
|
|
79308
79515
|
var compose = (middleware, onError, onNotFound) => {
|
|
79309
79516
|
return (context, next) => {
|
|
79310
79517
|
let index = -1;
|
|
@@ -79348,10 +79555,10 @@ var compose = (middleware, onError, onNotFound) => {
|
|
|
79348
79555
|
};
|
|
79349
79556
|
};
|
|
79350
79557
|
|
|
79351
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79558
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/request/constants.js
|
|
79352
79559
|
var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
|
|
79353
79560
|
|
|
79354
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79561
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/buffer.js
|
|
79355
79562
|
var bufferToFormData = (arrayBuffer, contentType2) => {
|
|
79356
79563
|
const response = new Response(arrayBuffer, {
|
|
79357
79564
|
headers: {
|
|
@@ -79361,7 +79568,7 @@ var bufferToFormData = (arrayBuffer, contentType2) => {
|
|
|
79361
79568
|
return response.formData();
|
|
79362
79569
|
};
|
|
79363
79570
|
|
|
79364
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79571
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/body.js
|
|
79365
79572
|
var isRawRequest = (request) => ("headers" in request);
|
|
79366
79573
|
var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
|
|
79367
79574
|
const { all = false, dot = false } = options;
|
|
@@ -79374,6 +79581,9 @@ var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) =
|
|
|
79374
79581
|
return {};
|
|
79375
79582
|
};
|
|
79376
79583
|
async function parseFormData(request, options) {
|
|
79584
|
+
if (!isRawRequest(request) && request.bodyCache.formData) {
|
|
79585
|
+
return convertFormDataToBodyData(await request.bodyCache.formData, options);
|
|
79586
|
+
}
|
|
79377
79587
|
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
79378
79588
|
const arrayBuffer = await request.arrayBuffer();
|
|
79379
79589
|
const formDataPromise = bufferToFormData(arrayBuffer, headers.get("Content-Type") || "");
|
|
@@ -79440,7 +79650,7 @@ var handleParsingNestedValues = (form, key, value) => {
|
|
|
79440
79650
|
});
|
|
79441
79651
|
};
|
|
79442
79652
|
|
|
79443
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79653
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/url.js
|
|
79444
79654
|
var splitPath = (path) => {
|
|
79445
79655
|
const paths = path.split("/");
|
|
79446
79656
|
if (paths[0] === "") {
|
|
@@ -79597,7 +79807,7 @@ var _getQueryParam = (url, key, multiple) => {
|
|
|
79597
79807
|
return;
|
|
79598
79808
|
}
|
|
79599
79809
|
}
|
|
79600
|
-
const results =
|
|
79810
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
79601
79811
|
encoded ??= /[%+]/.test(url);
|
|
79602
79812
|
let keyIndex = url.indexOf("?", 8);
|
|
79603
79813
|
while (keyIndex !== -1) {
|
|
@@ -79640,7 +79850,7 @@ var getQueryParams = (url, key) => {
|
|
|
79640
79850
|
};
|
|
79641
79851
|
var decodeURIComponent_ = decodeURIComponent;
|
|
79642
79852
|
|
|
79643
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79853
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/request.js
|
|
79644
79854
|
var tryDecodeURIComponent = (str) => tryDecode2(str, decodeURIComponent_);
|
|
79645
79855
|
var HonoRequest = class {
|
|
79646
79856
|
raw;
|
|
@@ -79687,7 +79897,7 @@ var HonoRequest = class {
|
|
|
79687
79897
|
if (name) {
|
|
79688
79898
|
return this.raw.headers.get(name) ?? undefined;
|
|
79689
79899
|
}
|
|
79690
|
-
const headerData =
|
|
79900
|
+
const headerData = /* @__PURE__ */ Object.create(null);
|
|
79691
79901
|
this.raw.headers.forEach((value, key) => {
|
|
79692
79902
|
headerData[key] = value;
|
|
79693
79903
|
});
|
|
@@ -79754,7 +79964,7 @@ var HonoRequest = class {
|
|
|
79754
79964
|
}
|
|
79755
79965
|
};
|
|
79756
79966
|
|
|
79757
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
79967
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/html.js
|
|
79758
79968
|
var HtmlEscapedCallbackPhase = {
|
|
79759
79969
|
Stringify: 1,
|
|
79760
79970
|
BeforeStream: 2,
|
|
@@ -79792,7 +80002,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer2) =>
|
|
|
79792
80002
|
}
|
|
79793
80003
|
};
|
|
79794
80004
|
|
|
79795
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80005
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/context.js
|
|
79796
80006
|
var TEXT_PLAIN = "text/plain; charset=UTF-8";
|
|
79797
80007
|
var setDefaultContentType = (contentType2, headers) => {
|
|
79798
80008
|
return {
|
|
@@ -79959,7 +80169,7 @@ var Context = class {
|
|
|
79959
80169
|
};
|
|
79960
80170
|
};
|
|
79961
80171
|
|
|
79962
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80172
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router.js
|
|
79963
80173
|
var METHOD_NAME_ALL = "ALL";
|
|
79964
80174
|
var METHOD_NAME_ALL_LOWERCASE = "all";
|
|
79965
80175
|
var METHODS = ["get", "post", "put", "delete", "options", "patch"];
|
|
@@ -79967,10 +80177,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
|
|
|
79967
80177
|
var UnsupportedPathError = class extends Error {
|
|
79968
80178
|
};
|
|
79969
80179
|
|
|
79970
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80180
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/constants.js
|
|
79971
80181
|
var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
|
|
79972
80182
|
|
|
79973
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80183
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/hono-base.js
|
|
79974
80184
|
var notFoundHandler = (c2) => {
|
|
79975
80185
|
return c2.text("404 Not Found", 404);
|
|
79976
80186
|
};
|
|
@@ -80194,7 +80404,7 @@ var Hono = class _Hono {
|
|
|
80194
80404
|
};
|
|
80195
80405
|
};
|
|
80196
80406
|
|
|
80197
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80407
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/reg-exp-router/matcher.js
|
|
80198
80408
|
var emptyParam = [];
|
|
80199
80409
|
function match(method, path) {
|
|
80200
80410
|
const matchers = this.buildAllMatchers();
|
|
@@ -80215,7 +80425,7 @@ function match(method, path) {
|
|
|
80215
80425
|
return match2(method, path);
|
|
80216
80426
|
}
|
|
80217
80427
|
|
|
80218
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80428
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/reg-exp-router/node.js
|
|
80219
80429
|
var LABEL_REG_EXP_STR = "[^/]+";
|
|
80220
80430
|
var ONLY_WILDCARD_REG_EXP_STR = ".*";
|
|
80221
80431
|
var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
|
|
@@ -80319,7 +80529,7 @@ var Node = class _Node {
|
|
|
80319
80529
|
}
|
|
80320
80530
|
};
|
|
80321
80531
|
|
|
80322
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80532
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/reg-exp-router/trie.js
|
|
80323
80533
|
var Trie = class {
|
|
80324
80534
|
#context = { varIndex: 0 };
|
|
80325
80535
|
#root = new Node;
|
|
@@ -80375,7 +80585,7 @@ var Trie = class {
|
|
|
80375
80585
|
}
|
|
80376
80586
|
};
|
|
80377
80587
|
|
|
80378
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80588
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/reg-exp-router/router.js
|
|
80379
80589
|
var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
|
|
80380
80590
|
var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
|
|
80381
80591
|
function buildWildcardRegExp(path) {
|
|
@@ -80540,7 +80750,7 @@ var RegExpRouter = class {
|
|
|
80540
80750
|
}
|
|
80541
80751
|
};
|
|
80542
80752
|
|
|
80543
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80753
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
|
|
80544
80754
|
var PreparedRegExpRouter = class {
|
|
80545
80755
|
name = "PreparedRegExpRouter";
|
|
80546
80756
|
#matchers;
|
|
@@ -80612,7 +80822,7 @@ var PreparedRegExpRouter = class {
|
|
|
80612
80822
|
match = match;
|
|
80613
80823
|
};
|
|
80614
80824
|
|
|
80615
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80825
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/smart-router/router.js
|
|
80616
80826
|
var SmartRouter = class {
|
|
80617
80827
|
name = "SmartRouter";
|
|
80618
80828
|
#routers = [];
|
|
@@ -80667,7 +80877,7 @@ var SmartRouter = class {
|
|
|
80667
80877
|
}
|
|
80668
80878
|
};
|
|
80669
80879
|
|
|
80670
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
80880
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/trie-router/node.js
|
|
80671
80881
|
var emptyParams = /* @__PURE__ */ Object.create(null);
|
|
80672
80882
|
var hasChildren = (children) => {
|
|
80673
80883
|
for (const _ in children) {
|
|
@@ -80839,7 +81049,7 @@ var Node2 = class _Node2 {
|
|
|
80839
81049
|
}
|
|
80840
81050
|
};
|
|
80841
81051
|
|
|
80842
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
81052
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/router/trie-router/router.js
|
|
80843
81053
|
var TrieRouter = class {
|
|
80844
81054
|
name = "TrieRouter";
|
|
80845
81055
|
#node;
|
|
@@ -80861,7 +81071,7 @@ var TrieRouter = class {
|
|
|
80861
81071
|
}
|
|
80862
81072
|
};
|
|
80863
81073
|
|
|
80864
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
81074
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/hono.js
|
|
80865
81075
|
var Hono2 = class extends Hono {
|
|
80866
81076
|
constructor(options = {}) {
|
|
80867
81077
|
super(options);
|
|
@@ -80871,7 +81081,7 @@ var Hono2 = class extends Hono {
|
|
|
80871
81081
|
}
|
|
80872
81082
|
};
|
|
80873
81083
|
|
|
80874
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
81084
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/utils/color.js
|
|
80875
81085
|
function getColorEnabled() {
|
|
80876
81086
|
const { process: process10, Deno: Deno2 } = globalThis;
|
|
80877
81087
|
const isNoColor = typeof Deno2?.noColor === "boolean" ? Deno2.noColor : process10 !== undefined ? "NO_COLOR" in process10?.env : false;
|
|
@@ -80890,7 +81100,7 @@ async function getColorEnabledAsync() {
|
|
|
80890
81100
|
return !isNoColor;
|
|
80891
81101
|
}
|
|
80892
81102
|
|
|
80893
|
-
// ../../node_modules/.bun/hono@4.12.
|
|
81103
|
+
// ../../node_modules/.bun/hono@4.12.33/node_modules/hono/dist/middleware/logger/index.js
|
|
80894
81104
|
var humanize = (times) => {
|
|
80895
81105
|
const [delimiter, separator] = [",", "."];
|
|
80896
81106
|
const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter));
|