diff --git a/package-lock.json b/package-lock.json index 4f83954e5b..c9d229dba5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,8 @@ "@koa/router": "^12.0.0", "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", - "@rudderstack/integrations-lib": "^0.1.8", + "@rudderstack/integrations-lib": "^0.1.9", + "@rudderstack/integrations-store": "^0.1.1", "@rudderstack/workflow-engine": "^0.6.9", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", @@ -35,6 +36,7 @@ "handlebars": "^4.7.7", "http-graceful-shutdown": "^3.1.13", "https-proxy-agent": "^5.0.1", + "i": "^0.3.7", "ioredis": "^5.3.2", "is": "^3.3.0", "is-ip": "^3.1.0", @@ -54,6 +56,7 @@ "moment-timezone": "^0.5.43", "node-cache": "^5.1.2", "node-fetch": "^2.6.12", + "npm": "^10.2.4", "oauth-1.0a": "^2.2.6", "object-hash": "^3.0.0", "parse-static-imports": "^1.1.0", @@ -5940,7 +5943,6 @@ }, "node_modules/@isaacs/cliui": { "version": "8.0.2", - "dev": true, "license": "ISC", "dependencies": { "string-width": "^5.1.2", @@ -5956,7 +5958,6 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5967,7 +5968,6 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5978,7 +5978,6 @@ }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "dev": true, "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", @@ -5994,7 +5993,6 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -6008,7 +6006,6 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", @@ -6558,7 +6555,6 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -6639,9 +6635,9 @@ } }, "node_modules/@rudderstack/integrations-lib": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@rudderstack/integrations-lib/-/integrations-lib-0.1.8.tgz", - "integrity": "sha512-f8GX78RFma3XAWPNEI6QjGk4avbE8r9aspHNaYE+YyRKsJGWrl8gw/k+Jso36C0juOGas79GWPSiypbXLu8Q/g==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@rudderstack/integrations-lib/-/integrations-lib-0.1.9.tgz", + "integrity": "sha512-ROi/LfI7PXqKDrjSig+1Rf2TQ8MgxJGJ7sAD1B0PmRKELQpxK6PLt8QF+vKXl8wYILQu2gwTkZ5o+uwmNKxGzg==", "dependencies": { "@rudderstack/workflow-engine": "^0.5.7", "axios": "^1.4.0", @@ -6705,6 +6701,58 @@ "object-sizeof": "^2.6.3" } }, + "node_modules/@rudderstack/integrations-store": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@rudderstack/integrations-store/-/integrations-store-0.1.1.tgz", + "integrity": "sha512-nCm7TZ6pa7gWywTeNElGxccdZRof7JYWeIVPGLqtxRisVKUOC6AXDX7XT/cNQyNyxjrmPMMQQYWR0y0BgTe+5Q==", + "dependencies": { + "@rudderstack/integrations-lib": "^0.1.9", + "@rudderstack/workflow-engine": "^0.5.4" + } + }, + "node_modules/@rudderstack/integrations-store/node_modules/@aws-crypto/sha256-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz", + "integrity": "sha512-MHGJyjE7TX9aaqXj7zk2ppnFUOhaDs5sP+HtNS0evOxn72c+5njUmyJmpGd7TfyoDznZlHMmdo/xGUdu2NIjNQ==", + "dependencies": { + "@aws-crypto/util": "^4.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@rudderstack/integrations-store/node_modules/@aws-crypto/util": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-4.0.0.tgz", + "integrity": "sha512-2EnmPy2gsFZ6m8bwUQN4jq+IyXV3quHAcwPOS6ZA3k+geujiqI8aRokO2kFJe+idJ/P3v4qWI186rVMo0+zLDQ==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@rudderstack/integrations-store/node_modules/@rudderstack/json-template-engine": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.5.5.tgz", + "integrity": "sha512-p3HdTqgZiJjjZmjaHN2paa1e87ifGE5UjkA4zdvge4bBzJbKKMQNWqRg6I96SwoA+hsxNkW/f9R83SPLU9t7LA==" + }, + "node_modules/@rudderstack/integrations-store/node_modules/@rudderstack/workflow-engine": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@rudderstack/workflow-engine/-/workflow-engine-0.5.8.tgz", + "integrity": "sha512-H1aCowYqTnOoqJtL9cGDhdhoGNl+KzqmVbSjFmE7n75onZaIMs87+HQyW08jYxS9l1Uo4TL8SAvzFICqFqkBbw==", + "dependencies": { + "@aws-crypto/sha256-js": "^4.0.0", + "@rudderstack/json-template-engine": "^0.5.5", + "js-yaml": "^4.1.0", + "jsonata": "^2.0.3", + "lodash": "^4.17.21", + "object-sizeof": "^2.6.3" + } + }, + "node_modules/@rudderstack/integrations-store/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@rudderstack/json-template-engine": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.8.2.tgz", @@ -7980,7 +8028,6 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", - "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", @@ -8073,7 +8120,6 @@ }, "node_modules/ansi-styles": { "version": "4.3.0", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -8764,7 +8810,6 @@ }, "node_modules/chalk": { "version": "4.1.2", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -8814,7 +8859,6 @@ }, "node_modules/ci-info": { "version": "3.7.1", - "dev": true, "funding": [ { "type": "github", @@ -8844,7 +8888,6 @@ }, "node_modules/clean-stack": { "version": "2.2.0", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -9015,7 +9058,6 @@ }, "node_modules/color-convert": { "version": "2.0.1", - "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -10694,7 +10736,6 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -11484,7 +11525,6 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "dev": true, "license": "MIT" }, "node_modules/ee-first": { @@ -11509,7 +11549,6 @@ }, "node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, "license": "MIT" }, "node_modules/empty-dir": { @@ -12551,7 +12590,6 @@ }, "node_modules/foreground-child": { "version": "3.1.1", - "dev": true, "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", @@ -12566,7 +12604,6 @@ }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", - "dev": true, "license": "ISC", "engines": { "node": ">=14" @@ -12970,7 +13007,6 @@ }, "node_modules/glob": { "version": "10.3.3", - "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -13002,7 +13038,6 @@ }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -13010,7 +13045,6 @@ }, "node_modules/glob/node_modules/minimatch": { "version": "9.0.3", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -13200,7 +13234,6 @@ }, "node_modules/graceful-fs": { "version": "4.2.10", - "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -13261,7 +13294,6 @@ }, "node_modules/has-flag": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13381,7 +13413,6 @@ }, "node_modules/hosted-git-info": { "version": "4.1.0", - "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -13392,7 +13423,6 @@ }, "node_modules/hosted-git-info/node_modules/lru-cache": { "version": "6.0.0", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -13403,7 +13433,6 @@ }, "node_modules/hosted-git-info/node_modules/yallist": { "version": "4.0.0", - "dev": true, "license": "ISC" }, "node_modules/html-escaper": { @@ -13528,6 +13557,14 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/i": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz", + "integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "license": "MIT", @@ -13615,7 +13652,6 @@ }, "node_modules/indent-string": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13647,7 +13683,6 @@ }, "node_modules/ini": { "version": "1.3.8", - "dev": true, "license": "ISC" }, "node_modules/inquirer": { @@ -14187,7 +14222,6 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, "license": "ISC" }, "node_modules/isobject": { @@ -14288,7 +14322,6 @@ }, "node_modules/jackspeak": { "version": "2.2.2", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -15943,7 +15976,6 @@ }, "node_modules/minipass": { "version": "7.0.2", - "dev": true, "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" @@ -16448,7 +16480,6 @@ }, "node_modules/normalize-package-data": { "version": "3.0.3", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^4.0.1", @@ -16481,6 +16512,164 @@ "node": ">=4" } }, + "node_modules/npm": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.4.tgz", + "integrity": "sha512-umEuYneVEYO9KoEEI8n2sSGmNQeqco/3BSeacRlqIkCzw4E7XGtYSWMeJobxzr6hZ2n9cM+u5TsMTcC5bAgoWA==", + "bundleDependencies": [ + "@isaacs/string-locale-compare", + "@npmcli/arborist", + "@npmcli/config", + "@npmcli/fs", + "@npmcli/map-workspaces", + "@npmcli/package-json", + "@npmcli/promise-spawn", + "@npmcli/run-script", + "@sigstore/tuf", + "abbrev", + "archy", + "cacache", + "chalk", + "ci-info", + "cli-columns", + "cli-table3", + "columnify", + "fastest-levenshtein", + "fs-minipass", + "glob", + "graceful-fs", + "hosted-git-info", + "ini", + "init-package-json", + "is-cidr", + "json-parse-even-better-errors", + "libnpmaccess", + "libnpmdiff", + "libnpmexec", + "libnpmfund", + "libnpmhook", + "libnpmorg", + "libnpmpack", + "libnpmpublish", + "libnpmsearch", + "libnpmteam", + "libnpmversion", + "make-fetch-happen", + "minimatch", + "minipass", + "minipass-pipeline", + "ms", + "node-gyp", + "nopt", + "normalize-package-data", + "npm-audit-report", + "npm-install-checks", + "npm-package-arg", + "npm-pick-manifest", + "npm-profile", + "npm-registry-fetch", + "npm-user-validate", + "npmlog", + "p-map", + "pacote", + "parse-conflict-json", + "proc-log", + "qrcode-terminal", + "read", + "semver", + "spdx-expression-parse", + "ssri", + "strip-ansi", + "supports-color", + "tar", + "text-table", + "tiny-relative-date", + "treeverse", + "validate-npm-package-name", + "which", + "write-file-atomic" + ], + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^7.2.1", + "@npmcli/config": "^8.0.2", + "@npmcli/fs": "^3.1.0", + "@npmcli/map-workspaces": "^3.0.4", + "@npmcli/package-json": "^5.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^7.0.2", + "@sigstore/tuf": "^2.2.0", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^18.0.0", + "chalk": "^5.3.0", + "ci-info": "^4.0.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^3.0.3", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "hosted-git-info": "^7.0.1", + "ini": "^4.1.1", + "init-package-json": "^6.0.0", + "is-cidr": "^5.0.3", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^8.0.1", + "libnpmdiff": "^6.0.3", + "libnpmexec": "^7.0.4", + "libnpmfund": "^5.0.1", + "libnpmhook": "^10.0.0", + "libnpmorg": "^6.0.1", + "libnpmpack": "^6.0.3", + "libnpmpublish": "^9.0.2", + "libnpmsearch": "^7.0.0", + "libnpmteam": "^6.0.0", + "libnpmversion": "^5.0.1", + "make-fetch-happen": "^13.0.0", + "minimatch": "^9.0.3", + "minipass": "^7.0.4", + "minipass-pipeline": "^1.2.4", + "ms": "^2.1.2", + "node-gyp": "^10.0.1", + "nopt": "^7.2.0", + "normalize-package-data": "^6.0.0", + "npm-audit-report": "^5.0.0", + "npm-install-checks": "^6.3.0", + "npm-package-arg": "^11.0.1", + "npm-pick-manifest": "^9.0.0", + "npm-profile": "^9.0.0", + "npm-registry-fetch": "^16.1.0", + "npm-user-validate": "^2.0.0", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^17.0.4", + "parse-conflict-json": "^3.0.1", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "^2.1.0", + "semver": "^7.5.4", + "spdx-expression-parse": "^3.0.1", + "ssri": "^10.0.5", + "strip-ansi": "^7.1.0", + "supports-color": "^9.4.0", + "tar": "^6.2.0", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^4.0.0", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "npm": "bin/npm-cli.js", + "npx": "bin/npx-cli.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "dev": true, @@ -16492,158 +16681,2745 @@ "node": ">=8" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" + "node_modules/npm/node_modules/@colors/colors": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "dev": true, - "license": "MIT", + "node_modules/npm/node_modules/@isaacs/cliui": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/oauth-1.0a": { - "version": "2.2.6", + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, "license": "MIT" }, - "node_modules/object-assign": { - "version": "4.1.1", + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" }, - "node_modules/object-inspect": { - "version": "1.12.2", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node_modules/npm/node_modules/@npmcli/agent": { + "version": "2.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/arborist": { + "version": "7.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.2", + "@npmcli/map-workspaces": "^3.0.2", + "@npmcli/metavuln-calculator": "^7.0.0", + "@npmcli/name-from-folder": "^2.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^5.0.0", + "@npmcli/query": "^3.0.1", + "@npmcli/run-script": "^7.0.2", + "bin-links": "^4.0.1", + "cacache": "^18.0.0", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^7.0.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^9.0.0", + "nopt": "^7.0.0", + "npm-install-checks": "^6.2.0", + "npm-package-arg": "^11.0.1", + "npm-pick-manifest": "^9.0.0", + "npm-registry-fetch": "^16.0.0", + "npmlog": "^7.0.1", + "pacote": "^17.0.4", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.2", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.7", + "ssri": "^10.0.5", + "treeverse": "^3.0.0", + "walk-up-path": "^3.0.1" + }, + "bin": { + "arborist": "bin/index.js" + }, "engines": { - "node": ">= 0.4" + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/object-sizeof": { - "version": "2.6.3", - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/config": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", "dependencies": { - "buffer": "^6.0.3" + "@npmcli/map-workspaces": "^3.0.2", + "ci-info": "^4.0.0", + "ini": "^4.1.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.5", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/object-sizeof/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/disparity-colors": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ansi-styles": "^4.3.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/object.assign": { - "version": "4.1.4", - "dev": true, + "node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/object.entries": { - "version": "1.1.6", - "dev": true, - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/fs": { + "version": "3.1.0", + "inBundle": true, + "license": "ISC", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "semver": "^7.3.5" }, "engines": { - "node": ">= 0.4" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/object.values": { - "version": "1.1.6", - "dev": true, - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/git": { + "version": "5.0.3", + "inBundle": true, + "license": "ISC", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "@npmcli/promise-spawn": "^7.0.0", + "lru-cache": "^10.0.1", + "npm-pick-manifest": "^9.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^4.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/installed-package-contents": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", "dependencies": { - "ee-first": "1.1.1" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" }, "engines": { - "node": ">= 0.8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/once": { - "version": "1.4.0", + "node_modules/npm/node_modules/@npmcli/map-workspaces": { + "version": "3.0.4", + "inBundle": true, "license": "ISC", "dependencies": { - "wrappy": "1" + "@npmcli/name-from-folder": "^2.0.0", + "glob": "^10.2.2", + "minimatch": "^9.0.0", + "read-package-json-fast": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/one-time": { - "version": "1.0.0", - "license": "MIT", + "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", "dependencies": { - "fn.name": "1.x.x" + "cacache": "^18.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^17.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/onetime": { - "version": "5.1.2", + "node_modules/npm/node_modules/@npmcli/name-from-folder": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/package-json": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^5.0.0", + "glob": "^10.2.2", + "hosted-git-info": "^7.0.0", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/promise-spawn": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/query": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/run-script": { + "version": "7.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "node-gyp": "^10.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/@sigstore/bundle": { + "version": "2.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/protobuf-specs": { + "version": "0.2.1", + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/sign": { + "version": "2.2.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^2.1.0", + "@sigstore/protobuf-specs": "^0.2.1", + "make-fetch-happen": "^13.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/tuf": { + "version": "2.2.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.1", + "tuf-js": "^2.1.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tufjs/models": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/abbrev": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/abort-controller": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/npm/node_modules/agent-base": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/aggregate-error": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-regex": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/npm/node_modules/ansi-styles": { + "version": "6.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/aproba": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/archy": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/are-we-there-yet": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/bin-links": { + "version": "4.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/binary-extensions": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/npm/node_modules/builtins": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/npm/node_modules/cacache": { + "version": "18.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/chalk": { + "version": "5.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/npm/node_modules/chownr": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ci-info": { + "version": "4.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cidr-regex": { + "version": "4.0.3", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "ip-regex": "^5.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/clean-stack": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/cli-columns": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cli-table3": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/npm/node_modules/clone": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/cmd-shim": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/npm/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/color-support": { + "version": "1.1.3", + "inBundle": true, + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/npm/node_modules/columnify": { + "version": "1.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/npm/node_modules/columnify/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/columnify/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/common-ancestor-path": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/console-control-strings": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/cross-spawn": { + "version": "7.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cssesc": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/debug": { + "version": "4.3.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/defaults": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/delegates": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/diff": { + "version": "5.1.0", + "inBundle": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/npm/node_modules/eastasianwidth": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/encoding": { + "version": "0.1.13", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/npm/node_modules/env-paths": { + "version": "2.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/err-code": { + "version": "2.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/event-target-shim": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/events": { + "version": "3.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/npm/node_modules/exponential-backoff": { + "version": "3.1.1", + "inBundle": true, + "license": "Apache-2.0" + }, + "node_modules/npm/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/npm/node_modules/foreground-child": { + "version": "3.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/fs-minipass": { + "version": "3.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/function-bind": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/gauge": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^4.0.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/gauge/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/gauge/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/glob": { + "version": "10.3.10", + "inBundle": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/graceful-fs": { + "version": "4.2.11", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/has-unicode": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/hasown": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/npm/node_modules/hosted-git-info": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.1", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/http-proxy-agent": { + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/https-proxy-agent": { + "version": "7.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/iconv-lite": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/npm/node_modules/ignore-walk": { + "version": "6.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/imurmurhash": { + "version": "0.1.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/npm/node_modules/indent-string": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ini": { + "version": "4.1.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/init-package-json": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^11.0.0", + "promzard": "^1.0.0", + "read": "^2.0.0", + "read-package-json": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/ip": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/ip-regex": { + "version": "5.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/is-cidr": { + "version": "5.0.3", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "4.0.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/is-core-module": { + "version": "2.13.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-lambda": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/jackspeak": { + "version": "2.3.6", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/npm/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/json-stringify-nice": { + "version": "1.1.4", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/jsonparse": { + "version": "1.3.1", + "engines": [ + "node >= 0.2.0" + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff-apply": { + "version": "5.5.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/libnpmaccess": { + "version": "8.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^11.0.1", + "npm-registry-fetch": "^16.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmdiff": { + "version": "6.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^7.2.1", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.2", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^9.0.0", + "npm-package-arg": "^11.0.1", + "pacote": "^17.0.4", + "tar": "^6.2.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmexec": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^7.2.1", + "@npmcli/run-script": "^7.0.2", + "ci-info": "^4.0.0", + "npm-package-arg": "^11.0.1", + "npmlog": "^7.0.1", + "pacote": "^17.0.4", + "proc-log": "^3.0.0", + "read": "^2.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.7", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmfund": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^7.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmhook": { + "version": "10.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^16.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmorg": { + "version": "6.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^16.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpack": { + "version": "6.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^7.2.1", + "@npmcli/run-script": "^7.0.2", + "npm-package-arg": "^11.0.1", + "pacote": "^17.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpublish": { + "version": "9.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ci-info": "^4.0.0", + "normalize-package-data": "^6.0.0", + "npm-package-arg": "^11.0.1", + "npm-registry-fetch": "^16.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7", + "sigstore": "^2.1.0", + "ssri": "^10.0.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmsearch": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^16.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmteam": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^16.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmversion": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^5.0.3", + "@npmcli/run-script": "^7.0.2", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/lru-cache": { + "version": "10.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/npm/node_modules/make-fetch-happen": { + "version": "13.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/minimatch": { + "version": "9.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/minipass": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/npm/node_modules/minipass-collect": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-fetch": { + "version": "3.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/minipass-flush": { + "version": "1.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-json-stream": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline": { + "version": "1.2.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized": { + "version": "1.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minizlib": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/mkdirp": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ms": { + "version": "2.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/mute-stream": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/negotiator": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/node-gyp": { + "version": "10.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "7.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/normalize-package-data": { + "version": "6.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^7.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-audit-report": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-bundled": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-install-checks": { + "version": "6.3.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-package-arg": { + "version": "11.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-packlist": { + "version": "8.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-pick-manifest": { + "version": "9.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^11.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-profile": { + "version": "9.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^16.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch": { + "version": "16.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-user-validate": { + "version": "2.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npmlog": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/p-map": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/pacote": { + "version": "17.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^5.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^7.0.0", + "cacache": "^18.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^11.0.0", + "npm-packlist": "^8.0.0", + "npm-pick-manifest": "^9.0.0", + "npm-registry-fetch": "^16.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^7.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^2.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/parse-conflict-json": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^6.0.0", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/path-key": { + "version": "3.1.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/path-scurry": { + "version": "1.10.1", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/postcss-selector-parser": { + "version": "6.0.13", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/proc-log": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/process": { + "version": "0.11.10", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/npm/node_modules/promise-all-reject-late": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-call-limit": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-inflight": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/promise-retry": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/promzard": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "read": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/qrcode-terminal": { + "version": "0.12.0", + "inBundle": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, + "node_modules/npm/node_modules/read": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-cmd-shim": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json-fast": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/readable-stream": { + "version": "4.4.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/retry": { + "version": "0.12.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/safer-buffer": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/npm/node_modules/semver": { + "version": "7.5.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/set-blocking": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/shebang-command": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/shebang-regex": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/signal-exit": { + "version": "4.1.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/sigstore": { + "version": "2.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^2.1.0", + "@sigstore/protobuf-specs": "^0.2.1", + "@sigstore/sign": "^2.1.0", + "@sigstore/tuf": "^2.1.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/smart-buffer": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks": { + "version": "2.7.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks-proxy-agent": { + "version": "8.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/spdx-correct": { + "version": "3.2.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-exceptions": { + "version": "2.3.0", + "inBundle": true, + "license": "CC-BY-3.0" + }, + "node_modules/npm/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-license-ids": { + "version": "3.0.16", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/npm/node_modules/ssri": { + "version": "10.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/npm/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/supports-color": { + "version": "9.4.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/npm/node_modules/tar": { + "version": "6.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/text-table": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tiny-relative-date": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/treeverse": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/tuf-js": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/models": "2.0.0", + "debug": "^4.3.4", + "make-fetch-happen": "^13.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-filename": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-slug": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/validate-npm-package-license": { + "version": "3.0.4", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/walk-up-path": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/wcwidth": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/npm/node_modules/which": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/which/node_modules/isexe": { + "version": "3.1.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/npm/node_modules/wide-align": { + "version": "1.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/npm/node_modules/wrap-ansi": { + "version": "8.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/write-file-atomic": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/yallist": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npmlog": { + "version": "5.0.1", + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-1.0a": { + "version": "2.2.6", + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-sizeof": { + "version": "2.6.3", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3" + } + }, + "node_modules/object-sizeof/node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/onetime": { + "version": "5.1.2", "dev": true, "license": "MIT", "dependencies": { @@ -16764,7 +19540,6 @@ }, "node_modules/p-map": { "version": "4.0.0", - "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" @@ -16894,7 +19669,6 @@ }, "node_modules/path-key": { "version": "3.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -16906,7 +19680,6 @@ }, "node_modules/path-scurry": { "version": "1.10.1", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", @@ -16921,7 +19694,6 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.0.0", - "dev": true, "license": "ISC", "engines": { "node": "14 || >=16.14" @@ -18284,7 +21056,6 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -18295,7 +21066,6 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -18741,7 +21511,6 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -18754,12 +21523,10 @@ }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, "license": "MIT" }, "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -18841,7 +21608,6 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -18953,7 +21719,6 @@ }, "node_modules/supports-color": { "version": "7.2.0", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -19219,7 +21984,6 @@ }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, "license": "MIT" }, "node_modules/through": { @@ -19809,7 +22573,6 @@ }, "node_modules/which": { "version": "2.0.2", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -19965,7 +22728,6 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", diff --git a/package.json b/package.json index 8a8b6177bd..e698dedeb4 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,8 @@ "@koa/router": "^12.0.0", "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", - "@rudderstack/integrations-lib": "^0.1.8", + "@rudderstack/integrations-lib": "^0.1.9", + "@rudderstack/integrations-store": "^0.1.1", "@rudderstack/workflow-engine": "^0.6.9", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", @@ -80,6 +81,7 @@ "handlebars": "^4.7.7", "http-graceful-shutdown": "^3.1.13", "https-proxy-agent": "^5.0.1", + "i": "^0.3.7", "ioredis": "^5.3.2", "is": "^3.3.0", "is-ip": "^3.1.0", @@ -99,6 +101,7 @@ "moment-timezone": "^0.5.43", "node-cache": "^5.1.2", "node-fetch": "^2.6.12", + "npm": "^10.2.4", "oauth-1.0a": "^2.2.6", "object-hash": "^3.0.0", "parse-static-imports": "^1.1.0", diff --git a/src/cdk/v2/destinations/webhook/rtWorkflow.yaml b/src/cdk/v2/destinations/webhook/rtWorkflow.yaml index 335293b6db..4cbc6147e7 100644 --- a/src/cdk/v2/destinations/webhook/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/webhook/rtWorkflow.yaml @@ -15,8 +15,8 @@ steps: - name: successfulEvents template: | $.outputs.transform#idx.output.({ - "batchedRequest": ., - "batched": false, + "batchedRequest": [.], + "batched": true, "destination": ^[idx].destination, "metadata": ^[idx].metadata[], "statusCode": 200 diff --git a/src/helpers/pluginAdapter.ts b/src/helpers/pluginAdapter.ts new file mode 100644 index 0000000000..8e97e86cc5 --- /dev/null +++ b/src/helpers/pluginAdapter.ts @@ -0,0 +1,251 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/no-shadow */ +/* eslint-disable no-restricted-syntax */ +import { + RudderStackEvent, + RudderStackEventPayload, + Integration, + Destination, + WorkflowType, + Metadata, + get, +} from '@rudderstack/integrations-lib'; +import { IntegrationsFactory } from '@rudderstack/integrations-store'; +import groupBy from 'lodash/groupBy'; +import { + ProcessorTransformationRequest, + RouterTransformationRequestData, + TransformedOutput, +} from '../types'; +import { generateErrorObject } from '../v0/util'; +import { MappedToDestinationKey } from '../constants'; + +// error handling + +export class PluginAdapter { + private static pluginCache: Map = new Map(); + + private static async getPlugin( + integrationName: string, + workflowType: WorkflowType, + ): Promise { + const cacheKey = `${integrationName}_${workflowType}`; + if (this.pluginCache.has(cacheKey)) { + return this.pluginCache.get(cacheKey) as Integration; + } + // TODO: default integration config need to make it dynamic by making some sort of config call or get it from config file + // const integrationConfig: IntegrationConfig = { + // name: integrationName, + // saveResponse: true, + // eventOrdering: true, + // plugins: ['preprocessor', 'multiplexer'], + // }; + + const integration = await IntegrationsFactory.createIntegration(integrationName, workflowType); + this.pluginCache.set(cacheKey, integration); + return integration; + } + + public static async transformAtProcessor( + inputs: ProcessorTransformationRequest[], + integrationName: string, + ) { + const mappedToDestination = get(inputs[0].message, MappedToDestinationKey); + const workflowType = mappedToDestination ? WorkflowType.RETL : WorkflowType.STREAM; + const integrationPlugin = await PluginAdapter.getPlugin(integrationName, workflowType); + + const groupedEventsByDestinationId = groupBy( + inputs, + (ev: ProcessorTransformationRequest) => ev.destination?.ID, + ); + const eventsPerDestinationId: ProcessorTransformationRequest[][] = Object.values( + groupedEventsByDestinationId, + ); + + const result = await Promise.all( + eventsPerDestinationId.map(async (inputs) => { + const events = inputs.map((input) => ({ + event: [{ message: input.message as RudderStackEvent } as RudderStackEventPayload], + metadata: [input.metadata], + })); + const { destination } = inputs[0]; + const output = await integrationPlugin.execute(events, destination); + const responseList = output.resultContext; + const errors = output.errorResults; + + const errorList: { metadata: Metadata; response: any; destination: Destination }[] = []; + // handle the error scenario + if (errors.length > 0) { + const nestedErrorList = errors.map((e) => { + const errResponses = e.metadata.map((metadata) => ({ + metadata, + response: generateErrorObject(e.error), // add further tags here + destination: e.destination, + })); + return errResponses; + }); + errorList.push(...nestedErrorList.flat()); + } + + // handle the success scenario + const transformedPayloadList: { + payload: TransformedOutput; + metadata: Metadata; + destination: Destination; + }[] = []; + for (const [_, response] of responseList.entries()) { + for (const [index, payload] of response.payload.entries()) { + const transformedPayload = payload as TransformedOutput; + transformedPayloadList.push({ + payload: transformedPayload, + metadata: response.metadata[index], + destination, + }); + } + } + return { transformedPayloadList, errorList }; + }), + ); + + const allSuccessList: { + payload: TransformedOutput; + metadata: Metadata; + destination: Destination; + }[] = result.flatMap((res) => res.transformedPayloadList); + const allErrorList: { metadata: Metadata; response: any; destination: Destination }[] = + result.flatMap((res) => res.errorList); + + return { allSuccessList, allErrorList }; + } + + public static async transformAtRouter( + inputs: RouterTransformationRequestData[], + integrationName: string, + ) { + const mappedToDestination = get(inputs[0].message, MappedToDestinationKey); + const workflowType = mappedToDestination ? WorkflowType.RETL : WorkflowType.STREAM; + + const integrationPlugin = await PluginAdapter.getPlugin(integrationName, workflowType); + // group events by destinationId + // example: { destinationId1: [event1, event2], destinationId2: [event3, event4]} + const groupedEventsByDestinationId = groupBy( + inputs, + (ev: RouterTransformationRequestData) => ev.destination?.ID, + ); + // example: [[event1, event2], [event3, event4]] + const eventsPerDestinationId: RouterTransformationRequestData[][] = Object.values( + groupedEventsByDestinationId, + ); + + const result = await Promise.all( + eventsPerDestinationId.map(async (inputs) => { + const input = inputs.map((input) => ({ + event: [{ message: input.message as RudderStackEvent } as RudderStackEventPayload], + metadata: [input.metadata], + })); + + const { destination } = inputs[0]; + + // calling the plugin and we can expect batched and multiplexed responses + // example: [ { payload: [event1, event2, event3], metadata: [metadata1, metadata2, metdata3] }, { payload: [event3, event4], metadata: [metadata3, metadata4] } ] + + const output = await integrationPlugin.execute(input, destination); + const responseList = output.resultContext; + const errors = output.errorResults; + + // handle error scenario + const errorList: { metadata: Metadata; response: any; destination: Destination }[] = []; + if (errors.length > 0) { + const nestedErrorList = errors.map((e) => { + const errResponses = e.metadata.map((metadata) => ({ + metadata, + response: generateErrorObject(e.error), // add further tags here + destination, + })); + return errResponses; + }); + errorList.push(...nestedErrorList.flat()); + } + + // handle success scenraio + // ranking the responses based on the number of unique jobIds in the metadata array + const uniqueJobRank: { uniqueJobIds: number; index: number }[] = []; + for (const [index, response] of responseList.entries()) { + const uniqueJobIds = Array.from(new Set(response.metadata.map((meta) => meta.jobId))); + uniqueJobRank.push({ + uniqueJobIds: uniqueJobIds.length, + index, + }); + } + uniqueJobRank.sort((a, b) => b.uniqueJobIds - a.uniqueJobIds); + // ranking ends here with uniqueJobRank containing the index of the responseList in the order of the number of unique jobIds in the metadata array + // example: [ { uniqueJobIds: 3, index: 0 }, { uniqueJobIds: 2, index: 1 } ] + + const finalResponse: { + payload: TransformedOutput[]; + metadata: Metadata[]; + destination: Destination; + }[] = []; + // creating a map of jobId to position in the metadata array + // example: { jobId1: 1, jobId2: 1, jobId3: 0, jobId4: 2} + // motivation: prevent metadata duplication in the final response at all levels + const jobIdPositionMap: Map = new Map(); + for (const rank of uniqueJobRank) { + // iteratively checking payloads with the highest number of unique jobIds to lowest + const rankedResponse = responseList[rank.index]; + let isCurrentResponseAddedToFinalPayload = false; + // iterate each metadata in the rankedResponse to check if any jobId is already present in the finalResponse + for (const meta of rankedResponse.metadata) { + // check if the jobId already has a position in final response + if (jobIdPositionMap.has(meta.jobId)) { + // if yes, then we need append the entire rankedResponse including all the payloads and metadata at same position + const position = jobIdPositionMap.get(meta.jobId) as number; + const currentOutput = rankedResponse.payload.map( + (payload) => payload as TransformedOutput, + ); + finalResponse[position].payload.push(...currentOutput); + // push metdata to final response only if it is not already present + rankedResponse.metadata.forEach((meta) => { + // get all the exisitng jobIds in the metadata array at the position from the finalResponse + const jobIdsInResponse = finalResponse[position].metadata.map( + (fRmeta) => fRmeta.jobId, + ); + // check if the jobId is already present in the metadata array + if (!jobIdsInResponse.includes(meta.jobId)) { + finalResponse[position].metadata.push(meta); + } + }); + finalResponse[position].destination = destination; + isCurrentResponseAddedToFinalPayload = true; + // break the loop as we have already appended the entire rankedResponse to the finalResponse + break; + } + } + // if the current rankedResponse is not added to the finalResponse, then we need to add it as a new entry + if (!isCurrentResponseAddedToFinalPayload) { + finalResponse.push({ + payload: rankedResponse.payload.map((payload) => payload as TransformedOutput), + metadata: rankedResponse.metadata, + destination, + }); + // update the jobIdPositionMap for all the jobIds in the rankedResponse + rankedResponse.metadata.forEach((meta) => { + jobIdPositionMap.set(meta.jobId, finalResponse.length - 1); + }); + } + } + return { transformedPayloadList: finalResponse, errorList }; + }), + ); + const allSuccessList: { + payload: TransformedOutput[]; + metadata: Metadata[]; + destination: Destination; + }[] = result.flatMap((res) => res.transformedPayloadList); + const allErrorList: { metadata: Metadata; response: any; destination: Destination }[] = + result.flatMap((res) => res.errorList); + + return { allSuccessList, allErrorList }; + } +} diff --git a/src/helpers/serviceSelector.ts b/src/helpers/serviceSelector.ts index 89678e9407..2d81ab5a51 100644 --- a/src/helpers/serviceSelector.ts +++ b/src/helpers/serviceSelector.ts @@ -8,6 +8,7 @@ import { NativeIntegrationDestinationService } from '../services/destination/nat import { SourceService } from '../interfaces/SourceService'; import { NativeIntegrationSourceService } from '../services/source/nativeIntegration'; import { ComparatorService } from '../services/comparator'; +import { PluginIntegrationService } from '../services/destination/pluginIntegration'; import { FixMe } from '../util/types'; export class ServiceSelector { @@ -17,6 +18,7 @@ export class ServiceSelector { [INTEGRATION_SERVICE.CDK_V1_DEST]: CDKV1DestinationService, [INTEGRATION_SERVICE.CDK_V2_DEST]: CDKV2DestinationService, [INTEGRATION_SERVICE.NATIVE_DEST]: NativeIntegrationDestinationService, + [INTEGRATION_SERVICE.PLUGIN_DEST]: PluginIntegrationService, [INTEGRATION_SERVICE.NATIVE_SOURCE]: NativeIntegrationSourceService, }; @@ -28,6 +30,10 @@ export class ServiceSelector { return Boolean(destinationDefinitionConfig?.cdkV2Enabled); } + private static isPluginDestination(destinationDefinitionConfig: FixMe) { + return !!destinationDefinitionConfig?.isPlugin; + } + private static isComparatorEnabled(destinationDefinitionConfig: FixMe): boolean { return ( process.env.COMPARATOR_ENABLED === 'true' && @@ -68,6 +74,12 @@ export class ServiceSelector { ): DestinationService { const destinationDefinitionConfig: FixMe = events[0]?.destination?.DestinationDefinition?.Config; + + if (this.isPluginDestination(destinationDefinitionConfig)) { + return this.fetchCachedService(INTEGRATION_SERVICE.PLUGIN_DEST); + } + // Legacy Services + if (this.isCdkDestination(destinationDefinitionConfig)) { return this.fetchCachedService(INTEGRATION_SERVICE.CDK_V1_DEST); } diff --git a/src/routes/utils/constants.js b/src/routes/utils/constants.js index f074db6c62..3b1b7bfb18 100644 --- a/src/routes/utils/constants.js +++ b/src/routes/utils/constants.js @@ -6,9 +6,10 @@ const INTEGRATION_SERVICE = { CDK_V2_DEST: 'cdkv2_dest', NATIVE_DEST: 'native_dest', NATIVE_SOURCE: 'native_source', + PLUGIN_DEST: 'plugin_dest', }; -const CHANNELS= { - sources: 'sources' +const CHANNELS = { + sources: 'sources', }; const RETL_TIMESTAMP = 'timestamp'; diff --git a/src/services/comparator.ts b/src/services/comparator.ts index 7f63da9402..5792ec973f 100644 --- a/src/services/comparator.ts +++ b/src/services/comparator.ts @@ -1,8 +1,8 @@ /* eslint-disable class-methods-use-this */ +import { Destination } from '@rudderstack/integrations-lib'; import { DestinationService } from '../interfaces/DestinationService'; import { DeliveryResponse, - Destination, ErrorDetailer, MetaTransferObject, ProcessorTransformationOutput, @@ -60,7 +60,10 @@ export class ComparatorService implements DestinationService { } private getTestThreshold(destination: Destination) { - return destination.DestinationDefinition?.Config?.camparisonTestThreshold || 0; + const config = destination.DestinationDefinition?.Config as { + camparisonTestThreshold?: number; + }; + return config?.camparisonTestThreshold || 0; } private getComparisonLogs( diff --git a/src/services/destination/pluginIntegration.ts b/src/services/destination/pluginIntegration.ts new file mode 100644 index 0000000000..b525847cd8 --- /dev/null +++ b/src/services/destination/pluginIntegration.ts @@ -0,0 +1,139 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { Metadata, TransformationError } from '@rudderstack/integrations-lib'; +import { PluginAdapter } from '../../helpers/pluginAdapter'; +import { + DeliveryResponse, + ErrorDetailer, + MetaTransferObject, + ProcessorTransformationOutput, + ProcessorTransformationRequest, + ProcessorTransformationResponse, + RouterTransformationRequestData, + RouterTransformationResponse, + UserDeletionRequest, + UserDeletionResponse, +} from '../../types'; +import tags from '../../v0/util/tags'; +import { DestinationService } from '../../interfaces/DestinationService'; + +export class PluginIntegrationService implements DestinationService { + init() {} + + public getName(): string { + return 'Plugin'; + } + + public getTags( + destType: string, + destinationId: string, + workspaceId: string, + feature: string, + ): MetaTransferObject { + const metaTO = { + errorDetails: { + destType: destType.toUpperCase(), + module: tags.MODULES.DESTINATION, + implementation: tags.IMPLEMENTATIONS.NATIVE, + feature, + destinationId, + workspaceId, + } as ErrorDetailer, + errorContext: `[Plugin Integration Service] Failure During ${feature} Transformation`, + } as MetaTransferObject; + return metaTO; + } + + public async doProcessorTransformation( + events: ProcessorTransformationRequest[], + destinationType: string, + _version: string, + _requestMetadata: unknown, + ): Promise { + const results = await PluginAdapter.transformAtProcessor(events, destinationType); + const respList: ProcessorTransformationResponse[] = []; + results.allSuccessList.forEach((successResponse) => { + respList.push({ + output: successResponse.payload, + metadata: successResponse.metadata, + statusCode: 200, + }); + }); + + results.allErrorList.forEach( + (errorResponse: { + metadata: Metadata; + response: { + // need to build type def here + message: string; + status: number; + destinationResponse?: any; + statTags?: { [x: string]: string }; + }; + }) => { + respList.push({ + metadata: errorResponse.metadata, + statusCode: errorResponse.response.status, + error: errorResponse.response.message, + statTags: errorResponse.response.statTags, + }); + }, + ); + return respList; + } + + public async doRouterTransformation( + events: RouterTransformationRequestData[], + destinationType: string, + _version: string, + _requestMetadata: unknown, + ): Promise { + const results = await PluginAdapter.transformAtRouter(events, destinationType); + const respList: RouterTransformationResponse[] = []; + results.allSuccessList.forEach((successResponse) => { + respList.push({ + batched: true, + batchedRequest: successResponse.payload, + statusCode: 200, + metadata: successResponse.metadata, + destination: successResponse.destination, + }); + }); + + results.allErrorList.forEach((errorResponse) => { + respList.push({ + metadata: [errorResponse.metadata], + statusCode: errorResponse.response.status, + error: errorResponse.response.message, + statTags: errorResponse.response.statTags, + destination: errorResponse.destination, + batched: false, + }); + }); + return respList; + } + + // TODO: implement these methods + public doBatchTransformation( + _events: RouterTransformationRequestData[], + _destinationType: string, + _version: any, + _requestMetadata: unknown, + ): RouterTransformationResponse[] { + throw new TransformationError('CDKV1 Does not Implement Batch Transform Routine'); + } + + public deliver( + _event: ProcessorTransformationOutput, + _destinationType: string, + _requestMetadata: unknown, + ): Promise { + throw new TransformationError('CDV1 Does not Implement Delivery Routine'); + } + + public processUserDeletion( + requests: UserDeletionRequest[], + rudderDestInfo: string, + ): Promise { + throw new TransformationError('CDV1 Does not Implement Deletion Routine'); + } +} diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 0b91eb7cc1..c0b8a863f1 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -1,5 +1,4 @@ /* eslint-disable no-param-reassign */ -import cloneDeep from 'lodash/cloneDeep'; import isObject from 'lodash/isObject'; import isEmpty from 'lodash/isEmpty'; import { @@ -69,9 +68,15 @@ export class DestinationPostTransformationService { implementation: string, destinationType: string, ): RouterTransformationResponse[] { - const resultantPayloads: RouterTransformationResponse[] = cloneDeep(transformedPayloads); + const resultantPayloads: RouterTransformationResponse[] = transformedPayloads; resultantPayloads.forEach((resultantPayload) => { - if (resultantPayload.batchedRequest && resultantPayload.batchedRequest.userId) { + if (Array.isArray(resultantPayload.batchedRequest)) { + resultantPayload.batchedRequest.forEach((batchedRequest) => { + if (batchedRequest.userId) { + batchedRequest.userId = `${batchedRequest.userId}`; + } + }); + } else if (resultantPayload.batchedRequest && resultantPayload.batchedRequest.userId) { resultantPayload.batchedRequest.userId = `${resultantPayload.batchedRequest.userId}`; } }); diff --git a/src/services/misc.ts b/src/services/misc.ts index e0953d08bf..453de96e38 100644 --- a/src/services/misc.ts +++ b/src/services/misc.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import path from 'path'; import { Context } from 'koa'; +import { Metadata } from '@rudderstack/integrations-lib'; import { DestHandlerMap } from '../constants/destinationCanonicalNames'; -import { Metadata } from '../types'; import { getCPUProfile, getHeapProfile } from '../middleware'; export class MiscService { diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index ddd5c82f67..3a01330b44 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -47,7 +47,7 @@ export class UserTransformService { } const responses = await Promise.all( Object.entries(groupedEvents).map(async ([, destEvents]) => { - const eventsToProcess = destEvents as ProcessorTransformationRequest[]; + const eventsToProcess = destEvents as any[]; const transformationVersionId = eventsToProcess[0]?.destination?.Transformations[0]?.VersionID; const messageIds: string[] = []; diff --git a/src/types/index.ts b/src/types/index.ts index 9292fe2cc2..7464aa543e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,3 +1,4 @@ +import { Destination, Metadata } from '@rudderstack/integrations-lib'; import { CatchErr, FixMe } from '../util/types'; /* eslint-disable @typescript-eslint/no-explicit-any */ @@ -19,38 +20,7 @@ type ProcessorTransformationOutput = { metadata?: Metadata; }; -type Metadata = { - sourceId: string; - workspaceId: string; - namespace: string; - instanceId: string; - sourceType: string; - sourceCategory: string; - trackingPlanId: string; - trackingPlanVersion: number; - sourceTpConfig: object; - mergedTpConfig: object; - destinationId: string; - jobRunId: string; - jobId: number; - sourceBatchId: string; - sourceJobId: string; - sourceJobRunId: string; - sourceTaskId: string; - sourceTaskRunId: string; - recordId: object; - destinationType: string; - messageId: string; - oauthAccessToken: string; - messageIds: string[]; - rudderId: string; - receivedAt: string; - eventName: string; - eventType: string; - sourceDefinitionId: string; - destinationDefinitionId: string; - transformationId: string; -}; +type TransformedOutput = ProcessorTransformationOutput; type MessageIdMetadataMap = { [key: string]: Metadata; @@ -62,24 +32,6 @@ type UserTransformationInput = { Config: object; }; -type DestinationDefinition = { - ID: string; - Name: string; - DisplayName: string; - Config: FixMe; -}; - -type Destination = { - ID: string; - Name: string; - DestinationDefinition: DestinationDefinition; - Config: FixMe; - Enabled: boolean; - WorkspaceID: string; - Transformations: UserTransformationInput[]; - RevisionID?: string; -}; - type UserTransformationLibrary = { VersionID: string; }; @@ -109,17 +61,17 @@ type ProcessorTransformationResponse = { metadata: Metadata; statusCode: number; error?: string; - statTags: object; + statTags?: object; }; type RouterTransformationResponse = { - batchedRequest?: ProcessorTransformationOutput; + batchedRequest?: ProcessorTransformationOutput | ProcessorTransformationOutput[]; metadata: Metadata[]; destination: Destination; batched: boolean; statusCode: number; - error: string; - statTags: object; + error?: string; + statTags?: object; }; type SourceTransformationOutput = { @@ -130,8 +82,8 @@ type SourceTransformationResponse = { output: SourceTransformationOutput; error: CatchErr; statusCode: number; - outputToSource: object; - statTags: object; + outputToSource?: object; + statTags?: object; }; type DeliveryResponse = { @@ -253,7 +205,6 @@ type SourceInput = { source?: Source; }; export { - Metadata, MessageIdMetadataMap, UserTransformationLibrary, ProcessorTransformationRequest, @@ -271,8 +222,8 @@ export { MetaTransferObject, UserDeletionRequest, UserDeletionResponse, - Destination, ComparatorInput, SourceInput, Source, + TransformedOutput, }; diff --git a/test/__tests__/data/webhook_router_output.json b/test/__tests__/data/webhook_router_output.json index c398b28981..6211a4aecc 100644 --- a/test/__tests__/data/webhook_router_output.json +++ b/test/__tests__/data/webhook_router_output.json @@ -1,120 +1,122 @@ [ [ { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "JSON": { - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "user_properties": { - "total_payments": 0, - "internetReachability": "ReachableViaLocalAreaNetwork", - "level": 6, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "coin_balance": 9466052, - "player_total_shields": 0, - "isLowEndDevice": false, - "game_fps": 30, - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "graphicsQuality": "HD", - "current_module_name": "CasinoGameModule", - "player_total_battles": 0, - "lifetime_gem_balance": 0, - "gem_balance": 0, - "fb_profile": "0", - "start_date": "2019-08-01", - "versionSessionCount": 2, - "game_name": "FireEagleSlots" - }, - "integrations": { - "All": true - }, - "event": "spin_result", - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "model": "Redmi 6", - "manufacturer": "Xiaomi", - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "name": "xiaomi" + "batchedRequest": [ + { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "JSON": { + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "user_properties": { + "total_payments": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "level": 6, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "coin_balance": 9466052, + "player_total_shields": 0, + "isLowEndDevice": false, + "game_fps": 30, + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "graphicsQuality": "HD", + "current_module_name": "CasinoGameModule", + "player_total_battles": 0, + "lifetime_gem_balance": 0, + "gem_balance": 0, + "fb_profile": "0", + "start_date": "2019-08-01", + "versionSessionCount": 2, + "game_name": "FireEagleSlots" }, - "traits": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "address": { - "city": "Dhaka", - "country": "Bangladesh" - } + "integrations": { + "All": true }, - "os": { - "version": "8.1.0", - "name": "android" + "event": "spin_result", + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "model": "Redmi 6", + "manufacturer": "Xiaomi", + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "name": "xiaomi" + }, + "traits": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "address": { + "city": "Dhaka", + "country": "Bangladesh" + } + }, + "os": { + "version": "8.1.0", + "name": "android" + }, + "network": { + "carrier": "Banglalink" + } }, - "network": { - "carrier": "Banglalink" + "type": "track", + "properties": { + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "jackpot_win_type": "Silver", + "coin_balance": 9466052, + "bet_level": 1, + "ishighroller": "False", + "tournament_id": "T1561970819", + "battle_id": "N/A", + "bet_amount": 9, + "fb_profile": "0", + "player_total_shields": 0, + "is_turbo": "False", + "player_total_battles": 0, + "bet_multiplier": 1, + "start_date": "2019-08-01", + "versionSessionCount": 2, + "graphicsQuality": "HD", + "is_auto_spin": "False", + "days_in_game": 0, + "additional_bet_index": 0, + "isLowEndDevice": "False", + "game_fps": 30, + "extra_param": "N/A", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "current_module_name": "CasinoGameModule", + "game_id": "fireEagleBase", + "featureGameType": "N/A", + "gem_balance": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "total_payments": 0, + "level": 6, + "win_amount": 0, + "no_of_spin": 1, + "game_name": "FireEagleSlots", + "jackpot_win_amount": 90, + "lifetime_gem_balance": 0, + "isf": "False" } }, - "type": "track", - "properties": { - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "jackpot_win_type": "Silver", - "coin_balance": 9466052, - "bet_level": 1, - "ishighroller": "False", - "tournament_id": "T1561970819", - "battle_id": "N/A", - "bet_amount": 9, - "fb_profile": "0", - "player_total_shields": 0, - "is_turbo": "False", - "player_total_battles": 0, - "bet_multiplier": 1, - "start_date": "2019-08-01", - "versionSessionCount": 2, - "graphicsQuality": "HD", - "is_auto_spin": "False", - "days_in_game": 0, - "additional_bet_index": 0, - "isLowEndDevice": "False", - "game_fps": 30, - "extra_param": "N/A", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "current_module_name": "CasinoGameModule", - "game_id": "fireEagleBase", - "featureGameType": "N/A", - "gem_balance": 0, - "internetReachability": "ReachableViaLocalAreaNetwork", - "total_payments": 0, - "level": 6, - "win_amount": 0, - "no_of_spin": 1, - "game_name": "FireEagleSlots", - "jackpot_win_amount": 90, - "lifetime_gem_balance": 0, - "isf": "False" - } + "FORM": {} + }, + "files": {}, + "endpoint": "http://6b0e6a60.ngrok.io", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "headers": { + "content-type": "application/json", + "test2": "value2" }, - "FORM": {} - }, - "files": {}, - "endpoint": "http://6b0e6a60.ngrok.io", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "version": "1", - "params": {}, - "type": "REST", - "method": "POST" - }, + "version": "1", + "params": {}, + "type": "REST", + "method": "POST" + } + ], "metadata": [ { "jobId": 1 } ], - "batched": false, + "batched": true, "statusCode": 200, "destination": { "Config": { @@ -133,119 +135,121 @@ } }, { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "JSON": { - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "user_properties": { - "total_payments": 0, - "internetReachability": "ReachableViaLocalAreaNetwork", - "level": 6, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "coin_balance": 9466052, - "player_total_shields": 0, - "isLowEndDevice": false, - "game_fps": 30, - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "graphicsQuality": "HD", - "current_module_name": "CasinoGameModule", - "player_total_battles": 0, - "lifetime_gem_balance": 0, - "gem_balance": 0, - "fb_profile": "0", - "start_date": "2019-08-01", - "versionSessionCount": 2, - "game_name": "FireEagleSlots" - }, - "integrations": { - "All": true - }, - "event": "spin_result", - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "model": "Redmi 6", - "manufacturer": "Xiaomi", - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "name": "xiaomi" + "batchedRequest": [ + { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "JSON": { + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "user_properties": { + "total_payments": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "level": 6, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "coin_balance": 9466052, + "player_total_shields": 0, + "isLowEndDevice": false, + "game_fps": 30, + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "graphicsQuality": "HD", + "current_module_name": "CasinoGameModule", + "player_total_battles": 0, + "lifetime_gem_balance": 0, + "gem_balance": 0, + "fb_profile": "0", + "start_date": "2019-08-01", + "versionSessionCount": 2, + "game_name": "FireEagleSlots" }, - "traits": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "address": { - "city": "Dhaka", - "country": "Bangladesh" - } + "integrations": { + "All": true }, - "os": { - "version": "8.1.0", - "name": "android" + "event": "spin_result", + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "model": "Redmi 6", + "manufacturer": "Xiaomi", + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "name": "xiaomi" + }, + "traits": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "address": { + "city": "Dhaka", + "country": "Bangladesh" + } + }, + "os": { + "version": "8.1.0", + "name": "android" + }, + "network": { + "carrier": "Banglalink" + } }, - "network": { - "carrier": "Banglalink" + "type": "track", + "properties": { + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "jackpot_win_type": "Silver", + "coin_balance": 9466052, + "bet_level": 1, + "ishighroller": "False", + "tournament_id": "T1561970819", + "battle_id": "N/A", + "bet_amount": 9, + "fb_profile": "0", + "player_total_shields": 0, + "is_turbo": "False", + "player_total_battles": 0, + "bet_multiplier": 1, + "start_date": "2019-08-01", + "versionSessionCount": 2, + "graphicsQuality": "HD", + "is_auto_spin": "False", + "days_in_game": 0, + "additional_bet_index": 0, + "isLowEndDevice": "False", + "game_fps": 30, + "extra_param": "N/A", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "current_module_name": "CasinoGameModule", + "game_id": "fireEagleBase", + "featureGameType": "N/A", + "gem_balance": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "total_payments": 0, + "level": 6, + "win_amount": 0, + "no_of_spin": 1, + "game_name": "FireEagleSlots", + "jackpot_win_amount": 90, + "lifetime_gem_balance": 0, + "isf": "False" } }, - "type": "track", - "properties": { - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "jackpot_win_type": "Silver", - "coin_balance": 9466052, - "bet_level": 1, - "ishighroller": "False", - "tournament_id": "T1561970819", - "battle_id": "N/A", - "bet_amount": 9, - "fb_profile": "0", - "player_total_shields": 0, - "is_turbo": "False", - "player_total_battles": 0, - "bet_multiplier": 1, - "start_date": "2019-08-01", - "versionSessionCount": 2, - "graphicsQuality": "HD", - "is_auto_spin": "False", - "days_in_game": 0, - "additional_bet_index": 0, - "isLowEndDevice": "False", - "game_fps": 30, - "extra_param": "N/A", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "current_module_name": "CasinoGameModule", - "game_id": "fireEagleBase", - "featureGameType": "N/A", - "gem_balance": 0, - "internetReachability": "ReachableViaLocalAreaNetwork", - "total_payments": 0, - "level": 6, - "win_amount": 0, - "no_of_spin": 1, - "game_name": "FireEagleSlots", - "jackpot_win_amount": 90, - "lifetime_gem_balance": 0, - "isf": "False" - } + "FORM": {} + }, + "files": {}, + "endpoint": "https://6b0e6a60.ngrok.io/n", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "headers": { + "content-type": "application/json" }, - "FORM": {} - }, - "files": {}, - "endpoint": "https://6b0e6a60.ngrok.io/n", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "headers": { - "content-type": "application/json" - }, - "version": "1", - "params": {}, - "type": "REST", - "method": "POST" - }, + "version": "1", + "params": {}, + "type": "REST", + "method": "POST" + } + ], "metadata": [ { "jobId": 2 } ], - "batched": false, + "batched": true, "statusCode": 200, "destination": { "Config": { diff --git a/test/controllerUtility/ctrl-utility.test.ts b/test/controllerUtility/ctrl-utility.test.ts index bf9eef1846..49704afa6d 100644 --- a/test/controllerUtility/ctrl-utility.test.ts +++ b/test/controllerUtility/ctrl-utility.test.ts @@ -71,6 +71,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -135,6 +136,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -203,6 +205,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -267,6 +270,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -335,6 +339,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -399,6 +404,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -469,6 +475,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -531,6 +538,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -593,6 +601,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -655,6 +664,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -721,6 +731,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -783,6 +794,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -845,6 +857,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -907,6 +920,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -978,6 +992,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1040,6 +1055,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1105,6 +1121,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1170,6 +1187,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], @@ -1237,6 +1255,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1299,6 +1318,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1364,6 +1384,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, { @@ -1429,6 +1450,7 @@ const timestampEventsCases: timestampTestCases[] = [ Enabled: true, WorkspaceID: 'wspId', Transformations: [], + IsProcessorEnabled: true, }, }, ], diff --git a/test/integrations/component.test.ts b/test/integrations/component.test.ts index 847dd4c91f..884ed7a730 100644 --- a/test/integrations/component.test.ts +++ b/test/integrations/component.test.ts @@ -21,6 +21,8 @@ import tags from '../../src/v0/util/tags'; import { Server } from 'http'; import { appendFileSync } from 'fs'; import { responses } from '../testHelper'; +import { mockAxiosFromLib } from '@rudderstack/integrations-lib/mock'; +import { set } from '@rudderstack/integrations-lib'; // To run single destination test cases // npm run test:ts -- component --destination=adobe_analytics @@ -50,6 +52,8 @@ if (opts.generate === 'true') { let server: Server; +const pluginDestinations = ['webhook']; + beforeAll(async () => { const app = new Koa(); app.use( @@ -77,8 +81,11 @@ let mockAdapter; if (!opts.generate || opts.generate === 'false') { // unmock already existing axios-mocking mockAdapter = new MockAxiosAdapter(axios, { onNoMatch: 'throwException' }); - const registerAxiosMocks = (axiosMocks: MockHttpCallsData[]) => { - axiosMocks.forEach((axiosMock) => addMock(mockAdapter, axiosMock)); + const registerAxiosMocks = ( + axiosMocks: MockHttpCallsData[], + mockAxiosAdapter: MockAxiosAdapter, + ) => { + axiosMocks.forEach((axiosMock) => addMock(mockAxiosAdapter, axiosMock)); }; // // all the axios requests will be stored in this map @@ -89,7 +96,8 @@ if (!opts.generate || opts.generate === 'false') { return mockNetworkCallsData; }) .flat(); - registerAxiosMocks(allAxiosRequests); + registerAxiosMocks(allAxiosRequests, mockAdapter); + registerAxiosMocks(allAxiosRequests, mockAxiosFromLib); } // END @@ -97,6 +105,22 @@ const rootDir = __dirname; const allTestDataFilePaths = getTestDataFilePaths(rootDir, opts); const DEFAULT_VERSION = 'v0'; +const updateTCDataForPluginDests = (tcData: TestCaseData) => { + if (tcData.feature === tags.FEATURES.PROCESSOR) { + tcData.input.request.body.forEach((event) => { + set(event, 'destination.DestinationDefinition.Config.isPlugin', true); + }); + } + if (tcData.feature === tags.FEATURES.ROUTER) { + tcData.input.request.body.input.forEach((event) => { + set(event, 'destination.DestinationDefinition.Config.isPlugin', true); + }); + tcData.output.response?.body.output.forEach((payload) => { + set(payload, 'destination.DestinationDefinition.Config.isPlugin', true); + }); + } +}; + const testRoute = async (route, tcData: TestCaseData) => { const inputReq = tcData.input.request; const { headers, params, body } = inputReq; @@ -135,6 +159,9 @@ const testRoute = async (route, tcData: TestCaseData) => { const destinationTestHandler = async (tcData: TestCaseData) => { let route; + if (pluginDestinations.includes(tcData.name)) { + updateTCDataForPluginDests(tcData); + } switch (tcData.feature) { case tags.FEATURES.ROUTER: route = `/routerTransform`; diff --git a/test/integrations/destinations/webhook/router/data.ts b/test/integrations/destinations/webhook/router/data.ts index e9c4f8701a..f6b8e46559 100644 --- a/test/integrations/destinations/webhook/router/data.ts +++ b/test/integrations/destinations/webhook/router/data.ts @@ -101,7 +101,7 @@ export const data = [ }, }, metadata: { - jobId: 2, + jobId: 1, }, destination: { Config: { @@ -117,6 +117,11 @@ export const data = [ }, ], }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, { @@ -215,7 +220,22 @@ export const data = [ }, destination: { Config: { - webhookUrl: 'https://6b0e6a60.ngrok.io/n', + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, }, }, }, @@ -231,120 +251,122 @@ export const data = [ body: { output: [ { - batchedRequest: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - timestamp: '2019-09-01T15:46:51.693229+05:30', - user_properties: { - total_payments: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - level: 6, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - coin_balance: 9466052, - player_total_shields: 0, - isLowEndDevice: false, - game_fps: 30, - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - graphicsQuality: 'HD', - current_module_name: 'CasinoGameModule', - player_total_battles: 0, - lifetime_gem_balance: 0, - gem_balance: 0, - fb_profile: '0', - start_date: '2019-08-01', - versionSessionCount: 2, - game_name: 'FireEagleSlots', - }, - integrations: { - All: true, - }, - event: 'spin_result', - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - model: 'Redmi 6', - manufacturer: 'Xiaomi', - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - name: 'xiaomi', + batchedRequest: [ + { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', }, - traits: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { - city: 'Dhaka', - country: 'Bangladesh', - }, + integrations: { + All: true, }, - os: { - version: '8.1.0', - name: 'android', + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', + }, }, - network: { - carrier: 'Banglalink', + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', }, }, - type: 'track', - properties: { - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - jackpot_win_type: 'Silver', - coin_balance: 9466052, - bet_level: 1, - ishighroller: 'False', - tournament_id: 'T1561970819', - battle_id: 'N/A', - bet_amount: 9, - fb_profile: '0', - player_total_shields: 0, - is_turbo: 'False', - player_total_battles: 0, - bet_multiplier: 1, - start_date: '2019-08-01', - versionSessionCount: 2, - graphicsQuality: 'HD', - is_auto_spin: 'False', - days_in_game: 0, - additional_bet_index: 0, - isLowEndDevice: 'False', - game_fps: 30, - extra_param: 'N/A', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - current_module_name: 'CasinoGameModule', - game_id: 'fireEagleBase', - featureGameType: 'N/A', - gem_balance: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - total_payments: 0, - level: 6, - win_amount: 0, - no_of_spin: 1, - game_name: 'FireEagleSlots', - jackpot_win_amount: 90, - lifetime_gem_balance: 0, - isf: 'False', - }, + FORM: {}, }, - FORM: {}, - }, - files: {}, - endpoint: 'http://6b0e6a60.ngrok.io', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { - 'content-type': 'application/json', - test2: 'value2', + files: {}, + endpoint: 'http://6b0e6a60.ngrok.io', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, + ], metadata: [ { - jobId: 2, + jobId: 1, }, ], - batched: false, + batched: true, statusCode: 200, destination: { Config: { @@ -360,126 +382,149 @@ export const data = [ }, ], }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, { - batchedRequest: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - timestamp: '2019-09-01T15:46:51.693229+05:30', - user_properties: { - total_payments: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - level: 6, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - coin_balance: 9466052, - player_total_shields: 0, - isLowEndDevice: false, - game_fps: 30, - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - graphicsQuality: 'HD', - current_module_name: 'CasinoGameModule', - player_total_battles: 0, - lifetime_gem_balance: 0, - gem_balance: 0, - fb_profile: '0', - start_date: '2019-08-01', - versionSessionCount: 2, - game_name: 'FireEagleSlots', - }, - integrations: { - All: true, - }, - event: 'spin_result', - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - model: 'Redmi 6', - manufacturer: 'Xiaomi', - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - name: 'xiaomi', + batchedRequest: [ + { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', }, - traits: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { - city: 'Dhaka', - country: 'Bangladesh', - }, + integrations: { + All: true, }, - os: { - version: '8.1.0', - name: 'android', + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', + }, }, - network: { - carrier: 'Banglalink', + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', }, }, - type: 'track', - properties: { - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - jackpot_win_type: 'Silver', - coin_balance: 9466052, - bet_level: 1, - ishighroller: 'False', - tournament_id: 'T1561970819', - battle_id: 'N/A', - bet_amount: 9, - fb_profile: '0', - player_total_shields: 0, - is_turbo: 'False', - player_total_battles: 0, - bet_multiplier: 1, - start_date: '2019-08-01', - versionSessionCount: 2, - graphicsQuality: 'HD', - is_auto_spin: 'False', - days_in_game: 0, - additional_bet_index: 0, - isLowEndDevice: 'False', - game_fps: 30, - extra_param: 'N/A', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - current_module_name: 'CasinoGameModule', - game_id: 'fireEagleBase', - featureGameType: 'N/A', - gem_balance: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - total_payments: 0, - level: 6, - win_amount: 0, - no_of_spin: 1, - game_name: 'FireEagleSlots', - jackpot_win_amount: 90, - lifetime_gem_balance: 0, - isf: 'False', - }, + FORM: {}, }, - FORM: {}, - }, - files: {}, - endpoint: 'https://6b0e6a60.ngrok.io/n', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { - 'content-type': 'application/json', + files: {}, + endpoint: 'http://6b0e6a60.ngrok.io', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, + ], metadata: [ { jobId: 2, }, ], - batched: false, + batched: true, statusCode: 200, destination: { Config: { - webhookUrl: 'https://6b0e6a60.ngrok.io/n', + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, }, }, },