From 007cd61febe6b6ff5f639eec9a2bc4347abb6ed1 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 13 Jul 2026 17:16:45 +0530 Subject: [PATCH 1/5] fix: recover sync loop after transient Sync API timeout --- src/api.ts | 77 +++++++++++++++++++++++++++++++++++---------- src/core/index.ts | 29 ++++++++++++++--- src/core/inet.ts | 6 +++- src/core/process.ts | 5 ++- 4 files changed, 93 insertions(+), 24 deletions(-) diff --git a/src/api.ts b/src/api.ts index 515cbfe..3c780b0 100644 --- a/src/api.ts +++ b/src/api.ts @@ -100,8 +100,26 @@ export const init = (contentstack) => { */ export const get = (req, RETRY = 1) => { return new Promise((resolve, reject) => { + // Ensure this request settles exactly once. Previously a socket timeout both + // reject()ed AND (via destroy() -> 'error') scheduled a detached retry whose + // result landed on an already-settled promise and was silently discarded. + let settled = false + let retryScheduled = false + const resolveOnce = (value) => { + if (!settled) { + settled = true + resolve(value) + } + } + const rejectOnce = (err) => { + if (!settled) { + settled = true + reject(err) + } + } + if (RETRY > MAX_RETRY_LIMIT) { - return reject(new Error('Max retry limit exceeded!')) + return rejectOnce(new Error('Max retry limit exceeded!')) } req.method = Contentstack.verbs.get req.path = req.path || Contentstack.apis.sync @@ -149,15 +167,15 @@ export const get = (req, RETRY = 1) => { .on('end', () => { debug(MESSAGES.API.STATUS(response.statusCode)) if (response.statusCode >= 200 && response.statusCode <= 399) { - return resolve(JSON.parse(body)) + return resolveOnce(JSON.parse(body)) } else if (response.statusCode === 429) { timeDelay = Math.pow(Math.SQRT2, RETRY) * RETRY_DELAY_BASE debug(MESSAGES.API.RATE_LIMIT(options.path, timeDelay)) return setTimeout(() => { return get(req, RETRY) - .then(resolve) - .catch(reject) + .then(resolveOnce) + .catch(rejectOnce) }, timeDelay) } else if (response.statusCode >= 500) { // retry, with delay @@ -167,8 +185,8 @@ export const get = (req, RETRY = 1) => { return setTimeout(() => { return get(req, RETRY) - .then(resolve) - .catch(reject) + .then(resolveOnce) + .catch(rejectOnce) }, timeDelay) } else { // Enhanced error handling for Error 141 (Invalid sync_token) @@ -203,8 +221,8 @@ export const get = (req, RETRY = 1) => { return setTimeout(() => { return get(req, RETRY) - .then(resolve) - .catch(reject) + .then(resolveOnce) + .catch(rejectOnce) }, timeDelay) } else { debug('Error 141 recovery already attempted, failing to prevent infinite loop') @@ -216,7 +234,7 @@ export const get = (req, RETRY = 1) => { } debug(MESSAGES.API.REQUEST_FAILED(options)) - return reject(body) + return rejectOnce(body) } }) }) @@ -224,17 +242,42 @@ export const get = (req, RETRY = 1) => { // Set socket timeout to handle socket hang ups httpRequest.setTimeout(options.timeout, () => { debug(MESSAGES.API.REQUEST_TIMEOUT(options.path)) - httpRequest.destroy() + if (settled) { + return + } const timeoutError = Object.assign(new Error('Request timeout'), { code: 'ETIMEDOUT', }) as Error & { code: string } - reject(timeoutError) + // Retry the timed-out request in place so a subsequent success actually + // settles THIS promise (and the sync_token/checkpoint advances). Mark + // retryScheduled so the destroy()-triggered 'error' does not double-handle. + if (RETRY < MAX_RETRY_LIMIT) { + retryScheduled = true + timeDelay = Math.pow(Math.SQRT2, RETRY) * RETRY_DELAY_BASE + RETRY++ + debug(`Request timeout: waiting ${timeDelay}ms before retry ${RETRY}/${MAX_RETRY_LIMIT}`) + httpRequest.destroy() + + return setTimeout(() => { + return get(req, RETRY) + .then(resolveOnce) + .catch(rejectOnce) + }, timeDelay) + } + httpRequest.destroy() + return rejectOnce(timeoutError) }) // Enhanced error handling for network and connection errors httpRequest.on('error', (error: any) => { debug(MESSAGES.API.REQUEST_ERROR(options.path, error?.message, error?.code)) - + + // Ignore errors once the promise has settled or a retry is already scheduled + // (e.g. the 'error' emitted by our own destroy() inside the timeout handler). + if (settled || retryScheduled) { + return + } + // List of retryable network error codes const retryableErrors = [ 'ECONNRESET', // Connection reset by peer @@ -259,17 +302,17 @@ export const get = (req, RETRY = 1) => { return setTimeout(() => { return get(req, RETRY) - .then(resolve) - .catch(reject) + .then(resolveOnce) + .catch(rejectOnce) }, timeDelay) } - - return reject(error) + + return rejectOnce(error) }) httpRequest.end() } catch (error) { - return reject(error) + return rejectOnce(error) } }) } diff --git a/src/core/index.ts b/src/core/index.ts index b0c4bef..5df60bd 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -197,6 +197,11 @@ const check = async () => { } catch (error) { logger.error(error) debug(MESSAGES.SYNC_CORE.CHECK_ERROR, error); + // Invariant: always release the sync gate on ANY failure (network or not), + // so the next notify/poke can restart syncing. Several failure paths (e.g. a + // non-network content-type schema error, filterItems/plugin errors, or a + // failed checkpoint save) otherwise left SQ=true and wedged the loop shut. + flag.SQ = false check().then(() => { debug(MESSAGES.SYNC_CORE.CHECK_RECOVERED); }).catch((error) => { @@ -251,11 +256,18 @@ export const unlock = (refire?: boolean) => { debug(MESSAGES.SYNC_CORE.SYNC_UNLOCKED, refire) flag.lockdown = false if (typeof refire === 'boolean' && refire) { + // Fully re-arm the sync gate. Clearing lockdown alone is not enough: the + // failed sync left SQ=true / WQ=false, so check()'s (!SQ && WQ) gate would + // stay shut and sync would never resume. + flag.SQ = false flag.WQ = true - if (flag.requestCache && Object.keys(flag.requestCache)) { - return fire(flag.requestCache.params) - .then(flag.requestCache.resolve) - .catch(flag.requestCache.reject) + if (flag.requestCache && Object.keys(flag.requestCache).length) { + const cached = flag.requestCache + // Clear before replaying so a later unlock() cannot re-fire a stale request + flag.requestCache = undefined + return fire(cached.params) + .then(cached.resolve) + .catch(cached.reject) } } return check() @@ -439,4 +451,11 @@ const postProcess = (req, resp) => { }) } -emitter.on('check', check) +// check() rejects on a failed sync; when invoked as an event callback that +// rejection would be unhandled and trip the process-level lockdown. Catch it +// here — check()'s own catch already released the gate, so the next poke resumes. +emitter.on('check', () => { + check().catch((error) => { + debug(MESSAGES.SYNC_CORE.CHECK_FAILED, error) + }) +}) diff --git a/src/core/inet.ts b/src/core/inet.ts index 4573491..ec661a0 100644 --- a/src/core/inet.ts +++ b/src/core/inet.ts @@ -69,7 +69,11 @@ export const checkNetConnectivity = () => { emitter.emit('disconnected', currentTimeout += sm.inet.retryIncrement) }) } else if (disconnected) { - poke() + // poke() rejects if the resumed sync fails; without a catch that rejection + // would be unhandled and trip the process-level lockdown. + poke().catch((error) => { + debug('poke after reconnect failed:', error) + }) } disconnected = false diff --git a/src/core/process.ts b/src/core/process.ts index fe17813..98f7459 100644 --- a/src/core/process.ts +++ b/src/core/process.ts @@ -38,7 +38,10 @@ const unhandledErrors = (error) => { logger.error(error) lock() setTimeout(() => { - unlock() + // Pass refire=true so recovery re-arms the sync gate (resets SQ, sets WQ) + // and replays/continues syncing. unlock() with no arg only cleared the + // lockdown flag and left the gate closed, permanently stopping sync. + unlock(true) }, 10000) } From 6c21a0d48d6c931262648fda530cbab29741d700 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 13 Jul 2026 18:36:48 +0530 Subject: [PATCH 2/5] fix: strip stale query string before rebuilding retry URL --- src/api.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index 3c780b0..14a2397 100644 --- a/src/api.ts +++ b/src/api.ts @@ -122,7 +122,11 @@ export const get = (req, RETRY = 1) => { return rejectOnce(new Error('Max retry limit exceeded!')) } req.method = Contentstack.verbs.get - req.path = req.path || Contentstack.apis.sync + // Strip any previously-appended query string. On a retry, req.path already + // holds the fully-built path (base + '?' + qs) from the prior attempt; without + // this, the query string would be appended again, producing a malformed URL + // like '/v3/stacks/sync?...&sync_token=x?...&sync_token=x' that the API rejects. + req.path = (req.path || Contentstack.apis.sync).split('?')[0] if (req.qs) { req.path += `?${stringify(req.qs)}` } From 9060d24eadc5265dde6ab6ade1918299ef1129dd Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 13 Jul 2026 19:05:42 +0530 Subject: [PATCH 3/5] fix: prevent unlock() rejection from re-triggering lockdown unlock() returned check()/fire(), which reject on a sync failure. Callers (process.ts, q.ts) invoke unlock() fire-and-forget, so that rejection could surface as an unhandled rejection and re-trip the process-level lockdown, undoing the recovery this PR adds. Attach a .catch to both the requestCache replay and the check() call so unlock() handles/logs its own errors and is a safe, self-contained gate toggle. --- src/core/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/index.ts b/src/core/index.ts index 5df60bd..3516197 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -255,6 +255,13 @@ export const lock = () => { export const unlock = (refire?: boolean) => { debug(MESSAGES.SYNC_CORE.SYNC_UNLOCKED, refire) flag.lockdown = false + // Callers (process.ts, q.ts) invoke unlock() fire-and-forget. check()/fire() + // reject on a sync failure and would otherwise surface as an UNHANDLED rejection + // that re-trips the process-level lockdown, undoing the recovery this enables. + // Swallow+log here so unlock() is a safe, self-contained gate toggle for callers. + const swallow = (error) => { + debug(MESSAGES.SYNC_CORE.CHECK_FAILED, error) + } if (typeof refire === 'boolean' && refire) { // Fully re-arm the sync gate. Clearing lockdown alone is not enough: the // failed sync left SQ=true / WQ=false, so check()'s (!SQ && WQ) gate would @@ -268,9 +275,10 @@ export const unlock = (refire?: boolean) => { return fire(cached.params) .then(cached.resolve) .catch(cached.reject) + .catch(swallow) } } - return check() + return check().catch(swallow) } /** From 97968915e8a2d318baf3cac81da8f4e74e902fe8 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Tue, 14 Jul 2026 14:57:38 +0530 Subject: [PATCH 4/5] fix: guard success-path JSON.parse against invalid response body --- src/api.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index 14a2397..94d1da4 100644 --- a/src/api.ts +++ b/src/api.ts @@ -171,7 +171,15 @@ export const get = (req, RETRY = 1) => { .on('end', () => { debug(MESSAGES.API.STATUS(response.statusCode)) if (response.statusCode >= 200 && response.statusCode <= 399) { - return resolveOnce(JSON.parse(body)) + // JSON.parse can throw on an empty/invalid body despite a 2xx/3xx. + // This runs in the 'end' handler, so an uncaught throw would bypass + // rejectOnce and crash the process / re-trigger the global lockdown. + try { + return resolveOnce(JSON.parse(body)) + } catch (parseError) { + debug('Failed to parse success response body:', parseError) + return rejectOnce(parseError) + } } else if (response.statusCode === 429) { timeDelay = Math.pow(Math.SQRT2, RETRY) * RETRY_DELAY_BASE debug(MESSAGES.API.RATE_LIMIT(options.path, timeDelay)) From ecd63ee348563c535e6ab693283558e9eb6c922d Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 20 Jul 2026 10:44:54 +0530 Subject: [PATCH 5/5] version bump --- .talismanrc | 2 +- package-lock.json | 179 ++++++++++++++++++++++++---------------------- package.json | 2 +- 3 files changed, 97 insertions(+), 86 deletions(-) diff --git a/.talismanrc b/.talismanrc index 4b76bf6..971e1f3 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,4 @@ fileignoreconfig: - filename: package-lock.json - checksum: 5dab4208809200f3cab793ed637374cf179586971b634e7113e448b7d71ca789 + checksum: ff3ab95f21c9178978a26eab11cb1282cc12c424f304dde620d0fcec3d34e41e version: "" diff --git a/package-lock.json b/package-lock.json index 18d04ab..10f2a98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/datasync-manager", - "version": "2.4.0-beta.5", + "version": "2.4.0-beta.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/datasync-manager", - "version": "2.4.0-beta.5", + "version": "2.4.0-beta.6", "license": "MIT", "dependencies": { "@braintree/sanitize-url": "^7.1.2", @@ -723,9 +723,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz", + "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==", "dev": true, "license": "MIT", "dependencies": { @@ -1332,9 +1332,9 @@ } }, "node_modules/@octokit/request": { - "version": "10.0.10", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.10.tgz", - "integrity": "sha512-KxNC2pTqqhszMNrf12ZRd4PonRgyJdsM4F/jySiddQK+DsRcfBtUvqn8t7UsyZhnRJHvX46OohDt5N3VqIWC2w==", + "version": "10.0.11", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.11.tgz", + "integrity": "sha512-+s7HUxjfFqOMS9VlIwDffq0MikjSAK0gSpG73W+meAvVAvX4MBrHYTK5Bj3Uot55qFT4gzUtfzE4mGWY4Br8/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1403,9 +1403,9 @@ "license": "ISC" }, "node_modules/@pnpm/npm-conf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-3.0.2.tgz", - "integrity": "sha512-h104Kh26rR8tm+a3Qkc5S4VLYint3FE48as7+/5oCEcKR2idC/pF1G6AhIXKI+eHPJa/3J9i5z0Al47IeGHPkA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-3.0.3.tgz", + "integrity": "sha512-//0sR/cow/s4ICQaYoAobOl4aU8cjU6x/V24V7XkKotb9+O+3zySIYp146vpaobYHnxa4pZX8NkV54Z5AwbDKA==", "dev": true, "license": "MIT", "dependencies": { @@ -1864,9 +1864,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.27.10", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", - "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "version": "0.27.12", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.12.tgz", + "integrity": "sha512-hhyNJ+nbR6ZR7pToHvllEFun9TL0sbL+tk/ON75lo+Xas054uez98qRbsuNt7MBCyZKK4+8Yli/OAGZhmfBZ/g==", "dev": true, "license": "MIT" }, @@ -2131,16 +2131,16 @@ "license": "MIT" }, "node_modules/@ungap/structured-clone": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz", - "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.3.tgz", + "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", "dev": true, "license": "ISC" }, "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", "dev": true, "license": "MIT", "bin": { @@ -2452,9 +2452,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.32", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.32.tgz", - "integrity": "sha512-wbPvpyjJPC0zdfdKXxqEL3Ea+bOMD/87X4lftiJkkaBiuG6ALQy1SLmEd7BSmVCuwCQsBrCamgBoLyfFDD1EPg==", + "version": "2.10.43", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz", + "integrity": "sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2479,9 +2479,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -2503,9 +2503,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.6.tgz", + "integrity": "sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==", "dev": true, "funding": [ { @@ -2523,10 +2523,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", + "baseline-browser-mapping": "^2.10.42", + "caniuse-lite": "^1.0.30001803", + "electron-to-chromium": "^1.5.389", + "node-releases": "^2.0.51", "update-browserslist-db": "^1.2.3" }, "bin": { @@ -2665,9 +2665,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001793", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz", - "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==", + "version": "1.0.30001806", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz", + "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==", "dev": true, "funding": [ { @@ -2822,9 +2822,9 @@ } }, "node_modules/cli-highlight/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "16.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.2.tgz", + "integrity": "sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==", "dev": true, "license": "MIT", "dependencies": { @@ -3070,9 +3070,9 @@ "license": "MIT" }, "node_modules/cosmiconfig": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz", - "integrity": "sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.2.tgz", + "integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==", "dev": true, "license": "MIT", "dependencies": { @@ -3457,9 +3457,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.364", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.364.tgz", - "integrity": "sha512-G/dYE3+AYhyHwzTwg8UbnXf7zqMERYh7l2jJ3QujhFsH8agSYwtnGAR2aZ7f0AakIKJXd5En/Hre4igIUrdlYw==", + "version": "1.5.393", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.393.tgz", + "integrity": "sha512-kiDJdIUawuEIcp9XoICKp1iTYDEbgguIPq526N1Q7jIQDeQ3CqoMx71025PI/7E48Ddtw2HuWsVjY7afEgNxmg==", "dev": true, "license": "ISC" }, @@ -4133,9 +4133,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.5", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.5.tgz", - "integrity": "sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.6.tgz", + "integrity": "sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==", "dev": true, "license": "MIT", "dependencies": { @@ -5765,10 +5765,20 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -5833,9 +5843,9 @@ "license": "ISC" }, "node_modules/json-with-bigint": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.8.tgz", - "integrity": "sha512-eq/4KP6K34kwa7TcFdtvnftvHCD9KvHOGGICWwMFc4dOOKF5t4iYqnfLK8otCRCRv06FXOzGGyqE8h8ElMvvdw==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.10.tgz", + "integrity": "sha512-Vcx+JVNEBts/xfcoCS69sKrOhOk/3TVlvlT+XzUOefVKnnrbYSCKpDCm10pohsJFtsJVYnwa/cXRZ4eElzaM6w==", "dev": true, "license": "MIT" }, @@ -6479,9 +6489,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.46", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz", - "integrity": "sha512-GYVXHE2KnrzAfsAjl4uP++evGFCrAU1jta4ubEjIG7YWt/64Gqv66a30yKwWczVjA6j3bM4nBwH7Pk1JmDHaxQ==", + "version": "2.0.51", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz", + "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==", "dev": true, "license": "MIT", "engines": { @@ -9243,9 +9253,9 @@ } }, "node_modules/p-map": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz", - "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.5.tgz", + "integrity": "sha512-e8vJF4XdVkzqqSHguEMz41mQO1wKwxKm5ENrUJQUu9kLDCtn83cxbyHZcszr4QC5zEA7WffRRC4gsTecC7J9oA==", "dev": true, "license": "MIT", "engines": { @@ -9742,13 +9752,14 @@ } }, "node_modules/qs": { - "version": "6.15.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", - "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", + "version": "6.15.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", + "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.1.0" + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" }, "engines": { "node": ">=0.6" @@ -10775,9 +10786,9 @@ } }, "node_modules/semver": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", - "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -10882,15 +10893,15 @@ "license": "MIT" }, "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" }, @@ -11561,9 +11572,9 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { @@ -11596,9 +11607,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", "engines": { @@ -11841,9 +11852,9 @@ } }, "node_modules/tslint/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz", + "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==", "dev": true, "license": "MIT", "dependencies": { @@ -12255,9 +12266,9 @@ "license": "ISC" }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1afe5f3..ef040f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/datasync-manager", "author": "Contentstack LLC ", - "version": "2.4.0-beta.5", + "version": "2.4.0-beta.6", "description": "The primary module of Contentstack DataSync. Syncs Contentstack data with your server using Contentstack Sync API", "main": "dist/index.js", "dependencies": {