/
opt
/
canhelp
/
node_modules
/
gel
/
dist
/
/opt/canhelp/node_modules/gel/dist
mkdir
upload
Name
Size
Mode
Actions
codecs/
-
0755
rm
datatypes/
-
0755
rm
errors/
-
0755
rm
primitives/
-
0755
rm
reflection/
-
0755
rm
baseClient.d.ts
5887
0644
edit
dl
rm
baseClient.js
19887
0644
edit
dl
rm
baseConn.d.ts
4890
0644
edit
dl
rm
baseConn.js
31588
0644
edit
dl
rm
browserClient.d.ts
200
0644
edit
dl
rm
browserClient.js
1212
0644
edit
dl
rm
browserCrypto.d.ts
91
0644
edit
dl
rm
browserCrypto.js
724
0644
edit
dl
rm
cli.mjs
7439
0755
edit
dl
rm
codecTypeRegistry.d.ts
195
0644
edit
dl
rm
codecTypeRegistry.js
77
0644
edit
dl
rm
conUtils.d.ts
5540
0644
edit
dl
rm
conUtils.js
36259
0644
edit
dl
rm
conUtils.server.d.ts
555
0644
edit
dl
rm
conUtils.server.js
3266
0644
edit
dl
rm
credentials.d.ts
561
0644
edit
dl
rm
credentials.js
4158
0644
edit
dl
rm
cryptoUtils.d.ts
106
0644
edit
dl
rm
cryptoUtils.js
811
0644
edit
dl
rm
fetchConn.d.ts
2800
0644
edit
dl
rm
fetchConn.js
7545
0644
edit
dl
rm
httpScram.d.ts
229
0644
edit
dl
rm
httpScram.js
3970
0644
edit
dl
rm
ifaces.d.ts
2530
0644
edit
dl
rm
ifaces.js
2847
0644
edit
dl
rm
index.browser.d.ts
867
0644
edit
dl
rm
index.browser.js
1973
0644
edit
dl
rm
index.node.d.ts
1275
0644
edit
dl
rm
index.node.js
3266
0644
edit
dl
rm
index.shared.d.ts
1896
0644
edit
dl
rm
index.shared.js
5486
0644
edit
dl
rm
nodeClient.d.ts
240
0644
edit
dl
rm
nodeClient.js
1529
0644
edit
dl
rm
nodeCrypto.d.ts
91
0644
edit
dl
rm
nodeCrypto.js
917
0644
edit
dl
rm
options.d.ts
4254
0644
edit
dl
rm
options.js
11249
0644
edit
dl
rm
platform.d.ts
124
0644
edit
dl
rm
platform.js
1731
0644
edit
dl
rm
rawConn.d.ts
1218
0644
edit
dl
rm
rawConn.js
17314
0644
edit
dl
rm
retry.d.ts
1153
0644
edit
dl
rm
retry.js
3925
0644
edit
dl
rm
scram.d.ts
1723
0644
edit
dl
rm
scram.js
6004
0644
edit
dl
rm
systemUtils.d.ts
483
0644
edit
dl
rm
systemUtils.js
3840
0644
edit
dl
rm
transaction.d.ts
1738
0644
edit
dl
rm
transaction.js
8113
0644
edit
dl
rm
typeutil.d.ts
243
0644
edit
dl
rm
typeutil.js
77
0644
edit
dl
rm
utils.d.ts
1925
0644
edit
dl
rm
utils.js
3727
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/gel/dist/options.js
(11249B)
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Options = exports.TransactionOptions = exports.RetryOptions = exports.logWarnings = exports.throwWarnings = exports.RetryCondition = exports.IsolationLevel = void 0; exports.defaultBackoff = defaultBackoff; const errors = __importStar(require("./errors/index")); const buffer_1 = require("./primitives/buffer"); const record_1 = require("./codecs/record"); const context_1 = require("./codecs/context"); function defaultBackoff(attempt) { return 2 ** attempt * 100 + Math.random() * 100; } var IsolationLevel; (function (IsolationLevel) { IsolationLevel["Serializable"] = "Serializable"; IsolationLevel["RepeatableRead"] = "RepeatableRead"; IsolationLevel["PreferRepeatableRead"] = "PreferRepeatableRead"; })(IsolationLevel || (exports.IsolationLevel = IsolationLevel = {})); var RetryCondition; (function (RetryCondition) { RetryCondition[RetryCondition["TransactionConflict"] = 0] = "TransactionConflict"; RetryCondition[RetryCondition["NetworkError"] = 1] = "NetworkError"; })(RetryCondition || (exports.RetryCondition = RetryCondition = {})); class RetryRule { attempts; backoff; constructor(attempts, backoff) { this.attempts = attempts; this.backoff = backoff; } } const throwWarnings = (warnings) => { throw new AggregateError(warnings, formatWarnings(warnings)); }; exports.throwWarnings = throwWarnings; const logWarnings = (warnings) => { const merged = new Error(formatWarnings(warnings)); console.warn(Object.assign(merged, { name: "" })); }; exports.logWarnings = logWarnings; const formatWarnings = (warnings) => `warnings occurred while running query:\n${warnings.map((warn) => warn.message).join("\n")}`; class RetryOptions { default; overrides; constructor(attempts = 3, backoff = defaultBackoff) { this.default = new RetryRule(attempts, backoff); this.overrides = new Map(); } withRule(condition, attempts, backoff) { const def = this.default; const overrides = new Map(this.overrides); overrides.set(condition, new RetryRule(attempts ?? def.attempts, backoff ?? def.backoff)); const result = Object.create(RetryOptions.prototype); result.default = def; result.overrides = overrides; return result; } getRuleForException(err) { let result; if (err instanceof errors.TransactionConflictError) { result = this.overrides.get(RetryCondition.TransactionConflict); } else if (err instanceof errors.ClientError) { result = this.overrides.get(RetryCondition.NetworkError); } return result ?? this.default; } static defaults() { return _retryOptionsDefault; } } exports.RetryOptions = RetryOptions; const _retryOptionsDefault = new RetryOptions(); class TransactionOptions { isolation; readonly; deferrable; constructor({ isolation, readonly, deferrable, } = {}) { this.isolation = isolation; this.readonly = readonly; this.deferrable = deferrable; } isDefault() { return (this.isolation === undefined && this.readonly === undefined && this.deferrable === undefined); } static defaults() { return _defaultTransactionOptions; } } exports.TransactionOptions = TransactionOptions; const _defaultTransactionOptions = new TransactionOptions(); const TAG_ANNOTATION_KEY = "tag"; class Options { static schemaVersion = 0; module; moduleAliases; config; globals; retryOptions; transactionOptions; codecs; warningHandler; annotations = new Map(); cachedCodecContext = null; cachedCodecContextVer = -1; get tag() { return this.annotations.get(TAG_ANNOTATION_KEY) ?? null; } static signalSchemaChange() { this.schemaVersion += 1; } constructor({ retryOptions = RetryOptions.defaults(), transactionOptions = TransactionOptions.defaults(), warningHandler = exports.logWarnings, module = "default", moduleAliases = {}, config = {}, globals = {}, codecs = {}, } = {}) { this.retryOptions = retryOptions; this.transactionOptions = transactionOptions; this.warningHandler = warningHandler; this.module = module; this.moduleAliases = new Map(Object.entries(moduleAliases)); this.config = new Map(Object.entries(config)); this.globals = new Map(Object.entries(globals)); this.codecs = new Map(Object.entries(codecs)); } makeCodecContext() { if (this.codecs.size === 0) { return context_1.NOOP_CODEC_CONTEXT; } if (this.cachedCodecContextVer === Options.schemaVersion) { return this.cachedCodecContext; } const ctx = new context_1.CodecContext(this.codecs); this.cachedCodecContext = ctx; this.cachedCodecContextVer = Options.schemaVersion; return ctx; } _cloneWith(mergeOptions) { const clone = Object.create(Options.prototype); clone.annotations = this.annotations; clone.retryOptions = mergeOptions.retryOptions ?? this.retryOptions; clone.transactionOptions = mergeOptions.transactionOptions ?? this.transactionOptions; clone.warningHandler = mergeOptions.warningHandler ?? this.warningHandler; if (mergeOptions.config != null) { clone.config = new Map([ ...this.config, ...Object.entries(mergeOptions.config), ]); } else { clone.config = this.config; } if (mergeOptions.globals != null) { clone.globals = new Map([ ...this.globals, ...Object.entries(mergeOptions.globals), ]); } else { clone.globals = this.globals; } if (mergeOptions.moduleAliases != null) { clone.moduleAliases = new Map([ ...this.moduleAliases, ...Object.entries(mergeOptions.moduleAliases), ]); } else { clone.moduleAliases = this.moduleAliases; } if (mergeOptions.codecs != null) { clone.codecs = new Map([ ...this.codecs, ...Object.entries(mergeOptions.codecs), ]); } else { clone.codecs = this.codecs; clone.cachedCodecContext = this.cachedCodecContext; clone.cachedCodecContextVer = this.cachedCodecContextVer; } if (mergeOptions._dropSQLRowCodec && clone.codecs.has("_private_sql_row")) { if (clone.codecs === this.codecs) { clone.codecs = new Map(clone.codecs); clone.cachedCodecContext = null; clone.cachedCodecContextVer = -1; } clone.codecs.delete("_private_sql_row"); } clone.module = mergeOptions.module ?? this.module; return clone; } _serialise() { const state = {}; if (this.module !== "default") { state.module = this.module; } if (this.moduleAliases.size) { state.aliases = Array.from(this.moduleAliases.entries()); } if (this.config.size) { state.config = Object.fromEntries(this.config.entries()); } if (this.globals.size) { const globs = {}; for (const [key, val] of this.globals.entries()) { globs[key.includes("::") ? key : `${this.module}::${key}`] = val; } state.globals = globs; } return state; } withModuleAliases({ module, ...aliases }) { return this._cloneWith({ module: module ?? this.module, moduleAliases: aliases, }); } withConfig(config) { return this._cloneWith({ config }); } withCodecs(codecs) { return this._cloneWith({ codecs }); } withSQLRowMode(mode) { if (mode === "object") { return this._cloneWith({ _dropSQLRowCodec: true }); } else if (mode === "array") { return this._cloneWith({ codecs: record_1.SQLRowModeArray }); } else { throw new errors.InterfaceError(`invalid mode=${mode}`); } } withGlobals(globals) { return this._cloneWith({ globals: { ...this.globals, ...globals }, }); } withQueryTag(tag) { const annos = new Map(this.annotations); if (tag != null) { if (tag.startsWith("edgedb/")) { throw new errors.InterfaceError("reserved tag: edgedb/*"); } if (tag.startsWith("gel/")) { throw new errors.InterfaceError("reserved tag: gel/*"); } if (buffer_1.utf8Encoder.encode(tag).length > 128) { throw new errors.InterfaceError("tag too long (> 128 bytes)"); } annos.set(TAG_ANNOTATION_KEY, tag); } else { annos.delete(TAG_ANNOTATION_KEY); } const clone = this._cloneWith({}); clone.annotations = annos; return clone; } withTransactionOptions(opt) { return this._cloneWith({ transactionOptions: opt instanceof TransactionOptions ? opt : new TransactionOptions(opt), }); } withRetryOptions(opt) { return this._cloneWith({ retryOptions: opt instanceof RetryOptions ? opt : new RetryOptions(opt.attempts, opt.backoff), }); } withWarningHandler(handler) { return this._cloneWith({ warningHandler: handler }); } isDefaultSession() { return (this.config.size === 0 && this.globals.size === 0 && this.moduleAliases.size === 0 && this.module === "default" && this.transactionOptions.isDefault()); } static defaults() { return _defaultOptions; } } exports.Options = Options; const _defaultOptions = new Options();
Save
cmd:
run