Skip to content

Commit

Permalink
Merge pull request #23 from contentstack/fix/include_ref
Browse files Browse the repository at this point in the history
fix: fixed issue withgetReferencePath method
  • Loading branch information
aman19K authored Mar 1, 2023
2 parents c69820e + 079fdb4 commit f5e5e2b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- name: install npm packall
run: npm install npm-pack-all

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/scripts/prettify/lang-css.js

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

4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
12 changes: 7 additions & 5 deletions src/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f5e5e2b

Please sign in to comment.