@thangnm.nip/irouter 0.0.13 → 0.0.15
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/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +3 -4
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -27
- package/app/.next/routes-manifest.json +0 -6
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/employees/[keyId]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/employees/[keyId]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/employees/page.js +10 -2
- package/app/.next/server/app/(dashboard)/dashboard/employees/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/employees/[keyId]/stats/route.js +5 -3
- package/app/.next/server/app/api/employees/stats/route.js +6 -4
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/locale/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next/server/app/api/settings/database/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js +6 -4
- package/app/.next/server/app/api/usage/history/route.js +5 -3
- package/app/.next/server/app/api/usage/logs/route.js +5 -3
- package/app/.next/server/app/api/usage/providers/route.js +2 -13
- package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-details/[id]/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +5 -3
- package/app/.next/server/app/api/usage/request-logs/route.js +5 -3
- package/app/.next/server/app/api/usage/stats/route.js +5 -3
- package/app/.next/server/app/api/usage/stream/route.js +6 -4
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1internal/route.js +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/employees.html +1 -1
- package/app/.next/server/app/dashboard/employees.rsc +6 -6
- package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard/employees/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard/employees.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/employees.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/employees.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/employees.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/employees.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.html +1 -1
- package/app/.next/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +5 -5
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/favicon.ico/route.js +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +3 -4
- package/app/.next/server/chunks/1424.js +1 -1
- package/app/.next/server/chunks/2664.js +1 -1
- package/app/.next/server/chunks/3093.js +5 -3
- package/app/.next/server/chunks/336.js +4 -2
- package/app/.next/server/chunks/412.js +1 -1
- package/app/.next/server/chunks/5172.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/1321-bfe1e017b24212e4.js +1 -0
- package/app/.next/static/chunks/5497-17e64e7b0e39c381.js +7 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-dbf8fae8c8837130.js → page-e48946710b5781b9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-89c2a22ca02ca0d8.js → page-60022ddd7d6d3e88.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-db322270ec972db0.js → page-bf20f79627d23594.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-7b0d61cbbe1a47c2.js → page-9588cda906b745c2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/[keyId]/{page-e1b127993bd958d0.js → page-64723c9c795f09e8.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/page-82eb0e27b836ec5d.js +9 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/{page-11d04ce754400525.js → page-6443ec34ca34ab96.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-7bb014b116bacd70.js → page-693e22a33e693e5e.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/{page-f113b1a6fd5bf364.js → page-41f227c36a9bda03.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-4d697847e773ee9f.js → page-6b33d4bc3f549542.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-7d54c03780f36a77.js → page-9f51d6b750e712f2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-07b03df6908bbfc0.js → page-21555c82aa050168.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-5268c095e868ce3d.js → page-7b5915c4b3dfa07d.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-2bb6f99a3d1d9206.js → page-e3c730416459e326.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-527700ed764617bf.js → page-3ed1c402dcfff748.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/{layout-5868de9aa453bc2e.js → layout-82da2bc12172481a.js} +1 -1
- package/app/.next/static/chunks/app/layout-c7a4b30f6157755d.js +1 -0
- package/app/.next/static/chunks/app/login/{page-60dcddda96a06c28.js → page-ef0b18015f49da00.js} +1 -1
- package/app/.next/static/css/6bc797837e8d92cb.css +1 -0
- package/app/.next/static/kmNkIwW2GX8scIWQJLsGe/_buildManifest.js +1 -0
- package/app/package.json +1 -1
- package/package.json +3 -4
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +0 -2
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +0 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +0 -1
- package/app/.next/server/app/dashboard/quota.html +0 -2
- package/app/.next/server/app/dashboard/quota.meta +0 -17
- package/app/.next/server/app/dashboard/quota.rsc +0 -25
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +0 -7
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +0 -5
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -6
- package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +0 -25
- package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +0 -6
- package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +0 -9
- package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +0 -6
- package/app/.next/static/Ff9r17vbQucGnFBZPto6l/_buildManifest.js +0 -1
- package/app/.next/static/chunks/2652-5d3ad13224961c58.js +0 -1
- package/app/.next/static/chunks/5497-d50708c4d157ec16.js +0 -7
- package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/page-d18e40a0a0ff8566.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-f33a92ade5e4806e.js +0 -1
- package/app/.next/static/chunks/app/layout-0a0b70c7e991ef26.js +0 -1
- package/app/.next/static/css/322346ef6d5be333.css +0 -1
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/app/node_modules/better-sqlite3/lib/database.js +0 -90
- package/app/node_modules/better-sqlite3/lib/index.js +0 -3
- package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/app/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/app/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/app/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/app/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/app/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/app/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/app/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/app/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/app/node_modules/better-sqlite3/lib/util.js +0 -12
- package/app/node_modules/better-sqlite3/package.json +0 -59
- package/hooks/postinstall.js +0 -125
- /package/app/.next/static/{Ff9r17vbQucGnFBZPto6l → kmNkIwW2GX8scIWQJLsGe}/_ssgManifest.js +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineTable(name, factory) {
|
|
5
|
-
// Validate arguments
|
|
6
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (!name) throw new TypeError('Virtual table module name cannot be an empty string');
|
|
8
|
-
|
|
9
|
-
// Determine whether the module is eponymous-only or not
|
|
10
|
-
let eponymous = false;
|
|
11
|
-
if (typeof factory === 'object' && factory !== null) {
|
|
12
|
-
eponymous = true;
|
|
13
|
-
factory = defer(parseTableDefinition(factory, 'used', name));
|
|
14
|
-
} else {
|
|
15
|
-
if (typeof factory !== 'function') throw new TypeError('Expected second argument to be a function or a table definition object');
|
|
16
|
-
factory = wrapFactory(factory);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
this[cppdb].table(factory, name, eponymous);
|
|
20
|
-
return this;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function wrapFactory(factory) {
|
|
24
|
-
return function virtualTableFactory(moduleName, databaseName, tableName, ...args) {
|
|
25
|
-
const thisObject = {
|
|
26
|
-
module: moduleName,
|
|
27
|
-
database: databaseName,
|
|
28
|
-
table: tableName,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Generate a new table definition by invoking the factory
|
|
32
|
-
const def = apply.call(factory, thisObject, args);
|
|
33
|
-
if (typeof def !== 'object' || def === null) {
|
|
34
|
-
throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return parseTableDefinition(def, 'returned', moduleName);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function parseTableDefinition(def, verb, moduleName) {
|
|
42
|
-
// Validate required properties
|
|
43
|
-
if (!hasOwnProperty.call(def, 'rows')) {
|
|
44
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`);
|
|
45
|
-
}
|
|
46
|
-
if (!hasOwnProperty.call(def, 'columns')) {
|
|
47
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Validate "rows" property
|
|
51
|
-
const rows = def.rows;
|
|
52
|
-
if (typeof rows !== 'function' || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {
|
|
53
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Validate "columns" property
|
|
57
|
-
let columns = def.columns;
|
|
58
|
-
if (!Array.isArray(columns) || !(columns = [...columns]).every(x => typeof x === 'string')) {
|
|
59
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`);
|
|
60
|
-
}
|
|
61
|
-
if (columns.length !== new Set(columns).size) {
|
|
62
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`);
|
|
63
|
-
}
|
|
64
|
-
if (!columns.length) {
|
|
65
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Validate "parameters" property
|
|
69
|
-
let parameters;
|
|
70
|
-
if (hasOwnProperty.call(def, 'parameters')) {
|
|
71
|
-
parameters = def.parameters;
|
|
72
|
-
if (!Array.isArray(parameters) || !(parameters = [...parameters]).every(x => typeof x === 'string')) {
|
|
73
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`);
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
parameters = inferParameters(rows);
|
|
77
|
-
}
|
|
78
|
-
if (parameters.length !== new Set(parameters).size) {
|
|
79
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`);
|
|
80
|
-
}
|
|
81
|
-
if (parameters.length > 32) {
|
|
82
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`);
|
|
83
|
-
}
|
|
84
|
-
for (const parameter of parameters) {
|
|
85
|
-
if (columns.includes(parameter)) {
|
|
86
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Validate "safeIntegers" option
|
|
91
|
-
let safeIntegers = 2;
|
|
92
|
-
if (hasOwnProperty.call(def, 'safeIntegers')) {
|
|
93
|
-
const bool = def.safeIntegers;
|
|
94
|
-
if (typeof bool !== 'boolean') {
|
|
95
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`);
|
|
96
|
-
}
|
|
97
|
-
safeIntegers = +bool;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Validate "directOnly" option
|
|
101
|
-
let directOnly = false;
|
|
102
|
-
if (hasOwnProperty.call(def, 'directOnly')) {
|
|
103
|
-
directOnly = def.directOnly;
|
|
104
|
-
if (typeof directOnly !== 'boolean') {
|
|
105
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Generate SQL for the virtual table definition
|
|
110
|
-
const columnDefinitions = [
|
|
111
|
-
...parameters.map(identifier).map(str => `${str} HIDDEN`),
|
|
112
|
-
...columns.map(identifier),
|
|
113
|
-
];
|
|
114
|
-
return [
|
|
115
|
-
`CREATE TABLE x(${columnDefinitions.join(', ')});`,
|
|
116
|
-
wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),
|
|
117
|
-
parameters,
|
|
118
|
-
safeIntegers,
|
|
119
|
-
directOnly,
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function wrapGenerator(generator, columnMap, moduleName) {
|
|
124
|
-
return function* virtualTable(...args) {
|
|
125
|
-
/*
|
|
126
|
-
We must defensively clone any buffers in the arguments, because
|
|
127
|
-
otherwise the generator could mutate one of them, which would cause
|
|
128
|
-
us to return incorrect values for hidden columns, potentially
|
|
129
|
-
corrupting the database.
|
|
130
|
-
*/
|
|
131
|
-
const output = args.map(x => Buffer.isBuffer(x) ? Buffer.from(x) : x);
|
|
132
|
-
for (let i = 0; i < columnMap.size; ++i) {
|
|
133
|
-
output.push(null); // Fill with nulls to prevent gaps in array (v8 optimization)
|
|
134
|
-
}
|
|
135
|
-
for (const row of generator(...args)) {
|
|
136
|
-
if (Array.isArray(row)) {
|
|
137
|
-
extractRowArray(row, output, columnMap.size, moduleName);
|
|
138
|
-
yield output;
|
|
139
|
-
} else if (typeof row === 'object' && row !== null) {
|
|
140
|
-
extractRowObject(row, output, columnMap, moduleName);
|
|
141
|
-
yield output;
|
|
142
|
-
} else {
|
|
143
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function extractRowArray(row, output, columnCount, moduleName) {
|
|
150
|
-
if (row.length !== columnCount) {
|
|
151
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`);
|
|
152
|
-
}
|
|
153
|
-
const offset = output.length - columnCount;
|
|
154
|
-
for (let i = 0; i < columnCount; ++i) {
|
|
155
|
-
output[i + offset] = row[i];
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function extractRowObject(row, output, columnMap, moduleName) {
|
|
160
|
-
let count = 0;
|
|
161
|
-
for (const key of Object.keys(row)) {
|
|
162
|
-
const index = columnMap.get(key);
|
|
163
|
-
if (index === undefined) {
|
|
164
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`);
|
|
165
|
-
}
|
|
166
|
-
output[index] = row[key];
|
|
167
|
-
count += 1;
|
|
168
|
-
}
|
|
169
|
-
if (count !== columnMap.size) {
|
|
170
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function inferParameters({ length }) {
|
|
175
|
-
if (!Number.isInteger(length) || length < 0) {
|
|
176
|
-
throw new TypeError('Expected function.length to be a positive integer');
|
|
177
|
-
}
|
|
178
|
-
const params = [];
|
|
179
|
-
for (let i = 0; i < length; ++i) {
|
|
180
|
-
params.push(`$${i + 1}`);
|
|
181
|
-
}
|
|
182
|
-
return params;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const { hasOwnProperty } = Object.prototype;
|
|
186
|
-
const { apply } = Function.prototype;
|
|
187
|
-
const GeneratorFunctionPrototype = Object.getPrototypeOf(function*(){});
|
|
188
|
-
const identifier = str => `"${str.replace(/"/g, '""')}"`;
|
|
189
|
-
const defer = x => () => x;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
const controllers = new WeakMap();
|
|
4
|
-
|
|
5
|
-
module.exports = function transaction(fn) {
|
|
6
|
-
if (typeof fn !== 'function') throw new TypeError('Expected first argument to be a function');
|
|
7
|
-
|
|
8
|
-
const db = this[cppdb];
|
|
9
|
-
const controller = getController(db, this);
|
|
10
|
-
const { apply } = Function.prototype;
|
|
11
|
-
|
|
12
|
-
// Each version of the transaction function has these same properties
|
|
13
|
-
const properties = {
|
|
14
|
-
default: { value: wrapTransaction(apply, fn, db, controller.default) },
|
|
15
|
-
deferred: { value: wrapTransaction(apply, fn, db, controller.deferred) },
|
|
16
|
-
immediate: { value: wrapTransaction(apply, fn, db, controller.immediate) },
|
|
17
|
-
exclusive: { value: wrapTransaction(apply, fn, db, controller.exclusive) },
|
|
18
|
-
database: { value: this, enumerable: true },
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
Object.defineProperties(properties.default.value, properties);
|
|
22
|
-
Object.defineProperties(properties.deferred.value, properties);
|
|
23
|
-
Object.defineProperties(properties.immediate.value, properties);
|
|
24
|
-
Object.defineProperties(properties.exclusive.value, properties);
|
|
25
|
-
|
|
26
|
-
// Return the default version of the transaction function
|
|
27
|
-
return properties.default.value;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// Return the database's cached transaction controller, or create a new one
|
|
31
|
-
const getController = (db, self) => {
|
|
32
|
-
let controller = controllers.get(db);
|
|
33
|
-
if (!controller) {
|
|
34
|
-
const shared = {
|
|
35
|
-
commit: db.prepare('COMMIT', self, false),
|
|
36
|
-
rollback: db.prepare('ROLLBACK', self, false),
|
|
37
|
-
savepoint: db.prepare('SAVEPOINT `\t_bs3.\t`', self, false),
|
|
38
|
-
release: db.prepare('RELEASE `\t_bs3.\t`', self, false),
|
|
39
|
-
rollbackTo: db.prepare('ROLLBACK TO `\t_bs3.\t`', self, false),
|
|
40
|
-
};
|
|
41
|
-
controllers.set(db, controller = {
|
|
42
|
-
default: Object.assign({ begin: db.prepare('BEGIN', self, false) }, shared),
|
|
43
|
-
deferred: Object.assign({ begin: db.prepare('BEGIN DEFERRED', self, false) }, shared),
|
|
44
|
-
immediate: Object.assign({ begin: db.prepare('BEGIN IMMEDIATE', self, false) }, shared),
|
|
45
|
-
exclusive: Object.assign({ begin: db.prepare('BEGIN EXCLUSIVE', self, false) }, shared),
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return controller;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Return a new transaction function by wrapping the given function
|
|
52
|
-
const wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, release, rollbackTo }) => function sqliteTransaction() {
|
|
53
|
-
let before, after, undo;
|
|
54
|
-
if (db.inTransaction) {
|
|
55
|
-
before = savepoint;
|
|
56
|
-
after = release;
|
|
57
|
-
undo = rollbackTo;
|
|
58
|
-
} else {
|
|
59
|
-
before = begin;
|
|
60
|
-
after = commit;
|
|
61
|
-
undo = rollback;
|
|
62
|
-
}
|
|
63
|
-
before.run();
|
|
64
|
-
try {
|
|
65
|
-
const result = apply.call(fn, this, arguments);
|
|
66
|
-
if (result && typeof result.then === 'function') {
|
|
67
|
-
throw new TypeError('Transaction function cannot return a promise');
|
|
68
|
-
}
|
|
69
|
-
after.run();
|
|
70
|
-
return result;
|
|
71
|
-
} catch (ex) {
|
|
72
|
-
if (db.inTransaction) {
|
|
73
|
-
undo.run();
|
|
74
|
-
if (undo !== rollback) after.run();
|
|
75
|
-
}
|
|
76
|
-
throw ex;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
exports.prepare = function prepare(sql) {
|
|
5
|
-
return this[cppdb].prepare(sql, this, false);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
exports.exec = function exec(sql) {
|
|
9
|
-
this[cppdb].exec(sql);
|
|
10
|
-
return this;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
exports.close = function close() {
|
|
14
|
-
this[cppdb].close();
|
|
15
|
-
return this;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.loadExtension = function loadExtension(...args) {
|
|
19
|
-
this[cppdb].loadExtension(...args);
|
|
20
|
-
return this;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
exports.defaultSafeIntegers = function defaultSafeIntegers(...args) {
|
|
24
|
-
this[cppdb].defaultSafeIntegers(...args);
|
|
25
|
-
return this;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.unsafeMode = function unsafeMode(...args) {
|
|
29
|
-
this[cppdb].unsafeMode(...args);
|
|
30
|
-
return this;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.getters = {
|
|
34
|
-
name: {
|
|
35
|
-
get: function name() { return this[cppdb].name; },
|
|
36
|
-
enumerable: true,
|
|
37
|
-
},
|
|
38
|
-
open: {
|
|
39
|
-
get: function open() { return this[cppdb].open; },
|
|
40
|
-
enumerable: true,
|
|
41
|
-
},
|
|
42
|
-
inTransaction: {
|
|
43
|
-
get: function inTransaction() { return this[cppdb].inTransaction; },
|
|
44
|
-
enumerable: true,
|
|
45
|
-
},
|
|
46
|
-
readonly: {
|
|
47
|
-
get: function readonly() { return this[cppdb].readonly; },
|
|
48
|
-
enumerable: true,
|
|
49
|
-
},
|
|
50
|
-
memory: {
|
|
51
|
-
get: function memory() { return this[cppdb].memory; },
|
|
52
|
-
enumerable: true,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const descriptor = { value: 'SqliteError', writable: true, enumerable: false, configurable: true };
|
|
3
|
-
|
|
4
|
-
function SqliteError(message, code) {
|
|
5
|
-
if (new.target !== SqliteError) {
|
|
6
|
-
return new SqliteError(message, code);
|
|
7
|
-
}
|
|
8
|
-
if (typeof code !== 'string') {
|
|
9
|
-
throw new TypeError('Expected second argument to be a string');
|
|
10
|
-
}
|
|
11
|
-
Error.call(this, message);
|
|
12
|
-
descriptor.value = '' + message;
|
|
13
|
-
Object.defineProperty(this, 'message', descriptor);
|
|
14
|
-
Error.captureStackTrace(this, SqliteError);
|
|
15
|
-
this.code = code;
|
|
16
|
-
}
|
|
17
|
-
Object.setPrototypeOf(SqliteError, Error);
|
|
18
|
-
Object.setPrototypeOf(SqliteError.prototype, Error.prototype);
|
|
19
|
-
Object.defineProperty(SqliteError.prototype, 'name', descriptor);
|
|
20
|
-
module.exports = SqliteError;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.getBooleanOption = (options, key) => {
|
|
4
|
-
let value = false;
|
|
5
|
-
if (key in options && typeof (value = options[key]) !== 'boolean') {
|
|
6
|
-
throw new TypeError(`Expected the "${key}" option to be a boolean`);
|
|
7
|
-
}
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
exports.cppdb = Symbol();
|
|
12
|
-
exports.inspect = Symbol.for('nodejs.util.inspect.custom');
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "better-sqlite3",
|
|
3
|
-
"version": "12.8.0",
|
|
4
|
-
"description": "The fastest and simplest library for SQLite in Node.js.",
|
|
5
|
-
"homepage": "http://github.com/WiseLibs/better-sqlite3",
|
|
6
|
-
"author": "Joshua Wise <joshuathomaswise@gmail.com>",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git://github.com/WiseLibs/better-sqlite3.git"
|
|
10
|
-
},
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"files": [
|
|
13
|
-
"binding.gyp",
|
|
14
|
-
"src/**/*.[ch]pp",
|
|
15
|
-
"lib/**",
|
|
16
|
-
"deps/**"
|
|
17
|
-
],
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": "20.x || 22.x || 23.x || 24.x || 25.x"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"bindings": "^1.5.0",
|
|
23
|
-
"prebuild-install": "^7.1.1"
|
|
24
|
-
},
|
|
25
|
-
"overrides": {
|
|
26
|
-
"prebuild": {
|
|
27
|
-
"node-abi": "^4.25.0"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"chai": "^4.3.8",
|
|
32
|
-
"cli-color": "^2.0.3",
|
|
33
|
-
"fs-extra": "^11.1.1",
|
|
34
|
-
"mocha": "^10.2.0",
|
|
35
|
-
"nodemark": "^0.3.0",
|
|
36
|
-
"prebuild": "^13.0.1",
|
|
37
|
-
"sqlite": "^5.0.1",
|
|
38
|
-
"sqlite3": "^5.1.6"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"install": "prebuild-install || node-gyp rebuild --release",
|
|
42
|
-
"build-release": "node-gyp rebuild --release",
|
|
43
|
-
"build-debug": "node-gyp rebuild --debug",
|
|
44
|
-
"test": "mocha --exit --slow=75 --timeout=5000",
|
|
45
|
-
"benchmark": "node benchmark",
|
|
46
|
-
"download": "bash ./deps/download.sh"
|
|
47
|
-
},
|
|
48
|
-
"license": "MIT",
|
|
49
|
-
"keywords": [
|
|
50
|
-
"sql",
|
|
51
|
-
"sqlite",
|
|
52
|
-
"sqlite3",
|
|
53
|
-
"transactions",
|
|
54
|
-
"user-defined functions",
|
|
55
|
-
"aggregate functions",
|
|
56
|
-
"window functions",
|
|
57
|
-
"database"
|
|
58
|
-
]
|
|
59
|
-
}
|
package/hooks/postinstall.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Postinstall hook for 9router CLI
|
|
5
|
-
*
|
|
6
|
-
* The standalone Next.js build ships a pre-compiled better-sqlite3 binary
|
|
7
|
-
* (built on the publisher's machine). When installed on a different platform,
|
|
8
|
-
* the binary is invalid. This hook detects the mismatch and forces a
|
|
9
|
-
* fresh install of better-sqlite3 from npm registry.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
const { execSync } = require("child_process");
|
|
13
|
-
const fs = require("fs");
|
|
14
|
-
const path = require("path");
|
|
15
|
-
|
|
16
|
-
const appDir = path.join(__dirname, "..", "app");
|
|
17
|
-
const nodeModulesDir = path.join(appDir, "node_modules");
|
|
18
|
-
const betterSqlitePath = path.join(nodeModulesDir, "better-sqlite3");
|
|
19
|
-
|
|
20
|
-
console.log("[postinstall] Checking better-sqlite3 native binary...");
|
|
21
|
-
console.log("[postinstall] Platform:", process.platform, process.arch);
|
|
22
|
-
console.log("[postinstall] App dir:", appDir);
|
|
23
|
-
|
|
24
|
-
// Check if better-sqlite3 exists and binary is valid
|
|
25
|
-
if (fs.existsSync(betterSqlitePath) && isValidBinary()) {
|
|
26
|
-
console.log("[postinstall] better-sqlite3 binary is valid ✓");
|
|
27
|
-
process.exit(0);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Need to install/reinstall
|
|
31
|
-
console.log("[postinstall] Binary invalid or missing, reinstalling better-sqlite3...");
|
|
32
|
-
|
|
33
|
-
// Get version from existing package or fallback
|
|
34
|
-
let version = "^12.6.2";
|
|
35
|
-
try {
|
|
36
|
-
const pkg = JSON.parse(
|
|
37
|
-
fs.readFileSync(path.join(betterSqlitePath, "package.json"), "utf-8")
|
|
38
|
-
);
|
|
39
|
-
version = pkg.version;
|
|
40
|
-
} catch {}
|
|
41
|
-
|
|
42
|
-
// Strategy: remove old, install fresh in app/node_modules
|
|
43
|
-
try {
|
|
44
|
-
// 1. Remove broken copy
|
|
45
|
-
if (fs.existsSync(betterSqlitePath)) {
|
|
46
|
-
console.log("[postinstall] Removing old better-sqlite3...");
|
|
47
|
-
fs.rmSync(betterSqlitePath, { recursive: true, force: true });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// 2. Install fresh - use --prefix to ensure it installs in app dir
|
|
51
|
-
console.log(`[postinstall] Installing better-sqlite3@${version}...`);
|
|
52
|
-
|
|
53
|
-
// Ensure node_modules exists
|
|
54
|
-
if (!fs.existsSync(nodeModulesDir)) {
|
|
55
|
-
fs.mkdirSync(nodeModulesDir, { recursive: true });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Use --prefix to target app directory explicitly
|
|
59
|
-
execSync(
|
|
60
|
-
`npm install better-sqlite3@${version} --prefix "${appDir}" --no-save --no-package-lock`,
|
|
61
|
-
{
|
|
62
|
-
stdio: "inherit",
|
|
63
|
-
timeout: 180000,
|
|
64
|
-
env: { ...process.env, npm_config_loglevel: "warn" },
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
// 3. Verify
|
|
69
|
-
if (isValidBinary()) {
|
|
70
|
-
console.log("[postinstall] better-sqlite3 installed successfully ✓");
|
|
71
|
-
} else {
|
|
72
|
-
console.warn("[postinstall] ⚠ Binary still invalid after install");
|
|
73
|
-
printBuildToolsHelp();
|
|
74
|
-
}
|
|
75
|
-
} catch (error) {
|
|
76
|
-
console.warn("[postinstall] ⚠ Failed to install better-sqlite3:", error.message);
|
|
77
|
-
printBuildToolsHelp();
|
|
78
|
-
// Don't fail the entire install
|
|
79
|
-
process.exit(0);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
83
|
-
|
|
84
|
-
function isValidBinary() {
|
|
85
|
-
const binaryPath = path.join(
|
|
86
|
-
betterSqlitePath, "build", "Release", "better_sqlite3.node"
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
if (!fs.existsSync(binaryPath)) {
|
|
90
|
-
console.log("[postinstall] Binary not found at:", binaryPath);
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
try {
|
|
95
|
-
const fd = fs.openSync(binaryPath, "r");
|
|
96
|
-
const buffer = Buffer.alloc(4);
|
|
97
|
-
fs.readSync(fd, buffer, 0, 4, 0);
|
|
98
|
-
fs.closeSync(fd);
|
|
99
|
-
|
|
100
|
-
const magic = buffer.toString("hex");
|
|
101
|
-
const platform = process.platform;
|
|
102
|
-
|
|
103
|
-
const valid =
|
|
104
|
-
(platform === "linux" && magic.startsWith("7f454c46")) ||
|
|
105
|
-
(platform === "darwin" && (magic.startsWith("cffaedfe") || magic.startsWith("cefaedfe"))) ||
|
|
106
|
-
(platform === "win32" && magic.startsWith("4d5a"));
|
|
107
|
-
|
|
108
|
-
if (!valid) {
|
|
109
|
-
console.log(`[postinstall] Binary format mismatch: got ${magic}, platform=${platform}`);
|
|
110
|
-
}
|
|
111
|
-
return valid;
|
|
112
|
-
} catch (err) {
|
|
113
|
-
console.log("[postinstall] Cannot read binary:", err.message);
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function printBuildToolsHelp() {
|
|
119
|
-
console.warn("[postinstall] Ensure build tools are installed:");
|
|
120
|
-
console.warn("[postinstall] Ubuntu/Debian: apt install -y python3 make gcc g++");
|
|
121
|
-
console.warn("[postinstall] CentOS/RHEL: yum install -y python3 make gcc gcc-c++");
|
|
122
|
-
console.warn("[postinstall] macOS: xcode-select --install");
|
|
123
|
-
console.warn("[postinstall] Then run manually:");
|
|
124
|
-
console.warn(`[postinstall] cd ${appDir} && rm -rf node_modules/better-sqlite3 && npm install better-sqlite3@${version || "latest"} --no-save`);
|
|
125
|
-
}
|
|
File without changes
|