Odoo GraphQL Subscription using Node, Express JS for Sample
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
34 KiB

4 months ago
{"version":3,"file":"bundle.cjs","sources":["es5/context.js","es5/helpers.js","es5/entry.js","es5/dep.js","es5/index.js"],"sourcesContent":["import { Slot } from \"@wry/context\";\nexport var parentEntrySlot = new Slot();\nexport function nonReactive(fn) {\n return parentEntrySlot.withValue(void 0, fn);\n}\nexport { Slot };\nexport { bind as bindContext, noContext, setTimeout, asyncFromGen, } from \"@wry/context\";\n//# sourceMappingURL=context.js.map","export var hasOwnProperty = Object.prototype.hasOwnProperty;\nexport var arrayFromSet = Array.from ||\n function (set) {\n var array = [];\n set.forEach(function (item) { return array.push(item); });\n return array;\n };\nexport function maybeUnsubscribe(entryOrDep) {\n var unsubscribe = entryOrDep.unsubscribe;\n if (typeof unsubscribe === \"function\") {\n entryOrDep.unsubscribe = void 0;\n unsubscribe();\n }\n}\n//# sourceMappingURL=helpers.js.map","import { parentEntrySlot } from \"./context.js\";\nimport { maybeUnsubscribe, arrayFromSet } from \"./helpers.js\";\nvar emptySetPool = [];\nvar POOL_TARGET_SIZE = 100;\n// Since this package might be used browsers, we should avoid using the\n// Node built-in assert module.\nfunction assert(condition, optionalMessage) {\n if (!condition) {\n throw new Error(optionalMessage || \"assertion failure\");\n }\n}\nfunction valueIs(a, b) {\n var len = a.length;\n return (\n // Unknown values are not equal to each other.\n len > 0 &&\n // Both values must be ordinary (or both exceptional) to be equal.\n len === b.length &&\n // The underlying value or exception must be the same.\n a[len - 1] === b[len - 1]);\n}\nfunction valueGet(value) {\n switch (value.length) {\n case 0: throw new Error(\"unknown value\");\n case 1: return value[0];\n case 2: throw value[1];\n }\n}\nfunction valueCopy(value) {\n return value.slice(0);\n}\nexport var Entry = /** @class */ (function () {\n function Entry(fn) {\n this.fn = fn;\n this.parents = new Set();\n this.childValues = new Map();\n // When this Entry has children that are dirty, this property becomes\n // a Set containing other Entry objects, borrowed from emptySetPool.\n // When the set becomes empty, it gets recycled back to emptySetPool.\n this.dirtyChildren = null;\n this.dirty = true;\n this.recomputing = false;\n this.value = [];\n this.deps = null;\n ++Entry.count;\n }\n Entry.prototype.peek = function () {\n if (this.value.length === 1 && !mightBeDirty(this)) {\n rememberParent(this);\n return this.value[0];\n }\n };\n // This is the most important method of the Entry API, because it\n // determines whether the cached this.value can be returned immediately,\n // or must be recomputed. The overall performance of the caching system\n // depends on the truth of the following observations: (1) this.dirty is\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\n // (3) valueGet(this.value) is usually returned without recomputation.\n Entry.prototype.recompute = function (args) {\n assert(!this.recomputing, \"already recomputing\");\n rememberParent(this);\n return mightBeDirty(this)\n ? reallyRecompute(this, args)\n : valueGet(this.value);\n };\n Entry.prototype.setDirty = function () {\n if (this.dirty)\n return;\n this.dirty = true;\n reportDirty(this);\n // We can go ahead and unsubscribe here, since any further dirty\n // notifications we receive will be redundant, and unsubscribing may\n // free up some resources, e.g. file watchers.\n maybeUnsubscribe(this);\n };\n Entry.prototype.dispose = function () {\n var _this = this;\n this.setDirty();\n // Sever any dependency relationships with our own children, so those\n // children don't retain