From c1bfeb390eddf3a1253571e44560cbdb259eeb17 Mon Sep 17 00:00:00 2001 From: "vikram.kalta@contentstack.com" Date: Fri, 10 Feb 2023 11:56:41 +0000 Subject: [PATCH 1/4] fix: fixed issue withgetReferencePath method --- package-lock.json | 4 ++-- src/stack.ts | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd79462d..442c38fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-filesystem-sdk", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "datasync-filesystem-sdk", - "version": "1.0.5", + "version": "1.0.6", "license": "MIT", "dependencies": { "json-mask": "0.3.8", diff --git a/src/stack.ts b/src/stack.ts index 4ecf40bb..591152dc 100755 --- a/src/stack.ts +++ b/src/stack.ts @@ -1279,7 +1279,7 @@ export class Stack { if (this.q.only) { const only = this.q.only.toString().replace(/\./g, '/') data = mask(data, only) - } else if (this.q.except) { + } else if (this.q.except.length) { const bukcet = this.q.except.toString().replace(/\./g, '/') const except = mask(data, bukcet) data = difference(data, except) @@ -1441,15 +1441,17 @@ export class Stack { for (let i = 0, j = currentInclude.length; i < j; i++) { const includePath = currentInclude[i] - // tslint:disable-next-line: forin for (const path in entryReferences) { - const subStrArr = includePath.split('.'); - if ((subStrArr.length && subStrArr[0] === path) || includePath === path) { + if (path.length > includePath.length) { + continue; + } + const subStr = includePath.slice(0, path.length); + if (subStr === path && (includePath[path.length] === '.' || includePath === subStr)) { let subPath // Its the complete path!! Hurrah! if (path.length !== includePath.length) { - subPath = subStrArr[0] + subPath = subStr pendingPath.push(includePath.slice(path.length + 1)) } else { subPath = includePath From 734cdbc36490e41962bbcb56844955834056134a Mon Sep 17 00:00:00 2001 From: Abhinav Date: Thu, 16 Feb 2023 12:09:27 +0530 Subject: [PATCH 2/4] fix: updated release workflow --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4e6a29d..171c6ac2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: node-version: "16.x" - run: npm install - - name: get-npm-version - id: package-version - uses: martinbeentjes/npm-get-version-action@master + - name: get-package-details + id: package + uses: codex-team/action-nodejs-package-info@v1.1 - name: install npm packall run: npm install npm-pack-all @@ -45,6 +45,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./datasync-filesystem-sdk-${{ steps.package-version.outputs.current-version }}.tgz - asset_name: datasync-filesystem-sdk-${{ steps.package-version.outputs.current-version }}.tgz + asset_path: ./${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz + asset_name: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz asset_content_type: application/tgz \ No newline at end of file From 158dfe313b2b2672450200d7818869cac61d88f5 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Tue, 28 Feb 2023 13:34:36 +0530 Subject: [PATCH 3/4] fix: addressed codeql fix --- docs/scripts/prettify/lang-css.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js index 041e1f59..b5ed1407 100644 --- a/docs/scripts/prettify/lang-css.js +++ b/docs/scripts/prettify/lang-css.js @@ -1,2 +1,2 @@ PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); +/^(?:<\!--|(--\>|--\!>))/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); From 079fdb4de25daa24d63302cfcbbfdd2b28ed6bb9 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Wed, 1 Mar 2023 17:53:00 +0530 Subject: [PATCH 4/4] fix: updated version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 442c38fd..6a31ecf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-filesystem-sdk", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "datasync-filesystem-sdk", - "version": "1.0.6", + "version": "1.0.7", "license": "MIT", "dependencies": { "json-mask": "0.3.8", diff --git a/package.json b/package.json index dd101bab..d74c8ac1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-filesystem-sdk", - "version": "1.0.6", + "version": "1.0.7", "description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem", "main": "dist/index.js", "scripts": {