@contentstack/datasync-manager 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -198,5 +198,5 @@ exports.buildAssetObject = (asset, locale, entry_uid, content_type_uid) => {
198
198
  return Object.assign(Object.assign({ _content_type_uid: '_assets' }, asset), { _type: 'publish', entry_content_type: content_type_uid, entry_reffered_in: entry_uid, locale, uid: asset.uid });
199
199
  };
200
200
  exports.sanitizePath = (str) => {
201
- return str === null || str === void 0 ? void 0 : str.replace(/^(\.\.(\/|\\|$))+/, '');
201
+ return str === null || str === void 0 ? void 0 : str.replace(/^([\/\\]){2,}/, "./").replace(/[\/\\]+/g, "/").replace(/(\.\.(\/|\\|$))+/g, ""); // Remove directory traversal (../ or ..\)
202
202
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/datasync-manager",
3
3
  "author": "Contentstack LLC <support@contentstack.com>",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "description": "The primary module of Contentstack DataSync. Syncs Contentstack data with your server using Contentstack Sync API",
6
6
  "main": "dist/index.js",
7
7
  "dependencies": {
8
8
  "@braintree/sanitize-url": "^7.1.1",
9
- "debug": "^4.4.0",
9
+ "debug": "^4.4.1",
10
10
  "dns-socket": "^4.2.2",
11
11
  "lodash": "^4.17.21",
12
12
  "marked": "^4.3.0",
@@ -27,10 +27,12 @@
27
27
  "@types/rimraf": "2.0.5",
28
28
  "@types/write-file-atomic": "2.1.2",
29
29
  "eslint": "^8.57.1",
30
+ "husky": "^9.1.7",
30
31
  "jest": "^29.7.0",
31
32
  "jest-html-reporter": "^3.10.2",
32
33
  "mkdirp": "^1.0.4",
33
34
  "nock": "^10.0.6",
35
+ "node-notifier": "^10.0.1",
34
36
  "rimraf": "^2.7.1",
35
37
  "semantic-release": "^24.2.1",
36
38
  "ts-jest": "^29.2.5",
@@ -47,7 +49,8 @@
47
49
  "tslint": "npx tslint -c tslint.json 'src/**/*.ts' --fix",
48
50
  "test": "PLUGIN_PATH=./test/dummy jest --colors --coverage --verbose",
49
51
  "lint": "eslint",
50
- "semantic-release": "semantic-release"
52
+ "semantic-release": "semantic-release",
53
+ "husky-check": "npx husky && chmod +x .husky/pre-commit"
51
54
  },
52
55
  "engines": {
53
56
  "node": ">=8"