diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index a02e0549..5e4d453e 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -8,7 +8,7 @@ NOTICE: While GitHub is the preferred channel for reporting issues/feedback, thi --> ### Summary diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml new file mode 100644 index 00000000..a03dbf6e --- /dev/null +++ b/.github/workflows/create-github-release.yml @@ -0,0 +1,32 @@ +name: create-github-release + +on: + push: + branches: + - main + - prerelease/** + tags-ignore: + - "*" + workflow_dispatch: + inputs: + prerelease: + type: string + description: "Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here." + +jobs: + release: + uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main + secrets: inherit + with: + prerelease: ${{ inputs.prerelease }} + # If this is a push event, we want to skip the release if there are no semantic commits + # However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty + # This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) + skip-on-empty: ${{ github.event_name == 'push' }} + # docs: + # # Most repos won't use this + # # Depends on the 'release' job to avoid git collisions, not for any functionality reason + # needs: release + # secrets: inherit + # if: ${{ github.ref_name == 'main' }} + # uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main diff --git a/.github/workflows/failureNotifications.yml b/.github/workflows/failureNotifications.yml index 6b4118fc..b509c6c6 100644 --- a/.github/workflows/failureNotifications.yml +++ b/.github/workflows/failureNotifications.yml @@ -3,8 +3,8 @@ name: failureNotifications on: workflow_run: workflows: - - version, tag and github release - publish + - create-github-release types: - completed @@ -15,7 +15,7 @@ jobs: steps: - name: Announce Failure id: slack - uses: slackapi/slack-github-action@v1.21.0 + uses: slackapi/slack-github-action@v1.24.0 env: # for non-CLI-team-owned plugins, you can send this anywhere you like SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }} diff --git a/.github/workflows/manualRelease.yml b/.github/workflows/manualRelease.yml deleted file mode 100644 index 8ceb52c3..00000000 --- a/.github/workflows/manualRelease.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: manual release - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} - - name: Conventional Changelog Action - id: changelog - uses: TriPSs/conventional-changelog-action@d360fad3a42feca6462f72c97c165d60a02d4bf2 - # overriding some of the basic behaviors to just get the changelog - with: - git-user-name: svc-cli-bot - git-user-email: svc_cli_bot@salesforce.com - github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} - output-file: false - # always do the release, even if there are no semantic commits - skip-on-empty: false - tag-prefix: '' - - uses: notiz-dev/github-action-json-property@2192e246737701f108a4571462b76c75e7376216 - id: packageVersion - with: - path: 'package.json' - prop_path: 'version' - - name: Create Github Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} - with: - tag_name: ${{ steps.packageVersion.outputs.prop }} - release_name: ${{ steps.packageVersion.outputs.prop }} diff --git a/.github/workflows/notify-slack-on-pr-open.yml b/.github/workflows/notify-slack-on-pr-open.yml new file mode 100644 index 00000000..0b04126c --- /dev/null +++ b/.github/workflows/notify-slack-on-pr-open.yml @@ -0,0 +1,23 @@ +name: Pull Request Slack Notification + +on: + pull_request: + types: [opened, reopened] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Notify Slack on PR open + env: + WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} + PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }} + PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }} + PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} + PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} + PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} + PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} + PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + uses: salesforcecli/github-workflows/.github/actions/prNotification@main diff --git a/.github/workflows/onPushToMain.yml b/.github/workflows/onPushToMain.yml deleted file mode 100644 index b00f1cb7..00000000 --- a/.github/workflows/onPushToMain.yml +++ /dev/null @@ -1,18 +0,0 @@ -# test -name: version, tag and github release - -on: - push: - branches: [main] - -jobs: - release: - uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@main - secrets: inherit - - # most repos won't use this - # depends on previous job to avoid git collisions, not for any functionality reason - # docs: - # uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main - # secrets: inherit - # needs: release diff --git a/.github/workflows/onRelease.yml b/.github/workflows/onRelease.yml index 93e38783..afe94d78 100644 --- a/.github/workflows/onRelease.yml +++ b/.github/workflows/onRelease.yml @@ -2,20 +2,35 @@ name: publish on: release: - types: [released] + # both release and prereleases + types: [published] # support manual release in case something goes wrong and needs to be repeated or tested workflow_dispatch: inputs: tag: - description: tag that needs to publish + description: github tag that needs to publish type: string required: true + jobs: + # parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0) + getDistTag: + outputs: + tag: ${{ steps.distTag.outputs.tag }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} + - uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main + id: distTag + npm: uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main + needs: [getDistTag] with: ctc: true sign: true - tag: latest + tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} githubTag: ${{ github.event.release.tag_name || inputs.tag }} secrets: inherit diff --git a/.github/workflows/slackprnotification.yml b/.github/workflows/slackprnotification.yml deleted file mode 100644 index 7ea07963..00000000 --- a/.github/workflows/slackprnotification.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Slack pull request open notification - -on: - pull_request: - types: [opened, reopened] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Notify slack pr open - env: - WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} - PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }} - PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }} - PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} - PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }} - PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }} - PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} - PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} - PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }} - PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }} - uses: salesforcecli/pr-notification-action@main diff --git a/.vscode/launch.json b/.vscode/launch.json index 3c5ff8b4..322afefe 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -45,4 +45,4 @@ "preLaunchTask": "Compile" } ] -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a2cfcbd0..29e150b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,465 @@ -# Changelog +# [1.6.0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.5.0...1.6.0) (2024-09-12) -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [1.2.7-beta.1](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.6...v1.2.7-beta.1) (2022-09-26) +### Bug Fixes -### [1.2.6](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.5...v1.2.6) (2022-06-23) +* element renaming issue ([f6d9fe7](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/f6d9fe75609272772546d7d2b88cdb7a4971a96d)) -### [1.2.5](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.4...v1.2.5) (2022-06-20) -### [1.2.4](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.3...v1.2.4) (2022-06-14) +### Features + +* add type/node to exlude node modules ([456cda2](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/456cda291e6c6fbff41f339625a3458ad231bbbd)) +* fix build errors ([acdcc69](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/acdcc693adeb239f04548b68f71876d49760e28b)) +* fix errors ([6ea66cd](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/6ea66cd73acc3d0f13468b8f55f9b847438af981)) +* fix link errors ([0576b4e](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/0576b4eda7c885ea9501b3b949adf3899d712c57)) +* fix lint error ([110ea6b](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/110ea6b43cef10a37b23d0e5044d1e9a3885daf0)) +* fix the build error ([5bb6f48](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5bb6f48f7bc9d8a359630bd00257b3282e68cea2)) +* lwc parser include html, xml and js ([574def5](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/574def57f197a71e9794e8a8ca94bfa72b771876)) +* refactor file path ([1cd5e66](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/1cd5e6637c37d1a19f2e731af67b14544ed47442)) +* refactor file path ([40e2da5](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/40e2da51e8dd4de1a9f9b3708efd2824a714ce62)) +* refactor package json ([597a0a7](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/597a0a7f0951641b23849082b4ac0cfa76d3fc7f)) +* remove jest dependecies ([6f37f34](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/6f37f340a54a3486457e544647ef6ac7fba90f7e)) +* remove node to fix build error ([79a8637](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/79a8637da6070d8e9b93283d84e5728a196f0fbd)) +* remove test file ([ff63f73](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/ff63f738b225100a4c34121243debddee47d5e85)) +* remove test files to fix lint error ([c87ff7b](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/c87ff7bfbcbd87a2cc8dea5918f0e16370736cae)) +* resolve the conflicts ([02fac1f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/02fac1f9d5050368741b5f936377c3864a119996)) +* revert yarn.lock ([ab5ce2d](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/ab5ce2d67fbaeafefa1ba0edee2c31921bf6e29d)) +* update jsdom ([10a6bb7](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/10a6bb7aa65365ef3c156a355b1489f1d267c6ab)) +* update the version ([d6203e2](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/d6203e273f78c70076bbaae0b55a9d09dafea550)) +* update the version ([1db2132](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/1db2132b870e5deb1971655b534ce481f25459fa)) +* update the version ([0ad7c6c](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/0ad7c6c8843ce84210b3bd02fca56e4939d8d80a)) + + + +# [1.5.0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.4.0...1.5.0) (2024-08-26) + + +### Features + +* apex parser ([0d86090](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/0d86090ebd4531123a78c81b86fa92635b82ec0c)) +* parser unit tests ([5d901d7](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5d901d76dbc8fe7c84273da8f3aa7525810b4e22)) +* parser unit tests ([f66f169](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/f66f1698f053a998403349f536e5cccb6846c98e)) +* parser unit tests ([b6ddf4f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/b6ddf4fc927ec8a8a50a410beeed2ae1c234525d)) +* parser unit tests ([4b6d636](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/4b6d63640250c959073244896cf82eb20fa9d7f2)) +* parser unit tests ([bb844c3](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/bb844c3e04857a5f5061730b9d70e868db85c5c0)) +* parser unit tests ([ef8dae0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/ef8dae0498499111cfa582c1b0e4ba3d6d6c36da)) + + + +# [1.4.0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.3.1-dev.0...1.4.0) (2024-01-03) + + + +## [1.3.1-dev.0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.3.0...1.3.1-dev.0) (2024-01-02) + + +### Features + +* **salesforcecli:** add yarn.lock + new snapshot ([7f5974e](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/7f5974eaad591794c6142a1c32536113370192ee)) +* **salesforcecli:** adding new functionality to migrate with all versions of omni components ([73b93ca](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/73b93ca75ad8191a8301bf62d8fa331fc5f2bfe8)) +* **salesforcecli:** adding sort by field, so we will get the correct version migrated ([d635111](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/d63511118210548cec49a51f96cf8235f7a32483)) +* **salesforcecli:** bumping npm version ([69faa46](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/69faa4653d41fb63df5514b0a1ad359e2188aba0)) +* **salesforcecli:** reverting change in tsconfig.json ([6723dfc](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/6723dfcfbc397cc542fc6fae889868a23d1f465c)) +* **salesforcecli:** setting beta version ([57df938](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/57df938ece3e06e5eff34149c6986b1931fcd398)) +* **salesforcecli:** updating snapshot ([e25b209](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/e25b209d18bea56f40367d9eb93a5411000f7e35)) + + + +# [1.3.0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.52...1.3.0) (2023-11-15) + + +### Features + +* **salesforcecli:** add new workflow to support pre release ([fffc9f9](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/fffc9f958fa4921a232ceb26871bd0a026269562)) + + + +## [1.2.52](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.51...1.2.52) (2023-11-12) + + +### Bug Fixes + +* **deps:** bump @types/lodash.chunk from 4.2.8 to 4.2.9 ([5328b3a](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5328b3aa7c6164df0bab54235dc17295861994b7)) + + + +## [1.2.51](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.50...1.2.51) (2023-10-29) + + +### Bug Fixes + +* **deps:** bump @types/lodash.chunk from 4.2.7 to 4.2.8 ([0b327c1](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/0b327c1577ddcbf224ccb1796f6900b4b38865c6)) + + + +## [1.2.50](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.49...1.2.50) (2023-10-18) + + +### Bug Fixes + +* **deps:** bump @babel/traverse from 7.17.3 to 7.23.2 ([b5cc633](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/b5cc633d33a315ba2da76384f6f742d604015abd)) + + + +## [1.2.49](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.48...1.2.49) (2023-09-28) + + +### Bug Fixes + +* **deps:** bump get-func-name from 2.0.0 to 2.0.2 ([d62af2a](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/d62af2acd40f1c0eb1be9ad8503912a6e49ffc79)) + + + +## [1.2.48](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.47...1.2.48) (2023-08-27) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.16 to 1.18.17 ([4d5f999](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/4d5f99909606d155fb18f52c8f3d1e7e73a0409e)) + + + +## [1.2.47](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.46...1.2.47) (2023-08-20) + + +### Bug Fixes + +* **deps:** bump tslib from 2.6.1 to 2.6.2 ([bfee66f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/bfee66f2e05c25f64c4b1a4dcb820101219d6940)) + + + +## [1.2.46](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.45...1.2.46) (2023-08-06) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.15 to 1.18.16 ([b0a22d0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/b0a22d08371ab785d7ec36143cf228b78d607348)) + + + +## [1.2.45](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.44...1.2.45) (2023-07-30) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.14 to 1.18.15 ([a24bc28](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/a24bc280cd9307ee0a4c7d4176fb44dd4d3cb611)) + + + +## [1.2.44](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.43...1.2.44) (2023-07-30) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.34 to 1.8.35 ([2adf7f3](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/2adf7f34ec4d49c2486b1bb6af1a64536d849ed4)) + + + +## [1.2.43](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.42...1.2.43) (2023-07-23) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.32 to 1.8.34 ([561f140](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/561f140ee5f031b3eef13f38700f5bfd440670aa)) + + + +## [1.2.42](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.41...1.2.42) (2023-07-23) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.13 to 1.18.14 ([420f19d](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/420f19dda1489b8fd3b965d85411fd260a1fa09c)) + + + +## [1.2.41](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.40...1.2.41) (2023-07-20) + + +### Bug Fixes + +* **deps:** bump word-wrap from 1.2.3 to 1.2.4 ([b6271fe](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/b6271fe43ce161cfb06b333c95fa2e31041b78d1)) + + + +## [1.2.40](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.39...1.2.40) (2023-07-16) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.11 to 1.18.13 ([e41f19f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/e41f19f59056859c973dc210e538896f2edf5093)) + + + +## [1.2.39](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.38...1.2.39) (2023-07-16) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.31 to 1.8.32 ([5bc702d](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5bc702deb03a6a68fe88338083aa8be91b185931)) + + + +## [1.2.38](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.37...1.2.38) (2023-07-12) + + +### Bug Fixes + +* **deps:** bump semver from 5.7.1 to 5.7.2 ([d8d8e9c](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/d8d8e9c49ee2cf2bf47796d207b7ea5b895265ef)) + + + +## [1.2.37](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.36...1.2.37) (2023-07-09) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.29 to 1.8.31 ([ea1ea7f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/ea1ea7fa4c80b946f5d2d88fbeda4b6a2e8b64d1)) + + + +## [1.2.36](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.35...1.2.36) (2023-07-09) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.10 to 1.18.11 ([9d2a6c0](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/9d2a6c00ecf3d0da464195eb3d6b68f372dae7e3)) + + + +## [1.2.35](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.34...1.2.35) (2023-07-02) + + +### Bug Fixes + +* **deps:** bump tslib from 2.5.3 to 2.6.0 ([4b03cb7](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/4b03cb796a7961373b4fed9b6335e24b1cfdb758)) + + + +## [1.2.34](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.33...1.2.34) (2023-06-25) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.28 to 1.8.29 ([ef6726f](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/ef6726ffbacb3009329ea517f9d7729886406473)) + + + +## [1.2.33](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.32...1.2.33) (2023-06-18) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.27 to 1.8.28 ([eeb0caf](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/eeb0cafe917d44db809873a9f0b32d2d2395fa73)) + + + +## [1.2.32](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.31...1.2.32) (2023-06-11) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.9 to 1.18.10 ([086bc21](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/086bc212490d68a656e158eadb8315f0f76fd2ce)) + + + +## [1.2.31](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.30...1.2.31) (2023-06-04) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.26 to 1.8.27 ([9daf594](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/9daf5946a1282b8d05d5e543235d8850e5338e15)) + + + +## [1.2.30](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.29...1.2.30) (2023-06-04) + + +### Bug Fixes + +* **deps:** bump tslib from 2.5.2 to 2.5.3 ([3328455](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/33284558b451e2fc7b57077b2f72d143a0f93e4b)) + + + +## [1.2.29](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.28...1.2.29) (2023-05-28) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.8 to 1.18.9 ([f2f1974](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/f2f1974dd1fdfb712a31b1ee7476490c5ffa1432)) + + + +## [1.2.28](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.27...1.2.28) (2023-05-21) + + +### Bug Fixes + +* **deps:** bump tslib from 2.5.0 to 2.5.2 ([bb56bfa](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/bb56bfafef31e83f6b655078e8fc99fdc9eb95d2)) + + + +## [1.2.27](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.26...1.2.27) (2023-05-21) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.25 to 1.8.26 ([250126a](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/250126a5cc8318841461d58368f14d3972a72fef)) + + + +## [1.2.26](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.25...1.2.26) (2023-05-14) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.24 to 1.8.25 ([1d9a6fb](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/1d9a6fb39fe73158ef62c0d3c665758b2dcd7a96)) + + + +## [1.2.25](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.24...1.2.25) (2023-04-23) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.23 to 1.8.24 ([d5d30aa](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/d5d30aa1271bacc6f7996d49bc020f9ec5fe481c)) + + + +## [1.2.24](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.23...1.2.24) (2023-04-16) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.22 to 1.8.23 ([e2f3830](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/e2f3830a936216681a80ead68a0675d5b940adc0)) + + + +## [1.2.23](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.22...1.2.23) (2023-02-26) + + +### Bug Fixes + +* **deps:** bump open from 8.4.1 to 8.4.2 ([7886860](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/78868602840092c6368d6bdbc5837eaddf502272)) + + + +## [1.2.22](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.21...1.2.22) (2023-02-12) + + +### Bug Fixes + +* **deps:** bump open from 8.4.0 to 8.4.1 ([15d09dd](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/15d09ddbc0891cf48e4ba57f9e64ec4232e73c9a)) + + + +## [1.2.21](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.20...1.2.21) (2023-02-05) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.6 to 1.18.8 ([7bb67ec](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/7bb67ecfaaa3da8323168ca3cf25e254e8057f52)) + + + +## [1.2.20](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.19...1.2.20) (2023-01-29) + + +### Bug Fixes + +* **deps:** bump tslib from 2.4.1 to 2.5.0 ([5f2238d](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5f2238d26c4710f6e2dcf09e44e8607ef1883542)) + + + +## [1.2.19](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.18...1.2.19) (2023-01-29) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.21 to 1.8.22 ([5c63a65](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/5c63a6599534aed7aaa10b2ae8a0b8cdf2612dc7)) + + + +## [1.2.18](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.17...1.2.18) (2023-01-15) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.19 to 1.8.21 ([076533b](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/076533bbb020a637e8610276acc786904cdc645c)) + + + +## [1.2.17](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.16...1.2.17) (2023-01-08) + + +### Bug Fixes + +* **deps:** bump json5 from 1.0.1 to 1.0.2 ([a971220](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/a9712207ea5c895a6d821072ad73d145c35579f8)) + + + +## [1.2.16](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.15...1.2.16) (2022-11-13) + + +### Bug Fixes + +* **deps:** bump @oclif/config from 1.18.5 to 1.18.6 ([e3883d2](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/e3883d291aaeb53189a50d56db967f9cffabe5b8)) + + + +## [1.2.15](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.14...1.2.15) (2022-11-09) + + + +## [1.2.14](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.13...1.2.14) (2022-11-01) + + + +## [1.2.13](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.12...1.2.13) (2022-11-01) + + + +## [1.2.12](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/1.2.11...1.2.12) (2022-10-30) + + +### Bug Fixes + +* **deps:** bump @oclif/command from 1.8.18 to 1.8.19 ([feb3066](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/feb3066446d6c2ad2596a69dec8f3a2a3d23136c)) + + + +## [1.2.11](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.7-beta.1...1.2.11) (2022-10-20) + + +### Bug Fixes + +* bump npm version ([6b9c8a9](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/6b9c8a930858dee9587c491fefafbfc8b9e3e2db)) +* **deps:** bump @oclif/command from 1.8.16 to 1.8.18 ([c33e011](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/c33e0115637a433a0dcb641776b3f2ff3a457150)) +* **deps:** bump @oclif/config from 1.18.3 to 1.18.5 ([01499f4](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/commit/01499f4bd2045daae11296a094aa14c521bbbc57)) + + + +## [1.2.7-beta.1](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.6...v1.2.7-beta.1) (2022-09-26) + + + +## [1.2.6](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.5...v1.2.6) (2022-06-23) + + + +## [1.2.5](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.4...v1.2.5) (2022-06-20) + + + +## [1.2.4](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.3...v1.2.4) (2022-06-14) + + + +## [1.2.3](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.2...v1.2.3) (2022-06-14) + + + +## 1.2.2 (2022-06-13) + -### [1.2.3](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/compare/v1.2.2...v1.2.3) (2022-06-14) -### 1.2.2 (2022-06-13) diff --git a/DEV.md b/DEV.md index daa8f3c0..6c2d37f0 100644 --- a/DEV.md +++ b/DEV.md @@ -1,5 +1,4 @@ -OmniStudio Migration Tool -========================= +# OmniStudio Migration Tool This repository contains the code required to enable the OmniStudio Migration Tool SFDX plugin. @@ -9,7 +8,8 @@ This repository contains the code required to enable the OmniStudio Migration To 2. Authenticate your SFDX cli into the org you are going to use for development. You can follow authentication steps [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_auth_web.htm). 3. Clone this repository into your local machine. 4. Open the migration tool code folder in VSCode or your prefered editor. -5. In a new command line tool, run the following command: +5. In a new command line tool, run the following command: + ``` bin/run omnistudio:migration:migrate -u agarcia-vertical238@na46.salesforce.com --namespace=agarciana46_238 --json ``` @@ -18,7 +18,7 @@ bin/run omnistudio:migration:migrate -u agarcia-vertical238@na46.salesforce.com ``` USAGE - $ sfdx omnistudio:migration:migrate [-n ] [-f] [-v ] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx omnistudio:migration:migrate [-n ] [-f] [-v ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -38,11 +38,14 @@ OPTIONS --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation + -a, --allversions migrate all versions + ``` ### Folder structure + ``` -- +- - .vscode VSCode configuration folder - bin Tools required to run in developer mode - messages JSON files with user messages used in the plugin @@ -53,23 +56,27 @@ OPTIONS - utils Utilities (network, debugging, logging, etc.) ``` - - _See code: [src/commands/hello/org.ts](https://github.com/agarcia-sf/omnistudio-migration-tool/blob/v0.0.0/src/commands/hello/org.ts)_ + + # Debugging your plugin + We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands. -To debug the `hello:org` command: +To debug the `hello:org` command: + 1. Start the inspector - -If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch: + +If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch: + ```sh-session $ sfdx hello:org -u myOrg@example.com --dev-suspend ``` - + Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger: + ```sh-session $ NODE_OPTIONS=--inspect-brk bin/run hello:org -u myOrg@example.com ``` @@ -77,7 +84,7 @@ $ NODE_OPTIONS=--inspect-brk bin/run hello:org -u myOrg@example.com 2. Set some breakpoints in your command code 3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view. 4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen. -5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program. +5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program. 6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5). -

-Congrats, you are debugging! \ No newline at end of file +

+ Congrats, you are debugging! diff --git a/README.md b/README.md index 0a60fe89..2ebca76c 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ -OmniStudio Migration Tool -========================= - +# OmniStudio Migration Tool ### Before You Begin -1. Confirm you have an OmniStudio Admin license. -2. Enable Standard OmniStudio Runtime in Setup > OmniStudio Settings. + +Read and follow the directions in the Omnistudio migration documentation: https://help.salesforce.com/s/articleView?id=sf.os_migrate_omnistudio_custom_objects_to_standard_objects.htm&type=5 ## Running SFDX plugin 1. Install SFDX cli using the official documentation located [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm). 2. Authenticate your SFDX cli into the org you are going to use for development. You can follow authentication steps [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_auth_web.htm). 3. In a new terminal session, install the plugin using the following command + ``` sfdx plugins:install @salesforce/plugin-omnistudio-migration-tool ``` + 4. To run the migration tool, run the following command from your command line tool: + ``` // To migrate everything sfdx omnistudio:migration:migrate -u YOUR_ORG_USERNAME@DOMAIN.COM --namespace=VLOCITY_PACKAGE_NAMESPACE @@ -24,14 +25,18 @@ sfdx omnistudio:migration:migrate -u YOUR_ORG_USERNAME@DOMAIN.COM --namespace=VL --only=ip --only=os --only=fc + +//to migrate all versions of the components and not just the active ones: +--allversions ``` + 5. An HTML page will be open in your default browser with the results of your migration job. ### Usage & parameters ``` USAGE - $ sfdx omnistudio:migration:migrate [-n ] [-f] [-v ] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx omnistudio:migration:migrate [-n ] [-f] [-v ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -51,4 +56,7 @@ OPTIONS --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation + -a, --allversions migrate all versions and not + and not just the active ones. + ``` diff --git a/command-snapshot.json b/command-snapshot.json index 685fc15c..8a7d94ad 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -2,38 +2,19 @@ { "command": "basecommand", "plugin": "@salesforce/plugin-omnistudio-migration-tool", - "flags": [ - "apiversion", - "json", - "loglevel", - "targetusername" - ], + "flags": ["apiversion", "json", "loglevel", "targetusername"], "alias": [] }, { "command": "omnistudio:migration:info", "plugin": "@salesforce/plugin-omnistudio-migration-tool", - "flags": [ - "apiversion", - "json", - "loglevel", - "name", - "targetdevhubusername", - "targetusername" - ], + "flags": ["allversions", "apiversion", "json", "loglevel", "name", "targetdevhubusername", "targetusername"], "alias": [] }, { "command": "omnistudio:migration:migrate", "plugin": "@salesforce/plugin-omnistudio-migration-tool", - "flags": [ - "apiversion", - "json", - "loglevel", - "namespace", - "only", - "targetusername" - ], + "flags": ["allversions", "apiversion", "json", "loglevel", "namespace", "only", "targetusername"], "alias": [] } -] \ No newline at end of file +] diff --git a/messages/info.json b/messages/info.json index 69b5e1cf..86b72caa 100644 --- a/messages/info.json +++ b/messages/info.json @@ -6,5 +6,6 @@ "examples": [ "sfdx omnistudio:migration:info --targetusername myOrg@example.com --targetdevhubusername devhub@org.com", "sfdx omnistudio:migration:info --name myname --targetusername myOrg@example.com" - ] -} \ No newline at end of file + ], + "allVersionsDescription": "Migrate all versions of a component" +} diff --git a/messages/migrate.json b/messages/migrate.json index f3c8e782..7a51a4c9 100644 --- a/messages/migrate.json +++ b/messages/migrate.json @@ -24,5 +24,6 @@ "errorWhileActivatingOs": "Could not activate OmniScript / Integration Procedure: ", "errorWhileActivatingCard": "Could not activate Card: ", "errorWhileUploadingCard": "An error ocurred while uploading Card: ", - "errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: " -} \ No newline at end of file + "errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: ", + "allVersionsDescription": "Migrate all versions of a component" +} diff --git a/package.json b/package.json index f4df72ba..87845289 100644 --- a/package.json +++ b/package.json @@ -1,39 +1,47 @@ { "name": "@salesforce/plugin-omnistudio-migration-tool", "description": "This SFDX plugin migrates FlexCard, OmniScript, DataRaptor, and Integration Procedure custom objects to standard objects.", - "version": "1.2.14", + "version": "1.6.0", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { + "@babel/parser": "^7.25.4", + "@apexdevtools/apex-parser": "^4.1.0", "@oclif/command": "^1", "@oclif/config": "^1", "@oclif/errors": "^1", "@salesforce/command": "^4.2.1", "@salesforce/core": "^2.37.1", - "@types/lodash.chunk": "^4.2.6", + "@types/jsdom": "^21.1.7", + "@types/lodash.chunk": "^4.2.9", + "cheerio": "^1.0.0", + "jsdom": "^25.0.0", "lodash.chunk": "^4.2.0", - "open": "^8.4.0", - "tslib": "^2" + "open": "^8.4.2", + "tslib": "^2", + "xmldom": "^0.6.0" }, "devDependencies": { + "@babel/parser": "^7.25.4", "@oclif/dev-cli": "^1", - "@oclif/plugin-command-snapshot": "^3.2.8", + "@oclif/plugin-command-snapshot": "^3.3.15", "@oclif/plugin-help": "^3", "@oclif/test": "^1", "@salesforce/dev-config": "^2.1.2", "@salesforce/dev-scripts": "^0", "@salesforce/plugin-command-reference": "^1.4.7", - "@salesforce/prettier-config": "^0.0.2", + "@salesforce/prettier-config": "^0.0.3", "@salesforce/ts-sinon": "^1", - "@types/jsforce": "^1.11.0", + "@types/babel__traverse": "^7.20.6", + "@types/jsforce": "^1.11.5", "@typescript-eslint/eslint-plugin": "^4.2.0", "@typescript-eslint/parser": "^4.2.0", - "chai": "^4.2.0", + "chai": "^4.4.1", "eslint": "^7.27.0", "eslint-config-oclif": "^3.1", "eslint-config-prettier": "^8", "eslint-config-salesforce": "^0.1.6", - "eslint-config-salesforce-license": "^0.1.6", + "eslint-config-salesforce-license": "^0.2.0", "eslint-config-salesforce-typescript": "^0.2.7", "eslint-plugin-header": "^3.0.0", "eslint-plugin-import": "2.24.2", @@ -44,11 +52,11 @@ "husky": "^4.3.8", "mocha": "^8.4.0", "nyc": "^15.1.0", - "prettier": "^2.6.2", - "pretty-quick": "^3.1.0", + "prettier": "^2.8.8", + "pretty-quick": "^3.3.1", "sinon": "10.0.0", - "ts-node": "^10.0.0", - "typescript": "^4.8.4" + "ts-node": "^10.9.2", + "typescript": "^4.9.5" }, "engines": { "node": ">=12.0.0" @@ -114,4 +122,4 @@ "pre-push": "sf-husky-pre-push" } } -} \ No newline at end of file +} diff --git a/src/commands/omnistudio/migration/info.ts b/src/commands/omnistudio/migration/info.ts index f062a311..416637a9 100644 --- a/src/commands/omnistudio/migration/info.ts +++ b/src/commands/omnistudio/migration/info.ts @@ -29,6 +29,11 @@ export default class Org extends SfdxCommand { char: 'n', description: messages.getMessage('nameFlagDescription'), }), + allversions: flags.boolean({ + char: 'a', + description: messages.getMessage('allVersionsDescription'), + required: false, + }), }; // Comment this out if your command does not require an org username @@ -42,6 +47,8 @@ export default class Org extends SfdxCommand { public async run(): Promise { const name = (this.flags.name || 'world') as string; + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const allVersions = this.flags.allversions || false; // this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername const conn = this.org.getConnection(); @@ -79,6 +86,10 @@ export default class Org extends SfdxCommand { this.ux.log(`My hub org id is: ${hubOrgId}`); } + if (allVersions) { + outputString = `${outputString} and all versions will be migrated`; + } + // Return an object to be displayed with --json return { orgId: this.org.getOrgId(), outputString }; } diff --git a/src/commands/omnistudio/migration/migrate.ts b/src/commands/omnistudio/migration/migrate.ts index eac8088e..f439ec14 100644 --- a/src/commands/omnistudio/migration/migrate.ts +++ b/src/commands/omnistudio/migration/migrate.ts @@ -18,6 +18,7 @@ import { MigrationResult, MigrationTool } from '../../../migration/interfaces'; import { ResultsBuilder } from '../../../utils/resultsbuilder'; import { CardMigrationTool } from '../../../migration/flexcard'; import { OmniScriptExportType, OmniScriptMigrationTool } from '../../../migration/omniscript'; +import { Logger } from '../../../utils/logger'; // Initialize Messages with the current plugin directory Messages.importMessagesDirectory(__dirname); @@ -42,6 +43,11 @@ export default class Migrate extends OmniStudioBaseCommand { char: 'o', description: messages.getMessage('onlyFlagDescription'), }), + allversions: flags.boolean({ + char: 'a', + description: messages.getMessage('allVersionsDescription'), + required: false, + }), }; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -49,7 +55,9 @@ export default class Migrate extends OmniStudioBaseCommand { const namespace = (this.flags.namespace || 'vlocity_ins') as string; const apiVersion = (this.flags.apiversion || '55.0') as string; const migrateOnly = (this.flags.only || '') as string; - + const allVersions = this.flags.allversions || false; + Logger.initialiseLogger(this.ux, this.logger); + this.logger = Logger.logger; // this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername const conn = this.org.getConnection(); conn.setApiVersion(apiVersion); @@ -62,23 +70,47 @@ export default class Migrate extends OmniStudioBaseCommand { if (!migrateOnly) { migrationObjects = [ new DataRaptorMigrationTool(namespace, conn, this.logger, messages, this.ux), - new OmniScriptMigrationTool(OmniScriptExportType.All, namespace, conn, this.logger, messages, this.ux), - new CardMigrationTool(namespace, conn, this.logger, messages, this.ux), + new OmniScriptMigrationTool( + OmniScriptExportType.All, + namespace, + conn, + this.logger, + messages, + this.ux, + allVersions + ), + new CardMigrationTool(namespace, conn, this.logger, messages, this.ux, allVersions), ]; } else { switch (migrateOnly) { case 'os': migrationObjects.push( - new OmniScriptMigrationTool(OmniScriptExportType.OS, namespace, conn, this.logger, messages, this.ux) + new OmniScriptMigrationTool( + OmniScriptExportType.OS, + namespace, + conn, + this.logger, + messages, + this.ux, + allVersions + ) ); break; case 'ip': migrationObjects.push( - new OmniScriptMigrationTool(OmniScriptExportType.IP, namespace, conn, this.logger, messages, this.ux) + new OmniScriptMigrationTool( + OmniScriptExportType.IP, + namespace, + conn, + this.logger, + messages, + this.ux, + allVersions + ) ); break; case 'fc': - migrationObjects.push(new CardMigrationTool(namespace, conn, this.logger, messages, this.ux)); + migrationObjects.push(new CardMigrationTool(namespace, conn, this.logger, messages, this.ux, allVersions)); break; case 'dr': migrationObjects.push(new DataRaptorMigrationTool(namespace, conn, this.logger, messages, this.ux)); @@ -96,7 +128,7 @@ export default class Migrate extends OmniStudioBaseCommand { let allTruncateComplete = true; for (const cls of migrationObjects.reverse()) { try { - this.ux.log('Cleaning: ' + cls.getName()); + Logger.ux.log('Cleaning: ' + cls.getName()); debugTimer.lap('Cleaning: ' + cls.getName()); await cls.truncate(); } catch (ex: any) { diff --git a/src/migration/flexcard.ts b/src/migration/flexcard.ts index 54e645ae..eaeb0b85 100644 --- a/src/migration/flexcard.ts +++ b/src/migration/flexcard.ts @@ -1,371 +1,438 @@ /* eslint-disable */ import { AnyJson } from '@salesforce/ts-types'; import CardMappings from '../mappings/VlocityCard'; -import { DebugTimer, QueryTools } from '../utils'; +import { DebugTimer, QueryTools, SortDirection } from '../utils'; import { NetUtils } from '../utils/net'; import { BaseMigrationTool } from './base'; import { MigrationResult, MigrationTool, ObjectMapping, UploadRecordResult } from './interfaces'; +import { Connection, Logger, Messages } from '@salesforce/core'; +import { UX } from '@salesforce/command'; export class CardMigrationTool extends BaseMigrationTool implements MigrationTool { - - static readonly VLOCITYCARD_NAME = 'VlocityCard__c'; - static readonly OMNIUICARD_NAME = 'OmniUiCard'; - - getName(): string { - return "FlexCards"; - } - - getRecordName(record: string) { - return record['Name']; - } - - getMappings(): ObjectMapping[] { - return [{ - source: CardMigrationTool.VLOCITYCARD_NAME, - target: CardMigrationTool.OMNIUICARD_NAME - }]; - } - - // Perform Delete of OmniUiCard Records to start migration from scratch - async truncate(): Promise { - const objectName = CardMigrationTool.OMNIUICARD_NAME; - DebugTimer.getInstance().lap('Truncating ' + objectName); - - const ids: string[] = await QueryTools.queryIds(this.connection, objectName); - if (ids.length === 0) return; - - const recordsToUpdate = ids.map(id => { - return { - attributes: { type: CardMigrationTool.OMNIUICARD_NAME }, - Id: id, - IsActive: false - } - }); - - // Mark the OmniUiCards as inactive - await NetUtils.update(this.connection, recordsToUpdate); - - const success: boolean = await NetUtils.delete(this.connection, ids); - if (!success) { - throw new Error('Could not truncate ' + objectName); - } - } - - // Perform Records Migration from VlocityCard__c to OmniUiCard - async migrate(): Promise { - - // Get All the Active VlocityCard__c records - const cards = await this.getAllActiveCards(); - - // Save the Vlocity Cards in OmniUiCard - const cardUploadResponse = await this.uploadAllCards(cards); - - const records = new Map(); - for (let i = 0; i < cards.length; i++) { - records.set(cards[i]['Id'], cards[i]); - } - - return [{ - name: 'FlexCards', - records: records, - results: cardUploadResponse - }]; - } - - // Query all cards that are active - private async getAllActiveCards(): Promise { - DebugTimer.getInstance().lap('Query Vlocity Cards'); - // const filterStr: string = ` Where ${this.namespacePrefix}Active__c = true` - const filters = new Map(); - filters.set(this.namespacePrefix + 'Active__c', true); - filters.set(this.namespacePrefix + 'CardType__c', 'flex'); - - return await QueryTools.queryWithFilter(this.connection, this.namespace, CardMigrationTool.VLOCITYCARD_NAME, this.getCardFields(), filters); - } - - // Upload All the VlocityCard__c records to OmniUiCard - private async uploadAllCards(cards: any[]): Promise> { - - const cardsUploadInfo = new Map(); - const originalRecords = new Map(); - const uniqueNames = new Set(); - - for (let card of cards) { - await this.uploadCard(cards, card, cardsUploadInfo, originalRecords, uniqueNames); - } - - return cardsUploadInfo; - } - - private async uploadCard(allCards: any[], card: AnyJson, cardsUploadInfo: Map, originalRecords: Map, uniqueNames: Set) { - - const recordId = card['Id']; - - // If we already uploaded this card, skip - if (cardsUploadInfo.has(recordId)) { - return; - } - - try { - const childCards = this.getChildCards(card); - if (childCards.length > 0) { - for (let childCardName of childCards) { - // Upload child cards - const childCard = allCards.find(c => c['Name'] === childCardName); - if (childCard) { - await this.uploadCard(allCards, childCard, cardsUploadInfo, originalRecords, uniqueNames); - } - } - - this.updateChildCards(card); - } - - this.reportProgress(allCards.length, originalRecords.size); - - - // Perform the transformation - const invalidIpNames = new Map(); - const transformedCard = this.mapVlocityCardRecord(card, cardsUploadInfo, invalidIpNames); - - // Verify duplicated names - const transformedCardName = transformedCard['Name']; - const transformedCardAuthorName = transformedCard['AuthorName']; - if (uniqueNames.has(transformedCardName)) { - this.setRecordErrors(card, this.messages.getMessage('duplicatedCardName')); - originalRecords.set(recordId, card); - return; - } - - // Save the name for duplicated names check - uniqueNames.add(transformedCardName); - - // Create a map of the original records - originalRecords.set(recordId, card); - - // Create card - const uploadResult = await NetUtils.createOne(this.connection, CardMigrationTool.OMNIUICARD_NAME, recordId, transformedCard); - - if (uploadResult) { - - // Fix errors - uploadResult.errors = uploadResult.errors || []; - if (!uploadResult.success) { - uploadResult.errors = Array.isArray(uploadResult.errors) ? uploadResult.errors : [uploadResult.errors]; - } - - // If name has been changed, add a warning message - uploadResult.warnings = uploadResult.warnings || []; - if (transformedCardAuthorName !== card[this.namespacePrefix + 'Author__c']) { - uploadResult.warnings.unshift('WARNING: Card author name has been modified to fit naming rules: ' + transformedCardAuthorName); - } - if (transformedCardName !== card['Name']) { - uploadResult.newName = transformedCardName; - uploadResult.warnings.unshift('WARNING: Card name has been modified to fit naming rules: ' + transformedCardName); - } - - if (uploadResult.id && invalidIpNames.size > 0) { - const val = Array.from(invalidIpNames.entries()).map(e => e[0]).join(', '); - uploadResult.errors.push('Integration Procedure Actions will need manual updates, please verify: ' + val); - } - - cardsUploadInfo.set(recordId, uploadResult); - const updateResult = await NetUtils.updateOne(this.connection, CardMigrationTool.OMNIUICARD_NAME, recordId, uploadResult.id, { - [CardMappings.Active__c]: true - }); - - if (!updateResult.success) { - uploadResult.hasErrors = true; - uploadResult.errors = uploadResult.errors || []; - - uploadResult.errors.push(this.messages.getMessage('errorWhileActivatingCard') + updateResult.errors); - } - } - } catch (err) { - this.setRecordErrors(card, this.messages.getMessage('errorWhileUploadingCard') + err); - originalRecords.set(recordId, card); - - cardsUploadInfo.set(recordId, { - referenceId: recordId, - hasErrors: true, - success: false, - errors: err, - warnings: [] - }); - } - } - - private getChildCards(card: AnyJson): string[] { - let childs = []; - const definition = JSON.parse(card[this.namespacePrefix + 'Definition__c']); - if (!definition) return childs; - - for (let state of (definition.states || [])) { - if (state.childCards && Array.isArray(state.childCards)) { - childs = childs.concat(state.childCards); - - // Modify the name of the child cards - state.childCards = state.childCards.map(c => this.cleanName(c)); - } - } - - return childs; - } - - private updateChildCards(card: AnyJson): void { - const definition = JSON.parse(card[this.namespacePrefix + 'Definition__c']); - if (!definition) return; - - for (let state of (definition.states || [])) { - if (state.childCards && Array.isArray(state.childCards)) { - state.childCards = state.childCards.map(c => this.cleanName(c)); - } - } - - card[this.namespacePrefix + 'Definition__c'] = JSON.stringify(definition); - } - - // Maps an indivitdual VlocityCard__c record to an OmniUiCard record. - private mapVlocityCardRecord(cardRecord: AnyJson, cardsUploadInfo: Map, invalidIpNames: Map): AnyJson { - - // Transformed object - const mappedObject = {}; - - // Get the fields of the record - const recordFields = Object.keys(cardRecord); - - // Map individual fields - recordFields.forEach(recordField => { - const cleanFieldName = this.getCleanFieldName(recordField); - - if (CardMappings.hasOwnProperty(cleanFieldName) && cleanFieldName !== 'IsChildCard__c') { - mappedObject[CardMappings[cleanFieldName]] = cardRecord[recordField]; - - // Transform ParentId__c to ClonedFromOmniUiCardKey field from uploaded response map - if (cleanFieldName === "ParentID__c" && cardsUploadInfo.has(cardRecord[`${this.namespacePrefix}ParentID__c`])) { - mappedObject[CardMappings[cleanFieldName]] = cardsUploadInfo.get(cardRecord[`${this.namespacePrefix}ParentID__c`]).id; - } - - // CardType__c and OmniUiCardType have different picklist values - if (cleanFieldName === "CardType__c") { - let ischildCard = cardRecord[`${this.namespacePrefix}IsChildCard__c`]; - mappedObject["OmniUiCardType"] = ischildCard ? 'Child' : 'Parent'; - } - - // Child Cards don't have version, so assigning 1 - if (cleanFieldName === "Version__c") { - let versionNumber = cardRecord[`${this.namespacePrefix}Version__c`]; - mappedObject["VersionNumber"] = versionNumber ? versionNumber : 1; - } - } - }); - - // Clean the name - mappedObject['Name'] = this.cleanName(mappedObject['Name']); - mappedObject[CardMappings.Author__c] = this.cleanName(mappedObject[CardMappings.Author__c]); - mappedObject[CardMappings.Active__c] = false; - - // Update the datasource - const datasource = JSON.parse(mappedObject[CardMappings.Datasource__c] || '{}'); - if (datasource.dataSource) { - const type = datasource.dataSource.type; - if (type === 'DataRaptor') { - datasource.dataSource.value.bundle = this.cleanName(datasource.dataSource.value.bundle); - } else if (type === 'IntegrationProcedures') { - const ipMethod: string = datasource.dataSource.value.ipMethod || ''; - - const parts = ipMethod.split('_'); - const newKey = parts.map(p => this.cleanName(p, true)).join('_'); - - datasource.dataSource.value.ipMethod = newKey; - - if (parts.length > 2) { - invalidIpNames.set('DataSource', ipMethod); - } - } - mappedObject[CardMappings.Datasource__c] = JSON.stringify(datasource); - } - - // Update the propertyset datasource - const propertySet = JSON.parse(mappedObject[CardMappings.Definition__c] || '{}'); - if (propertySet) { - if (propertySet.dataSource) { - const type = propertySet.dataSource.type; - if (type === 'DataRaptor') { - propertySet.dataSource.value.bundle = this.cleanName(propertySet.dataSource.value.bundle); - } else if (type === 'IntegrationProcedures') { - const ipMethod: string = propertySet.dataSource.value.ipMethod || ''; - - const parts = ipMethod.split('_'); - const newKey = parts.map(p => this.cleanName(p, true)).join('_'); - propertySet.dataSource.value.ipMethod = newKey; - - if (parts.length > 2) { - invalidIpNames.set('DataSource', ipMethod); - } - } - } - - // update the states for child cards - for (let i = 0; i < (propertySet.states || []).length; i++) { - const state = propertySet.states[i]; - - // Clean childCards property - if (state.childCards && Array.isArray(state.childCards)) { - state.childCards = state.childCards.map(c => this.cleanName(c)); - } - - // Fix the "components" for child cards - for (let componentKey in state.components) { - if (state.components.hasOwnProperty(componentKey)) { - const component = state.components[componentKey]; - - if (component.children && Array.isArray(component.children)) { - this.fixChildren(component.children); - } - } - } - - if (state.omniscripts && Array.isArray(state.omniscripts)) { - for (let osIdx = 0; osIdx < state.omniscripts.length; osIdx++) { - state.omniscripts[osIdx].type = this.cleanName(state.omniscripts[osIdx].type); - state.omniscripts[osIdx].subtype = this.cleanName(state.omniscripts[osIdx].subtype); - } - } - } - - mappedObject[CardMappings.Definition__c] = JSON.stringify(propertySet); - } - - mappedObject['attributes'] = { - type: CardMigrationTool.OMNIUICARD_NAME, - referenceId: cardRecord['Id'] - }; - - return mappedObject; - } - - private fixChildren(children: any[]) { - for (let j = 0; j < children.length; j++) { - const child = children[j]; - - if (child.element === 'childCardPreview') { - child.property.cardName = this.cleanName(child.property.cardName); - } else if (child.element === 'action') { - - if (child.property && child.property.stateAction && child.property.stateAction.omniType) { - const parts = (child.property.stateAction.omniType.Name || '').split('/'); - child.property.stateAction.omniType.Name = parts.map(p => this.cleanName(p)).join('/'); - } - - } - - if (child.children && Array.isArray(child.children)) { - this.fixChildren(child.children); - } - } - } - - private getCardFields(): string[] { - return Object.keys(CardMappings); - } -} \ No newline at end of file + static readonly VLOCITYCARD_NAME = 'VlocityCard__c'; + static readonly OMNIUICARD_NAME = 'OmniUiCard'; + private readonly allVersions: boolean; + + constructor( + namespace: string, + connection: Connection, + logger: Logger, + messages: Messages, + ux: UX, + allVersions: boolean + ) { + super(namespace, connection, logger, messages, ux); + this.allVersions = allVersions; + } + + getName(): string { + return 'FlexCards'; + } + + getRecordName(record: string) { + return record['Name']; + } + + getMappings(): ObjectMapping[] { + return [ + { + source: CardMigrationTool.VLOCITYCARD_NAME, + target: CardMigrationTool.OMNIUICARD_NAME, + }, + ]; + } + + // Perform Delete of OmniUiCard Records to start migration from scratch + async truncate(): Promise { + const objectName = CardMigrationTool.OMNIUICARD_NAME; + DebugTimer.getInstance().lap('Truncating ' + objectName); + + const ids: string[] = await QueryTools.queryIds(this.connection, objectName); + if (ids.length === 0) return; + + const recordsToUpdate = ids.map((id) => { + return { + attributes: { type: CardMigrationTool.OMNIUICARD_NAME }, + Id: id, + IsActive: false, + }; + }); + + // Mark the OmniUiCards as inactive + await NetUtils.update(this.connection, recordsToUpdate); + + const success: boolean = await NetUtils.delete(this.connection, ids); + if (!success) { + throw new Error('Could not truncate ' + objectName); + } + } + + // Perform Records Migration from VlocityCard__c to OmniUiCard + async migrate(): Promise { + // Get All the Active VlocityCard__c records + const cards = await this.getAllActiveCards(); + + // Save the Vlocity Cards in OmniUiCard + const cardUploadResponse = await this.uploadAllCards(cards); + + const records = new Map(); + for (let i = 0; i < cards.length; i++) { + records.set(cards[i]['Id'], cards[i]); + } + + return [ + { + name: 'FlexCards', + records: records, + results: cardUploadResponse, + }, + ]; + } + + // Query all cards that are active + private async getAllActiveCards(): Promise { + DebugTimer.getInstance().lap('Query Vlocity Cards'); + const filters = new Map(); + filters.set(this.namespacePrefix + 'CardType__c', 'flex'); + + if (this.allVersions) { + const sortFields = [ + { field: 'Name', direction: SortDirection.ASC }, + { field: this.namespacePrefix + 'Version__c', direction: SortDirection.ASC }, + ]; + return await QueryTools.queryWithFilterAndSort( + this.connection, + this.namespace, + CardMigrationTool.VLOCITYCARD_NAME, + this.getCardFields(), + filters, + sortFields + ); + } else { + filters.set(this.namespacePrefix + 'Active__c', true); + return await QueryTools.queryWithFilter( + this.connection, + this.namespace, + CardMigrationTool.VLOCITYCARD_NAME, + this.getCardFields(), + filters + ); + } + } + + // Upload All the VlocityCard__c records to OmniUiCard + private async uploadAllCards(cards: any[]): Promise> { + const cardsUploadInfo = new Map(); + const originalRecords = new Map(); + const uniqueNames = new Set(); + + for (let card of cards) { + await this.uploadCard(cards, card, cardsUploadInfo, originalRecords, uniqueNames); + } + + return cardsUploadInfo; + } + + private async uploadCard( + allCards: any[], + card: AnyJson, + cardsUploadInfo: Map, + originalRecords: Map, + uniqueNames: Set + ) { + const recordId = card['Id']; + + // If we already uploaded this card, skip + if (cardsUploadInfo.has(recordId)) { + return; + } + const isCardActive = card[`${this.namespacePrefix}Active__c`]; + + try { + const childCards = this.getChildCards(card); + if (childCards.length > 0) { + for (let childCardName of childCards) { + // Upload child cards + const childCard = allCards.find((c) => c['Name'] === childCardName); + if (childCard) { + await this.uploadCard(allCards, childCard, cardsUploadInfo, originalRecords, uniqueNames); + } + } + + this.updateChildCards(card); + } + + this.reportProgress(allCards.length, originalRecords.size); + + // Perform the transformation + const invalidIpNames = new Map(); + const transformedCard = this.mapVlocityCardRecord(card, cardsUploadInfo, invalidIpNames); + + // Verify duplicated names + let transformedCardName: string; + if (this.allVersions) { + transformedCardName = transformedCard['Name'] + '_' + transformedCard['VersionNumber']; + } else { + transformedCardName = transformedCard['Name']; + } + const transformedCardAuthorName = transformedCard['AuthorName']; + + if (uniqueNames.has(transformedCardName)) { + this.setRecordErrors(card, this.messages.getMessage('duplicatedCardName')); + originalRecords.set(recordId, card); + return; + } + + // Save the name for duplicated names check + uniqueNames.add(transformedCardName); + + // Create a map of the original records + originalRecords.set(recordId, card); + + // Create card + const uploadResult = await NetUtils.createOne( + this.connection, + CardMigrationTool.OMNIUICARD_NAME, + recordId, + transformedCard + ); + + if (uploadResult) { + // Fix errors + uploadResult.errors = uploadResult.errors || []; + if (!uploadResult.success) { + uploadResult.errors = Array.isArray(uploadResult.errors) ? uploadResult.errors : [uploadResult.errors]; + } + + // If name has been changed, add a warning message + uploadResult.warnings = uploadResult.warnings || []; + if (transformedCardAuthorName !== card[this.namespacePrefix + 'Author__c']) { + uploadResult.warnings.unshift( + 'WARNING: Card author name has been modified to fit naming rules: ' + transformedCardAuthorName + ); + } + if (transformedCardName !== card['Name']) { + uploadResult.newName = transformedCardName; + uploadResult.warnings.unshift( + 'WARNING: Card name has been modified to fit naming rules: ' + transformedCardName + ); + } + + if (uploadResult.id && invalidIpNames.size > 0) { + const val = Array.from(invalidIpNames.entries()) + .map((e) => e[0]) + .join(', '); + uploadResult.errors.push('Integration Procedure Actions will need manual updates, please verify: ' + val); + } + + cardsUploadInfo.set(recordId, uploadResult); + + const updateResult = await NetUtils.updateOne( + this.connection, + CardMigrationTool.OMNIUICARD_NAME, + recordId, + uploadResult.id, + { + [CardMappings.Active__c]: isCardActive, + } + ); + + if (!updateResult.success) { + uploadResult.hasErrors = true; + uploadResult.errors = uploadResult.errors || []; + + uploadResult.errors.push(this.messages.getMessage('errorWhileActivatingCard') + updateResult.errors); + } + } + } catch (err) { + this.setRecordErrors(card, this.messages.getMessage('errorWhileUploadingCard') + err); + originalRecords.set(recordId, card); + + cardsUploadInfo.set(recordId, { + referenceId: recordId, + hasErrors: true, + success: false, + errors: err, + warnings: [], + }); + } + } + + private getChildCards(card: AnyJson): string[] { + let childs = []; + const definition = JSON.parse(card[this.namespacePrefix + 'Definition__c']); + if (!definition) return childs; + + for (let state of definition.states || []) { + if (state.childCards && Array.isArray(state.childCards)) { + childs = childs.concat(state.childCards); + + // Modify the name of the child cards + state.childCards = state.childCards.map((c) => this.cleanName(c)); + } + } + + return childs; + } + + private updateChildCards(card: AnyJson): void { + const definition = JSON.parse(card[this.namespacePrefix + 'Definition__c']); + if (!definition) return; + + for (let state of definition.states || []) { + if (state.childCards && Array.isArray(state.childCards)) { + state.childCards = state.childCards.map((c) => this.cleanName(c)); + } + } + + card[this.namespacePrefix + 'Definition__c'] = JSON.stringify(definition); + } + + // Maps an indivitdual VlocityCard__c record to an OmniUiCard record. + private mapVlocityCardRecord( + cardRecord: AnyJson, + cardsUploadInfo: Map, + invalidIpNames: Map + ): AnyJson { + // Transformed object + const mappedObject = {}; + + // Get the fields of the record + const recordFields = Object.keys(cardRecord); + + // Map individual fields + recordFields.forEach((recordField) => { + const cleanFieldName = this.getCleanFieldName(recordField); + + if (CardMappings.hasOwnProperty(cleanFieldName) && cleanFieldName !== 'IsChildCard__c') { + mappedObject[CardMappings[cleanFieldName]] = cardRecord[recordField]; + + // Transform ParentId__c to ClonedFromOmniUiCardKey field from uploaded response map + if (cleanFieldName === 'ParentID__c' && cardsUploadInfo.has(cardRecord[`${this.namespacePrefix}ParentID__c`])) { + mappedObject[CardMappings[cleanFieldName]] = cardsUploadInfo.get( + cardRecord[`${this.namespacePrefix}ParentID__c`] + ).id; + } + + // CardType__c and OmniUiCardType have different picklist values + if (cleanFieldName === 'CardType__c') { + let ischildCard = cardRecord[`${this.namespacePrefix}IsChildCard__c`]; + mappedObject['OmniUiCardType'] = ischildCard ? 'Child' : 'Parent'; + } + + // Child Cards don't have version, so assigning 1 + if (cleanFieldName === 'Version__c') { + let versionNumber = cardRecord[`${this.namespacePrefix}Version__c`]; + mappedObject['VersionNumber'] = versionNumber ? versionNumber : 1; + } + } + }); + + // Clean the name + mappedObject['Name'] = this.cleanName(mappedObject['Name']); + mappedObject[CardMappings.Author__c] = this.cleanName(mappedObject[CardMappings.Author__c]); + mappedObject[CardMappings.Active__c] = false; + + // Update the datasource + const datasource = JSON.parse(mappedObject[CardMappings.Datasource__c] || '{}'); + if (datasource.dataSource) { + const type = datasource.dataSource.type; + if (type === 'DataRaptor') { + datasource.dataSource.value.bundle = this.cleanName(datasource.dataSource.value.bundle); + } else if (type === 'IntegrationProcedures') { + const ipMethod: string = datasource.dataSource.value.ipMethod || ''; + + const parts = ipMethod.split('_'); + const newKey = parts.map((p) => this.cleanName(p, true)).join('_'); + + datasource.dataSource.value.ipMethod = newKey; + + if (parts.length > 2) { + invalidIpNames.set('DataSource', ipMethod); + } + } + mappedObject[CardMappings.Datasource__c] = JSON.stringify(datasource); + } + + // Update the propertyset datasource + const propertySet = JSON.parse(mappedObject[CardMappings.Definition__c] || '{}'); + if (propertySet) { + if (propertySet.dataSource) { + const type = propertySet.dataSource.type; + if (type === 'DataRaptor') { + propertySet.dataSource.value.bundle = this.cleanName(propertySet.dataSource.value.bundle); + } else if (type === 'IntegrationProcedures') { + const ipMethod: string = propertySet.dataSource.value.ipMethod || ''; + + const parts = ipMethod.split('_'); + const newKey = parts.map((p) => this.cleanName(p, true)).join('_'); + propertySet.dataSource.value.ipMethod = newKey; + + if (parts.length > 2) { + invalidIpNames.set('DataSource', ipMethod); + } + } + } + + // update the states for child cards + for (let i = 0; i < (propertySet.states || []).length; i++) { + const state = propertySet.states[i]; + + // Clean childCards property + if (state.childCards && Array.isArray(state.childCards)) { + state.childCards = state.childCards.map((c) => this.cleanName(c)); + } + + // Fix the "components" for child cards + for (let componentKey in state.components) { + if (state.components.hasOwnProperty(componentKey)) { + const component = state.components[componentKey]; + + if (component.children && Array.isArray(component.children)) { + this.fixChildren(component.children); + } + } + } + + if (state.omniscripts && Array.isArray(state.omniscripts)) { + for (let osIdx = 0; osIdx < state.omniscripts.length; osIdx++) { + state.omniscripts[osIdx].type = this.cleanName(state.omniscripts[osIdx].type); + state.omniscripts[osIdx].subtype = this.cleanName(state.omniscripts[osIdx].subtype); + } + } + } + + mappedObject[CardMappings.Definition__c] = JSON.stringify(propertySet); + } + + mappedObject['attributes'] = { + type: CardMigrationTool.OMNIUICARD_NAME, + referenceId: cardRecord['Id'], + }; + + return mappedObject; + } + + private fixChildren(children: any[]) { + for (let j = 0; j < children.length; j++) { + const child = children[j]; + + if (child.element === 'childCardPreview') { + child.property.cardName = this.cleanName(child.property.cardName); + } else if (child.element === 'action') { + if (child.property && child.property.stateAction && child.property.stateAction.omniType) { + const parts = (child.property.stateAction.omniType.Name || '').split('/'); + child.property.stateAction.omniType.Name = parts.map((p) => this.cleanName(p)).join('/'); + } + } + + if (child.children && Array.isArray(child.children)) { + this.fixChildren(child.children); + } + } + } + + private getCardFields(): string[] { + return Object.keys(CardMappings); + } +} diff --git a/src/migration/omniscript.ts b/src/migration/omniscript.ts index 8e7e3036..df6b3034 100644 --- a/src/migration/omniscript.ts +++ b/src/migration/omniscript.ts @@ -13,571 +13,724 @@ import { Connection, Logger, Messages } from '@salesforce/core'; import { UX } from '@salesforce/command'; export class OmniScriptMigrationTool extends BaseMigrationTool implements MigrationTool { - - private readonly exportType: OmniScriptExportType; - - // Source Custom Object Names - static readonly OMNISCRIPT_NAME = 'OmniScript__c'; - static readonly ELEMENT_NAME = 'Element__c'; - static readonly OMNISCRIPTDEFINITION_NAME = 'OmniScriptDefinition__c'; - - // Target Standard Objects Name - static readonly OMNIPROCESS_NAME = 'OmniProcess'; - static readonly OMNIPROCESSELEMENT_NAME = 'OmniProcessElement'; - static readonly OMNIPROCESSCOMPILATION_NAME = 'OmniProcessCompilation'; - - constructor(exportType: OmniScriptExportType, namespace: string, connection: Connection, logger: Logger, messages: Messages, ux: UX) { - super(namespace, connection, logger, messages, ux); - this.exportType = exportType; - } - - getName(): string { - return "OmniScript / Integration Procedures"; - } - - getRecordName(record: string) { - return record[this.namespacePrefix + 'Type__c'] - + '_' - + record[this.namespacePrefix + 'SubType__c'] - + (record[this.namespacePrefix + 'Language__c'] ? '_' + record[this.namespacePrefix + 'Language__c'] : '') - + '_' - + record[this.namespacePrefix + 'Version__c']; - } - - getMappings(): ObjectMapping[] { - return [{ - source: OmniScriptMigrationTool.OMNISCRIPT_NAME, - target: OmniScriptMigrationTool.OMNIPROCESS_NAME - }, { - source: OmniScriptMigrationTool.ELEMENT_NAME, - target: OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME - }, { - source: OmniScriptMigrationTool.OMNISCRIPTDEFINITION_NAME, - target: OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME - }]; - } - - async truncate(): Promise { - const objectName = OmniScriptMigrationTool.OMNIPROCESS_NAME; - - const allIds = await this.deactivateRecord(objectName); - await this.truncateElements(objectName, allIds.os.parents); - await this.truncateElements(objectName, allIds.os.childs); - await this.truncateElements(objectName, allIds.ip.parents); - await this.truncateElements(objectName, allIds.ip.childs); - } - - async truncateElements(objectName: string, ids: string[]): Promise { - if (!ids || ids.length === 0) { return; } - - let success: boolean = await NetUtils.delete(this.connection, ids); - if (!success) { - throw new Error(this.messages.getMessage('couldNotTruncateOmnniProcess').formatUnicorn(objectName)); - } - } - - async deactivateRecord(objectName: string): Promise<{ os: { parents: string[], childs: string[] }, ip: { parents: string[], childs: string[] } }> { - DebugTimer.getInstance().lap('Truncating ' + objectName + ' (' + this.exportType + ')'); - - const filters = new Map(); - const sorting = [{ field: 'IsIntegrationProcedure', direction: SortDirection.ASC }, { field: 'IsOmniScriptEmbeddable', direction: SortDirection.ASC }]; - - // Filter if only IP / OS - if (this.exportType === OmniScriptExportType.IP) { - filters.set('IsIntegrationProcedure', true); - } else if (this.exportType === OmniScriptExportType.OS) { - filters.set('IsIntegrationProcedure', false); - } - - // const ids: string[] = await QueryTools.queryIds(this.connection, objectName, filters); - const rows = await QueryTools.query(this.connection, objectName, ['Id', 'IsIntegrationProcedure', 'IsOmniScriptEmbeddable'], filters, sorting); - if (rows.length === 0) { - return { os: { parents: [], childs: [] }, ip: { parents: [], childs: [] } }; - } - - // We need to update one item at time. Otherwise, we'll have an UNKNOWN_ERROR - for (let row of rows) { - const id = row['Id']; - - await NetUtils.request(this.connection, `sobjects/${OmniScriptMigrationTool.OMNIPROCESS_NAME}/${id}`, { - IsActive: false - }, RequestMethod.PATCH); - } - - // Sleep 5 seconds, let's wait for all row locks to be released. While this takes less than a second, there has been - // times where it take a bit more. - await this.sleep(); - - return { - os: { - parents: rows.filter(row => row.IsIntegrationProcedure === false && row.IsOmniScriptEmbeddable === false).map(row => row.Id), - childs: rows.filter(row => row.IsIntegrationProcedure === false && row.IsOmniScriptEmbeddable === true).map(row => row.Id), - }, - ip: { - parents: rows.filter(row => row.IsIntegrationProcedure === true && row.IsOmniScriptEmbeddable === false).map(row => row.Id), - childs: rows.filter(row => row.IsIntegrationProcedure === true && row.IsOmniScriptEmbeddable === true).map(row => row.Id) - } - }; - } - - async migrate(): Promise { - - // Get All Records from OmniScript__c (IP & OS Parent Records) - const omniscripts = await this.getAllOmniScripts(); - const duplicatedNames = new Set(); - - // Variables to be returned After Migration - let done = 0; - let originalOsRecords = new Map(); - let osUploadInfo = new Map(); - const total = omniscripts.length; - - for (let omniscript of omniscripts) { - const mappedRecords = []; - // const originalRecords = new Map(); - const recordId = omniscript['Id']; - - this.reportProgress(total, done); - - // Record is Active, Elements can't be Added, Modified or Deleted for that OS/IP - omniscript[`${this.namespacePrefix}IsActive__c`] = false; - - // Create a map of the original OmniScript__c records - originalOsRecords.set(recordId, omniscript); - - // Get All elements for each OmniScript__c record(i.e IP/OS) - const elements = await this.getAllElementsForOmniScript(recordId); - - // Perform the transformation for OS/IP Parent Record from OmniScript__c - const mappedOmniScript = this.mapOmniScriptRecord(omniscript); - - // Clean type, subtype - mappedOmniScript[OmniScriptMappings.Type__c] = this.cleanName(mappedOmniScript[OmniScriptMappings.Type__c]); - mappedOmniScript[OmniScriptMappings.SubType__c] = this.cleanName(mappedOmniScript[OmniScriptMappings.SubType__c]); - - // Check duplicated name - // const mappedOsName = `${mappedOmniScript[OmniScriptMappings.Type__c]}_${mappedOmniScript[OmniScriptMappings.SubType__c]}_${mappedOmniScript[OmniScriptMappings.Language__c]}`; - const mappedOsName = mappedOmniScript[OmniScriptMappings.Type__c] + '_' + mappedOmniScript[OmniScriptMappings.SubType__c] - + (mappedOmniScript[OmniScriptMappings.Language__c] ? '_' + mappedOmniScript[OmniScriptMappings.Language__c] : '') + '_1'; - - if (duplicatedNames.has(mappedOsName)) { - this.setRecordErrors(omniscript, this.messages.getMessage('duplicatedOSName')); - originalOsRecords.set(recordId, omniscript) - continue; - } - - // Save the mapped record - duplicatedNames.add(mappedOsName); - mappedRecords.push(mappedOmniScript); - - // Save the OmniScript__c records to Standard BPO i.e OmniProcess - const osUploadResponse = await NetUtils.createOne(this.connection, OmniScriptMigrationTool.OMNIPROCESS_NAME, recordId, mappedOmniScript); - - if (osUploadResponse.success) { - - // Fix errors - if (!osUploadResponse.success) { - osUploadResponse.errors = Array.isArray(osUploadResponse.errors) ? osUploadResponse.errors : [osUploadResponse.errors]; - } - - osUploadResponse.warnings = osUploadResponse.warnings || []; - - const originalOsName = omniscript[this.namespacePrefix + 'Type__c'] + '_' + omniscript[this.namespacePrefix + 'SubType__c'] + '_' + omniscript[this.namespacePrefix + 'Language__c']; - if (originalOsName !== mappedOsName) { - osUploadResponse.newName = mappedOsName; - osUploadResponse.warnings.unshift('WARNING: OmniScript name has been modified to fit naming rules: ' + mappedOsName); - } - - try { - // Upload All elements for each OmniScript__c record(i.e IP/OS) - await this.uploadAllElements(osUploadResponse, elements); - - // Get OmniScript Compiled Definitions for OmniScript Record - const omniscriptsCompiledDefinitions = await this.getOmniScriptCompiledDefinition(recordId); - - // Upload OmniScript Compiled Definition to OmniProcessCompilation - await this.uploadAllOmniScriptDefinitions(osUploadResponse, omniscriptsCompiledDefinitions); - - // Update the inserted OS record as it was Active and made InActive to insert. - mappedRecords[0].IsActive = true; - mappedRecords[0].Id = osUploadResponse.id; - - if (mappedRecords[0].IsIntegrationProcedure) { - mappedRecords[0].Language = 'Procedure'; - } - - const updateResult = await NetUtils.updateOne(this.connection, OmniScriptMigrationTool.OMNIPROCESS_NAME, recordId, osUploadResponse.id, { - [OmniScriptMappings.IsActive__c]: true - }); - - if (!updateResult.success) { - osUploadResponse.hasErrors = true; - osUploadResponse.errors = osUploadResponse.errors || []; - - osUploadResponse.errors.push(this.messages.getMessage('errorWhileActivatingOs') + updateResult.errors); - } - - - } catch (e) { - osUploadResponse.hasErrors = true; - osUploadResponse.errors = osUploadResponse.errors || []; - - let error = 'UNKNOWN'; - if (typeof e === 'object') { - try { - const obj = JSON.parse(e.message || '{}'); - if (obj.hasErrors && obj.results && Array.isArray(obj.results)) { - error = obj.results.map(r => { - return Array.isArray(r.errors) ? r.errors.map(e => e.message).join('. ') : r.errors; - }).join('. '); - } - } catch { - error = e.toString(); - } - } - - osUploadResponse.errors.push(this.messages.getMessage('errorWhileCreatingElements') + error); - } - finally { - // Create the return records and response which have been processed - osUploadInfo.set(recordId, osUploadResponse); - } - } - - originalOsRecords.set(recordId, omniscript); - - done++; - }; - - const objectMigrationResults: MigrationResult[] = []; - - if (this.exportType === OmniScriptExportType.All || this.exportType === OmniScriptExportType.IP) { - objectMigrationResults.push(this.getMigratedRecordsByType('Integration Procedures', osUploadInfo, originalOsRecords)); - } - if (this.exportType === OmniScriptExportType.All || this.exportType === OmniScriptExportType.OS) { - objectMigrationResults.push(this.getMigratedRecordsByType('OmniScripts', osUploadInfo, originalOsRecords)); - } - - return objectMigrationResults; - } - - // Using this small method, As IP & OS lives in same object -> So returning the IP and OS in the end, after the migration is done - // and the results are generated. Other way can be creating a separate IP class and migrating IP & OS separately - // using common functions - private getMigratedRecordsByType(type: string, results: Map, records: Map): MigrationResult { - let recordMap: Map = new Map(); - let resultMap: Map = new Map(); - for (let record of Array.from(records.values())) { - if (type === 'Integration Procedures' && record[`${this.namespacePrefix}IsProcedure__c`] || - type === 'OmniScripts' && !record[`${this.namespacePrefix}IsProcedure__c`] - ) { - recordMap.set(record['Id'], records.get(record['Id'])); - if (results.get(record['Id'])) { - resultMap.set(record['Id'], results.get(record['Id'])); - } - } - } - return { - name: type, - records: recordMap, - results: resultMap - } - } - - // Get All OmniScript__c records i.e All IP & OS - private async getAllOmniScripts(): Promise { - DebugTimer.getInstance().lap('Query OmniScripts'); - - const filters = new Map(); - filters.set(this.namespacePrefix + 'IsActive__c', true); - - if (this.exportType === OmniScriptExportType.IP) { - filters.set(this.namespacePrefix + 'IsProcedure__c', true); - } else if (this.exportType === OmniScriptExportType.OS) { - filters.set(this.namespacePrefix + 'IsProcedure__c', false); - } - - return await QueryTools.queryWithFilter(this.connection, this.namespace, OmniScriptMigrationTool.OMNISCRIPT_NAME, this.getOmniScriptFields(), filters); - } - - // Get All Elements w.r.t OmniScript__c i.e Elements tagged to passed in IP/OS - private async getAllElementsForOmniScript(recordId: string): Promise { - // Query all Elements for an OmniScript - const filters = new Map(); - filters.set(this.namespacePrefix + 'OmniScriptId__c', recordId); - - // const queryFilterStr = ` Where ${this.namespacePrefix}OmniScriptId__c = '${omniScriptData.keys().next().value}'`; - return await QueryTools.queryWithFilter(this.connection, this.namespace, OmniScriptMigrationTool.ELEMENT_NAME, this.getElementFields(), filters); - } - - // Get All Compiled Definitions w.r.t OmniScript__c i.e Definitions tagged to passed in IP/OS - private async getOmniScriptCompiledDefinition(recordId: string): Promise { - // Query all Definitions for an OmniScript - const filters = new Map(); - filters.set(this.namespacePrefix + 'OmniScriptId__c', recordId); - - // const queryFilterStr = ` Where ${this.namespacePrefix}OmniScriptId__c = '${omniScriptData.keys().next().value}'`; - return await QueryTools.queryWithFilter(this.connection, this.namespace, OmniScriptMigrationTool.OMNISCRIPTDEFINITION_NAME, this.getOmniScriptDefinitionFields(), filters); - } - - // Upload All the Elements tagged to a OmniScript__c record, after the parent record has been inserted - private async uploadAllElements(omniScriptUploadResults: UploadRecordResult, elements: AnyJson[]): Promise> { - let levelCount = 0; // To define and insert different levels(Parent-Child relationship) at a time - let exit = false; // Counter variable to exit after all parent-child elements inserted - var elementsUploadInfo = new Map(); // Info for Uploaded Elements to be returned - - do { - let tempElements = []; // Stores Elements at a same level starting with levelCount = 0 level (parent elements) - for (let element of elements) { - if (element[`${this.namespacePrefix}Level__c`] === levelCount) { - let elementId = element['Id']; - let elementParentId = element[`${this.namespacePrefix}ParentElementId__c`]; - if (!elementsUploadInfo.has(elementId) && (!elementParentId || (elementParentId && elementsUploadInfo.has(elementParentId)))) { - tempElements.push(element); - } - } - } - - // If no elements exist after a certain level, Then everything is alraedy processed, otherwise upload - if (tempElements.length === 0) { - exit = true; - } else { - // Get Transformed Element__c to OmniProcessElement with updated OmniScriptId & ParentElementId - let elementsTransformedData = await this.prepareElementsData(omniScriptUploadResults, tempElements, elementsUploadInfo); - // Upload the transformed Element__c - let elementsUploadResponse = await this.uploadTransformedData(OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME, elementsTransformedData); - // Keep appending upload Info for Elements at each level - elementsUploadInfo = new Map([...Array.from(elementsUploadInfo.entries()), ...Array.from(elementsUploadResponse.entries())]); - } - - levelCount++; - - } while (exit === false) - - return elementsUploadInfo; - } - - // Upload All the Definitions tagged to a OmniScript__c record, after the parent record has been inserted - private async uploadAllOmniScriptDefinitions(omniScriptUploadResults: UploadRecordResult, osDefinitions: AnyJson[]): Promise> { - let osDefinitionsData = await this.prepareOsDefinitionsData(omniScriptUploadResults, osDefinitions); - return await this.uploadTransformedData(OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME, osDefinitionsData); - } - - // Prepare Elements Data and Do the neccessary updates, transformation, validations etc. - private async prepareElementsData(osUploadResult: UploadRecordResult, elements: AnyJson[], parentElementUploadResponse: Map): Promise { - - const mappedRecords = [], - originalRecords = new Map(), - invalidIpNames = new Map(); - - elements.forEach(element => { - - // Perform the transformation. We need parent record & must have been migrated before - if (osUploadResult.id) { - mappedRecords.push(this.mapElementData(element, osUploadResult.id, parentElementUploadResponse, invalidIpNames)); - } - - // Create a map of the original records - originalRecords.set(element['Id'], element); - }); - - if (osUploadResult.id && invalidIpNames.size > 0) { - const val = Array.from(invalidIpNames.entries()).map(e => e[0]).join(', '); - osUploadResult.errors.push('Integration Procedure Actions will need manual updates, please verify: ' + val); - } - - return { originalRecords, mappedRecords }; - } - - // Prepare OmniScript Definitions to be uploaded - private async prepareOsDefinitionsData(osUploadResult: UploadRecordResult, osDefinitions: AnyJson[]): Promise { - const mappedRecords = [], - originalRecords = new Map(); - - osDefinitions.forEach(osDefinition => { - - // Perform the transformation. We need parent record & must have been migrated before - if (osUploadResult.id) { - mappedRecords.push(this.mapOsDefinitionsData(osDefinition, osUploadResult.id)); - } - - // Create a map of the original records - originalRecords.set(osDefinition['Id'], osDefinition); - }); - - return { originalRecords, mappedRecords }; - } - - /** - * Maps an omniscript__c record to OmniProcess Record. - * @param omniScriptRecord - * @returns - */ - private mapOmniScriptRecord(omniScriptRecord: AnyJson): AnyJson { - - // Transformed object - const mappedObject = {}; - - // Get the fields of the record - const recordFields = Object.keys(omniScriptRecord); - - // Map individual fields - recordFields.forEach(recordField => { - const cleanFieldName = this.getCleanFieldName(recordField); - - if (OmniScriptMappings.hasOwnProperty(cleanFieldName)) { - mappedObject[OmniScriptMappings[cleanFieldName]] = omniScriptRecord[recordField]; - } - }); - - mappedObject['Name'] = this.cleanName(mappedObject['Name']); - - // BATCH framework requires that each record has an "attributes" property - mappedObject['attributes'] = { - type: OmniScriptMigrationTool.OMNIPROCESS_NAME, - referenceId: omniScriptRecord['Id'] - }; - - return mappedObject; - } - - // Maps an individual Element into an OmniProcessElement record - private mapElementData(elementRecord: AnyJson, omniProcessId: string, parentElementUploadResponse: Map, invalidIpReferences: Map) { - - // Transformed object - const mappedObject = {}; - - // Get the fields of the record - const recordFields = Object.keys(elementRecord); - - // Map individual fields - recordFields.forEach(recordField => { - const cleanFieldName = this.getCleanFieldName(recordField); - - if (ElementMappings.hasOwnProperty(cleanFieldName)) { - mappedObject[ElementMappings[cleanFieldName]] = elementRecord[recordField]; - - if (cleanFieldName === "ParentElementId__c" && parentElementUploadResponse.has(elementRecord[`${this.namespacePrefix}ParentElementId__c`])) { - mappedObject[ElementMappings[cleanFieldName]] = parentElementUploadResponse.get(elementRecord[`${this.namespacePrefix}ParentElementId__c`]).id; - } - } - }); - - // Set the parent/child relationship - mappedObject['OmniProcessId'] = omniProcessId; - - // We need to fix the child references - const elementType = mappedObject[ElementMappings.Type__c]; - const propertySet = JSON.parse(mappedObject[ElementMappings.PropertySet__c] || '{}'); - switch (elementType) { - case 'OmniScript': - propertySet['Type'] = this.cleanName(propertySet['Type']); - propertySet['Sub Type'] = this.cleanName(propertySet['Sub Type']); - break; - case 'Integration Procedure Action': - const remoteOptions = propertySet['remoteOptions'] || {}; - remoteOptions['preTransformBundle'] = this.cleanName(remoteOptions['preTransformBundle']); - remoteOptions['postTransformBundle'] = this.cleanName(remoteOptions['postTransformBundle']); - propertySet['remoteOptions'] = remoteOptions; - - propertySet['preTransformBundle'] = this.cleanName(propertySet['preTransformBundle']); - propertySet['postTransformBundle'] = this.cleanName(propertySet['postTransformBundle']); - - // We can't update the IP references, we need to let the user know - const key: String = propertySet['integrationProcedureKey'] || ''; - if (key) { - const parts = key.split('_'); - const newKey = parts.map(p => this.cleanName(p, true)).join('_'); - if (parts.length > 2) { - invalidIpReferences.set(mappedObject[ElementMappings.Name], key); - } - propertySet['integrationProcedureKey'] = newKey; - } - break; - case 'DataRaptor Turbo Action': - case 'DataRaptor Transform Action': - case 'DataRaptor Post Action': - case 'DataRaptor Extract Action': - propertySet['bundle'] = this.cleanName(propertySet['bundle']); - break; - } - - mappedObject[ElementMappings.PropertySet__c] = JSON.stringify(propertySet); - mappedObject['Name'] = this.cleanName(mappedObject['Name']); - - // BATCH framework requires that each record has an "attributes" property - mappedObject['attributes'] = { - type: OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME, - referenceId: elementRecord['Id'] - }; - - return mappedObject; - } - - // Maps an individual Definition into an OmniProcessCompilation record - private mapOsDefinitionsData(osDefinition: AnyJson, omniProcessId: string) { - // Transformed object - const mappedObject = {}; - - // Get the fields of the record - const recordFields = Object.keys(osDefinition); - - // Map individual fields - recordFields.forEach(recordField => { - const cleanFieldName = this.getCleanFieldName(recordField); - - if (OmniScriptDefinitionMappings.hasOwnProperty(cleanFieldName)) { - mappedObject[OmniScriptDefinitionMappings[cleanFieldName]] = osDefinition[recordField]; - } - }); - - // Set the parent/child relationship - mappedObject[OmniScriptDefinitionMappings.Name] = omniProcessId; - mappedObject[OmniScriptDefinitionMappings.OmniScriptId__c] = omniProcessId; - - let content = mappedObject[OmniScriptDefinitionMappings.Content__c]; - if (content) { - try { - content = JSON.parse(content); - if (content && content['sOmniScriptId']) { - content['sOmniScriptId'] = omniProcessId; - mappedObject[OmniScriptDefinitionMappings.Content__c] = JSON.stringify(content); - } - } catch (ex) { - // Log - } - } - - // BATCH framework requires that each record has an "attributes" property - mappedObject['attributes'] = { - type: OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME, - referenceId: osDefinition['Id'] - }; - - return mappedObject; - } - - private getOmniScriptFields(): string[] { - return Object.keys(OmniScriptMappings); - } - - private getElementFields(): string[] { - return Object.keys(ElementMappings); - } - - private getOmniScriptDefinitionFields(): string[] { - return Object.keys(OmniScriptDefinitionMappings); - } - - private sleep() { - return new Promise(resolve => { - setTimeout(resolve, 5000); - }) - }; + private readonly exportType: OmniScriptExportType; + private readonly allVersions: boolean; + + // Source Custom Object Names + static readonly OMNISCRIPT_NAME = 'OmniScript__c'; + static readonly ELEMENT_NAME = 'Element__c'; + static readonly OMNISCRIPTDEFINITION_NAME = 'OmniScriptDefinition__c'; + + // Target Standard Objects Name + static readonly OMNIPROCESS_NAME = 'OmniProcess'; + static readonly OMNIPROCESSELEMENT_NAME = 'OmniProcessElement'; + static readonly OMNIPROCESSCOMPILATION_NAME = 'OmniProcessCompilation'; + + constructor( + exportType: OmniScriptExportType, + namespace: string, + connection: Connection, + logger: Logger, + messages: Messages, + ux: UX, + allVersions: boolean + ) { + super(namespace, connection, logger, messages, ux); + this.exportType = exportType; + this.allVersions = allVersions; + } + + getName(): string { + return 'OmniScript / Integration Procedures'; + } + + getRecordName(record: string) { + return ( + record[this.namespacePrefix + 'Type__c'] + + '_' + + record[this.namespacePrefix + 'SubType__c'] + + (record[this.namespacePrefix + 'Language__c'] ? '_' + record[this.namespacePrefix + 'Language__c'] : '') + + '_' + + record[this.namespacePrefix + 'Version__c'] + ); + } + + getMappings(): ObjectMapping[] { + return [ + { + source: OmniScriptMigrationTool.OMNISCRIPT_NAME, + target: OmniScriptMigrationTool.OMNIPROCESS_NAME, + }, + { + source: OmniScriptMigrationTool.ELEMENT_NAME, + target: OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME, + }, + { + source: OmniScriptMigrationTool.OMNISCRIPTDEFINITION_NAME, + target: OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME, + }, + ]; + } + + async truncate(): Promise { + const objectName = OmniScriptMigrationTool.OMNIPROCESS_NAME; + const allIds = await this.deactivateRecord(objectName); + await this.truncateElements(objectName, allIds.os.parents); + await this.truncateElements(objectName, allIds.os.childs); + await this.truncateElements(objectName, allIds.ip.parents); + await this.truncateElements(objectName, allIds.ip.childs); + } + + async truncateElements(objectName: string, ids: string[]): Promise { + if (!ids || ids.length === 0) { + return; + } + + let success: boolean = await NetUtils.delete(this.connection, ids); + if (!success) { + throw new Error(this.messages.getMessage('couldNotTruncateOmnniProcess').formatUnicorn(objectName)); + } + } + + async deactivateRecord( + objectName: string + ): Promise<{ os: { parents: string[]; childs: string[] }; ip: { parents: string[]; childs: string[] } }> { + DebugTimer.getInstance().lap('Truncating ' + objectName + ' (' + this.exportType + ')'); + + const filters = new Map(); + const sorting = [ + { field: 'IsIntegrationProcedure', direction: SortDirection.ASC }, + { field: 'IsOmniScriptEmbeddable', direction: SortDirection.ASC }, + ]; + + // Filter if only IP / OS + if (this.exportType === OmniScriptExportType.IP) { + filters.set('IsIntegrationProcedure', true); + } else if (this.exportType === OmniScriptExportType.OS) { + filters.set('IsIntegrationProcedure', false); + } + + // const ids: string[] = await QueryTools.queryIds(this.connection, objectName, filters); + const rows = await QueryTools.query( + this.connection, + objectName, + ['Id', 'IsIntegrationProcedure', 'IsOmniScriptEmbeddable'], + filters, + sorting + ); + if (rows.length === 0) { + return { os: { parents: [], childs: [] }, ip: { parents: [], childs: [] } }; + } + + // We need to update one item at time. Otherwise, we'll have an UNKNOWN_ERROR + for (let row of rows) { + const id = row['Id']; + + await NetUtils.request( + this.connection, + `sobjects/${OmniScriptMigrationTool.OMNIPROCESS_NAME}/${id}`, + { + IsActive: false, + }, + RequestMethod.PATCH + ); + } + + // Sleep 5 seconds, let's wait for all row locks to be released. While this takes less than a second, there has been + // times where it take a bit more. + await this.sleep(); + + return { + os: { + parents: rows + .filter((row) => row.IsIntegrationProcedure === false && row.IsOmniScriptEmbeddable === false) + .map((row) => row.Id), + childs: rows + .filter((row) => row.IsIntegrationProcedure === false && row.IsOmniScriptEmbeddable === true) + .map((row) => row.Id), + }, + ip: { + parents: rows + .filter((row) => row.IsIntegrationProcedure === true && row.IsOmniScriptEmbeddable === false) + .map((row) => row.Id), + childs: rows + .filter((row) => row.IsIntegrationProcedure === true && row.IsOmniScriptEmbeddable === true) + .map((row) => row.Id), + }, + }; + } + + async migrate(): Promise { + // Get All Records from OmniScript__c (IP & OS Parent Records) + const omniscripts = await this.getAllOmniScripts(); + const duplicatedNames = new Set(); + + // Variables to be returned After Migration + let done = 0; + let originalOsRecords = new Map(); + let osUploadInfo = new Map(); + const total = omniscripts.length; + + for (let omniscript of omniscripts) { + const mappedRecords = []; + // const originalRecords = new Map(); + const recordId = omniscript['Id']; + const isOsActive = omniscript[`${this.namespacePrefix}IsActive__c`]; + + this.reportProgress(total, done); + + // Create a map of the original OmniScript__c records + originalOsRecords.set(recordId, omniscript); + + // Record is Active, Elements can't be Added, Modified or Deleted for that OS/IP + omniscript[`${this.namespacePrefix}IsActive__c`] = false; + + // Get All elements for each OmniScript__c record(i.e IP/OS) + const elements = await this.getAllElementsForOmniScript(recordId); + + // Perform the transformation for OS/IP Parent Record from OmniScript__c + const mappedOmniScript = this.mapOmniScriptRecord(omniscript); + + // Clean type, subtype + mappedOmniScript[OmniScriptMappings.Type__c] = this.cleanName(mappedOmniScript[OmniScriptMappings.Type__c]); + mappedOmniScript[OmniScriptMappings.SubType__c] = this.cleanName(mappedOmniScript[OmniScriptMappings.SubType__c]); + + // Check duplicated name + let mappedOsName; + if (this.allVersions) { + mappedOmniScript[OmniScriptMappings.Version__c] = omniscript[`${this.namespacePrefix}Version__c`]; + mappedOsName = + mappedOmniScript[OmniScriptMappings.Type__c] + + '_' + + mappedOmniScript[OmniScriptMappings.SubType__c] + + (mappedOmniScript[OmniScriptMappings.Language__c] + ? '_' + mappedOmniScript[OmniScriptMappings.Language__c] + : '') + + '_' + + mappedOmniScript[OmniScriptMappings.Version__c]; + } else { + mappedOsName = + mappedOmniScript[OmniScriptMappings.Type__c] + + '_' + + mappedOmniScript[OmniScriptMappings.SubType__c] + + (mappedOmniScript[OmniScriptMappings.Language__c] + ? '_' + mappedOmniScript[OmniScriptMappings.Language__c] + : '') + + '_1'; + } + + if (duplicatedNames.has(mappedOsName)) { + this.setRecordErrors(omniscript, this.messages.getMessage('duplicatedOSName')); + originalOsRecords.set(recordId, omniscript); + continue; + } + + // Save the mapped record + duplicatedNames.add(mappedOsName); + mappedRecords.push(mappedOmniScript); + + // Save the OmniScript__c records to Standard BPO i.e OmniProcess + const osUploadResponse = await NetUtils.createOne( + this.connection, + OmniScriptMigrationTool.OMNIPROCESS_NAME, + recordId, + mappedOmniScript + ); + + if (osUploadResponse.success) { + // Fix errors + if (!osUploadResponse.success) { + osUploadResponse.errors = Array.isArray(osUploadResponse.errors) + ? osUploadResponse.errors + : [osUploadResponse.errors]; + } + + osUploadResponse.warnings = osUploadResponse.warnings || []; + + const originalOsName = + omniscript[this.namespacePrefix + 'Type__c'] + + '_' + + omniscript[this.namespacePrefix + 'SubType__c'] + + '_' + + omniscript[this.namespacePrefix + 'Language__c']; + if (originalOsName !== mappedOsName) { + osUploadResponse.newName = mappedOsName; + osUploadResponse.warnings.unshift( + 'WARNING: OmniScript name has been modified to fit naming rules: ' + mappedOsName + ); + } + + try { + // Upload All elements for each OmniScript__c record(i.e IP/OS) + await this.uploadAllElements(osUploadResponse, elements); + + // Get OmniScript Compiled Definitions for OmniScript Record + const omniscriptsCompiledDefinitions = await this.getOmniScriptCompiledDefinition(recordId); + + // Upload OmniScript Compiled Definition to OmniProcessCompilation + await this.uploadAllOmniScriptDefinitions(osUploadResponse, omniscriptsCompiledDefinitions); + + if (isOsActive) { + // Update the inserted OS record as it was Active and made InActive to insert. + mappedRecords[0].IsActive = true; + mappedRecords[0].Id = osUploadResponse.id; + + if (mappedRecords[0].IsIntegrationProcedure) { + mappedRecords[0].Language = 'Procedure'; + } + + const updateResult = await NetUtils.updateOne( + this.connection, + OmniScriptMigrationTool.OMNIPROCESS_NAME, + recordId, + osUploadResponse.id, + { + [OmniScriptMappings.IsActive__c]: true, + } + ); + + if (!updateResult.success) { + osUploadResponse.hasErrors = true; + osUploadResponse.errors = osUploadResponse.errors || []; + + osUploadResponse.errors.push(this.messages.getMessage('errorWhileActivatingOs') + updateResult.errors); + } + } + } catch (e) { + osUploadResponse.hasErrors = true; + osUploadResponse.errors = osUploadResponse.errors || []; + + let error = 'UNKNOWN'; + if (typeof e === 'object') { + try { + const obj = JSON.parse(e.message || '{}'); + if (obj.hasErrors && obj.results && Array.isArray(obj.results)) { + error = obj.results + .map((r) => { + return Array.isArray(r.errors) ? r.errors.map((e) => e.message).join('. ') : r.errors; + }) + .join('. '); + } + } catch { + error = e.toString(); + } + } + + osUploadResponse.errors.push(this.messages.getMessage('errorWhileCreatingElements') + error); + } finally { + // Create the return records and response which have been processed + osUploadInfo.set(recordId, osUploadResponse); + } + } + + originalOsRecords.set(recordId, omniscript); + + done++; + } + + const objectMigrationResults: MigrationResult[] = []; + + if (this.exportType === OmniScriptExportType.All || this.exportType === OmniScriptExportType.IP) { + objectMigrationResults.push( + this.getMigratedRecordsByType('Integration Procedures', osUploadInfo, originalOsRecords) + ); + } + if (this.exportType === OmniScriptExportType.All || this.exportType === OmniScriptExportType.OS) { + objectMigrationResults.push(this.getMigratedRecordsByType('OmniScripts', osUploadInfo, originalOsRecords)); + } + + return objectMigrationResults; + } + + // Using this small method, As IP & OS lives in same object -> So returning the IP and OS in the end, after the migration is done + // and the results are generated. Other way can be creating a separate IP class and migrating IP & OS separately + // using common functions + private getMigratedRecordsByType( + type: string, + results: Map, + records: Map + ): MigrationResult { + let recordMap: Map = new Map(); + let resultMap: Map = new Map(); + for (let record of Array.from(records.values())) { + if ( + (type === 'Integration Procedures' && record[`${this.namespacePrefix}IsProcedure__c`]) || + (type === 'OmniScripts' && !record[`${this.namespacePrefix}IsProcedure__c`]) + ) { + recordMap.set(record['Id'], records.get(record['Id'])); + if (results.get(record['Id'])) { + resultMap.set(record['Id'], results.get(record['Id'])); + } + } + } + return { + name: type, + records: recordMap, + results: resultMap, + }; + } + + // Get All OmniScript__c records i.e All IP & OS + private async getAllOmniScripts(): Promise { + DebugTimer.getInstance().lap('Query OmniScripts'); + this.logger.info('allVersions : ' + this.allVersions); + const filters = new Map(); + + if (this.exportType === OmniScriptExportType.IP) { + filters.set(this.namespacePrefix + 'IsProcedure__c', true); + } else if (this.exportType === OmniScriptExportType.OS) { + filters.set(this.namespacePrefix + 'IsProcedure__c', false); + } + + if (this.allVersions) { + const sortFields = [ + { field: this.namespacePrefix + 'Type__c', direction: SortDirection.ASC }, + { field: this.namespacePrefix + 'SubType__c', direction: SortDirection.ASC }, + { field: this.namespacePrefix + 'Version__c', direction: SortDirection.ASC }, + ]; + return await QueryTools.queryWithFilterAndSort( + this.connection, + this.namespace, + OmniScriptMigrationTool.OMNISCRIPT_NAME, + this.getOmniScriptFields(), + filters, + sortFields + ); + } else { + filters.set(this.namespacePrefix + 'IsActive__c', true); + return await QueryTools.queryWithFilter( + this.connection, + this.namespace, + OmniScriptMigrationTool.OMNISCRIPT_NAME, + this.getOmniScriptFields(), + filters + ); + } + } + + // Get All Elements w.r.t OmniScript__c i.e Elements tagged to passed in IP/OS + private async getAllElementsForOmniScript(recordId: string): Promise { + // Query all Elements for an OmniScript + const filters = new Map(); + filters.set(this.namespacePrefix + 'OmniScriptId__c', recordId); + + // const queryFilterStr = ` Where ${this.namespacePrefix}OmniScriptId__c = '${omniScriptData.keys().next().value}'`; + return await QueryTools.queryWithFilter( + this.connection, + this.namespace, + OmniScriptMigrationTool.ELEMENT_NAME, + this.getElementFields(), + filters + ); + } + + // Get All Compiled Definitions w.r.t OmniScript__c i.e Definitions tagged to passed in IP/OS + private async getOmniScriptCompiledDefinition(recordId: string): Promise { + // Query all Definitions for an OmniScript + const filters = new Map(); + filters.set(this.namespacePrefix + 'OmniScriptId__c', recordId); + + // const queryFilterStr = ` Where ${this.namespacePrefix}OmniScriptId__c = '${omniScriptData.keys().next().value}'`; + return await QueryTools.queryWithFilter( + this.connection, + this.namespace, + OmniScriptMigrationTool.OMNISCRIPTDEFINITION_NAME, + this.getOmniScriptDefinitionFields(), + filters + ); + } + + // Upload All the Elements tagged to a OmniScript__c record, after the parent record has been inserted + private async uploadAllElements( + omniScriptUploadResults: UploadRecordResult, + elements: AnyJson[] + ): Promise> { + let levelCount = 0; // To define and insert different levels(Parent-Child relationship) at a time + let exit = false; // Counter variable to exit after all parent-child elements inserted + var elementsUploadInfo = new Map(); // Info for Uploaded Elements to be returned + + do { + let tempElements = []; // Stores Elements at a same level starting with levelCount = 0 level (parent elements) + for (let element of elements) { + if (element[`${this.namespacePrefix}Level__c`] === levelCount) { + let elementId = element['Id']; + let elementParentId = element[`${this.namespacePrefix}ParentElementId__c`]; + if ( + !elementsUploadInfo.has(elementId) && + (!elementParentId || (elementParentId && elementsUploadInfo.has(elementParentId))) + ) { + tempElements.push(element); + } + } + } + + // If no elements exist after a certain level, Then everything is alraedy processed, otherwise upload + if (tempElements.length === 0) { + exit = true; + } else { + // Get Transformed Element__c to OmniProcessElement with updated OmniScriptId & ParentElementId + let elementsTransformedData = await this.prepareElementsData( + omniScriptUploadResults, + tempElements, + elementsUploadInfo + ); + // Upload the transformed Element__c + let elementsUploadResponse = await this.uploadTransformedData( + OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME, + elementsTransformedData + ); + // Keep appending upload Info for Elements at each level + elementsUploadInfo = new Map([ + ...Array.from(elementsUploadInfo.entries()), + ...Array.from(elementsUploadResponse.entries()), + ]); + } + + levelCount++; + } while (exit === false); + + return elementsUploadInfo; + } + + // Upload All the Definitions tagged to a OmniScript__c record, after the parent record has been inserted + private async uploadAllOmniScriptDefinitions( + omniScriptUploadResults: UploadRecordResult, + osDefinitions: AnyJson[] + ): Promise> { + let osDefinitionsData = await this.prepareOsDefinitionsData(omniScriptUploadResults, osDefinitions); + return await this.uploadTransformedData(OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME, osDefinitionsData); + } + + // Prepare Elements Data and Do the neccessary updates, transformation, validations etc. + private async prepareElementsData( + osUploadResult: UploadRecordResult, + elements: AnyJson[], + parentElementUploadResponse: Map + ): Promise { + const mappedRecords = [], + originalRecords = new Map(), + invalidIpNames = new Map(); + + elements.forEach((element) => { + // Perform the transformation. We need parent record & must have been migrated before + if (osUploadResult.id) { + mappedRecords.push( + this.mapElementData(element, osUploadResult.id, parentElementUploadResponse, invalidIpNames) + ); + } + + // Create a map of the original records + originalRecords.set(element['Id'], element); + }); + + if (osUploadResult.id && invalidIpNames.size > 0) { + const val = Array.from(invalidIpNames.entries()) + .map((e) => e[0]) + .join(', '); + osUploadResult.errors.push('Integration Procedure Actions will need manual updates, please verify: ' + val); + } + + return { originalRecords, mappedRecords }; + } + + // Prepare OmniScript Definitions to be uploaded + private async prepareOsDefinitionsData( + osUploadResult: UploadRecordResult, + osDefinitions: AnyJson[] + ): Promise { + const mappedRecords = [], + originalRecords = new Map(); + + osDefinitions.forEach((osDefinition) => { + // Perform the transformation. We need parent record & must have been migrated before + if (osUploadResult.id) { + mappedRecords.push(this.mapOsDefinitionsData(osDefinition, osUploadResult.id)); + } + + // Create a map of the original records + originalRecords.set(osDefinition['Id'], osDefinition); + }); + + return { originalRecords, mappedRecords }; + } + + /** + * Maps an omniscript__c record to OmniProcess Record. + * @param omniScriptRecord + * @returns + */ + private mapOmniScriptRecord(omniScriptRecord: AnyJson): AnyJson { + // Transformed object + const mappedObject = {}; + + // Get the fields of the record + const recordFields = Object.keys(omniScriptRecord); + + // Map individual fields + recordFields.forEach((recordField) => { + const cleanFieldName = this.getCleanFieldName(recordField); + + if (OmniScriptMappings.hasOwnProperty(cleanFieldName)) { + mappedObject[OmniScriptMappings[cleanFieldName]] = omniScriptRecord[recordField]; + } + }); + + mappedObject['Name'] = this.cleanName(mappedObject['Name']); + + // BATCH framework requires that each record has an "attributes" property + mappedObject['attributes'] = { + type: OmniScriptMigrationTool.OMNIPROCESS_NAME, + referenceId: omniScriptRecord['Id'], + }; + + return mappedObject; + } + + // Maps an individual Element into an OmniProcessElement record + private mapElementData( + elementRecord: AnyJson, + omniProcessId: string, + parentElementUploadResponse: Map, + invalidIpReferences: Map + ) { + // Transformed object + const mappedObject = {}; + + // Get the fields of the record + const recordFields = Object.keys(elementRecord); + + // Map individual fields + recordFields.forEach((recordField) => { + const cleanFieldName = this.getCleanFieldName(recordField); + + if (ElementMappings.hasOwnProperty(cleanFieldName)) { + mappedObject[ElementMappings[cleanFieldName]] = elementRecord[recordField]; + + if ( + cleanFieldName === 'ParentElementId__c' && + parentElementUploadResponse.has(elementRecord[`${this.namespacePrefix}ParentElementId__c`]) + ) { + mappedObject[ElementMappings[cleanFieldName]] = parentElementUploadResponse.get( + elementRecord[`${this.namespacePrefix}ParentElementId__c`] + ).id; + } + } + }); + + // Set the parent/child relationship + mappedObject['OmniProcessId'] = omniProcessId; + + // We need to fix the child references + const elementType = mappedObject[ElementMappings.Type__c]; + const propertySet = JSON.parse(mappedObject[ElementMappings.PropertySet__c] || '{}'); + switch (elementType) { + case 'OmniScript': + propertySet['Type'] = this.cleanName(propertySet['Type']); + propertySet['Sub Type'] = this.cleanName(propertySet['Sub Type']); + break; + case 'Integration Procedure Action': + const remoteOptions = propertySet['remoteOptions'] || {}; + remoteOptions['preTransformBundle'] = this.cleanName(remoteOptions['preTransformBundle']); + remoteOptions['postTransformBundle'] = this.cleanName(remoteOptions['postTransformBundle']); + propertySet['remoteOptions'] = remoteOptions; + + propertySet['preTransformBundle'] = this.cleanName(propertySet['preTransformBundle']); + propertySet['postTransformBundle'] = this.cleanName(propertySet['postTransformBundle']); + + // We can't update the IP references, we need to let the user know + const key: String = propertySet['integrationProcedureKey'] || ''; + if (key) { + const parts = key.split('_'); + const newKey = parts.map((p) => this.cleanName(p, true)).join('_'); + if (parts.length > 2) { + invalidIpReferences.set(mappedObject[ElementMappings.Name], key); + } + propertySet['integrationProcedureKey'] = newKey; + } + break; + case 'DataRaptor Turbo Action': + case 'DataRaptor Transform Action': + case 'DataRaptor Post Action': + case 'DataRaptor Extract Action': + propertySet['bundle'] = this.cleanName(propertySet['bundle']); + break; + } + + mappedObject[ElementMappings.PropertySet__c] = JSON.stringify(propertySet); + + // BATCH framework requires that each record has an "attributes" property + mappedObject['attributes'] = { + type: OmniScriptMigrationTool.OMNIPROCESSELEMENT_NAME, + referenceId: elementRecord['Id'], + }; + + return mappedObject; + } + + // Maps an individual Definition into an OmniProcessCompilation record + private mapOsDefinitionsData(osDefinition: AnyJson, omniProcessId: string) { + // Transformed object + const mappedObject = {}; + + // Get the fields of the record + const recordFields = Object.keys(osDefinition); + + // Map individual fields + recordFields.forEach((recordField) => { + const cleanFieldName = this.getCleanFieldName(recordField); + + if (OmniScriptDefinitionMappings.hasOwnProperty(cleanFieldName)) { + mappedObject[OmniScriptDefinitionMappings[cleanFieldName]] = osDefinition[recordField]; + } + }); + + // Set the parent/child relationship + mappedObject[OmniScriptDefinitionMappings.Name] = omniProcessId; + mappedObject[OmniScriptDefinitionMappings.OmniScriptId__c] = omniProcessId; + + let content = mappedObject[OmniScriptDefinitionMappings.Content__c]; + if (content) { + try { + content = JSON.parse(content); + if (content && content['sOmniScriptId']) { + content['sOmniScriptId'] = omniProcessId; + mappedObject[OmniScriptDefinitionMappings.Content__c] = JSON.stringify(content); + } + } catch (ex) { + // Log + } + } + + // BATCH framework requires that each record has an "attributes" property + mappedObject['attributes'] = { + type: OmniScriptMigrationTool.OMNIPROCESSCOMPILATION_NAME, + referenceId: osDefinition['Id'], + }; + + return mappedObject; + } + + private getOmniScriptFields(): string[] { + return Object.keys(OmniScriptMappings); + } + + private getElementFields(): string[] { + return Object.keys(ElementMappings); + } + + private getOmniScriptDefinitionFields(): string[] { + return Object.keys(OmniScriptDefinitionMappings); + } + + private sleep() { + return new Promise((resolve) => { + setTimeout(resolve, 5000); + }); + } } export enum OmniScriptExportType { - All, - OS, - IP -} \ No newline at end of file + All, + OS, + IP, +} diff --git a/src/utils/apex/parser/apexparser.ts b/src/utils/apex/parser/apexparser.ts new file mode 100644 index 00000000..c445effd --- /dev/null +++ b/src/utils/apex/parser/apexparser.ts @@ -0,0 +1,89 @@ +/* eslint-disable @typescript-eslint/no-unsafe-return */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +import { + ApexLexer, + CommonTokenStream, + ApexParser, + CaseInsensitiveInputStream, + ApexParserListener, + ClassDeclarationContext, + DotExpressionContext, + VariableDeclaratorContext, + CompilationUnitContext, +} from '@apexdevtools/apex-parser'; +import { CharStreams, Token } from 'antlr4ts'; +import { ParseTreeWalker } from 'antlr4ts/tree/ParseTreeWalker'; + +export class ApexASTParser { + private apexFileContent: string; + private implementsInterface: Map = new Map(); + // private callsMethods: Map; + private interfaceName: string; + private methodName: string; + // private className: string; + private astListener: ApexParserListener; + + public get implemementsInterface(): Map { + return this.implementsInterface; + } + + public constructor(apexFileContent: string, interfaceName: string, methodName: string) { + this.apexFileContent = apexFileContent; + this.interfaceName = interfaceName; + this.methodName = methodName; + this.astListener = this.createASTListener(); + } + + public parse(): CompilationUnitContext { + const lexer = new ApexLexer(new CaseInsensitiveInputStream(CharStreams.fromString(this.apexFileContent))); + const tokens = new CommonTokenStream(lexer); + const parser = new ApexParser(tokens); + const context = parser.compilationUnit(); + // parser.addParseListener(new interfaceVisitor() as ApexParserListener); + ParseTreeWalker.DEFAULT.walk(this.astListener, context); + return context; + } + + private createASTListener(): ApexParserListener { + class ApexMigrationListener implements ApexParserListener { + public constructor(private parser: ApexASTParser) {} + public enterClassDeclaration(ctx: ClassDeclarationContext): void { + const interfaceToBeSearched = this.parser.interfaceName; + if (!interfaceToBeSearched) return; + if (!ctx.typeList() || !ctx.typeList().typeRef()) return; + for (const typeRefContext of ctx.typeList().typeRef()) + for (const typeNameContext of typeRefContext.typeName()) { + if (!typeNameContext.id() || !typeNameContext.id().Identifier()) continue; + if (typeNameContext.id().Identifier().symbol.text === interfaceToBeSearched) { + this.parser.implementsInterface.set(interfaceToBeSearched, typeNameContext.id().Identifier().symbol); + } + } + } + + public enterDotExpression(ctx: DotExpressionContext): void { + // console.log('*********'); + // console.log(ctx.expression().start.text); + if (ctx.dotMethodCall() && this.parser.methodName) { + // console.log(ctx.dotMethodCall().anyId().Identifier().symbol.text); + // ctx.dotMethodCall().expressionList().expression(1).children[0].children[0].children[0]; + // console.log(ctx.dotMethodCall().expressionList().expression(1).children[0]); + } + // console.log('*********'); + } + + public enterVariableDeclarator(ctx: VariableDeclaratorContext): void { + if (ctx.id().Identifier().symbol.text === 'DRName') { + // console.log(ctx.expression()); + } + } + } + return new ApexMigrationListener(this); + } +} + +// const filePath = '/Users/abhinavkumar2/company/plugin-omnistudio-migration-tool/test/FormulaParserService.cls'; +// new ApexASTParser(filePath, 'callable', '').parse(filePath); + +// console.log(ast); diff --git a/src/utils/logger.ts b/src/utils/logger.ts new file mode 100644 index 00000000..2400b372 --- /dev/null +++ b/src/utils/logger.ts @@ -0,0 +1,20 @@ +import { UX } from '@salesforce/command'; +import { Logger as SfLogger } from '@salesforce/core'; + +export class Logger { + private static sfUX: UX; + private static sfLogger: SfLogger; + + public static initialiseLogger(ux: UX, logger: SfLogger): Logger { + Logger.sfUX = ux; + Logger.sfLogger = logger; + return Logger; + } + + public static get logger(): SfLogger { + return Logger.sfLogger; + } + public static get ux(): UX { + return Logger.sfUX; + } +} diff --git a/src/utils/lwcparser/htmlParser/HTMLParser.ts b/src/utils/lwcparser/htmlParser/HTMLParser.ts new file mode 100644 index 00000000..999eca5e --- /dev/null +++ b/src/utils/lwcparser/htmlParser/HTMLParser.ts @@ -0,0 +1,54 @@ +/* eslint-disable @typescript-eslint/explicit-member-accessibility */ +/* eslint-disable @typescript-eslint/restrict-template-expressions */ +/* eslint-disable @typescript-eslint/member-ordering */ +/* eslint-disable no-console */ +import * as fs from 'fs'; +import * as cheerio from 'cheerio'; + +class HTMLParser { + private parser: cheerio.CheerioAPI; + + // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility + constructor(htmlFilePath: string) { + // Load the HTML file and initialize cheerio + const html = this.loadHTMLFromFile(htmlFilePath); + this.parser = cheerio.load(html); + } + + // Method to load HTML from a file + private loadHTMLFromFile(filePath: string): string { + try { + return fs.readFileSync(filePath, 'utf8'); + } catch (error) { + console.error(`Error reading file from disk: ${error}`); + throw error; + } + } + + // Method to replace custom tags + public replaceCustomTag(oldTag: string, newTag: string): void { + this.parser(oldTag).each((_, element) => { + const newElement = this.parser(`<${newTag}>`).html(this.parser(element).html()); + this.parser(element).replaceWith(newElement); + }); + } + + // Method to save modified HTML back to a file + public saveToFile(outputFilePath: string): void { + try { + const modifiedHtml = this.parser.html(); + fs.writeFileSync(outputFilePath, modifiedHtml); + console.log(`Modified HTML saved to ${outputFilePath}`); + } catch (error) { + console.error(`Error writing file to disk: ${error}`); + throw error; + } + } + + // Optional: Method to get the modified HTML as a string + public getModifiedHTML(): string { + return this.parser.html(); + } +} + +export default HTMLParser; diff --git a/src/utils/lwcparser/input/test.html b/src/utils/lwcparser/input/test.html new file mode 100644 index 00000000..1ec58471 --- /dev/null +++ b/src/utils/lwcparser/input/test.html @@ -0,0 +1,14 @@ + + + + + + Replace Tags Example + + + + + diff --git a/src/utils/lwcparser/input/test.js b/src/utils/lwcparser/input/test.js new file mode 100644 index 00000000..d64cb17a --- /dev/null +++ b/src/utils/lwcparser/input/test.js @@ -0,0 +1,62 @@ +import { LightningElement, track, api } from 'lwc'; +import * as LABELS from './labels'; +import { cloneDeep } from 'runtime_omnistudio_common/lodash'; + +export default class TestInputJsFile extends LightningElement { + labels = LABELS; + @api set actionData(val) { + if (val) { + this.actionJson = cloneDeep(val); + } + } + get actionData() { + return this.actionJson; + } + + @api attrsToBeRemoved = []; + + @track actionJson = []; + @track filteredLogs = []; + @track actionSearchInput; + _displayFilteredLogs = false; + + toggle(event) { + const index = event.currentTarget.dataset.index; + this.actionJson[index].expanded = !this.actionJson[index].expanded; + } + + // Search + get actionLogs() { + const imports = "'import fs from 'fssss'"; + console.log(imports); + // Display filtered debug logs + if (Array.isArray(this.filteredLogs) && this._displayFilteredLogs) { + return this.filteredLogs; + } + + // Display entire debug logs + return this.actionJson; + } + + clearLogs() { + this._displayFilteredLogs = false; + this.actionSearchInput = ''; + this.actionJson = []; + } + + searchActionLogs(event) { + event.preventDefault(); + + if (event.target.value) { + this._displayFilteredLogs = true; + const valueToSearch = event.target.value.toLowerCase(); + this.filteredLogs = this.actionJson.filter((action) => { + return action.title && action.title.toLowerCase().includes(valueToSearch); + }); + } else { + // Clear filtered debug logs and set flag to display entire debug logs + this.filteredLogs = []; + this._displayFilteredLogs = false; + } + } +} diff --git a/src/utils/lwcparser/jsParser/JavaScriptParser.ts b/src/utils/lwcparser/jsParser/JavaScriptParser.ts new file mode 100644 index 00000000..bd7654c4 --- /dev/null +++ b/src/utils/lwcparser/jsParser/JavaScriptParser.ts @@ -0,0 +1,49 @@ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +/* eslint-disable no-console */ +/* eslint-disable @typescript-eslint/explicit-member-accessibility */ +// import * as fs from 'fs'; +// import { parse, type ParseResult } from '@babel/parser'; // Import all types from @babel/types + +class JavaScriptParser { + // private fileContent: string; + private ast: File | null = null; // Specify the generic type argument + + constructor(filePath: string) { + // this.fileContent = fs.readFileSync(filePath, 'utf-8'); + this.ast = null; + } + + // public parseCode(): void { + // const parseResult: File = parse(this.fileContent, { + // sourceType: 'module', // Use 'script' if you're parsing non-module code + // plugins: ['jsx', 'typescript'], // Add plugins as needed + // }); + + // if (parseResult.type === 'File') { + // this.ast = parseResult; + // } else { + // throw new Error("Parsing did not return a 'File' node as expected."); + // } + // } + + // Method to get the AST as a string + getAST(): string | null { + if (!this.ast) { + console.error('AST is not available. Please parse the code first.'); + return null; + } + return JSON.stringify(this.ast, null, 2); + } + + // Main method to process the file + processFile(): void { + // this.parseCode(); // Parse the JavaScript code + const astString = this.getAST(); // Get the AST as a string + if (astString) { + console.log(astString); // Output the AST + } + } +} + +export default JavaScriptParser; diff --git a/src/utils/lwcparser/output/test.html b/src/utils/lwcparser/output/test.html new file mode 100644 index 00000000..2cef6f3d --- /dev/null +++ b/src/utils/lwcparser/output/test.html @@ -0,0 +1,14 @@ + + + + + + Replace Tags Example + + + + + diff --git a/src/utils/lwcparser/xmlParser/XmlParser.ts b/src/utils/lwcparser/xmlParser/XmlParser.ts new file mode 100644 index 00000000..4f7883fb --- /dev/null +++ b/src/utils/lwcparser/xmlParser/XmlParser.ts @@ -0,0 +1,45 @@ +/* eslint-disable @typescript-eslint/no-inferrable-types */ +/* eslint-disable @typescript-eslint/no-unsafe-return */ +/* eslint-disable @typescript-eslint/member-ordering */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +/* eslint-disable @typescript-eslint/explicit-member-accessibility */ +import { DOMParser, XMLSerializer } from 'xmldom'; + +export class XmlParser { + private xmlDoc: Document | null = null; + + constructor(private xmlString: string) { + this.parseXml(); + } + + private parseXml(): void { + const parser = new DOMParser(); + this.xmlDoc = parser.parseFromString(this.xmlString, 'text/xml'); + } + + public removeNode(tagName: string, index: number = 0): void { + if (!this.xmlDoc) { + throw new Error('XML document has not been parsed.'); + } + + const nodes = this.xmlDoc.getElementsByTagName(tagName); + + if (nodes.length > index) { + const nodeToRemove = nodes[index]; + nodeToRemove.parentNode?.removeChild(nodeToRemove); + } else { + throw new Error(`No node found with tag name "${tagName}" at index ${index}.`); + } + } + + public getXmlString(): string { + if (!this.xmlDoc) { + throw new Error('XML document has not been parsed.'); + } + + const serializer = new XMLSerializer(); + return serializer.serializeToString(this.xmlDoc); + } +} diff --git a/src/utils/prototypes.ts b/src/utils/prototypes.ts index f580e1f0..f35d468c 100644 --- a/src/utils/prototypes.ts +++ b/src/utils/prototypes.ts @@ -1,19 +1,18 @@ /* eslint-disable */ -String.prototype.formatUnicorn = String.prototype.formatUnicorn || -function () { - "use strict"; +String.prototype.formatUnicorn = + String.prototype.formatUnicorn || + function () { + 'use strict'; var str = this.toString(); if (arguments.length) { - var t = typeof arguments[0]; - var key; - var args = ("string" === t || "number" === t) ? - Array.prototype.slice.call(arguments) - : arguments[0]; + var t = typeof arguments[0]; + var key; + var args = 'string' === t || 'number' === t ? Array.prototype.slice.call(arguments) : arguments[0]; - for (key in args) { - str = str.replace(new RegExp("\\{" + key + "\\}", "gi"), args[key]); - } + for (key in args) { + str = str.replace(new RegExp('\\{' + key + '\\}', 'gi'), args[key]); + } } return str; -}; \ No newline at end of file + }; diff --git a/src/utils/query/index.ts b/src/utils/query/index.ts index 40ee91c3..e769b9ff 100644 --- a/src/utils/query/index.ts +++ b/src/utils/query/index.ts @@ -3,179 +3,233 @@ import { AnyJson } from '@salesforce/ts-types'; /* eslint-disable */ export class QueryTools { + public static buildCustomObjectQuery(namespace: string, name: string, fields: string[], filters?: Map) { + const queryFields = this.buildCustomObjectFields(namespace, ['Id', ...fields]); - public static buildCustomObjectQuery(namespace: string, name: string, fields: string[], filters?: Map) { - const queryFields = this.buildCustomObjectFields(namespace, ['Id', ...fields]); + let query = 'SELECT ' + queryFields.join(', ') + ' FROM ' + namespace + '__' + name; - let query = 'SELECT ' + queryFields.join(', ') + ' FROM ' + namespace + '__' + name; + const andFilters = []; + if (filters && filters.size > 0) { + for (let filter of filters.keys()) { + andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); + } - const andFilters = []; - if (filters && filters.size > 0) { - for (let filter of filters.keys()) { - andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); - } - - query += ' WHERE ' + andFilters.join(' AND '); - } - - return query; + query += ' WHERE ' + andFilters.join(' AND '); } - public static buildCustomObjectFields(namespace: string, fields: string[]): string[] { - const queryFields = []; - fields.forEach(field => { - if (field.indexOf('__') > -1) { - queryFields.push(namespace + '__' + field); - } else { - queryFields.push(field); - } + return query; + } + + public static buildCustomObjectFields(namespace: string, fields: string[]): string[] { + const queryFields = []; + fields.forEach((field) => { + if (field.indexOf('__') > -1) { + queryFields.push(namespace + '__' + field); + } else { + queryFields.push(field); + } + }); + + return queryFields; + } + + public static async queryAll( + connection: Connection, + namespace: string, + objectName: string, + fields: string[] + ): Promise { + let allrecords = []; + + const query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields); + + // Execute the query + let results = await connection.query(query); + + if (results && results.totalSize > 0) { + allrecords = results.records; + + // Load more pages + while (results.nextRecordsUrl) { + results = await connection.queryMore(results.nextRecordsUrl); + results.records.forEach((row) => { + allrecords.push(row); }); - - return queryFields; + } } - public static async queryAll(connection: Connection, namespace: string, objectName: string, fields: string[]): Promise { - let allrecords = []; + return allrecords; + } - const query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields); + public static async queryWithFilter( + connection: Connection, + namespace: string, + objectName: string, + fields: string[], + filters?: Map + ): Promise { + let allrecords = []; - // Execute the query - let results = await connection.query(query); + const query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields, filters); - if (results && results.totalSize > 0) { - allrecords = results.records; + // Execute the query + let results = await connection.query(query); - // Load more pages - while (results.nextRecordsUrl) { - results = await connection.queryMore(results.nextRecordsUrl); - results.records.forEach(row => { - allrecords.push(row); - }) - } + if (results && results.totalSize > 0) { + allrecords = results.records; - } + // Load more pages + while (results.nextRecordsUrl) { + results = await connection.queryMore(results.nextRecordsUrl); + results.records.forEach((row) => { + allrecords.push(row); + }); + } + } - return allrecords; + return allrecords; + } + + public static async queryWithFilterAndSort( + connection: Connection, + namespace: string, + objectName: string, + fields: string[], + filters?: Map, + orderBy?: Array + ): Promise { + let allrecords = []; + + let query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields, filters); + if (orderBy && orderBy.length > 0) { + const sortings = []; + for (let ob of orderBy) { + sortings.push(ob.field + ' ' + ob.direction); + } + query += ' ORDER BY ' + sortings.join(', '); } - public static async queryWithFilter(connection: Connection, namespace: string, objectName: string, fields: string[], filters?: Map): Promise { - let allrecords = []; + // Execute the query + let results = await connection.query(query); - const query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields, filters); + if (results && results.totalSize > 0) { + allrecords = results.records; - // Execute the query - let results = await connection.query(query); + // Load more pages + while (results.nextRecordsUrl) { + results = await connection.queryMore(results.nextRecordsUrl); + results.records.forEach((row) => { + allrecords.push(row); + }); + } + } - if (results && results.totalSize > 0) { - allrecords = results.records; + return allrecords; + } + + public static async query( + connection: Connection, + objectName: string, + fields: string[], + filters?: Map, + orderBy?: Array + ) { + let query = 'SELECT ' + fields.join(', ') + ' FROM ' + objectName; + + const andFilters = []; + if (filters && filters.size > 0) { + for (let filter of filters.keys()) { + andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); + } + + query += ' WHERE ' + andFilters.join(' AND '); + } - // Load more pages - while (results.nextRecordsUrl) { - results = await connection.queryMore(results.nextRecordsUrl); - results.records.forEach(row => { - allrecords.push(row); - }) - } + if (orderBy && orderBy.length > 0) { + const sortings = []; + for (let ob of orderBy) { + sortings.push(ob.field + ' ' + ob.direction); + } + query += ' ORDER BY ' + sortings.join(', '); + } - } + // Execute the query + let results = await connection.query(query); - return allrecords; - } + let allrecords = []; + if (results && results.totalSize > 0) { + allrecords = results.records; - public static async query(connection: Connection, objectName: string, fields: string[], filters?: Map, orderBy?: Array) { - let query = 'SELECT ' + fields.join(', ') + ' FROM ' + objectName; - - const andFilters = []; - if (filters && filters.size > 0) { - for (let filter of filters.keys()) { - andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); - } - - query += ' WHERE ' + andFilters.join(' AND '); - } - - if (orderBy && orderBy.length > 0) { - const sortings = []; - for (let ob of orderBy) { - sortings.push(ob.field + ' ' + ob.direction); - } - query += ' ORDER BY ' + sortings.join(', '); - } - - // Execute the query - let results = await connection.query(query); - - let allrecords = []; - if (results && results.totalSize > 0) { - allrecords = results.records; - - // Load more pages - while (results.nextRecordsUrl) { - results = await connection.queryMore(results.nextRecordsUrl); - results.records.forEach(row => { - allrecords.push(row); - }); - } - } - - return allrecords; + // Load more pages + while (results.nextRecordsUrl) { + results = await connection.queryMore(results.nextRecordsUrl); + results.records.forEach((row) => { + allrecords.push(row); + }); + } } - public static async queryIds(connection: Connection, objectName: string, filters?: Map): Promise { - let allrecords = []; - const andFilters = []; - - let query = `SELECT ID FROM ${objectName}`; + return allrecords; + } - if (filters && filters.size > 0) { - for (let filter of filters.keys()) { - andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); - } + public static async queryIds( + connection: Connection, + objectName: string, + filters?: Map + ): Promise { + let allrecords = []; + const andFilters = []; - query += ' WHERE ' + andFilters.join(' AND '); - } + let query = `SELECT ID FROM ${objectName}`; - // Execute the query - let results = await connection.query(query); + if (filters && filters.size > 0) { + for (let filter of filters.keys()) { + andFilters.push(`${filter} = ${QueryTools.getFilterValue(filters.get(filter))}`); + } - if (results && results.totalSize > 0) { - allrecords = results.records; + query += ' WHERE ' + andFilters.join(' AND '); + } - // Load more pages - while (results.nextRecordsUrl) { - results = await connection.queryMore(results.nextRecordsUrl); - results.records.forEach(row => { - allrecords.push(row); - }) - } + // Execute the query + let results = await connection.query(query); - } + if (results && results.totalSize > 0) { + allrecords = results.records; - return allrecords.map(record => record['Id']); + // Load more pages + while (results.nextRecordsUrl) { + results = await connection.queryMore(results.nextRecordsUrl); + results.records.forEach((row) => { + allrecords.push(row); + }); + } } - private static getFilterValue(val: any): string { - switch (typeof val) { - case "bigint": - case "boolean": - case "number": - return `${val}`; - case "function": - return `'${val()}'`; - case "undefined": - return 'NULL'; - case "string": - default: - return `'${val}'`; - } + return allrecords.map((record) => record['Id']); + } + + private static getFilterValue(val: any): string { + switch (typeof val) { + case 'bigint': + case 'boolean': + case 'number': + return `${val}`; + case 'function': + return `'${val()}'`; + case 'undefined': + return 'NULL'; + case 'string': + default: + return `'${val}'`; } + } } export enum SortDirection { - ASC = 'asc', - DESC = 'desc' + ASC = 'asc', + DESC = 'desc', } export interface SortField { - field: string; - direction: SortDirection -} \ No newline at end of file + field: string; + direction: SortDirection; +} diff --git a/test/commands/omnistudio/migration/info.test.ts b/test/commands/omnistudio/migration/info.test.ts index 5230a90c..2607dcff 100644 --- a/test/commands/omnistudio/migration/info.test.ts +++ b/test/commands/omnistudio/migration/info.test.ts @@ -19,10 +19,8 @@ describe('omnistudio:migration:info', () => { return Promise.resolve({ records: [] }); }) .stdout() - .command(['omnistudio:migration:info', '--targetusername', 'test@org.com']) - .it('runs omnistudio:migration:info --targetusername test@org.com', (ctx) => { - expect(ctx.stdout).to.contain( - 'Hello world! This is org: Super Awesome Org and I will be around until Tue Mar 20 2018!' - ); + .command(['omnistudio:migration:info', '--targetusername', 'test@org.com', '--allversions']) + .it('runs omnistudio:migration:info --targetusername test@org.com --allversions', (ctx) => { + expect(ctx.stdout).to.contain('Hello world! This is org: Super Awesome Org'); }); }); diff --git a/test/utils/apex/parser/FormulaParserService.cls b/test/utils/apex/parser/FormulaParserService.cls new file mode 100644 index 00000000..64691102 --- /dev/null +++ b/test/utils/apex/parser/FormulaParserService.cls @@ -0,0 +1,49 @@ +/* + The service implements Callable to support calling + FormulaParser functions from Core/Java. + The allowed functions are listed in FormulaParser FUNCTIONS_FROM_JAVA. +*/ +global with sharing class FormulaParserService implements Callable +{ + /* global Object call(String action, Map args) + { + Map input = (Map) args.get('input'); + Map output = (Map) args.get('output'); + + String function = (String)input.get('function'); + if (function == null || String.isBlank(function)) + { + return null; + } + + List arguments = (input.get('arguments') != null && input.get('arguments') InstanceOf List) + ? (List)input.get('arguments') : new List(); + + if (action == 'evaluateFunctionFromJava') + { + Object res = FormulaParser.evaluateFunctionFromJava(function, arguments); + if (res != null) + { + output.put('result', res); + } + } + return null; + } + + global void evaluateFunctionFromJava(String function, List arguments) + { + Map < String, Object > testMap = new Map < String, Object > { 'BirthDate' => '1982-11-06' }; + DRProcessResult result = DRGlobal.process(testMap, 'DRTurboTemp2'); + //List < Object > resultMap = (List < Object >)((Map < String, Object >)result.toJson()).get('Contact'); + //System.assertEquals(Date.newInstance(1982, 11, 6), ((Map < String, Object >)resultMap[0]).get('Birthdate')); + }*/ + + global void justForTest(String kkdbk) { + /* Specify Data Mapper extract or transform to call */ + String DRName = 'DataMapperNewName'; + /* Populate the input JSON */ + Map myTransformData = new Map{'MyKey'=>'MyValue'}; + /* Call the Data Mapper */ + omnistudio.DRProcessResult result1 = omnistudio.DRGlobal.process(myTransformData, DRName); + } +} \ No newline at end of file diff --git a/test/utils/apex/parser/apexparser.test.ts b/test/utils/apex/parser/apexparser.test.ts new file mode 100644 index 00000000..8b8a8ef5 --- /dev/null +++ b/test/utils/apex/parser/apexparser.test.ts @@ -0,0 +1,33 @@ +import { expect } from '@salesforce/command/lib/test'; +import { ApexASTParser } from '../../../../src/utils/apex/parser/apexparser'; + +describe('ApexASTParser', () => { + it('should parse the Apex file and collect interface implementations, method calls, and class names', () => { + const apexFileContent = `global with sharing class FormulaParserService implements Callable{ + + global void justForTest(String kkdbk) { + /* Specify Data Mapper extract or transform to call */ + String DRName = 'DataMapperNewName'; + /* Populate the input JSON */ + Map myTransformData = new Map{'MyKey'=>'MyValue'}; + /* Call the Data Mapper */ + omnistudio.DRProcessResult result1 = omnistudio.DRGlobal.process(myTransformData, DRName); + } + }`; + const interfaceName = 'Callable'; + const methodName = 'yourMethod'; + + const apexParser = new ApexASTParser(apexFileContent, interfaceName, methodName); + apexParser.parse(); + const implementsInterface = apexParser.implemementsInterface; + // const callsMethods = apexParser.getCallsMethods(); + // const className = apexParser.getClassName(); + + // Add your assertions here based on the expected results + // implementsInterface.get(interfaceName); + expect(implementsInterface.get(interfaceName).charPositionInLine).to.be.equal(58); + expect(implementsInterface.get(interfaceName).line).to.be.equal(1); + // expect(callsMethods).to.not.be.empty; + // expect(className).to.equal('YourClass'); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 2f80e398..19519365 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,12 @@ { "extends": "@salesforce/dev-config/tsconfig", "compilerOptions": { + "lib": ["dom"], "outDir": "lib", "rootDir": "./src", - "esModuleInterop": true + "esModuleInterop": true, + "types": ["node"], + "skipLibCheck": true }, "include": ["./src/**/*.ts"] } diff --git a/yarn.lock b/yarn.lock index b33efc60..3bf435df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,14 @@ dependencies: "@jridgewell/trace-mapping" "^0.3.0" +"@apexdevtools/apex-parser@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@apexdevtools/apex-parser/-/apex-parser-4.1.0.tgz#f8e801a8e4a65ff0e1fb70629642cda76e60fed3" + integrity sha512-Bj9kmOXb/ArMhxVt/aliqq45StCxbAcy1W/liIGtWi5jgzJg0xH7our+hFtMlJ7TOoVZ8mjh6oiuPNaSoJbNZA== + dependencies: + antlr4ts "0.5.0-alpha.4" + node-dir "^0.1.17" + "@babel/code-frame@7.12.11", "@babel/code-frame@^7.0.0": version "7.12.11" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" @@ -23,6 +31,14 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/compat-data@^7.16.4": version "7.17.0" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz" @@ -67,6 +83,16 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== + dependencies: + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-compilation-targets@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz" @@ -84,28 +110,25 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz" - integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== - dependencies: - "@babel/helper-get-function-arity" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/types" "^7.16.7" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-hoist-variables@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz" - integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.22.5" "@babel/helper-module-imports@^7.16.7": version "7.16.7" @@ -142,11 +165,38 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz" @@ -170,11 +220,32 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.16.7", "@babel/parser@^7.17.3": version "7.17.3" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz" integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA== +"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== + +"@babel/parser@^7.25.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" + "@babel/runtime-corejs3@^7.12.5": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz#6f02c5536911f4b445946a2179554b95c8838635" @@ -199,19 +270,28 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.17.0", "@babel/traverse@^7.17.3": - version "7.17.3" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz" - integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw== +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.3" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.3" - "@babel/types" "^7.17.0" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.17.0", "@babel/traverse@^7.17.3": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" @@ -223,6 +303,24 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.20.7", "@babel/types@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@commitlint/cli@^12.1.4": version "12.1.4" resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-12.1.4.tgz" @@ -421,16 +519,40 @@ resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.5" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz" integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.11" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz" integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== +"@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -447,6 +569,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.20" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" + integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -469,16 +599,16 @@ fastq "^1.6.0" "@oclif/command@^1", "@oclif/command@^1.5.13", "@oclif/command@^1.8.1", "@oclif/command@^1.8.14", "@oclif/command@^1.8.15": - version "1.8.19" - resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.19.tgz#802c86d289bdf7a7419a600b57a71f34f04fc831" - integrity sha512-4fB3VB877Bbw2eewl7rp4UPV45GtPFUlk9xGtafl28mD95dGiYYXzU+pLgqMkrEdEfn4/py+3YnE3uYu+djfRA== + version "1.8.35" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.35.tgz#7023f48a6b058d33ccb578c28a1522fba192efd2" + integrity sha512-oILFTe3n6WjEbhXaSJd6FPsU4H97WxkC3Q0+Y63pfTXIZ424Fb9Hlg1CazscWcJqCrhuuUag6mItdgYo0kpinw== dependencies: "@oclif/config" "^1.18.2" "@oclif/errors" "^1.3.6" "@oclif/help" "^1.0.1" - "@oclif/parser" "^3.8.8" + "@oclif/parser" "^3.8.16" debug "^4.1.1" - semver "^7.3.8" + semver "^7.5.4" "@oclif/config@1.18.2": version "1.18.2" @@ -493,24 +623,24 @@ tslib "^2.0.0" "@oclif/config@^1", "@oclif/config@^1.18.2": - version "1.18.5" - resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.18.5.tgz#926cab40679e8f9190d1240a25bbcc0894b38d3f" - integrity sha512-R6dBedaUVn5jtAh79aaRm7jezx4l3V7Im9NORlLmudz5BL1foMeuXEvnqm+bMiejyexVA+oi9mto6YKZPzo/5Q== + version "1.18.17" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.18.17.tgz#00aa4049da27edca8f06fc106832d9f0f38786a5" + integrity sha512-k77qyeUvjU8qAJ3XK3fr/QVAqsZO8QOBuESnfeM5HHtPNLSyfVcwiMM2zveSW5xRdLSG3MfV8QnLVkuyCL2ENg== dependencies: "@oclif/errors" "^1.3.6" - "@oclif/parser" "^3.8.8" + "@oclif/parser" "^3.8.17" debug "^4.3.4" globby "^11.1.0" is-wsl "^2.1.1" - tslib "^2.3.1" + tslib "^2.6.1" -"@oclif/core@^1.18.0", "@oclif/core@^1.19.1", "@oclif/core@^1.20.0": - version "1.20.0" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.20.0.tgz#04a37b66cedeeb21630b91095466641bc499f706" - integrity sha512-yByf6w5JOFsbIeyYEF8rSbvN4uCI/7O9lGNg0kY0N+HH6edtpCtGHe6p/4+5yPNEmGL6P8IEKi+9s0Ys774mgw== +"@oclif/core@^1.18.0", "@oclif/core@^1.19.1": + version "1.23.1" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.23.1.tgz#bebbbc4e02a4c1a4216d64165f892037f8a1e14a" + integrity sha512-nz7wVGesJ1Qg74p1KNKluZpQ3Z042mqdaRlczEI4Xwqj5s9jjdDBCDHNkiGzV4UAKzicVzipNj6qqhyUWKYnaA== dependencies: "@oclif/linewrap" "^1.0.0" - "@oclif/screen" "^3.0.2" + "@oclif/screen" "^3.0.3" ansi-escapes "^4.3.2" ansi-styles "^4.3.0" cardinal "^2.1.1" @@ -534,10 +664,45 @@ strip-ansi "^6.0.1" supports-color "^8.1.1" supports-hyperlinks "^2.2.0" - tslib "^2.3.1" + tslib "^2.4.1" widest-line "^3.1.0" wrap-ansi "^7.0.0" +"@oclif/core@^2.8.5": + version "2.8.5" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.8.5.tgz#7964057bbee5e91dae8b35e030e767f38e50a19e" + integrity sha512-316DLfrHQDYmWDriI4Woxk9y1wVUrPN1sZdbQLHdOdlTA9v/twe7TdHpWOriEypfl6C85NWEJKc1870yuLtjrQ== + dependencies: + "@types/cli-progress" "^3.11.0" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.8" + fs-extra "^9.1.0" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + semver "^7.3.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + ts-node "^10.9.1" + tslib "^2.5.0" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + "@oclif/dev-cli@^1": version "1.26.10" resolved "https://registry.npmjs.org/@oclif/dev-cli/-/dev-cli-1.26.10.tgz" @@ -609,28 +774,28 @@ chalk "^4.1.0" tslib "^2.0.0" -"@oclif/parser@^3.8.0", "@oclif/parser@^3.8.8": - version "3.8.8" - resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.8.8.tgz#6c2309111ca06ed5262bb38e4ab4343656460e3b" - integrity sha512-OgqQAtpyq1XFJG3dvLl9aqiO+F5pubkzt7AivUDkNoa6/hNgVZ79vvTO8sqo5XAAhOm/fcTSerZ35OTnTJb1ng== +"@oclif/parser@^3.8.0", "@oclif/parser@^3.8.16", "@oclif/parser@^3.8.17": + version "3.8.17" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.8.17.tgz#e1ce0f29b22762d752d9da1c7abd57ad81c56188" + integrity sha512-l04iSd0xoh/16TGVpXb81Gg3z7tlQGrEup16BrVLsZBK6SEYpYHRJZnM32BwZrHI97ZSFfuSwVlzoo6HdsaK8A== dependencies: "@oclif/errors" "^1.3.6" "@oclif/linewrap" "^1.0.0" chalk "^4.1.0" - tslib "^2.3.1" + tslib "^2.6.2" -"@oclif/plugin-command-snapshot@^3.2.8": - version "3.2.8" - resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-3.2.8.tgz#f34fd6dbace0f270cf2cf1f22f7fe226972065c7" - integrity sha512-9/9Vw+ZHEEByqnv0EHPl68yvO8rTTuiIMCS/oZG+fVsGD48QrnxgAlDstcAzFwFavqx0tJJeo+Rhe2+Q3CoPGA== +"@oclif/plugin-command-snapshot@^3.3.15": + version "3.3.15" + resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-3.3.15.tgz#2b1f35b75d9bdd15d06386382bb5a53577bdf45a" + integrity sha512-DJ+R8Ega5tq3RTbI6TZ0gI29lEldcSf909VUfsP2zY1tPqkn8IKhs/bFLcS2OkjQgLl/1FpeejFoc4rY44YbRg== dependencies: - "@oclif/core" "^1.20.0" + "@oclif/core" "^2.8.5" chalk "^4.1.2" - just-diff "^5.1.1" + just-diff "^5.2.0" lodash "^4.17.21" - semver "^7.3.8" - ts-json-schema-generator "^1.1.2" - tslib "^2.4.1" + semver "^7.5.1" + ts-json-schema-generator "^1.2.0" + tslib "^2.5.0" "@oclif/plugin-help@3.2.18": version "3.2.18" @@ -685,10 +850,10 @@ resolved "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.4.tgz" integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw== -"@oclif/screen@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-3.0.2.tgz#969054308fe98d130c02844a45cc792199b75670" - integrity sha512-S/SF/XYJeevwIgHFmVDAFRUvM3m+OjhvCAYMk78ZJQCYCQ5wS7j+LTt1ZEv2jpEEGg2tx/F6TYYWxddNAYHrFQ== +"@oclif/screen@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-3.0.3.tgz#e679ad10535e31d333f809f7a71335cc9aef1e55" + integrity sha512-KX8gMYA9ujBPOd1HFsV9e0iEx7Uoj8AG/3YsW4TtWQTg4lJvr82qNm7o/cFQfYRIt+jw7Ew/4oL4A22zOT+IRA== "@oclif/test@^1", "@oclif/test@^1.2.4": version "1.2.9" @@ -875,6 +1040,11 @@ resolved "https://registry.npmjs.org/@salesforce/prettier-config/-/prettier-config-0.0.2.tgz" integrity sha512-KExM355BLbxCW6siGBV7oUOotXvvVp0tAWERgzUkM2FcMb9fWrjwXDrIHc8V0UdDlA3UXtFltDWgN+Yqi+BA/g== +"@salesforce/prettier-config@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@salesforce/prettier-config/-/prettier-config-0.0.3.tgz#ba648d4886bb38adabe073dbea0b3a91b3753bb0" + integrity sha512-hYOhoPTCSYMDYn+U1rlEk16PoBeAJPkrdg4/UtAzupM1mRRJOwEPMG1d7U8DxJFKuXW3DMEYWr2MwAIBDaHmFg== + "@salesforce/schemas@^1.0.1": version "1.1.0" resolved "https://registry.npmjs.org/@salesforce/schemas/-/schemas-1.1.0.tgz" @@ -886,20 +1056,27 @@ integrity sha512-XWohlOT2oQDqAJH00OXS3f2MGjkwZ6pr4emnnkHSQbg7UdGW0rvGpEnRKqBbDUfZ4K5YKSo9Gj216ZtaP3JLXg== "@salesforce/ts-sinon@^1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.1.tgz#4abafa0a5b895ea23287fc96d69952862f51875f" - integrity sha512-sXAB+IiOLZL8B3wBT6YviuuhfWp1N59QBLNUgzqslHIP4P38xsLECvC+Lvlhzs0rSv7xKNMdKZeaM6gpCHKoTg== + version "1.4.19" + resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.19.tgz#64157b6c8cf4a3c637867e2ddd90c2d058c334f7" + integrity sha512-vopxKrI6QD0OCtPlge1eGGHFWLkoDee7KaB/dpGeRwioeNfCVJ8ikELN0hv0zq9Ys6gUYWYcdpxzTP1upslCJA== dependencies: - "@salesforce/ts-types" "^1.7.0" + "@salesforce/ts-types" "^2.0.9" sinon "^5.1.1" - tslib "^2.2.0" + tslib "^2.6.1" -"@salesforce/ts-types@^1.5.20", "@salesforce/ts-types@^1.5.21", "@salesforce/ts-types@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-1.7.0.tgz#0ec743b324a0d39b13ac681132042742e9a43d0f" - integrity sha512-8bLGBZCk7T/tkfXP66r5Pkhn3CjfNQIOy6B0Z1rvam5RgqWtYYcubF7eSLSj7bop/q7tA8+R6bNJmjATX6hTqA== +"@salesforce/ts-types@^1.5.20", "@salesforce/ts-types@^1.5.21": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-1.7.3.tgz#89b79ff0aaa55fea9f2de0afa8e515be3e17d0d8" + integrity sha512-jpmekGqZ7tpHRJwf1rF0yBJ/IMC5mOrryNi4HZkKuNQn8RF97WpynmL8Om04mLTCESvCiif3y7NWfIcxtID2Gw== dependencies: - tslib "^2.2.0" + tslib "^2.5.0" + +"@salesforce/ts-types@^2.0.9": + version "2.0.9" + resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-2.0.9.tgz#66bff7b41720065d6b01631b6f6a3ccca02857c5" + integrity sha512-boUD9jw5vQpTCPCCmK/NFTWjSuuW+lsaxOynkyNXLW+zxOc4GDjhtKc4j0vWZJQvolpafbyS8ZLFHZJvs12gYA== + dependencies: + tslib "^2.6.2" "@sinonjs/commons@^1", "@sinonjs/commons@^1.3.0", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.3" @@ -980,11 +1157,25 @@ resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== +"@types/babel__traverse@^7.20.6": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" + integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + dependencies: + "@babel/types" "^7.20.7" + "@types/chai@*", "@types/chai@^4.2.11": version "4.3.0" resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz" integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== +"@types/cli-progress@^3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.0.tgz#ec79df99b26757c3d1c7170af8422e0fc95eef7e" + integrity sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg== + dependencies: + "@types/node" "*" + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz" @@ -1000,10 +1191,19 @@ dependencies: "@types/node" "*" -"@types/jsforce@^1.11.0", "@types/jsforce@^1.9.41": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@types/jsforce/-/jsforce-1.11.0.tgz#ae702453bf3c691dec543b85ff938a539506254d" - integrity sha512-8ofRXHaHk2tgmxbEusRlo+NTItEly+SA3F1c+HAglvJ8LQK7Wzkvxjh3F4C0/sIpxUsowwAEgysPKWVtsT446g== +"@types/jsdom@^21.1.7": + version "21.1.7" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-21.1.7.tgz#9edcb09e0b07ce876e7833922d3274149c898cfa" + integrity sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + +"@types/jsforce@^1.11.5", "@types/jsforce@^1.9.41": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@types/jsforce/-/jsforce-1.11.5.tgz#644d299d81309580607139480051c27c1ce8c4d9" + integrity sha512-68uPAse+nDBDnh421L9ngd7jn11hST+Gz2CJMz5l+M4UVD2fYJsgdZQReZf7bTZQsIUdnr0sAp71ihLxAusZZA== dependencies: "@types/node" ">=4.0" @@ -1022,10 +1222,10 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash.chunk@^4.2.6": - version "4.2.7" - resolved "https://registry.yarnpkg.com/@types/lodash.chunk/-/lodash.chunk-4.2.7.tgz#df52478072f0673d9fe8d3dd43af8f490d07a56a" - integrity sha512-//tmaWHiANgToom/YYYKKqiCtlNz11fwYtMUUbaemNSbWTI+2zHtYW5nt1PHNCRWHPAJHHhn4UVFD9LKUFvatA== +"@types/lodash.chunk@^4.2.9": + version "4.2.9" + resolved "https://registry.yarnpkg.com/@types/lodash.chunk/-/lodash.chunk-4.2.9.tgz#60da44c404dfa8b01b426034c1183e5eb9b09727" + integrity sha512-Z9VtFUSnmT0No/QymqfG9AGbfOA4O5qB/uyP89xeZBqDAsKsB4gQFTqt7d0pHjbsTwtQ4yZObQVHuKlSOhIJ5Q== dependencies: "@types/lodash" "*" @@ -1041,7 +1241,7 @@ resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz" integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== -"@types/minimatch@*", "@types/minimatch@^3.0.3": +"@types/minimatch@*": version "3.0.5" resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== @@ -1100,6 +1300,11 @@ dependencies: "@sinonjs/fake-timers" "^7.0.4" +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + "@typescript-eslint/eslint-plugin@^4.2.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" @@ -1217,6 +1422,13 @@ agent-base@6: dependencies: debug "4" +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" @@ -1306,6 +1518,11 @@ ansicolors@~0.3.2: resolved "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz" integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= +antlr4ts@0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + anymatch@~3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" @@ -1372,11 +1589,6 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-differ@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz" - integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz" @@ -1422,11 +1634,6 @@ arrify@^1.0.1: resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - asap@*, asap@~2.0.3: version "2.0.6" resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" @@ -1520,6 +1727,11 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -1650,9 +1862,9 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001312: - version "1.0.30001312" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz" - integrity sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ== + version "1.0.30001559" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz" + integrity sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA== capital-case@^1.0.4: version "1.0.4" @@ -1676,18 +1888,18 @@ caseless@~0.12.0: resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai@^4.2.0: - version "4.3.6" - resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz" - integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== +chai@^4.2.0, chai@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== dependencies: assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - loupe "^2.3.1" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.5" + type-detect "^4.0.8" chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" @@ -1737,10 +1949,41 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0.tgz#1ede4895a82f26e8af71009f961a9b8cb60d6a81" + integrity sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.1.0" + encoding-sniffer "^0.2.0" + htmlparser2 "^9.1.0" + parse5 "^7.1.2" + parse5-htmlparser2-tree-adapter "^7.0.0" + parse5-parser-stream "^7.1.2" + undici "^6.19.5" + whatwg-mimetype "^4.0.0" chokidar@3.5.1: version "3.5.1" @@ -1805,6 +2048,13 @@ cli-progress@^3.10.0: dependencies: string-width "^4.2.3" +cli-progress@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.12.0.tgz#807ee14b66bcc086258e444ad0f19e7d42577942" + integrity sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A== + dependencies: + string-width "^4.2.3" + cli-progress@^3.4.0: version "3.10.0" resolved "https://registry.npmjs.org/cli-progress/-/cli-progress-3.10.0.tgz" @@ -1947,7 +2197,7 @@ commander@^4.0.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^9.4.0: +commander@^9.4.1: version "9.4.1" resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== @@ -2119,6 +2369,29 @@ csprng@*: dependencies: sequin "*" +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +cssstyle@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-4.1.0.tgz#161faee382af1bafadb6d3867a92a19bcb4aea70" + integrity sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA== + dependencies: + rrweb-cssom "^0.7.1" + csv-parse@^4.10.1, csv-parse@^4.8.2: version "4.16.3" resolved "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz" @@ -2155,6 +2428,14 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-5.0.0.tgz#2f76906bce1824429ffecb6920f45a0b30f00dde" + integrity sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg== + dependencies: + whatwg-mimetype "^4.0.0" + whatwg-url "^14.0.0" + dateformat@^1.0.12: version "1.0.12" resolved "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz" @@ -2219,10 +2500,15 @@ decamelize@^4.0.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== +decimal.js@^10.4.3: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +deep-eql@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== dependencies: type-detect "^4.0.0" @@ -2296,6 +2582,36 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1, domutils@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -2333,7 +2649,7 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -ejs@^3.1.6: +ejs@^3.1.6, ejs@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" integrity sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ== @@ -2355,6 +2671,14 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +encoding-sniffer@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz#799569d66d443babe82af18c9f403498365ef1d5" + integrity sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg== + dependencies: + iconv-lite "^0.6.3" + whatwg-encoding "^3.1.1" + end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" @@ -2369,6 +2693,11 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" +entities@^4.2.0, entities@^4.4.0, entities@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" @@ -2449,15 +2778,20 @@ eslint-config-prettier@^6.11.0: get-stdin "^6.0.0" eslint-config-prettier@^8: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-config-salesforce-license@^0.1.6: version "0.1.6" resolved "https://registry.npmjs.org/eslint-config-salesforce-license/-/eslint-config-salesforce-license-0.1.6.tgz" integrity sha512-PH1nkm6MaouON4Ac4fgJh29oQiHlpU/G2xS45FAYeAWkh1up88j1UpjXt2ISNniQVvU4uqfVAOOaEb5X5hDqYw== +eslint-config-salesforce-license@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-salesforce-license/-/eslint-config-salesforce-license-0.2.0.tgz#323193f1aa15dd33fbf108d25fc1210afc11065e" + integrity sha512-DJdBvgj82Erum82YMe+YvG/o6ukna3UA++lRl0HSTldj0VlBl3Q8hzCp97nRXZHra6JH1I912yievZzklXDw6w== + eslint-config-salesforce-typescript@^0.2.7: version "0.2.8" resolved "https://registry.npmjs.org/eslint-config-salesforce-typescript/-/eslint-config-salesforce-typescript-0.2.8.tgz" @@ -2775,7 +3109,7 @@ execa@^0.10.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.0.0: +execa@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -3117,10 +3451,10 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-func-name@^2.0.0, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" @@ -3409,11 +3743,28 @@ hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" +html-encoding-sniffer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz#696df529a7cfd82446369dc5193e590a3735b448" + integrity sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ== + dependencies: + whatwg-encoding "^3.1.1" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +htmlparser2@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-9.1.0.tgz#cdb498d8a75a51f739b61d3f718136c369bc8c23" + integrity sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.1.0" + entities "^4.5.0" + http-call@^5.1.2: version "5.3.0" resolved "https://registry.npmjs.org/http-call/-/http-call-5.3.0.tgz" @@ -3431,6 +3782,14 @@ http-parser-js@>=0.5.1: resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz" integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== +http-proxy-agent@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" @@ -3448,6 +3807,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz" @@ -3474,6 +3841,13 @@ hyperlinker@^1.0.0: resolved "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz" integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== +iconv-lite@0.6.3, iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3491,10 +3865,10 @@ ignore@^4.0.6: resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0, ignore@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -3694,6 +4068,11 @@ is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -3910,6 +4289,33 @@ jsdoc-type-pratt-parser@^1.0.4: resolved "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.2.0.tgz" integrity sha512-4STjeF14jp4bqha44nKMY1OUI6d2/g6uclHWUCZ7B4DoLzaB5bmpTkQrpqU+vSVzMD0LsKAOskcnI3I3VfIpmg== +jsdom@^25.0.0: + version "25.0.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-25.0.0.tgz#d1612b4ddab85af56821b2f731e15faae135f4e1" + integrity sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ== + dependencies: + cssstyle "^4.0.1" + data-urls "^5.0.0" + decimal.js "^10.4.3" + form-data "^4.0.0" + html-encoding-sniffer "^4.0.0" + http-proxy-agent "^7.0.2" + https-proxy-agent "^7.0.5" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.12" + parse5 "^7.1.2" + rrweb-cssom "^0.7.1" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.4" + w3c-xmlserializer "^5.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^3.1.1" + whatwg-mimetype "^4.0.0" + whatwg-url "^14.0.0" + ws "^8.18.0" + xml-name-validator "^5.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" @@ -3998,20 +4404,13 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" -json5@^2.1.2: - version "2.2.0" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz" - integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== - dependencies: - minimist "^1.2.5" - -json5@^2.2.1: +json5@^2.1.2, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== @@ -4079,10 +4478,10 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -just-diff@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-5.1.1.tgz#8da6414342a5ed6d02ccd64f5586cbbed3146202" - integrity sha512-u8HXJ3HlNrTzY7zrYYKjNEfBlyjqhdBkoyTVdjtn7p02RJD5NvR8rIClzeGA7t+UYP1/7eAkWNLU0+P3QrEqKQ== +just-diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-5.2.0.tgz#60dca55891cf24cd4a094e33504660692348a241" + integrity sha512-6ufhP9SHjb7jibNFrNxyFZ6od3g+An6Ai9mhGRvcYe8UJlH0prseN64M+6ZBBUoKYHZsitDP42gAJ8+eVWr3lw== just-extend@^4.0.2: version "4.2.1" @@ -4331,10 +4730,10 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" -loupe@^2.3.1: - version "2.3.4" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz" - integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== +loupe@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== dependencies: get-func-name "^2.0.0" @@ -4457,9 +4856,9 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -4488,9 +4887,9 @@ minimist-options@4.1.0: kind-of "^6.0.3" minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== mkdirp-classic@^0.5.2: version "0.5.3" @@ -4545,7 +4944,7 @@ mock-stdin@^1.0.0: resolved "https://registry.npmjs.org/mock-stdin/-/mock-stdin-1.0.0.tgz" integrity sha512-tukRdb9Beu27t6dN+XztSRHq9J0B/CoAOySGzHfn8UTfmqipA5yNT/sDUEyYdAV3Hpka6Wx6kOMxuObdOex60Q== -mri@^1.1.5: +mri@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== @@ -4570,17 +4969,6 @@ multimap@^1.1.0: resolved "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz" integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== -multimatch@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz" - integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== - dependencies: - "@types/minimatch" "^3.0.3" - array-differ "^3.0.0" - array-union "^2.1.0" - arrify "^2.0.1" - minimatch "^3.0.4" - multistream@^2.0.5: version "2.1.1" resolved "https://registry.npmjs.org/multistream/-/multistream-2.1.1.tgz" @@ -4686,6 +5074,13 @@ nock@^13.0.0: lodash.set "^4.3.2" propagate "^2.0.0" +node-dir@^0.1.17: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== + dependencies: + minimatch "^3.0.2" + node-fetch@^2.6.1: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -4744,6 +5139,18 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +nwsapi@^2.2.12: + version "2.2.12" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" + integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== + nyc@^15.1.0: version "15.1.0" resolved "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz" @@ -4843,10 +5250,10 @@ open@^7.0.0: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.4.0: - version "8.4.0" - resolved "https://registry.npmjs.org/open/-/open-8.4.0.tgz" - integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== +open@^8.4.2: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== dependencies: define-lazy-prop "^2.0.0" is-docker "^2.1.1" @@ -4995,6 +5402,28 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5-parser-stream@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz#d7c20eadc37968d272e2c02660fff92dd27e60e1" + integrity sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow== + dependencies: + parse5 "^7.0.0" + +parse5@^7.0.0, parse5@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" @@ -5104,6 +5533,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-3.0.1.tgz#817033161def55ec9638567a2f3bbc876b3e7516" + integrity sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag== + pify@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" @@ -5171,22 +5605,23 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.0.5, prettier@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.0.5, prettier@^2.8.8: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-quick@^3.1.0: - version "3.1.3" - resolved "https://registry.npmjs.org/pretty-quick/-/pretty-quick-3.1.3.tgz" - integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA== +pretty-quick@^3.1.0, pretty-quick@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.3.1.tgz#cfde97fec77a8d201a0e0c9c71d9990e12587ee2" + integrity sha512-3b36UXfYQ+IXXqex6mCca89jC8u0mYLqFAN5eTQKoXO6oCQYcIVYZEB/5AlBHI7JPYygReM2Vv6Vom/Gln7fBg== dependencies: - chalk "^3.0.0" - execa "^4.0.0" + execa "^4.1.0" find-up "^4.1.0" - ignore "^5.1.4" - mri "^1.1.5" - multimatch "^4.0.0" + ignore "^5.3.0" + mri "^1.2.0" + picocolors "^1.0.0" + picomatch "^3.0.1" + tslib "^2.6.2" printj@~1.3.1: version "1.3.1" @@ -5240,6 +5675,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + q@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" @@ -5269,6 +5709,11 @@ qs@~6.5.2: resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" @@ -5490,6 +5935,11 @@ requireindex@~1.1.0: resolved "https://registry.npmjs.org/requireindex/-/requireindex-1.1.0.tgz" integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-from@5.0.0, resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" @@ -5550,6 +6000,11 @@ rimraf@~2.4.0: dependencies: glob "^6.0.1" +rrweb-cssom@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz#c73451a484b86dd7cfb1e0b2898df4b703183e4b" + integrity sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg== + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -5591,12 +6046,12 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -safe-stable-stringify@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.0.tgz#95fadb1bcf8057a1363e11052122f5da36a69215" - integrity sha512-eehKHKpab6E741ud7ZIMcXhKcP6TSIezPkNZhy5U8xC6+VvrRdUA2tMgxGxaGl4cz7c2Ew5+mg5+wNB16KQqrA== +safe-stable-stringify@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.1.tgz#34694bd8a30575b7f94792aa51527551bd733d61" + integrity sha512-dVHE6bMtS/bnL2mwualjc6IxEv1F+OCUpA46pKUj6F8uDbUM0jCCulPqRNPSnWwGNKx5etqMjZYdXtrm5KJZGA== -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -5611,6 +6066,13 @@ sax@>=0.6.0: resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz" @@ -5622,26 +6084,26 @@ semver-regex@^3.1.2: integrity sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA== "semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@7.3.5: version "7.3.5" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.1, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" @@ -6036,6 +6498,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + table@^6.0.9: version "6.8.0" resolved "https://registry.npmjs.org/table/-/table-6.8.0.tgz" @@ -6134,6 +6601,16 @@ tough-cookie@*: punycode "^2.1.1" universalify "^0.1.2" +tough-cookie@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" @@ -6142,6 +6619,13 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +tr46@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-5.0.0.tgz#3b46d583613ec7283020d79019f1335723801cec" + integrity sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g== + dependencies: + punycode "^2.3.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -6162,23 +6646,23 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-json-schema-generator@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.1.2.tgz#29a0c878733b6a1bb0346fce02b1ebb8b96effa3" - integrity sha512-XMnxvndJFJEYv3NBmW7Po5bGajKdK2qH8Q078eDy60srK9+nEvbT9nLCRKd2IV/RQ7a+oc5FNylvZWveqh7jeQ== +ts-json-schema-generator@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.2.0.tgz#5ccce26c7475ff60a034885bff6bd38e574fb073" + integrity sha512-tUMeO3ZvA12d3HHh7T/AK8W5hmUhDRNtqWRHSMN3ZRbUFt+UmV0oX8k1RK4SA+a+BKNHpmW2v06MS49e8Fi3Yg== dependencies: "@types/json-schema" "^7.0.11" - commander "^9.4.0" + commander "^9.4.1" glob "^8.0.3" json5 "^2.2.1" normalize-path "^3.0.0" - safe-stable-stringify "^2.4.0" - typescript "~4.8.3" + safe-stable-stringify "^2.4.1" + typescript "~4.9.3" -ts-node@^10.0.0: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== +ts-node@^10.0.0, ts-node@^10.9.1, ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -6219,10 +6703,10 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2, tslib@^2.0.0, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.3.1, tslib@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tslib@^2, tslib@^2.0.0, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.4.1, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: version "3.21.0" @@ -6250,7 +6734,7 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: +type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -6318,10 +6802,10 @@ typedoc@0.18.0: shelljs "^0.8.4" typedoc-default-themes "^0.10.2" -typescript@^4.1.3, typescript@^4.8.4, typescript@~4.8.3: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== +typescript@^4.1.3, typescript@^4.9.5, typescript@~4.9.3: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== uglify-js@^3.1.4: version "3.15.1" @@ -6338,11 +6822,21 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +undici@^6.19.5: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici/-/undici-6.19.8.tgz#002d7c8a28f8cc3a44ff33c3d4be4d85e15d40e1" + integrity sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g== + universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" @@ -6369,6 +6863,14 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" @@ -6406,11 +6908,23 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +w3c-xmlserializer@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz#f925ba26855158594d907313cedd1476c5967f6c" + integrity sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA== + dependencies: + xml-name-validator "^5.0.0" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + websocket-driver@>=0.5.1: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" @@ -6425,6 +6939,26 @@ websocket-extensions@>=0.1.1: resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== +whatwg-encoding@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz#d0f4ef769905d426e1688f3e34381a99b60b76e5" + integrity sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz#bc1bf94a985dc50388d54a9258ac405c3ca2fc0a" + integrity sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg== + +whatwg-url@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-14.0.0.tgz#00baaa7fd198744910c4b1ef68378f2200e4ceb6" + integrity sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw== + dependencies: + tr46 "^5.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -6490,9 +7024,9 @@ widest-line@^3.1.0: string-width "^4.0.0" word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + version "1.2.4" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" + integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== wordwrap@^1.0.0: version "1.0.0" @@ -6558,6 +7092,16 @@ write-json-file@^4.1.1: sort-keys "^4.0.0" write-file-atomic "^3.0.0" +ws@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +xml-name-validator@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-5.0.0.tgz#82be9b957f7afdacf961e5980f1bf227c0bf7673" + integrity sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg== + xml2js@^0.4.16, xml2js@^0.4.22: version "0.4.23" resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz" @@ -6571,11 +7115,21 @@ xmlbuilder@~11.0.0: resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + xmlcreate@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz" integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== +xmldom@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.6.0.tgz#43a96ecb8beece991cef382c08397d82d4d0c46f" + integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg== + xunit-file@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/xunit-file/-/xunit-file-1.0.0.tgz"