orcaq 1.0.20
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/.output/nitro.json +15 -0
- package/.output/public/_nuxt/8qASMGdV.js +1 -0
- package/.output/public/_nuxt/9lJACZIQ.js +19 -0
- package/.output/public/_nuxt/B2DnNiWd.js +1 -0
- package/.output/public/_nuxt/B6E6ObS_.js +8 -0
- package/.output/public/_nuxt/BH83_dXo.js +39 -0
- package/.output/public/_nuxt/BIKqrFbQ.js +1 -0
- package/.output/public/_nuxt/BNjPC06x.js +1 -0
- package/.output/public/_nuxt/BPQ-Pz1w.js +39 -0
- package/.output/public/_nuxt/BRpgKkVT.js +51 -0
- package/.output/public/_nuxt/BTCLPbPY.js +4 -0
- package/.output/public/_nuxt/BUV-RarV.js +1 -0
- package/.output/public/_nuxt/Bh6RgYlO.js +1 -0
- package/.output/public/_nuxt/Bq3cyzOD.js +1 -0
- package/.output/public/_nuxt/Bt9sU68B.js +9 -0
- package/.output/public/_nuxt/BwpH2ZxJ.js +1 -0
- package/.output/public/_nuxt/C25Tmn1m.js +1 -0
- package/.output/public/_nuxt/C2HlI1ss.js +1 -0
- package/.output/public/_nuxt/CU3ZV9iV.js +1 -0
- package/.output/public/_nuxt/CbcyysXi.js +1 -0
- package/.output/public/_nuxt/CepyvMhE.js +1 -0
- package/.output/public/_nuxt/CrgoNCm2.js +2 -0
- package/.output/public/_nuxt/CuBKbBH_.js +1 -0
- package/.output/public/_nuxt/CulD8qYQ.js +193 -0
- package/.output/public/_nuxt/CustomEdge.BNBpjEHb.css +1 -0
- package/.output/public/_nuxt/CylkLpwm.js +1 -0
- package/.output/public/_nuxt/D-bWLYHw.js +1 -0
- package/.output/public/_nuxt/D-zecHND.js +1 -0
- package/.output/public/_nuxt/D8vj6kFe.js +160 -0
- package/.output/public/_nuxt/DIETYtCL.js +1 -0
- package/.output/public/_nuxt/DJ4vUzxS.js +1 -0
- package/.output/public/_nuxt/DK-itzXx.js +8 -0
- package/.output/public/_nuxt/DL3T5jYo.js +3867 -0
- package/.output/public/_nuxt/DUsuhY9i.js +1 -0
- package/.output/public/_nuxt/DXV2HFBA.js +224 -0
- package/.output/public/_nuxt/Dh2zppOR.js +1 -0
- package/.output/public/_nuxt/DlAUqK2U.js +1 -0
- package/.output/public/_nuxt/DlmSeCnw.js +5 -0
- package/.output/public/_nuxt/DswTpYG4.js +1 -0
- package/.output/public/_nuxt/DynamicTable.DJeANwbG.css +1 -0
- package/.output/public/_nuxt/G830WtVn.js +1 -0
- package/.output/public/_nuxt/ICwM1E4-.js +15 -0
- package/.output/public/_nuxt/QZbJy9YW.js +31 -0
- package/.output/public/_nuxt/QuickQueryTable.DS_ON57S.css +1 -0
- package/.output/public/_nuxt/UXhX8z2W.js +1 -0
- package/.output/public/_nuxt/WrapperErdDiagram.DwhUd9Wr.css +1 -0
- package/.output/public/_nuxt/_fileId_.DmPfwyyD.css +1 -0
- package/.output/public/_nuxt/_tabViewId_.9Axt3zoi.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/6364d5cf-4642-479f-ba12-6440c56702af.json +1 -0
- package/.output/public/_nuxt/default.DixIpIal.css +1 -0
- package/.output/public/_nuxt/entry.GqPNPe1e.css +1 -0
- package/.output/public/_nuxt/index.CrXmf4gr.css +1 -0
- package/.output/public/_nuxt/ivUnXl9B.js +1 -0
- package/.output/public/_nuxt/pAheHeBV.js +36 -0
- package/.output/public/_nuxt/s5fCn4j5.js +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/logo.png +0 -0
- package/.output/public/manifest.json +25 -0
- package/.output/public/robots.txt +1 -0
- package/.output/public/vite.svg +1 -0
- package/.output/server/chunks/_/error-500.mjs +8 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +773 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +6432 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs +77 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs +100 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs +105 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute.mjs +47 -0
- package/.output/server/chunks/routes/api/execute.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs +28 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs +180 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs +41 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs +53 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs +112 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs +152 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs +49 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs +111 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-tables.mjs +287 -0
- package/.output/server/chunks/routes/api/get-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs +46 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs.map +1 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +28 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs +48 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +316 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +14 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/dist/index.mjs +4374 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/gateway/dist/index.mjs +1082 -0
- package/.output/server/node_modules/@ai-sdk/gateway/package.json +69 -0
- package/.output/server/node_modules/@ai-sdk/google/dist/index.mjs +2007 -0
- package/.output/server/node_modules/@ai-sdk/google/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai/dist/index.mjs +5956 -0
- package/.output/server/node_modules/@ai-sdk/openai/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/dist/index.mjs +1551 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
- package/.output/server/node_modules/@ai-sdk/provider/package.json +57 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/package.json +75 -0
- package/.output/server/node_modules/@ai-sdk/xai/dist/index.mjs +2214 -0
- package/.output/server/node_modules/@ai-sdk/xai/package.json +68 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14246 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.mjs +350 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.mjs +188 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.mjs +90 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.mjs +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.mjs +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.mjs +168 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.mjs +14 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.mjs +33 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.mjs +84 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.mjs +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.mjs +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.mjs +231 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.mjs +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.mjs +164 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.mjs +216 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.mjs +113 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.mjs +104 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.mjs +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.mjs +75 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.mjs +45 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.mjs +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.mjs +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.mjs +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.mjs +182 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.mjs +46 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.mjs +66 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.mjs +62 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.mjs +161 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.mjs +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.mjs +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.mjs +59 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.mjs +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.mjs +92 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.mjs +17 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.mjs +119 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.mjs +9 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.mjs +19 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.mjs +83 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.mjs +70 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.mjs +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.mjs +11 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.mjs +8 -0
- package/.output/server/node_modules/@iconify/utils/package.json +447 -0
- package/.output/server/node_modules/@ioredis/commands/built/commands.json +2447 -0
- package/.output/server/node_modules/@ioredis/commands/built/index.js +208 -0
- package/.output/server/node_modules/@ioredis/commands/package.json +52 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/context.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/diag.js +93 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/metrics.js +61 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/propagation.js +89 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/trace.js +79 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +63 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/utils.js +51 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +38 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/context.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +59 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +57 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +45 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/types.js +44 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag-api.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/index.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +64 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/semver.js +122 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +25 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +127 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +31 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +22 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +34 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +41 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +69 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +75 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +32 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +54 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +42 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +82 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +103 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +27 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +49 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/status.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +26 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/version.js +21 -0
- package/.output/server/node_modules/@opentelemetry/api/package.json +113 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Formatter.js +234 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Indentation.js +42 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/InlineBlock.js +60 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Params.js +21 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Tokenizer.js +272 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/escapeRegExp.js +10 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/last.js +7 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/types.js +22 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/Db2Formatter.js +585 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/N1qlFormatter.js +257 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/PlSqlFormatter.js +459 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/StandardSqlFormatter.js +369 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/utils/abstract.js +23 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/sqlFormatter.js +34 -0
- package/.output/server/node_modules/@sqltools/formatter/package.json +59 -0
- package/.output/server/node_modules/@standard-schema/spec/dist/index.js +0 -0
- package/.output/server/node_modules/@standard-schema/spec/package.json +52 -0
- package/.output/server/node_modules/@vercel/oidc/dist/auth-config.js +84 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-context.js +34 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js +80 -0
- package/.output/server/node_modules/@vercel/oidc/dist/index.js +33 -0
- package/.output/server/node_modules/@vercel/oidc/dist/oauth.js +88 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-error.js +40 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-io.js +78 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-util.js +198 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token.js +53 -0
- package/.output/server/node_modules/@vercel/oidc/package.json +52 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/ai/dist/index.mjs +12363 -0
- package/.output/server/node_modules/ai/package.json +106 -0
- package/.output/server/node_modules/ansis/index.js +1 -0
- package/.output/server/node_modules/ansis/package.json +28 -0
- package/.output/server/node_modules/app-root-path/index.js +4 -0
- package/.output/server/node_modules/app-root-path/lib/app-root-path.js +30 -0
- package/.output/server/node_modules/app-root-path/lib/resolve.js +128 -0
- package/.output/server/node_modules/app-root-path/package.json +66 -0
- package/.output/server/node_modules/balanced-match/index.js +62 -0
- package/.output/server/node_modules/balanced-match/package.json +48 -0
- package/.output/server/node_modules/bindings/bindings.js +221 -0
- package/.output/server/node_modules/bindings/package.json +28 -0
- package/.output/server/node_modules/brace-expansion/index.js +203 -0
- package/.output/server/node_modules/brace-expansion/package.json +46 -0
- package/.output/server/node_modules/cluster-key-slot/lib/index.js +166 -0
- package/.output/server/node_modules/cluster-key-slot/package.json +56 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/dayjs/dayjs.min.js +1 -0
- package/.output/server/node_modules/dayjs/package.json +84 -0
- package/.output/server/node_modules/debug/package.json +65 -0
- package/.output/server/node_modules/debug/src/browser.js +272 -0
- package/.output/server/node_modules/debug/src/common.js +292 -0
- package/.output/server/node_modules/debug/src/index.js +10 -0
- package/.output/server/node_modules/debug/src/node.js +263 -0
- package/.output/server/node_modules/dedent/dist/dedent.js +73 -0
- package/.output/server/node_modules/dedent/package.json +119 -0
- package/.output/server/node_modules/denque/index.js +481 -0
- package/.output/server/node_modules/denque/package.json +58 -0
- package/.output/server/node_modules/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +34 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +160 -0
- package/.output/server/node_modules/devalue/src/stringify.js +232 -0
- package/.output/server/node_modules/devalue/src/uneval.js +351 -0
- package/.output/server/node_modules/devalue/src/utils.js +113 -0
- package/.output/server/node_modules/dotenv/lib/main.js +361 -0
- package/.output/server/node_modules/dotenv/package.json +61 -0
- package/.output/server/node_modules/entities/lib/decode.js +536 -0
- package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/entities/package.json +90 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/eventsource-parser/dist/index.js +106 -0
- package/.output/server/node_modules/eventsource-parser/dist/stream.js +29 -0
- package/.output/server/node_modules/eventsource-parser/package.json +115 -0
- package/.output/server/node_modules/file-uri-to-path/index.js +66 -0
- package/.output/server/node_modules/file-uri-to-path/package.json +32 -0
- package/.output/server/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/.output/server/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/.output/server/node_modules/glob/dist/commonjs/index.js +68 -0
- package/.output/server/node_modules/glob/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/.output/server/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/.output/server/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/.output/server/node_modules/glob/package.json +99 -0
- package/.output/server/node_modules/has-flag/index.js +8 -0
- package/.output/server/node_modules/has-flag/package.json +46 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/inherits/inherits.js +9 -0
- package/.output/server/node_modules/inherits/inherits_browser.js +27 -0
- package/.output/server/node_modules/inherits/package.json +29 -0
- package/.output/server/node_modules/ioredis/built/Command.js +349 -0
- package/.output/server/node_modules/ioredis/built/DataHandler.js +220 -0
- package/.output/server/node_modules/ioredis/built/Pipeline.js +334 -0
- package/.output/server/node_modules/ioredis/built/Redis.js +697 -0
- package/.output/server/node_modules/ioredis/built/ScanStream.js +51 -0
- package/.output/server/node_modules/ioredis/built/Script.js +62 -0
- package/.output/server/node_modules/ioredis/built/SubscriptionSet.js +41 -0
- package/.output/server/node_modules/ioredis/built/autoPipelining.js +159 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterOptions.js +22 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriber.js +202 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +224 -0
- package/.output/server/node_modules/ioredis/built/cluster/ConnectionPool.js +154 -0
- package/.output/server/node_modules/ioredis/built/cluster/DelayQueue.js +53 -0
- package/.output/server/node_modules/ioredis/built/cluster/index.js +862 -0
- package/.output/server/node_modules/ioredis/built/cluster/util.js +100 -0
- package/.output/server/node_modules/ioredis/built/connectors/AbstractConnector.js +26 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +45 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +37 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/index.js +305 -0
- package/.output/server/node_modules/ioredis/built/connectors/StandaloneConnector.js +69 -0
- package/.output/server/node_modules/ioredis/built/connectors/index.js +7 -0
- package/.output/server/node_modules/ioredis/built/constants/TLSProfiles.js +149 -0
- package/.output/server/node_modules/ioredis/built/errors/ClusterAllFailedError.js +15 -0
- package/.output/server/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +14 -0
- package/.output/server/node_modules/ioredis/built/errors/index.js +5 -0
- package/.output/server/node_modules/ioredis/built/index.js +62 -0
- package/.output/server/node_modules/ioredis/built/redis/RedisOptions.js +55 -0
- package/.output/server/node_modules/ioredis/built/redis/event_handler.js +292 -0
- package/.output/server/node_modules/ioredis/built/transaction.js +93 -0
- package/.output/server/node_modules/ioredis/built/utils/Commander.js +117 -0
- package/.output/server/node_modules/ioredis/built/utils/applyMixin.js +8 -0
- package/.output/server/node_modules/ioredis/built/utils/debug.js +95 -0
- package/.output/server/node_modules/ioredis/built/utils/index.js +297 -0
- package/.output/server/node_modules/ioredis/built/utils/lodash.js +9 -0
- package/.output/server/node_modules/ioredis/package.json +100 -0
- package/.output/server/node_modules/lodash.defaults/index.js +668 -0
- package/.output/server/node_modules/lodash.defaults/package.json +19 -0
- package/.output/server/node_modules/lodash.isarguments/index.js +229 -0
- package/.output/server/node_modules/lodash.isarguments/package.json +19 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/lru-cache/package.json +116 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/.output/server/node_modules/minimatch/package.json +82 -0
- package/.output/server/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/.output/server/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minipass/package.json +82 -0
- package/.output/server/node_modules/ms/index.js +162 -0
- package/.output/server/node_modules/ms/package.json +38 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/path-scurry/package.json +89 -0
- package/.output/server/node_modules/pg/lib/client.js +650 -0
- package/.output/server/node_modules/pg/lib/connection-parameters.js +167 -0
- package/.output/server/node_modules/pg/lib/connection.js +222 -0
- package/.output/server/node_modules/pg/lib/crypto/cert-signatures.js +121 -0
- package/.output/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-webcrypto.js +88 -0
- package/.output/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/.output/server/node_modules/pg/lib/defaults.js +84 -0
- package/.output/server/node_modules/pg/lib/index.js +58 -0
- package/.output/server/node_modules/pg/lib/native/client.js +307 -0
- package/.output/server/node_modules/pg/lib/native/index.js +2 -0
- package/.output/server/node_modules/pg/lib/native/query.js +168 -0
- package/.output/server/node_modules/pg/lib/query.js +253 -0
- package/.output/server/node_modules/pg/lib/result.js +108 -0
- package/.output/server/node_modules/pg/lib/stream.js +81 -0
- package/.output/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/.output/server/node_modules/pg/lib/utils.js +206 -0
- package/.output/server/node_modules/pg/package.json +62 -0
- package/.output/server/node_modules/pg-cloudflare/dist/empty.js +4 -0
- package/.output/server/node_modules/pg-cloudflare/package.json +32 -0
- package/.output/server/node_modules/pg-connection-string/index.js +112 -0
- package/.output/server/node_modules/pg-connection-string/package.json +40 -0
- package/.output/server/node_modules/pg-cursor/index.js +265 -0
- package/.output/server/node_modules/pg-cursor/package.json +38 -0
- package/.output/server/node_modules/pg-int8/index.js +100 -0
- package/.output/server/node_modules/pg-int8/package.json +24 -0
- package/.output/server/node_modules/pg-pool/index.js +471 -0
- package/.output/server/node_modules/pg-pool/package.json +41 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/.output/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/.output/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/.output/server/node_modules/pg-protocol/dist/parser.js +304 -0
- package/.output/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/.output/server/node_modules/pg-protocol/package.json +35 -0
- package/.output/server/node_modules/pg-query-stream/dist/index.js +48 -0
- package/.output/server/node_modules/pg-query-stream/package.json +60 -0
- package/.output/server/node_modules/pg-types/index.js +47 -0
- package/.output/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/.output/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/.output/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/.output/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/.output/server/node_modules/pg-types/package.json +42 -0
- package/.output/server/node_modules/pgpass/lib/helper.js +233 -0
- package/.output/server/node_modules/pgpass/lib/index.js +23 -0
- package/.output/server/node_modules/pgpass/package.json +41 -0
- package/.output/server/node_modules/postgres-array/index.js +97 -0
- package/.output/server/node_modules/postgres-array/package.json +35 -0
- package/.output/server/node_modules/postgres-bytea/index.js +31 -0
- package/.output/server/node_modules/postgres-bytea/package.json +34 -0
- package/.output/server/node_modules/postgres-date/index.js +116 -0
- package/.output/server/node_modules/postgres-date/package.json +33 -0
- package/.output/server/node_modules/postgres-interval/index.js +125 -0
- package/.output/server/node_modules/postgres-interval/package.json +36 -0
- package/.output/server/node_modules/redis-errors/index.js +7 -0
- package/.output/server/node_modules/redis-errors/lib/modern.js +59 -0
- package/.output/server/node_modules/redis-errors/lib/old.js +119 -0
- package/.output/server/node_modules/redis-errors/package.json +41 -0
- package/.output/server/node_modules/redis-parser/index.js +3 -0
- package/.output/server/node_modules/redis-parser/lib/parser.js +552 -0
- package/.output/server/node_modules/redis-parser/package.json +53 -0
- package/.output/server/node_modules/reflect-metadata/Reflect.js +1415 -0
- package/.output/server/node_modules/reflect-metadata/package.json +68 -0
- package/.output/server/node_modules/safe-buffer/index.js +65 -0
- package/.output/server/node_modules/safe-buffer/package.json +51 -0
- package/.output/server/node_modules/sha.js/hash.js +81 -0
- package/.output/server/node_modules/sha.js/index.js +15 -0
- package/.output/server/node_modules/sha.js/package.json +30 -0
- package/.output/server/node_modules/sha.js/sha.js +94 -0
- package/.output/server/node_modules/sha.js/sha1.js +99 -0
- package/.output/server/node_modules/sha.js/sha224.js +53 -0
- package/.output/server/node_modules/sha.js/sha256.js +135 -0
- package/.output/server/node_modules/sha.js/sha384.js +57 -0
- package/.output/server/node_modules/sha.js/sha512.js +260 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/split2/index.js +141 -0
- package/.output/server/node_modules/split2/package.json +39 -0
- package/.output/server/node_modules/sql-highlight/lib/escapeHtml.js +59 -0
- package/.output/server/node_modules/sql-highlight/lib/index.js +85 -0
- package/.output/server/node_modules/sql-highlight/lib/keywords.js +145 -0
- package/.output/server/node_modules/sql-highlight/package.json +49 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node.bak +0 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3-binding.js +1 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3.js +207 -0
- package/.output/server/node_modules/sqlite3/lib/trace.js +38 -0
- package/.output/server/node_modules/sqlite3/package.json +89 -0
- package/.output/server/node_modules/standard-as-callback/built/index.js +41 -0
- package/.output/server/node_modules/standard-as-callback/built/utils.js +23 -0
- package/.output/server/node_modules/standard-as-callback/package.json +40 -0
- package/.output/server/node_modules/supports-color/index.js +152 -0
- package/.output/server/node_modules/supports-color/package.json +58 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/node_modules/typeorm/cache/DbQueryResultCache.js +264 -0
- package/.output/server/node_modules/typeorm/cache/QueryResultCacheFactory.js +42 -0
- package/.output/server/node_modules/typeorm/cache/RedisQueryResultCache.js +197 -0
- package/.output/server/node_modules/typeorm/common/DeepPartial.js +4 -0
- package/.output/server/node_modules/typeorm/common/EntityTarget.js +4 -0
- package/.output/server/node_modules/typeorm/common/MixedList.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectLiteral.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectType.js +4 -0
- package/.output/server/node_modules/typeorm/common/RelationType.js +4 -0
- package/.output/server/node_modules/typeorm/connection/Connection.js +16 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionManager.js +66 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionMetadataBuilder.js +74 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionOptionsReader.js +198 -0
- package/.output/server/node_modules/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +111 -0
- package/.output/server/node_modules/typeorm/container.js +60 -0
- package/.output/server/node_modules/typeorm/data-source/DataSource.js +517 -0
- package/.output/server/node_modules/typeorm/decorator/Check.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/EntityRepository.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/Exclusion.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/ForeignKey.js +44 -0
- package/.output/server/node_modules/typeorm/decorator/Generated.js +24 -0
- package/.output/server/node_modules/typeorm/decorator/Index.js +56 -0
- package/.output/server/node_modules/typeorm/decorator/Unique.js +50 -0
- package/.output/server/node_modules/typeorm/decorator/columns/Column.js +78 -0
- package/.output/server/node_modules/typeorm/decorator/columns/CreateDateColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/DeleteDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ObjectIdColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryColumn.js +63 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryGeneratedColumn.js +59 -0
- package/.output/server/node_modules/typeorm/decorator/columns/UpdateDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VersionColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ViewColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VirtualColumn.js +49 -0
- package/.output/server/node_modules/typeorm/decorator/entity/ChildEntity.js +25 -0
- package/.output/server/node_modules/typeorm/decorator/entity/Entity.js +31 -0
- package/.output/server/node_modules/typeorm/decorator/entity/TableInheritance.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/entity-view/ViewEntity.js +32 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterLoad.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/EventSubscriber.js +17 -0
- package/.output/server/node_modules/typeorm/decorator/options/ColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/EntityOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/IndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinTableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/RelationOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/ValueTransformer.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinTable.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToMany.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToOne.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToMany.js +37 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToOne.js +45 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationCount.js +23 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationId.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/tree/Tree.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeChildren.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeLevelColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeParent.js +33 -0
- package/.output/server/node_modules/typeorm/driver/DriverFactory.js +98 -0
- package/.output/server/node_modules/typeorm/driver/DriverUtils.js +228 -0
- package/.output/server/node_modules/typeorm/driver/Query.js +16 -0
- package/.output/server/node_modules/typeorm/driver/SqlInMemory.js +15 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +847 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1709 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +103 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +146 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +153 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +126 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorDriver.js +78 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorQueryRunner.js +98 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachDriver.js +885 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachQueryRunner.js +2453 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaDriver.js +76 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaQueryRunner.js +170 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriver.js +29 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriverFactory.js +22 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoQueryRunner.js +65 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyDriver.js +75 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyQueryRunner.js +169 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoDriver.js +404 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoQueryRunner.js +701 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/bson.typings.js +5 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/typings.js +23 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlDriver.js +1105 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js +2139 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptDriver.js +94 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptQueryRunner.js +92 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleDriver.js +869 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleQueryRunner.js +1884 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresDriver.js +1259 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js +2729 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeDriver.js +728 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeQueryRunner.js +107 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapDriver.js +681 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapQueryRunner.js +2054 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerDriver.js +613 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerQueryRunner.js +1464 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteDriver.js +174 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js +124 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +695 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1511 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsDriver.js +250 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsQueryRunner.js +123 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/MssqlParameter.js +23 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js +922 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerQueryRunner.js +2484 -0
- package/.output/server/node_modules/typeorm/driver/types/DatabaseType.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/GeoJsonTypes.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/MetadataTableType.js +11 -0
- package/.output/server/node_modules/typeorm/driver/types/ReplicationMode.js +4 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManager.js +853 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManagerFactory.js +24 -0
- package/.output/server/node_modules/typeorm/entity-manager/MongoEntityManager.js +668 -0
- package/.output/server/node_modules/typeorm/entity-manager/SqljsEntityManager.js +44 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchema.js +15 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +8 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedError.js +18 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaOptions.js +11 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaTransformer.js +333 -0
- package/.output/server/node_modules/typeorm/error/AlreadyHasActiveConnectionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotAttachTreeChildrenEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotConnectAlreadyConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotCreateEntityIdMapError.js +21 -0
- package/.output/server/node_modules/typeorm/error/CannotDetermineEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotExecuteNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotGetEntityManagerNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotReflectMethodParameterTypeError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CircularRelationsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/ColumnTypeUndefinedError.js +19 -0
- package/.output/server/node_modules/typeorm/error/ConnectionIsNotSetError.js +15 -0
- package/.output/server/node_modules/typeorm/error/ConnectionNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryNotFoundError.js +18 -0
- package/.output/server/node_modules/typeorm/error/DataTypeNotSupportedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/DriverOptionNotSetError.js +16 -0
- package/.output/server/node_modules/typeorm/error/DriverPackageNotInstalledError.js +16 -0
- package/.output/server/node_modules/typeorm/error/EntityMetadataNotFoundError.js +29 -0
- package/.output/server/node_modules/typeorm/error/EntityNotFoundError.js +42 -0
- package/.output/server/node_modules/typeorm/error/EntityPropertyNotFoundError.js +17 -0
- package/.output/server/node_modules/typeorm/error/FindRelationsNotFoundError.js +23 -0
- package/.output/server/node_modules/typeorm/error/ForbiddenTransactionModeOverrideError.js +16 -0
- package/.output/server/node_modules/typeorm/error/InitializedRelationError.js +20 -0
- package/.output/server/node_modules/typeorm/error/InsertValuesMissingError.js +16 -0
- package/.output/server/node_modules/typeorm/error/LimitOnUpdateNotSupportedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/LockNotSupportedOnGivenDriverError.js +15 -0
- package/.output/server/node_modules/typeorm/error/MetadataAlreadyExistsError.js +18 -0
- package/.output/server/node_modules/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingDeleteDateColumnError.js +12 -0
- package/.output/server/node_modules/typeorm/error/MissingDriverError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinColumnError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinTableError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingPrimaryColumnError.js +13 -0
- package/.output/server/node_modules/typeorm/error/MustBeEntityError.js +15 -0
- package/.output/server/node_modules/typeorm/error/NestedSetMultipleRootError.js +12 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionForRepositoryError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionOptionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoNeedToReleaseEntityManagerError.js +17 -0
- package/.output/server/node_modules/typeorm/error/NoVersionOrUpdateDateColumnError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OffsetWithoutLimitNotSupportedError.js +17 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockCanNotBeUsedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockVersionMismatchError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PersistedEntityNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PessimisticLockTransactionRequiredError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PrimaryColumnCannotBeNullableError.js +13 -0
- package/.output/server/node_modules/typeorm/error/QueryFailedError.js +30 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerAlreadyReleasedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/RepositoryNotTreeError.js +32 -0
- package/.output/server/node_modules/typeorm/error/ReturningStatementNotSupportedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectRemovedAndUpdatedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectWithoutIdentifierError.js +17 -0
- package/.output/server/node_modules/typeorm/error/TransactionAlreadyStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TransactionNotStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TreeRepositoryNotSupportedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/TypeORMError.js +23 -0
- package/.output/server/node_modules/typeorm/error/UpdateValuesMissingError.js +12 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnIsNotAllowedError.js +13 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableIsNotAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/index.js +66 -0
- package/.output/server/node_modules/typeorm/find-options/EqualOperator.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/FindManyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOneOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperator.js +96 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperatorType.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsOrder.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsRelations.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsSelect.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsUtils.js +350 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsWhere.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindTreeOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/JoinOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/OrderByCondition.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/operator/And.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Any.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContainedBy.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayOverlap.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Between.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Equal.js +17 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ILike.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/In.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/IsNull.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/JsonContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Like.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Not.js +14 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Or.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Raw.js +12 -0
- package/.output/server/node_modules/typeorm/globals.js +182 -0
- package/.output/server/node_modules/typeorm/index.js +196 -0
- package/.output/server/node_modules/typeorm/index.mjs +422 -0
- package/.output/server/node_modules/typeorm/logger/AbstractLogger.js +238 -0
- package/.output/server/node_modules/typeorm/logger/AdvancedConsoleLogger.js +56 -0
- package/.output/server/node_modules/typeorm/logger/DebugLogger.js +78 -0
- package/.output/server/node_modules/typeorm/logger/FileLogger.js +88 -0
- package/.output/server/node_modules/typeorm/logger/FormattedConsoleLogger.js +59 -0
- package/.output/server/node_modules/typeorm/logger/Logger.js +4 -0
- package/.output/server/node_modules/typeorm/logger/LoggerFactory.js +39 -0
- package/.output/server/node_modules/typeorm/logger/LoggerOptions.js +4 -0
- package/.output/server/node_modules/typeorm/logger/SimpleConsoleLogger.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/CheckMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ColumnMetadata.js +618 -0
- package/.output/server/node_modules/typeorm/metadata/EmbeddedMetadata.js +224 -0
- package/.output/server/node_modules/typeorm/metadata/EntityListenerMetadata.js +77 -0
- package/.output/server/node_modules/typeorm/metadata/EntityMetadata.js +692 -0
- package/.output/server/node_modules/typeorm/metadata/ExclusionMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ForeignKeyMetadata.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/IndexMetadata.js +144 -0
- package/.output/server/node_modules/typeorm/metadata/RelationCountMetadata.js +39 -0
- package/.output/server/node_modules/typeorm/metadata/RelationIdMetadata.js +62 -0
- package/.output/server/node_modules/typeorm/metadata/RelationMetadata.js +440 -0
- package/.output/server/node_modules/typeorm/metadata/UniqueMetadata.js +101 -0
- package/.output/server/node_modules/typeorm/metadata/types/EventListenerTypes.js +22 -0
- package/.output/server/node_modules/typeorm/metadata-args/MetadataArgsStorage.js +236 -0
- package/.output/server/node_modules/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +145 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js +838 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataValidator.js +258 -0
- package/.output/server/node_modules/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +287 -0
- package/.output/server/node_modules/typeorm/metadata-builder/MetadataUtils.js +44 -0
- package/.output/server/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js +185 -0
- package/.output/server/node_modules/typeorm/migration/Migration.js +21 -0
- package/.output/server/node_modules/typeorm/migration/MigrationExecutor.js +534 -0
- package/.output/server/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.js +145 -0
- package/.output/server/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.js +50 -0
- package/.output/server/node_modules/typeorm/package.json +268 -0
- package/.output/server/node_modules/typeorm/persistence/EntityPersistExecutor.js +170 -0
- package/.output/server/node_modules/typeorm/persistence/Subject.js +239 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectChangedColumnsComputer.js +216 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectDatabaseEntityLoader.js +135 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectExecutor.js +760 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectTopologicalSorter.js +174 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +107 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +218 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +181 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/persistence/tree/ClosureSubjectExecutor.js +241 -0
- package/.output/server/node_modules/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +125 -0
- package/.output/server/node_modules/typeorm/persistence/tree/NestedSetSubjectExecutor.js +271 -0
- package/.output/server/node_modules/typeorm/platform/PlatformTools.js +243 -0
- package/.output/server/node_modules/typeorm/query-builder/Alias.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/Brackets.js +19 -0
- package/.output/server/node_modules/typeorm/query-builder/DeleteQueryBuilder.js +200 -0
- package/.output/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js +745 -0
- package/.output/server/node_modules/typeorm/query-builder/JoinAttribute.js +175 -0
- package/.output/server/node_modules/typeorm/query-builder/NotBrackets.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilder.js +1139 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilderUtils.js +32 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryExpressionMap.js +328 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationIdLoader.js +503 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationLoader.js +283 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationQueryBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationRemover.js +143 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationUpdater.js +152 -0
- package/.output/server/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js +176 -0
- package/.output/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js +2656 -0
- package/.output/server/node_modules/typeorm/query-builder/SoftDeleteQueryBuilder.js +368 -0
- package/.output/server/node_modules/typeorm/query-builder/UpdateQueryBuilder.js +498 -0
- package/.output/server/node_modules/typeorm/query-builder/index.js +20 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountAttribute.js +80 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountLoader.js +168 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdAttribute.js +88 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdLoader.js +275 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/result/DeleteResult.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/result/InsertResult.js +28 -0
- package/.output/server/node_modules/typeorm/query-builder/result/UpdateResult.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +196 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +112 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +92 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +447 -0
- package/.output/server/node_modules/typeorm/query-runner/BaseQueryRunner.js +454 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryLock.js +28 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryResult.js +17 -0
- package/.output/server/node_modules/typeorm/repository/AbstractRepository.js +92 -0
- package/.output/server/node_modules/typeorm/repository/BaseEntity.js +328 -0
- package/.output/server/node_modules/typeorm/repository/MongoRepository.js +305 -0
- package/.output/server/node_modules/typeorm/repository/RemoveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/Repository.js +379 -0
- package/.output/server/node_modules/typeorm/repository/SaveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/TreeRepository.js +255 -0
- package/.output/server/node_modules/typeorm/schema-builder/MongoSchemaBuilder.js +66 -0
- package/.output/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js +929 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableCheckOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableExclusionOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableForeignKeyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableIndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableUniqueOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/ViewOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/Table.js +296 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableCheck.js +49 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableColumn.js +117 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableExclusion.js +43 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableForeignKey.js +72 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableIndex.js +68 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableUnique.js +50 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/TableUtils.js +41 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/ViewUtils.js +27 -0
- package/.output/server/node_modules/typeorm/schema-builder/view/View.js +71 -0
- package/.output/server/node_modules/typeorm/subscriber/Broadcaster.js +660 -0
- package/.output/server/node_modules/typeorm/subscriber/BroadcasterResult.js +30 -0
- package/.output/server/node_modules/typeorm/subscriber/event/QueryEvent.js +4 -0
- package/.output/server/node_modules/typeorm/util/ApplyValueTransformers.js +25 -0
- package/.output/server/node_modules/typeorm/util/DateUtils.js +229 -0
- package/.output/server/node_modules/typeorm/util/DepGraph.js +230 -0
- package/.output/server/node_modules/typeorm/util/DirectoryExportedClassesLoader.js +65 -0
- package/.output/server/node_modules/typeorm/util/ImportUtils.js +66 -0
- package/.output/server/node_modules/typeorm/util/InstanceChecker.js +104 -0
- package/.output/server/node_modules/typeorm/util/ObjectUtils.js +49 -0
- package/.output/server/node_modules/typeorm/util/OrmUtils.js +443 -0
- package/.output/server/node_modules/typeorm/util/PathUtils.js +33 -0
- package/.output/server/node_modules/typeorm/util/RandomGenerator.js +154 -0
- package/.output/server/node_modules/typeorm/util/SqlTagUtils.js +43 -0
- package/.output/server/node_modules/typeorm/util/StringUtils.js +113 -0
- package/.output/server/node_modules/typeorm/util/TreeRepositoryUtils.js +67 -0
- package/.output/server/node_modules/typeorm/util/VersionUtils.js +27 -0
- package/.output/server/node_modules/typeorm/util/escapeRegExp.js +10 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +94 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +220 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.C13swrCa.mjs +48 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Cp0iF6eN.mjs +177 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DGkFBTYv.mjs +172 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DeCxexjU.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +101 -0
- package/.output/server/node_modules/uuid/dist/cjs/index.js +31 -0
- package/.output/server/node_modules/uuid/dist/cjs/max.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/native.js +4 -0
- package/.output/server/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/package.json +1 -0
- package/.output/server/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/.output/server/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/.output/server/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/.output/server/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/.output/server/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/.output/server/node_modules/uuid/dist/cjs/version.js +10 -0
- package/.output/server/node_modules/uuid/package.json +132 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/xtend/mutable.js +17 -0
- package/.output/server/node_modules/xtend/package.json +55 -0
- package/.output/server/node_modules/zod/index.js +4 -0
- package/.output/server/node_modules/zod/package.json +135 -0
- package/.output/server/node_modules/zod/v3/ZodError.js +133 -0
- package/.output/server/node_modules/zod/v3/errors.js +9 -0
- package/.output/server/node_modules/zod/v3/external.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
- package/.output/server/node_modules/zod/v3/index.js +4 -0
- package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v3/package.json +6 -0
- package/.output/server/node_modules/zod/v3/types.js +3695 -0
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
- package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
- package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
- package/.output/server/node_modules/zod/v4/classic/errors.js +48 -0
- package/.output/server/node_modules/zod/v4/classic/external.js +20 -0
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
- package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
- package/.output/server/node_modules/zod/v4/classic/package.json +6 -0
- package/.output/server/node_modules/zod/v4/classic/parse.js +15 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/.output/server/node_modules/zod/v4/core/api.js +1082 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +575 -0
- package/.output/server/node_modules/zod/v4/core/core.js +76 -0
- package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
- package/.output/server/node_modules/zod/v4/core/errors.js +182 -0
- package/.output/server/node_modules/zod/v4/core/index.js +16 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
- package/.output/server/node_modules/zod/v4/core/package.json +6 -0
- package/.output/server/node_modules/zod/v4/core/parse.js +93 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +133 -0
- package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
- package/.output/server/node_modules/zod/v4/core/schemas.js +2095 -0
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/.output/server/node_modules/zod/v4/core/util.js +651 -0
- package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
- package/.output/server/node_modules/zod/v4/index.js +3 -0
- package/.output/server/node_modules/zod/v4/locales/ar.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/az.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/be.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/bg.js +120 -0
- package/.output/server/node_modules/zod/v4/locales/ca.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/cs.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/da.js +115 -0
- package/.output/server/node_modules/zod/v4/locales/de.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/eo.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/es.js +132 -0
- package/.output/server/node_modules/zod/v4/locales/fa.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/fi.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/fr.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/he.js +214 -0
- package/.output/server/node_modules/zod/v4/locales/hu.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/index.js +49 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/it.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ja.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/ka.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/km.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ko.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/lt.js +203 -0
- package/.output/server/node_modules/zod/v4/locales/mk.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ms.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/nl.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/no.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ota.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/package.json +6 -0
- package/.output/server/node_modules/zod/v4/locales/pl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ps.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/pt.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ru.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/sl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/sv.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ta.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/th.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/tr.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/uk.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ur.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/yo.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/.output/server/node_modules/zod/v4/package.json +6 -0
- package/.output/server/package.json +95 -0
- package/README.md +46 -0
- package/bin/cli.mjs +113 -0
- package/bin/entry.cjs +84 -0
- package/package.json +48 -0
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commands_1 = require("@ioredis/commands");
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
const redis_errors_1 = require("redis-errors");
|
|
6
|
+
const standard_as_callback_1 = require("standard-as-callback");
|
|
7
|
+
const Command_1 = require("../Command");
|
|
8
|
+
const ClusterAllFailedError_1 = require("../errors/ClusterAllFailedError");
|
|
9
|
+
const Redis_1 = require("../Redis");
|
|
10
|
+
const ScanStream_1 = require("../ScanStream");
|
|
11
|
+
const transaction_1 = require("../transaction");
|
|
12
|
+
const utils_1 = require("../utils");
|
|
13
|
+
const applyMixin_1 = require("../utils/applyMixin");
|
|
14
|
+
const Commander_1 = require("../utils/Commander");
|
|
15
|
+
const ClusterOptions_1 = require("./ClusterOptions");
|
|
16
|
+
const ClusterSubscriber_1 = require("./ClusterSubscriber");
|
|
17
|
+
const ConnectionPool_1 = require("./ConnectionPool");
|
|
18
|
+
const DelayQueue_1 = require("./DelayQueue");
|
|
19
|
+
const util_1 = require("./util");
|
|
20
|
+
const Deque = require("denque");
|
|
21
|
+
const ClusterSubscriberGroup_1 = require("./ClusterSubscriberGroup");
|
|
22
|
+
const debug = (0, utils_1.Debug)("cluster");
|
|
23
|
+
const REJECT_OVERWRITTEN_COMMANDS = new WeakSet();
|
|
24
|
+
/**
|
|
25
|
+
* Client for the official Redis Cluster
|
|
26
|
+
*/
|
|
27
|
+
class Cluster extends Commander_1.default {
|
|
28
|
+
/**
|
|
29
|
+
* Creates an instance of Cluster.
|
|
30
|
+
*/
|
|
31
|
+
//TODO: Add an option that enables or disables sharded PubSub
|
|
32
|
+
constructor(startupNodes, options = {}) {
|
|
33
|
+
super();
|
|
34
|
+
this.slots = [];
|
|
35
|
+
/**
|
|
36
|
+
* @ignore
|
|
37
|
+
*/
|
|
38
|
+
this._groupsIds = {};
|
|
39
|
+
/**
|
|
40
|
+
* @ignore
|
|
41
|
+
*/
|
|
42
|
+
this._groupsBySlot = Array(16384);
|
|
43
|
+
/**
|
|
44
|
+
* @ignore
|
|
45
|
+
*/
|
|
46
|
+
this.isCluster = true;
|
|
47
|
+
this.retryAttempts = 0;
|
|
48
|
+
this.delayQueue = new DelayQueue_1.default();
|
|
49
|
+
this.offlineQueue = new Deque();
|
|
50
|
+
this.isRefreshing = false;
|
|
51
|
+
this._refreshSlotsCacheCallbacks = [];
|
|
52
|
+
this._autoPipelines = new Map();
|
|
53
|
+
this._runningAutoPipelines = new Set();
|
|
54
|
+
this._readyDelayedCallbacks = [];
|
|
55
|
+
/**
|
|
56
|
+
* Every time Cluster#connect() is called, this value will be
|
|
57
|
+
* auto-incrementing. The purpose of this value is used for
|
|
58
|
+
* discarding previous connect attampts when creating a new
|
|
59
|
+
* connection.
|
|
60
|
+
*/
|
|
61
|
+
this.connectionEpoch = 0;
|
|
62
|
+
events_1.EventEmitter.call(this);
|
|
63
|
+
this.startupNodes = startupNodes;
|
|
64
|
+
this.options = (0, utils_1.defaults)({}, options, ClusterOptions_1.DEFAULT_CLUSTER_OPTIONS, this.options);
|
|
65
|
+
if (this.options.shardedSubscribers == true)
|
|
66
|
+
this.shardedSubscribers = new ClusterSubscriberGroup_1.default(this);
|
|
67
|
+
if (this.options.redisOptions &&
|
|
68
|
+
this.options.redisOptions.keyPrefix &&
|
|
69
|
+
!this.options.keyPrefix) {
|
|
70
|
+
this.options.keyPrefix = this.options.redisOptions.keyPrefix;
|
|
71
|
+
}
|
|
72
|
+
// validate options
|
|
73
|
+
if (typeof this.options.scaleReads !== "function" &&
|
|
74
|
+
["all", "master", "slave"].indexOf(this.options.scaleReads) === -1) {
|
|
75
|
+
throw new Error('Invalid option scaleReads "' +
|
|
76
|
+
this.options.scaleReads +
|
|
77
|
+
'". Expected "all", "master", "slave" or a custom function');
|
|
78
|
+
}
|
|
79
|
+
this.connectionPool = new ConnectionPool_1.default(this.options.redisOptions);
|
|
80
|
+
this.connectionPool.on("-node", (redis, key) => {
|
|
81
|
+
this.emit("-node", redis);
|
|
82
|
+
});
|
|
83
|
+
this.connectionPool.on("+node", (redis) => {
|
|
84
|
+
this.emit("+node", redis);
|
|
85
|
+
});
|
|
86
|
+
this.connectionPool.on("drain", () => {
|
|
87
|
+
this.setStatus("close");
|
|
88
|
+
});
|
|
89
|
+
this.connectionPool.on("nodeError", (error, key) => {
|
|
90
|
+
this.emit("node error", error, key);
|
|
91
|
+
});
|
|
92
|
+
this.subscriber = new ClusterSubscriber_1.default(this.connectionPool, this);
|
|
93
|
+
if (this.options.scripts) {
|
|
94
|
+
Object.entries(this.options.scripts).forEach(([name, definition]) => {
|
|
95
|
+
this.defineCommand(name, definition);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
if (this.options.lazyConnect) {
|
|
99
|
+
this.setStatus("wait");
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.connect().catch((err) => {
|
|
103
|
+
debug("connecting failed: %s", err);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Connect to a cluster
|
|
109
|
+
*/
|
|
110
|
+
connect() {
|
|
111
|
+
return new Promise((resolve, reject) => {
|
|
112
|
+
if (this.status === "connecting" ||
|
|
113
|
+
this.status === "connect" ||
|
|
114
|
+
this.status === "ready") {
|
|
115
|
+
reject(new Error("Redis is already connecting/connected"));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const epoch = ++this.connectionEpoch;
|
|
119
|
+
this.setStatus("connecting");
|
|
120
|
+
this.resolveStartupNodeHostnames()
|
|
121
|
+
.then((nodes) => {
|
|
122
|
+
if (this.connectionEpoch !== epoch) {
|
|
123
|
+
debug("discard connecting after resolving startup nodes because epoch not match: %d != %d", epoch, this.connectionEpoch);
|
|
124
|
+
reject(new redis_errors_1.RedisError("Connection is discarded because a new connection is made"));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (this.status !== "connecting") {
|
|
128
|
+
debug("discard connecting after resolving startup nodes because the status changed to %s", this.status);
|
|
129
|
+
reject(new redis_errors_1.RedisError("Connection is aborted"));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.connectionPool.reset(nodes);
|
|
133
|
+
const readyHandler = () => {
|
|
134
|
+
this.setStatus("ready");
|
|
135
|
+
this.retryAttempts = 0;
|
|
136
|
+
this.executeOfflineCommands();
|
|
137
|
+
this.resetNodesRefreshInterval();
|
|
138
|
+
resolve();
|
|
139
|
+
};
|
|
140
|
+
let closeListener = undefined;
|
|
141
|
+
const refreshListener = () => {
|
|
142
|
+
this.invokeReadyDelayedCallbacks(undefined);
|
|
143
|
+
this.removeListener("close", closeListener);
|
|
144
|
+
this.manuallyClosing = false;
|
|
145
|
+
this.setStatus("connect");
|
|
146
|
+
if (this.options.enableReadyCheck) {
|
|
147
|
+
this.readyCheck((err, fail) => {
|
|
148
|
+
if (err || fail) {
|
|
149
|
+
debug("Ready check failed (%s). Reconnecting...", err || fail);
|
|
150
|
+
if (this.status === "connect") {
|
|
151
|
+
this.disconnect(true);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
readyHandler();
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
readyHandler();
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
closeListener = () => {
|
|
164
|
+
const error = new Error("None of startup nodes is available");
|
|
165
|
+
this.removeListener("refresh", refreshListener);
|
|
166
|
+
this.invokeReadyDelayedCallbacks(error);
|
|
167
|
+
reject(error);
|
|
168
|
+
};
|
|
169
|
+
this.once("refresh", refreshListener);
|
|
170
|
+
this.once("close", closeListener);
|
|
171
|
+
this.once("close", this.handleCloseEvent.bind(this));
|
|
172
|
+
this.refreshSlotsCache((err) => {
|
|
173
|
+
if (err && err.message === ClusterAllFailedError_1.default.defaultMessage) {
|
|
174
|
+
Redis_1.default.prototype.silentEmit.call(this, "error", err);
|
|
175
|
+
this.connectionPool.reset([]);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
this.subscriber.start();
|
|
179
|
+
if (this.options.shardedSubscribers) {
|
|
180
|
+
this.shardedSubscribers.start();
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
.catch((err) => {
|
|
184
|
+
this.setStatus("close");
|
|
185
|
+
this.handleCloseEvent(err);
|
|
186
|
+
this.invokeReadyDelayedCallbacks(err);
|
|
187
|
+
reject(err);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Disconnect from every node in the cluster.
|
|
193
|
+
*/
|
|
194
|
+
disconnect(reconnect = false) {
|
|
195
|
+
const status = this.status;
|
|
196
|
+
this.setStatus("disconnecting");
|
|
197
|
+
if (!reconnect) {
|
|
198
|
+
this.manuallyClosing = true;
|
|
199
|
+
}
|
|
200
|
+
if (this.reconnectTimeout && !reconnect) {
|
|
201
|
+
clearTimeout(this.reconnectTimeout);
|
|
202
|
+
this.reconnectTimeout = null;
|
|
203
|
+
debug("Canceled reconnecting attempts");
|
|
204
|
+
}
|
|
205
|
+
this.clearNodesRefreshInterval();
|
|
206
|
+
this.subscriber.stop();
|
|
207
|
+
if (this.options.shardedSubscribers) {
|
|
208
|
+
this.shardedSubscribers.stop();
|
|
209
|
+
}
|
|
210
|
+
if (status === "wait") {
|
|
211
|
+
this.setStatus("close");
|
|
212
|
+
this.handleCloseEvent();
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
this.connectionPool.reset([]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Quit the cluster gracefully.
|
|
220
|
+
*/
|
|
221
|
+
quit(callback) {
|
|
222
|
+
const status = this.status;
|
|
223
|
+
this.setStatus("disconnecting");
|
|
224
|
+
this.manuallyClosing = true;
|
|
225
|
+
if (this.reconnectTimeout) {
|
|
226
|
+
clearTimeout(this.reconnectTimeout);
|
|
227
|
+
this.reconnectTimeout = null;
|
|
228
|
+
}
|
|
229
|
+
this.clearNodesRefreshInterval();
|
|
230
|
+
this.subscriber.stop();
|
|
231
|
+
if (this.options.shardedSubscribers) {
|
|
232
|
+
this.shardedSubscribers.stop();
|
|
233
|
+
}
|
|
234
|
+
if (status === "wait") {
|
|
235
|
+
const ret = (0, standard_as_callback_1.default)(Promise.resolve("OK"), callback);
|
|
236
|
+
// use setImmediate to make sure "close" event
|
|
237
|
+
// being emitted after quit() is returned
|
|
238
|
+
setImmediate(function () {
|
|
239
|
+
this.setStatus("close");
|
|
240
|
+
this.handleCloseEvent();
|
|
241
|
+
}.bind(this));
|
|
242
|
+
return ret;
|
|
243
|
+
}
|
|
244
|
+
return (0, standard_as_callback_1.default)(Promise.all(this.nodes().map((node) => node.quit().catch((err) => {
|
|
245
|
+
// Ignore the error caused by disconnecting since
|
|
246
|
+
// we're disconnecting...
|
|
247
|
+
if (err.message === utils_1.CONNECTION_CLOSED_ERROR_MSG) {
|
|
248
|
+
return "OK";
|
|
249
|
+
}
|
|
250
|
+
throw err;
|
|
251
|
+
}))).then(() => "OK"), callback);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Create a new instance with the same startup nodes and options as the current one.
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```js
|
|
258
|
+
* var cluster = new Redis.Cluster([{ host: "127.0.0.1", port: "30001" }]);
|
|
259
|
+
* var anotherCluster = cluster.duplicate();
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
duplicate(overrideStartupNodes = [], overrideOptions = {}) {
|
|
263
|
+
const startupNodes = overrideStartupNodes.length > 0
|
|
264
|
+
? overrideStartupNodes
|
|
265
|
+
: this.startupNodes.slice(0);
|
|
266
|
+
const options = Object.assign({}, this.options, overrideOptions);
|
|
267
|
+
return new Cluster(startupNodes, options);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Get nodes with the specified role
|
|
271
|
+
*/
|
|
272
|
+
nodes(role = "all") {
|
|
273
|
+
if (role !== "all" && role !== "master" && role !== "slave") {
|
|
274
|
+
throw new Error('Invalid role "' + role + '". Expected "all", "master" or "slave"');
|
|
275
|
+
}
|
|
276
|
+
return this.connectionPool.getNodes(role);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* This is needed in order not to install a listener for each auto pipeline
|
|
280
|
+
*
|
|
281
|
+
* @ignore
|
|
282
|
+
*/
|
|
283
|
+
delayUntilReady(callback) {
|
|
284
|
+
this._readyDelayedCallbacks.push(callback);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Get the number of commands queued in automatic pipelines.
|
|
288
|
+
*
|
|
289
|
+
* This is not available (and returns 0) until the cluster is connected and slots information have been received.
|
|
290
|
+
*/
|
|
291
|
+
get autoPipelineQueueSize() {
|
|
292
|
+
let queued = 0;
|
|
293
|
+
for (const pipeline of this._autoPipelines.values()) {
|
|
294
|
+
queued += pipeline.length;
|
|
295
|
+
}
|
|
296
|
+
return queued;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Refresh the slot cache
|
|
300
|
+
*
|
|
301
|
+
* @ignore
|
|
302
|
+
*/
|
|
303
|
+
refreshSlotsCache(callback) {
|
|
304
|
+
if (callback) {
|
|
305
|
+
this._refreshSlotsCacheCallbacks.push(callback);
|
|
306
|
+
}
|
|
307
|
+
if (this.isRefreshing) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
this.isRefreshing = true;
|
|
311
|
+
const _this = this;
|
|
312
|
+
const wrapper = (error) => {
|
|
313
|
+
this.isRefreshing = false;
|
|
314
|
+
for (const callback of this._refreshSlotsCacheCallbacks) {
|
|
315
|
+
callback(error);
|
|
316
|
+
}
|
|
317
|
+
this._refreshSlotsCacheCallbacks = [];
|
|
318
|
+
};
|
|
319
|
+
const nodes = (0, utils_1.shuffle)(this.connectionPool.getNodes());
|
|
320
|
+
let lastNodeError = null;
|
|
321
|
+
function tryNode(index) {
|
|
322
|
+
if (index === nodes.length) {
|
|
323
|
+
const error = new ClusterAllFailedError_1.default(ClusterAllFailedError_1.default.defaultMessage, lastNodeError);
|
|
324
|
+
return wrapper(error);
|
|
325
|
+
}
|
|
326
|
+
const node = nodes[index];
|
|
327
|
+
const key = `${node.options.host}:${node.options.port}`;
|
|
328
|
+
debug("getting slot cache from %s", key);
|
|
329
|
+
_this.getInfoFromNode(node, function (err) {
|
|
330
|
+
switch (_this.status) {
|
|
331
|
+
case "close":
|
|
332
|
+
case "end":
|
|
333
|
+
return wrapper(new Error("Cluster is disconnected."));
|
|
334
|
+
case "disconnecting":
|
|
335
|
+
return wrapper(new Error("Cluster is disconnecting."));
|
|
336
|
+
}
|
|
337
|
+
if (err) {
|
|
338
|
+
_this.emit("node error", err, key);
|
|
339
|
+
lastNodeError = err;
|
|
340
|
+
tryNode(index + 1);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
_this.emit("refresh");
|
|
344
|
+
wrapper();
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
tryNode(0);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* @ignore
|
|
352
|
+
*/
|
|
353
|
+
sendCommand(command, stream, node) {
|
|
354
|
+
if (this.status === "wait") {
|
|
355
|
+
this.connect().catch(utils_1.noop);
|
|
356
|
+
}
|
|
357
|
+
if (this.status === "end") {
|
|
358
|
+
command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));
|
|
359
|
+
return command.promise;
|
|
360
|
+
}
|
|
361
|
+
let to = this.options.scaleReads;
|
|
362
|
+
if (to !== "master") {
|
|
363
|
+
const isCommandReadOnly = command.isReadOnly ||
|
|
364
|
+
((0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "readonly"));
|
|
365
|
+
if (!isCommandReadOnly) {
|
|
366
|
+
to = "master";
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
let targetSlot = node ? node.slot : command.getSlot();
|
|
370
|
+
const ttl = {};
|
|
371
|
+
const _this = this;
|
|
372
|
+
if (!node && !REJECT_OVERWRITTEN_COMMANDS.has(command)) {
|
|
373
|
+
REJECT_OVERWRITTEN_COMMANDS.add(command);
|
|
374
|
+
const reject = command.reject;
|
|
375
|
+
command.reject = function (err) {
|
|
376
|
+
const partialTry = tryConnection.bind(null, true);
|
|
377
|
+
_this.handleError(err, ttl, {
|
|
378
|
+
moved: function (slot, key) {
|
|
379
|
+
debug("command %s is moved to %s", command.name, key);
|
|
380
|
+
targetSlot = Number(slot);
|
|
381
|
+
if (_this.slots[slot]) {
|
|
382
|
+
_this.slots[slot][0] = key;
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
_this.slots[slot] = [key];
|
|
386
|
+
}
|
|
387
|
+
_this._groupsBySlot[slot] =
|
|
388
|
+
_this._groupsIds[_this.slots[slot].join(";")];
|
|
389
|
+
_this.connectionPool.findOrCreate(_this.natMapper(key));
|
|
390
|
+
tryConnection();
|
|
391
|
+
debug("refreshing slot caches... (triggered by MOVED error)");
|
|
392
|
+
_this.refreshSlotsCache();
|
|
393
|
+
},
|
|
394
|
+
ask: function (slot, key) {
|
|
395
|
+
debug("command %s is required to ask %s:%s", command.name, key);
|
|
396
|
+
const mapped = _this.natMapper(key);
|
|
397
|
+
_this.connectionPool.findOrCreate(mapped);
|
|
398
|
+
tryConnection(false, `${mapped.host}:${mapped.port}`);
|
|
399
|
+
},
|
|
400
|
+
tryagain: partialTry,
|
|
401
|
+
clusterDown: partialTry,
|
|
402
|
+
connectionClosed: partialTry,
|
|
403
|
+
maxRedirections: function (redirectionError) {
|
|
404
|
+
reject.call(command, redirectionError);
|
|
405
|
+
},
|
|
406
|
+
defaults: function () {
|
|
407
|
+
reject.call(command, err);
|
|
408
|
+
},
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
tryConnection();
|
|
413
|
+
function tryConnection(random, asking) {
|
|
414
|
+
if (_this.status === "end") {
|
|
415
|
+
command.reject(new redis_errors_1.AbortError("Cluster is ended."));
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
let redis;
|
|
419
|
+
if (_this.status === "ready" || command.name === "cluster") {
|
|
420
|
+
if (node && node.redis) {
|
|
421
|
+
redis = node.redis;
|
|
422
|
+
}
|
|
423
|
+
else if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", command.name) ||
|
|
424
|
+
Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", command.name)) {
|
|
425
|
+
if (_this.options.shardedSubscribers == true &&
|
|
426
|
+
(command.name == "ssubscribe" || command.name == "sunsubscribe")) {
|
|
427
|
+
const sub = _this.shardedSubscribers.getResponsibleSubscriber(targetSlot);
|
|
428
|
+
let status = -1;
|
|
429
|
+
if (command.name == "ssubscribe")
|
|
430
|
+
status = _this.shardedSubscribers.addChannels(command.getKeys());
|
|
431
|
+
if (command.name == "sunsubscribe")
|
|
432
|
+
status = _this.shardedSubscribers.removeChannels(command.getKeys());
|
|
433
|
+
if (status !== -1) {
|
|
434
|
+
redis = sub.getInstance();
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
command.reject(new redis_errors_1.AbortError("Can't add or remove the given channels. Are they in the same slot?"));
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
redis = _this.subscriber.getInstance();
|
|
442
|
+
}
|
|
443
|
+
if (!redis) {
|
|
444
|
+
command.reject(new redis_errors_1.AbortError("No subscriber for the cluster"));
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
if (!random) {
|
|
450
|
+
if (typeof targetSlot === "number" && _this.slots[targetSlot]) {
|
|
451
|
+
const nodeKeys = _this.slots[targetSlot];
|
|
452
|
+
if (typeof to === "function") {
|
|
453
|
+
const nodes = nodeKeys.map(function (key) {
|
|
454
|
+
return _this.connectionPool.getInstanceByKey(key);
|
|
455
|
+
});
|
|
456
|
+
redis = to(nodes, command);
|
|
457
|
+
if (Array.isArray(redis)) {
|
|
458
|
+
redis = (0, utils_1.sample)(redis);
|
|
459
|
+
}
|
|
460
|
+
if (!redis) {
|
|
461
|
+
redis = nodes[0];
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
let key;
|
|
466
|
+
if (to === "all") {
|
|
467
|
+
key = (0, utils_1.sample)(nodeKeys);
|
|
468
|
+
}
|
|
469
|
+
else if (to === "slave" && nodeKeys.length > 1) {
|
|
470
|
+
key = (0, utils_1.sample)(nodeKeys, 1);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
key = nodeKeys[0];
|
|
474
|
+
}
|
|
475
|
+
redis = _this.connectionPool.getInstanceByKey(key);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
if (asking) {
|
|
479
|
+
redis = _this.connectionPool.getInstanceByKey(asking);
|
|
480
|
+
redis.asking();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
if (!redis) {
|
|
484
|
+
redis =
|
|
485
|
+
(typeof to === "function"
|
|
486
|
+
? null
|
|
487
|
+
: _this.connectionPool.getSampleInstance(to)) ||
|
|
488
|
+
_this.connectionPool.getSampleInstance("all");
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (node && !node.redis) {
|
|
492
|
+
node.redis = redis;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (redis) {
|
|
496
|
+
redis.sendCommand(command, stream);
|
|
497
|
+
}
|
|
498
|
+
else if (_this.options.enableOfflineQueue) {
|
|
499
|
+
_this.offlineQueue.push({
|
|
500
|
+
command: command,
|
|
501
|
+
stream: stream,
|
|
502
|
+
node: node,
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
command.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false"));
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return command.promise;
|
|
510
|
+
}
|
|
511
|
+
sscanStream(key, options) {
|
|
512
|
+
return this.createScanStream("sscan", { key, options });
|
|
513
|
+
}
|
|
514
|
+
sscanBufferStream(key, options) {
|
|
515
|
+
return this.createScanStream("sscanBuffer", { key, options });
|
|
516
|
+
}
|
|
517
|
+
hscanStream(key, options) {
|
|
518
|
+
return this.createScanStream("hscan", { key, options });
|
|
519
|
+
}
|
|
520
|
+
hscanBufferStream(key, options) {
|
|
521
|
+
return this.createScanStream("hscanBuffer", { key, options });
|
|
522
|
+
}
|
|
523
|
+
zscanStream(key, options) {
|
|
524
|
+
return this.createScanStream("zscan", { key, options });
|
|
525
|
+
}
|
|
526
|
+
zscanBufferStream(key, options) {
|
|
527
|
+
return this.createScanStream("zscanBuffer", { key, options });
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @ignore
|
|
531
|
+
*/
|
|
532
|
+
handleError(error, ttl, handlers) {
|
|
533
|
+
if (typeof ttl.value === "undefined") {
|
|
534
|
+
ttl.value = this.options.maxRedirections;
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
ttl.value -= 1;
|
|
538
|
+
}
|
|
539
|
+
if (ttl.value <= 0) {
|
|
540
|
+
handlers.maxRedirections(new Error("Too many Cluster redirections. Last error: " + error));
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
const errv = error.message.split(" ");
|
|
544
|
+
if (errv[0] === "MOVED") {
|
|
545
|
+
const timeout = this.options.retryDelayOnMoved;
|
|
546
|
+
if (timeout && typeof timeout === "number") {
|
|
547
|
+
this.delayQueue.push("moved", handlers.moved.bind(null, errv[1], errv[2]), { timeout });
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
handlers.moved(errv[1], errv[2]);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
else if (errv[0] === "ASK") {
|
|
554
|
+
handlers.ask(errv[1], errv[2]);
|
|
555
|
+
}
|
|
556
|
+
else if (errv[0] === "TRYAGAIN") {
|
|
557
|
+
this.delayQueue.push("tryagain", handlers.tryagain, {
|
|
558
|
+
timeout: this.options.retryDelayOnTryAgain,
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
else if (errv[0] === "CLUSTERDOWN" &&
|
|
562
|
+
this.options.retryDelayOnClusterDown > 0) {
|
|
563
|
+
this.delayQueue.push("clusterdown", handlers.connectionClosed, {
|
|
564
|
+
timeout: this.options.retryDelayOnClusterDown,
|
|
565
|
+
callback: this.refreshSlotsCache.bind(this),
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
else if (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG &&
|
|
569
|
+
this.options.retryDelayOnFailover > 0 &&
|
|
570
|
+
this.status === "ready") {
|
|
571
|
+
this.delayQueue.push("failover", handlers.connectionClosed, {
|
|
572
|
+
timeout: this.options.retryDelayOnFailover,
|
|
573
|
+
callback: this.refreshSlotsCache.bind(this),
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
handlers.defaults();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
resetOfflineQueue() {
|
|
581
|
+
this.offlineQueue = new Deque();
|
|
582
|
+
}
|
|
583
|
+
clearNodesRefreshInterval() {
|
|
584
|
+
if (this.slotsTimer) {
|
|
585
|
+
clearTimeout(this.slotsTimer);
|
|
586
|
+
this.slotsTimer = null;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
resetNodesRefreshInterval() {
|
|
590
|
+
if (this.slotsTimer || !this.options.slotsRefreshInterval) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const nextRound = () => {
|
|
594
|
+
this.slotsTimer = setTimeout(() => {
|
|
595
|
+
debug('refreshing slot caches... (triggered by "slotsRefreshInterval" option)');
|
|
596
|
+
this.refreshSlotsCache(() => {
|
|
597
|
+
nextRound();
|
|
598
|
+
});
|
|
599
|
+
}, this.options.slotsRefreshInterval);
|
|
600
|
+
};
|
|
601
|
+
nextRound();
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Change cluster instance's status
|
|
605
|
+
*/
|
|
606
|
+
setStatus(status) {
|
|
607
|
+
debug("status: %s -> %s", this.status || "[empty]", status);
|
|
608
|
+
this.status = status;
|
|
609
|
+
process.nextTick(() => {
|
|
610
|
+
this.emit(status);
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Called when closed to check whether a reconnection should be made
|
|
615
|
+
*/
|
|
616
|
+
handleCloseEvent(reason) {
|
|
617
|
+
if (reason) {
|
|
618
|
+
debug("closed because %s", reason);
|
|
619
|
+
}
|
|
620
|
+
let retryDelay;
|
|
621
|
+
if (!this.manuallyClosing &&
|
|
622
|
+
typeof this.options.clusterRetryStrategy === "function") {
|
|
623
|
+
retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts, reason);
|
|
624
|
+
}
|
|
625
|
+
if (typeof retryDelay === "number") {
|
|
626
|
+
this.setStatus("reconnecting");
|
|
627
|
+
this.reconnectTimeout = setTimeout(() => {
|
|
628
|
+
this.reconnectTimeout = null;
|
|
629
|
+
debug("Cluster is disconnected. Retrying after %dms", retryDelay);
|
|
630
|
+
this.connect().catch(function (err) {
|
|
631
|
+
debug("Got error %s when reconnecting. Ignoring...", err);
|
|
632
|
+
});
|
|
633
|
+
}, retryDelay);
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
636
|
+
this.setStatus("end");
|
|
637
|
+
this.flushQueue(new Error("None of startup nodes is available"));
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Flush offline queue with error.
|
|
642
|
+
*/
|
|
643
|
+
flushQueue(error) {
|
|
644
|
+
let item;
|
|
645
|
+
while ((item = this.offlineQueue.shift())) {
|
|
646
|
+
item.command.reject(error);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
executeOfflineCommands() {
|
|
650
|
+
if (this.offlineQueue.length) {
|
|
651
|
+
debug("send %d commands in offline queue", this.offlineQueue.length);
|
|
652
|
+
const offlineQueue = this.offlineQueue;
|
|
653
|
+
this.resetOfflineQueue();
|
|
654
|
+
let item;
|
|
655
|
+
while ((item = offlineQueue.shift())) {
|
|
656
|
+
this.sendCommand(item.command, item.stream, item.node);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
natMapper(nodeKey) {
|
|
661
|
+
const key = typeof nodeKey === "string"
|
|
662
|
+
? nodeKey
|
|
663
|
+
: `${nodeKey.host}:${nodeKey.port}`;
|
|
664
|
+
let mapped = null;
|
|
665
|
+
if (this.options.natMap && typeof this.options.natMap === "function") {
|
|
666
|
+
mapped = this.options.natMap(key);
|
|
667
|
+
}
|
|
668
|
+
else if (this.options.natMap && typeof this.options.natMap === "object") {
|
|
669
|
+
mapped = this.options.natMap[key];
|
|
670
|
+
}
|
|
671
|
+
if (mapped) {
|
|
672
|
+
debug("NAT mapping %s -> %O", key, mapped);
|
|
673
|
+
return Object.assign({}, mapped);
|
|
674
|
+
}
|
|
675
|
+
return typeof nodeKey === "string"
|
|
676
|
+
? (0, util_1.nodeKeyToRedisOptions)(nodeKey)
|
|
677
|
+
: nodeKey;
|
|
678
|
+
}
|
|
679
|
+
getInfoFromNode(redis, callback) {
|
|
680
|
+
if (!redis) {
|
|
681
|
+
return callback(new Error("Node is disconnected"));
|
|
682
|
+
}
|
|
683
|
+
// Use a duplication of the connection to avoid
|
|
684
|
+
// timeouts when the connection is in the blocking
|
|
685
|
+
// mode (e.g. waiting for BLPOP).
|
|
686
|
+
const duplicatedConnection = redis.duplicate({
|
|
687
|
+
enableOfflineQueue: true,
|
|
688
|
+
enableReadyCheck: false,
|
|
689
|
+
retryStrategy: null,
|
|
690
|
+
connectionName: (0, util_1.getConnectionName)("refresher", this.options.redisOptions && this.options.redisOptions.connectionName),
|
|
691
|
+
});
|
|
692
|
+
// Ignore error events since we will handle
|
|
693
|
+
// exceptions for the CLUSTER SLOTS command.
|
|
694
|
+
duplicatedConnection.on("error", utils_1.noop);
|
|
695
|
+
duplicatedConnection.cluster("SLOTS", (0, utils_1.timeout)((err, result) => {
|
|
696
|
+
duplicatedConnection.disconnect();
|
|
697
|
+
if (err) {
|
|
698
|
+
return callback(err);
|
|
699
|
+
}
|
|
700
|
+
if (this.status === "disconnecting" ||
|
|
701
|
+
this.status === "close" ||
|
|
702
|
+
this.status === "end") {
|
|
703
|
+
debug("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s", result.length, this.status);
|
|
704
|
+
callback();
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
const nodes = [];
|
|
708
|
+
debug("cluster slots result count: %d", result.length);
|
|
709
|
+
for (let i = 0; i < result.length; ++i) {
|
|
710
|
+
const items = result[i];
|
|
711
|
+
const slotRangeStart = items[0];
|
|
712
|
+
const slotRangeEnd = items[1];
|
|
713
|
+
const keys = [];
|
|
714
|
+
for (let j = 2; j < items.length; j++) {
|
|
715
|
+
if (!items[j][0]) {
|
|
716
|
+
continue;
|
|
717
|
+
}
|
|
718
|
+
const node = this.natMapper({
|
|
719
|
+
host: items[j][0],
|
|
720
|
+
port: items[j][1],
|
|
721
|
+
});
|
|
722
|
+
node.readOnly = j !== 2;
|
|
723
|
+
nodes.push(node);
|
|
724
|
+
keys.push(node.host + ":" + node.port);
|
|
725
|
+
}
|
|
726
|
+
debug("cluster slots result [%d]: slots %d~%d served by %s", i, slotRangeStart, slotRangeEnd, keys);
|
|
727
|
+
for (let slot = slotRangeStart; slot <= slotRangeEnd; slot++) {
|
|
728
|
+
this.slots[slot] = keys;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
// Assign to each node keys a numeric value to make autopipeline comparison faster.
|
|
732
|
+
this._groupsIds = Object.create(null);
|
|
733
|
+
let j = 0;
|
|
734
|
+
for (let i = 0; i < 16384; i++) {
|
|
735
|
+
const target = (this.slots[i] || []).join(";");
|
|
736
|
+
if (!target.length) {
|
|
737
|
+
this._groupsBySlot[i] = undefined;
|
|
738
|
+
continue;
|
|
739
|
+
}
|
|
740
|
+
if (!this._groupsIds[target]) {
|
|
741
|
+
this._groupsIds[target] = ++j;
|
|
742
|
+
}
|
|
743
|
+
this._groupsBySlot[i] = this._groupsIds[target];
|
|
744
|
+
}
|
|
745
|
+
this.connectionPool.reset(nodes);
|
|
746
|
+
callback();
|
|
747
|
+
}, this.options.slotsRefreshTimeout));
|
|
748
|
+
}
|
|
749
|
+
invokeReadyDelayedCallbacks(err) {
|
|
750
|
+
for (const c of this._readyDelayedCallbacks) {
|
|
751
|
+
process.nextTick(c, err);
|
|
752
|
+
}
|
|
753
|
+
this._readyDelayedCallbacks = [];
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Check whether Cluster is able to process commands
|
|
757
|
+
*/
|
|
758
|
+
readyCheck(callback) {
|
|
759
|
+
this.cluster("INFO", (err, res) => {
|
|
760
|
+
if (err) {
|
|
761
|
+
return callback(err);
|
|
762
|
+
}
|
|
763
|
+
if (typeof res !== "string") {
|
|
764
|
+
return callback();
|
|
765
|
+
}
|
|
766
|
+
let state;
|
|
767
|
+
const lines = res.split("\r\n");
|
|
768
|
+
for (let i = 0; i < lines.length; ++i) {
|
|
769
|
+
const parts = lines[i].split(":");
|
|
770
|
+
if (parts[0] === "cluster_state") {
|
|
771
|
+
state = parts[1];
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
if (state === "fail") {
|
|
776
|
+
debug("cluster state not ok (%s)", state);
|
|
777
|
+
callback(null, state);
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
callback();
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
resolveSrv(hostname) {
|
|
785
|
+
return new Promise((resolve, reject) => {
|
|
786
|
+
this.options.resolveSrv(hostname, (err, records) => {
|
|
787
|
+
if (err) {
|
|
788
|
+
return reject(err);
|
|
789
|
+
}
|
|
790
|
+
const self = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b));
|
|
791
|
+
function tryFirstOne(err) {
|
|
792
|
+
if (!sortedKeys.length) {
|
|
793
|
+
return reject(err);
|
|
794
|
+
}
|
|
795
|
+
const key = sortedKeys[0], group = groupedRecords[key], record = (0, util_1.weightSrvRecords)(group);
|
|
796
|
+
if (!group.records.length) {
|
|
797
|
+
sortedKeys.shift();
|
|
798
|
+
}
|
|
799
|
+
self.dnsLookup(record.name).then((host) => resolve({
|
|
800
|
+
host,
|
|
801
|
+
port: record.port,
|
|
802
|
+
}), tryFirstOne);
|
|
803
|
+
}
|
|
804
|
+
tryFirstOne();
|
|
805
|
+
});
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
dnsLookup(hostname) {
|
|
809
|
+
return new Promise((resolve, reject) => {
|
|
810
|
+
this.options.dnsLookup(hostname, (err, address) => {
|
|
811
|
+
if (err) {
|
|
812
|
+
debug("failed to resolve hostname %s to IP: %s", hostname, err.message);
|
|
813
|
+
reject(err);
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
debug("resolved hostname %s to IP %s", hostname, address);
|
|
817
|
+
resolve(address);
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Normalize startup nodes, and resolving hostnames to IPs.
|
|
824
|
+
*
|
|
825
|
+
* This process happens every time when #connect() is called since
|
|
826
|
+
* #startupNodes and DNS records may chanage.
|
|
827
|
+
*/
|
|
828
|
+
async resolveStartupNodeHostnames() {
|
|
829
|
+
if (!Array.isArray(this.startupNodes) || this.startupNodes.length === 0) {
|
|
830
|
+
throw new Error("`startupNodes` should contain at least one node.");
|
|
831
|
+
}
|
|
832
|
+
const startupNodes = (0, util_1.normalizeNodeOptions)(this.startupNodes);
|
|
833
|
+
const hostnames = (0, util_1.getUniqueHostnamesFromOptions)(startupNodes);
|
|
834
|
+
if (hostnames.length === 0) {
|
|
835
|
+
return startupNodes;
|
|
836
|
+
}
|
|
837
|
+
const configs = await Promise.all(hostnames.map((this.options.useSRVRecords ? this.resolveSrv : this.dnsLookup).bind(this)));
|
|
838
|
+
const hostnameToConfig = (0, utils_1.zipMap)(hostnames, configs);
|
|
839
|
+
return startupNodes.map((node) => {
|
|
840
|
+
const config = hostnameToConfig.get(node.host);
|
|
841
|
+
if (!config) {
|
|
842
|
+
return node;
|
|
843
|
+
}
|
|
844
|
+
if (this.options.useSRVRecords) {
|
|
845
|
+
return Object.assign({}, node, config);
|
|
846
|
+
}
|
|
847
|
+
return Object.assign({}, node, { host: config });
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
createScanStream(command, { key, options = {} }) {
|
|
851
|
+
return new ScanStream_1.default({
|
|
852
|
+
objectMode: true,
|
|
853
|
+
key: key,
|
|
854
|
+
redis: this,
|
|
855
|
+
command: command,
|
|
856
|
+
...options,
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
(0, applyMixin_1.default)(Cluster, events_1.EventEmitter);
|
|
861
|
+
(0, transaction_1.addTransactionSupport)(Cluster.prototype);
|
|
862
|
+
exports.default = Cluster;
|