From 44da0c711f465aeebb7c0ab519007759d9188909 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 1 Apr 2026 15:49:01 +0530 Subject: [PATCH 1/8] chore: update version to 1.5.2, add new .gitignore entry, and implement version bump check workflow --- .github/workflows/check-version-bump.yml | 79 +++ .github/workflows/release.yml | 72 --- .gitignore | 4 +- .husky/post-checkout | 40 ++ package-lock.json | 692 ++++++++--------------- package.json | 4 +- 6 files changed, 366 insertions(+), 525 deletions(-) create mode 100644 .github/workflows/check-version-bump.yml delete mode 100644 .github/workflows/release.yml create mode 100755 .husky/post-checkout diff --git a/.github/workflows/check-version-bump.yml b/.github/workflows/check-version-bump.yml new file mode 100644 index 00000000..31bdf666 --- /dev/null +++ b/.github/workflows/check-version-bump.yml @@ -0,0 +1,79 @@ +# Catches when developers forget to bump package.json for release-affecting changes. +# App code changes (app.js, bin/, config/, routes/, views/, etc.) require a version bump vs latest tag. +# Skips for: test-only, docs, .github (workflows/config), dependency-only bumps without app edits. +name: Check Version Bump + +on: + pull_request: + +jobs: + version-bump: + name: Version bump + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Detect changed files and version bump + id: detect + run: | + if git rev-parse HEAD^2 >/dev/null 2>&1; then + FILES=$(git diff --name-only HEAD^1 HEAD^2) + else + FILES=$(git diff --name-only HEAD~1 HEAD) + fi + VERSION_FILES_CHANGED=false + echo "$FILES" | grep -qx 'package.json' && VERSION_FILES_CHANGED=true + echo "version_files_changed=$VERSION_FILES_CHANGED" >> $GITHUB_OUTPUT + # App source paths for this boilerplate (no lib/webpack/dist); .github/ and test/ do not count + CODE_CHANGED=false + echo "$FILES" | grep -qE '^app\.js$|^bin/|^config/|^middlewares/|^models/|^public/|^routes/|^views/|^schemaNentries/' && CODE_CHANGED=true + echo "$FILES" | grep -qx 'package.json' && CODE_CHANGED=true + echo "code_changed=$CODE_CHANGED" >> $GITHUB_OUTPUT + + - name: Skip when only test/docs/.github changed + if: steps.detect.outputs.code_changed != 'true' + run: | + echo "No release-affecting files changed (e.g. only test/docs/.github). Skipping version-bump check." + exit 0 + + - name: Fail when version bump was missed + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed != 'true' + run: | + echo "::error::This PR has code changes but no version bump. Please bump the version in package.json." + exit 1 + + - name: Setup Node + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed == 'true' + uses: actions/setup-node@v4 + with: + node-version: '22.x' + + - name: Check version bump + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed == 'true' + run: | + set -e + PKG_VERSION=$(node -p "require('./package.json').version.replace(/^v/, '')") + if [ -z "$PKG_VERSION" ]; then + echo "::error::Could not read version from package.json" + exit 1 + fi + git fetch --tags --force 2>/dev/null || true + LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true) + if [ -z "$LATEST_TAG" ]; then + echo "No existing tags found. Skipping version-bump check (first release)." + exit 0 + fi + LATEST_VERSION="${LATEST_TAG#v}" + LATEST_VERSION="${LATEST_VERSION%%-*}" + if [ "$(printf '%s\n' "$LATEST_VERSION" "$PKG_VERSION" | sort -V | tail -1)" != "$PKG_VERSION" ]; then + echo "::error::Version bump required: package.json version ($PKG_VERSION) is not greater than latest tag ($LATEST_TAG). Please bump the version in package.json." + exit 1 + fi + if [ "$PKG_VERSION" = "$LATEST_VERSION" ]; then + echo "::error::Version bump required: package.json version ($PKG_VERSION) equals latest tag ($LATEST_TAG). Please bump the version in package.json." + exit 1 + fi + echo "Version bump check passed: package.json is at $PKG_VERSION (latest tag: $LATEST_TAG)." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 844e14d5..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Release - -on: - push: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - steps: - # Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22.x" - - - name: Install dependencies - run: npm install - - - name: Get package details - id: package - uses: codex-team/action-nodejs-package-info@v1.1 - - - name: Install npm pack - run: npm install npm-pack - - - name: Pack the npm package - run: npm pack - - # Publish package to npm - - name: Publish to npm - id: publish_npm - uses: JS-DevTools/npm-publish@v3 - with: - token: ${{ secrets.NPM_TOKEN }} - # access: public # Uncomment this line if you want to publish the package as public for first time - - # Auto-tag new version - - name: Auto-tag new version - id: update_tag - uses: Klemensas/action-autotag@stable - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: "v" - - # Create GitHub Release - - name: Create GitHub Release - if: steps.update_tag.outputs.tagname != '' - uses: actions/create-release@v1 - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.update_tag.outputs.tagname }} - release_name: Release ${{ steps.update_tag.outputs.tagname }} - draft: false - prerelease: false - - # Upload release asset - - name: Upload Release Asset - if: steps.update_tag.outputs.tagname != '' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "./contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" - asset_name: "contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" - asset_content_type: application/tgz \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5524fdfd..2c27ea5d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ example/**/* _old_test_backup #dist -dist \ No newline at end of file +dist + +datasync-boilerplate \ No newline at end of file diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 00000000..302fdc6a --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,40 @@ +#!/usr/bin/env sh +# When switching to a branch that doesn't exist on remote (e.g. newly created), +# pull and merge origin/main or origin/master into current branch. Does not push. + +# Only run on branch checkout (not file checkout) +if [ "$3" != "1" ]; then + exit 0 +fi + +# Skip if we don't have a remote +if ! git rev-parse --verify origin 2>/dev/null; then + exit 0 +fi + +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# Skip main/master - no need to merge base into these +case "$CURRENT_BRANCH" in + main|master) exit 0 ;; +esac + +# Only run when current branch does not exist on origin (treat as new local branch) +if git ls-remote --heads origin "$CURRENT_BRANCH" 2>/dev/null | grep -q .; then + echo "post-checkout: $CURRENT_BRANCH exists on origin, skipping merge." + exit 0 +fi + +# Prefer main, fallback to master +if git rev-parse --verify origin/main 2>/dev/null; then + BASE=origin/main +elif git rev-parse --verify origin/master 2>/dev/null; then + BASE=origin/master +else + exit 0 +fi + +echo "New branch detected: merging latest $BASE into $CURRENT_BRANCH (local only, not pushing)..." +git fetch origin +git merge "$BASE" --no-edit --no-ff +echo "Done. Merge is local only; push when ready." diff --git a/package-lock.json b/package-lock.json index 6f8cf42f..8ebac215 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.1", + "version": "1.5.2", "license": "MIT", "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.21", + "lodash": "^4.17.23", "mkdirp": "^3.0.1", "sift": "17.1.3" }, @@ -28,13 +28,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -43,9 +43,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", - "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "dev": true, "license": "MIT", "engines": { @@ -53,21 +53,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", - "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.4", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.4", - "@babel/types": "^7.28.4", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -84,14 +84,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", - "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.3", - "@babel/types": "^7.28.2", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -101,13 +101,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -128,29 +128,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -160,9 +160,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "dev": true, "license": "MIT", "engines": { @@ -180,9 +180,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -200,27 +200,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", - "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.4" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -285,13 +285,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -327,13 +327,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -453,13 +453,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -469,33 +469,33 @@ } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", - "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.4", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -503,14 +503,14 @@ } }, "node_modules/@babel/types": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", - "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -523,132 +523,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1019,22 +893,22 @@ } }, "node_modules/@jsdoc/salty": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.9.tgz", - "integrity": "sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw==", + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.11.tgz", + "integrity": "sha512-luR/TZqgru6gNjBQnRIbzNPOmDG62VIFQO7QyEjc1/zk3VP3yoGfuecwP2uOlAmKz+t6aq9bwsBV3FgiyHTT7Q==", "dev": true, "license": "Apache-2.0", "dependencies": { - "lodash": "^4.17.21" + "lodash": "^4.17.23" }, "engines": { "node": ">=v12.0.0" } }, "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", "dev": true, "license": "MIT" }, @@ -1159,9 +1033,9 @@ "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", + "version": "4.17.24", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", + "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", "dev": true, "license": "MIT" }, @@ -1184,9 +1058,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.127", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.127.tgz", - "integrity": "sha512-gSjxjrnKXML/yo0BO099uPixMqfpJU0TKYjpfLU7TrtA2WWDki412Np/RSTPRil1saKBhvVVKzVx/p/6p94nVA==", + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", "dev": true, "license": "MIT", "dependencies": { @@ -1201,9 +1075,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "dev": true, "license": "MIT", "dependencies": { @@ -1407,13 +1281,16 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz", - "integrity": "sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw==", + "version": "2.10.13", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.13.tgz", + "integrity": "sha512-BL2sTuHOdy0YT1lYieUxTw/QMtPBC3pmlJC6xk8BBYVv6vcw3SGdKemQ+Xsx9ik2F/lYDO9tqsFQH1r9PFuHKw==", "dev": true, "license": "Apache-2.0", "bin": { - "baseline-browser-mapping": "dist/cli.js" + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/bluebird": { @@ -1424,9 +1301,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1448,9 +1325,9 @@ } }, "node_modules/browserslist": { - "version": "4.26.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz", - "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "dev": true, "funding": [ { @@ -1468,11 +1345,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.3", - "caniuse-lite": "^1.0.30001741", - "electron-to-chromium": "^1.5.218", - "node-releases": "^2.0.21", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -1532,9 +1409,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001743", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", - "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", + "version": "1.0.30001784", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001784.tgz", + "integrity": "sha512-WU346nBTklUV9YfUl60fqRbU5ZqyXlqvo1SgigE1OAXK5bFL8LL9q1K7aap3N739l4BvNqnkm3YrGHiY9sfUQw==", "dev": true, "funding": [ { @@ -1642,9 +1519,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, @@ -1738,9 +1615,9 @@ } }, "node_modules/dedent": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", - "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -1782,17 +1659,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/electron-to-chromium": { - "version": "1.5.223", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.223.tgz", - "integrity": "sha512-qKm55ic6nbEmagFlTFczML33rF90aU+WtrJ9MdTCThrcvDNdUHN4p6QfVN78U06ZmguqXIyMPyYhw2TrbDUwPQ==", + "version": "1.5.330", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.330.tgz", + "integrity": "sha512-jFNydB5kFtYUobh4IkWUnXeyDbjf/r9gcUEXe1xcrcUxIGfTdzPXA+ld6zBRbwvgIGVzDll/LTIiDztEtckSnA==", "dev": true, "license": "ISC" }, @@ -1967,36 +1837,6 @@ "node": ">=8" } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2076,7 +1916,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -2109,9 +1949,9 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2365,9 +2205,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -2421,22 +2261,6 @@ "node": ">=8" } }, - "node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -2920,9 +2744,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -3041,9 +2865,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "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==", "dev": true, "license": "MIT", "dependencies": { @@ -3065,9 +2889,9 @@ } }, "node_modules/jsdoc": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.4.tgz", - "integrity": "sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", + "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3213,9 +3037,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/lodash.memoize": { @@ -3252,9 +3076,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -3282,9 +3106,9 @@ } }, "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", "dev": true, "license": "MIT", "dependencies": { @@ -3369,9 +3193,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -3392,11 +3216,11 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } @@ -3460,9 +3284,9 @@ } }, "node_modules/node-notifier/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -3473,9 +3297,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", - "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", + "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", "dev": true, "license": "MIT" }, @@ -3647,9 +3471,9 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -3657,18 +3481,18 @@ "minipass": "^7.1.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", - "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "version": "11.2.7", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", + "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" } @@ -3681,9 +3505,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -3813,13 +3637,13 @@ } }, "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -3867,14 +3691,14 @@ } }, "node_modules/rimraf": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", - "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz", + "integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "glob": "^11.0.0", - "package-json-from-dist": "^1.0.0" + "glob": "^13.0.3", + "package-json-from-dist": "^1.0.1" }, "bin": { "rimraf": "dist/esm/bin.mjs" @@ -3886,41 +3710,58 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/glob": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", - "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "node_modules/rimraf/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "license": "ISC", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "dev": true, + "license": "MIT", "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" + "balanced-match": "^4.0.2" }, - "bin": { - "glob": "dist/esm/bin.mjs" + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^5.0.5" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4066,22 +3907,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4095,20 +3920,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -4204,9 +4015,9 @@ } }, "node_modules/ts-jest": { - "version": "29.4.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz", - "integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==", + "version": "29.4.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz", + "integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==", "dev": true, "license": "MIT", "dependencies": { @@ -4216,7 +4027,7 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.2", + "semver": "^7.7.3", "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, @@ -4257,9 +4068,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -4341,9 +4152,9 @@ } }, "node_modules/underscore": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "version": "1.13.8", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", + "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", "dev": true, "license": "MIT" }, @@ -4355,9 +4166,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "dev": true, "funding": [ { @@ -4461,25 +4272,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 982bfcde..e1109e7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.1", + "version": "1.5.2", "description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem", "main": "dist/index.js", "scripts": { @@ -27,7 +27,7 @@ }, "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.21", + "lodash": "^4.17.23", "mkdirp": "^3.0.1", "sift": "17.1.3" }, From 19702f219d29721a1b2414da3aef0ad6af3059ba Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 1 Apr 2026 15:57:31 +0530 Subject: [PATCH 2/8] feat: add cursor rules and skills --- .cursor/rules/README.md | 22 ++++++++ .cursor/rules/code-review.mdc | 44 ++++++++++++++++ .cursor/rules/datasync-filesystem-sdk.mdc | 36 +++++++++++++ .cursor/rules/dev-workflow.md | 36 +++++++++++++ .cursor/rules/testing.mdc | 33 ++++++++++++ .cursor/rules/typescript.mdc | 27 ++++++++++ AGENTS.md | 51 +++++++++++++++++++ skills/README.md | 11 ++++ skills/code-review/SKILL.md | 48 +++++++++++++++++ skills/testing/SKILL.md | 45 ++++++++++++++++ .../typescript-datasync-filesystem/SKILL.md | 46 +++++++++++++++++ 11 files changed, 399 insertions(+) create mode 100644 .cursor/rules/README.md create mode 100644 .cursor/rules/code-review.mdc create mode 100644 .cursor/rules/datasync-filesystem-sdk.mdc create mode 100644 .cursor/rules/dev-workflow.md create mode 100644 .cursor/rules/testing.mdc create mode 100644 .cursor/rules/typescript.mdc create mode 100644 AGENTS.md create mode 100644 skills/README.md create mode 100644 skills/code-review/SKILL.md create mode 100644 skills/testing/SKILL.md create mode 100644 skills/typescript-datasync-filesystem/SKILL.md diff --git a/.cursor/rules/README.md b/.cursor/rules/README.md new file mode 100644 index 00000000..4c3bf067 --- /dev/null +++ b/.cursor/rules/README.md @@ -0,0 +1,22 @@ +# Cursor rules for this repository + +Rules live in this directory. Each file documents **what** it covers, **when** it applies (`alwaysApply`, `globs`), and how to use it in chat. + +## How to @-reference + +In Cursor, type `@` and choose **Rules** (or the rule name if listed), or reference a path such as `@.cursor/rules/typescript.mdc` to pull that rule into context. + +## Rule index + +| File | `alwaysApply` | `globs` | When it applies | +|------|---------------|---------|-----------------| +| [`dev-workflow.md`](dev-workflow.md) | no | *(none)* | Branch/PR workflow, scripts, lint/test commands, versioning/release notes. Loaded from the rule picker; not auto-scoped to a single glob. | +| [`typescript.mdc`](typescript.mdc) | no | `src/**/*.ts` | Editing TypeScript under `src/` — style, structure, tooling. | +| [`datasync-filesystem-sdk.mdc`](datasync-filesystem-sdk.mdc) | no | `src/**/*.ts` | DataSync filesystem SDK patterns (Stack, config, paths, queries) — core library only, not `example/`. | +| [`testing.mdc`](testing.mdc) | no | `test/**/*.ts` | Jest tests, fixtures, temp dirs, `test/data/`. | +| [`code-review.mdc`](code-review.mdc) | **yes** | *(none)* | Every session — PR/checklist mindset for this repo. | + +## Related docs + +- Root agent entry point: [`../../AGENTS.md`](../../AGENTS.md) +- Skills index: [`../../skills/README.md`](../../skills/README.md) diff --git a/.cursor/rules/code-review.mdc b/.cursor/rules/code-review.mdc new file mode 100644 index 00000000..3f9526b9 --- /dev/null +++ b/.cursor/rules/code-review.mdc @@ -0,0 +1,44 @@ +--- +description: PR review checklist for datasync-filesystem-sdk — API docs, compatibility, tests, terminology +alwaysApply: true +--- + +# Code review checklist + +## Product terminology + +- This package is the **DataSync Filesystem SDK** (local synced content). Do **not** describe it as the **CDA** or **CMA** HTTP client unless the change explicitly documents comparison or migration. +- Distinguish **in-memory/filesystem** queries from **REST** or **CDN** behavior. + +## Public API and docs + +- Exported APIs should have accurate **JSDoc** (`@public`, parameters, return shape). +- README / examples should match actual **`Contentstack.Stack`** usage and config keys. + +## Backward compatibility + +- Avoid breaking changes to query results shape, config schema, or method signatures without a **semver-major** plan and changelog intent. +- Deprecations should be clearly commented and documented. + +## Errors + +- Prefer centralized messages from **`messages.ts`** (`ERROR_MESSAGES`, `WARNING_MESSAGES`) for user-visible strings; keep messages actionable. + +## Null and data safety + +- Guard against missing files, empty arrays, and malformed JSON consistent with existing patterns in `stack.ts` / `fs.ts`. + +## Dependencies and security + +- New dependencies need justification (bundle size, maintenance). Align with **`package.json`** constraints. +- Consider **Snyk** / org policy — `pretest` does not replace dependency review. + +## Tests + +- Behavioral changes in **`src/`** should include or update **Jest** coverage under **`test/`** using filesystem fixtures — not live API calls. + +## Severity (optional labels) + +- **Blocker:** wrong results, data loss risk, security issue, broken public API contract. +- **Major:** missing tests for core behavior, breaking change without version/docs strategy. +- **Minor:** style, non-user-facing refactors, doc nits. diff --git a/.cursor/rules/datasync-filesystem-sdk.mdc b/.cursor/rules/datasync-filesystem-sdk.mdc new file mode 100644 index 00000000..4487f737 --- /dev/null +++ b/.cursor/rules/datasync-filesystem-sdk.mdc @@ -0,0 +1,36 @@ +--- +description: DataSync Filesystem SDK — Stack, contentStore paths, queries (not CDA/CMA HTTP APIs) +globs: src/**/*.ts +alwaysApply: false +--- + +# DataSync Filesystem SDK (core) + +## Product model (this repo) + +This is the **filesystem query SDK** for **DataSync-stored** JSON — **not** the Contentstack **Delivery** or **Management** REST SDK. Terminology: **stack** here means the in-memory/query facade over **disk**, not an API stack or region endpoint. + +## Configuration mental model + +- **`Contentstack.Stack(config)`** merges into internal config (`setConfig` / `getConfig` in `src/index.ts`). +- Typical shape: `contentStore.baseDir`, `contentStore.patterns` (assets, content_types, entries), `locale`, `referenceDepth`, `projections`, `defaultSortingField` — see `src/config.ts` defaults and README. +- **Optional env:** `APP_ROOT` can influence where content resolves (documented in README). + +## Async patterns + +- **`Stack.connect()`** resolves when the stack is ready to query; chain `.then()` / `.catch()` as in README examples. +- File I/O uses promisified helpers from `src/fs.ts` where applicable. + +## Query surface + +- Entry points: **`contentType(uid)`**, **`assets()`**, query builders on the stack (filters, references, sort, skip/limit, projections, etc.) implemented in **`src/stack.ts`**. +- Query filtering uses **`sift`** and **`lodash`**; projections may use **`json-mask`**. + +## Scope of this rule + +- Applies to **`src/`** SDK core only. **`example/`** is illustrative — do not treat it as canonical API design. + +## Official docs (context) + +- **DataSync:** [Contentstack DataSync guide](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) — synchronization model this SDK assumes. +- **Query examples:** Published SDK docs / GitHub Pages linked from the repo README when present. diff --git a/.cursor/rules/dev-workflow.md b/.cursor/rules/dev-workflow.md new file mode 100644 index 00000000..b751cdcb --- /dev/null +++ b/.cursor/rules/dev-workflow.md @@ -0,0 +1,36 @@ +--- +description: Branch and PR workflow, npm scripts, lint/tests, and version bumps for releases +alwaysApply: false +--- + +# Development workflow + +## Branches + +Use your team’s Git branching model (e.g. feature branches off the default branch). Keep commits focused; this repo uses **Husky** hooks that expect **Talisman** and **Snyk** to be installed locally unless you bypass with `SKIP_HOOK=1` (see `.husky/pre-commit`). + +## Install and build + +```bash +npm install +npm run build-ts +``` + +## Lint and tests + +```bash +npm run lint # ESLint — see package.json for config path and globs +npm test # pretest runs build-ts, then Jest with coverage +``` + +- **Unit/integration:** Jest runs all `test/**/*.ts` except ignored paths in `jest.config.js` (e.g. `test/data/*`, `test/utils.ts`). Suites use on-disk fixtures under `test/data/` and temp trees per module (see `test/utils.ts`). + +## PR expectations + +- Run **build**, **lint**, and **tests** before opening or updating a PR. +- Avoid committing secrets; Talisman runs on pre-commit when configured. +- For **release-impacting** changes to library behavior or `src/`, coordinate a **`package.json` version bump** with maintainers. If a **Check Version Bump** (or similar) workflow is enabled for this repo, follow its rules for when `version` must change. + +## Docs + +- `npm run build-doc` — JSDoc site (requires successful `build-ts` first). diff --git a/.cursor/rules/testing.mdc b/.cursor/rules/testing.mdc new file mode 100644 index 00000000..f2bd3eca --- /dev/null +++ b/.cursor/rules/testing.mdc @@ -0,0 +1,33 @@ +--- +description: Jest tests under test/ — fixtures, temp dirs, coverage, ignores +globs: test/**/*.ts +alwaysApply: false +--- + +# Testing + +## Runner and config + +- **Jest** with **ts-jest**, **Node** environment (`jest.config.js`). +- **Coverage:** enabled; output under `coverage/`; `collectCoverage` true. +- **Ignored from tests:** `test/data/*`, `test/utils.ts`, and paths listed in `testPathIgnorePatterns` — adjust only alongside `jest.config.js`. + +## Layout + +- Test files: `test/**/*.ts` matching Jest `testMatch`. +- **Fixtures:** `test/data/` — static JSON samples (assets, entries, content types, etc.). +- **Helpers:** `test/utils.ts` — `init`, `populate*`, `destroy`, temp `baseDir` per suite under `__dirname` + module name. + +## Naming and style + +- Suites use `describe` / `it` with labels like `# Core`, `# Queries` (existing convention). +- **No live HTTP** — tests exercise the SDK against **written files** only. + +## Environment + +- **`APP_ROOT`:** optional; only if a test explicitly relies on README-documented behavior. +- No Delivery/Management API keys required. + +## Timeouts and notifications + +- Jest `notify: true` may use `node-notifier` locally — failures are normal if notifications are unavailable in CI. diff --git a/.cursor/rules/typescript.mdc b/.cursor/rules/typescript.mdc new file mode 100644 index 00000000..ca826d47 --- /dev/null +++ b/.cursor/rules/typescript.mdc @@ -0,0 +1,27 @@ +--- +description: TypeScript source conventions for src/ — match existing ESLint and project tsconfig +globs: src/**/*.ts +alwaysApply: false +--- + +# TypeScript (`src/`) + +## Tooling + +- **Compiler:** `tsconfig.json` — `module` CommonJS, `target` ES6, `strict` unused locals/parameters, `noImplicitReturns`, declarations emitted to `typings/`. +- **Lint:** `npm run lint` uses ESLint with the config referenced in `package.json` (verify the config file name matches the repo — a `.eslintrc` may also be present). +- **Formatting:** `.jsbeautifyrc` exists at repo root; align with existing file style (indentation, quotes, semicolons as in neighboring code). + +## Layout + +- Keep the public surface in `src/index.ts`; heavy logic stays in `stack.ts`, `utils.ts`, `fs.ts`, `config.ts`, `messages.ts`. +- Prefer **JSDoc** on exported symbols (`@public`, `@description`, `@api`) for generated docs. +- Use existing **error/warning** patterns via `messages.ts` where appropriate instead of ad hoc strings. + +## Logging + +- Avoid introducing `console` noise in library code; follow existing patterns. Tests may use `debug` (see `test/utils.ts`). + +## Dependencies + +- Do not add HTTP clients or REST assumptions — this SDK targets **local filesystem** content and in-process queries. Use dependencies already in line with `package.json`. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..2efd062f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,51 @@ +# Agent guide — `@contentstack/datasync-filesystem-sdk` + +## What this package is + +**Contentstack DataSync Filesystem SDK** — a **Node.js/TypeScript** library to **query content stored on disk** after synchronization with [Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) (typically via `@contentstack/datasync-content-store-filesystem`). It is **not** the Delivery (CDA) or Management (CMA) **HTTP** SDK; it does not call Contentstack REST APIs. It reads JSON and uses in-process querying (`sift`, `lodash`, `json-mask`) over configured filesystem paths. + +**Repository:** [https://github.com/contentstack/datasync-filesystem-sdk/](https://github.com/contentstack/datasync-filesystem-sdk/) + +## Tech stack + +| Area | Details | +|------|---------| +| Language | TypeScript (`typescript` ~4.9 in `package.json`), compiles to `dist/` (CommonJS, ES6 target) | +| Runtime | Node.js — README recommends **v20+** | +| Build | `tsc` → `dist/`, declarations in `typings/` | +| Tests | **Jest** + **ts-jest**, Node environment (`jest.config.js`) | +| Main libraries | `lodash`, `sift`, `json-mask`, `mkdirp` — **no HTTP client** dependency for core behavior | +| API docs | JSDoc → `npm run build-doc` (outputs under `docs/`) | + +## Public API and source layout + +| Role | Path | +|------|------| +| Package entry | `main`: `dist/index.js` — build from `src/index.ts` | +| Facade | `Contentstack`, `setConfig`, `getConfig`, `ERROR_MESSAGES`, `WARNING_MESSAGES` — `src/index.ts`, `src/messages.ts` | +| Stack & queries | `src/stack.ts` (large query builder surface) | +| Defaults & paths | `src/config.ts`, `src/utils.ts`, `src/fs.ts` | +| Published types | `typings/*.d.ts` (generated) | + +## Commands + +| Command | Purpose | +|---------|---------| +| `npm run build-ts` | Clean `dist/`, `typings/`, `coverage/`, then `tsc` | +| `npm run compile` | `tsc` only | +| `npm test` | Runs `pretest` → `build-ts`, then `jest --coverage` | +| `npm run lint` | ESLint on `src/**/*.ts` (see `package.json`; config file name should match the repo) | +| `npm run build-doc` | Build then JSDoc HTML docs | + +Tests live under `test/` (see `jest.config.js` `testMatch` and `testPathIgnorePatterns`). There is a small **`example/`** script — not the main library surface. + +## Credentials and live tests + +There are **no API keys or Delivery/Management tokens** for this SDK’s core behavior. Tests use **local temp directories** under `test/` (e.g. per-suite folders) populated from `test/data/` fixtures. + +Optional **environment** (see `README.md`): `APP_ROOT` can override where content is resolved from (defaults to the current working directory). + +## Further reading for agents + +- **Cursor rules (scopes, globs, @-references):** [`.cursor/rules/README.md`](.cursor/rules/README.md) +- **Skills (workflows and deep dives):** [`skills/README.md`](skills/README.md) diff --git a/skills/README.md b/skills/README.md new file mode 100644 index 00000000..4bbf7376 --- /dev/null +++ b/skills/README.md @@ -0,0 +1,11 @@ +# Skills index + +Skills are short, task-focused guides for this repository. Use them when the description matches your task; combine with [AGENTS.md](../AGENTS.md) and [`.cursor/rules/README.md`](../.cursor/rules/README.md). + +| Skill | Folder | When to use | +|-------|--------|-------------| +| Code review | [`code-review/`](code-review/SKILL.md) | Reviewing or preparing PRs — checklist, semver, tests, terminology. | +| Testing | [`testing/`](testing/SKILL.md) | Running Jest, understanding `test/` layout, fixtures, env. | +| TypeScript + DataSync filesystem SDK | [`typescript-datasync-filesystem/`](typescript-datasync-filesystem/SKILL.md) | Changing query behavior, config, or Stack internals in `src/`. | + +There is no separate **framework** skill: the SDK does not use a dedicated HTTP client layer; behavior is filesystem- and query-library–centric. diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md new file mode 100644 index 00000000..eba880aa --- /dev/null +++ b/skills/code-review/SKILL.md @@ -0,0 +1,48 @@ +--- +name: code-review +description: PR review checklist for @contentstack/datasync-filesystem-sdk — API docs, compatibility, tests, DataSync terminology +--- + +# Code review (expanded) + +Use this skill when reviewing or authoring changes to [**@contentstack/datasync-filesystem-sdk**](https://github.com/contentstack/datasync-filesystem-sdk/). Align with [`.cursor/rules/code-review.mdc`](../../.cursor/rules/code-review.mdc). + +## Scope clarity + +- Confirm the change targets **local DataSync filesystem querying**, not CDA/CMA HTTP APIs, unless the diff is documentation comparing ecosystems. + +## Public API + +- **JSDoc** on exports: purpose, parameters, return values, examples where helpful. +- **README** and **example/** snippets reflect real `Contentstack.Stack` config and method chains. + +## Compatibility + +- **Semver:** breaking changes to public methods, config shape, or default behavior likely require a **major** bump; additive features **minor**; fixes **patch** — follow team policy. +- Avoid silent changes to projection defaults, locale handling, or reference resolution depth. + +## Errors and UX + +- User-facing strings should flow through **`messages.ts`** where possible. +- Thrown errors should be debuggable (include context, avoid leaking sensitive paths in production if your deployment cares). + +## Correctness and safety + +- **Filesystem:** race-free assumptions, `existsSync` / read patterns consistent with `fs.ts`. +- **Queries:** `sift` / lodash behavior matches intended Mongo-like operators documented or implied by tests. + +## Dependencies + +- New packages: license, maintenance, size — and run org security processes (**Snyk**, etc.). + +## Tests + +- **`src/`** behavior changes need **Jest** updates under **`test/`** with filesystem fixtures — not network mocks for Contentstack APIs. + +## Optional severity + +| Level | Examples | +|-------|----------| +| Blocker | Wrong query results, security issue, broken published API | +| Major | Missing regression tests, breaking change without version strategy | +| Minor | Comments, internal refactors, doc typos | diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md new file mode 100644 index 00000000..63f9c99a --- /dev/null +++ b/skills/testing/SKILL.md @@ -0,0 +1,45 @@ +--- +name: testing +description: Run and extend Jest tests for datasync-filesystem-sdk — build pretest, fixtures, temp dirs, ignores +--- + +# Testing skill + +## Commands + +```bash +npm test +``` + +`pretest` runs **`npm run build-ts`** (clean + `tsc`), then **Jest** runs with **coverage** (`jest.config.js`). + +```bash +npm run build-ts # alone if you only need dist/typings before debugging tests +``` + +## Layout + +| Path | Role | +|------|------| +| `test/**/*.ts` | Test suites (see `testMatch` in `jest.config.js`) | +| `test/data/` | Static JSON fixtures — **ignored** as test files | +| `test/utils.ts` | `init`, populate helpers, `destroy` — **ignored** as a test file | +| Per-suite temp dirs | Created under `test//` via `init(..., moduleName)` | + +## Naming + +- Suites use **`describe`** / **`it`** with readable labels (e.g. `# Core`). +- Not all files use `*.test.ts`; Jest discovers by path pattern, not name suffix. + +## Environment + +- **No API credentials** for core tests. +- **`APP_ROOT`:** only if exercising README-documented resolution behavior. + +## Mocks + +- Tests use **real filesystem writes** into temp directories, not HTTP mocks. Reuse **`populateAssets`**, **`populateContentTypes`**, **`pupulateEntries`** from `test/utils.ts` where applicable. + +## Coverage and CI + +- Coverage outputs to **`coverage/`** (HTML + JSON). Adjust **`jest.config.js`** only when changing collect rules deliberately. diff --git a/skills/typescript-datasync-filesystem/SKILL.md b/skills/typescript-datasync-filesystem/SKILL.md new file mode 100644 index 00000000..931d7066 --- /dev/null +++ b/skills/typescript-datasync-filesystem/SKILL.md @@ -0,0 +1,46 @@ +--- +name: typescript-datasync-filesystem +description: Mental model for the DataSync Filesystem SDK — Stack, config, queries, file layout in src/ +--- + +# TypeScript DataSync Filesystem SDK + +## What you are editing + +**Package:** `@contentstack/datasync-filesystem-sdk` +**Role:** Query **JSON content on disk** produced by DataSync / content-store-filesystem — **not** live CDA or CMA HTTP calls. + +## Entry flow + +1. **`Contentstack.Stack(userConfig)`** in `src/index.ts` merges config and returns **`Stack`** (`src/stack.ts`). +2. Call **`Stack.connect()`** before running queries (async chain). +3. Build queries from **`contentType('uid')`**, **`assets()`**, then filters, references, pagination, projections — see `src/stack.ts`. + +## Configuration + +- Defaults in **`src/config.ts`** (`defaultConfig`): `contentStore.baseDir`, `patterns`, `locale`, `referenceDepth`, `projections`, etc. +- **`getConfig` / `setConfig`** allow inspecting or merging global options. +- Path helpers live in **`src/utils.ts`**; low-level reads in **`src/fs.ts`**. + +## Query execution + +- **Filtering:** **`sift`** for predicate matching; **`lodash`** for sorting/merging; **`json-mask`** for projections when used. +- **References:** depth controlled by config / `includeReferences` patterns in `stack.ts`. + +## Where to change behavior + +| Concern | Start here | +|---------|------------| +| New query operator or filter | `src/stack.ts` (large file — search existing similar methods) | +| Path resolution / base dir | `src/config.ts`, `src/utils.ts`, `README` for `APP_ROOT` | +| FS read/cache behavior | `src/fs.ts` | +| User-visible errors | `src/messages.ts` | +| Public exports | `src/index.ts` | + +## Tests + +- Mirror changes with **`test/`** suites and fixtures under **`test/data/`** — see [`../testing/SKILL.md`](../testing/SKILL.md). + +## Official context + +- [DataSync documentation](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) explains sync; this SDK assumes that pipeline has already written files. From b08fe913aebfcd9628ea17beae8d2d3cc4b8eb44 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 1 Apr 2026 16:17:43 +0530 Subject: [PATCH 3/8] docs: update dev-workflow guidelines for branching and releases --- .cursor/rules/dev-workflow.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cursor/rules/dev-workflow.md b/.cursor/rules/dev-workflow.md index b751cdcb..d5cb4f9b 100644 --- a/.cursor/rules/dev-workflow.md +++ b/.cursor/rules/dev-workflow.md @@ -7,7 +7,9 @@ alwaysApply: false ## Branches -Use your team’s Git branching model (e.g. feature branches off the default branch). Keep commits focused; this repo uses **Husky** hooks that expect **Talisman** and **Snyk** to be installed locally unless you bypass with `SKIP_HOOK=1` (see `.husky/pre-commit`). +- Use **feature branches** for new work; open pull requests against **`development`** to integrate changes. +- For a **release**, open a pull request from **`development`** into **`master`**. Releases to npm are driven from **`master`**. + ## Install and build From 19ecccacb71ada9782d2ec46823a124503badf99 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 2 Apr 2026 13:13:56 +0530 Subject: [PATCH 4/8] upgrade lodash --- package-lock.json | 32 ++++++++++++++++---------------- package.json | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ebac215..b3f5706d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.23", + "lodash": "^4.18.1", "mkdirp": "^3.0.1", "sift": "17.1.3" }, @@ -1660,9 +1660,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.330", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.330.tgz", - "integrity": "sha512-jFNydB5kFtYUobh4IkWUnXeyDbjf/r9gcUEXe1xcrcUxIGfTdzPXA+ld6zBRbwvgIGVzDll/LTIiDztEtckSnA==", + "version": "1.5.331", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.331.tgz", + "integrity": "sha512-IbxXrsTlD3hRodkLnbxAPP4OuJYdWCeM3IOdT+CpcMoIwIoDfCmRpEtSPfwBXxVkg9xmBeY7Lz2Eo2TDn/HC3Q==", "dev": true, "license": "ISC" }, @@ -3037,9 +3037,9 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/lodash.memoize": { @@ -3297,9 +3297,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "version": "2.0.37", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", + "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==", "dev": true, "license": "MIT" }, @@ -4015,19 +4015,19 @@ } }, "node_modules/ts-jest": { - "version": "29.4.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz", - "integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==", + "version": "29.4.9", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.9.tgz", + "integrity": "sha512-LTb9496gYPMCqjeDLdPrKuXtncudeV1yRZnF4Wo5l3SFi0RYEnYRNgMrFIdg+FHvfzjCyQk1cLncWVqiSX+EvQ==", "dev": true, "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", + "handlebars": "^4.7.9", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.3", + "semver": "^7.7.4", "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, @@ -4044,7 +4044,7 @@ "babel-jest": "^29.0.0 || ^30.0.0", "jest": "^29.0.0 || ^30.0.0", "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "typescript": ">=4.3 <7" }, "peerDependenciesMeta": { "@babel/core": { diff --git a/package.json b/package.json index e1109e7a..911d6a71 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.23", + "lodash": "^4.18.1", "mkdirp": "^3.0.1", "sift": "17.1.3" }, From dd1c9721f7d6e1f47347d86298b4afe10e8a3253 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 2 Apr 2026 13:28:35 +0530 Subject: [PATCH 5/8] upgrade lodash --- 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 b3f5706d..3fe2b3db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.2", + "version": "1.5.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "dependencies": { "json-mask": "2.0.0", diff --git a/package.json b/package.json index 911d6a71..d3c793e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/datasync-filesystem-sdk", - "version": "1.5.2", + "version": "1.5.3", "description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem", "main": "dist/index.js", "scripts": { From 0a068394f46483047c100e0f3e335af513719607 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 2 Apr 2026 15:07:10 +0530 Subject: [PATCH 6/8] docs: enhance AGENTS.md with comprehensive agent guidance, repository details, and updated command references --- AGENTS.md | 96 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 28 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2efd062f..70d982cd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,51 +1,91 @@ -# Agent guide — `@contentstack/datasync-filesystem-sdk` +# Agent guidance — `@contentstack/datasync-filesystem-sdk` + +## Single source of truth + +Use this file and **`skills/`** as the **canonical** place for project context, workflows, and review standards so contributors get consistent guidance in any IDE or agent (Cursor, Copilot, CLI, others). + +| Layer | Role | +|-------|------| +| **`AGENTS.md`** (this file) | Entry point: package identity, repo links, tech stack, source layout, commands, and skills index | +| **`skills//SKILL.md`** | Full detail: SDK mental model, testing, and code review checklists | +| **`.cursor/rules/`** | Cursor-only scoped pointers (`description` / `globs` / `alwaysApply`) that reference this file and `skills/` | + +**Flow:** Cursor rules -> **`AGENTS.md`** -> **`skills/*.md`** ## What this package is -**Contentstack DataSync Filesystem SDK** — a **Node.js/TypeScript** library to **query content stored on disk** after synchronization with [Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) (typically via `@contentstack/datasync-content-store-filesystem`). It is **not** the Delivery (CDA) or Management (CMA) **HTTP** SDK; it does not call Contentstack REST APIs. It reads JSON and uses in-process querying (`sift`, `lodash`, `json-mask`) over configured filesystem paths. +**Contentstack DataSync Filesystem SDK** is a **Node.js/TypeScript** library that queries **locally synced filesystem JSON content** produced by Contentstack DataSync (typically via `@contentstack/datasync-content-store-filesystem`). + +It is **not** the Contentstack Delivery (CDA) SDK or Management (CMA) SDK, and it does **not** call Contentstack REST APIs for core behavior. -**Repository:** [https://github.com/contentstack/datasync-filesystem-sdk/](https://github.com/contentstack/datasync-filesystem-sdk/) +## Repository + +- **Git:** [https://github.com/contentstack/datasync-filesystem-sdk/](https://github.com/contentstack/datasync-filesystem-sdk/) +- **Product docs:** [https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) ## Tech stack | Area | Details | |------|---------| -| Language | TypeScript (`typescript` ~4.9 in `package.json`), compiles to `dist/` (CommonJS, ES6 target) | -| Runtime | Node.js — README recommends **v20+** | -| Build | `tsc` → `dist/`, declarations in `typings/` | -| Tests | **Jest** + **ts-jest**, Node environment (`jest.config.js`) | -| Main libraries | `lodash`, `sift`, `json-mask`, `mkdirp` — **no HTTP client** dependency for core behavior | -| API docs | JSDoc → `npm run build-doc` (outputs under `docs/`) | +| Language/runtime | TypeScript (`typescript` `^4.9.5`), Node.js (README recommends v20+) | +| Compilation/build | `tsc` (`compile`), clean + `tsc` via `build-ts`; output to `dist/` and `typings/` | +| Test framework | Jest + ts-jest (`jest.config.js`, Node test environment, coverage enabled) | +| Lint/tooling | `npm run lint` invokes ESLint command from `package.json`; repo also includes `.eslintrc` | +| Core query/data libs | `lodash`, `sift`, `json-mask`, `mkdirp` | +| Docs generation | JSDoc via `npm run build-doc` | -## Public API and source layout +## Source layout and public entry points | Role | Path | |------|------| -| Package entry | `main`: `dist/index.js` — build from `src/index.ts` | -| Facade | `Contentstack`, `setConfig`, `getConfig`, `ERROR_MESSAGES`, `WARNING_MESSAGES` — `src/index.ts`, `src/messages.ts` | -| Stack & queries | `src/stack.ts` (large query builder surface) | -| Defaults & paths | `src/config.ts`, `src/utils.ts`, `src/fs.ts` | -| Published types | `typings/*.d.ts` (generated) | +| Package runtime entry | `dist/index.js` (`main` in `package.json`) | +| TS public facade | `src/index.ts` (`Contentstack`, `setConfig`, `getConfig`) | +| User-visible messages | `src/messages.ts` (`ERROR_MESSAGES`, `WARNING_MESSAGES`) | +| Query builder/core behavior | `src/stack.ts` | +| Defaults + path/file helpers | `src/config.ts`, `src/utils.ts`, `src/fs.ts` | +| Tests and fixtures | `test/` with fixtures in `test/data/` | +| Generated declarations | `typings/*.d.ts` | -## Commands +## Common commands | Command | Purpose | |---------|---------| -| `npm run build-ts` | Clean `dist/`, `typings/`, `coverage/`, then `tsc` | -| `npm run compile` | `tsc` only | -| `npm test` | Runs `pretest` → `build-ts`, then `jest --coverage` | -| `npm run lint` | ESLint on `src/**/*.ts` (see `package.json`; config file name should match the repo) | -| `npm run build-doc` | Build then JSDoc HTML docs | +| `npm run build-ts` | Clean `dist`, `typings`, `coverage`, then compile TypeScript | +| `npm run compile` | Compile TypeScript only | +| `npm test` | `pretest` runs `build-ts`, then Jest with coverage | +| `npm run lint` | Run lint command defined in `package.json` | +| `npm run build-doc` | Build and generate JSDoc docs under `docs/` | + +## Test model and env/credentials + +- Tests are filesystem-based (local fixtures + temp directories), not live Contentstack API calls. +- Test suites live in `test/`; `jest.config.js` controls matches/ignores. +- No Delivery/Management API credentials are required for core tests. +- Optional environment variable: `APP_ROOT` (documented in `README.md`) to override content root resolution. + +## Skills index -Tests live under `test/` (see `jest.config.js` `testMatch` and `testPathIgnorePatterns`). There is a small **`example/`** script — not the main library surface. +- Skills index: [`skills/README.md`](skills/README.md) +- Key skills: + - [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) + - [`skills/testing/SKILL.md`](skills/testing/SKILL.md) + - [`skills/typescript-datasync-filesystem/SKILL.md`](skills/typescript-datasync-filesystem/SKILL.md) -## Credentials and live tests +## Cursor rules -There are **no API keys or Delivery/Management tokens** for this SDK’s core behavior. Tests use **local temp directories** under `test/` (e.g. per-suite folders) populated from `test/data/` fixtures. +- Cursor rules overview: [`.cursor/rules/README.md`](.cursor/rules/README.md) +- Treat `.cursor/rules/` as scoped pointers; do not treat them as a second source of truth. +- Update policy and standards primarily in `AGENTS.md` and `skills/`, then keep rule pointers aligned. -Optional **environment** (see `README.md`): `APP_ROOT` can override where content is resolved from (defaults to the current working directory). +## Cursor-specific quick references -## Further reading for agents +For Cursor workflows, reference these scoped rules: -- **Cursor rules (scopes, globs, @-references):** [`.cursor/rules/README.md`](.cursor/rules/README.md) -- **Skills (workflows and deep dives):** [`skills/README.md`](skills/README.md) +- `@typescript` -> [`.cursor/rules/typescript.mdc`](.cursor/rules/typescript.mdc) +- `@testing` -> [`.cursor/rules/testing.mdc`](.cursor/rules/testing.mdc) +- `@datasync-filesystem-sdk` -> [`.cursor/rules/datasync-filesystem-sdk.mdc`](.cursor/rules/datasync-filesystem-sdk.mdc) +- `@code-review` -> [`.cursor/rules/code-review.mdc`](.cursor/rules/code-review.mdc) +- `@dev-workflow` -> [`.cursor/rules/dev-workflow.md`](.cursor/rules/dev-workflow.md) +- [`skills/typescript-datasync-filesystem/SKILL.md`](skills/typescript-datasync-filesystem/SKILL.md) +- [`skills/testing/SKILL.md`](skills/testing/SKILL.md) +- [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) From 28b08c839da637f602d33f86c916575032d1c3dd Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 6 Apr 2026 14:14:56 +0530 Subject: [PATCH 7/8] docs: restructure AGENTS.md and skills documentation, remove outdated cursor rules, and introduce new skills for development workflow and DataSync Filesystem SDK --- .cursor/rules/README.md | 23 +--- .cursor/rules/code-review.mdc | 44 ------- .cursor/rules/datasync-filesystem-sdk.mdc | 36 ------ .cursor/rules/dev-workflow.md | 38 ------ .cursor/rules/testing.mdc | 33 ------ .cursor/rules/typescript.mdc | 27 ----- AGENTS.md | 108 ++++++------------ skills/README.md | 25 ++-- skills/code-review/SKILL.md | 63 ++++++---- skills/datasync-filesystem/SKILL.md | 61 ++++++++++ skills/dev-workflow/SKILL.md | 61 ++++++++++ skills/testing/SKILL.md | 67 +++++++---- .../typescript-datasync-filesystem/SKILL.md | 46 -------- skills/typescript/SKILL.md | 39 +++++++ 14 files changed, 294 insertions(+), 377 deletions(-) delete mode 100644 .cursor/rules/code-review.mdc delete mode 100644 .cursor/rules/datasync-filesystem-sdk.mdc delete mode 100644 .cursor/rules/dev-workflow.md delete mode 100644 .cursor/rules/testing.mdc delete mode 100644 .cursor/rules/typescript.mdc create mode 100644 skills/datasync-filesystem/SKILL.md create mode 100644 skills/dev-workflow/SKILL.md delete mode 100644 skills/typescript-datasync-filesystem/SKILL.md create mode 100644 skills/typescript/SKILL.md diff --git a/.cursor/rules/README.md b/.cursor/rules/README.md index 4c3bf067..0c75565b 100644 --- a/.cursor/rules/README.md +++ b/.cursor/rules/README.md @@ -1,22 +1,5 @@ -# Cursor rules for this repository +# Cursor (optional) -Rules live in this directory. Each file documents **what** it covers, **when** it applies (`alwaysApply`, `globs`), and how to use it in chat. +**Cursor** users: start at the repo root **[`AGENTS.md`](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`** (universal for any editor or tool). -## How to @-reference - -In Cursor, type `@` and choose **Rules** (or the rule name if listed), or reference a path such as `@.cursor/rules/typescript.mdc` to pull that rule into context. - -## Rule index - -| File | `alwaysApply` | `globs` | When it applies | -|------|---------------|---------|-----------------| -| [`dev-workflow.md`](dev-workflow.md) | no | *(none)* | Branch/PR workflow, scripts, lint/test commands, versioning/release notes. Loaded from the rule picker; not auto-scoped to a single glob. | -| [`typescript.mdc`](typescript.mdc) | no | `src/**/*.ts` | Editing TypeScript under `src/` — style, structure, tooling. | -| [`datasync-filesystem-sdk.mdc`](datasync-filesystem-sdk.mdc) | no | `src/**/*.ts` | DataSync filesystem SDK patterns (Stack, config, paths, queries) — core library only, not `example/`. | -| [`testing.mdc`](testing.mdc) | no | `test/**/*.ts` | Jest tests, fixtures, temp dirs, `test/data/`. | -| [`code-review.mdc`](code-review.mdc) | **yes** | *(none)* | Every session — PR/checklist mindset for this repo. | - -## Related docs - -- Root agent entry point: [`../../AGENTS.md`](../../AGENTS.md) -- Skills index: [`../../skills/README.md`](../../skills/README.md) +This folder only points contributors here so nothing editor-specific duplicates the canonical docs. diff --git a/.cursor/rules/code-review.mdc b/.cursor/rules/code-review.mdc deleted file mode 100644 index 3f9526b9..00000000 --- a/.cursor/rules/code-review.mdc +++ /dev/null @@ -1,44 +0,0 @@ ---- -description: PR review checklist for datasync-filesystem-sdk — API docs, compatibility, tests, terminology -alwaysApply: true ---- - -# Code review checklist - -## Product terminology - -- This package is the **DataSync Filesystem SDK** (local synced content). Do **not** describe it as the **CDA** or **CMA** HTTP client unless the change explicitly documents comparison or migration. -- Distinguish **in-memory/filesystem** queries from **REST** or **CDN** behavior. - -## Public API and docs - -- Exported APIs should have accurate **JSDoc** (`@public`, parameters, return shape). -- README / examples should match actual **`Contentstack.Stack`** usage and config keys. - -## Backward compatibility - -- Avoid breaking changes to query results shape, config schema, or method signatures without a **semver-major** plan and changelog intent. -- Deprecations should be clearly commented and documented. - -## Errors - -- Prefer centralized messages from **`messages.ts`** (`ERROR_MESSAGES`, `WARNING_MESSAGES`) for user-visible strings; keep messages actionable. - -## Null and data safety - -- Guard against missing files, empty arrays, and malformed JSON consistent with existing patterns in `stack.ts` / `fs.ts`. - -## Dependencies and security - -- New dependencies need justification (bundle size, maintenance). Align with **`package.json`** constraints. -- Consider **Snyk** / org policy — `pretest` does not replace dependency review. - -## Tests - -- Behavioral changes in **`src/`** should include or update **Jest** coverage under **`test/`** using filesystem fixtures — not live API calls. - -## Severity (optional labels) - -- **Blocker:** wrong results, data loss risk, security issue, broken public API contract. -- **Major:** missing tests for core behavior, breaking change without version/docs strategy. -- **Minor:** style, non-user-facing refactors, doc nits. diff --git a/.cursor/rules/datasync-filesystem-sdk.mdc b/.cursor/rules/datasync-filesystem-sdk.mdc deleted file mode 100644 index 4487f737..00000000 --- a/.cursor/rules/datasync-filesystem-sdk.mdc +++ /dev/null @@ -1,36 +0,0 @@ ---- -description: DataSync Filesystem SDK — Stack, contentStore paths, queries (not CDA/CMA HTTP APIs) -globs: src/**/*.ts -alwaysApply: false ---- - -# DataSync Filesystem SDK (core) - -## Product model (this repo) - -This is the **filesystem query SDK** for **DataSync-stored** JSON — **not** the Contentstack **Delivery** or **Management** REST SDK. Terminology: **stack** here means the in-memory/query facade over **disk**, not an API stack or region endpoint. - -## Configuration mental model - -- **`Contentstack.Stack(config)`** merges into internal config (`setConfig` / `getConfig` in `src/index.ts`). -- Typical shape: `contentStore.baseDir`, `contentStore.patterns` (assets, content_types, entries), `locale`, `referenceDepth`, `projections`, `defaultSortingField` — see `src/config.ts` defaults and README. -- **Optional env:** `APP_ROOT` can influence where content resolves (documented in README). - -## Async patterns - -- **`Stack.connect()`** resolves when the stack is ready to query; chain `.then()` / `.catch()` as in README examples. -- File I/O uses promisified helpers from `src/fs.ts` where applicable. - -## Query surface - -- Entry points: **`contentType(uid)`**, **`assets()`**, query builders on the stack (filters, references, sort, skip/limit, projections, etc.) implemented in **`src/stack.ts`**. -- Query filtering uses **`sift`** and **`lodash`**; projections may use **`json-mask`**. - -## Scope of this rule - -- Applies to **`src/`** SDK core only. **`example/`** is illustrative — do not treat it as canonical API design. - -## Official docs (context) - -- **DataSync:** [Contentstack DataSync guide](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) — synchronization model this SDK assumes. -- **Query examples:** Published SDK docs / GitHub Pages linked from the repo README when present. diff --git a/.cursor/rules/dev-workflow.md b/.cursor/rules/dev-workflow.md deleted file mode 100644 index d5cb4f9b..00000000 --- a/.cursor/rules/dev-workflow.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -description: Branch and PR workflow, npm scripts, lint/tests, and version bumps for releases -alwaysApply: false ---- - -# Development workflow - -## Branches - -- Use **feature branches** for new work; open pull requests against **`development`** to integrate changes. -- For a **release**, open a pull request from **`development`** into **`master`**. Releases to npm are driven from **`master`**. - - -## Install and build - -```bash -npm install -npm run build-ts -``` - -## Lint and tests - -```bash -npm run lint # ESLint — see package.json for config path and globs -npm test # pretest runs build-ts, then Jest with coverage -``` - -- **Unit/integration:** Jest runs all `test/**/*.ts` except ignored paths in `jest.config.js` (e.g. `test/data/*`, `test/utils.ts`). Suites use on-disk fixtures under `test/data/` and temp trees per module (see `test/utils.ts`). - -## PR expectations - -- Run **build**, **lint**, and **tests** before opening or updating a PR. -- Avoid committing secrets; Talisman runs on pre-commit when configured. -- For **release-impacting** changes to library behavior or `src/`, coordinate a **`package.json` version bump** with maintainers. If a **Check Version Bump** (or similar) workflow is enabled for this repo, follow its rules for when `version` must change. - -## Docs - -- `npm run build-doc` — JSDoc site (requires successful `build-ts` first). diff --git a/.cursor/rules/testing.mdc b/.cursor/rules/testing.mdc deleted file mode 100644 index f2bd3eca..00000000 --- a/.cursor/rules/testing.mdc +++ /dev/null @@ -1,33 +0,0 @@ ---- -description: Jest tests under test/ — fixtures, temp dirs, coverage, ignores -globs: test/**/*.ts -alwaysApply: false ---- - -# Testing - -## Runner and config - -- **Jest** with **ts-jest**, **Node** environment (`jest.config.js`). -- **Coverage:** enabled; output under `coverage/`; `collectCoverage` true. -- **Ignored from tests:** `test/data/*`, `test/utils.ts`, and paths listed in `testPathIgnorePatterns` — adjust only alongside `jest.config.js`. - -## Layout - -- Test files: `test/**/*.ts` matching Jest `testMatch`. -- **Fixtures:** `test/data/` — static JSON samples (assets, entries, content types, etc.). -- **Helpers:** `test/utils.ts` — `init`, `populate*`, `destroy`, temp `baseDir` per suite under `__dirname` + module name. - -## Naming and style - -- Suites use `describe` / `it` with labels like `# Core`, `# Queries` (existing convention). -- **No live HTTP** — tests exercise the SDK against **written files** only. - -## Environment - -- **`APP_ROOT`:** optional; only if a test explicitly relies on README-documented behavior. -- No Delivery/Management API keys required. - -## Timeouts and notifications - -- Jest `notify: true` may use `node-notifier` locally — failures are normal if notifications are unavailable in CI. diff --git a/.cursor/rules/typescript.mdc b/.cursor/rules/typescript.mdc deleted file mode 100644 index ca826d47..00000000 --- a/.cursor/rules/typescript.mdc +++ /dev/null @@ -1,27 +0,0 @@ ---- -description: TypeScript source conventions for src/ — match existing ESLint and project tsconfig -globs: src/**/*.ts -alwaysApply: false ---- - -# TypeScript (`src/`) - -## Tooling - -- **Compiler:** `tsconfig.json` — `module` CommonJS, `target` ES6, `strict` unused locals/parameters, `noImplicitReturns`, declarations emitted to `typings/`. -- **Lint:** `npm run lint` uses ESLint with the config referenced in `package.json` (verify the config file name matches the repo — a `.eslintrc` may also be present). -- **Formatting:** `.jsbeautifyrc` exists at repo root; align with existing file style (indentation, quotes, semicolons as in neighboring code). - -## Layout - -- Keep the public surface in `src/index.ts`; heavy logic stays in `stack.ts`, `utils.ts`, `fs.ts`, `config.ts`, `messages.ts`. -- Prefer **JSDoc** on exported symbols (`@public`, `@description`, `@api`) for generated docs. -- Use existing **error/warning** patterns via `messages.ts` where appropriate instead of ad hoc strings. - -## Logging - -- Avoid introducing `console` noise in library code; follow existing patterns. Tests may use `debug` (see `test/utils.ts`). - -## Dependencies - -- Do not add HTTP clients or REST assumptions — this SDK targets **local filesystem** content and in-process queries. Use dependencies already in line with `package.json`. diff --git a/AGENTS.md b/AGENTS.md index 70d982cd..56757e65 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,91 +1,49 @@ -# Agent guidance — `@contentstack/datasync-filesystem-sdk` +# Contentstack DataSync Filesystem SDK – Agent guide -## Single source of truth +**Universal entry point** for contributors and AI agents (Cursor, Copilot, CLI tools, or none). Conventions and detailed guidance live in **`skills/*/SKILL.md`**, not in editor-specific config, so the same instructions apply everywhere. -Use this file and **`skills/`** as the **canonical** place for project context, workflows, and review standards so contributors get consistent guidance in any IDE or agent (Cursor, Copilot, CLI, others). +**Flow:** [`.cursor/rules/README.md`](.cursor/rules/README.md) (optional, Cursor only) → **`AGENTS.md`** (this file) → **`skills//SKILL.md`** -| Layer | Role | -|-------|------| -| **`AGENTS.md`** (this file) | Entry point: package identity, repo links, tech stack, source layout, commands, and skills index | -| **`skills//SKILL.md`** | Full detail: SDK mental model, testing, and code review checklists | -| **`.cursor/rules/`** | Cursor-only scoped pointers (`description` / `globs` / `alwaysApply`) that reference this file and `skills/` | +## What this repo is -**Flow:** Cursor rules -> **`AGENTS.md`** -> **`skills/*.md`** +| Field | Detail | +|-------|--------| +| *Name:* | [`@contentstack/datasync-filesystem-sdk`](https://github.com/contentstack/datasync-filesystem-sdk/) | +| *Purpose:* | TypeScript/JavaScript library to **query locally synced filesystem JSON** produced by [Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync), typically after sync via `@contentstack/datasync-content-store-filesystem`. | +| *Out of scope (if any):* | **Not** the Contentstack Delivery (CDA) or Management (CMA) HTTP SDK; **no** REST calls for core behavior—reads disk and runs in-process queries (`lodash`, `sift`, `json-mask`). | -## What this package is - -**Contentstack DataSync Filesystem SDK** is a **Node.js/TypeScript** library that queries **locally synced filesystem JSON content** produced by Contentstack DataSync (typically via `@contentstack/datasync-content-store-filesystem`). - -It is **not** the Contentstack Delivery (CDA) SDK or Management (CMA) SDK, and it does **not** call Contentstack REST APIs for core behavior. - -## Repository - -- **Git:** [https://github.com/contentstack/datasync-filesystem-sdk/](https://github.com/contentstack/datasync-filesystem-sdk/) -- **Product docs:** [https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) - -## Tech stack +## Tech stack (at a glance) | Area | Details | |------|---------| -| Language/runtime | TypeScript (`typescript` `^4.9.5`), Node.js (README recommends v20+) | -| Compilation/build | `tsc` (`compile`), clean + `tsc` via `build-ts`; output to `dist/` and `typings/` | -| Test framework | Jest + ts-jest (`jest.config.js`, Node test environment, coverage enabled) | -| Lint/tooling | `npm run lint` invokes ESLint command from `package.json`; repo also includes `.eslintrc` | -| Core query/data libs | `lodash`, `sift`, `json-mask`, `mkdirp` | -| Docs generation | JSDoc via `npm run build-doc` | - -## Source layout and public entry points - -| Role | Path | -|------|------| -| Package runtime entry | `dist/index.js` (`main` in `package.json`) | -| TS public facade | `src/index.ts` (`Contentstack`, `setConfig`, `getConfig`) | -| User-visible messages | `src/messages.ts` (`ERROR_MESSAGES`, `WARNING_MESSAGES`) | -| Query builder/core behavior | `src/stack.ts` | -| Defaults + path/file helpers | `src/config.ts`, `src/utils.ts`, `src/fs.ts` | -| Tests and fixtures | `test/` with fixtures in `test/data/` | -| Generated declarations | `typings/*.d.ts` | - -## Common commands - -| Command | Purpose | -|---------|---------| -| `npm run build-ts` | Clean `dist`, `typings`, `coverage`, then compile TypeScript | -| `npm run compile` | Compile TypeScript only | -| `npm test` | `pretest` runs `build-ts`, then Jest with coverage | -| `npm run lint` | Run lint command defined in `package.json` | -| `npm run build-doc` | Build and generate JSDoc docs under `docs/` | - -## Test model and env/credentials +| Language | TypeScript `^4.9.5` (`package.json`); Node.js v20+ recommended (`README.md`) | +| Build | `tsc` → `dist/`; declarations in `typings/`; `tsconfig.json`; `npm run build-ts` / `compile` | +| Tests | Jest + ts-jest; `jest.config.js`; tests under `test/**/*.ts` (see `testMatch` / ignores) | +| Lint / coverage | `npm run lint` (ESLint per `package.json` on `src/**/*.ts`); Jest coverage to `coverage/` | +| Other | Core deps: `lodash`, `sift`, `json-mask`, `mkdirp`; docs: `npm run build-doc` → `docs/` | -- Tests are filesystem-based (local fixtures + temp directories), not live Contentstack API calls. -- Test suites live in `test/`; `jest.config.js` controls matches/ignores. -- No Delivery/Management API credentials are required for core tests. -- Optional environment variable: `APP_ROOT` (documented in `README.md`) to override content root resolution. +## Commands (quick reference) -## Skills index +| Command type | Command | +|--------------|---------| +| Build | `npm run build-ts` (clean + compile) or `npm run compile` (`tsc` only) | +| Test | `npm test` (`pretest` runs `build-ts`, then Jest with coverage) | +| Lint | `npm run lint` | -- Skills index: [`skills/README.md`](skills/README.md) -- Key skills: - - [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) - - [`skills/testing/SKILL.md`](skills/testing/SKILL.md) - - [`skills/typescript-datasync-filesystem/SKILL.md`](skills/typescript-datasync-filesystem/SKILL.md) +Optional: CI and automation live under [`.github/workflows/`](.github/workflows/) (e.g. CodeQL, SCA, policy scans, version-bump checks—see each workflow for triggers). -## Cursor rules +## Where the documentation lives: skills -- Cursor rules overview: [`.cursor/rules/README.md`](.cursor/rules/README.md) -- Treat `.cursor/rules/` as scoped pointers; do not treat them as a second source of truth. -- Update policy and standards primarily in `AGENTS.md` and `skills/`, then keep rule pointers aligned. +| Skill | Path | What it covers | +|-------|------|----------------| +| Dev workflow | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, hooks, build/test/lint, PR and version expectations | +| TypeScript (`src/`) | [`skills/typescript/SKILL.md`](skills/typescript/SKILL.md) | Compiler/lint, layout, JSDoc, dependencies—no HTTP/REST assumptions | +| DataSync filesystem SDK | [`skills/datasync-filesystem/SKILL.md`](skills/datasync-filesystem/SKILL.md) | Stack, config, query surface, DataSync vs CDA/CMA | +| Testing | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest layout, fixtures, temp dirs, env, coverage | +| Code review | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist, semver, terminology, severity labels | -## Cursor-specific quick references +An index with “when to use” hints is in [`skills/README.md`](skills/README.md). -For Cursor workflows, reference these scoped rules: +## Using Cursor (optional) -- `@typescript` -> [`.cursor/rules/typescript.mdc`](.cursor/rules/typescript.mdc) -- `@testing` -> [`.cursor/rules/testing.mdc`](.cursor/rules/testing.mdc) -- `@datasync-filesystem-sdk` -> [`.cursor/rules/datasync-filesystem-sdk.mdc`](.cursor/rules/datasync-filesystem-sdk.mdc) -- `@code-review` -> [`.cursor/rules/code-review.mdc`](.cursor/rules/code-review.mdc) -- `@dev-workflow` -> [`.cursor/rules/dev-workflow.md`](.cursor/rules/dev-workflow.md) -- [`skills/typescript-datasync-filesystem/SKILL.md`](skills/typescript-datasync-filesystem/SKILL.md) -- [`skills/testing/SKILL.md`](skills/testing/SKILL.md) -- [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) +If you use *Cursor*, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to *[`AGENTS.md`](AGENTS.md)*—same docs as everyone else. diff --git a/skills/README.md b/skills/README.md index 4bbf7376..b969d01e 100644 --- a/skills/README.md +++ b/skills/README.md @@ -1,11 +1,20 @@ -# Skills index +# Skills – Contentstack DataSync Filesystem SDK -Skills are short, task-focused guides for this repository. Use them when the description matches your task; combine with [AGENTS.md](../AGENTS.md) and [`.cursor/rules/README.md`](../.cursor/rules/README.md). +**This directory is the source of truth** for detailed conventions (workflow, TypeScript/`src/`, DataSync SDK behavior, tests, code review). Read [`AGENTS.md`](../AGENTS.md) at the repo root for the index and quick commands; each skill is a folder with **`SKILL.md`** (YAML frontmatter: `name`, `description`). -| Skill | Folder | When to use | -|-------|--------|-------------| -| Code review | [`code-review/`](code-review/SKILL.md) | Reviewing or preparing PRs — checklist, semver, tests, terminology. | -| Testing | [`testing/`](testing/SKILL.md) | Running Jest, understanding `test/` layout, fixtures, env. | -| TypeScript + DataSync filesystem SDK | [`typescript-datasync-filesystem/`](typescript-datasync-filesystem/SKILL.md) | Changing query behavior, config, or Stack internals in `src/`. | +## When to use which skill -There is no separate **framework** skill: the SDK does not use a dedicated HTTP client layer; behavior is filesystem- and query-library–centric. +| Skill folder | Use when | +|--------------|----------| +| [`dev-workflow/`](dev-workflow/SKILL.md) | Branching (`development` / `master`), local hooks, running build/test/lint, releases and version bumps | +| [`typescript/`](typescript/SKILL.md) | TypeScript/`tsconfig`, ESLint, `src/` layout, JSDoc, style in library code | +| [`datasync-filesystem/`](datasync-filesystem/SKILL.md) | Stack, config, query surface, DataSync vs CDA/CMA—behavior in `src/` | +| [`testing/`](testing/SKILL.md) | Writing or debugging Jest tests, fixtures, `test/utils`, coverage | +| [`code-review/`](code-review/SKILL.md) | Reviewing or preparing PRs—API, compatibility, tests, terminology | + +Each folder contains `SKILL.md` with YAML frontmatter (`name`, `description`). + +## How to use these docs + +- **Humans / any AI tool:** Start at **`AGENTS.md`**, then open the relevant **`skills//SKILL.md`**. +- **Cursor users:** **[`.cursor/rules/README.md`](../.cursor/rules/README.md)** only points to **`AGENTS.md`** so guidance stays universal—no duplicate rule prose required in `.cursor/rules/`. diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index eba880aa..a464ea9e 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -1,48 +1,61 @@ --- name: code-review -description: PR review checklist for @contentstack/datasync-filesystem-sdk — API docs, compatibility, tests, DataSync terminology +description: PR review checklist for DataSync Filesystem SDK—API docs, compatibility, tests, terminology (not CDA/CMA HTTP SDK) --- -# Code review (expanded) +# Code review – Contentstack DataSync Filesystem SDK -Use this skill when reviewing or authoring changes to [**@contentstack/datasync-filesystem-sdk**](https://github.com/contentstack/datasync-filesystem-sdk/). Align with [`.cursor/rules/code-review.mdc`](../../.cursor/rules/code-review.mdc). +## When to use -## Scope clarity +- Reviewing a pull request that touches `src/`, `test/`, or public docs +- Preparing your own PR and self-checking before request for review +- Verifying semver impact or regression risk for query/config behavior -- Confirm the change targets **local DataSync filesystem querying**, not CDA/CMA HTTP APIs, unless the diff is documentation comparing ecosystems. +## Instructions -## Public API +### Scope and terminology -- **JSDoc** on exports: purpose, parameters, return values, examples where helpful. -- **README** and **example/** snippets reflect real `Contentstack.Stack` config and method chains. +- This package is the **DataSync Filesystem SDK** (local synced content). Do **not** describe it as the **CDA** or **CMA** HTTP client unless the change explicitly documents comparison or migration. +- Distinguish **in-memory/filesystem** queries from **REST** or **CDN** behavior. +- Confirm behavior changes are covered by **filesystem-based** Jest tests, not live API calls. -## Compatibility +### Public API and docs -- **Semver:** breaking changes to public methods, config shape, or default behavior likely require a **major** bump; additive features **minor**; fixes **patch** — follow team policy. -- Avoid silent changes to projection defaults, locale handling, or reference resolution depth. +- Exported APIs should have accurate **JSDoc** (`@public`, parameters, return shape). +- **README** and **example/** snippets must match real `Contentstack.Stack` usage and config keys. -## Errors and UX +### Compatibility -- User-facing strings should flow through **`messages.ts`** where possible. -- Thrown errors should be debuggable (include context, avoid leaking sensitive paths in production if your deployment cares). +- Avoid breaking query result shape, config schema, or public method signatures without a **semver-major** plan and changelog intent. +- Deprecations: comment + document clearly. -## Correctness and safety +### Errors and messages -- **Filesystem:** race-free assumptions, `existsSync` / read patterns consistent with `fs.ts`. -- **Queries:** `sift` / lodash behavior matches intended Mongo-like operators documented or implied by tests. +- Prefer centralized strings from **`src/messages.ts`** (`ERROR_MESSAGES`, `WARNING_MESSAGES`); keep messages actionable. -## Dependencies +### Correctness and null safety -- New packages: license, maintenance, size — and run org security processes (**Snyk**, etc.). +- Guard missing files, empty arrays, and malformed JSON consistently with patterns in `stack.ts` / `fs.ts`. -## Tests +### Dependencies and security -- **`src/`** behavior changes need **Jest** updates under **`test/`** with filesystem fixtures — not network mocks for Contentstack APIs. +- New dependencies need justification (bundle size, maintenance). Align with **`package.json`**. +- Consider **Snyk** / org policy — `pretest` does not replace dependency review. -## Optional severity +### Tests + +- Behavioral changes in **`src/`** need matching updates under **`test/`** with fixtures in **`test/data/`** — not live API calls. + +### Optional severity | Level | Examples | |-------|----------| -| Blocker | Wrong query results, security issue, broken published API | -| Major | Missing regression tests, breaking change without version strategy | -| Minor | Comments, internal refactors, doc typos | +| Blocker | Wrong query results, data loss risk, security issue, broken public API contract | +| Major | Missing tests for core behavior, breaking change without version/docs strategy | +| Minor | Style, non-user-facing refactors, doc nits | + +## References + +- [`../testing/SKILL.md`](../testing/SKILL.md) +- [`../datasync-filesystem/SKILL.md`](../datasync-filesystem/SKILL.md) +- [`../../AGENTS.md`](../../AGENTS.md) diff --git a/skills/datasync-filesystem/SKILL.md b/skills/datasync-filesystem/SKILL.md new file mode 100644 index 00000000..1c1bc7e8 --- /dev/null +++ b/skills/datasync-filesystem/SKILL.md @@ -0,0 +1,61 @@ +--- +name: datasync-filesystem +description: DataSync Filesystem SDK mental model—Stack, contentStore paths, queries in src/; not CDA/CMA HTTP +--- + +# SDK core and queries – Contentstack DataSync Filesystem SDK + +## When to use + +- Implementing or changing query behavior, filters, or references in `src/stack.ts` +- Adjusting defaults, paths, or locale handling (`src/config.ts`, `src/utils.ts`, `src/fs.ts`) +- Adding exports or user-facing errors (`src/index.ts`, `src/messages.ts`) + +## Instructions + +### Product model + +- This is the **filesystem query SDK** for **DataSync-stored** JSON — **not** the Contentstack **Delivery** or **Management** REST SDK. +- **Stack** here means the in-memory/query facade over **disk**, not an API stack or region endpoint. +- **`@contentstack/datasync-filesystem-sdk`** reads JSON after DataSync / `@contentstack/datasync-content-store-filesystem` sync; it does **not** call Contentstack REST APIs for core behavior. + +### Entry flow + +1. **`Contentstack.Stack(userConfig)`** in `src/index.ts` merges config and returns **`Stack`** (`src/stack.ts`). +2. **`Stack.connect()`** resolves when the stack is ready to query; use `.then()` / `.catch()` as in README examples. +3. Queries from **`contentType('uid')`**, **`assets()`**, then filters, references, pagination, projections — see `src/stack.ts`. + +### Configuration + +- **`Contentstack.Stack(config)`** merges into internal config (`setConfig` / `getConfig` in `src/index.ts`). +- Typical shape: `contentStore.baseDir`, `contentStore.patterns` (assets, content_types, entries), `locale`, `referenceDepth`, `projections`, `defaultSortingField` — see `src/config.ts` defaults and README. +- Optional **env:** `APP_ROOT` can influence where content resolves (README). +- Path helpers: **`src/utils.ts`**; promisified reads and FS helpers: **`src/fs.ts`**. + +### Query execution + +- Entry points: **`contentType(uid)`**, **`assets()`**, query builders (filters, references, sort, skip/limit, projections) in **`src/stack.ts`**. +- **Filtering:** `sift`; **sort/merge:** `lodash`; **projections:** `json-mask` where used. +- **References:** depth from config and `includeReferences` behavior in `stack.ts`. + +### Scope + +- **`src/`** SDK core is canonical; **`example/`** is illustrative only — not the source of API design. + +### Where to change code + +| Concern | Start here | +|---------|------------| +| New operator or filter | `src/stack.ts` | +| Path / base dir / `APP_ROOT` | `src/config.ts`, `src/utils.ts`, `README.md` | +| FS reads | `src/fs.ts` | +| User-visible messages | `src/messages.ts` | +| Public API surface | `src/index.ts` | + +## References + +- [DataSync guide](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) +- [SDK query examples](https://contentstack.github.io/datasync-filesystem-sdk/) (when linked from repo README) +- [`../typescript/SKILL.md`](../typescript/SKILL.md) — TypeScript and `src/` conventions +- [`../testing/SKILL.md`](../testing/SKILL.md) +- [`../../AGENTS.md`](../../AGENTS.md) diff --git a/skills/dev-workflow/SKILL.md b/skills/dev-workflow/SKILL.md new file mode 100644 index 00000000..0a89d4fc --- /dev/null +++ b/skills/dev-workflow/SKILL.md @@ -0,0 +1,61 @@ +--- +name: dev-workflow +description: Branches, Husky hooks, build/test/lint commands, PR expectations, and version bumps for this repo +--- + +# Dev workflow – Contentstack DataSync Filesystem SDK + +## When to use + +- Setting up the repo locally or onboarding +- Before opening or updating a PR +- Planning a release or changing `package.json` version + +## Instructions + +### Branches + +- Use **feature branches** for new work; open pull requests against **`development`** to integrate changes. +- For a **release**, open a pull request from **`development`** into **`master`**. Releases to npm are driven from **`master`**. +- Alternatively, follow your team’s current branch policy if it differs. + +### Install and build + +```bash +npm install +npm run build-ts +``` + +`npm run build-ts` cleans `dist/`, `typings/`, `coverage/` and runs `tsc` (`package.json`). + +### Quality gates + +```bash +npm run lint # ESLint — see package.json for config path and globs +npm test # pretest runs build-ts, then Jest with coverage +``` + +- Jest runs `test/**/*.ts` except ignored paths in `jest.config.js` (e.g. `test/data/*`, `test/utils.ts`). Suites use fixtures under `test/data/` and temp trees per module (see `test/utils.ts`). + +### PR expectations + +- Run **build**, **lint**, and **tests** before opening or updating a PR. +- Avoid committing secrets; **Talisman** runs on pre-commit when configured. +- For **release-impacting** changes to library behavior or `src/`, coordinate a **`package.json` version bump** with maintainers. If **Check Version Bump** (or similar) in `.github/workflows/` applies, follow its rules. + +### Hooks (`.husky/`) + +- `.husky/pre-commit` runs **Talisman** and **Snyk** when those tools are installed; use `SKIP_HOOK=1` only when your team allows bypassing checks. + +### Docs + +- `npm run build-doc` — JSDoc site (requires successful `build-ts` first). + +### CI + +- Workflows under `.github/workflows/` include CodeQL, SCA, policy scans, version-bump checks—see each file for triggers. + +## References + +- [`../testing/SKILL.md`](../testing/SKILL.md) — Jest and test layout +- [`../../AGENTS.md`](../../AGENTS.md) — entry point and commands table diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md index 63f9c99a..fd735e83 100644 --- a/skills/testing/SKILL.md +++ b/skills/testing/SKILL.md @@ -1,45 +1,62 @@ --- name: testing -description: Run and extend Jest tests for datasync-filesystem-sdk — build pretest, fixtures, temp dirs, ignores +description: Jest tests for datasync-filesystem-sdk—pretest build, fixtures, test/utils, ignores, coverage, no live API --- -# Testing skill +# Testing – Contentstack DataSync Filesystem SDK -## Commands +## When to use -```bash -npm test -``` +- Adding or changing tests under `test/` +- Debugging failures after `src/` changes +- Understanding why a path is ignored in Jest or how temp dirs are created -`pretest` runs **`npm run build-ts`** (clean + `tsc`), then **Jest** runs with **coverage** (`jest.config.js`). +## Instructions -```bash -npm run build-ts # alone if you only need dist/typings before debugging tests -``` +### Commands -## Layout +- `npm test` — `pretest` runs `npm run build-ts`, then Jest with coverage (`jest.config.js`). +- `npm run build-ts` — use alone when you need `dist/` / `typings/` before debugging tests. + +### Runner and config + +- **Jest** with **ts-jest**, **Node** environment (`jest.config.js`). +- **Coverage:** enabled; output under `coverage/` (`collectCoverage` true). +- **Ignored from test discovery:** `test/data/*`, `test/utils.ts`, and paths in `testPathIgnorePatterns` — change only together with `jest.config.js`. + +### Layout | Path | Role | |------|------| -| `test/**/*.ts` | Test suites (see `testMatch` in `jest.config.js`) | -| `test/data/` | Static JSON fixtures — **ignored** as test files | -| `test/utils.ts` | `init`, populate helpers, `destroy` — **ignored** as a test file | -| Per-suite temp dirs | Created under `test//` via `init(..., moduleName)` | +| `test/**/*.ts` | Test suites (`testMatch` in `jest.config.js`) | +| `test/data/` | Static JSON fixtures (ignored as test files) | +| `test/utils.ts` | `init`, `populate*`, `destroy` (ignored as a test file) | +| Per-suite dirs | Temp content under `test//` via `init(Contentstack, config, moduleName)` | + +### Naming and style + +- Suites use `describe` / `it` with labels like `# Core`, `# Queries` (existing convention). +- File names need not be `*.test.ts`; Jest matches by path pattern. +- **No live HTTP** — tests exercise the SDK against **written files** only. + +### Environment and credentials + +- **No** Delivery or Management API keys for default tests. +- Optional: `APP_ROOT` only if a test exercises README-documented root resolution. -## Naming +### Mocks and I/O -- Suites use **`describe`** / **`it`** with readable labels (e.g. `# Core`). -- Not all files use `*.test.ts`; Jest discovers by path pattern, not name suffix. +- Tests write **real files** under temp directories; reuse `populateAssets`, `populateContentTypes`, `pupulateEntries` from `test/utils.ts` where applicable. -## Environment +### Coverage -- **No API credentials** for core tests. -- **`APP_ROOT`:** only if exercising README-documented resolution behavior. +- Reports under `coverage/`; change `jest.config.js` only when intentionally adjusting collect rules. -## Mocks +### Notifications -- Tests use **real filesystem writes** into temp directories, not HTTP mocks. Reuse **`populateAssets`**, **`populateContentTypes`**, **`pupulateEntries`** from `test/utils.ts` where applicable. +- Jest `notify: true` may use `node-notifier` locally — notification failures are normal if unavailable in CI. -## Coverage and CI +## References -- Coverage outputs to **`coverage/`** (HTML + JSON). Adjust **`jest.config.js`** only when changing collect rules deliberately. +- [`../datasync-filesystem/SKILL.md`](../datasync-filesystem/SKILL.md) — what `src/` is doing under test +- [`../../AGENTS.md`](../../AGENTS.md) diff --git a/skills/typescript-datasync-filesystem/SKILL.md b/skills/typescript-datasync-filesystem/SKILL.md deleted file mode 100644 index 931d7066..00000000 --- a/skills/typescript-datasync-filesystem/SKILL.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: typescript-datasync-filesystem -description: Mental model for the DataSync Filesystem SDK — Stack, config, queries, file layout in src/ ---- - -# TypeScript DataSync Filesystem SDK - -## What you are editing - -**Package:** `@contentstack/datasync-filesystem-sdk` -**Role:** Query **JSON content on disk** produced by DataSync / content-store-filesystem — **not** live CDA or CMA HTTP calls. - -## Entry flow - -1. **`Contentstack.Stack(userConfig)`** in `src/index.ts` merges config and returns **`Stack`** (`src/stack.ts`). -2. Call **`Stack.connect()`** before running queries (async chain). -3. Build queries from **`contentType('uid')`**, **`assets()`**, then filters, references, pagination, projections — see `src/stack.ts`. - -## Configuration - -- Defaults in **`src/config.ts`** (`defaultConfig`): `contentStore.baseDir`, `patterns`, `locale`, `referenceDepth`, `projections`, etc. -- **`getConfig` / `setConfig`** allow inspecting or merging global options. -- Path helpers live in **`src/utils.ts`**; low-level reads in **`src/fs.ts`**. - -## Query execution - -- **Filtering:** **`sift`** for predicate matching; **`lodash`** for sorting/merging; **`json-mask`** for projections when used. -- **References:** depth controlled by config / `includeReferences` patterns in `stack.ts`. - -## Where to change behavior - -| Concern | Start here | -|---------|------------| -| New query operator or filter | `src/stack.ts` (large file — search existing similar methods) | -| Path resolution / base dir | `src/config.ts`, `src/utils.ts`, `README` for `APP_ROOT` | -| FS read/cache behavior | `src/fs.ts` | -| User-visible errors | `src/messages.ts` | -| Public exports | `src/index.ts` | - -## Tests - -- Mirror changes with **`test/`** suites and fixtures under **`test/data/`** — see [`../testing/SKILL.md`](../testing/SKILL.md). - -## Official context - -- [DataSync documentation](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync) explains sync; this SDK assumes that pipeline has already written files. diff --git a/skills/typescript/SKILL.md b/skills/typescript/SKILL.md new file mode 100644 index 00000000..b57dbadd --- /dev/null +++ b/skills/typescript/SKILL.md @@ -0,0 +1,39 @@ +--- +name: typescript +description: TypeScript conventions for src/—tsconfig, ESLint, layout, JSDoc, no HTTP/REST assumptions +--- + +# TypeScript (`src/`) – Contentstack DataSync Filesystem SDK + +## When to use + +- Editing or adding files under `src/` +- Aligning with compiler and lint settings +- Choosing where new code belongs (`index.ts`, `stack.ts`, `utils.ts`, etc.) + +## Instructions + +### Tooling + +- **Compiler:** `tsconfig.json` — `module` CommonJS, `target` ES6, unused locals/parameters, `noImplicitReturns`, declarations emitted to `typings/`. +- **Lint:** `npm run lint` uses ESLint with the config referenced in `package.json` (a `.eslintrc` may also exist at repo root). +- **Formatting:** `.jsbeautifyrc` at repo root; match neighboring code (indentation, quotes, semicolons). + +### Layout + +- Keep the public surface in `src/index.ts`; heavy logic stays in `stack.ts`, `utils.ts`, `fs.ts`, `config.ts`, `messages.ts`. +- Prefer **JSDoc** on exported symbols (`@public`, `@description`, `@api`) for `npm run build-doc`. +- Use **error/warning** patterns from `messages.ts` instead of ad hoc user-facing strings where appropriate. + +### Logging + +- Avoid `console` noise in library code; tests may use `debug` (see `test/utils.ts`). + +### Dependencies + +- Do not add HTTP clients or REST assumptions — this SDK targets **local filesystem** content and in-process queries. New deps must align with `package.json` and team policy. + +## References + +- [`../datasync-filesystem/SKILL.md`](../datasync-filesystem/SKILL.md) — SDK behavior and Stack API +- [`../../AGENTS.md`](../../AGENTS.md) From 7d08d26b6da3e7d709aa076ef7157b6a175646ef Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Mon, 6 Apr 2026 15:47:44 +0530 Subject: [PATCH 8/8] feat: add GitHub Actions workflow for automated npm package release --- .github/workflows/release.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e0c7d014 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: Release + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + # Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + # Setup Node.js environment + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22.x" + + # Install dependencies + - name: Install dependencies + run: npm install + + # Fetch package details (name and version) + - name: Get package details + id: package + uses: codex-team/action-nodejs-package-info@v1.1 + + # Install npm-pack-all to create a package archive + - name: Install npm pack + run: npm install npm-pack + + # Pack the package into a .tgz archive + - name: Pack the npm package + run: npm pack + + # Publish the package to npm + - name: Publish to npm + id: publish_npm + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + # access: public # Uncomment this line if you want to publish the package as public for first time + + # Upload the packaged .tgz to the release that triggered this workflow + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: "./contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" + asset_name: "contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" + asset_content_type: application/tgz