Skip to content

Commit

Permalink
Build and Generate Docs - BOT
Browse files Browse the repository at this point in the history
  • Loading branch information
exweiv-bot committed Jan 13, 2025
1 parent 5ac7be4 commit c121a00
Show file tree
Hide file tree
Showing 114 changed files with 253 additions and 262 deletions.
11 changes: 4 additions & 7 deletions app/lib/Connection/automatic_connection_provider.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useClient = useClient;
exports.getClientCache = getClientCache;
const mongodb_1 = require("mongodb");
const permission_helpers_1 = require("./permission_helpers");
const connection_helpers_1 = require("../Helpers/connection_helpers");
const node_cache_1 = __importDefault(require("node-cache"));
const cacheable_1 = require("cacheable");
const error_manager_1 = require("../Errors/error_manager");
const clientCache = new node_cache_1.default({ useClones: false });
const clientCache = new cacheable_1.CacheableMemory({ useClone: false, ttl: undefined });
let nodeCacheListeners = false;
async function setupClient(uri, role) {
try {
Expand Down Expand Up @@ -55,10 +52,10 @@ const connectClient = async (client, uri) => {
try {
if (!listenersMap.has(uri.slice(14, 40))) {
const handleClose = async () => {
clientCache.del(uri.slice(14, 40));
clientCache.delete(uri.slice(14, 40));
};
const handleError = async () => {
clientCache.del(uri.slice(14, 40));
clientCache.delete(uri.slice(14, 40));
(0, error_manager_1.kaptanLogar)("00009", `when trying to connect client (connection error): ${uri.slice(14, 40)}`);
};
client.on('close', handleClose);
Expand Down
4 changes: 2 additions & 2 deletions app/lib/Connection/permission_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ exports.getMongoURI = getMongoURI;
exports.getPermissionsCache = getPermissionsCache;
const wix_users_backend_1 = require("wix-users-backend");
const secret_helpers_1 = require("../Helpers/secret_helpers");
const node_cache_1 = __importDefault(require("node-cache"));
const cacheable_1 = require("cacheable");
const crypto_js_1 = __importDefault(require("crypto-js"));
const encrypt_helpers_1 = require("../Helpers/encrypt_helpers");
const error_manager_1 = require("../Errors/error_manager");
const cache = new node_cache_1.default({ useClones: false, deleteOnExpire: true });
const cache = new cacheable_1.CacheableMemory({ useClone: false, checkInterval: 5000 });
async function getMongoURI(suppressAuth = false) {
try {
if (suppressAuth != true) {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/Functions/flushCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function flushCache(filters) {
cachesToFlush.push(cacheValue);
}
for (const cacheData of cachesToFlush) {
cacheData.flushAll();
cacheData.clear();
}
}
catch (err) {
Expand Down
13 changes: 5 additions & 8 deletions app/lib/Functions/isReferenced.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isReferenced = isReferenced;
exports.getIsReferencedCache = getIsReferencedCache;
const connection_helpers_1 = require("../Helpers/connection_helpers");
const validator_1 = require("../Helpers/validator");
const node_cache_1 = __importDefault(require("node-cache"));
const cacheable_1 = require("cacheable");
const error_manager_1 = require("../Errors/error_manager");
const cache = new node_cache_1.default({
checkperiod: 5,
useClones: false,
deleteOnExpire: true
const cache = new cacheable_1.CacheableMemory({
checkInterval: 5000,
useClone: false,
ttl: 10 * 1000
});
async function isReferenced(collectionId, propertyName, referringItem, referencedItem, options) {
try {
Expand Down
7 changes: 2 additions & 5 deletions app/lib/Helpers/secret_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCachedSecret = getCachedSecret;
exports.getHelperSecretsCache = getHelperSecretsCache;
const wix_secrets_backend_v2_1 = require("wix-secrets-backend.v2");
const wixAuth = __importStar(require("wix-auth"));
const node_cache_1 = __importDefault(require("node-cache"));
const cacheable_1 = require("cacheable");
const error_manager_1 = require("../Errors/error_manager");
const cache = new node_cache_1.default();
const cache = new cacheable_1.CacheableMemory({ useClone: false, ttl: undefined });
const getSecretValue = wixAuth.elevate(wix_secrets_backend_v2_1.secrets.getSecretValue);
async function getCachedSecret(secretName, parse) {
try {
Expand Down
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/functions/Hooks.afterCount.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">context</span>: <a href="../types/Hooks.HookContext.html" class="tsd-signature-type tsd-kind-type-alias">HookContext</a></span><div class="tsd-comment tsd-typography"><p>Contextual information about the hook.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span></h4><p>The count to return to <code>count()</code> instead of the original count. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the <code>onFailure()</code> hook.</p>
<div class="tsd-comment tsd-typography"><div class="tsd-tag-description"><h4 class="tsd-anchor-link"><a id="description" class="tsd-anchor"></a>Description<a href="#description" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>A hook that is triggered after a <code>count()</code> operation.</p>
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ExWeiv/weiv-data/blob/f80b33166ac17b4d68957a953c768d500e0a8b78/app/weivdata.d.ts#L1627">weivdata.d.ts:1627</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">WeivData API Reference | ExWeiv Apps</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ExWeiv/weiv-data/blob/5ac7be410e5c2e062ecb7bc05fb17efb9b8c67db/app/weivdata.d.ts#L1627">weivdata.d.ts:1627</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">WeivData API Reference | ExWeiv Apps</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
Loading

0 comments on commit c121a00

Please sign in to comment.