@hiai-gg/docsmint 0.8.1 → 0.8.3
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/README.md +84 -199
- package/dist/backend/index.js +718 -269
- package/dist/backend-account-runtime-cleanup.js +2 -0
- package/dist/backend-api-key-facade.js +2 -0
- package/dist/backend-pipeline-cancellation.js +2 -0
- package/dist/client.d.ts +2 -1
- package/dist/client.js +10 -0
- package/dist/frontend/{CategoryDialog-D_xFSWGh.js → CategoryDialog-B6zqtwE6.js} +2 -2
- package/dist/frontend/{ConfirmDialog-Cfq3D2Di.js → ConfirmDialog-Dk7wwcj9.js} +1 -1
- package/dist/frontend/{CreateSnapshotDialog-BHODxZWK.js → CreateSnapshotDialog-BPYjO1qN.js} +2 -2
- package/dist/frontend/{DatePicker-CZyCnQ1q.js → DatePicker-SiGLx9yh.js} +46 -46
- package/dist/frontend/{DeleteDialog-DaJOO6SB.js → DeleteDialog-D1jox8h1.js} +2 -2
- package/dist/frontend/{FolderNode-C_91NlEO.js → FolderNode-BG4l6I5C.js} +100 -99
- package/dist/frontend/{HiAiEditor-DtUGbQg6.js → HiAiEditor-Dxqt8BUN.js} +979 -1010
- package/dist/frontend/{SettingsDialog-BlIZqk2-.js → SettingsDialog-DnrPV8dM.js} +7 -7
- package/dist/frontend/Sidebar-BI_ccYTl.js +2149 -0
- package/dist/frontend/{TagCreateDialog-BlGz4O9Z.js → TagCreateDialog-C5j3H49u.js} +2 -2
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/app-shell.js +3 -3
- package/dist/frontend/{auth-client-DCMne8vd.js → auth-client-Dc0mkuZH.js} +10 -10
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/compact-editor.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/editor/extensions.js +1 -1
- package/dist/frontend/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend/components/editor/markdown.js +1 -1
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +2 -2
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +3 -3
- package/dist/frontend/dashboard.js +1034 -1034
- package/dist/frontend/{db-CbFRFAm2.js → db-DUOtrCBC.js} +1 -1
- package/dist/frontend/{dialog-tHAH3-9M.js → dialog-DC97Hnxo.js} +1 -1
- package/dist/frontend/dist-BLpDfrDC.js +316 -0
- package/dist/frontend/dist-D7zL6zdU.js +40 -0
- package/dist/frontend/{dist-Cg1BpNS7.js → dist-qd_OnyUC.js} +492 -516
- package/dist/frontend/dropdown-menu-COZwS7c0.js +493 -0
- package/dist/frontend/editorExtensions-Cu__YKW7.js +158 -0
- package/dist/frontend/ellipsis-vertical-CObXWXZW.js +41 -0
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/{identity-O4lAuchv.js → identity-D_rjww-V.js} +1 -1
- package/dist/frontend/{editorExtensions-B-mKiWqq.js → lib-DYgslUw1.js} +6782 -6935
- package/dist/frontend/loader-circle-DnyUzAmN.js +25 -0
- package/dist/frontend/{markdown-CMij27Gg.js → markdown-Co8ZAKf4.js} +2 -1
- package/dist/frontend/offline/identity.js +1 -1
- package/dist/frontend/search.js +2 -2
- package/dist/frontend/{settings-DJW8JkdF.js → settings-CW_SR-EH.js} +1 -1
- package/dist/frontend/{confirm-dialog-BFTxjLv-.js → share-context-DooXPYKd.js} +2 -3
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/{theme.svelte-Bzitjfh9.js → theme.svelte-gLPpG6eU.js} +1 -0
- package/dist/frontend-ssr/api/settings.js +1 -1
- package/dist/frontend-ssr/app-shell.js +3 -3
- package/dist/frontend-ssr/assets/{FolderNode-CClgk8BL.js → FolderNode-CscMQ9sf.js} +2 -1
- package/dist/frontend-ssr/assets/{HiAiEditor-_-m7MJDd.js → HiAiEditor-D-FYXUht.js} +6 -52
- package/dist/frontend-ssr/assets/{SettingsDialog-BdvHRAxF.js → SettingsDialog-BaI2MU5d.js} +5 -5
- package/dist/frontend-ssr/assets/{Sidebar-B3Saqn0O.js → Sidebar-BpTS2uCa.js} +7 -5
- package/dist/frontend-ssr/assets/{auth-client-DzkZlSQ8.js → auth-client-Bo5Fg-sb.js} +13 -13
- package/dist/frontend-ssr/assets/{db-CUkQe9AU.js → db-DUKz2X3Z.js} +1 -1
- package/dist/frontend-ssr/assets/dist-CshZmNmp.js +50 -0
- package/dist/frontend-ssr/assets/dist-DqeAICTy.js +300 -0
- package/dist/frontend-ssr/assets/{dropdown-menu-CdEpn_LT.js → dropdown-menu--acO7nXs.js} +1 -94
- package/dist/frontend-ssr/assets/ellipsis-vertical-BErUuhWg.js +96 -0
- package/dist/frontend-ssr/assets/{identity-veXobEfE.js → identity-_M3U9lqe.js} +1 -1
- package/dist/frontend-ssr/assets/{markdown-MhPwNWrC.js → markdown-Co31-Tl2.js} +1 -1
- package/dist/frontend-ssr/assets/{settings-DwAcLGM1.js → settings-DaOQ4Gv2.js} +1 -1
- package/dist/frontend-ssr/assets/{confirm-dialog-DeOR0SnQ.js → share-context-BvXQrIIH.js} +0 -1
- package/dist/frontend-ssr/assets/{theme.svelte-shZrSxz8.js → theme.svelte-CGgnJc3k.js} +1 -0
- package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/extensions.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown.js +1 -1
- package/dist/frontend-ssr/components/folder-node.js +1 -1
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/dashboard.js +6 -4
- package/dist/frontend-ssr/offline/identity.js +1 -1
- package/dist/frontend-ssr/search.js +1 -1
- package/dist/frontend-ssr/theme.js +1 -1
- package/dist/lifecycle-runtime.js +2 -0
- package/dist/mcp-cli.js +7 -1
- package/dist/mcp-server.js +7 -1
- package/dist/types.d.ts +12 -0
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +2 -0
- package/server.json +2 -2
- package/dist/frontend/Sidebar-BVGm5BRR.js +0 -2147
- package/dist/frontend/dropdown-menu-AJYeFPHu.js +0 -530
- package/dist/frontend-ssr/assets/{DatePicker-TZVeMZ2S.js → DatePicker-CCylVH0q.js} +12 -12
- package/dist/frontend-ssr/assets/{editorExtensions-qNlZVP98.js → editorExtensions-rhletNji.js} +1 -1
package/dist/backend/index.js
CHANGED
|
@@ -39524,7 +39524,7 @@ var require_dist = __commonJS(function(exports) {
|
|
|
39524
39524
|
}
|
|
39525
39525
|
});
|
|
39526
39526
|
|
|
39527
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39527
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/entity.js
|
|
39528
39528
|
function is(value, type) {
|
|
39529
39529
|
if (!value || typeof value !== "object") {
|
|
39530
39530
|
return false;
|
|
@@ -39552,7 +39552,7 @@ var init_entity = __esm(() => {
|
|
|
39552
39552
|
hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
39553
39553
|
});
|
|
39554
39554
|
|
|
39555
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39555
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/column.js
|
|
39556
39556
|
var Column;
|
|
39557
39557
|
var init_column = __esm(() => {
|
|
39558
39558
|
init_entity();
|
|
@@ -39606,7 +39606,7 @@ var init_column = __esm(() => {
|
|
|
39606
39606
|
};
|
|
39607
39607
|
});
|
|
39608
39608
|
|
|
39609
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39609
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/column-builder.js
|
|
39610
39610
|
var ColumnBuilder;
|
|
39611
39611
|
var init_column_builder = __esm(() => {
|
|
39612
39612
|
init_entity();
|
|
@@ -39666,13 +39666,13 @@ var init_column_builder = __esm(() => {
|
|
|
39666
39666
|
};
|
|
39667
39667
|
});
|
|
39668
39668
|
|
|
39669
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39669
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/table.utils.js
|
|
39670
39670
|
var TableName;
|
|
39671
39671
|
var init_table_utils = __esm(() => {
|
|
39672
39672
|
TableName = Symbol.for("drizzle:Name");
|
|
39673
39673
|
});
|
|
39674
39674
|
|
|
39675
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39675
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/foreign-keys.js
|
|
39676
39676
|
var ForeignKeyBuilder, ForeignKey;
|
|
39677
39677
|
var init_foreign_keys = __esm(() => {
|
|
39678
39678
|
init_entity();
|
|
@@ -39730,13 +39730,13 @@ var init_foreign_keys = __esm(() => {
|
|
|
39730
39730
|
};
|
|
39731
39731
|
});
|
|
39732
39732
|
|
|
39733
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39733
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/tracing-utils.js
|
|
39734
39734
|
function iife(fn, ...args) {
|
|
39735
39735
|
return fn(...args);
|
|
39736
39736
|
}
|
|
39737
39737
|
var init_tracing_utils = () => {};
|
|
39738
39738
|
|
|
39739
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39739
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/unique-constraint.js
|
|
39740
39740
|
function uniqueKeyName(table, columns) {
|
|
39741
39741
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
39742
39742
|
}
|
|
@@ -39787,7 +39787,7 @@ var init_unique_constraint = __esm(() => {
|
|
|
39787
39787
|
};
|
|
39788
39788
|
});
|
|
39789
39789
|
|
|
39790
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39790
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/utils/array.js
|
|
39791
39791
|
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
|
|
39792
39792
|
for (let i3 = startFrom;i3 < arrayString.length; i3++) {
|
|
39793
39793
|
const char = arrayString[i3];
|
|
@@ -39864,7 +39864,7 @@ function makePgArray(array) {
|
|
|
39864
39864
|
}
|
|
39865
39865
|
var init_array = () => {};
|
|
39866
39866
|
|
|
39867
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
39867
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/common.js
|
|
39868
39868
|
var PgColumnBuilder, PgColumn, ExtraConfigColumn, IndexedColumn, PgArrayBuilder, PgArray;
|
|
39869
39869
|
var init_common = __esm(() => {
|
|
39870
39870
|
init_column_builder();
|
|
@@ -40017,7 +40017,7 @@ var init_common = __esm(() => {
|
|
|
40017
40017
|
};
|
|
40018
40018
|
});
|
|
40019
40019
|
|
|
40020
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40020
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
40021
40021
|
function isPgEnum(obj2) {
|
|
40022
40022
|
return !!obj2 && typeof obj2 === "function" && isPgEnumSym in obj2 && obj2[isPgEnumSym] === true;
|
|
40023
40023
|
}
|
|
@@ -40093,7 +40093,7 @@ var init_enum = __esm(() => {
|
|
|
40093
40093
|
};
|
|
40094
40094
|
});
|
|
40095
40095
|
|
|
40096
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40096
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/subquery.js
|
|
40097
40097
|
var Subquery, WithSubquery;
|
|
40098
40098
|
var init_subquery = __esm(() => {
|
|
40099
40099
|
init_entity();
|
|
@@ -40115,11 +40115,11 @@ var init_subquery = __esm(() => {
|
|
|
40115
40115
|
};
|
|
40116
40116
|
});
|
|
40117
40117
|
|
|
40118
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40118
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/version.js
|
|
40119
40119
|
var version2 = "0.45.2";
|
|
40120
40120
|
var init_version = () => {};
|
|
40121
40121
|
|
|
40122
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40122
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/tracing.js
|
|
40123
40123
|
var otel, rawTracer, tracer;
|
|
40124
40124
|
var init_tracing = __esm(() => {
|
|
40125
40125
|
init_tracing_utils();
|
|
@@ -40149,13 +40149,13 @@ var init_tracing = __esm(() => {
|
|
|
40149
40149
|
};
|
|
40150
40150
|
});
|
|
40151
40151
|
|
|
40152
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40152
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/view-common.js
|
|
40153
40153
|
var ViewBaseConfig;
|
|
40154
40154
|
var init_view_common = __esm(() => {
|
|
40155
40155
|
ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
40156
40156
|
});
|
|
40157
40157
|
|
|
40158
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40158
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/table.js
|
|
40159
40159
|
function getTableName(table) {
|
|
40160
40160
|
return table[TableName];
|
|
40161
40161
|
}
|
|
@@ -40203,7 +40203,7 @@ var init_table = __esm(() => {
|
|
|
40203
40203
|
};
|
|
40204
40204
|
});
|
|
40205
40205
|
|
|
40206
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40206
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/sql.js
|
|
40207
40207
|
function isSQLWrapper(value) {
|
|
40208
40208
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
40209
40209
|
}
|
|
@@ -40590,7 +40590,7 @@ var init_sql = __esm(() => {
|
|
|
40590
40590
|
};
|
|
40591
40591
|
});
|
|
40592
40592
|
|
|
40593
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40593
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/alias.js
|
|
40594
40594
|
function aliasedTable(table, tableAlias) {
|
|
40595
40595
|
return new Proxy(table, new TableAliasProxyHandler(tableAlias, false));
|
|
40596
40596
|
}
|
|
@@ -40688,10 +40688,10 @@ var init_alias = __esm(() => {
|
|
|
40688
40688
|
};
|
|
40689
40689
|
});
|
|
40690
40690
|
|
|
40691
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40691
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/alias.js
|
|
40692
40692
|
var init_alias2 = () => {};
|
|
40693
40693
|
|
|
40694
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40694
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/checks.js
|
|
40695
40695
|
function check2(name, value) {
|
|
40696
40696
|
return new CheckBuilder(name, value);
|
|
40697
40697
|
}
|
|
@@ -40721,7 +40721,7 @@ var init_checks = __esm(() => {
|
|
|
40721
40721
|
};
|
|
40722
40722
|
});
|
|
40723
40723
|
|
|
40724
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40724
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/utils.js
|
|
40725
40725
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
40726
40726
|
const nullifyMap = {};
|
|
40727
40727
|
const result = columns.reduce((result2, { path, field }, columnIndex) => {
|
|
@@ -40884,7 +40884,7 @@ var init_utils = __esm(() => {
|
|
|
40884
40884
|
textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
40885
40885
|
});
|
|
40886
40886
|
|
|
40887
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40887
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/int.common.js
|
|
40888
40888
|
var PgIntColumnBaseBuilder;
|
|
40889
40889
|
var init_int_common = __esm(() => {
|
|
40890
40890
|
init_entity();
|
|
@@ -40928,7 +40928,7 @@ var init_int_common = __esm(() => {
|
|
|
40928
40928
|
};
|
|
40929
40929
|
});
|
|
40930
40930
|
|
|
40931
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40931
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/bigint.js
|
|
40932
40932
|
function bigint(a14, b3) {
|
|
40933
40933
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
40934
40934
|
if (config.mode === "number") {
|
|
@@ -40983,7 +40983,7 @@ var init_bigint = __esm(() => {
|
|
|
40983
40983
|
};
|
|
40984
40984
|
});
|
|
40985
40985
|
|
|
40986
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
40986
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/bigserial.js
|
|
40987
40987
|
function bigserial(a14, b3) {
|
|
40988
40988
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
40989
40989
|
if (config.mode === "number") {
|
|
@@ -41040,7 +41040,7 @@ var init_bigserial = __esm(() => {
|
|
|
41040
41040
|
};
|
|
41041
41041
|
});
|
|
41042
41042
|
|
|
41043
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41043
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/boolean.js
|
|
41044
41044
|
function boolean(name) {
|
|
41045
41045
|
return new PgBooleanBuilder(name ?? "");
|
|
41046
41046
|
}
|
|
@@ -41065,7 +41065,7 @@ var init_boolean = __esm(() => {
|
|
|
41065
41065
|
};
|
|
41066
41066
|
});
|
|
41067
41067
|
|
|
41068
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41068
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/char.js
|
|
41069
41069
|
function char(a14, b3 = {}) {
|
|
41070
41070
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41071
41071
|
return new PgCharBuilder(name, config);
|
|
@@ -41096,7 +41096,7 @@ var init_char = __esm(() => {
|
|
|
41096
41096
|
};
|
|
41097
41097
|
});
|
|
41098
41098
|
|
|
41099
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41099
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/cidr.js
|
|
41100
41100
|
function cidr(name) {
|
|
41101
41101
|
return new PgCidrBuilder(name ?? "");
|
|
41102
41102
|
}
|
|
@@ -41121,7 +41121,7 @@ var init_cidr = __esm(() => {
|
|
|
41121
41121
|
};
|
|
41122
41122
|
});
|
|
41123
41123
|
|
|
41124
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41124
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/custom.js
|
|
41125
41125
|
function customType(customTypeParams) {
|
|
41126
41126
|
return (a14, b3) => {
|
|
41127
41127
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
@@ -41167,7 +41167,7 @@ var init_custom = __esm(() => {
|
|
|
41167
41167
|
};
|
|
41168
41168
|
});
|
|
41169
41169
|
|
|
41170
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41170
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/date.common.js
|
|
41171
41171
|
var PgDateColumnBaseBuilder;
|
|
41172
41172
|
var init_date_common = __esm(() => {
|
|
41173
41173
|
init_entity();
|
|
@@ -41181,7 +41181,7 @@ var init_date_common = __esm(() => {
|
|
|
41181
41181
|
};
|
|
41182
41182
|
});
|
|
41183
41183
|
|
|
41184
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41184
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/date.js
|
|
41185
41185
|
function date2(a14, b3) {
|
|
41186
41186
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41187
41187
|
if (config?.mode === "date") {
|
|
@@ -41240,7 +41240,7 @@ var init_date = __esm(() => {
|
|
|
41240
41240
|
};
|
|
41241
41241
|
});
|
|
41242
41242
|
|
|
41243
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41243
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/double-precision.js
|
|
41244
41244
|
function doublePrecision(name) {
|
|
41245
41245
|
return new PgDoublePrecisionBuilder(name ?? "");
|
|
41246
41246
|
}
|
|
@@ -41271,7 +41271,7 @@ var init_double_precision = __esm(() => {
|
|
|
41271
41271
|
};
|
|
41272
41272
|
});
|
|
41273
41273
|
|
|
41274
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41274
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/inet.js
|
|
41275
41275
|
function inet(name) {
|
|
41276
41276
|
return new PgInetBuilder(name ?? "");
|
|
41277
41277
|
}
|
|
@@ -41296,7 +41296,7 @@ var init_inet = __esm(() => {
|
|
|
41296
41296
|
};
|
|
41297
41297
|
});
|
|
41298
41298
|
|
|
41299
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41299
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/integer.js
|
|
41300
41300
|
function integer(name) {
|
|
41301
41301
|
return new PgIntegerBuilder(name ?? "");
|
|
41302
41302
|
}
|
|
@@ -41328,7 +41328,7 @@ var init_integer = __esm(() => {
|
|
|
41328
41328
|
};
|
|
41329
41329
|
});
|
|
41330
41330
|
|
|
41331
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41331
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/interval.js
|
|
41332
41332
|
function interval(a14, b3 = {}) {
|
|
41333
41333
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41334
41334
|
return new PgIntervalBuilder(name, config);
|
|
@@ -41360,7 +41360,7 @@ var init_interval = __esm(() => {
|
|
|
41360
41360
|
};
|
|
41361
41361
|
});
|
|
41362
41362
|
|
|
41363
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41363
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/json.js
|
|
41364
41364
|
function json(name) {
|
|
41365
41365
|
return new PgJsonBuilder(name ?? "");
|
|
41366
41366
|
}
|
|
@@ -41401,7 +41401,7 @@ var init_json = __esm(() => {
|
|
|
41401
41401
|
};
|
|
41402
41402
|
});
|
|
41403
41403
|
|
|
41404
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41404
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/jsonb.js
|
|
41405
41405
|
function jsonb(name) {
|
|
41406
41406
|
return new PgJsonbBuilder(name ?? "");
|
|
41407
41407
|
}
|
|
@@ -41442,7 +41442,7 @@ var init_jsonb = __esm(() => {
|
|
|
41442
41442
|
};
|
|
41443
41443
|
});
|
|
41444
41444
|
|
|
41445
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41445
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/line.js
|
|
41446
41446
|
function line(a14, b3) {
|
|
41447
41447
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41448
41448
|
if (!config?.mode || config.mode === "tuple") {
|
|
@@ -41501,7 +41501,7 @@ var init_line = __esm(() => {
|
|
|
41501
41501
|
};
|
|
41502
41502
|
});
|
|
41503
41503
|
|
|
41504
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41504
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/macaddr.js
|
|
41505
41505
|
function macaddr(name) {
|
|
41506
41506
|
return new PgMacaddrBuilder(name ?? "");
|
|
41507
41507
|
}
|
|
@@ -41526,7 +41526,7 @@ var init_macaddr = __esm(() => {
|
|
|
41526
41526
|
};
|
|
41527
41527
|
});
|
|
41528
41528
|
|
|
41529
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41529
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/macaddr8.js
|
|
41530
41530
|
function macaddr8(name) {
|
|
41531
41531
|
return new PgMacaddr8Builder(name ?? "");
|
|
41532
41532
|
}
|
|
@@ -41551,7 +41551,7 @@ var init_macaddr8 = __esm(() => {
|
|
|
41551
41551
|
};
|
|
41552
41552
|
});
|
|
41553
41553
|
|
|
41554
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41554
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/numeric.js
|
|
41555
41555
|
function numeric(a14, b3) {
|
|
41556
41556
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41557
41557
|
const mode = config?.mode;
|
|
@@ -41667,7 +41667,7 @@ var init_numeric = __esm(() => {
|
|
|
41667
41667
|
};
|
|
41668
41668
|
});
|
|
41669
41669
|
|
|
41670
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41670
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/point.js
|
|
41671
41671
|
function point(a14, b3) {
|
|
41672
41672
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41673
41673
|
if (!config?.mode || config.mode === "tuple") {
|
|
@@ -41732,7 +41732,7 @@ var init_point = __esm(() => {
|
|
|
41732
41732
|
};
|
|
41733
41733
|
});
|
|
41734
41734
|
|
|
41735
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41735
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/postgis_extension/utils.js
|
|
41736
41736
|
function hexToBytes(hex) {
|
|
41737
41737
|
const bytes = [];
|
|
41738
41738
|
for (let c3 = 0;c3 < hex.length; c3 += 2) {
|
|
@@ -41772,7 +41772,7 @@ function parseEWKB(hex) {
|
|
|
41772
41772
|
}
|
|
41773
41773
|
var init_utils2 = () => {};
|
|
41774
41774
|
|
|
41775
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41775
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/postgis_extension/geometry.js
|
|
41776
41776
|
function geometry(a14, b3) {
|
|
41777
41777
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41778
41778
|
if (!config?.mode || config.mode === "tuple") {
|
|
@@ -41831,7 +41831,7 @@ var init_geometry = __esm(() => {
|
|
|
41831
41831
|
};
|
|
41832
41832
|
});
|
|
41833
41833
|
|
|
41834
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41834
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/real.js
|
|
41835
41835
|
function real(name) {
|
|
41836
41836
|
return new PgRealBuilder(name ?? "");
|
|
41837
41837
|
}
|
|
@@ -41866,7 +41866,7 @@ var init_real = __esm(() => {
|
|
|
41866
41866
|
};
|
|
41867
41867
|
});
|
|
41868
41868
|
|
|
41869
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41869
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/serial.js
|
|
41870
41870
|
function serial(name) {
|
|
41871
41871
|
return new PgSerialBuilder(name ?? "");
|
|
41872
41872
|
}
|
|
@@ -41893,7 +41893,7 @@ var init_serial = __esm(() => {
|
|
|
41893
41893
|
};
|
|
41894
41894
|
});
|
|
41895
41895
|
|
|
41896
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41896
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/smallint.js
|
|
41897
41897
|
function smallint(name) {
|
|
41898
41898
|
return new PgSmallIntBuilder(name ?? "");
|
|
41899
41899
|
}
|
|
@@ -41925,7 +41925,7 @@ var init_smallint = __esm(() => {
|
|
|
41925
41925
|
};
|
|
41926
41926
|
});
|
|
41927
41927
|
|
|
41928
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41928
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/smallserial.js
|
|
41929
41929
|
function smallserial(name) {
|
|
41930
41930
|
return new PgSmallSerialBuilder(name ?? "");
|
|
41931
41931
|
}
|
|
@@ -41952,7 +41952,7 @@ var init_smallserial = __esm(() => {
|
|
|
41952
41952
|
};
|
|
41953
41953
|
});
|
|
41954
41954
|
|
|
41955
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41955
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/text.js
|
|
41956
41956
|
function text(a14, b3 = {}) {
|
|
41957
41957
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41958
41958
|
return new PgTextBuilder(name, config);
|
|
@@ -41981,7 +41981,7 @@ var init_text = __esm(() => {
|
|
|
41981
41981
|
};
|
|
41982
41982
|
});
|
|
41983
41983
|
|
|
41984
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
41984
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/time.js
|
|
41985
41985
|
function time(a14, b3 = {}) {
|
|
41986
41986
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
41987
41987
|
return new PgTimeBuilder(name, config.withTimezone ?? false, config.precision);
|
|
@@ -42021,7 +42021,7 @@ var init_time = __esm(() => {
|
|
|
42021
42021
|
};
|
|
42022
42022
|
});
|
|
42023
42023
|
|
|
42024
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42024
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/timestamp.js
|
|
42025
42025
|
function timestamp(a14, b3 = {}) {
|
|
42026
42026
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42027
42027
|
if (config?.mode === "string") {
|
|
@@ -42106,7 +42106,7 @@ var init_timestamp = __esm(() => {
|
|
|
42106
42106
|
};
|
|
42107
42107
|
});
|
|
42108
42108
|
|
|
42109
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42109
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/uuid.js
|
|
42110
42110
|
function uuid(name) {
|
|
42111
42111
|
return new PgUUIDBuilder(name ?? "");
|
|
42112
42112
|
}
|
|
@@ -42135,7 +42135,7 @@ var init_uuid = __esm(() => {
|
|
|
42135
42135
|
};
|
|
42136
42136
|
});
|
|
42137
42137
|
|
|
42138
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42138
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/varchar.js
|
|
42139
42139
|
function varchar(a14, b3 = {}) {
|
|
42140
42140
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42141
42141
|
return new PgVarcharBuilder(name, config);
|
|
@@ -42166,7 +42166,7 @@ var init_varchar = __esm(() => {
|
|
|
42166
42166
|
};
|
|
42167
42167
|
});
|
|
42168
42168
|
|
|
42169
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42169
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/vector_extension/bit.js
|
|
42170
42170
|
function bit(a14, b3) {
|
|
42171
42171
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42172
42172
|
return new PgBinaryVectorBuilder(name, config);
|
|
@@ -42195,7 +42195,7 @@ var init_bit = __esm(() => {
|
|
|
42195
42195
|
};
|
|
42196
42196
|
});
|
|
42197
42197
|
|
|
42198
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42198
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/vector_extension/halfvec.js
|
|
42199
42199
|
function halfvec(a14, b3) {
|
|
42200
42200
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42201
42201
|
return new PgHalfVectorBuilder(name, config);
|
|
@@ -42230,7 +42230,7 @@ var init_halfvec = __esm(() => {
|
|
|
42230
42230
|
};
|
|
42231
42231
|
});
|
|
42232
42232
|
|
|
42233
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42233
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/vector_extension/sparsevec.js
|
|
42234
42234
|
function sparsevec(a14, b3) {
|
|
42235
42235
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42236
42236
|
return new PgSparseVectorBuilder(name, config);
|
|
@@ -42259,7 +42259,7 @@ var init_sparsevec = __esm(() => {
|
|
|
42259
42259
|
};
|
|
42260
42260
|
});
|
|
42261
42261
|
|
|
42262
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42262
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/vector_extension/vector.js
|
|
42263
42263
|
function vector(a14, b3) {
|
|
42264
42264
|
const { name, config } = getColumnNameAndConfig(a14, b3);
|
|
42265
42265
|
return new PgVectorBuilder(name, config);
|
|
@@ -42294,7 +42294,7 @@ var init_vector = __esm(() => {
|
|
|
42294
42294
|
};
|
|
42295
42295
|
});
|
|
42296
42296
|
|
|
42297
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42297
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/index.js
|
|
42298
42298
|
var init_columns = __esm(() => {
|
|
42299
42299
|
init_bigint();
|
|
42300
42300
|
init_bigserial();
|
|
@@ -42333,7 +42333,7 @@ var init_columns = __esm(() => {
|
|
|
42333
42333
|
init_vector();
|
|
42334
42334
|
});
|
|
42335
42335
|
|
|
42336
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42336
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/query-promise.js
|
|
42337
42337
|
var QueryPromise;
|
|
42338
42338
|
var init_query_promise = __esm(() => {
|
|
42339
42339
|
init_entity();
|
|
@@ -42358,7 +42358,7 @@ var init_query_promise = __esm(() => {
|
|
|
42358
42358
|
};
|
|
42359
42359
|
});
|
|
42360
42360
|
|
|
42361
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42361
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/selection-proxy.js
|
|
42362
42362
|
var SelectionProxyHandler;
|
|
42363
42363
|
var init_selection_proxy = __esm(() => {
|
|
42364
42364
|
init_alias();
|
|
@@ -42419,7 +42419,7 @@ var init_selection_proxy = __esm(() => {
|
|
|
42419
42419
|
};
|
|
42420
42420
|
});
|
|
42421
42421
|
|
|
42422
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42422
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/columns/all.js
|
|
42423
42423
|
function getPgColumnBuilders() {
|
|
42424
42424
|
return {
|
|
42425
42425
|
bigint,
|
|
@@ -42491,7 +42491,7 @@ var init_all = __esm(() => {
|
|
|
42491
42491
|
init_vector();
|
|
42492
42492
|
});
|
|
42493
42493
|
|
|
42494
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42494
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/table.js
|
|
42495
42495
|
function pgTableWithSchema(name, columns, extraConfig, schema, baseName = name) {
|
|
42496
42496
|
const rawTable = new PgTable(name, schema, baseName);
|
|
42497
42497
|
const parsedColumns = typeof columns === "function" ? columns(getPgColumnBuilders()) : columns;
|
|
@@ -42543,7 +42543,7 @@ var init_table2 = __esm(() => {
|
|
|
42543
42543
|
};
|
|
42544
42544
|
});
|
|
42545
42545
|
|
|
42546
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42546
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/indexes.js
|
|
42547
42547
|
function index(name) {
|
|
42548
42548
|
return new IndexBuilderOn(false, name);
|
|
42549
42549
|
}
|
|
@@ -42632,7 +42632,7 @@ var init_indexes = __esm(() => {
|
|
|
42632
42632
|
};
|
|
42633
42633
|
});
|
|
42634
42634
|
|
|
42635
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42635
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/policies.js
|
|
42636
42636
|
var PgPolicy;
|
|
42637
42637
|
var init_policies = __esm(() => {
|
|
42638
42638
|
init_entity();
|
|
@@ -42661,7 +42661,7 @@ var init_policies = __esm(() => {
|
|
|
42661
42661
|
};
|
|
42662
42662
|
});
|
|
42663
42663
|
|
|
42664
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42664
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/primary-keys.js
|
|
42665
42665
|
function primaryKey(...config) {
|
|
42666
42666
|
if (config[0].columns) {
|
|
42667
42667
|
return new PrimaryKeyBuilder(config[0].columns, config[0].name);
|
|
@@ -42699,13 +42699,13 @@ var init_primary_keys = __esm(() => {
|
|
|
42699
42699
|
};
|
|
42700
42700
|
});
|
|
42701
42701
|
|
|
42702
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42702
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/view-common.js
|
|
42703
42703
|
var PgViewConfig;
|
|
42704
42704
|
var init_view_common2 = __esm(() => {
|
|
42705
42705
|
PgViewConfig = Symbol.for("drizzle:PgViewConfig");
|
|
42706
42706
|
});
|
|
42707
42707
|
|
|
42708
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42708
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/casing.js
|
|
42709
42709
|
function toSnakeCase(input) {
|
|
42710
42710
|
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
|
|
42711
42711
|
return words.map((word) => word.toLowerCase()).join("_");
|
|
@@ -42762,7 +42762,7 @@ var init_casing = __esm(() => {
|
|
|
42762
42762
|
};
|
|
42763
42763
|
});
|
|
42764
42764
|
|
|
42765
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42765
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/errors.js
|
|
42766
42766
|
var DrizzleError, DrizzleQueryError, TransactionRollbackError;
|
|
42767
42767
|
var init_errors2 = __esm(() => {
|
|
42768
42768
|
init_entity();
|
|
@@ -42794,7 +42794,7 @@ params: ${params}`);
|
|
|
42794
42794
|
};
|
|
42795
42795
|
});
|
|
42796
42796
|
|
|
42797
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42797
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
42798
42798
|
function bindIfParam(value, column) {
|
|
42799
42799
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
42800
42800
|
return new Param(value, column);
|
|
@@ -42900,7 +42900,7 @@ var init_conditions = __esm(() => {
|
|
|
42900
42900
|
init_sql();
|
|
42901
42901
|
});
|
|
42902
42902
|
|
|
42903
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42903
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/expressions/select.js
|
|
42904
42904
|
function asc(column) {
|
|
42905
42905
|
return sql`${column} asc`;
|
|
42906
42906
|
}
|
|
@@ -42911,13 +42911,13 @@ var init_select = __esm(() => {
|
|
|
42911
42911
|
init_sql();
|
|
42912
42912
|
});
|
|
42913
42913
|
|
|
42914
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42914
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/expressions/index.js
|
|
42915
42915
|
var init_expressions = __esm(() => {
|
|
42916
42916
|
init_conditions();
|
|
42917
42917
|
init_select();
|
|
42918
42918
|
});
|
|
42919
42919
|
|
|
42920
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
42920
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/relations.js
|
|
42921
42921
|
function getOperators() {
|
|
42922
42922
|
return {
|
|
42923
42923
|
and,
|
|
@@ -43149,7 +43149,7 @@ var init_relations = __esm(() => {
|
|
|
43149
43149
|
};
|
|
43150
43150
|
});
|
|
43151
43151
|
|
|
43152
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43152
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/functions/aggregate.js
|
|
43153
43153
|
function count(expression) {
|
|
43154
43154
|
return sql`count(${expression || sql.raw("*")})`.mapWith(Number);
|
|
43155
43155
|
}
|
|
@@ -43157,23 +43157,23 @@ var init_aggregate = __esm(() => {
|
|
|
43157
43157
|
init_sql();
|
|
43158
43158
|
});
|
|
43159
43159
|
|
|
43160
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43160
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/functions/vector.js
|
|
43161
43161
|
var init_vector2 = () => {};
|
|
43162
43162
|
|
|
43163
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43163
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/functions/index.js
|
|
43164
43164
|
var init_functions = __esm(() => {
|
|
43165
43165
|
init_aggregate();
|
|
43166
43166
|
init_vector2();
|
|
43167
43167
|
});
|
|
43168
43168
|
|
|
43169
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43169
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/sql/index.js
|
|
43170
43170
|
var init_sql2 = __esm(() => {
|
|
43171
43171
|
init_expressions();
|
|
43172
43172
|
init_functions();
|
|
43173
43173
|
init_sql();
|
|
43174
43174
|
});
|
|
43175
43175
|
|
|
43176
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43176
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/view-base.js
|
|
43177
43177
|
var PgViewBase;
|
|
43178
43178
|
var init_view_base = __esm(() => {
|
|
43179
43179
|
init_entity();
|
|
@@ -43183,7 +43183,7 @@ var init_view_base = __esm(() => {
|
|
|
43183
43183
|
};
|
|
43184
43184
|
});
|
|
43185
43185
|
|
|
43186
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43186
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/dialect.js
|
|
43187
43187
|
var PgDialect;
|
|
43188
43188
|
var init_dialect = __esm(() => {
|
|
43189
43189
|
init_alias();
|
|
@@ -43770,7 +43770,7 @@ var init_dialect = __esm(() => {
|
|
|
43770
43770
|
};
|
|
43771
43771
|
});
|
|
43772
43772
|
|
|
43773
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43773
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/query-builders/query-builder.js
|
|
43774
43774
|
var TypedQueryBuilder;
|
|
43775
43775
|
var init_query_builder = __esm(() => {
|
|
43776
43776
|
init_entity();
|
|
@@ -43782,7 +43782,7 @@ var init_query_builder = __esm(() => {
|
|
|
43782
43782
|
};
|
|
43783
43783
|
});
|
|
43784
43784
|
|
|
43785
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
43785
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/select.js
|
|
43786
43786
|
function createSetOperator(type, isAll) {
|
|
43787
43787
|
return (leftSelect, rightSelect, ...restSelects) => {
|
|
43788
43788
|
const setOperators = [rightSelect, ...restSelects].map((select2) => ({
|
|
@@ -44113,7 +44113,7 @@ var init_select2 = __esm(() => {
|
|
|
44113
44113
|
exceptAll = createSetOperator("except", true);
|
|
44114
44114
|
});
|
|
44115
44115
|
|
|
44116
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44116
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/query-builder.js
|
|
44117
44117
|
var QueryBuilder;
|
|
44118
44118
|
var init_query_builder2 = __esm(() => {
|
|
44119
44119
|
init_entity();
|
|
@@ -44199,7 +44199,7 @@ var init_query_builder2 = __esm(() => {
|
|
|
44199
44199
|
};
|
|
44200
44200
|
});
|
|
44201
44201
|
|
|
44202
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44202
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/view.js
|
|
44203
44203
|
function pgViewWithSchema(name, selection, schema) {
|
|
44204
44204
|
if (selection) {
|
|
44205
44205
|
return new ManualViewBuilder(name, selection, schema);
|
|
@@ -44428,7 +44428,7 @@ var init_view = __esm(() => {
|
|
|
44428
44428
|
};
|
|
44429
44429
|
});
|
|
44430
44430
|
|
|
44431
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44431
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/utils.js
|
|
44432
44432
|
function extractUsedTable(table) {
|
|
44433
44433
|
if (is(table, PgTable)) {
|
|
44434
44434
|
return [table[Schema] ? `${table[Schema]}.${table[Table.Symbol.BaseName]}` : table[Table.Symbol.BaseName]];
|
|
@@ -44449,7 +44449,7 @@ var init_utils3 = __esm(() => {
|
|
|
44449
44449
|
init_table();
|
|
44450
44450
|
});
|
|
44451
44451
|
|
|
44452
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44452
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/delete.js
|
|
44453
44453
|
var PgDeleteBase;
|
|
44454
44454
|
var init_delete = __esm(() => {
|
|
44455
44455
|
init_entity();
|
|
@@ -44519,7 +44519,7 @@ var init_delete = __esm(() => {
|
|
|
44519
44519
|
};
|
|
44520
44520
|
});
|
|
44521
44521
|
|
|
44522
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44522
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/insert.js
|
|
44523
44523
|
var PgInsertBuilder, PgInsertBase;
|
|
44524
44524
|
var init_insert = __esm(() => {
|
|
44525
44525
|
init_entity();
|
|
@@ -44653,7 +44653,7 @@ var init_insert = __esm(() => {
|
|
|
44653
44653
|
};
|
|
44654
44654
|
});
|
|
44655
44655
|
|
|
44656
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44656
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/refresh-materialized-view.js
|
|
44657
44657
|
var PgRefreshMaterializedView;
|
|
44658
44658
|
var init_refresh_materialized_view = __esm(() => {
|
|
44659
44659
|
init_entity();
|
|
@@ -44710,7 +44710,7 @@ var init_refresh_materialized_view = __esm(() => {
|
|
|
44710
44710
|
};
|
|
44711
44711
|
});
|
|
44712
44712
|
|
|
44713
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44713
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/update.js
|
|
44714
44714
|
var PgUpdateBuilder, PgUpdateBase;
|
|
44715
44715
|
var init_update = __esm(() => {
|
|
44716
44716
|
init_entity();
|
|
@@ -44876,7 +44876,7 @@ var init_update = __esm(() => {
|
|
|
44876
44876
|
};
|
|
44877
44877
|
});
|
|
44878
44878
|
|
|
44879
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44879
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/index.js
|
|
44880
44880
|
var init_query_builders = __esm(() => {
|
|
44881
44881
|
init_delete();
|
|
44882
44882
|
init_insert();
|
|
@@ -44886,7 +44886,7 @@ var init_query_builders = __esm(() => {
|
|
|
44886
44886
|
init_update();
|
|
44887
44887
|
});
|
|
44888
44888
|
|
|
44889
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44889
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/count.js
|
|
44890
44890
|
var PgCountBuilder;
|
|
44891
44891
|
var init_count = __esm(() => {
|
|
44892
44892
|
init_entity();
|
|
@@ -44932,7 +44932,7 @@ var init_count = __esm(() => {
|
|
|
44932
44932
|
};
|
|
44933
44933
|
});
|
|
44934
44934
|
|
|
44935
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
44935
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/query.js
|
|
44936
44936
|
var RelationalQueryBuilder, PgRelationalQuery;
|
|
44937
44937
|
var init_query = __esm(() => {
|
|
44938
44938
|
init_entity();
|
|
@@ -45021,7 +45021,7 @@ var init_query = __esm(() => {
|
|
|
45021
45021
|
};
|
|
45022
45022
|
});
|
|
45023
45023
|
|
|
45024
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45024
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/query-builders/raw.js
|
|
45025
45025
|
var PgRaw;
|
|
45026
45026
|
var init_raw = __esm(() => {
|
|
45027
45027
|
init_entity();
|
|
@@ -45053,7 +45053,7 @@ var init_raw = __esm(() => {
|
|
|
45053
45053
|
};
|
|
45054
45054
|
});
|
|
45055
45055
|
|
|
45056
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45056
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/db.js
|
|
45057
45057
|
var PgDatabase;
|
|
45058
45058
|
var init_db = __esm(() => {
|
|
45059
45059
|
init_entity();
|
|
@@ -45191,7 +45191,7 @@ var init_db = __esm(() => {
|
|
|
45191
45191
|
};
|
|
45192
45192
|
});
|
|
45193
45193
|
|
|
45194
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45194
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/roles.js
|
|
45195
45195
|
var PgRole;
|
|
45196
45196
|
var init_roles = __esm(() => {
|
|
45197
45197
|
init_entity();
|
|
@@ -45216,7 +45216,7 @@ var init_roles = __esm(() => {
|
|
|
45216
45216
|
};
|
|
45217
45217
|
});
|
|
45218
45218
|
|
|
45219
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45219
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/sequence.js
|
|
45220
45220
|
function pgSequenceWithSchema(name, options, schema) {
|
|
45221
45221
|
return new PgSequence(name, options, schema);
|
|
45222
45222
|
}
|
|
@@ -45233,7 +45233,7 @@ var init_sequence = __esm(() => {
|
|
|
45233
45233
|
};
|
|
45234
45234
|
});
|
|
45235
45235
|
|
|
45236
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45236
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/schema.js
|
|
45237
45237
|
var PgSchema;
|
|
45238
45238
|
var init_schema = __esm(() => {
|
|
45239
45239
|
init_entity();
|
|
@@ -45271,7 +45271,7 @@ var init_schema = __esm(() => {
|
|
|
45271
45271
|
};
|
|
45272
45272
|
});
|
|
45273
45273
|
|
|
45274
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45274
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/cache/core/cache.js
|
|
45275
45275
|
async function hashQuery(sql3, params) {
|
|
45276
45276
|
const dataToHash = `${sql3}-${JSON.stringify(params)}`;
|
|
45277
45277
|
const encoder2 = new TextEncoder;
|
|
@@ -45300,7 +45300,7 @@ var init_cache = __esm(() => {
|
|
|
45300
45300
|
};
|
|
45301
45301
|
});
|
|
45302
45302
|
|
|
45303
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45303
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/session.js
|
|
45304
45304
|
var PgPreparedQuery, PgSession, PgTransaction;
|
|
45305
45305
|
var init_session = __esm(() => {
|
|
45306
45306
|
init_cache();
|
|
@@ -45439,12 +45439,12 @@ var init_session = __esm(() => {
|
|
|
45439
45439
|
};
|
|
45440
45440
|
});
|
|
45441
45441
|
|
|
45442
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45442
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/utils/index.js
|
|
45443
45443
|
var init_utils4 = __esm(() => {
|
|
45444
45444
|
init_array();
|
|
45445
45445
|
});
|
|
45446
45446
|
|
|
45447
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45447
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/pg-core/index.js
|
|
45448
45448
|
var init_pg_core = __esm(() => {
|
|
45449
45449
|
init_alias2();
|
|
45450
45450
|
init_checks();
|
|
@@ -45468,7 +45468,7 @@ var init_pg_core = __esm(() => {
|
|
|
45468
45468
|
init_view();
|
|
45469
45469
|
});
|
|
45470
45470
|
|
|
45471
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45471
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/logger.js
|
|
45472
45472
|
var ConsoleLogWriter, DefaultLogger, NoopLogger;
|
|
45473
45473
|
var init_logger = __esm(() => {
|
|
45474
45474
|
init_entity();
|
|
@@ -45502,7 +45502,7 @@ var init_logger = __esm(() => {
|
|
|
45502
45502
|
};
|
|
45503
45503
|
});
|
|
45504
45504
|
|
|
45505
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
45505
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/index.js
|
|
45506
45506
|
var init_drizzle_orm = __esm(() => {
|
|
45507
45507
|
init_alias();
|
|
45508
45508
|
init_column_builder();
|
|
@@ -45791,6 +45791,8 @@ var init_schema2 = __esm(() => {
|
|
|
45791
45791
|
completedBatches: integer("completed_batches").notNull().default(0),
|
|
45792
45792
|
failedBatches: integer("failed_batches").notNull().default(0),
|
|
45793
45793
|
errorCode: text("error_code"),
|
|
45794
|
+
graphErrorCode: text("graph_error_code"),
|
|
45795
|
+
summarizeErrorCode: text("summarize_error_code"),
|
|
45794
45796
|
attempts: integer("attempts").notNull().default(0),
|
|
45795
45797
|
requestedAt: timestamp("requested_at").defaultNow().notNull(),
|
|
45796
45798
|
startedAt: timestamp("started_at"),
|
|
@@ -79804,7 +79806,7 @@ var init_dist3 = __esm(() => {
|
|
|
79804
79806
|
init_string();
|
|
79805
79807
|
});
|
|
79806
79808
|
|
|
79807
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
79809
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/adapters/kysely-adapter/index.mjs
|
|
79808
79810
|
var exports_kysely_adapter = {};
|
|
79809
79811
|
__export(exports_kysely_adapter, {
|
|
79810
79812
|
createKyselyAdapter: () => createKyselyAdapter,
|
|
@@ -139253,7 +139255,7 @@ var require_nodes = __commonJS(function(exports) {
|
|
|
139253
139255
|
}
|
|
139254
139256
|
});
|
|
139255
139257
|
|
|
139256
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
139258
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/conventions.js
|
|
139257
139259
|
var require_conventions = __commonJS(function(exports) {
|
|
139258
139260
|
function find3(list, predicate, ac2) {
|
|
139259
139261
|
if (ac2 === undefined) {
|
|
@@ -139307,18 +139309,25 @@ var require_conventions = __commonJS(function(exports) {
|
|
|
139307
139309
|
XML: "http://www.w3.org/XML/1998/namespace",
|
|
139308
139310
|
XMLNS: "http://www.w3.org/2000/xmlns/"
|
|
139309
139311
|
});
|
|
139312
|
+
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
|
|
139313
|
+
var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
139314
|
+
var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$");
|
|
139310
139315
|
exports.assign = assign2;
|
|
139311
139316
|
exports.find = find3;
|
|
139312
139317
|
exports.freeze = freeze3;
|
|
139313
139318
|
exports.MIME_TYPE = MIME_TYPE;
|
|
139314
139319
|
exports.NAMESPACE = NAMESPACE;
|
|
139320
|
+
exports.nameStartChar = nameStartChar;
|
|
139321
|
+
exports.nameChar = nameChar;
|
|
139322
|
+
exports.tagNamePattern = tagNamePattern;
|
|
139315
139323
|
});
|
|
139316
139324
|
|
|
139317
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
139325
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/dom.js
|
|
139318
139326
|
var require_dom = __commonJS(function(exports) {
|
|
139319
139327
|
var conventions = require_conventions();
|
|
139320
139328
|
var find3 = conventions.find;
|
|
139321
139329
|
var NAMESPACE = conventions.NAMESPACE;
|
|
139330
|
+
var tagNamePattern = conventions.tagNamePattern;
|
|
139322
139331
|
function notEmptyString(input) {
|
|
139323
139332
|
return input !== "";
|
|
139324
139333
|
}
|
|
@@ -139459,7 +139468,9 @@ var require_dom = __commonJS(function(exports) {
|
|
|
139459
139468
|
return this[i4] || null;
|
|
139460
139469
|
};
|
|
139461
139470
|
_extends(LiveNodeList, NodeList);
|
|
139462
|
-
function NamedNodeMap() {
|
|
139471
|
+
function NamedNodeMap() {
|
|
139472
|
+
this._nameIndex = Object.create(null);
|
|
139473
|
+
}
|
|
139463
139474
|
function _findNodeIndex(list, node) {
|
|
139464
139475
|
var i4 = list.length;
|
|
139465
139476
|
while (i4--) {
|
|
@@ -139468,12 +139479,22 @@ var require_dom = __commonJS(function(exports) {
|
|
|
139468
139479
|
}
|
|
139469
139480
|
}
|
|
139470
139481
|
}
|
|
139482
|
+
function _nnmIndexAdd(list, attr) {
|
|
139483
|
+
list._nameIndex[attr.nodeName] = attr;
|
|
139484
|
+
}
|
|
139485
|
+
function _nnmIndexRemove(list, attr) {
|
|
139486
|
+
if (list._nameIndex[attr.nodeName] === attr) {
|
|
139487
|
+
delete list._nameIndex[attr.nodeName];
|
|
139488
|
+
}
|
|
139489
|
+
}
|
|
139471
139490
|
function _addNamedNode(el, list, newAttr, oldAttr) {
|
|
139472
139491
|
if (oldAttr) {
|
|
139473
139492
|
list[_findNodeIndex(list, oldAttr)] = newAttr;
|
|
139493
|
+
_nnmIndexRemove(list, oldAttr);
|
|
139474
139494
|
} else {
|
|
139475
139495
|
list[list.length++] = newAttr;
|
|
139476
139496
|
}
|
|
139497
|
+
_nnmIndexAdd(list, newAttr);
|
|
139477
139498
|
if (el) {
|
|
139478
139499
|
newAttr.ownerElement = el;
|
|
139479
139500
|
var doc5 = el.ownerDocument;
|
|
@@ -139491,6 +139512,7 @@ var require_dom = __commonJS(function(exports) {
|
|
|
139491
139512
|
list[i4] = list[++i4];
|
|
139492
139513
|
}
|
|
139493
139514
|
list.length = lastIndex;
|
|
139515
|
+
_nnmIndexRemove(list, attr);
|
|
139494
139516
|
if (el) {
|
|
139495
139517
|
var doc5 = el.ownerDocument;
|
|
139496
139518
|
if (doc5) {
|
|
@@ -139519,7 +139541,7 @@ var require_dom = __commonJS(function(exports) {
|
|
|
139519
139541
|
if (el && el != this._ownerElement) {
|
|
139520
139542
|
throw new DOMException2(INUSE_ATTRIBUTE_ERR);
|
|
139521
139543
|
}
|
|
139522
|
-
var oldAttr = this.
|
|
139544
|
+
var oldAttr = this._nameIndex[attr.nodeName];
|
|
139523
139545
|
_addNamedNode(this._ownerElement, this, attr, oldAttr);
|
|
139524
139546
|
return oldAttr;
|
|
139525
139547
|
},
|
|
@@ -139623,8 +139645,29 @@ var require_dom = __commonJS(function(exports) {
|
|
|
139623
139645
|
while (child2) {
|
|
139624
139646
|
var next = child2.nextSibling;
|
|
139625
139647
|
if (next !== null && next.nodeType === TEXT_NODE2 && child2.nodeType === TEXT_NODE2) {
|
|
139626
|
-
|
|
139627
|
-
|
|
139648
|
+
var tail = [];
|
|
139649
|
+
var sibling = next;
|
|
139650
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE2) {
|
|
139651
|
+
tail.push(sibling.data);
|
|
139652
|
+
sibling = sibling.nextSibling;
|
|
139653
|
+
}
|
|
139654
|
+
var removed = child2.nextSibling;
|
|
139655
|
+
while (removed !== sibling) {
|
|
139656
|
+
var following = removed.nextSibling;
|
|
139657
|
+
removed.parentNode = null;
|
|
139658
|
+
removed.previousSibling = null;
|
|
139659
|
+
removed.nextSibling = null;
|
|
139660
|
+
removed = following;
|
|
139661
|
+
}
|
|
139662
|
+
child2.nextSibling = sibling;
|
|
139663
|
+
if (sibling !== null) {
|
|
139664
|
+
sibling.previousSibling = child2;
|
|
139665
|
+
} else {
|
|
139666
|
+
node.lastChild = child2;
|
|
139667
|
+
}
|
|
139668
|
+
child2.appendData(tail.join(""));
|
|
139669
|
+
_onUpdateChild(node.ownerDocument, node);
|
|
139670
|
+
child2 = sibling;
|
|
139628
139671
|
} else {
|
|
139629
139672
|
child2 = next;
|
|
139630
139673
|
}
|
|
@@ -140082,6 +140125,9 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140082
140125
|
return node;
|
|
140083
140126
|
},
|
|
140084
140127
|
createEntityReference: function(name) {
|
|
140128
|
+
if (!tagNamePattern.test(name)) {
|
|
140129
|
+
throw new DOMException2(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
140130
|
+
}
|
|
140085
140131
|
var node = new EntityReference;
|
|
140086
140132
|
node.ownerDocument = this;
|
|
140087
140133
|
node.nodeName = name;
|
|
@@ -140329,7 +140375,10 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140329
140375
|
}
|
|
140330
140376
|
return true;
|
|
140331
140377
|
}
|
|
140332
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
140378
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
140379
|
+
if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
|
|
140380
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
|
|
140381
|
+
}
|
|
140333
140382
|
buf.push(" ", qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
140334
140383
|
}
|
|
140335
140384
|
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
@@ -140387,6 +140436,9 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140387
140436
|
}
|
|
140388
140437
|
}
|
|
140389
140438
|
}
|
|
140439
|
+
if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
|
|
140440
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
|
|
140441
|
+
}
|
|
140390
140442
|
buf.push("<", prefixedNodeName);
|
|
140391
140443
|
var childNs = ns.slice();
|
|
140392
140444
|
for (var i4 = 0;i4 < len; i4++) {
|
|
@@ -140402,7 +140454,7 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140402
140454
|
if (needNamespaceDefine(attr, html2, childNs)) {
|
|
140403
140455
|
var attrPrefix = attr.prefix || "";
|
|
140404
140456
|
var uri2 = attr.namespaceURI;
|
|
140405
|
-
addSerializedAttribute(buf, attrPrefix ? "xmlns:" + attrPrefix : "xmlns", uri2);
|
|
140457
|
+
addSerializedAttribute(buf, attrPrefix ? "xmlns:" + attrPrefix : "xmlns", uri2, requireWellFormed);
|
|
140406
140458
|
childNs.push({ prefix: attrPrefix, namespace: uri2 });
|
|
140407
140459
|
}
|
|
140408
140460
|
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
@@ -140410,14 +140462,14 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140410
140462
|
if (typeof filteredAttr === "string") {
|
|
140411
140463
|
buf.push(filteredAttr);
|
|
140412
140464
|
} else {
|
|
140413
|
-
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
140465
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
140414
140466
|
}
|
|
140415
140467
|
}
|
|
140416
140468
|
}
|
|
140417
140469
|
if (nodeName === prefixedNodeName && needNamespaceDefine(n3, html2, childNs)) {
|
|
140418
140470
|
var nodePrefix = n3.prefix || "";
|
|
140419
140471
|
var uri2 = n3.namespaceURI;
|
|
140420
|
-
addSerializedAttribute(buf, nodePrefix ? "xmlns:" + nodePrefix : "xmlns", uri2);
|
|
140472
|
+
addSerializedAttribute(buf, nodePrefix ? "xmlns:" + nodePrefix : "xmlns", uri2, requireWellFormed);
|
|
140421
140473
|
childNs.push({ prefix: nodePrefix, namespace: uri2 });
|
|
140422
140474
|
}
|
|
140423
140475
|
var child2 = n3.firstChild;
|
|
@@ -140444,7 +140496,7 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140444
140496
|
case DOCUMENT_FRAGMENT_NODE2:
|
|
140445
140497
|
return { ns: ns.slice(), isHTML: html2, tag: null };
|
|
140446
140498
|
case ATTRIBUTE_NODE:
|
|
140447
|
-
addSerializedAttribute(buf, n3.name, n3.value);
|
|
140499
|
+
addSerializedAttribute(buf, n3.name, n3.value, requireWellFormed);
|
|
140448
140500
|
return null;
|
|
140449
140501
|
case TEXT_NODE2:
|
|
140450
140502
|
buf.push(n3.data.replace(/[<&>]/g, _xmlEncoder));
|
|
@@ -140463,6 +140515,9 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140463
140515
|
return null;
|
|
140464
140516
|
case DOCUMENT_TYPE_NODE2:
|
|
140465
140517
|
if (requireWellFormed) {
|
|
140518
|
+
if (!tagNamePattern.test(n3.name)) {
|
|
140519
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The doctype name "' + n3.name + '" is not a valid XML Name');
|
|
140520
|
+
}
|
|
140466
140521
|
if (n3.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n3.publicId)) {
|
|
140467
140522
|
throw new DOMException2(INVALID_STATE_ERR, "DocumentType publicId is not a valid PubidLiteral");
|
|
140468
140523
|
}
|
|
@@ -140493,12 +140548,20 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140493
140548
|
}
|
|
140494
140549
|
return null;
|
|
140495
140550
|
case PROCESSING_INSTRUCTION_NODE:
|
|
140496
|
-
if (requireWellFormed
|
|
140497
|
-
|
|
140551
|
+
if (requireWellFormed) {
|
|
140552
|
+
if (!tagNamePattern.test(n3.target) || n3.target.indexOf(":") !== -1 || n3.target.toLowerCase() === "xml") {
|
|
140553
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The processing instruction target "' + n3.target + '" is not a valid XML NCName or is reserved');
|
|
140554
|
+
}
|
|
140555
|
+
if (n3.data.indexOf("?>") !== -1) {
|
|
140556
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
140557
|
+
}
|
|
140498
140558
|
}
|
|
140499
140559
|
buf.push("<?", n3.target, " ", n3.data, "?>");
|
|
140500
140560
|
return null;
|
|
140501
140561
|
case ENTITY_REFERENCE_NODE:
|
|
140562
|
+
if (requireWellFormed && !tagNamePattern.test(n3.nodeName)) {
|
|
140563
|
+
throw new DOMException2(INVALID_STATE_ERR, 'The entity reference name "' + n3.nodeName + '" is not a valid XML Name');
|
|
140564
|
+
}
|
|
140502
140565
|
buf.push("&", n3.nodeName, ";");
|
|
140503
140566
|
return null;
|
|
140504
140567
|
default:
|
|
@@ -140637,7 +140700,7 @@ var require_dom = __commonJS(function(exports) {
|
|
|
140637
140700
|
exports.XMLSerializer = XMLSerializer;
|
|
140638
140701
|
});
|
|
140639
140702
|
|
|
140640
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
140703
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/entities.js
|
|
140641
140704
|
var require_entities = __commonJS(function(exports) {
|
|
140642
140705
|
var freeze3 = require_conventions().freeze;
|
|
140643
140706
|
exports.XML_ENTITIES = freeze3({
|
|
@@ -142778,12 +142841,10 @@ var require_entities = __commonJS(function(exports) {
|
|
|
142778
142841
|
exports.entityMap = exports.HTML_ENTITIES;
|
|
142779
142842
|
});
|
|
142780
142843
|
|
|
142781
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
142844
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/sax.js
|
|
142782
142845
|
var require_sax = __commonJS(function(exports) {
|
|
142783
142846
|
var NAMESPACE = require_conventions().NAMESPACE;
|
|
142784
|
-
var
|
|
142785
|
-
var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
142786
|
-
var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$");
|
|
142847
|
+
var tagNamePattern = require_conventions().tagNamePattern;
|
|
142787
142848
|
var S_TAG = 0;
|
|
142788
142849
|
var S_ATTR = 1;
|
|
142789
142850
|
var S_ATTR_SPACE = 2;
|
|
@@ -142872,7 +142933,7 @@ var require_sax = __commonJS(function(exports) {
|
|
|
142872
142933
|
switch (source.charAt(tagStart + 1)) {
|
|
142873
142934
|
case "/":
|
|
142874
142935
|
var end = source.indexOf(">", tagStart + 3);
|
|
142875
|
-
var tagName = source.substring(tagStart + 2, end).replace(
|
|
142936
|
+
var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, "$1");
|
|
142876
142937
|
var config4 = parseStack.pop();
|
|
142877
142938
|
if (end < 0) {
|
|
142878
142939
|
tagName = source.substring(tagStart + 2).replace(/[\s<].*/, "");
|
|
@@ -142882,6 +142943,8 @@ var require_sax = __commonJS(function(exports) {
|
|
|
142882
142943
|
tagName = tagName.replace(/[\s<].*/, "");
|
|
142883
142944
|
errorHandler.error("end tag name: " + tagName + " maybe not complete");
|
|
142884
142945
|
end = tagStart + 1 + tagName.length;
|
|
142946
|
+
} else if (/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])) {
|
|
142947
|
+
errorHandler.error('end tag name is followed by whitespace and trailing content: "' + tagName + '"');
|
|
142885
142948
|
}
|
|
142886
142949
|
var localNSMap = config4.localNSMap;
|
|
142887
142950
|
var endMatch = config4.tagName == tagName;
|
|
@@ -142978,6 +143041,9 @@ var require_sax = __commonJS(function(exports) {
|
|
|
142978
143041
|
var s2 = S_TAG;
|
|
142979
143042
|
while (true) {
|
|
142980
143043
|
var c3 = source.charAt(p2);
|
|
143044
|
+
if (s2 === S_TAG && c3 === "<") {
|
|
143045
|
+
throw new Error("unexpected < in tag name: " + source.slice(start, p2));
|
|
143046
|
+
}
|
|
142981
143047
|
switch (c3) {
|
|
142982
143048
|
case "=":
|
|
142983
143049
|
if (s2 === S_ATTR) {
|
|
@@ -143145,7 +143211,7 @@ var require_sax = __commonJS(function(exports) {
|
|
|
143145
143211
|
if (nsPrefix !== false) {
|
|
143146
143212
|
if (localNSMap == null) {
|
|
143147
143213
|
localNSMap = {};
|
|
143148
|
-
|
|
143214
|
+
currentNSMap = Object.create(currentNSMap);
|
|
143149
143215
|
}
|
|
143150
143216
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
143151
143217
|
a14.uri = NAMESPACE.XMLNS;
|
|
@@ -143334,7 +143400,7 @@ var require_sax = __commonJS(function(exports) {
|
|
|
143334
143400
|
exports.ParseError = ParseError3;
|
|
143335
143401
|
});
|
|
143336
143402
|
|
|
143337
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
143403
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/dom-parser.js
|
|
143338
143404
|
var require_dom_parser = __commonJS(function(exports) {
|
|
143339
143405
|
var conventions = require_conventions();
|
|
143340
143406
|
var dom = require_dom();
|
|
@@ -143537,7 +143603,7 @@ var require_dom_parser = __commonJS(function(exports) {
|
|
|
143537
143603
|
exports.DOMParser = DOMParser3;
|
|
143538
143604
|
});
|
|
143539
143605
|
|
|
143540
|
-
// ../../node_modules/.bun/@xmldom+xmldom@0.8.
|
|
143606
|
+
// ../../node_modules/.bun/@xmldom+xmldom@0.8.15/node_modules/@xmldom/xmldom/lib/index.js
|
|
143541
143607
|
var require_lib5 = __commonJS(function(exports) {
|
|
143542
143608
|
var dom = require_dom();
|
|
143543
143609
|
exports.DOMImplementation = dom.DOMImplementation;
|
|
@@ -153939,7 +154005,7 @@ __export(exports_type3, {
|
|
|
153939
154005
|
// ../../node_modules/.bun/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
|
|
153940
154006
|
var Type2 = exports_type3;
|
|
153941
154007
|
|
|
153942
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
154008
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/index.mjs
|
|
153943
154009
|
var import_fast_decode_uri_component4 = __toESM(require_fast_decode_uri_component(), 1);
|
|
153944
154010
|
// ../../node_modules/.bun/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/errors/function.mjs
|
|
153945
154011
|
function DefaultErrorFunction(error) {
|
|
@@ -157833,7 +157899,7 @@ var TypeCompiler;
|
|
|
157833
157899
|
TypeCompiler2.Compile = Compile;
|
|
157834
157900
|
})(TypeCompiler || (TypeCompiler = {}));
|
|
157835
157901
|
|
|
157836
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
157902
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/universal/utils.mjs
|
|
157837
157903
|
var isBun = typeof Bun < "u";
|
|
157838
157904
|
function isCloudflareWorker() {
|
|
157839
157905
|
try {
|
|
@@ -157845,7 +157911,7 @@ function isCloudflareWorker() {
|
|
|
157845
157911
|
return false;
|
|
157846
157912
|
}
|
|
157847
157913
|
|
|
157848
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
157914
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/universal/file.mjs
|
|
157849
157915
|
var mime = {
|
|
157850
157916
|
aac: "audio/aac",
|
|
157851
157917
|
abw: "application/x-abiword",
|
|
@@ -157972,7 +158038,7 @@ class ElysiaFile {
|
|
|
157972
158038
|
}
|
|
157973
158039
|
}
|
|
157974
158040
|
|
|
157975
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
158041
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/utils.mjs
|
|
157976
158042
|
var replaceUrlPath = (url, pathname) => {
|
|
157977
158043
|
const pathStartIndex = url.indexOf("/", 11), queryIndex = url.indexOf("?", pathStartIndex);
|
|
157978
158044
|
return queryIndex === -1 ? `${url.slice(0, pathStartIndex)}${pathname.charCodeAt(0) === 47 ? "" : "/"}${pathname}` : `${url.slice(0, pathStartIndex)}${pathname.charCodeAt(0) === 47 ? "" : "/"}${pathname}${url.slice(queryIndex)}`;
|
|
@@ -158446,7 +158512,7 @@ var emptySchema = {
|
|
|
158446
158512
|
response: true
|
|
158447
158513
|
};
|
|
158448
158514
|
|
|
158449
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
158515
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/error.mjs
|
|
158450
158516
|
var env = typeof Bun < "u" ? Bun.env : typeof process < "u" ? process?.env : undefined;
|
|
158451
158517
|
var ERROR_CODE = Symbol("ElysiaErrorCode");
|
|
158452
158518
|
var isProduction = (env?.NODE_ENV ?? env?.ENV) === "production";
|
|
@@ -158703,7 +158769,7 @@ class ValidationError extends Error {
|
|
|
158703
158769
|
}
|
|
158704
158770
|
}
|
|
158705
158771
|
|
|
158706
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
158772
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/type-system/utils.mjs
|
|
158707
158773
|
var tryParse = (v2, schema) => {
|
|
158708
158774
|
try {
|
|
158709
158775
|
return JSON.parse(v2);
|
|
@@ -158785,7 +158851,7 @@ var validateFile = (options, value) => {
|
|
|
158785
158851
|
return true;
|
|
158786
158852
|
};
|
|
158787
158853
|
|
|
158788
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
158854
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/type-system/format.mjs
|
|
158789
158855
|
var fullFormats = {
|
|
158790
158856
|
date,
|
|
158791
158857
|
time: getTime(true),
|
|
@@ -158924,7 +158990,7 @@ exports_format.Has("date") || exports_format.Set("date", (value) => {
|
|
|
158924
158990
|
}
|
|
158925
158991
|
});
|
|
158926
158992
|
|
|
158927
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
158993
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/type-system/index.mjs
|
|
158928
158994
|
var t2 = Object.assign({}, Type2);
|
|
158929
158995
|
createType("UnionEnum", (schema, value) => (typeof value == "number" || typeof value == "string" || value === null) && schema.enum.includes(value)), createType("ArrayBuffer", (schema, value) => value instanceof ArrayBuffer);
|
|
158930
158996
|
var internalFiles = createType("Files", (options, value) => {
|
|
@@ -159247,7 +159313,7 @@ t2.BooleanString = ElysiaType.BooleanString, t2.ObjectString = ElysiaType.Object
|
|
|
159247
159313
|
}
|
|
159248
159314
|
})), t2.Nullable = ElysiaType.Nullable, t2.MaybeEmpty = ElysiaType.MaybeEmpty, t2.Cookie = ElysiaType.Cookie, t2.Date = ElysiaType.Date, t2.UnionEnum = ElysiaType.UnionEnum, t2.NoValidate = ElysiaType.NoValidate, t2.Form = ElysiaType.Form, t2.ArrayBuffer = ElysiaType.ArrayBuffer, t2.Uint8Array = ElysiaType.Uint8Array;
|
|
159249
159315
|
|
|
159250
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
159316
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/sucrose.mjs
|
|
159251
159317
|
var separateFunction = (code) => {
|
|
159252
159318
|
code.startsWith("async") && (code = code.slice(5)), code = code.trimStart();
|
|
159253
159319
|
let index = -1;
|
|
@@ -159511,7 +159577,7 @@ var sucrose = (lifeCycle, inference = {
|
|
|
159511
159577
|
return inference;
|
|
159512
159578
|
};
|
|
159513
159579
|
|
|
159514
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
159580
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/cookies.mjs
|
|
159515
159581
|
var import_cookie = __toESM(require_dist(), 1);
|
|
159516
159582
|
var import_fast_decode_uri_component = __toESM(require_fast_decode_uri_component(), 1);
|
|
159517
159583
|
var hashString = (str) => {
|
|
@@ -159712,7 +159778,7 @@ var serializeCookie = (cookies) => {
|
|
|
159712
159778
|
return set.length === 1 ? set[0] : set;
|
|
159713
159779
|
};
|
|
159714
159780
|
|
|
159715
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
159781
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/utils.mjs
|
|
159716
159782
|
var handleFile = (response, set, request) => {
|
|
159717
159783
|
if (!isBun && response instanceof Promise)
|
|
159718
159784
|
return response.then((res) => handleFile(res, set, request));
|
|
@@ -159969,7 +160035,7 @@ async function tee(source, branches = 2) {
|
|
|
159969
160035
|
return Array.from({ length: branches }, makeIterator);
|
|
159970
160036
|
}
|
|
159971
160037
|
|
|
159972
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160038
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/web-standard/handler.mjs
|
|
159973
160039
|
var handleElysiaFile = (file, set = {
|
|
159974
160040
|
headers: {}
|
|
159975
160041
|
}, request) => {
|
|
@@ -160286,7 +160352,7 @@ var handleStream = createStreamHandler({
|
|
|
160286
160352
|
mapCompactResponse
|
|
160287
160353
|
});
|
|
160288
160354
|
|
|
160289
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160355
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/web-standard/index.mjs
|
|
160290
160356
|
var WebStandardAdapter = {
|
|
160291
160357
|
name: "web-standard",
|
|
160292
160358
|
isWebStandard: true,
|
|
@@ -160423,7 +160489,7 @@ const error404=new Response(error404Message,{status:404})
|
|
|
160423
160489
|
}
|
|
160424
160490
|
};
|
|
160425
160491
|
|
|
160426
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160492
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/bun/handler.mjs
|
|
160427
160493
|
var mapResponse2 = (response, set, request) => {
|
|
160428
160494
|
if (isNotEmpty(set.headers) || set.status !== 200 || set.cookie)
|
|
160429
160495
|
switch (handleSet(set), response?.constructor?.name) {
|
|
@@ -160695,10 +160761,10 @@ var handleStream2 = createStreamHandler({
|
|
|
160695
160761
|
mapCompactResponse: mapCompactResponse2
|
|
160696
160762
|
});
|
|
160697
160763
|
|
|
160698
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160764
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/compose.mjs
|
|
160699
160765
|
var import_fast_decode_uri_component3 = __toESM(require_fast_decode_uri_component(), 1);
|
|
160700
160766
|
|
|
160701
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160767
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/parse-query.mjs
|
|
160702
160768
|
var import_fast_decode_uri_component2 = __toESM(require_fast_decode_uri_component(), 1);
|
|
160703
160769
|
var KEY_HAS_PLUS = 1;
|
|
160704
160770
|
var KEY_NEEDS_DECODE = 2;
|
|
@@ -160824,7 +160890,7 @@ function parseQuery(input) {
|
|
|
160824
160890
|
}
|
|
160825
160891
|
}
|
|
160826
160892
|
|
|
160827
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
160893
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/trace.mjs
|
|
160828
160894
|
var ELYSIA_TRACE = Symbol("ElysiaTrace");
|
|
160829
160895
|
var createProcess = () => {
|
|
160830
160896
|
const { promise, resolve } = Promise.withResolvers(), { promise: end, resolve: resolveEnd } = Promise.withResolvers(), { promise: error, resolve: resolveError } = Promise.withResolvers(), callbacks = [], callbacksEnd = [];
|
|
@@ -161265,7 +161331,7 @@ var createMirror = (schema, {
|
|
|
161265
161331
|
});
|
|
161266
161332
|
};
|
|
161267
161333
|
|
|
161268
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
161334
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/replace-schema.mjs
|
|
161269
161335
|
var replaceSchemaTypeFromManyOptions = (schema, options) => {
|
|
161270
161336
|
if (Array.isArray(options)) {
|
|
161271
161337
|
let result = schema;
|
|
@@ -161363,7 +161429,7 @@ var coerceFormData = () => (_coerceFormData || (_coerceFormData = [
|
|
|
161363
161429
|
}
|
|
161364
161430
|
]), _coerceFormData);
|
|
161365
161431
|
|
|
161366
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
161432
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/schema.mjs
|
|
161367
161433
|
var isOptional = (schema) => schema ? schema?.[Kind] === "Import" && schema.References ? schema.References().some(isOptional) : (schema.schema && (schema = schema.schema), !!schema && (OptionalKind in schema)) : false;
|
|
161368
161434
|
var hasAdditionalProperties = (_schema) => {
|
|
161369
161435
|
if (!_schema)
|
|
@@ -162159,7 +162225,7 @@ var getCookieValidator = ({
|
|
|
162159
162225
|
};
|
|
162160
162226
|
var unwrapImportSchema = (schema) => schema && schema[Kind] === "Import" && schema.$defs[schema.$ref][Kind] === "Object" ? schema.$defs[schema.$ref] : schema;
|
|
162161
162227
|
|
|
162162
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
162228
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/compose.mjs
|
|
162163
162229
|
var allocateIf = (value, condition) => condition ? value : "";
|
|
162164
162230
|
var defaultParsers = [
|
|
162165
162231
|
"json",
|
|
@@ -163308,7 +163374,7 @@ return mapResponse(${saveResponse}error,set${adapter.mapResponseContext})}`;
|
|
|
163308
163374
|
});
|
|
163309
163375
|
};
|
|
163310
163376
|
|
|
163311
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163377
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/bun/compose.mjs
|
|
163312
163378
|
var allocateIf2 = (value, condition) => condition ? value : "";
|
|
163313
163379
|
var createContext = (app, route, inference, isInline = false) => {
|
|
163314
163380
|
let fnLiteral = "";
|
|
@@ -163359,7 +163425,7 @@ var createBunRouteHandler = (app, route) => {
|
|
|
163359
163425
|
});
|
|
163360
163426
|
};
|
|
163361
163427
|
|
|
163362
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163428
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/bun/handler-native.mjs
|
|
163363
163429
|
var isEmptyPipelineHook = (hooks) => {
|
|
163364
163430
|
for (const key in hooks) {
|
|
163365
163431
|
switch (key) {
|
|
@@ -163391,7 +163457,7 @@ var createNativeStaticHandler = (handle, hooks, set) => {
|
|
|
163391
163457
|
}) : () => response.clone();
|
|
163392
163458
|
};
|
|
163393
163459
|
|
|
163394
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163460
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/ws/index.mjs
|
|
163395
163461
|
function isInvalidResponse(validator, data) {
|
|
163396
163462
|
return validator ? validator.provider === "standard" ? validator.schema["~standard"].validate(data).issues : validator.Check(data) === false : false;
|
|
163397
163463
|
}
|
|
@@ -163497,7 +163563,7 @@ var createHandleWSResponse = (responseValidator) => {
|
|
|
163497
163563
|
return handleWSResponse;
|
|
163498
163564
|
};
|
|
163499
163565
|
|
|
163500
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163566
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/adapter/bun/index.mjs
|
|
163501
163567
|
var optionalParam = /:.+?\?(?=\/|$)/;
|
|
163502
163568
|
var getPossibleParams = (path) => {
|
|
163503
163569
|
const match = optionalParam.exec(path);
|
|
@@ -163783,10 +163849,10 @@ for(const [k,v] of c.request.headers.entries())c.headers[k]=v
|
|
|
163783
163849
|
}
|
|
163784
163850
|
};
|
|
163785
163851
|
|
|
163786
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163852
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/universal/env.mjs
|
|
163787
163853
|
var env2 = isBun ? Bun.env : typeof process < "u" && process?.env ? process.env : {};
|
|
163788
163854
|
|
|
163789
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
163855
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/dynamic-handle.mjs
|
|
163790
163856
|
var ARRAY_INDEX_REGEX = /^(.+)\[(\d+)\]$/;
|
|
163791
163857
|
var DANGEROUS_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
163792
163858
|
var isDangerousKey = (key) => {
|
|
@@ -164255,7 +164321,7 @@ var createDynamicErrorHandler = (app) => {
|
|
|
164255
164321
|
};
|
|
164256
164322
|
};
|
|
164257
164323
|
|
|
164258
|
-
// ../../node_modules/.bun/elysia@1.4.30+
|
|
164324
|
+
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/index.mjs
|
|
164259
164325
|
var _a;
|
|
164260
164326
|
_a = Symbol.dispose;
|
|
164261
164327
|
var _Elysia = class _Elysia2 {
|
|
@@ -165473,7 +165539,7 @@ var _Elysia = class _Elysia2 {
|
|
|
165473
165539
|
};
|
|
165474
165540
|
var Elysia = _Elysia;
|
|
165475
165541
|
|
|
165476
|
-
// ../../node_modules/.bun/@elysiajs+cors@1.4.2+
|
|
165542
|
+
// ../../node_modules/.bun/@elysiajs+cors@1.4.2+e2843f634e0b024d/node_modules/@elysiajs/cors/dist/index.mjs
|
|
165477
165543
|
var isBun2 = typeof new Headers()?.toJSON === "function";
|
|
165478
165544
|
var processHeaders = (headers) => {
|
|
165479
165545
|
if (isBun2)
|
|
@@ -171219,7 +171285,7 @@ var m2 = {
|
|
|
171219
171285
|
};
|
|
171220
171286
|
var K3 = Object.keys(m2);
|
|
171221
171287
|
|
|
171222
|
-
// ../../node_modules/.bun/@elysiajs+swagger@1.3.1+
|
|
171288
|
+
// ../../node_modules/.bun/@elysiajs+swagger@1.3.1+1afeada4e2d535ce/node_modules/@elysiajs/swagger/dist/index.mjs
|
|
171223
171289
|
function isSchemaObject(schema) {
|
|
171224
171290
|
return "type" in schema || "properties" in schema || "items" in schema;
|
|
171225
171291
|
}
|
|
@@ -173721,7 +173787,7 @@ function osUsername() {
|
|
|
173721
173787
|
}
|
|
173722
173788
|
}
|
|
173723
173789
|
|
|
173724
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
173790
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/postgres-js/driver.js
|
|
173725
173791
|
init_entity();
|
|
173726
173792
|
init_logger();
|
|
173727
173793
|
init_db();
|
|
@@ -173729,7 +173795,7 @@ init_dialect();
|
|
|
173729
173795
|
init_relations();
|
|
173730
173796
|
init_utils();
|
|
173731
173797
|
|
|
173732
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
173798
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/postgres-js/session.js
|
|
173733
173799
|
init_entity();
|
|
173734
173800
|
init_logger();
|
|
173735
173801
|
init_pg_core();
|
|
@@ -173853,7 +173919,7 @@ class PostgresJsTransaction extends PgTransaction {
|
|
|
173853
173919
|
}
|
|
173854
173920
|
}
|
|
173855
173921
|
|
|
173856
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.2+
|
|
173922
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.2+051c50c511c239f8/node_modules/drizzle-orm/postgres-js/driver.js
|
|
173857
173923
|
class PostgresJsDatabase extends PgDatabase {
|
|
173858
173924
|
static [entityKind] = "PostgresJsDatabase";
|
|
173859
173925
|
}
|
|
@@ -174249,7 +174315,7 @@ init_schema2();
|
|
|
174249
174315
|
|
|
174250
174316
|
// ../../backend/src/lib/auth.ts
|
|
174251
174317
|
init_schema2();
|
|
174252
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
174318
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/wildcard.mjs
|
|
174253
174319
|
function escapeRegExpChar(char3) {
|
|
174254
174320
|
if (char3 === "-" || char3 === "^" || char3 === "$" || char3 === "+" || char3 === "." || char3 === "(" || char3 === ")" || char3 === "|" || char3 === "[" || char3 === "]" || char3 === "{" || char3 === "}" || char3 === "*" || char3 === "?" || char3 === "\\")
|
|
174255
174321
|
return `\\${char3}`;
|
|
@@ -174347,7 +174413,7 @@ function wildcardMatch(pattern, options) {
|
|
|
174347
174413
|
return fn;
|
|
174348
174414
|
}
|
|
174349
174415
|
|
|
174350
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
174416
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/url.mjs
|
|
174351
174417
|
init_env();
|
|
174352
174418
|
init_error2();
|
|
174353
174419
|
var SLASH_CHAR_CODE = 47;
|
|
@@ -174542,7 +174608,7 @@ function resolveBaseURL(config, basePath, source, loadEnv, trustedProxyHeaders)
|
|
|
174542
174608
|
return getBaseURL(undefined, basePath, request, loadEnv, trustedProxyHeaders);
|
|
174543
174609
|
}
|
|
174544
174610
|
|
|
174545
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
174611
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/crypto/random.mjs
|
|
174546
174612
|
init_random();
|
|
174547
174613
|
var generateRandomString = createRandomStringGenerator("a-z", "0-9", "A-Z", "-_");
|
|
174548
174614
|
|
|
@@ -177951,7 +178017,7 @@ function decodeJwt(jwt) {
|
|
|
177951
178017
|
throw new JWTInvalid("Invalid JWT Claims Set");
|
|
177952
178018
|
return result;
|
|
177953
178019
|
}
|
|
177954
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
178020
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/crypto/jwt.mjs
|
|
177955
178021
|
async function signJWT(payload, secret, expiresIn = 3600) {
|
|
177956
178022
|
return await new SignJWT(payload).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime(Math.floor(Date.now() / 1000) + expiresIn).sign(new TextEncoder().encode(secret));
|
|
177957
178023
|
}
|
|
@@ -178136,7 +178202,7 @@ async function verifyPassword(hash2, password) {
|
|
|
178136
178202
|
return targetKey.toString("hex") === key;
|
|
178137
178203
|
}
|
|
178138
178204
|
|
|
178139
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
178205
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/crypto/password.mjs
|
|
178140
178206
|
var hashPassword$1 = hashPassword;
|
|
178141
178207
|
var verifyPassword$1 = async ({ hash: hash2, password }) => {
|
|
178142
178208
|
return verifyPassword(hash2, password);
|
|
@@ -179126,7 +179192,7 @@ var _poly1305_aead = (xorStream) => (key, nonce, AAD2) => {
|
|
|
179126
179192
|
};
|
|
179127
179193
|
var xchacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 24, tagLength: 16 }, /* @__PURE__ */ _poly1305_aead(xchacha20));
|
|
179128
179194
|
|
|
179129
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179195
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/crypto/index.mjs
|
|
179130
179196
|
var ENVELOPE_PREFIX = "$ba$";
|
|
179131
179197
|
function parseEnvelope(data) {
|
|
179132
179198
|
if (!data.startsWith(ENVELOPE_PREFIX))
|
|
@@ -179181,7 +179247,7 @@ var symmetricDecrypt = async ({ key, data }) => {
|
|
|
179181
179247
|
throw new Error("Cannot decrypt legacy bare-hex payload: no legacy secret available. Set BETTER_AUTH_SECRET for backwards compatibility.");
|
|
179182
179248
|
};
|
|
179183
179249
|
|
|
179184
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179250
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/store-capabilities.mjs
|
|
179185
179251
|
function hasServerSessionStore(options) {
|
|
179186
179252
|
return !!options.database || !!options.secondaryStorage;
|
|
179187
179253
|
}
|
|
@@ -179247,7 +179313,7 @@ var userSchema = coreSchema.extend({
|
|
|
179247
179313
|
image: string2().nullish()
|
|
179248
179314
|
});
|
|
179249
179315
|
|
|
179250
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179316
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/schema.mjs
|
|
179251
179317
|
init_error2();
|
|
179252
179318
|
|
|
179253
179319
|
// ../../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/utils/db.mjs
|
|
@@ -179261,7 +179327,7 @@ function filterOutputFields(data, additionalFields) {
|
|
|
179261
179327
|
}), {});
|
|
179262
179328
|
}
|
|
179263
179329
|
|
|
179264
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179330
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/schema.mjs
|
|
179265
179331
|
var cache4 = /* @__PURE__ */ new WeakMap;
|
|
179266
179332
|
function getFields(options, modelName, mode) {
|
|
179267
179333
|
const cacheKey = `${modelName}:${mode}`;
|
|
@@ -179402,17 +179468,17 @@ function getSessionDefaultFields(options) {
|
|
|
179402
179468
|
return defaults;
|
|
179403
179469
|
}
|
|
179404
179470
|
|
|
179405
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179471
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/date.mjs
|
|
179406
179472
|
var getDate = (span, unit = "ms") => {
|
|
179407
179473
|
return new Date(Date.now() + (unit === "sec" ? span * 1000 : span));
|
|
179408
179474
|
};
|
|
179409
179475
|
|
|
179410
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179476
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/is-promise.mjs
|
|
179411
179477
|
function isPromise(obj2) {
|
|
179412
179478
|
return !!obj2 && (typeof obj2 === "object" || typeof obj2 === "function") && typeof obj2.then === "function";
|
|
179413
179479
|
}
|
|
179414
179480
|
|
|
179415
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179481
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/time.mjs
|
|
179416
179482
|
var SEC = 1000;
|
|
179417
179483
|
var MIN = SEC * 60;
|
|
179418
179484
|
var HOUR = MIN * 60;
|
|
@@ -179483,7 +179549,7 @@ function sec(value) {
|
|
|
179483
179549
|
return Math.round(parse9(value) / 1000);
|
|
179484
179550
|
}
|
|
179485
179551
|
|
|
179486
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179552
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/cache.mjs
|
|
179487
179553
|
init_env();
|
|
179488
179554
|
init_json2();
|
|
179489
179555
|
init_zod();
|
|
@@ -179516,7 +179582,7 @@ function parseCompactCookieCache(value) {
|
|
|
179516
179582
|
return result.success ? result.data : null;
|
|
179517
179583
|
}
|
|
179518
179584
|
|
|
179519
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179585
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/cookie-utils.mjs
|
|
179520
179586
|
function tryDecode(str) {
|
|
179521
179587
|
if (str.indexOf("%") === -1)
|
|
179522
179588
|
return str;
|
|
@@ -179598,7 +179664,7 @@ function parseCookies(cookie) {
|
|
|
179598
179664
|
return cookieMap;
|
|
179599
179665
|
}
|
|
179600
179666
|
|
|
179601
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
179667
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/session-store.mjs
|
|
179602
179668
|
init_json2();
|
|
179603
179669
|
|
|
179604
179670
|
// ../../node_modules/.bun/better-call@1.4.0+68a1e3a0c4588df3/node_modules/better-call/dist/index.mjs
|
|
@@ -181093,7 +181159,7 @@ var createRouter$1 = (endpoints, config3) => {
|
|
|
181093
181159
|
};
|
|
181094
181160
|
};
|
|
181095
181161
|
|
|
181096
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
181162
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/session-store.mjs
|
|
181097
181163
|
init_zod();
|
|
181098
181164
|
var MAX_COOKIE_SIZE = 4050;
|
|
181099
181165
|
var MAX_COOKIE_CHUNKS = 100;
|
|
@@ -181235,7 +181301,7 @@ var getSessionQuerySchema = optional(object({
|
|
|
181235
181301
|
disableRefresh: exports_coerce.boolean().meta({ description: "Disable session refresh. Useful for checking session status, without updating the session" }).optional()
|
|
181236
181302
|
}));
|
|
181237
181303
|
|
|
181238
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
181304
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/index.mjs
|
|
181239
181305
|
init_env();
|
|
181240
181306
|
init_error2();
|
|
181241
181307
|
init_json2();
|
|
@@ -181329,7 +181395,7 @@ var createHMAC = (algorithm2 = "SHA-256", encoding = "none") => {
|
|
|
181329
181395
|
return hmac3;
|
|
181330
181396
|
};
|
|
181331
181397
|
|
|
181332
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
181398
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/cookies/index.mjs
|
|
181333
181399
|
function createCookieGetter(options) {
|
|
181334
181400
|
const baseURLString = typeof options.baseURL === "string" ? options.baseURL : undefined;
|
|
181335
181401
|
const dynamicProtocol = typeof options.baseURL === "object" && options.baseURL !== null ? options.baseURL.protocol : undefined;
|
|
@@ -181560,7 +181626,7 @@ function deleteSessionCookie(ctx, skipDontRememberMe) {
|
|
|
181560
181626
|
expireCookie(ctx, ctx.context.authCookies.dontRememberToken);
|
|
181561
181627
|
}
|
|
181562
181628
|
|
|
181563
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
181629
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/state.mjs
|
|
181564
181630
|
init_error2();
|
|
181565
181631
|
init_zod();
|
|
181566
181632
|
var stateDataSchema = looseObject({
|
|
@@ -181726,7 +181792,7 @@ function appendQueryParams(input, params) {
|
|
|
181726
181792
|
return relative ? parsedURL.href.slice(parsedURL.origin.length) : parsedURL.href;
|
|
181727
181793
|
}
|
|
181728
181794
|
|
|
181729
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
181795
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/oauth2/errors.mjs
|
|
181730
181796
|
var OAUTH_CALLBACK_ERROR_CODES = {
|
|
181731
181797
|
NO_CODE: "no_code",
|
|
181732
181798
|
PROVIDER_NOT_FOUND: "oauth_provider_not_found",
|
|
@@ -181958,11 +182024,11 @@ var queueAfterTransactionHook = async (hook, options) => {
|
|
|
181958
182024
|
store.pendingHooks.push(executeHook);
|
|
181959
182025
|
};
|
|
181960
182026
|
|
|
181961
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182027
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/state/oauth.mjs
|
|
181962
182028
|
var { get: getRawOAuthState, set: setOAuthState } = defineRequestState(() => null);
|
|
181963
182029
|
var { get: getOAuthServerContext, set: setOAuthServerContext } = defineRequestState(() => null);
|
|
181964
182030
|
|
|
181965
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182031
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/oauth2/state.mjs
|
|
181966
182032
|
init_error2();
|
|
181967
182033
|
function generateIdTokenNonce(provider) {
|
|
181968
182034
|
return provider.requiresIdTokenNonce ? generateRandomString(32) : undefined;
|
|
@@ -182020,7 +182086,7 @@ async function parseState(c3) {
|
|
|
182020
182086
|
return parsedData;
|
|
182021
182087
|
}
|
|
182022
182088
|
|
|
182023
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182089
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/hide-metadata.mjs
|
|
182024
182090
|
var HIDE_METADATA = { scope: "server" };
|
|
182025
182091
|
|
|
182026
182092
|
// ../../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/utils/is-api-error.mjs
|
|
@@ -182084,7 +182150,7 @@ function withServerOnly(options) {
|
|
|
182084
182150
|
}
|
|
182085
182151
|
createAuthEndpoint.serverOnly = (options, handler) => createAuthEndpoint(withServerOnly(options), handler);
|
|
182086
182152
|
|
|
182087
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182153
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/auth/trusted-origins.mjs
|
|
182088
182154
|
var normalizePath2 = (path) => {
|
|
182089
182155
|
let decoded = path;
|
|
182090
182156
|
try {
|
|
@@ -182164,7 +182230,7 @@ var matchesOriginPattern = (url2, pattern, settings) => {
|
|
|
182164
182230
|
return parsed.path === parsedPattern.path || parsed.path.startsWith(`${parsedPattern.path}/`);
|
|
182165
182231
|
};
|
|
182166
182232
|
|
|
182167
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182233
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
|
|
182168
182234
|
init_error2();
|
|
182169
182235
|
|
|
182170
182236
|
// ../../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/utils/deprecate.mjs
|
|
@@ -182179,7 +182245,7 @@ function deprecate(fn, message2, logger3) {
|
|
|
182179
182245
|
};
|
|
182180
182246
|
}
|
|
182181
182247
|
|
|
182182
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182248
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
|
|
182183
182249
|
function shouldSkipCSRFForBackwardCompat(ctx) {
|
|
182184
182250
|
return ctx.context.skipOriginCheck === true && ctx.context.options.advanced?.disableCSRFCheck === undefined;
|
|
182185
182251
|
}
|
|
@@ -182330,7 +182396,7 @@ async function validateFormCsrf(ctx) {
|
|
|
182330
182396
|
return await validateOrigin(ctx, true);
|
|
182331
182397
|
}
|
|
182332
182398
|
|
|
182333
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182399
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/rate-limiter/index.mjs
|
|
182334
182400
|
init_error2();
|
|
182335
182401
|
|
|
182336
182402
|
// ../../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/utils/ip.mjs
|
|
@@ -182513,7 +182579,7 @@ function createRateLimitKey(ip, path) {
|
|
|
182513
182579
|
return `${ip}|${path}`;
|
|
182514
182580
|
}
|
|
182515
182581
|
|
|
182516
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182582
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/rate-limiter/index.mjs
|
|
182517
182583
|
var memory = /* @__PURE__ */ new Map;
|
|
182518
182584
|
var MEMORY_STORE_MAX_ENTRIES = 1e5;
|
|
182519
182585
|
function pruneMemoryStore() {
|
|
@@ -182845,10 +182911,10 @@ function getDefaultSpecialRules() {
|
|
|
182845
182911
|
}];
|
|
182846
182912
|
}
|
|
182847
182913
|
|
|
182848
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182914
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/state/should-session-refresh.mjs
|
|
182849
182915
|
var { get: getShouldSkipSessionRefresh, set: setShouldSkipSessionRefresh } = defineRequestState(() => false);
|
|
182850
182916
|
|
|
182851
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
182917
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/session.mjs
|
|
182852
182918
|
init_error2();
|
|
182853
182919
|
init_zod();
|
|
182854
182920
|
var getSession = () => createAuthEndpoint("/get-session", {
|
|
@@ -183271,7 +183337,7 @@ var revokeOtherSessions = createAuthEndpoint("/revoke-other-sessions", {
|
|
|
183271
183337
|
return ctx.json({ status: true });
|
|
183272
183338
|
});
|
|
183273
183339
|
|
|
183274
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
183340
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/validate-user-info.mjs
|
|
183275
183341
|
init_error2();
|
|
183276
183342
|
function assertValidUserInfoSource(source) {
|
|
183277
183343
|
if (!source?.method)
|
|
@@ -183312,7 +183378,7 @@ async function assertValidUserInfo(ctx, data) {
|
|
|
183312
183378
|
});
|
|
183313
183379
|
}
|
|
183314
183380
|
|
|
183315
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
183381
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/verification-token-storage.mjs
|
|
183316
183382
|
var defaultKeyHasher = async (identifier) => {
|
|
183317
183383
|
const hash3 = await createHash4("SHA-256").digest(new TextEncoder().encode(identifier));
|
|
183318
183384
|
return base64Url.encode(new Uint8Array(hash3), { padding: false });
|
|
@@ -183340,7 +183406,7 @@ function getStorageOption(identifier, config3) {
|
|
|
183340
183406
|
return config3;
|
|
183341
183407
|
}
|
|
183342
183408
|
|
|
183343
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
183409
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/with-hooks.mjs
|
|
183344
183410
|
init_instrumentation();
|
|
183345
183411
|
function getWithHooks(adapter, ctx) {
|
|
183346
183412
|
const hooksEntries = ctx.hooks;
|
|
@@ -183600,7 +183666,7 @@ function getWithHooks(adapter, ctx) {
|
|
|
183600
183666
|
};
|
|
183601
183667
|
}
|
|
183602
183668
|
|
|
183603
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
183669
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/internal-adapter.mjs
|
|
183604
183670
|
init_error2();
|
|
183605
183671
|
init_id2();
|
|
183606
183672
|
init_json2();
|
|
@@ -184541,7 +184607,7 @@ var createInternalAdapter = (adapter, ctx) => {
|
|
|
184541
184607
|
};
|
|
184542
184608
|
};
|
|
184543
184609
|
|
|
184544
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
184610
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/helpers.mjs
|
|
184545
184611
|
init_env();
|
|
184546
184612
|
init_error2();
|
|
184547
184613
|
|
|
@@ -184803,7 +184869,7 @@ function isLoopbackHost(host) {
|
|
|
184803
184869
|
return kind === "loopback" || kind === "localhost";
|
|
184804
184870
|
}
|
|
184805
184871
|
|
|
184806
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
184872
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/helpers.mjs
|
|
184807
184873
|
async function runPluginInit(context) {
|
|
184808
184874
|
let options = context.options;
|
|
184809
184875
|
const plugins = options.plugins || [];
|
|
@@ -184963,7 +185029,7 @@ async function getTrustedProviders(options, request) {
|
|
|
184963
185029
|
return (await trustedProviders(request) ?? []).filter((v2) => Boolean(v2));
|
|
184964
185030
|
}
|
|
184965
185031
|
|
|
184966
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185032
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/oauth2/account-key.mjs
|
|
184967
185033
|
init_error2();
|
|
184968
185034
|
function toOAuthProfileRecord(profile) {
|
|
184969
185035
|
return profile;
|
|
@@ -184995,7 +185061,7 @@ async function resolveOAuthAccountKeyForAPI(provider, tokens, profile) {
|
|
|
184995
185061
|
}
|
|
184996
185062
|
}
|
|
184997
185063
|
|
|
184998
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185064
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/oauth2/utils.mjs
|
|
184999
185065
|
function isLikelyEncrypted(token) {
|
|
185000
185066
|
if (token.startsWith("$ba$"))
|
|
185001
185067
|
return true;
|
|
@@ -185028,7 +185094,7 @@ function getOAuthCallbackPath(provider) {
|
|
|
185028
185094
|
return provider.callbackPath.startsWith("/") ? provider.callbackPath : `/${provider.callbackPath}`;
|
|
185029
185095
|
}
|
|
185030
185096
|
|
|
185031
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185097
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/request.mjs
|
|
185032
185098
|
function safeCloneRequest(request) {
|
|
185033
185099
|
if (!request)
|
|
185034
185100
|
return;
|
|
@@ -185051,7 +185117,7 @@ function safeCloneRequest(request) {
|
|
|
185051
185117
|
}
|
|
185052
185118
|
}
|
|
185053
185119
|
|
|
185054
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185120
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/email-verification.mjs
|
|
185055
185121
|
init_error2();
|
|
185056
185122
|
init_zod();
|
|
185057
185123
|
async function createEmailVerificationToken(secret, email3, updateTo, expiresIn = 3600, extraPayload) {
|
|
@@ -185366,7 +185432,7 @@ var verifyEmail = createAuthEndpoint("/verify-email", {
|
|
|
185366
185432
|
});
|
|
185367
185433
|
});
|
|
185368
185434
|
|
|
185369
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185435
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/oauth2/link-account.mjs
|
|
185370
185436
|
init_env();
|
|
185371
185437
|
init_error2();
|
|
185372
185438
|
async function handleOAuthUserInfo(c3, opts) {
|
|
@@ -185714,7 +185780,7 @@ async function applyUpdateUserInfoOnLink(c3, userId, userInfo) {
|
|
|
185714
185780
|
}
|
|
185715
185781
|
}
|
|
185716
185782
|
|
|
185717
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
185783
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/account.mjs
|
|
185718
185784
|
init_error2();
|
|
185719
185785
|
|
|
185720
185786
|
// ../../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/oauth2/utils.mjs
|
|
@@ -189788,7 +189854,7 @@ var socialProviders = {
|
|
|
189788
189854
|
var socialProviderList = Object.keys(socialProviders);
|
|
189789
189855
|
var SocialProviderListEnum = _enum2(socialProviderList).or(string2());
|
|
189790
189856
|
|
|
189791
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
189857
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/account.mjs
|
|
189792
189858
|
init_zod();
|
|
189793
189859
|
function parseStoredScopes(scope) {
|
|
189794
189860
|
if (!scope)
|
|
@@ -190351,7 +190417,7 @@ var accountInfo = createAuthEndpoint("/account-info", {
|
|
|
190351
190417
|
});
|
|
190352
190418
|
});
|
|
190353
190419
|
|
|
190354
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
190420
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/callback.mjs
|
|
190355
190421
|
init_json2();
|
|
190356
190422
|
init_zod();
|
|
190357
190423
|
var schema3 = object({
|
|
@@ -190609,7 +190675,7 @@ var callbackOAuth = createAuthEndpoint("/callback/:id", {
|
|
|
190609
190675
|
throw c3.redirect(toRedirectTo);
|
|
190610
190676
|
});
|
|
190611
190677
|
|
|
190612
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
190678
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/error.mjs
|
|
190613
190679
|
init_env();
|
|
190614
190680
|
function sanitize2(input) {
|
|
190615
190681
|
return input.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/&(?!amp;|lt;|gt;|quot;|#39;|#x[0-9a-fA-F]+;|#[0-9]+;)/g, "&");
|
|
@@ -190994,7 +191060,7 @@ var error51 = createAuthEndpoint("/error", {
|
|
|
190994
191060
|
return new Response(html(c3.context.options, safeCode, safeDescription), { headers: { "Content-Type": "text/html" } });
|
|
190995
191061
|
});
|
|
190996
191062
|
|
|
190997
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191063
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/ok.mjs
|
|
190998
191064
|
var ok = createAuthEndpoint("/ok", {
|
|
190999
191065
|
method: "GET",
|
|
191000
191066
|
metadata: {
|
|
@@ -191018,7 +191084,7 @@ var ok = createAuthEndpoint("/ok", {
|
|
|
191018
191084
|
return ctx.json({ ok: true });
|
|
191019
191085
|
});
|
|
191020
191086
|
|
|
191021
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191087
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/password.mjs
|
|
191022
191088
|
init_error2();
|
|
191023
191089
|
async function validatePassword(ctx, data) {
|
|
191024
191090
|
const credentialAccount = await ctx.context.internalAdapter.findCredentialAccount(data.userId);
|
|
@@ -191047,7 +191113,7 @@ async function checkPassword(userId, c3) {
|
|
|
191047
191113
|
return true;
|
|
191048
191114
|
}
|
|
191049
191115
|
|
|
191050
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191116
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/password.mjs
|
|
191051
191117
|
init_error2();
|
|
191052
191118
|
init_id2();
|
|
191053
191119
|
init_zod();
|
|
@@ -191247,7 +191313,7 @@ var verifyPassword2 = createAuthEndpoint("/verify-password", {
|
|
|
191247
191313
|
return ctx.json({ status: true });
|
|
191248
191314
|
});
|
|
191249
191315
|
|
|
191250
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191316
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/sign-in.mjs
|
|
191251
191317
|
init_error2();
|
|
191252
191318
|
init_zod();
|
|
191253
191319
|
var socialSignInBodySchema = object({
|
|
@@ -191521,7 +191587,7 @@ var signInEmail = () => createAuthEndpoint("/sign-in/email", {
|
|
|
191521
191587
|
});
|
|
191522
191588
|
});
|
|
191523
191589
|
|
|
191524
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191590
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/sign-out.mjs
|
|
191525
191591
|
init_zod();
|
|
191526
191592
|
var signOutBodySchema = object({
|
|
191527
191593
|
callbackURL: string2().meta({ description: "The URL to redirect to after provider logout" }).optional(),
|
|
@@ -191621,7 +191687,7 @@ var signOut = createAuthEndpoint("/sign-out", {
|
|
|
191621
191687
|
return ctx.json(signOutResponse());
|
|
191622
191688
|
});
|
|
191623
191689
|
|
|
191624
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191690
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/sign-up.mjs
|
|
191625
191691
|
init_env();
|
|
191626
191692
|
init_error2();
|
|
191627
191693
|
init_id2();
|
|
@@ -191890,7 +191956,7 @@ var signUpEmail = () => createAuthEndpoint("/sign-up/email", {
|
|
|
191890
191956
|
});
|
|
191891
191957
|
});
|
|
191892
191958
|
|
|
191893
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
191959
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/update-session.mjs
|
|
191894
191960
|
init_error2();
|
|
191895
191961
|
init_zod();
|
|
191896
191962
|
var updateSessionBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
|
|
@@ -191944,7 +192010,7 @@ var updateSession = () => createAuthEndpoint("/update-session", {
|
|
|
191944
192010
|
return ctx.json({ session: parseSessionOutput(ctx.context.options, newSession) });
|
|
191945
192011
|
});
|
|
191946
192012
|
|
|
191947
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
192013
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/routes/update-user.mjs
|
|
191948
192014
|
init_error2();
|
|
191949
192015
|
init_zod();
|
|
191950
192016
|
var updateUserBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
|
|
@@ -192437,7 +192503,7 @@ var changeEmail = createAuthEndpoint("/change-email", {
|
|
|
192437
192503
|
return ctx.json({ status: true });
|
|
192438
192504
|
});
|
|
192439
192505
|
|
|
192440
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
192506
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/dispatch.mjs
|
|
192441
192507
|
init_env();
|
|
192442
192508
|
init_error2();
|
|
192443
192509
|
init_instrumentation();
|
|
@@ -192691,7 +192757,7 @@ async function dispatchAuthEndpoint(endpoint, input) {
|
|
|
192691
192757
|
}));
|
|
192692
192758
|
}
|
|
192693
192759
|
|
|
192694
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
192760
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/to-auth-endpoints.mjs
|
|
192695
192761
|
init_error2();
|
|
192696
192762
|
async function resolveDynamicContext(rawCtx, input) {
|
|
192697
192763
|
if (rawCtx.baseURL)
|
|
@@ -192734,7 +192800,7 @@ function toAuthEndpoints(endpoints, ctx) {
|
|
|
192734
192800
|
return api2;
|
|
192735
192801
|
}
|
|
192736
192802
|
|
|
192737
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
192803
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/api/index.mjs
|
|
192738
192804
|
init_env();
|
|
192739
192805
|
init_error2();
|
|
192740
192806
|
init_instrumentation();
|
|
@@ -192950,7 +193016,7 @@ var router = (ctx, options) => {
|
|
|
192950
193016
|
});
|
|
192951
193017
|
};
|
|
192952
193018
|
|
|
192953
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193019
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/adapter-base.mjs
|
|
192954
193020
|
init_env();
|
|
192955
193021
|
async function getBaseAdapter(options, handleDirectDatabase) {
|
|
192956
193022
|
let adapter;
|
|
@@ -192975,7 +193041,7 @@ async function getBaseAdapter(options, handleDirectDatabase) {
|
|
|
192975
193041
|
return adapter;
|
|
192976
193042
|
}
|
|
192977
193043
|
|
|
192978
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193044
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/adapter-kysely.mjs
|
|
192979
193045
|
init_error2();
|
|
192980
193046
|
async function getAdapter(options) {
|
|
192981
193047
|
return getBaseAdapter(options, async (opts) => {
|
|
@@ -192996,7 +193062,7 @@ async function getAdapter(options) {
|
|
|
192996
193062
|
init_database_index();
|
|
192997
193063
|
init_get_tables();
|
|
192998
193064
|
|
|
192999
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193065
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/get-schema.mjs
|
|
193000
193066
|
function getSchema(config3) {
|
|
193001
193067
|
const { indexesByTable, tables } = getAuthTablesWithResolvedIndexes(config3);
|
|
193002
193068
|
const schema4 = {};
|
|
@@ -193037,7 +193103,7 @@ function getSchema(config3) {
|
|
|
193037
193103
|
return schema4;
|
|
193038
193104
|
}
|
|
193039
193105
|
|
|
193040
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193106
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/db/get-migration.mjs
|
|
193041
193107
|
init_env();
|
|
193042
193108
|
init_error2();
|
|
193043
193109
|
init_dist3();
|
|
@@ -193760,10 +193826,10 @@ async function getMigrations(config3, { throwOnUnsafe = true } = {}) {
|
|
|
193760
193826
|
};
|
|
193761
193827
|
}
|
|
193762
193828
|
|
|
193763
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193829
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/utils/constants.mjs
|
|
193764
193830
|
var DEFAULT_SECRET = "better-auth-secret-12345678901234567890";
|
|
193765
193831
|
|
|
193766
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193832
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/secret-utils.mjs
|
|
193767
193833
|
init_error2();
|
|
193768
193834
|
function estimateEntropy(str) {
|
|
193769
193835
|
const unique = new Set(str).size;
|
|
@@ -193822,7 +193888,7 @@ function buildSecretConfig(secrets, legacySecret) {
|
|
|
193822
193888
|
};
|
|
193823
193889
|
}
|
|
193824
193890
|
|
|
193825
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
193891
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/create-context.mjs
|
|
193826
193892
|
init_env();
|
|
193827
193893
|
init_error2();
|
|
193828
193894
|
init_id2();
|
|
@@ -194328,7 +194394,7 @@ async function createTelemetry(options, context) {
|
|
|
194328
194394
|
} };
|
|
194329
194395
|
}
|
|
194330
194396
|
|
|
194331
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
194397
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/create-context.mjs
|
|
194332
194398
|
function estimateEntropy2(str) {
|
|
194333
194399
|
const unique = new Set(str).size;
|
|
194334
194400
|
if (unique === 0)
|
|
@@ -194553,7 +194619,7 @@ Most of the features of Better Auth will not work correctly.`);
|
|
|
194553
194619
|
return ctx;
|
|
194554
194620
|
}
|
|
194555
194621
|
|
|
194556
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
194622
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/context/init.mjs
|
|
194557
194623
|
init_error2();
|
|
194558
194624
|
init_dist3();
|
|
194559
194625
|
var init = async (options) => {
|
|
@@ -194569,7 +194635,7 @@ var init = async (options) => {
|
|
|
194569
194635
|
return ctx;
|
|
194570
194636
|
};
|
|
194571
194637
|
|
|
194572
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
194638
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/auth/base.mjs
|
|
194573
194639
|
init_error2();
|
|
194574
194640
|
var createBetterAuth = (options, initFn) => {
|
|
194575
194641
|
const authContext = initFn(options);
|
|
@@ -194621,19 +194687,19 @@ var createBetterAuth = (options, initFn) => {
|
|
|
194621
194687
|
};
|
|
194622
194688
|
};
|
|
194623
194689
|
|
|
194624
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
194690
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/auth/full.mjs
|
|
194625
194691
|
var betterAuth = (options) => {
|
|
194626
194692
|
return createBetterAuth(options, init);
|
|
194627
194693
|
};
|
|
194628
194694
|
|
|
194629
|
-
// ../../node_modules/.bun/better-auth@1.7.2+
|
|
194695
|
+
// ../../node_modules/.bun/better-auth@1.7.2+93880f1bde597d38/node_modules/better-auth/dist/index.mjs
|
|
194630
194696
|
init_env();
|
|
194631
194697
|
init_error2();
|
|
194632
194698
|
init_error_codes();
|
|
194633
194699
|
init_id2();
|
|
194634
194700
|
init_json2();
|
|
194635
194701
|
|
|
194636
|
-
// ../../node_modules/.bun/@better-auth+drizzle-adapter@1.7.2+
|
|
194702
|
+
// ../../node_modules/.bun/@better-auth+drizzle-adapter@1.7.2+eadce48673ea6e55/node_modules/@better-auth/drizzle-adapter/dist/query-builders-CBLMSM7v.mjs
|
|
194637
194703
|
init_drizzle_orm();
|
|
194638
194704
|
function buildRelationKeysByModel(relationRegistry) {
|
|
194639
194705
|
const relationKeysByModel = /* @__PURE__ */ new Map;
|
|
@@ -194677,7 +194743,7 @@ function insensitiveNe2(column2, value) {
|
|
|
194677
194743
|
return sql`LOWER(${column2}) <> LOWER(${value})`;
|
|
194678
194744
|
}
|
|
194679
194745
|
|
|
194680
|
-
// ../../node_modules/.bun/@better-auth+drizzle-adapter@1.7.2+
|
|
194746
|
+
// ../../node_modules/.bun/@better-auth+drizzle-adapter@1.7.2+eadce48673ea6e55/node_modules/@better-auth/drizzle-adapter/dist/index.mjs
|
|
194681
194747
|
init_adapter();
|
|
194682
194748
|
init_env();
|
|
194683
194749
|
init_error2();
|
|
@@ -196414,7 +196480,8 @@ var basePipelineJobFields = {
|
|
|
196414
196480
|
requestedAt: exports_external2.iso.datetime(),
|
|
196415
196481
|
source: pipelineSourceSchema,
|
|
196416
196482
|
refreshMode: pipelineRefreshModeSchema,
|
|
196417
|
-
embeddingContextHash: exports_external2.string().min(1).optional()
|
|
196483
|
+
embeddingContextHash: exports_external2.string().min(1).optional(),
|
|
196484
|
+
warningRetry: exports_external2.literal(true).optional()
|
|
196418
196485
|
};
|
|
196419
196486
|
function normalizeLegacyPipelineJob(value) {
|
|
196420
196487
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
@@ -200753,12 +200820,19 @@ var categoryRoutes = new Elysia({ prefix: "/api" }).get("/categories", async ({
|
|
|
200753
200820
|
return { conflict: true };
|
|
200754
200821
|
}
|
|
200755
200822
|
}
|
|
200823
|
+
const [existingAccess] = hasApiAccessUpdate ? await tx.select({
|
|
200824
|
+
apiMode: categories.apiMode,
|
|
200825
|
+
apiPermissionRead: categories.apiPermissionRead,
|
|
200826
|
+
apiPermissionEdit: categories.apiPermissionEdit,
|
|
200827
|
+
apiPermissionWrite: categories.apiPermissionWrite
|
|
200828
|
+
}).from(categories).where(and(eq(categories.id, params.id), tenantOwnerCondition(categories.ownerId, categories.workspaceId, ctx))).for("update").limit(1) : [];
|
|
200756
200829
|
const [row] = await tx.update(categories).set({
|
|
200757
200830
|
...parsed.data.name !== undefined && { name: parsed.data.name },
|
|
200758
200831
|
...parsed.data.order !== undefined && {
|
|
200759
200832
|
order: parsed.data.order
|
|
200760
200833
|
},
|
|
200761
200834
|
...hasApiAccessUpdate ? buildApiAccessValues({
|
|
200835
|
+
existing: existingAccess,
|
|
200762
200836
|
apiMode: parsed.data.apiMode,
|
|
200763
200837
|
apiPermissionRead: parsed.data.apiPermissionRead,
|
|
200764
200838
|
apiPermissionEdit: parsed.data.apiPermissionEdit,
|
|
@@ -228647,6 +228721,33 @@ function encodeS3CopySource(bucket, key) {
|
|
|
228647
228721
|
// ../../backend/src/api/routes/documents.ts
|
|
228648
228722
|
init_logger3();
|
|
228649
228723
|
|
|
228724
|
+
// ../../backend/src/lib/pipeline-error.ts
|
|
228725
|
+
class PipelineProviderError extends Error {
|
|
228726
|
+
code;
|
|
228727
|
+
retryable;
|
|
228728
|
+
constructor(code2, retryable, message2 = code2) {
|
|
228729
|
+
super(message2);
|
|
228730
|
+
this.code = code2;
|
|
228731
|
+
this.retryable = retryable;
|
|
228732
|
+
this.name = "PipelineProviderError";
|
|
228733
|
+
}
|
|
228734
|
+
}
|
|
228735
|
+
function pipelineErrorCode(error53, fallback) {
|
|
228736
|
+
if (error53 instanceof PipelineProviderError)
|
|
228737
|
+
return error53.code;
|
|
228738
|
+
return fallback;
|
|
228739
|
+
}
|
|
228740
|
+
function isRetryablePipelineError(code2) {
|
|
228741
|
+
return new Set([
|
|
228742
|
+
"provider_failure",
|
|
228743
|
+
"provider_timeout",
|
|
228744
|
+
"invalid_provider_response",
|
|
228745
|
+
"queue_enqueue_failed",
|
|
228746
|
+
"age_unavailable",
|
|
228747
|
+
"age_persist_failed"
|
|
228748
|
+
]).has(code2);
|
|
228749
|
+
}
|
|
228750
|
+
|
|
228650
228751
|
// ../../backend/src/lib/version-prune.ts
|
|
228651
228752
|
init_schema2();
|
|
228652
228753
|
init_drizzle_orm();
|
|
@@ -228682,6 +228783,30 @@ async function maybePruneVersions(documentId) {
|
|
|
228682
228783
|
}
|
|
228683
228784
|
|
|
228684
228785
|
// ../../backend/src/api/routes/documents.ts
|
|
228786
|
+
init_names();
|
|
228787
|
+
|
|
228788
|
+
// ../../backend/src/queue/pipeline-warning-retry.ts
|
|
228789
|
+
function resolveActiveWarningRetry(stageStarted, retryJobExists) {
|
|
228790
|
+
if (!stageStarted)
|
|
228791
|
+
return "enqueue";
|
|
228792
|
+
return retryJobExists ? "deduplicate" : "conflict";
|
|
228793
|
+
}
|
|
228794
|
+
function warningRetryJobId(stage, generationId) {
|
|
228795
|
+
return `${stage}-warning-retry-${generationId}`;
|
|
228796
|
+
}
|
|
228797
|
+
function summaryJobIdForPipeline(job2) {
|
|
228798
|
+
return job2.warningRetry ? warningRetryJobId("summarize", job2.generationId) : JOB_IDS.summarize(job2.generationId, job2.workspaceId);
|
|
228799
|
+
}
|
|
228800
|
+
function planWarningStageRetry(state) {
|
|
228801
|
+
const graph = state.graphStatus === "failed" && isRetryablePipelineError(state.graphErrorCode ?? "graph_failed");
|
|
228802
|
+
const summarize = state.summarizeStatus === "failed" && isRetryablePipelineError(state.summarizeErrorCode ?? "summary_failed");
|
|
228803
|
+
if (!graph && !summarize)
|
|
228804
|
+
return null;
|
|
228805
|
+
return { graph, summarize, entryStage: graph ? "graph" : "summarize" };
|
|
228806
|
+
}
|
|
228807
|
+
|
|
228808
|
+
// ../../backend/src/api/routes/documents.ts
|
|
228809
|
+
init_queues();
|
|
228685
228810
|
class DocumentPurgeNotFoundError extends Error {
|
|
228686
228811
|
constructor() {
|
|
228687
228812
|
super("document_purge_not_found");
|
|
@@ -229237,6 +229362,8 @@ var documentRoutes = new Elysia({ prefix: "/api" }).get("/documents", async ({ q
|
|
|
229237
229362
|
embedStatus: documentPipelineRuns.embedStatus,
|
|
229238
229363
|
graphStatus: documentPipelineRuns.graphStatus,
|
|
229239
229364
|
summarizeStatus: documentPipelineRuns.summarizeStatus,
|
|
229365
|
+
graphErrorCode: documentPipelineRuns.graphErrorCode,
|
|
229366
|
+
summarizeErrorCode: documentPipelineRuns.summarizeErrorCode,
|
|
229240
229367
|
finalizeStatus: documentPipelineRuns.finalizeStatus,
|
|
229241
229368
|
totalBatches: documentPipelineRuns.totalBatches,
|
|
229242
229369
|
completedBatches: documentPipelineRuns.completedBatches,
|
|
@@ -229266,6 +229393,22 @@ var documentRoutes = new Elysia({ prefix: "/api" }).get("/documents", async ({ q
|
|
|
229266
229393
|
completed: run3.completedBatches,
|
|
229267
229394
|
failed: run3.failedBatches
|
|
229268
229395
|
},
|
|
229396
|
+
warnings: [
|
|
229397
|
+
...run3.graphStatus === "failed" ? [
|
|
229398
|
+
{
|
|
229399
|
+
stage: "graph",
|
|
229400
|
+
code: run3.graphErrorCode ?? "graph_failed",
|
|
229401
|
+
retryable: isRetryablePipelineError(run3.graphErrorCode ?? "graph_failed")
|
|
229402
|
+
}
|
|
229403
|
+
] : [],
|
|
229404
|
+
...run3.summarizeStatus === "failed" ? [
|
|
229405
|
+
{
|
|
229406
|
+
stage: "summarize",
|
|
229407
|
+
code: run3.summarizeErrorCode ?? "summary_failed",
|
|
229408
|
+
retryable: isRetryablePipelineError(run3.summarizeErrorCode ?? "summary_failed")
|
|
229409
|
+
}
|
|
229410
|
+
] : []
|
|
229411
|
+
],
|
|
229269
229412
|
updatedAt: run3.updatedAt
|
|
229270
229413
|
};
|
|
229271
229414
|
} catch (err) {
|
|
@@ -229273,6 +229416,194 @@ var documentRoutes = new Elysia({ prefix: "/api" }).get("/documents", async ({ q
|
|
|
229273
229416
|
set2.status = 500;
|
|
229274
229417
|
return { error: "Failed to load pipeline progress" };
|
|
229275
229418
|
}
|
|
229419
|
+
}).post("/documents/:id/pipeline/retry-warnings", async ({ params: params2, set: set2, request }) => {
|
|
229420
|
+
const parsedParams = documentIdParamsSchema.safeParse(params2);
|
|
229421
|
+
if (!parsedParams.success) {
|
|
229422
|
+
set2.status = 400;
|
|
229423
|
+
return { error: "Invalid document id" };
|
|
229424
|
+
}
|
|
229425
|
+
const documentId = parsedParams.data.id;
|
|
229426
|
+
const ip = request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() ?? request.headers.get("x-real-ip") ?? "unknown";
|
|
229427
|
+
const rl = await writeRateLimiter(ip, request);
|
|
229428
|
+
if (!rl.allowed) {
|
|
229429
|
+
set2.status = 429;
|
|
229430
|
+
set2.headers = rateLimitHeaders(0, rl.retryAfter);
|
|
229431
|
+
return { error: "Too many requests" };
|
|
229432
|
+
}
|
|
229433
|
+
set2.headers = rateLimitHeaders(rl.remaining);
|
|
229434
|
+
const access = await resolveContentAccess(request);
|
|
229435
|
+
const ctx = access.ctx;
|
|
229436
|
+
if (ctx.role === "none") {
|
|
229437
|
+
set2.status = 401;
|
|
229438
|
+
return { error: "Unauthorized" };
|
|
229439
|
+
}
|
|
229440
|
+
if (!canAccessContent(access, "write")) {
|
|
229441
|
+
set2.status = 403;
|
|
229442
|
+
return { error: "Forbidden" };
|
|
229443
|
+
}
|
|
229444
|
+
let claimed;
|
|
229445
|
+
try {
|
|
229446
|
+
const retry2 = await withTenant(ctx, async (tx) => {
|
|
229447
|
+
await acquireDocumentPipelineLock(tx, documentId);
|
|
229448
|
+
const [run3] = await tx.select({
|
|
229449
|
+
status: documentPipelineRuns.status,
|
|
229450
|
+
generationId: documentPipelineRuns.generationId,
|
|
229451
|
+
revision: documentPipelineRuns.revision,
|
|
229452
|
+
ownerId: documentPipelineRuns.ownerId,
|
|
229453
|
+
workspaceId: documentPipelineRuns.workspaceId,
|
|
229454
|
+
refreshMode: documentPipelineRuns.refreshMode,
|
|
229455
|
+
embeddingContextHash: documentPipelineRuns.embeddingContextHash,
|
|
229456
|
+
embedStatus: documentPipelineRuns.embedStatus,
|
|
229457
|
+
graphStatus: documentPipelineRuns.graphStatus,
|
|
229458
|
+
summarizeStatus: documentPipelineRuns.summarizeStatus,
|
|
229459
|
+
graphErrorCode: documentPipelineRuns.graphErrorCode,
|
|
229460
|
+
summarizeErrorCode: documentPipelineRuns.summarizeErrorCode
|
|
229461
|
+
}).from(documentPipelineRuns).innerJoin(documents, and(eq(documents.id, documentPipelineRuns.documentId), eq(documents.activeEmbeddingGeneration, documentPipelineRuns.generationId), eq(documents.contentHash, documentPipelineRuns.revision))).where(and(eq(documentPipelineRuns.documentId, documentId), tenantOwnerCondition(documents.ownerId, documents.workspaceId, ctx), eq(documentPipelineRuns.embedStatus, "ready"), isNull(documents.deletedAt), ...access.restricted ? [
|
|
229462
|
+
access.categoryId ? effectiveDocumentCategoryCondition(documents.categoryId, documents.folderId, ctx, access.categoryId) : sql`false`
|
|
229463
|
+
] : [])).orderBy(desc(documentPipelineRuns.updatedAt)).limit(1).for("update");
|
|
229464
|
+
if (!run3)
|
|
229465
|
+
return null;
|
|
229466
|
+
if (run3.status === "processing") {
|
|
229467
|
+
const graph2 = ["retrying", "processing"].includes(run3.graphStatus);
|
|
229468
|
+
const summarize2 = ["retrying", "processing"].includes(run3.summarizeStatus);
|
|
229469
|
+
return graph2 || summarize2 ? {
|
|
229470
|
+
...run3,
|
|
229471
|
+
graph: graph2,
|
|
229472
|
+
summarize: summarize2,
|
|
229473
|
+
deduplicated: true,
|
|
229474
|
+
stageStarted: run3.graphStatus === "processing" || run3.summarizeStatus === "processing"
|
|
229475
|
+
} : null;
|
|
229476
|
+
}
|
|
229477
|
+
if (run3.status !== "ready_with_warnings")
|
|
229478
|
+
return null;
|
|
229479
|
+
const plan = planWarningStageRetry(run3);
|
|
229480
|
+
if (!plan)
|
|
229481
|
+
return null;
|
|
229482
|
+
const { graph, summarize } = plan;
|
|
229483
|
+
await tx.update(documentPipelineRuns).set({
|
|
229484
|
+
status: "processing",
|
|
229485
|
+
finalizeStatus: "pending",
|
|
229486
|
+
...graph ? { graphStatus: "retrying", graphErrorCode: null } : {},
|
|
229487
|
+
...summarize ? {
|
|
229488
|
+
summarizeStatus: "retrying",
|
|
229489
|
+
summarizeErrorCode: null
|
|
229490
|
+
} : {},
|
|
229491
|
+
updatedAt: new Date
|
|
229492
|
+
}).where(eq(documentPipelineRuns.generationId, run3.generationId));
|
|
229493
|
+
return {
|
|
229494
|
+
...run3,
|
|
229495
|
+
graph,
|
|
229496
|
+
summarize,
|
|
229497
|
+
deduplicated: false,
|
|
229498
|
+
stageStarted: false
|
|
229499
|
+
};
|
|
229500
|
+
});
|
|
229501
|
+
if (!retry2) {
|
|
229502
|
+
set2.status = 409;
|
|
229503
|
+
return { error: "No retryable warning stages" };
|
|
229504
|
+
}
|
|
229505
|
+
if (!retry2.deduplicated)
|
|
229506
|
+
claimed = retry2;
|
|
229507
|
+
const stage = retry2.graph ? "graph" : "summarize";
|
|
229508
|
+
const retryJobId = warningRetryJobId(stage, retry2.generationId);
|
|
229509
|
+
const staleJobs = [
|
|
229510
|
+
...retry2.graph ? [
|
|
229511
|
+
[
|
|
229512
|
+
"graph",
|
|
229513
|
+
JOB_IDS.graph(retry2.generationId, retry2.workspaceId ?? undefined)
|
|
229514
|
+
]
|
|
229515
|
+
] : [],
|
|
229516
|
+
...retry2.summarize ? [
|
|
229517
|
+
[
|
|
229518
|
+
"summarize",
|
|
229519
|
+
JOB_IDS.summarize(retry2.generationId, retry2.workspaceId ?? undefined)
|
|
229520
|
+
]
|
|
229521
|
+
] : [],
|
|
229522
|
+
[
|
|
229523
|
+
"finalize",
|
|
229524
|
+
JOB_IDS.finalize(retry2.generationId, retry2.workspaceId ?? undefined)
|
|
229525
|
+
]
|
|
229526
|
+
];
|
|
229527
|
+
if (!retry2.deduplicated) {
|
|
229528
|
+
for (const [queuedStage, jobId] of staleJobs) {
|
|
229529
|
+
const oldJob = await getPipelineQueue(queuedStage, config3.REDIS_URL).getJob(jobId);
|
|
229530
|
+
await oldJob?.remove();
|
|
229531
|
+
}
|
|
229532
|
+
}
|
|
229533
|
+
const queue2 = getPipelineQueue(stage, config3.REDIS_URL);
|
|
229534
|
+
const existingRetryJob = await queue2.getJob(retryJobId);
|
|
229535
|
+
if (retry2.deduplicated) {
|
|
229536
|
+
const activeRetry = resolveActiveWarningRetry(retry2.stageStarted, Boolean(existingRetryJob));
|
|
229537
|
+
if (activeRetry === "conflict") {
|
|
229538
|
+
set2.status = 409;
|
|
229539
|
+
return { error: "No retryable warning stages" };
|
|
229540
|
+
}
|
|
229541
|
+
if (activeRetry === "deduplicate")
|
|
229542
|
+
return {
|
|
229543
|
+
documentId,
|
|
229544
|
+
generationId: retry2.generationId,
|
|
229545
|
+
deduplicated: true,
|
|
229546
|
+
retriedStages: [
|
|
229547
|
+
...retry2.graph ? ["graph"] : [],
|
|
229548
|
+
...retry2.summarize ? ["summarize"] : []
|
|
229549
|
+
]
|
|
229550
|
+
};
|
|
229551
|
+
}
|
|
229552
|
+
const existingRetryState = await existingRetryJob?.getState();
|
|
229553
|
+
if (existingRetryState === "completed" || existingRetryState === "failed") {
|
|
229554
|
+
await existingRetryJob?.remove();
|
|
229555
|
+
}
|
|
229556
|
+
const data = {
|
|
229557
|
+
schemaVersion: PIPELINE_SCHEMA_VERSION,
|
|
229558
|
+
stage,
|
|
229559
|
+
documentId,
|
|
229560
|
+
ownerId: retry2.ownerId,
|
|
229561
|
+
...retry2.workspaceId ? { workspaceId: retry2.workspaceId } : {},
|
|
229562
|
+
generationId: retry2.generationId,
|
|
229563
|
+
revision: retry2.revision,
|
|
229564
|
+
requestedAt: new Date().toISOString(),
|
|
229565
|
+
source: "api",
|
|
229566
|
+
refreshMode: retry2.refreshMode === "incremental" ? "incremental" : "full",
|
|
229567
|
+
...retry2.embeddingContextHash ? { embeddingContextHash: retry2.embeddingContextHash } : {},
|
|
229568
|
+
warningRetry: true
|
|
229569
|
+
};
|
|
229570
|
+
await queue2.add(stage, data, {
|
|
229571
|
+
...DEFAULT_JOB_OPTIONS,
|
|
229572
|
+
jobId: retryJobId,
|
|
229573
|
+
priority: SOURCE_PRIORITY.api
|
|
229574
|
+
});
|
|
229575
|
+
return {
|
|
229576
|
+
documentId,
|
|
229577
|
+
generationId: retry2.generationId,
|
|
229578
|
+
deduplicated: retry2.deduplicated,
|
|
229579
|
+
retriedStages: [
|
|
229580
|
+
...retry2.graph ? ["graph"] : [],
|
|
229581
|
+
...retry2.summarize ? ["summarize"] : []
|
|
229582
|
+
]
|
|
229583
|
+
};
|
|
229584
|
+
} catch (err) {
|
|
229585
|
+
const failedClaim = claimed;
|
|
229586
|
+
if (failedClaim) {
|
|
229587
|
+
await withTenant(ctx, (tx) => tx.update(documentPipelineRuns).set({
|
|
229588
|
+
status: "ready_with_warnings",
|
|
229589
|
+
finalizeStatus: "ready",
|
|
229590
|
+
...failedClaim.graph ? {
|
|
229591
|
+
graphStatus: "failed",
|
|
229592
|
+
graphErrorCode: "queue_enqueue_failed"
|
|
229593
|
+
} : {},
|
|
229594
|
+
...failedClaim.summarize ? {
|
|
229595
|
+
summarizeStatus: "failed",
|
|
229596
|
+
summarizeErrorCode: "queue_enqueue_failed"
|
|
229597
|
+
} : {},
|
|
229598
|
+
updatedAt: new Date
|
|
229599
|
+
}).where(and(eq(documentPipelineRuns.generationId, failedClaim.generationId), eq(documentPipelineRuns.status, "processing")))).catch(() => {
|
|
229600
|
+
return;
|
|
229601
|
+
});
|
|
229602
|
+
}
|
|
229603
|
+
logger3.error({ err, documentId }, "Failed to retry warning stages");
|
|
229604
|
+
set2.status = 500;
|
|
229605
|
+
return { error: "Failed to retry warning stages" };
|
|
229606
|
+
}
|
|
229276
229607
|
}).get("/documents/:id/knowledge-summary", async ({ params: params2, set: set2, request }) => {
|
|
229277
229608
|
const parsedParams = documentIdParamsSchema.safeParse(params2);
|
|
229278
229609
|
if (!parsedParams.success) {
|
|
@@ -229362,6 +229693,8 @@ var documentRoutes = new Elysia({ prefix: "/api" }).get("/documents", async ({ q
|
|
|
229362
229693
|
embedStatus: documentPipelineRuns.embedStatus,
|
|
229363
229694
|
graphStatus: documentPipelineRuns.graphStatus,
|
|
229364
229695
|
summarizeStatus: documentPipelineRuns.summarizeStatus,
|
|
229696
|
+
graphErrorCode: documentPipelineRuns.graphErrorCode,
|
|
229697
|
+
summarizeErrorCode: documentPipelineRuns.summarizeErrorCode,
|
|
229365
229698
|
finalizeStatus: documentPipelineRuns.finalizeStatus,
|
|
229366
229699
|
totalBatches: documentPipelineRuns.totalBatches,
|
|
229367
229700
|
completedBatches: documentPipelineRuns.completedBatches,
|
|
@@ -229405,6 +229738,22 @@ var documentRoutes = new Elysia({ prefix: "/api" }).get("/documents", async ({ q
|
|
|
229405
229738
|
completed: run3.completedBatches,
|
|
229406
229739
|
failed: run3.failedBatches
|
|
229407
229740
|
},
|
|
229741
|
+
warnings: [
|
|
229742
|
+
...run3.graphStatus === "failed" ? [
|
|
229743
|
+
{
|
|
229744
|
+
stage: "graph",
|
|
229745
|
+
code: run3.graphErrorCode ?? "graph_failed",
|
|
229746
|
+
retryable: isRetryablePipelineError(run3.graphErrorCode ?? "graph_failed")
|
|
229747
|
+
}
|
|
229748
|
+
] : [],
|
|
229749
|
+
...run3.summarizeStatus === "failed" ? [
|
|
229750
|
+
{
|
|
229751
|
+
stage: "summarize",
|
|
229752
|
+
code: run3.summarizeErrorCode ?? "summary_failed",
|
|
229753
|
+
retryable: isRetryablePipelineError(run3.summarizeErrorCode ?? "summary_failed")
|
|
229754
|
+
}
|
|
229755
|
+
] : []
|
|
229756
|
+
],
|
|
229408
229757
|
updatedAt: run3.updatedAt
|
|
229409
229758
|
} : null
|
|
229410
229759
|
};
|
|
@@ -232252,22 +232601,40 @@ function uniqueChatProviders(providers) {
|
|
|
232252
232601
|
return unique;
|
|
232253
232602
|
}
|
|
232254
232603
|
async function requestStructuredChat(options) {
|
|
232604
|
+
const attempt = await requestStructuredChatDetailed(options);
|
|
232605
|
+
return attempt.ok ? attempt.result : null;
|
|
232606
|
+
}
|
|
232607
|
+
async function requestStructuredChatDetailed(options) {
|
|
232255
232608
|
const providers = uniqueChatProviders([
|
|
232256
232609
|
options.primary,
|
|
232257
232610
|
options.fallback,
|
|
232258
232611
|
...options.fallbacks ?? []
|
|
232259
232612
|
]);
|
|
232613
|
+
let lastError = new PipelineProviderError("provider_unavailable", false, "No chat provider was configured");
|
|
232260
232614
|
for (const provider of providers) {
|
|
232261
232615
|
try {
|
|
232262
232616
|
const raw = await requestChatContent(provider, options);
|
|
232263
|
-
|
|
232617
|
+
let parsed;
|
|
232618
|
+
try {
|
|
232619
|
+
parsed = parseJson(raw);
|
|
232620
|
+
} catch {
|
|
232621
|
+
lastError = new PipelineProviderError("invalid_provider_response", true);
|
|
232622
|
+
continue;
|
|
232623
|
+
}
|
|
232264
232624
|
const result = options.outputSchema.safeParse(parsed);
|
|
232265
|
-
if (!result.success)
|
|
232625
|
+
if (!result.success) {
|
|
232626
|
+
lastError = new PipelineProviderError("permanent_validation_failure", false);
|
|
232266
232627
|
continue;
|
|
232267
|
-
|
|
232268
|
-
|
|
232628
|
+
}
|
|
232629
|
+
return {
|
|
232630
|
+
ok: true,
|
|
232631
|
+
result: { data: result.data, model: provider.model }
|
|
232632
|
+
};
|
|
232633
|
+
} catch (error53) {
|
|
232634
|
+
lastError = error53 instanceof PipelineProviderError ? error53 : error53 instanceof Error && error53.name === "AbortError" ? new PipelineProviderError("provider_timeout", true) : new PipelineProviderError("provider_failure", true);
|
|
232635
|
+
}
|
|
232269
232636
|
}
|
|
232270
|
-
return
|
|
232637
|
+
return { ok: false, error: lastError };
|
|
232271
232638
|
}
|
|
232272
232639
|
async function requestChatContent(provider, options) {
|
|
232273
232640
|
const controller = new AbortController;
|
|
@@ -232292,11 +232659,16 @@ async function requestChatContent(provider, options) {
|
|
|
232292
232659
|
})
|
|
232293
232660
|
});
|
|
232294
232661
|
if (!response.ok)
|
|
232295
|
-
throw new
|
|
232296
|
-
|
|
232662
|
+
throw new PipelineProviderError("provider_failure", true, `chat provider returned ${response.status}`);
|
|
232663
|
+
let body;
|
|
232664
|
+
try {
|
|
232665
|
+
body = await response.json();
|
|
232666
|
+
} catch {
|
|
232667
|
+
throw new PipelineProviderError("invalid_provider_response", true);
|
|
232668
|
+
}
|
|
232297
232669
|
const content50 = body.choices?.[0]?.message?.content;
|
|
232298
232670
|
if (typeof content50 !== "string" || !content50.trim()) {
|
|
232299
|
-
throw new
|
|
232671
|
+
throw new PipelineProviderError("invalid_provider_response", true);
|
|
232300
232672
|
}
|
|
232301
232673
|
return content50;
|
|
232302
232674
|
} finally {
|
|
@@ -232573,18 +232945,21 @@ function rerankUrl(baseUrl) {
|
|
|
232573
232945
|
return normalized.endsWith("/rerank") ? normalized : `${normalized}/rerank`;
|
|
232574
232946
|
}
|
|
232575
232947
|
async function requestRerank(input) {
|
|
232576
|
-
const
|
|
232577
|
-
|
|
232948
|
+
const candidates = input.candidates.map((candidate, originalIndex) => ({
|
|
232949
|
+
id: candidate.id,
|
|
232950
|
+
document: candidate.text.trim(),
|
|
232951
|
+
originalIndex
|
|
232952
|
+
})).filter((candidate) => candidate.document.length > 0);
|
|
232953
|
+
if (candidates.length === 0)
|
|
232578
232954
|
return null;
|
|
232579
|
-
const
|
|
232580
|
-
const topN = Math.min(input.topN ?? config3.SEARCH_RERANK_TOP_N, documents2.length);
|
|
232955
|
+
const topN = Math.min(input.topN ?? config3.SEARCH_RERANK_TOP_N, candidates.length);
|
|
232581
232956
|
const timeoutMs = config3.SEARCH_RERANK_TIMEOUT_MS;
|
|
232582
232957
|
const started = performance.now();
|
|
232583
|
-
incrementCounterBy(METRIC_NAMES.SEARCH_RERANK_CANDIDATES_TOTAL,
|
|
232958
|
+
incrementCounterBy(METRIC_NAMES.SEARCH_RERANK_CANDIDATES_TOTAL, candidates.length);
|
|
232584
232959
|
try {
|
|
232585
232960
|
for (const slot of configuredSlots()) {
|
|
232586
232961
|
try {
|
|
232587
|
-
const hits = await callRerankSlot(slot, input.query,
|
|
232962
|
+
const hits = await callRerankSlot(slot, input.query, candidates, {
|
|
232588
232963
|
topN,
|
|
232589
232964
|
timeoutMs
|
|
232590
232965
|
});
|
|
@@ -232602,7 +232977,7 @@ async function requestRerank(input) {
|
|
|
232602
232977
|
recordDuration(METRIC_NAMES.SEARCH_RERANK_DURATION_MS, performance.now() - started);
|
|
232603
232978
|
}
|
|
232604
232979
|
}
|
|
232605
|
-
async function callRerankSlot(slot, query,
|
|
232980
|
+
async function callRerankSlot(slot, query, candidates, options) {
|
|
232606
232981
|
const controller = new AbortController;
|
|
232607
232982
|
const timer2 = setTimeout(() => controller.abort(), options.timeoutMs);
|
|
232608
232983
|
const headers = {
|
|
@@ -232618,7 +232993,7 @@ async function callRerankSlot(slot, query, documents2, ids, options) {
|
|
|
232618
232993
|
body: JSON.stringify({
|
|
232619
232994
|
model: slot.model,
|
|
232620
232995
|
query,
|
|
232621
|
-
documents:
|
|
232996
|
+
documents: candidates.map((candidate) => candidate.document),
|
|
232622
232997
|
top_n: options.topN
|
|
232623
232998
|
})
|
|
232624
232999
|
});
|
|
@@ -232627,14 +233002,16 @@ async function callRerankSlot(slot, query, documents2, ids, options) {
|
|
|
232627
233002
|
}
|
|
232628
233003
|
const body = await response.json();
|
|
232629
233004
|
const hits = [];
|
|
233005
|
+
const seenIds = new Set;
|
|
232630
233006
|
for (const [rank, row] of (body.results ?? []).entries()) {
|
|
232631
|
-
if (typeof row.index !== "number" || row.index < 0)
|
|
233007
|
+
if (typeof row.index !== "number" || !Number.isInteger(row.index) || row.index < 0)
|
|
232632
233008
|
continue;
|
|
232633
|
-
const
|
|
232634
|
-
if (!
|
|
233009
|
+
const candidate = candidates[row.index];
|
|
233010
|
+
if (!candidate || seenIds.has(candidate.id))
|
|
232635
233011
|
continue;
|
|
233012
|
+
seenIds.add(candidate.id);
|
|
232636
233013
|
const score = typeof row.relevance_score === "number" && Number.isFinite(row.relevance_score) ? row.relevance_score : 0;
|
|
232637
|
-
hits.push({ id:
|
|
233014
|
+
hits.push({ id: candidate.id, score, rank: rank + 1 });
|
|
232638
233015
|
}
|
|
232639
233016
|
return hits;
|
|
232640
233017
|
} finally {
|
|
@@ -233747,6 +234124,12 @@ init_drizzle_orm();
|
|
|
233747
234124
|
init_zod();
|
|
233748
234125
|
init_logger3();
|
|
233749
234126
|
init_redis();
|
|
234127
|
+
function shareLinkTenantContext(link) {
|
|
234128
|
+
return {
|
|
234129
|
+
...shareGuestTenantContext(link.createdBy),
|
|
234130
|
+
...link.workspaceId ? { workspaceId: link.workspaceId, source: "external" } : {}
|
|
234131
|
+
};
|
|
234132
|
+
}
|
|
233750
234133
|
async function authorizeShareLink(request, shareId) {
|
|
233751
234134
|
const access = await resolveContentAccess(request);
|
|
233752
234135
|
if (access.ctx.role === "none" || !canAccessContent(access, "write")) {
|
|
@@ -234060,7 +234443,7 @@ var shareRoutes = new Elysia({ prefix: "/api/share" }).post("/", async ({ reques
|
|
|
234060
234443
|
return { error: "Invalid password" };
|
|
234061
234444
|
}
|
|
234062
234445
|
}
|
|
234063
|
-
const ownerCtx =
|
|
234446
|
+
const ownerCtx = shareLinkTenantContext(link);
|
|
234064
234447
|
if (link.documentId) {
|
|
234065
234448
|
const documentId = link.documentId;
|
|
234066
234449
|
const doc5 = await withTenant(ownerCtx, async (tx) => {
|
|
@@ -234436,7 +234819,7 @@ var shareRoutes = new Elysia({ prefix: "/api/share" }).post("/", async ({ reques
|
|
|
234436
234819
|
return { error: "Invalid password" };
|
|
234437
234820
|
}
|
|
234438
234821
|
}
|
|
234439
|
-
const ownerCtx =
|
|
234822
|
+
const ownerCtx = shareLinkTenantContext(link);
|
|
234440
234823
|
const isAllowed = link.folderId ? await isFolderDescendant2(ownerCtx, folderId, link.folderId) : link.categoryId ? await withTenant(ownerCtx, async (tx) => {
|
|
234441
234824
|
const effectiveCategoryId = await resolveFolderEffectiveCategory(tx, ownerCtx, folderId);
|
|
234442
234825
|
return effectiveCategoryId === link.categoryId;
|
|
@@ -234524,7 +234907,7 @@ var shareRoutes = new Elysia({ prefix: "/api/share" }).post("/", async ({ reques
|
|
|
234524
234907
|
return { error: "Invalid password" };
|
|
234525
234908
|
}
|
|
234526
234909
|
}
|
|
234527
|
-
const ownerCtx =
|
|
234910
|
+
const ownerCtx = shareLinkTenantContext(link);
|
|
234528
234911
|
let isAllowed = false;
|
|
234529
234912
|
if (link.documentId === docId) {
|
|
234530
234913
|
isAllowed = true;
|
|
@@ -234653,11 +235036,16 @@ var tagRoutes = new Elysia({ prefix: "/api" }).get("/tags", async ({ set: set2,
|
|
|
234653
235036
|
set2.status = 429;
|
|
234654
235037
|
return { error: "Rate limited" };
|
|
234655
235038
|
}
|
|
234656
|
-
const
|
|
235039
|
+
const access = await resolveContentAccess(request);
|
|
235040
|
+
const ctx = access.ctx;
|
|
234657
235041
|
if (ctx.role === "none") {
|
|
234658
235042
|
set2.status = 401;
|
|
234659
235043
|
return { error: "Unauthorized" };
|
|
234660
235044
|
}
|
|
235045
|
+
if (access.restricted || !canAccessContent(access, "write")) {
|
|
235046
|
+
set2.status = 403;
|
|
235047
|
+
return { error: "Full workspace write access required" };
|
|
235048
|
+
}
|
|
234661
235049
|
const userId = ctx.userId;
|
|
234662
235050
|
const body = createTagSchema.safeParse(await request.json());
|
|
234663
235051
|
if (!body.success) {
|
|
@@ -234698,11 +235086,16 @@ var tagRoutes = new Elysia({ prefix: "/api" }).get("/tags", async ({ set: set2,
|
|
|
234698
235086
|
set2.status = 429;
|
|
234699
235087
|
return { error: "Rate limited" };
|
|
234700
235088
|
}
|
|
234701
|
-
const
|
|
235089
|
+
const access = await resolveContentAccess(request);
|
|
235090
|
+
const ctx = access.ctx;
|
|
234702
235091
|
if (ctx.role === "none") {
|
|
234703
235092
|
set2.status = 401;
|
|
234704
235093
|
return { error: "Unauthorized" };
|
|
234705
235094
|
}
|
|
235095
|
+
if (access.restricted || !canAccessContent(access, "write")) {
|
|
235096
|
+
set2.status = 403;
|
|
235097
|
+
return { error: "Full workspace write access required" };
|
|
235098
|
+
}
|
|
234706
235099
|
const body = updateTagSchema.safeParse(await request.json());
|
|
234707
235100
|
if (!body.success) {
|
|
234708
235101
|
set2.status = 400;
|
|
@@ -234743,11 +235136,16 @@ var tagRoutes = new Elysia({ prefix: "/api" }).get("/tags", async ({ set: set2,
|
|
|
234743
235136
|
set2.status = 429;
|
|
234744
235137
|
return { error: "Rate limited" };
|
|
234745
235138
|
}
|
|
234746
|
-
const
|
|
235139
|
+
const access = await resolveContentAccess(request);
|
|
235140
|
+
const ctx = access.ctx;
|
|
234747
235141
|
if (ctx.role === "none") {
|
|
234748
235142
|
set2.status = 401;
|
|
234749
235143
|
return { error: "Unauthorized" };
|
|
234750
235144
|
}
|
|
235145
|
+
if (access.restricted || !canAccessContent(access, "write")) {
|
|
235146
|
+
set2.status = 403;
|
|
235147
|
+
return { error: "Full workspace write access required" };
|
|
235148
|
+
}
|
|
234751
235149
|
try {
|
|
234752
235150
|
const result = await withTenant(ctx, async (tx) => {
|
|
234753
235151
|
const snapshot2 = await snapshotTagMetadataImpact(tx, ctx, params2.id);
|
|
@@ -235895,7 +236293,11 @@ async function extractEntities(chunkText2, documentId, options = {}) {
|
|
|
235895
236293
|
} catch (err) {
|
|
235896
236294
|
await releaseDedupClaim();
|
|
235897
236295
|
logger3.warn({ err, documentId }, "Entity extraction LLM call failed \u2014 skipping");
|
|
235898
|
-
return {
|
|
236296
|
+
return {
|
|
236297
|
+
status: "failed",
|
|
236298
|
+
warning: err instanceof Error && err.message ? err.message : "provider_failure",
|
|
236299
|
+
entities: []
|
|
236300
|
+
};
|
|
235899
236301
|
}
|
|
235900
236302
|
}
|
|
235901
236303
|
if (entities === null) {
|
|
@@ -235994,7 +236396,7 @@ async function callEntityExtractionLLM(text4, options) {
|
|
|
235994
236396
|
const [primary, ...fallbacks] = providers;
|
|
235995
236397
|
if (!primary)
|
|
235996
236398
|
return null;
|
|
235997
|
-
const
|
|
236399
|
+
const attempt = await requestStructuredChatDetailed({
|
|
235998
236400
|
primary,
|
|
235999
236401
|
fallbacks,
|
|
236000
236402
|
messages: [
|
|
@@ -236005,7 +236407,9 @@ async function callEntityExtractionLLM(text4, options) {
|
|
|
236005
236407
|
maxTokens: options.maxTokens ?? DEFAULT_MAX_TOKENS,
|
|
236006
236408
|
temperature: options.temperature ?? DEFAULT_TEMPERATURE
|
|
236007
236409
|
});
|
|
236008
|
-
|
|
236410
|
+
if (!attempt.ok)
|
|
236411
|
+
throw attempt.error;
|
|
236412
|
+
return parseExtractionResponse(JSON.stringify(attempt.result.data));
|
|
236009
236413
|
}
|
|
236010
236414
|
function resolveGraphProviderKey(baseUrl, explicitKey) {
|
|
236011
236415
|
return resolveChatProviderKey(baseUrl, explicitKey, config3.OPENROUTER_API_KEY);
|
|
@@ -236199,11 +236603,11 @@ async function buildKnowledgeSummary(document2, provider) {
|
|
|
236199
236603
|
}
|
|
236200
236604
|
const output = await provider(document2);
|
|
236201
236605
|
if (!output)
|
|
236202
|
-
throw new Error("
|
|
236606
|
+
throw new Error("provider_failure");
|
|
236203
236607
|
const language = output.language.trim();
|
|
236204
236608
|
const description = output.description.trim();
|
|
236205
236609
|
if (!language || !description)
|
|
236206
|
-
throw new Error("
|
|
236610
|
+
throw new Error("permanent_validation_failure");
|
|
236207
236611
|
const seen = new Set;
|
|
236208
236612
|
const keywords = [];
|
|
236209
236613
|
for (const raw of output.keywords) {
|
|
@@ -236258,7 +236662,7 @@ async function requestKnowledgeSummary(document2) {
|
|
|
236258
236662
|
provider(config3.GRAPH_EXTRACT_FALLBACK_BASE_URL, config3.GRAPH_EXTRACT_FALLBACK_API_KEY, config3.GRAPH_EXTRACT_FALLBACK_MODEL),
|
|
236259
236663
|
provider(config3.GRAPH_EXTRACT_FALLBACK_2_BASE_URL, config3.GRAPH_EXTRACT_FALLBACK_2_API_KEY, config3.GRAPH_EXTRACT_FALLBACK_2_MODEL)
|
|
236260
236664
|
].filter((item) => Boolean(item));
|
|
236261
|
-
const
|
|
236665
|
+
const attempt = await requestStructuredChatDetailed({
|
|
236262
236666
|
primary,
|
|
236263
236667
|
fallbacks,
|
|
236264
236668
|
messages: [
|
|
@@ -236274,7 +236678,9 @@ ${document2.content.slice(0, 50000)}`
|
|
|
236274
236678
|
maxTokens: 768,
|
|
236275
236679
|
temperature: 0
|
|
236276
236680
|
});
|
|
236277
|
-
|
|
236681
|
+
if (!attempt.ok)
|
|
236682
|
+
throw attempt.error;
|
|
236683
|
+
return { ...attempt.result.data, model: attempt.result.model };
|
|
236278
236684
|
}
|
|
236279
236685
|
|
|
236280
236686
|
// ../../backend/src/queue/document-revision.ts
|
|
@@ -236775,6 +237181,14 @@ function stagePatch(stage, status2) {
|
|
|
236775
237181
|
return { summarizeStatus: status2 };
|
|
236776
237182
|
return { finalizeStatus: status2 };
|
|
236777
237183
|
}
|
|
237184
|
+
function stageErrorPatch(stage, status2, errorCode) {
|
|
237185
|
+
const value = status2 === "failed" ? errorCode ?? "unknown_failure" : null;
|
|
237186
|
+
if (stage === "graph")
|
|
237187
|
+
return { graphErrorCode: value };
|
|
237188
|
+
if (stage === "summarize")
|
|
237189
|
+
return { summarizeErrorCode: value };
|
|
237190
|
+
return {};
|
|
237191
|
+
}
|
|
236778
237192
|
function pipelineStageStatus(value) {
|
|
236779
237193
|
return value === "ready_with_warnings" ? "failed" : value;
|
|
236780
237194
|
}
|
|
@@ -236804,6 +237218,7 @@ async function cancelStalePipelineRun(job2, errorCode = "stale_revision") {
|
|
|
236804
237218
|
async function setStageStatus(generationId, stage, status2, errorCode) {
|
|
236805
237219
|
await withTenant(admin, (tx) => tx.update(documentPipelineRuns).set({
|
|
236806
237220
|
...stagePatch(stage, status2),
|
|
237221
|
+
...stageErrorPatch(stage, status2, errorCode),
|
|
236807
237222
|
...errorCode ? { errorCode } : {},
|
|
236808
237223
|
updatedAt: new Date
|
|
236809
237224
|
}).where(and(eq(documentPipelineRuns.generationId, generationId), ne(documentPipelineRuns.status, "cancelled"))));
|
|
@@ -237114,7 +237529,8 @@ function createPipelineStageDependencies(redisUrl) {
|
|
|
237114
237529
|
generationId: run3.generationId,
|
|
237115
237530
|
revision: run3.revision,
|
|
237116
237531
|
embeddingContextHash: run3.embeddingContextHash ?? undefined,
|
|
237117
|
-
embedStatus: pipelineStageStatus(run3.embedStatus)
|
|
237532
|
+
embedStatus: pipelineStageStatus(run3.embedStatus),
|
|
237533
|
+
summarizeStatus: pipelineStageStatus(run3.summarizeStatus)
|
|
237118
237534
|
} : null;
|
|
237119
237535
|
},
|
|
237120
237536
|
async extract(job2) {
|
|
@@ -237142,7 +237558,15 @@ function createPipelineStageDependencies(redisUrl) {
|
|
|
237142
237558
|
const data = { ...job2, stage: "summarize" };
|
|
237143
237559
|
await enqueueIfActive("summarize", "summarize", data, {
|
|
237144
237560
|
...DEFAULT_JOB_OPTIONS,
|
|
237145
|
-
jobId:
|
|
237561
|
+
jobId: summaryJobIdForPipeline(job2),
|
|
237562
|
+
priority: SOURCE_PRIORITY[job2.source]
|
|
237563
|
+
});
|
|
237564
|
+
},
|
|
237565
|
+
async enqueueFinalize(job2) {
|
|
237566
|
+
const data = { ...job2, stage: "finalize" };
|
|
237567
|
+
await enqueueIfActive("finalize", "finalize", data, {
|
|
237568
|
+
...DEFAULT_JOB_OPTIONS,
|
|
237569
|
+
jobId: `${JOB_IDS.finalize(job2.generationId, job2.workspaceId)}-graph-retry-${job2.requestedAt.replace(/\D/g, "")}`,
|
|
237146
237570
|
priority: SOURCE_PRIORITY[job2.source]
|
|
237147
237571
|
});
|
|
237148
237572
|
}
|
|
@@ -237637,10 +238061,12 @@ async function processSummaryStage(job2, dependencies) {
|
|
|
237637
238061
|
} catch (error53) {
|
|
237638
238062
|
if (!await continueIfCurrent())
|
|
237639
238063
|
return;
|
|
237640
|
-
await dependencies.setSummaryStatus(job2.generationId, "failed", error53
|
|
238064
|
+
await dependencies.setSummaryStatus(job2.generationId, "failed", pipelineErrorCode(error53, "summary_failed"));
|
|
237641
238065
|
if (!await continueIfCurrent())
|
|
237642
238066
|
return;
|
|
237643
238067
|
await dependencies.enqueueFinalize(job2);
|
|
238068
|
+
if (error53 instanceof PipelineProviderError && error53.retryable)
|
|
238069
|
+
throw error53;
|
|
237644
238070
|
return;
|
|
237645
238071
|
}
|
|
237646
238072
|
if (!await continueIfCurrent())
|
|
@@ -237655,7 +238081,7 @@ async function processGraphStageFailure(job2, error53, dependencies) {
|
|
|
237655
238081
|
}
|
|
237656
238082
|
if (await dependencies.isCancelled?.(job2))
|
|
237657
238083
|
throw error53;
|
|
237658
|
-
await dependencies.setGraphStatus(job2.generationId, "failed", error53
|
|
238084
|
+
await dependencies.setGraphStatus(job2.generationId, "failed", pipelineErrorCode(error53, "graph_failed"));
|
|
237659
238085
|
if (!await dependencies.isCancelled?.(job2)) {
|
|
237660
238086
|
await dependencies.enqueueSummarize(job2);
|
|
237661
238087
|
}
|
|
@@ -237689,6 +238115,18 @@ function createGraphWorker(deps) {
|
|
|
237689
238115
|
const run3 = await deps.getRun(job2);
|
|
237690
238116
|
if (!run3)
|
|
237691
238117
|
throw new Error("Pipeline run not found");
|
|
238118
|
+
const continuePipeline = async () => {
|
|
238119
|
+
if (await deps.isCancelled?.(job2))
|
|
238120
|
+
return;
|
|
238121
|
+
if (run3.summarizeStatus === "ready" || run3.summarizeStatus === "skipped") {
|
|
238122
|
+
if (deps.enqueueFinalize)
|
|
238123
|
+
await deps.enqueueFinalize(job2);
|
|
238124
|
+
else
|
|
238125
|
+
await deps.enqueueSummarize(job2);
|
|
238126
|
+
return;
|
|
238127
|
+
}
|
|
238128
|
+
await deps.enqueueSummarize(job2);
|
|
238129
|
+
};
|
|
237692
238130
|
if (run3.ownerId !== job2.ownerId || run3.documentId !== job2.documentId) {
|
|
237693
238131
|
throw new Error("Pipeline owner mismatch");
|
|
237694
238132
|
}
|
|
@@ -237706,8 +238144,7 @@ function createGraphWorker(deps) {
|
|
|
237706
238144
|
if (await deps.isCancelled?.(job2))
|
|
237707
238145
|
return;
|
|
237708
238146
|
await deps.setGraphStatus(job2.generationId, "skipped", "embedding_not_ready");
|
|
237709
|
-
|
|
237710
|
-
await deps.enqueueSummarize(job2);
|
|
238147
|
+
await continuePipeline();
|
|
237711
238148
|
return;
|
|
237712
238149
|
}
|
|
237713
238150
|
if (await deps.isCancelled?.(job2))
|
|
@@ -237727,15 +238164,27 @@ function createGraphWorker(deps) {
|
|
|
237727
238164
|
return;
|
|
237728
238165
|
}
|
|
237729
238166
|
if (outcome.status === "unavailable" || outcome.status === "failed") {
|
|
238167
|
+
if (outcome.status === "failed" && [
|
|
238168
|
+
"provider_failure",
|
|
238169
|
+
"provider_timeout",
|
|
238170
|
+
"invalid_provider_response"
|
|
238171
|
+
].includes(outcome.warning)) {
|
|
238172
|
+
throw new PipelineProviderError(outcome.warning, true);
|
|
238173
|
+
}
|
|
237730
238174
|
await deps.setGraphStatus(job2.generationId, "failed", outcome.warning);
|
|
237731
|
-
|
|
237732
|
-
await deps.enqueueSummarize(job2);
|
|
238175
|
+
await continuePipeline();
|
|
237733
238176
|
return;
|
|
237734
238177
|
}
|
|
237735
238178
|
await deps.setGraphStatus(job2.generationId, "ready");
|
|
237736
|
-
|
|
237737
|
-
await deps.enqueueSummarize(job2);
|
|
238179
|
+
await continuePipeline();
|
|
237738
238180
|
} catch (error53) {
|
|
238181
|
+
if (error53 instanceof PipelineProviderError) {
|
|
238182
|
+
await deps.setGraphStatus(job2.generationId, "failed", error53.code);
|
|
238183
|
+
await continuePipeline();
|
|
238184
|
+
if (error53.retryable)
|
|
238185
|
+
throw error53;
|
|
238186
|
+
return;
|
|
238187
|
+
}
|
|
237739
238188
|
await processGraphStageFailure(job2, error53, deps);
|
|
237740
238189
|
}
|
|
237741
238190
|
};
|
|
@@ -237942,7 +238391,7 @@ var swaggerConfig = {
|
|
|
237942
238391
|
},
|
|
237943
238392
|
info: {
|
|
237944
238393
|
title: "DocsMint API",
|
|
237945
|
-
version: "0.8.
|
|
238394
|
+
version: "0.8.3",
|
|
237946
238395
|
description: "Self-hosted AI-native knowledge workspace and installable PWA with hybrid search, GraphRAG, REST, SDK, CLI, and MCP access for people and AI agents.",
|
|
237947
238396
|
contact: { name: "HiAi-gg", url: "https://github.com/HiAi-gg/docsmint" },
|
|
237948
238397
|
license: {
|