diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..e0fc924 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,36 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [master, development] + pull_request: + branches: [master, development] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - uses: actions/checkout@v3.5.3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3.7.0 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + env: + TOKEN: ${{secrets.TOKEN}} + TOKEN_WITH_NO_CT: ${{secrets.TOKEN_WITH_NO_CT}} + APIKEY: ${{secrets.APIKEY}} + APIKEY_WITH_NO_CT: ${{secrets.APIKEY_WITH_NO_CT}} + ENVIRONMENT: ${{secrets.ENVIRONMENT}} + REGION: ${{secrets.REGION}} + TOKENTYPE: ${{secrets.TOKENTYPE}} + BRANCH: ${{secrets.BRANCH}} diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml deleted file mode 100644 index 7c26217..0000000 --- a/.github/workflows/npm-publish-github-packages.yml +++ /dev/null @@ -1,45 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: Publish package to Github registry - -on: - release: - types: [created] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm ci - - run: npm test - env: - TOKEN: ${{secrets.TOKEN}} - TOKEN_WITH_NO_CT: ${{secrets.TOKEN_WITH_NO_CT}} - APIKEY: ${{secrets.APIKEY}} - APIKEY_WITH_NO_CT: ${{secrets.APIKEY_WITH_NO_CT}} - ENVIRONMENT: ${{secrets.ENVIRONMENT}} - REGION: ${{secrets.REGION}} - TOKENTYPE: ${{secrets.TOKENTYPE}} - BRANCH: ${{secrets.BRANCH}} - - publish-gpr: - needs: test - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish --tag latest - env: - NODE_AUTH_TOKEN: ${{secrets.PKG_TOKEN}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 707c241..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: Publish package to NPM registry - -on: - release: - types: [created] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm ci - - run: npm test - env: - TOKEN: ${{secrets.TOKEN}} - TOKEN_WITH_NO_CT: ${{secrets.TOKEN_WITH_NO_CT}} - APIKEY: ${{secrets.APIKEY}} - APIKEY_WITH_NO_CT: ${{secrets.APIKEY_WITH_NO_CT}} - ENVIRONMENT: ${{secrets.ENVIRONMENT}} - REGION: ${{secrets.REGION}} - TOKENTYPE: ${{secrets.TOKENTYPE}} - BRANCH: ${{secrets.BRANCH}} - - publish-npm: - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish --tag latest --access public - env: - NODE_AUTH_TOKEN: ${{secrets.TYPES_GENERATOR_AUTOMATION}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5e0c2f0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: Publish package to NPM and Git registry + +on: + push: + branches: + - main + +jobs: + build: + name: Build and upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3.7.0 + with: + node-version: "18.x" + - name: Install dependencies + run: npm install + - name: Build + run: | + rm -rf dist + npm run prepare + - name: Upload dist + uses: actions/upload-artifact@v3.1.2 + with: + name: dist + path: dist + + release: + name: Download dist and release + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3.7.0 + with: + node-version: "18.x" + - name: Install dependencies + run: npm install + - name: Download dist + uses: actions/download-artifact@v3 + with: + name: dist + path: dist + - name: Display dirs + run: ls -R + - uses: Klemensas/action-autotag@1.2.3 + id: update_tag + with: + GITHUB_TOKEN: "${{ secrets.PKG_TOKEN }}" + tag_prefix: "v" + - name: Release + if: steps.update_tag.outputs.tagname + id: release-plugin + uses: JS-DevTools/npm-publish@v2.2.0 + with: + token: ${{ secrets.TYPES_GENERATOR_AUTOMATION }} + strategy: upgrade + - name: GitHub Release + if: steps.update_tag.outputs.tagname + id: github-release + env: + GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }} + run: gh release create v${{ steps.release-plugin.outputs.version }} --title "Release ${{ steps.release-plugin.outputs.version }}" --generate-notes diff --git a/package-lock.json b/package-lock.json index 45f3009..af05bb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@contentstack/types-generator", - "version": "2.0.3", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/types-generator", - "version": "2.0.3", + "version": "2.1.0", "license": "MIT", "dependencies": { - "@contentstack/delivery-sdk": "^4.4.3", + "@contentstack/delivery-sdk": "^4.4.4", "@gql2ts/from-schema": "^2.0.0-4", "axios": "^1.7.8", "lodash": "^4.17.21", @@ -24,6 +24,7 @@ "dotenv": "^16.4.5", "jest": "^29.7.0", "nock": "^13.5.4", + "rollup": "^4.30.1", "ts-jest": "^29.1.2", "tsup": "^8.0.2", "typescript": "^5.4.5" @@ -599,28 +600,42 @@ "dev": true }, "node_modules/@contentstack/core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@contentstack/core/-/core-1.1.3.tgz", - "integrity": "sha512-0sbk7xte9JVlPfcgpfhxT9OZeGG0FgHnc7FABEWsBzKi41KSnDj7zFmkK7rVaORkeUM1elhKDmLqNDRYC1oCEw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@contentstack/core/-/core-1.2.0.tgz", + "integrity": "sha512-+lvpw0QxJ6A77iqCQN8swo2IhtxaXx/Cwe2r/RE0TrFhWWdJyoIgdySA+LfYnqgxpOIv0B05ix98+xWbkNkwSQ==", + "license": "MIT", "dependencies": { - "axios": "^1.7.7", - "axios-mock-adapter": "^1.22.0", + "axios": "^1.7.9", + "axios-mock-adapter": "^2.1.0", "lodash": "^4.17.21", - "qs": "^6.13.0", - "tslib": "^2.8.0" + "qs": "^6.14.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@contentstack/core/node_modules/axios-mock-adapter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-2.1.0.tgz", + "integrity": "sha512-AZUe4OjECGCNNssH8SOdtneiQELsqTsat3SQQCWLPjN436/H+L9AjWfV7bF+Zg/YL9cgbhrz5671hoh+Tbn98w==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "is-buffer": "^2.0.5" + }, + "peerDependencies": { + "axios": ">= 0.17.0" } }, "node_modules/@contentstack/delivery-sdk": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@contentstack/delivery-sdk/-/delivery-sdk-4.4.3.tgz", - "integrity": "sha512-Iu51iC8otU5ipHR/jQSnD/GbQMno4eFCXwTiSbMyJy4yy65dz07lD1ZO0tiskputDR32PU2+AQ3Qv8o1OCDfXQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@contentstack/delivery-sdk/-/delivery-sdk-4.5.0.tgz", + "integrity": "sha512-f3AUA3VV7m4YXCIdK5hVb8GnCwChj/qyJ8z0fYvAJ1+rRUPiyLl6o966eGFYa/+gM75+jpAxMj6f5SR/HwuaGQ==", "license": "MIT", "dependencies": { - "@contentstack/core": "^1.1.3", - "@contentstack/utils": "^1.3.14", + "@contentstack/core": "^1.2.0", + "@contentstack/utils": "^1.3.15", "@types/humps": "^2.0.6", - "axios": "^1.7.8", - "dotenv": "^16.4.5", + "axios": "^1.7.9", + "dotenv": "^16.4.7", "humps": "^2.0.1", "path-browserify": "^1.0.1" } @@ -657,70 +672,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz", - "integrity": "sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.4.tgz", - "integrity": "sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz", - "integrity": "sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.4.tgz", - "integrity": "sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.4.tgz", @@ -737,294 +688,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz", - "integrity": "sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz", - "integrity": "sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz", - "integrity": "sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz", - "integrity": "sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz", - "integrity": "sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz", - "integrity": "sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz", - "integrity": "sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz", - "integrity": "sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz", - "integrity": "sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz", - "integrity": "sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz", - "integrity": "sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz", - "integrity": "sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz", - "integrity": "sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz", - "integrity": "sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz", - "integrity": "sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz", - "integrity": "sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz", - "integrity": "sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz", - "integrity": "sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@gql2ts/from-schema": { "version": "2.0.0-4", "resolved": "https://registry.npmjs.org/@gql2ts/from-schema/-/from-schema-2.0.0-4.tgz", @@ -1549,208 +1212,266 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.32.1.tgz", + "integrity": "sha512-/pqA4DmqyCm8u5YIDzIdlLcEmuvxb0v8fZdFhVMszSpDTgbQKdw3/mB3eMUHIbubtJ6F9j+LtmyCnHTEqIHyzA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.32.1.tgz", + "integrity": "sha512-If3PDskT77q7zgqVqYuj7WG3WC08G1kwXGVFi9Jr8nY6eHucREHkfpX79c0ACAjLj3QIWKPJR7w4i+f5EdLH5Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.32.1.tgz", + "integrity": "sha512-zCpKHioQ9KgZToFp5Wvz6zaWbMzYQ2LJHQ+QixDKq52KKrF65ueu6Af4hLlLWHjX1Wf/0G5kSJM9PySW9IrvHA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.32.1.tgz", + "integrity": "sha512-sFvF+t2+TyUo/ZQqUcifrJIgznx58oFZbdHS9TvHq3xhPVL9nOp+yZ6LKrO9GWTP+6DbFtoyLDbjTpR62Mbr3Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.32.1.tgz", + "integrity": "sha512-NbOa+7InvMWRcY9RG+B6kKIMD/FsnQPH0MWUvDlQB1iXnF/UcKSudCXZtv4lW+C276g3w5AxPbfry5rSYvyeYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.32.1.tgz", + "integrity": "sha512-JRBRmwvHPXR881j2xjry8HZ86wIPK2CcDw0EXchE1UgU0ubWp9nvlT7cZYKc6bkypBt745b4bglf3+xJ7hXWWw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.32.1.tgz", + "integrity": "sha512-PKvszb+9o/vVdUzCCjL0sKHukEQV39tD3fepXxYrHE3sTKrRdCydI7uldRLbjLmDA3TFDmh418XH19NOsDRH8g==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.32.1.tgz", + "integrity": "sha512-9WHEMV6Y89eL606ReYowXuGF1Yb2vwfKWKdD1A5h+OYnPZSJvxbEjxTRKPgi7tkP2DSnW0YLab1ooy+i/FQp/Q==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.32.1.tgz", + "integrity": "sha512-tZWc9iEt5fGJ1CL2LRPw8OttkCBDs+D8D3oEM8mH8S1ICZCtFJhD7DZ3XMGM8kpqHvhGUTvNUYVDnmkj4BDXnw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.32.1.tgz", + "integrity": "sha512-FTYc2YoTWUsBz5GTTgGkRYYJ5NGJIi/rCY4oK/I8aKowx1ToXeoVVbIE4LGAjsauvlhjfl0MYacxClLld1VrOw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.32.1.tgz", + "integrity": "sha512-F51qLdOtpS6P1zJVRzYM0v6MrBNypyPEN1GfMiz0gPu9jN8ScGaEFIZQwteSsGKg799oR5EaP7+B2jHgL+d+Kw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.32.1.tgz", + "integrity": "sha512-wO0WkfSppfX4YFm5KhdCCpnpGbtgQNj/tgvYzrVYFKDpven8w2N6Gg5nB6w+wAMO3AIfSTWeTjfVe+uZ23zAlg==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.32.1.tgz", + "integrity": "sha512-iWswS9cIXfJO1MFYtI/4jjlrGb/V58oMu4dYJIKnR5UIwbkzR0PJ09O0PDZT0oJ3LYWXBSWahNf/Mjo6i1E5/g==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.32.1.tgz", + "integrity": "sha512-RKt8NI9tebzmEthMnfVgG3i/XeECkMPS+ibVZjZ6mNekpbbUmkNWuIN2yHsb/mBPyZke4nlI4YqIdFPgKuoyQQ==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.32.1.tgz", + "integrity": "sha512-WQFLZ9c42ECqEjwg/GHHsouij3pzLXkFdz0UxHa/0OM12LzvX7DzedlY0SIEly2v18YZLRhCRoHZDxbBSWoGYg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.32.1.tgz", + "integrity": "sha512-BLoiyHDOWoS3uccNSADMza6V6vCNiphi94tQlVIL5de+r6r/CCQuNnerf+1g2mnk2b6edp5dk0nhdZ7aEjOBsA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.32.1.tgz", + "integrity": "sha512-w2l3UnlgYTNNU+Z6wOR8YdaioqfEnwPjIsJ66KxKAf0p+AuL2FHeTX6qvM+p/Ue3XPBVNyVSfCrfZiQh7vZHLQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.32.1.tgz", + "integrity": "sha512-Am9H+TGLomPGkBnaPWie4F3x+yQ2rr4Bk2jpwy+iV+Gel9jLAu/KqT8k3X4jxFPW6Zf8OMnehyutsd+eHoq1WQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.32.1.tgz", + "integrity": "sha512-ar80GhdZb4DgmW3myIS9nRFYcpJRSME8iqWgzH2i44u+IdrzmiXVxeFnExQ5v4JYUSpg94bWjevMG8JHf1Da5Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1854,10 +1575,11 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -2072,6 +1794,7 @@ "version": "1.22.0", "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", "is-buffer": "^2.0.5" @@ -2669,9 +2392,10 @@ } }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -2680,12 +2404,12 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", - "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, @@ -2751,9 +2475,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -3056,21 +2780,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", + "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -3088,6 +2812,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3523,6 +3260,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -4289,9 +4027,9 @@ } }, "node_modules/math-intrinsics": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", - "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -4798,12 +4536,12 @@ ] }, "node_modules/qs": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", - "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -4917,12 +4655,13 @@ } }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.32.1.tgz", + "integrity": "sha512-z+aeEsOeEa3mEbS1Tjl6sAZ8NE3+AalQz1RJGj81M+fizusbdDMoEJwdJNHfaB40Scr4qNu+welOfes7maKonA==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -4932,22 +4671,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.32.1", + "@rollup/rollup-android-arm64": "4.32.1", + "@rollup/rollup-darwin-arm64": "4.32.1", + "@rollup/rollup-darwin-x64": "4.32.1", + "@rollup/rollup-freebsd-arm64": "4.32.1", + "@rollup/rollup-freebsd-x64": "4.32.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.32.1", + "@rollup/rollup-linux-arm-musleabihf": "4.32.1", + "@rollup/rollup-linux-arm64-gnu": "4.32.1", + "@rollup/rollup-linux-arm64-musl": "4.32.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.32.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.32.1", + "@rollup/rollup-linux-riscv64-gnu": "4.32.1", + "@rollup/rollup-linux-s390x-gnu": "4.32.1", + "@rollup/rollup-linux-x64-gnu": "4.32.1", + "@rollup/rollup-linux-x64-musl": "4.32.1", + "@rollup/rollup-win32-arm64-msvc": "4.32.1", + "@rollup/rollup-win32-ia32-msvc": "4.32.1", + "@rollup/rollup-win32-x64-msvc": "4.32.1", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index 4d6a249..f90c335 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/types-generator", - "version": "2.0.3", + "version": "2.1.0", "description": "Contentstack type definition generation library", "private": false, "author": "Contentstack", @@ -37,12 +37,13 @@ "dotenv": "^16.4.5", "jest": "^29.7.0", "nock": "^13.5.4", + "rollup": "^4.30.1", "ts-jest": "^29.1.2", "tsup": "^8.0.2", "typescript": "^5.4.5" }, "dependencies": { - "@contentstack/delivery-sdk": "^4.4.3", + "@contentstack/delivery-sdk": "^4.4.4", "@gql2ts/from-schema": "^2.0.0-4", "axios": "^1.7.8", "lodash": "^4.17.21", diff --git a/src/generateTS/factory.ts b/src/generateTS/factory.ts index 9b5a7b4..d681267 100644 --- a/src/generateTS/factory.ts +++ b/src/generateTS/factory.ts @@ -217,29 +217,57 @@ export default function (userOptions: TSGenOptions) { function visit_field(field: ContentstackTypes.Field) { let fieldType = ""; - if ( - field.data_type === "global_field" && - cachedGlobalFields[name_type(field.reference_to)] - ) { - fieldType = name_type(field.reference_to); + // Check if the field is a global field + if (field.data_type === "global_field") { + // Check if the field is cached + const isCached = cachedGlobalFields[name_type(field.reference_to)]; + + // Generate the referred_content_types array + const referredContentTypes = [ + { + title: name_type(field.reference_to), + uid: field.reference_to, + }, + ]; + + // Assign the new structure for the global field + fieldType = `referred_content_types: ${JSON.stringify( + referredContentTypes + )}`; + // If it's a multiple field, append '[]' to the fieldType if (field.multiple) { fieldType += "[]"; } + + // If the field is not cached and there is a reference, update fieldType accordingly + if (!isCached && field.reference_to) { + fieldType = type_reference(field); + } } else if (field.data_type === "blocks") { + // Handle blocks type (unchanged) fieldType = type_modular_blocks(field); + } else { + // Default handling if fieldType is still empty + fieldType = visit_field_type(field); } - return [ - field.uid + op_required(field.mandatory) + ":", - fieldType || visit_field_type(field), + + // Build and return the final string in the required format + const requiredFlag = op_required(field.mandatory); + const typeModifier = ["isodate", "file", "number"].includes(field.data_type) || ["radio", "dropdown"].includes(field.display_type) ? field.mandatory ? "" - : "| null" - : "", - ";", - ].join(" "); + : " | null" + : ""; + + if (fieldType.startsWith("referred_content_types")) { + // For global_field or referred_content_types, omit field.uid in output + return `${fieldType}`; + } + // Ensure the formatting is correct, and avoid concatenating field.uid directly to a string + return `${field.uid}${requiredFlag}: ${fieldType}${typeModifier};`; } function visit_fields(schema: ContentstackTypes.Schema) { @@ -275,10 +303,9 @@ export default function (userOptions: TSGenOptions) { let blockInterfaceName = name_type(field.uid); const blockInterfaces = field.blocks.map((block) => { - const fieldType = - block.reference_to && cachedGlobalFields[name_type(block.reference_to)] - ? name_type(block.reference_to) - : visit_fields(block.schema || []); + const fieldType = block.reference_to + ? name_type(block.reference_to) + : visit_fields(block.schema || []); const schema = block.reference_to ? `${fieldType};` @@ -341,13 +368,11 @@ export default function (userOptions: TSGenOptions) { function type_global_field(field: ContentstackTypes.GlobalField) { if (!field.schema) { throw new Error( - `Schema not found for global field '${field.uid}. Did you forget to include it?` + `Schema not found for global field '${field.uid}'. Did you forget to include it?` ); } - const name = name_type(field.reference_to); - - return name; + return name_type(field.reference_to); } function type_reference(field: ContentstackTypes.Field) { diff --git a/src/generateTS/index.ts b/src/generateTS/index.ts index b38d2cf..bd1c99f 100644 --- a/src/generateTS/index.ts +++ b/src/generateTS/index.ts @@ -145,7 +145,6 @@ export const generateTSFromContentTypes = async ({ }); } } - const output = await format( [ defaultInterfaces(prefix, systemFields).join("\n\n"), diff --git a/src/types/schema.ts b/src/types/schema.ts index 3098836..c8c19d2 100644 --- a/src/types/schema.ts +++ b/src/types/schema.ts @@ -30,6 +30,7 @@ export type GlobalField = { schema: Schema; schema_type?: string; _version?: number; + referred_content_types: Array<{ uid: string; title: string }>; } & FieldOptions; export type ReferenceField = { diff --git a/tests/unit/generateTS/generateTS.test.ts b/tests/unit/generateTS/generateTS.test.ts index 0f3fe6d..ccb1612 100644 --- a/tests/unit/generateTS/generateTS.test.ts +++ b/tests/unit/generateTS/generateTS.test.ts @@ -333,7 +333,7 @@ describe("generateTS function with errors", () => { }); } catch (err: any) { expect(err.error_message).toEqual( - "Something went wrong, Schema not found for global field 'global_field. Did you forget to include it?" + "Something went wrong, Schema not found for global field 'global_field'. Did you forget to include it?" ); } }); diff --git a/tests/unit/tsgen/boolean.test.ts b/tests/unit/tsgen/boolean.test.ts index 91b14ce..ef5621f 100644 --- a/tests/unit/tsgen/boolean.test.ts +++ b/tests/unit/tsgen/boolean.test.ts @@ -26,8 +26,8 @@ describe("builtin boolean field", () => { { /** Version */ _version: number; - title: string ; - boolean?: boolean ; + title: string; + boolean?: boolean; }" `); }); diff --git a/tests/unit/tsgen/defaults.test.ts b/tests/unit/tsgen/defaults.test.ts index 2dea8f6..8b840b7 100644 --- a/tests/unit/tsgen/defaults.test.ts +++ b/tests/unit/tsgen/defaults.test.ts @@ -19,7 +19,7 @@ describe("default single content block", () => { { /** Version */ _version: number; - title: string ; + title: string; }" `); }); @@ -45,8 +45,8 @@ describe("default single webpage", () => { { /** Version */ _version: number; - title: string ; - url: string ; + title: string; + url: string; }" `); }); diff --git a/tests/unit/tsgen/global.fields.ct.js b/tests/unit/tsgen/global.fields.ct.js index 842f1b6..e1235c2 100644 --- a/tests/unit/tsgen/global.fields.ct.js +++ b/tests/unit/tsgen/global.fields.ct.js @@ -1,168 +1,280 @@ -const globalFields = { - created_at: "2020-07-12T15:48:42.629Z", - updated_at: "2020-07-12T15:48:52.343Z", - title: "Global Fields", - uid: "global_fields", - _version: "number", - inbuilt_class: false, - schema: [ - { - display_name: "Title", - uid: "title", - data_type: "text", - mandatory: true, - unique: true, - field_metadata: { - _default: true, - version: 3, +const globalFields = [ + { + created_at: "2025-01-30T06:12:44.368Z", + updated_at: "2025-01-30T06:12:44.368Z", + title: "new global", + uid: "new_global", + _version: 1, + inbuilt_class: false, + schema: [ + { + data_type: "text", + display_name: "Single Line Textbox", + uid: "single_line_textbox", + field_metadata: { + description: "", + default_value: "", + version: 3, + }, + format: "", + error_messages: { + format: "", + }, + mandatory: false, + multiple: false, + non_localizable: false, + unique: false, }, - multiple: false, - non_localizable: false, + ], + last_activity: { }, - { - data_type: "global_field", - display_name: "SEO", - reference_to: "seo", - field_metadata: { - description: "", + maintain_revisions: true, + description: "", + schema_type: "global_field", + }, + { + created_at: "2024-12-23T12:57:30.467Z", + updated_at: "2025-01-29T08:10:28.956Z", + title: "global test", + uid: "global_test", + _version: 9, + inbuilt_class: false, + schema: [ + { + data_type: "text", + display_name: "Single Line Text", + uid: "single_line_text", + field_metadata: { + description: "", + default_value: "", + version: 3, + }, + format: "", + error_messages: { + format: "", + }, + mandatory: false, + multiple: false, + non_localizable: false, + unique: false, + }, + { + data_type: "reference", + display_name: "SEO", + reference_to: [ + "testing", + ], + field_metadata: { + ref_multiple: false, + ref_multiple_content_types: true, + }, + uid: "seo", + mandatory: false, + multiple: false, + non_localizable: false, + unique: false, }, - uid: "seo", - multiple: false, - mandatory: false, - unique: false, - non_localizable: false, - schema: [ - { - data_type: "text", - display_name: "Keywords", - uid: "keywords", - field_metadata: { - description: "", - default_value: "", - version: 3, + ], + last_activity: { + }, + maintain_revisions: true, + description: "", + schema_type: "global_field", + }, + { + title: "home", + description: "", + options: { + is_page: false, + singleton: false, + sub_title: [ + ], + title: "title", + }, + schema: [ + { + data_type: "text", + display_name: "Title", + field_metadata: { + _default: true, + version: 3, + }, + mandatory: true, + uid: "title", + unique: true, + multiple: false, + non_localizable: false, + }, + { + data_type: "taxonomy", + display_name: "Taxonomy", + uid: "taxonomies", + taxonomies: [ + { + taxonomy_uid: "tax_1", + max_terms: 8, + mandatory: false, + multiple: true, + non_localizable: false, }, - format: "", - error_messages: { - format: "", + { + taxonomy_uid: "tax_2", + max_terms: 8, + mandatory: false, + multiple: true, + non_localizable: false, }, - multiple: false, - mandatory: false, - unique: false, - indexed: false, - inbuilt_model: false, - non_localizable: false, + ], + field_metadata: { + description: "", + default_value: "", }, - { - data_type: "text", - display_name: "Description", - uid: "description", - field_metadata: { - description: "", - default_value: "", - multiline: true, - version: 3, - }, + format: "", + error_messages: { format: "", - error_messages: { - format: "", - }, - multiple: false, - mandatory: false, - unique: false, - indexed: false, - inbuilt_model: false, - non_localizable: false, }, + mandatory: false, + multiple: true, + non_localizable: false, + unique: false, + }, + ], + uid: "home", + DEFAULT_ACL: { + others: { + read: false, + create: false, + }, + users: [ ], }, - ], - last_activity: {}, - maintain_revisions: true, - description: "", - DEFAULT_ACL: { - others: { - read: false, - create: false, - }, - users: [ - { - uid: "blta1a106c13958e89d", - read: true, + SYS_ACL: { + others: { + read: false, + create: false, + update: false, + delete: false, sub_acl: { - read: true, + read: false, + create: false, + update: false, + delete: false, + publish: false, }, }, - ], + roles: [ + ], + }, + created_at: "2025-01-10T09:18:20.450Z", + updated_at: "2025-01-27T13:05:20.998Z", + inbuilt_class: false, + abilities: { + get_one_object: true, + get_all_objects: true, + create_object: true, + update_object: true, + delete_object: true, + delete_all_objects: true, + }, + last_activity: { + }, + maintain_revisions: true, + _version: 4, }, - SYS_ACL: { - roles: [ + { + title: "testing", + description: "", + options: { + is_page: false, + singleton: true, + sub_title: [ + ], + title: "title", + }, + schema: [ { - uid: "blt127263b8951e2542", - read: true, - sub_acl: { - create: true, - read: true, - update: true, - delete: true, - publish: true, + data_type: "text", + display_name: "Title", + field_metadata: { + _default: true, + version: 3, }, - update: true, - delete: true, + mandatory: true, + uid: "title", + unique: true, + multiple: false, + non_localizable: false, }, { - uid: "blt7e69bb0e63cc5fb6", - read: true, - sub_acl: { - create: true, - read: true, - update: true, - delete: true, - publish: true, + data_type: "json", + display_name: "JSON Rich Text Editor", + uid: "json_rte", + field_metadata: { + allow_json_rte: true, + embed_entry: false, + description: "", + default_value: "", + multiline: false, + rich_text_type: "advanced", + options: [ + ], }, - }, - { - uid: "bltb442c49a50c5804d", - read: true, - sub_acl: { - create: true, - read: true, - update: true, - delete: true, - publish: true, + format: "", + error_messages: { + format: "", }, - update: true, - delete: true, + reference_to: [ + "sys_assets", + ], + multiple: false, + non_localizable: false, + unique: false, + mandatory: false, }, ], - others: { - read: false, - create: false, - update: false, - delete: false, - sub_acl: { + uid: "testing", + DEFAULT_ACL: { + others: { + read: false, + create: false, + }, + users: [ + ], + }, + SYS_ACL: { + others: { read: false, create: false, update: false, delete: false, - publish: false, + sub_acl: { + read: false, + create: false, + update: false, + delete: false, + publish: false, + }, }, + roles: [ + ], }, + created_at: "2025-01-09T09:32:22.764Z", + updated_at: "2025-01-29T10:56:40.919Z", + inbuilt_class: false, + abilities: { + get_one_object: true, + get_all_objects: true, + create_object: true, + update_object: true, + delete_object: true, + delete_all_objects: true, + }, + last_activity: { + }, + maintain_revisions: true, + _version: 4, }, - options: { - is_page: false, - singleton: true, - title: "title", - sub_title: [], - }, - abilities: { - get_one_object: true, - get_all_objects: true, - create_object: true, - update_object: true, - delete_object: true, - delete_all_objects: true, - }, -}; +] module.exports = { globalFields, diff --git a/tests/unit/tsgen/global.fields.test.ts b/tests/unit/tsgen/global.fields.test.ts index 77d1512..59f92dc 100644 --- a/tests/unit/tsgen/global.fields.test.ts +++ b/tests/unit/tsgen/global.fields.test.ts @@ -11,35 +11,49 @@ const tsgen = tsgenFactory({ }); describe("global fields", () => { - const result = tsgen(testData.globalFields); + let result: any; + const globalFields: Array = []; + const definitions: Array = []; - test("metadata", () => { - const types = result.metadata.types; + for (const contentType of testData.globalFields) { + const tsgenResult = tsgen(contentType); + + if (tsgenResult.isGlobalField) { + globalFields.push(tsgenResult.definition); + } else { + definitions.push(tsgenResult.definition); - expect([...types.globalFields]).toEqual(expect.arrayContaining(["ISeo"])); + tsgenResult.metadata.types.globalFields.forEach((field: string) => { + globalFields.push( + tsgenResult.metadata.dependencies.globalFields[field].definition + ); + }); + } + } + + test("metadata", () => { + expect(globalFields[0]).toEqual(expect.stringContaining("INewGlobal")); }); test("global field definition", () => { - const globalField = result.metadata.dependencies.globalFields.ISeo; - expect(globalField.definition).toMatchInlineSnapshot(` - "export interface ISeo + expect(globalFields[0]).toMatchInlineSnapshot(` + "export interface INewGlobal { /** Version */ _version: number; - keywords?: string ; - description?: string ; + single_line_textbox?: string; }" `); }); test("content type definition", () => { - expect(result.definition).toMatchInlineSnapshot(` - "export interface IGlobalFields + expect(definitions[0]).toMatchInlineSnapshot(` + "export interface IHome { /** Version */ _version: number; - title: string ; - seo?: ISeo ; + title: string; + taxonomies?: ITaxonomy[]; }" `); }); diff --git a/tests/unit/tsgen/group.test.ts b/tests/unit/tsgen/group.test.ts index e1f0a2e..c6a6456 100644 --- a/tests/unit/tsgen/group.test.ts +++ b/tests/unit/tsgen/group.test.ts @@ -25,31 +25,31 @@ describe("group", () => { { /** Version */ _version: number; - title: string ; + title: string; multiple_group_max_limit?: [{ - number?: number | null ; + number?: number | null; }, { - number?: number | null ; + number?: number | null; }, { - number?: number | null ; + number?: number | null; }, { - number?: number | null ; + number?: number | null; }, { - number?: number | null ; - }] ; + number?: number | null; + }]; multiple_group?: { - single_line?: string ; - }[] ; + single_line?: string; + }[]; parent_group?: { - rich_text_editor?: string ; - multi_line?: string ; - single_line?: string ; + rich_text_editor?: string; + multi_line?: string; + single_line?: string; child_group?: { - number?: number | null ; - boolean?: boolean ; - date?: string | null ; - } ; - } ; + number?: number | null; + boolean?: boolean; + date?: string | null; + }; + }; }" `); }); diff --git a/tests/unit/tsgen/isodate.test.ts b/tests/unit/tsgen/isodate.test.ts index d53eb0f..478764e 100644 --- a/tests/unit/tsgen/isodate.test.ts +++ b/tests/unit/tsgen/isodate.test.ts @@ -26,12 +26,12 @@ describe("builtin isodate field", () => { { /** Version */ _version: number; - title: string ; - date?: string | null ; - date_required: string ; - date_multiple?: string[] | null ; - date_multiple_maxlength?: [string, string, string, string, string] | null ; - date_required_multiple_maxlength: [string, string, string, string, string, string, string, string] ; + title: string; + date?: string | null; + date_required: string; + date_multiple?: string[] | null; + date_multiple_maxlength?: [string, string, string, string, string] | null; + date_required_multiple_maxlength: [string, string, string, string, string, string, string, string]; }" `); }); diff --git a/tests/unit/tsgen/jsdoc.test.ts b/tests/unit/tsgen/jsdoc.test.ts index fe9df6f..92b3b62 100644 --- a/tests/unit/tsgen/jsdoc.test.ts +++ b/tests/unit/tsgen/jsdoc.test.ts @@ -18,13 +18,13 @@ describe("jsdoc", () => { /** Version */ _version: number; /** Name */ - title: string ; + title: string; /** Age */ - current_age?: number | null ; + current_age?: number | null; /** City */ - current_city?: string ; + current_city?: string; /** State */ - current_state?: string ; + current_state?: string; }" `); }); diff --git a/tests/unit/tsgen/modular.blocks.test.ts b/tests/unit/tsgen/modular.blocks.test.ts index 6846df1..04648f5 100644 --- a/tests/unit/tsgen/modular.blocks.test.ts +++ b/tests/unit/tsgen/modular.blocks.test.ts @@ -20,24 +20,24 @@ describe("modular blocks", () => { expect(result.definition).toMatchInlineSnapshot(` "export interface ModularBlocks { string_block: { - single_line?: string ; - multi_line?: string ; - markdown?: string ; - rich_text_editor?: string ; } + single_line?: string; + multi_line?: string; + markdown?: string; + rich_text_editor?: string; } string_block_with_options: { - single_line_textbox_required: string ; - single_line_textbox_multiple?: string[] ; } + single_line_textbox_required: string; + single_line_textbox_multiple?: string[]; } boolean_block: { - boolean?: boolean ; } + boolean?: boolean; } } export interface ModularBlocks { /** Version */ _version: number; - title: string ; - url: string ; - modular_blocks?: ModularBlocks[] ; + title: string; + url: string; + modular_blocks?: ModularBlocks[]; }" `); }); diff --git a/tests/unit/tsgen/number.test.ts b/tests/unit/tsgen/number.test.ts index bf21fbf..71f2bde 100644 --- a/tests/unit/tsgen/number.test.ts +++ b/tests/unit/tsgen/number.test.ts @@ -23,13 +23,13 @@ describe("builtin number field", () => { { /** Version */ _version: number; - title: string ; - url: string ; - number?: number | null ; - number_required: number ; - number_multiple?: number[] | null ; - number_multiple_max_limit?: [number, number, number, number, number, number, number, number, number, number] | null ; - number_required_multiple_max_limit: [number, number, number] ; + title: string; + url: string; + number?: number | null; + number_required: number; + number_multiple?: number[] | null; + number_multiple_max_limit?: [number, number, number, number, number, number, number, number, number, number] | null; + number_required_multiple_max_limit: [number, number, number]; }" `); }); diff --git a/tests/unit/tsgen/options.test.ts b/tests/unit/tsgen/options.test.ts index dd0c475..abafa8d 100644 --- a/tests/unit/tsgen/options.test.ts +++ b/tests/unit/tsgen/options.test.ts @@ -16,12 +16,12 @@ describe("all options", () => { { /** Version */ _version: number; - title: string ; - url: string ; - single_line_textbox_not_required?: string ; - single_line_textbox_required: string ; - single_line_textbox_multiple?: string[] ; - single_line_textbox_multiple_max_limit?: [string, string, string, string, string] ; + title: string; + url: string; + single_line_textbox_not_required?: string; + single_line_textbox_required: string; + single_line_textbox_multiple?: string[]; + single_line_textbox_multiple_max_limit?: [string, string, string, string, string]; }" `); }); diff --git a/tests/unit/tsgen/references.test.ts b/tests/unit/tsgen/references.test.ts index cffc400..187a6c7 100644 --- a/tests/unit/tsgen/references.test.ts +++ b/tests/unit/tsgen/references.test.ts @@ -27,10 +27,10 @@ describe("references", () => { { /** Version */ _version: number; - title: string ; - url: string ; - single_reference: (IReferenceChild)[] ; - multiple_reference?: (IReferenceChild | IBoolean | IBuiltinExample)[] ; + title: string; + url: string; + single_reference: (IReferenceChild)[]; + multiple_reference?: (IReferenceChild | IBoolean | IBuiltinExample)[]; }" `); }); diff --git a/tests/unit/tsgen/select.test.ts b/tests/unit/tsgen/select.test.ts index 4b89505..76989ab 100644 --- a/tests/unit/tsgen/select.test.ts +++ b/tests/unit/tsgen/select.test.ts @@ -22,13 +22,13 @@ describe("select (dropdown)", () => { { /** Version */ _version: number; - title: string ; - select_single_value?: ("Option 1" | "Option 2" | "Option 3") | null ; - select_single_value_required: ("Test 1" | "Test 2" | "Test 3") ; - select_single_value_with_quotes?: ("\\"ABC\\"" | "A\'B\'C" | "\`A\`B\`C") | null ; - select_multi_value?: ("Multi 1" | "Multi 2" | "Multi 3")[] | null ; - select_multi_value_required: ("Multi Req 1" | "Multi Req 2" | "Multi Req 3")[] ; - select_number_values?: (1 | 2 | 3 | 4) | null ; + title: string; + select_single_value?: ("Option 1" | "Option 2" | "Option 3") | null; + select_single_value_required: ("Test 1" | "Test 2" | "Test 3"); + select_single_value_with_quotes?: ("\\"ABC\\"" | "A\'B\'C" | "\`A\`B\`C") | null; + select_multi_value?: ("Multi 1" | "Multi 2" | "Multi 3")[] | null; + select_multi_value_required: ("Multi Req 1" | "Multi Req 2" | "Multi Req 3")[]; + select_number_values?: (1 | 2 | 3 | 4) | null; }" `); }); diff --git a/tests/unit/tsgen/string.test.ts b/tests/unit/tsgen/string.test.ts index a928146..c894c79 100644 --- a/tests/unit/tsgen/string.test.ts +++ b/tests/unit/tsgen/string.test.ts @@ -23,11 +23,11 @@ describe("builtin string fields", () => { { /** Version */ _version: number; - title: string ; - single_line?: string ; - multi_line?: string ; - rich_text_editor?: string ; - markdown?: string ; + title: string; + single_line?: string; + multi_line?: string; + rich_text_editor?: string; + markdown?: string; }" `); }); diff --git a/tests/unit/tsgen/taxonomies.test.ts b/tests/unit/tsgen/taxonomies.test.ts index d166017..6fad2e1 100644 --- a/tests/unit/tsgen/taxonomies.test.ts +++ b/tests/unit/tsgen/taxonomies.test.ts @@ -28,9 +28,9 @@ describe("builtin taxonomies field", () => { { /** Version */ _version: number; - title: string ; - boolean?: boolean ; - taxonomies?: ITaxonomy[] ; + title: string; + boolean?: boolean; + taxonomies?: ITaxonomy[]; }" `); });