diff --git a/package-lock.json b/package-lock.json index 365320ef2..ac1c12faa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,39 +66,25 @@ "node": ">=18.17.0" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "license": "MIT", "engines": { @@ -106,22 +92,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -147,16 +133,16 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", - "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -164,14 +150,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -190,30 +176,40 @@ "semver": "bin/semver.js" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -223,9 +219,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, "license": "MIT", "engines": { @@ -233,9 +229,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -243,9 +239,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { @@ -253,9 +249,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { @@ -263,27 +259,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", - "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", - "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.0" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -348,13 +344,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -390,13 +386,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -516,13 +512,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -532,58 +528,48 @@ } }, "node_modules/@babel/template": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", - "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", - "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", - "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -597,9 +583,9 @@ "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", - "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -614,9 +600,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", - "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -631,9 +617,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", - "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -648,9 +634,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", - "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -665,9 +651,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", - "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -682,9 +668,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", - "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -699,9 +685,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", - "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -716,9 +702,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", - "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -733,9 +719,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", - "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -750,9 +736,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", - "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -767,9 +753,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", - "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -784,9 +770,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", - "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -801,9 +787,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", - "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -818,9 +804,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", - "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -835,9 +821,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", - "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -852,9 +838,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", - "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -869,9 +855,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", - "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -886,9 +872,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", - "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", "cpu": [ "arm64" ], @@ -903,9 +889,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", - "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -920,9 +906,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", - "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", "cpu": [ "arm64" ], @@ -937,9 +923,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", - "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -953,10 +939,27 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", - "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -971,9 +974,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", - "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -988,9 +991,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", - "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -1005,9 +1008,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", - "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -1022,9 +1025,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.8.0.tgz", + "integrity": "sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1182,6 +1185,29 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1201,9 +1227,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", + "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", "dev": true, "license": "MIT", "engines": { @@ -1745,34 +1771,31 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { @@ -1780,16 +1803,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz", + "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1847,16 +1870,16 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/pkgr" } }, "node_modules/@pollyjs/adapter": { @@ -1971,9 +1994,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz", - "integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.0.tgz", + "integrity": "sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==", "cpu": [ "arm" ], @@ -1985,9 +2008,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz", - "integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.0.tgz", + "integrity": "sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==", "cpu": [ "arm64" ], @@ -1999,9 +2022,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz", - "integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.0.tgz", + "integrity": "sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==", "cpu": [ "arm64" ], @@ -2013,9 +2036,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz", - "integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.0.tgz", + "integrity": "sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==", "cpu": [ "x64" ], @@ -2027,9 +2050,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz", - "integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.0.tgz", + "integrity": "sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==", "cpu": [ "arm64" ], @@ -2041,9 +2064,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz", - "integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.0.tgz", + "integrity": "sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==", "cpu": [ "x64" ], @@ -2055,9 +2078,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz", - "integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.0.tgz", + "integrity": "sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==", "cpu": [ "arm" ], @@ -2069,9 +2092,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz", - "integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.0.tgz", + "integrity": "sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==", "cpu": [ "arm" ], @@ -2083,9 +2106,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz", - "integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.0.tgz", + "integrity": "sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==", "cpu": [ "arm64" ], @@ -2097,9 +2120,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz", - "integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.0.tgz", + "integrity": "sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==", "cpu": [ "arm64" ], @@ -2111,9 +2134,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz", - "integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.0.tgz", + "integrity": "sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==", "cpu": [ "loong64" ], @@ -2124,10 +2147,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz", - "integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==", + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.0.tgz", + "integrity": "sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==", "cpu": [ "ppc64" ], @@ -2139,9 +2162,23 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz", - "integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.0.tgz", + "integrity": "sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.0.tgz", + "integrity": "sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==", "cpu": [ "riscv64" ], @@ -2153,9 +2190,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz", - "integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.0.tgz", + "integrity": "sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==", "cpu": [ "s390x" ], @@ -2167,9 +2204,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz", - "integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.0.tgz", + "integrity": "sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==", "cpu": [ "x64" ], @@ -2181,9 +2218,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz", - "integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.0.tgz", + "integrity": "sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==", "cpu": [ "x64" ], @@ -2194,10 +2231,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.0.tgz", + "integrity": "sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz", - "integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.0.tgz", + "integrity": "sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==", "cpu": [ "arm64" ], @@ -2209,9 +2260,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz", - "integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.0.tgz", + "integrity": "sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==", "cpu": [ "ia32" ], @@ -2223,9 +2274,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz", - "integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.0.tgz", + "integrity": "sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==", "cpu": [ "x64" ], @@ -2344,9 +2395,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "license": "MIT", "dependencies": { @@ -2365,13 +2416,13 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/esprima": { @@ -2385,9 +2436,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2478,9 +2529,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.17.16", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.16.tgz", - "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", "dev": true, "license": "MIT" }, @@ -2495,19 +2546,19 @@ } }, "node_modules/@types/node": { - "version": "22.13.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", - "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", + "version": "22.18.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.1.tgz", + "integrity": "sha512-rzSDyhn4cYznVG+PCzGe1lwuMYJrcBS1fc3JqSa2PvtABwWo+dZ1ij5OVok3tqfpEBCBoaR4d7upFJk73HRJDw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", + "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", "dev": true, "license": "MIT", "dependencies": { @@ -2784,9 +2835,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -2807,9 +2858,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", "engines": { @@ -2954,18 +3005,20 @@ "license": "MIT" }, "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2985,18 +3038,19 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -3078,13 +3132,6 @@ "node": ">=4" } }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -3119,14 +3166,14 @@ } }, "node_modules/axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "dev": true, "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -3250,9 +3297,9 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -3273,7 +3320,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { @@ -3427,9 +3474,9 @@ } }, "node_modules/bowser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.1.tgz", + "integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==", "dev": true, "license": "MIT" }, @@ -3457,9 +3504,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.25.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.4.tgz", + "integrity": "sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==", "dev": true, "funding": [ { @@ -3477,10 +3524,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001737", + "electron-to-chromium": "^1.5.211", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -3651,9 +3698,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001703", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz", - "integrity": "sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==", + "version": "1.0.30001741", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz", + "integrity": "sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==", "dev": true, "funding": [ { @@ -3827,10 +3874,17 @@ "dev": true, "license": "MIT" }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, "node_modules/consola": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.0.tgz", - "integrity": "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", "dev": true, "license": "MIT", "engines": { @@ -4051,9 +4105,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4069,9 +4123,9 @@ } }, "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4194,9 +4248,9 @@ } }, "node_modules/del/node_modules/ignore": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", - "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -4322,26 +4376,10 @@ "dev": true, "license": "MIT" }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/electron-to-chromium": { - "version": "1.5.114", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.114.tgz", - "integrity": "sha512-DFptFef3iktoKlFQK/afbo274/XNWD00Am0xa7M8FZUepHlHT8PEuiNBoRfFHbH1okqN58AlhbJ4QTkcnXorjA==", + "version": "1.5.214", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz", + "integrity": "sha512-TpvUNdha+X3ybfU78NoQatKvQEm1oq3lf2QbnmCEdw+Bd9RuIAY+hJTvq1avzHM0f7EJfnH3vbCnbzKzisc/9Q==", "dev": true, "license": "ISC" }, @@ -4399,9 +4437,9 @@ } }, "node_modules/es-abstract": { - "version": "1.23.9", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", - "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", "dev": true, "license": "MIT", "dependencies": { @@ -4409,18 +4447,18 @@ "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", @@ -4432,21 +4470,24 @@ "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.2.1", + "is-set": "^2.0.3", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", + "is-weakref": "^1.1.1", "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", + "regexp.prototype.flags": "^1.5.4", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", @@ -4455,7 +4496,7 @@ "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" + "which-typed-array": "^1.1.19" }, "engines": { "node": ">= 0.4" @@ -4552,9 +4593,9 @@ "license": "MIT" }, "node_modules/esbuild": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", - "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4565,31 +4606,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.1", - "@esbuild/android-arm": "0.25.1", - "@esbuild/android-arm64": "0.25.1", - "@esbuild/android-x64": "0.25.1", - "@esbuild/darwin-arm64": "0.25.1", - "@esbuild/darwin-x64": "0.25.1", - "@esbuild/freebsd-arm64": "0.25.1", - "@esbuild/freebsd-x64": "0.25.1", - "@esbuild/linux-arm": "0.25.1", - "@esbuild/linux-arm64": "0.25.1", - "@esbuild/linux-ia32": "0.25.1", - "@esbuild/linux-loong64": "0.25.1", - "@esbuild/linux-mips64el": "0.25.1", - "@esbuild/linux-ppc64": "0.25.1", - "@esbuild/linux-riscv64": "0.25.1", - "@esbuild/linux-s390x": "0.25.1", - "@esbuild/linux-x64": "0.25.1", - "@esbuild/netbsd-arm64": "0.25.1", - "@esbuild/netbsd-x64": "0.25.1", - "@esbuild/openbsd-arm64": "0.25.1", - "@esbuild/openbsd-x64": "0.25.1", - "@esbuild/sunos-x64": "0.25.1", - "@esbuild/win32-arm64": "0.25.1", - "@esbuild/win32-ia32": "0.25.1", - "@esbuild/win32-x64": "0.25.1" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/escalade": { @@ -4702,14 +4744,17 @@ } }, "node_modules/eslint-config-prettier": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.1.tgz", - "integrity": "sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==", + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, "peerDependencies": { "eslint": ">=7.0.0" } @@ -4737,9 +4782,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", + "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", "dev": true, "license": "MIT", "dependencies": { @@ -4781,30 +4826,30 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", + "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", "dependencies": { "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", + "eslint-module-utils": "^2.12.1", "hasown": "^2.0.2", - "is-core-module": "^2.15.1", + "is-core-module": "^2.16.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "object.groupby": "^1.0.3", - "object.values": "^1.2.0", + "object.values": "^1.2.1", "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", + "string.prototype.trimend": "^1.0.9", "tsconfig-paths": "^3.15.0" }, "engines": { @@ -4872,9 +4917,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "28.11.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.11.0.tgz", - "integrity": "sha512-QAfipLcNCWLVocVbZW8GimKn5p5iiMcgGbRzz8z/P5q7xw+cNEpYqyzFMtIF/ZgF2HLOyy+dYBut+DoYolvqig==", + "version": "28.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.14.0.tgz", + "integrity": "sha512-P9s/qXSMTpRTerE2FQ0qJet2gKbcGyFTPAJipoKxmWqR6uuFqIqk8FuEfg5yBieOezVrEfAMZrEwJ6yEp+1MFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4898,14 +4943,14 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz", - "integrity": "sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", "dev": true, "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" + "synckit": "^0.11.7" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -4916,7 +4961,7 @@ "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", - "eslint-config-prettier": "*", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -5311,29 +5356,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -5400,6 +5422,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -5440,9 +5474,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "dev": true, "funding": [ { @@ -5507,15 +5541,16 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -5543,9 +5578,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz", + "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==", "dev": true, "license": "MIT", "dependencies": { @@ -5721,9 +5756,9 @@ } }, "node_modules/get-uri": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", - "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", "dev": true, "license": "MIT", "dependencies": { @@ -5885,6 +5920,28 @@ "dev": true, "license": "MIT" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -6190,26 +6247,15 @@ } }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", "dev": true, "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, "engines": { "node": ">= 12" } }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -6487,6 +6533,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6783,9 +6842,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6797,9 +6856,9 @@ } }, "node_modules/jackspeak": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.0.tgz", - "integrity": "sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -6812,49 +6871,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jake/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jake/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -7581,13 +7597,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true, - "license": "MIT" - }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -7650,9 +7659,9 @@ } }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "dev": true, "license": "MIT", "dependencies": { @@ -7812,9 +7821,9 @@ } }, "node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", "dev": true, "license": "Apache-2.0" }, @@ -7835,6 +7844,16 @@ "dev": true, "license": "MIT" }, + "node_modules/magic-string": { + "version": "0.30.18", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.18.tgz", + "integrity": "sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -8066,6 +8085,19 @@ "node": ">=10" } }, + "node_modules/mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" + } + }, "node_modules/mock-fs": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.5.0.tgz", @@ -8077,9 +8109,9 @@ } }, "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz", + "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==", "dev": true, "license": "MIT", "dependencies": { @@ -8087,7 +8119,7 @@ "debug": "2.6.9", "depd": "~2.0.0", "on-finished": "~2.3.0", - "on-headers": "~1.0.2" + "on-headers": "~1.1.0" }, "engines": { "node": ">= 0.8.0" @@ -8159,6 +8191,13 @@ "node": ">= 0.6" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -8244,9 +8283,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.20.tgz", + "integrity": "sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==", "dev": true, "license": "MIT" }, @@ -8405,9 +8444,9 @@ } }, "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", "dev": true, "license": "MIT", "engines": { @@ -8676,9 +8715,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", - "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", + "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", "dev": true, "license": "ISC", "engines": { @@ -8702,6 +8741,13 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -8723,9 +8769,9 @@ } }, "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, "license": "MIT", "engines": { @@ -8801,6 +8847,18 @@ "node": ">=8" } }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -8865,9 +8923,9 @@ } }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", "bin": { @@ -9337,15 +9395,15 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz", - "integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", "dev": true, "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -9361,13 +9419,13 @@ } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { "node": "20 || >=22" @@ -9377,13 +9435,13 @@ } }, "node_modules/rollup": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz", - "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.0.tgz", + "integrity": "sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -9393,25 +9451,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.35.0", - "@rollup/rollup-android-arm64": "4.35.0", - "@rollup/rollup-darwin-arm64": "4.35.0", - "@rollup/rollup-darwin-x64": "4.35.0", - "@rollup/rollup-freebsd-arm64": "4.35.0", - "@rollup/rollup-freebsd-x64": "4.35.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.35.0", - "@rollup/rollup-linux-arm-musleabihf": "4.35.0", - "@rollup/rollup-linux-arm64-gnu": "4.35.0", - "@rollup/rollup-linux-arm64-musl": "4.35.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.35.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.35.0", - "@rollup/rollup-linux-riscv64-gnu": "4.35.0", - "@rollup/rollup-linux-s390x-gnu": "4.35.0", - "@rollup/rollup-linux-x64-gnu": "4.35.0", - "@rollup/rollup-linux-x64-musl": "4.35.0", - "@rollup/rollup-win32-arm64-msvc": "4.35.0", - "@rollup/rollup-win32-ia32-msvc": "4.35.0", - "@rollup/rollup-win32-x64-msvc": "4.35.0", + "@rollup/rollup-android-arm-eabi": "4.50.0", + "@rollup/rollup-android-arm64": "4.50.0", + "@rollup/rollup-darwin-arm64": "4.50.0", + "@rollup/rollup-darwin-x64": "4.50.0", + "@rollup/rollup-freebsd-arm64": "4.50.0", + "@rollup/rollup-freebsd-x64": "4.50.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.0", + "@rollup/rollup-linux-arm-musleabihf": "4.50.0", + "@rollup/rollup-linux-arm64-gnu": "4.50.0", + "@rollup/rollup-linux-arm64-musl": "4.50.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.50.0", + "@rollup/rollup-linux-ppc64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-musl": "4.50.0", + "@rollup/rollup-linux-s390x-gnu": "4.50.0", + "@rollup/rollup-linux-x64-gnu": "4.50.0", + "@rollup/rollup-linux-x64-musl": "4.50.0", + "@rollup/rollup-openharmony-arm64": "4.50.0", + "@rollup/rollup-win32-arm64-msvc": "4.50.0", + "@rollup/rollup-win32-ia32-msvc": "4.50.0", + "@rollup/rollup-win32-x64-msvc": "4.50.0", "fsevents": "~2.3.2" } }, @@ -9544,9 +9604,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -9845,13 +9905,13 @@ } }, "node_modules/socks": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", - "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "dev": true, "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -9935,6 +9995,20 @@ "node": ">= 0.8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", @@ -10217,20 +10291,19 @@ } }, "node_modules/synckit": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", - "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" + "@pkgr/core": "^0.2.9" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/synckit" } }, "node_modules/test-exclude": { @@ -10361,14 +10434,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", - "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.3", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -10378,11 +10451,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", - "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -10393,9 +10469,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -10476,20 +10552,20 @@ "license": "Apache-2.0" }, "node_modules/ts-jest": { - "version": "29.2.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz", - "integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==", + "version": "29.4.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.1.tgz", + "integrity": "sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw==", "dev": true, "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", - "ejs": "^3.1.10", "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", + "handlebars": "^4.7.8", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.1", + "semver": "^7.7.2", + "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, "bin": { @@ -10500,10 +10576,11 @@ }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { @@ -10521,9 +10598,25 @@ }, "esbuild": { "optional": true + }, + "jest-util": { + "optional": true } } }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -10568,9 +10661,9 @@ "license": "0BSD" }, "node_modules/tsup": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.4.0.tgz", - "integrity": "sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.0.tgz", + "integrity": "sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10580,6 +10673,7 @@ "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.25.0", + "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", @@ -10633,6 +10727,7 @@ "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "deprecated": "The work that was done in this beta branch won't be included in future versions", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -10804,9 +10899,9 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10824,6 +10919,27 @@ "dev": true, "license": "MIT" }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -10844,9 +10960,9 @@ } }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, @@ -11159,6 +11275,13 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -11245,16 +11368,16 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { diff --git a/src/api/AmConfigApi.ts b/src/api/AmConfigApi.ts index a00518de5..1caf22185 100644 --- a/src/api/AmConfigApi.ts +++ b/src/api/AmConfigApi.ts @@ -1,13 +1,6 @@ import { FrodoError } from '../ops/FrodoError'; -import { ResultCallback } from '../ops/OpsTypes'; -import Constants from '../shared/Constants'; import { State } from '../shared/State'; -import { getResult } from '../utils/ExportImportUtils'; -import { - getRealmPathGlobal, - getRealmsForExport, - getRealmUsingExportFormat, -} from '../utils/ForgeRockUtils'; +import { getRealmPathGlobal } from '../utils/ForgeRockUtils'; import { AmConfigEntityInterface, PagedResult } from './ApiTypes'; import { generateAmApi } from './BaseApi'; @@ -27,135 +20,8 @@ export interface AmConfigEntitiesInterface { wsEntity: AmConfigEntityInterface; } -const ALL_DEPLOYMENTS = [ - Constants.CLASSIC_DEPLOYMENT_TYPE_KEY, - Constants.CLOUD_DEPLOYMENT_TYPE_KEY, - Constants.FORGEOPS_DEPLOYMENT_TYPE_KEY, -]; -const CLASSIC_DEPLOYMENT = [Constants.CLASSIC_DEPLOYMENT_TYPE_KEY]; - -const NEXT_DESCENDENTS_ACTION = 'nextdescendents'; -const TRUE_QUERY_FILTER = 'true'; - const DEFAULT_PROTOCOL = '2.1'; -/** - * Consists of all AM entities that are not currently being exported elsewhere in Frodo. - * Endpoints and resource versions were scraped directly from the Amster entity reference documentation: https://backstage.forgerock.com/docs/amster/7.5/entity-reference/preface.html - */ -const AM_ENTITIES: Record = { - applicationTypes: { - realm: { path: '/applicationtypes', version: '1.0' }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - readonly: true, - }, - authenticationChains: { - realm: { - path: '/realm-config/authentication/chains', - version: '2.0', - importWithId: true, - queryFilter: TRUE_QUERY_FILTER, - }, - global: { - path: '/global-config/authentication/chains', - version: '1.0', - deployments: CLASSIC_DEPLOYMENT, - }, - deployments: ALL_DEPLOYMENTS, - }, - authenticationModules: { - realm: { path: '/realm-config/authentication/modules', version: '2.0' }, - global: { - path: '/global-config/authentication/modules', - version: '1.0', - deployments: CLASSIC_DEPLOYMENT, - }, - deployments: ALL_DEPLOYMENTS, - action: NEXT_DESCENDENTS_ACTION, - readonly: true, - }, - authenticationTreesConfiguration: { - global: { - path: '/global-config/authentication/authenticationtrees', - version: '1.0', - }, - deployments: CLASSIC_DEPLOYMENT, - }, - conditionTypes: { - realm: { path: '/conditiontypes', version: '1.0' }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - readonly: true, - }, - decisionCombiners: { - realm: { path: '/decisioncombiners', version: '1.0' }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - readonly: true, - }, - secrets: { - realm: { path: '/realm-config/secrets', version: '2.0' }, - global: { - path: '/global-config/secrets', - version: '1.0', - deployments: CLASSIC_DEPLOYMENT, - }, - deployments: ALL_DEPLOYMENTS, - action: NEXT_DESCENDENTS_ACTION, - readonly: true, - }, - serverInformation: { - // Note: Amster documentation says to do this by realm, but it really should be global (the API explorer does it this way and it makes more sense) - global: { path: '/serverinfo/*', version: '2.0' }, - deployments: ALL_DEPLOYMENTS, - readonly: true, - }, - serverVersion: { - // Note: Amster documentation says to do this by realm, but it really should be global (the API explorer does it this way and it makes more sense) - global: { path: '/serverinfo/version', version: '1.0' }, - deployments: ALL_DEPLOYMENTS, - readonly: true, - }, - subjectAttributes: { - // Due to a bug with this endpoint, protocol 1.0 is the only way for it to work as of version 7.5.0. - realm: { path: '/subjectattributes', version: '1.0', protocol: '1.0' }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - readonly: true, - }, - subjectTypes: { - realm: { path: '/subjecttypes', version: '1.0' }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - readonly: true, - }, - webhookService: { - realm: { - path: '/realm-config/webhooks', - version: '2.0', - importWithId: true, - queryFilter: TRUE_QUERY_FILTER, - }, - global: { - path: '/global-config/webhooks', - version: '1.0', - ifMatch: '*', - deployments: CLASSIC_DEPLOYMENT, - }, - deployments: ALL_DEPLOYMENTS, - }, - wsEntity: { - realm: { - path: '/realm-config/federation/entityproviders/ws', - version: '2.0', - importWithId: true, - }, - deployments: ALL_DEPLOYMENTS, - queryFilter: TRUE_QUERY_FILTER, - }, -}; - function getApiConfig(protocol: string, version: string) { return { apiVersion: `protocol=${protocol},resource=${version}`, @@ -268,105 +134,6 @@ export async function getConfigEntity({ } } -/** - * Get all other AM config entities - * @param {boolean} includeReadOnly Include read only config in the export - * @param {boolean} onlyRealm Get config only from the active realm. If onlyGlobal is also active, then it will also get the global config. - * @param {boolean} onlyGlobal Get global config only. If onlyRealm is also active, then it will also get the active realm config. - * @param {ResultCallback} resultCallback Optional callback to process individual results - * @returns {Promise} a promise that resolves to a config object containing global and realm config entities - */ -export async function getConfigEntities({ - includeReadOnly = false, - onlyRealm = false, - onlyGlobal = false, - resultCallback = void 0, - state, -}: { - includeReadOnly: boolean; - onlyRealm: boolean; - onlyGlobal: boolean; - resultCallback: ResultCallback; - state: State; -}): Promise { - const realms = await getRealmsForExport({ state }); - const stateRealms = realms.map(getRealmUsingExportFormat); - const entities = { - global: {}, - realm: Object.fromEntries(realms.map((r) => [r, {}])), - } as ConfigSkeleton; - for (const [key, entityInfo] of Object.entries(AM_ENTITIES)) { - if (!includeReadOnly && entityInfo.readonly) { - continue; - } - const deploymentAllowed = - entityInfo.deployments && - entityInfo.deployments.includes(state.getDeploymentType()); - if ( - (onlyGlobal || !onlyRealm) && - entityInfo.global && - ((entityInfo.global.deployments && - entityInfo.global.deployments.includes(state.getDeploymentType())) || - (entityInfo.global.deployments == undefined && deploymentAllowed)) - ) { - entities.global[key] = await getResult( - resultCallback, - `Error getting '${key}' from resource path '${entityInfo.global.path}'`, - getConfigEntity, - { - state, - path: entityInfo.global.path, - version: entityInfo.global.version, - protocol: entityInfo.global.protocol, - queryFilter: entityInfo.global.queryFilter - ? entityInfo.global.queryFilter - : entityInfo.queryFilter, - action: entityInfo.global.action - ? entityInfo.global.action - : entityInfo.action, - } - ); - } - if ( - (!onlyGlobal || onlyRealm) && - entityInfo.realm && - ((entityInfo.realm.deployments && - entityInfo.realm.deployments.includes(state.getDeploymentType())) || - (entityInfo.realm.deployments == undefined && deploymentAllowed)) - ) { - const activeRealm = state.getRealm(); - for (let i = 0; i < realms.length; i++) { - if ( - onlyRealm && - (activeRealm.startsWith('/') ? activeRealm : '/' + activeRealm) !== - stateRealms[i] - ) { - continue; - } - entities.realm[realms[i]][key] = await getResult( - resultCallback, - `Error getting '${key}' from resource path '${entityInfo.realm.path}'`, - getConfigEntity, - { - state, - path: entityInfo.realm.path, - version: entityInfo.realm.version, - protocol: entityInfo.realm.protocol, - realm: stateRealms[i], - queryFilter: entityInfo.realm.queryFilter - ? entityInfo.realm.queryFilter - : entityInfo.queryFilter, - action: entityInfo.realm.action - ? entityInfo.realm.action - : entityInfo.action, - } - ); - } - } - } - return entities; -} - /** * Puts a single am config entity at the given realm and path * @param {ConfigEntitySkeleton} entityData config entity object. If it's not provided, no import is performed. @@ -422,99 +189,3 @@ export async function putConfigEntity({ ); } } - -/** - * Put all other AM config entities - * @param {ConfigSkeleton} config the config object containing global and realm config entities - * @param {ResultCallback} resultCallback Optional callback to process individual results - * @returns {Promise} a promise that resolves to a config object containing global and realm config entities - */ -export async function putConfigEntities({ - config, - resultCallback = void 0, - state, -}: { - config: ConfigSkeleton; - resultCallback: ResultCallback; - state: State; -}): Promise { - const realms = config.realm ? Object.keys(config.realm) : []; - const stateRealms = realms.map(getRealmUsingExportFormat); - const entities = { - global: {}, - realm: Object.fromEntries(realms.map((r) => [r, {}])), - } as ConfigSkeleton; - for (const [key, entityInfo] of Object.entries(AM_ENTITIES)) { - if (entityInfo.readonly) { - continue; - } - const deploymentAllowed = - entityInfo.deployments && - entityInfo.deployments.includes(state.getDeploymentType()); - if ( - entityInfo.global && - ((entityInfo.global.deployments && - entityInfo.global.deployments.includes(state.getDeploymentType())) || - (entityInfo.global.deployments == undefined && deploymentAllowed)) && - config.global && - config.global[key] - ) { - for (const [id, entityData] of Object.entries(config.global[key])) { - if (!entities.global[key]) { - entities.global[key] = {}; - } - entities.global[key][id] = await getResult( - resultCallback, - `Error putting entity '${id}' of type '${key}' to global resource path '${entityInfo.global.path}'`, - putConfigEntity, - { - state, - entityData: entityData as ConfigEntitySkeleton, - path: - entityInfo.global.path + - (entityInfo.global.importWithId ? `/${id}` : ''), - version: entityInfo.global.version, - protocol: entityInfo.global.protocol, - ifMatch: entityInfo.global.ifMatch, - } - ); - } - } - if ( - entityInfo.realm && - ((entityInfo.realm.deployments && - entityInfo.realm.deployments.includes(state.getDeploymentType())) || - (entityInfo.realm.deployments == undefined && deploymentAllowed)) - ) { - for (let i = 0; i < realms.length; i++) { - if (!config.realm[realms[i]][key]) { - continue; - } - for (const [id, entityData] of Object.entries( - config.realm[realms[i]][key] - )) { - if (!entities.realm[realms[i]][key]) { - entities.realm[realms[i]][key] = {}; - } - entities.realm[realms[i]][key][id] = await getResult( - resultCallback, - `Error putting entity '${id}' of type '${key}' to realm resource path '${entityInfo.realm.path}'`, - putConfigEntity, - { - state, - entityData: entityData as ConfigEntitySkeleton, - path: - entityInfo.realm.path + - (entityInfo.realm.importWithId ? `/${id}` : ''), - version: entityInfo.realm.version, - protocol: entityInfo.realm.protocol, - ifMatch: entityInfo.realm.ifMatch, - realm: stateRealms[i], - } - ); - } - } - } - } - return entities; -} diff --git a/src/ops/AgentOps.ts b/src/ops/AgentOps.ts index fb53cccde..fcdff110f 100644 --- a/src/ops/AgentOps.ts +++ b/src/ops/AgentOps.ts @@ -21,6 +21,7 @@ import { updateProgressIndicator, } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; @@ -848,7 +849,19 @@ export async function readAgents({ debugMessage({ message: `AgentOps.readAgents: end`, state }); return agents; } catch (error) { - throw new FrodoError(`Error reading agents`, error); + if ( + (error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.') || + error.response?.status === 404 + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} agents`, + error + ); + } } } @@ -888,12 +901,19 @@ export async function readAgent({ return result; } } catch (error) { - throw new FrodoError(`Error reading agent ${agentId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} agent ${agentId}`, + error + ); } if (agents.length === 0) { - throw new FrodoError(`Agent '${agentId}' not found`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} agent '${agentId}' not found` + ); } else { - throw new FrodoError(`${agents.length} agents '${agentId}' found`); + throw new FrodoError( + `${agents.length} ${getCurrentRealmName(state) + ' realm'} agents '${agentId}' found` + ); } } @@ -915,7 +935,9 @@ export async function readAgentGroup({ return group; } } - throw new FrodoError(`Agent group with id '${groupId}' does not exist.`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} agent group with id '${groupId}' does not exist.` + ); } /** @@ -931,7 +953,18 @@ export async function readAgentGroups({ const { result } = await getAgentGroups({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading agent groups`, error); + if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} agent groups`, + error + ); + } } } @@ -956,7 +989,10 @@ export async function exportAgentGroup({ exportData.agentGroup[groupId] = group; return exportData; } catch (error) { - throw new FrodoError(`Error exporting agent group ${groupId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} agent group ${groupId}`, + error + ); } } @@ -979,20 +1015,20 @@ export async function exportAgentGroups({ const groups = await readAgentGroups({ state }); indicatorId = createProgressIndicator({ total: groups.length, - message: 'Exporting agent groups...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} agent groups...`, state, }); for (const group of groups) { updateProgressIndicator({ id: indicatorId, - message: `Exporting agent group ${group._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} agent group ${group._id}`, state, }); exportData.agentGroup[group._id] = group; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${groups.length} agent groups.`, + message: `Exported ${groups.length} ${getCurrentRealmName(state) + ' realm'} agent groups.`, state, }); debugMessage({ message: `AgentOps.exportAgentGroups: end`, state }); @@ -1000,11 +1036,14 @@ export async function exportAgentGroups({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting agent groups.`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} agent groups.`, status: 'fail', state, }); - throw new FrodoError(`Error reading agent groups`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} agent groups`, + error + ); } } @@ -1035,7 +1074,7 @@ export async function readAgentByTypeAndId({ return result; } catch (error) { throw new FrodoError( - `Error reading agent ${agentId} of type ${agentType}`, + `Error reading ${getCurrentRealmName(state) + ' realm'} agent ${agentId} of type ${agentType}`, error ); } @@ -1062,7 +1101,10 @@ export async function readIdentityGatewayAgents({ debugMessage({ message: `AgentOps.readIdentityGatewayAgents: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading identity gateway agents`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} identity gateway agents`, + error + ); } } @@ -1092,7 +1134,7 @@ export async function readIdentityGatewayAgent({ return result; } catch (error) { throw new FrodoError( - `Error reading identity gateway agent ${gatewayId}`, + `Error reading ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${gatewayId}`, error ); } @@ -1136,7 +1178,7 @@ export async function createIdentityGatewayAgent({ return result; } catch (error) { throw new FrodoError( - `Error creating identity gateway agent ${gatewayId}`, + `Error creating ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${gatewayId}`, error ); } @@ -1177,7 +1219,7 @@ export async function updateIdentityGatewayAgent({ return result; } catch (error) { throw new FrodoError( - `Error updating identity gateway agent ${gatewayId}`, + `Error updating ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${gatewayId}`, error ); } @@ -1201,7 +1243,10 @@ export async function readJavaAgents({ debugMessage({ message: `AgentOps.readJavaAgents: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading java agents`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} java agents`, + error + ); } } @@ -1227,7 +1272,10 @@ export async function readJavaAgent({ debugMessage({ message: `AgentOps.readJavaAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading java agent ${agentId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } @@ -1265,7 +1313,10 @@ export async function createJavaAgent({ }); return result; } catch (error) { - throw new FrodoError(`Error creating java agent ${agentId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } } @@ -1297,7 +1348,10 @@ export async function updateJavaAgent({ debugMessage({ message: `AgentOps.updateJavaAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error updating java agent ${agentId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } @@ -1315,7 +1369,10 @@ export async function readWebAgents({ state }: { state: State }) { debugMessage({ message: `AgentOps.readWebAgents: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading web agents`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} web agents`, + error + ); } } @@ -1341,7 +1398,10 @@ export async function readWebAgent({ debugMessage({ message: `AgentOps.readWebAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading web agent ${agentId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } @@ -1379,7 +1439,10 @@ export async function createWebAgent({ }); return result; } catch (error) { - throw new FrodoError(`Error creating web agent ${agentId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } } @@ -1411,7 +1474,10 @@ export async function updateWebAgent({ debugMessage({ message: `AgentOps.updateWebAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error updating web agent ${agentId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } @@ -1434,20 +1500,20 @@ export async function exportAgents({ const agents = await readAgents({ state, globalConfig }); indicatorId = createProgressIndicator({ total: agents.length, - message: 'Exporting agents...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} agents...`, state, }); for (const agent of agents) { updateProgressIndicator({ id: indicatorId, - message: `Exporting agent ${agent._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} agent ${agent._id}`, state, }); exportData.agent[agent._id] = agent; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${agents.length} agents.`, + message: `Exported ${agents.length} ${getCurrentRealmName(state) + ' realm'} agents.`, state, }); debugMessage({ message: `AgentOps.exportAgents: end`, state }); @@ -1455,11 +1521,14 @@ export async function exportAgents({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting agents`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} agents`, status: 'fail', state, }); - throw new FrodoError(`Error exporting agents`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} agents`, + error + ); } } @@ -1482,20 +1551,20 @@ export async function exportIdentityGatewayAgents({ const agents = await readIdentityGatewayAgents({ state }); indicatorId = createProgressIndicator({ total: agents.length, - message: 'Exporting IG agents...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} identity gateway agents...`, state, }); for (const agent of agents) { updateProgressIndicator({ id: indicatorId, - message: `Exporting IG agent ${agent._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${agent._id}`, state, }); exportData.agent[agent._id] = agent; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${agents.length} IG agents.`, + message: `Exported ${agents.length} ${getCurrentRealmName(state) + ' realm'} identity gateway agents.`, state, }); debugMessage({ @@ -1506,11 +1575,14 @@ export async function exportIdentityGatewayAgents({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting identity gateway agents`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} identity gateway agents`, status: 'fail', state, }); - throw new FrodoError(`Error exporting identity gateway agents`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} identity gateway agents`, + error + ); } } @@ -1530,20 +1602,20 @@ export async function exportJavaAgents({ const agents = await readJavaAgents({ state }); indicatorId = createProgressIndicator({ total: agents.length, - message: 'Exporting Java agents...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} Java agents...`, state, }); for (const agent of agents) { updateProgressIndicator({ id: indicatorId, - message: `Exporting Java agent ${agent._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} Java agent ${agent._id}`, state, }); exportData.agent[agent._id] = agent; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${agents.length} Java agents.`, + message: `Exported ${agents.length} ${getCurrentRealmName(state) + ' realm'} Java agents.`, state, }); debugMessage({ message: `AgentOps.exportJavaAgents: end`, state }); @@ -1551,11 +1623,14 @@ export async function exportJavaAgents({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting java agents`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} java agents`, status: 'fail', state, }); - throw new FrodoError(`Error exporting java agents`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} java agents`, + error + ); } } @@ -1575,20 +1650,20 @@ export async function exportWebAgents({ const agents = await readWebAgents({ state }); indicatorId = createProgressIndicator({ total: agents.length, - message: 'Exporting web agents...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} web agents...`, state, }); for (const agent of agents) { updateProgressIndicator({ id: indicatorId, - message: `Exporting web agent ${agent._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} web agent ${agent._id}`, state, }); exportData.agent[agent._id] = agent; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${agents.length} web agents.`, + message: `Exported ${agents.length} ${getCurrentRealmName(state) + ' realm'} web agents.`, state, }); debugMessage({ message: `AgentOps.exportWebAgents: end`, state }); @@ -1596,11 +1671,14 @@ export async function exportWebAgents({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting web agents`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} web agents`, status: 'fail', state, }); - throw new FrodoError(`Error exporting web agents`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} web agents`, + error + ); } } @@ -1627,7 +1705,10 @@ export async function exportAgent({ debugMessage({ message: `AgentOps.exportAgent: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting agent ${agentId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} agent ${agentId}`, + error + ); } } @@ -1661,7 +1742,7 @@ export async function exportIdentityGatewayAgent({ return exportData; } catch (error) { throw new FrodoError( - `Error exporting identity gateway agent ${agentId}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${agentId}`, error ); } @@ -1687,7 +1768,10 @@ export async function exportJavaAgent({ debugMessage({ message: `AgentOps.exportJavaAgent: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting java agent ${agentId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } @@ -1711,7 +1795,10 @@ export async function exportWebAgent({ debugMessage({ message: `AgentOps.exportWebAgent: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting web agent ${agentId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } @@ -1763,7 +1850,7 @@ export async function importAgents({ if (error.httpStatus !== 501 && error.response?.status !== 501) { errors.push( new FrodoError( - `Error importing agent ${agentId} of type ${agentType}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} agent ${agentId} of type ${agentType}`, error ) ); @@ -1771,7 +1858,10 @@ export async function importAgents({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing agents`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agents`, + errors + ); } debugMessage({ message: `AgentOps.importAgents: end`, state }); return response; @@ -1780,7 +1870,10 @@ export async function importAgents({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing agents`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agents`, + error + ); } } @@ -1813,7 +1906,7 @@ export async function importAgentGroups({ state.getDeploymentType() !== Constants.CLASSIC_DEPLOYMENT_TYPE_KEY ) { throw new FrodoError( - `Can't import Soap STS agent groups for '${state.getDeploymentType()}' deployment type.` + `Can't import ${getCurrentRealmName(state) + ' realm'} Soap STS agent groups for '${state.getDeploymentType()}' deployment type.` ); } response.push( @@ -1828,7 +1921,7 @@ export async function importAgentGroups({ if (error.httpStatus !== 501 && error.response?.status !== 501) { errors.push( new FrodoError( - `Error importing agent group ${agentGroupId} of type ${agentType}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} agent group ${agentGroupId} of type ${agentType}`, error ) ); @@ -1836,7 +1929,10 @@ export async function importAgentGroups({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing agent groups`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agent groups`, + errors + ); } debugMessage({ message: `AgentOps.importAgentGroups: end`, state }); return response; @@ -1845,7 +1941,10 @@ export async function importAgentGroups({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing agent groups`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agent groups`, + error + ); } } @@ -1884,14 +1983,17 @@ export async function importIdentityGatewayAgents({ } catch (error) { errors.push( new FrodoError( - `Error importing agent ${agentId} of type ${agentType}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} agent ${agentId} of type ${agentType}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error importing identity gateway agents`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} identity gateway agents`, + errors + ); } debugMessage({ message: `AgentOps.importIdentityGatewayAgents: end`, @@ -1902,7 +2004,10 @@ export async function importIdentityGatewayAgents({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing identity gateway agents`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} identity gateway agents`, + error + ); } } @@ -1938,14 +2043,17 @@ export async function importJavaAgents({ } catch (error) { errors.push( new FrodoError( - `Error importing agent ${agentId} of type ${agentType}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} agent ${agentId} of type ${agentType}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error importing java agents`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} java agents`, + errors + ); } debugMessage({ message: `AgentOps.importJavaAgents: end`, state }); } catch (error) { @@ -1953,7 +2061,10 @@ export async function importJavaAgents({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing java agents`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} java agents`, + error + ); } } @@ -1989,14 +2100,17 @@ export async function importWebAgents({ } catch (error) { errors.push( new FrodoError( - `Error importing agent ${agentId} of type ${agentType}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} agent ${agentId} of type ${agentType}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error importing web agents`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} web agents`, + errors + ); } debugMessage({ message: `AgentOps.importWebAgents: end`, state }); } catch (error) { @@ -2004,7 +2118,10 @@ export async function importWebAgents({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing web agents`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} web agents`, + error + ); } } @@ -2047,7 +2164,10 @@ export async function importAgent({ debugMessage({ message: `AgentOps.importAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error importing agent ${agentId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agent ${agentId}`, + error + ); } } @@ -2087,7 +2207,10 @@ export async function importAgentGroup({ debugMessage({ message: `AgentOps.importAgentGroup: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error importing agent group ${agentGroupId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} agent group ${agentGroupId}`, + error + ); } } @@ -2130,7 +2253,7 @@ export async function importIdentityGatewayAgent({ return result; } catch (error) { throw new FrodoError( - `Error importing identity gateway agent ${agentId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${agentId}`, error ); } @@ -2168,7 +2291,10 @@ export async function importJavaAgent({ debugMessage({ message: `AgentOps.importJavaAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error importing java agent ${agentId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } @@ -2204,7 +2330,10 @@ export async function importWebAgent({ debugMessage({ message: `AgentOps.importWebAgent: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error importing web agent ${agentId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } @@ -2230,7 +2359,7 @@ export async function deleteAgents({ state }: { state: State }) { } catch (error) { errors.push( new FrodoError( - `Error deleting agent ${agent['_id']} of type ${agent['_type']['_id']}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} agent ${agent['_id']} of type ${agent['_type']['_id']}`, error ) ); @@ -2274,7 +2403,7 @@ export async function deleteIdentityGatewayAgents({ state }: { state: State }) { } catch (error) { errors.push( new FrodoError( - `Error deleting agent ${agent['_id']} of type ${agent['_type']['_id']}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} agent ${agent['_id']} of type ${agent['_type']['_id']}`, error ) ); @@ -2318,14 +2447,17 @@ export async function deleteJavaAgents({ state }: { state: State }) { } catch (error) { errors.push( new FrodoError( - `Error deleting agent ${agent['_id']} of type ${agent['_type']['_id']}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} agent ${agent['_id']} of type ${agent['_type']['_id']}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error deleting java agents`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} java agents`, + errors + ); } debugMessage({ message: `AgentOps.deleteJavaAgents: end`, state }); } catch (error) { @@ -2333,7 +2465,10 @@ export async function deleteJavaAgents({ state }: { state: State }) { if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting java agents`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} java agents`, + error + ); } } @@ -2359,14 +2494,17 @@ export async function deleteWebAgents({ state }: { state: State }) { } catch (error) { errors.push( new FrodoError( - `Error deleting agent ${agent['_id']} of type ${agent['_type']['_id']}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} agent ${agent['_id']} of type ${agent['_type']['_id']}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error deleting web agents`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} web agents`, + errors + ); } debugMessage({ message: `AgentOps.deleteWebAgents: end`, state }); } catch (error) { @@ -2374,7 +2512,10 @@ export async function deleteWebAgents({ state }: { state: State }) { if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting web agents`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} web agents`, + error + ); } } @@ -2393,7 +2534,9 @@ export async function deleteAgent({ debugMessage({ message: `AgentOps.deleteAgent: start`, state }); const agents = await findAgentById({ agentId, state }); if (agents.length == 0) { - throw new FrodoError(`Agent '${agentId}' not found!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} agent '${agentId}' not found!` + ); } for (const agent of agents) { debugMessage({ @@ -2408,7 +2551,10 @@ export async function deleteAgent({ } debugMessage({ message: `AgentOps.deleteAgent: end`, state }); } catch (error) { - throw new FrodoError(`Error deleting agent ${agentId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} agent ${agentId}`, + error + ); } } @@ -2434,7 +2580,9 @@ export async function deleteIdentityGatewayAgent({ state, }); if (agents.length == 0) { - throw new FrodoError(`Identity gateway agent '${agentId}' not found!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} identity gateway agent '${agentId}' not found!` + ); } for (const agent of agents) { debugMessage({ @@ -2453,7 +2601,7 @@ export async function deleteIdentityGatewayAgent({ }); } catch (error) { throw new FrodoError( - `Error deleting identity gateway agent ${agentId}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} identity gateway agent ${agentId}`, error ); } @@ -2478,7 +2626,9 @@ export async function deleteJavaAgent({ state, }); if (agents.length == 0) { - throw new FrodoError(`Java agent '${agentId}' not found!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} java agent '${agentId}' not found!` + ); } for (const agent of agents) { debugMessage({ @@ -2493,7 +2643,10 @@ export async function deleteJavaAgent({ } debugMessage({ message: `AgentOps.deleteJavaAgent: end`, state }); } catch (error) { - throw new FrodoError(`Error deleting java agent ${agentId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} java agent ${agentId}`, + error + ); } } @@ -2516,7 +2669,9 @@ export async function deleteWebAgent({ state, }); if (agents.length == 0) { - throw new FrodoError(`Web agent '${agentId}' not found!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} web agent '${agentId}' not found!` + ); } for (const agent of agents) { debugMessage({ @@ -2531,6 +2686,9 @@ export async function deleteWebAgent({ } debugMessage({ message: `AgentOps.deleteWebAgent: end`, state }); } catch (error) { - throw new FrodoError(`Error deleting web agent ${agentId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} web agent ${agentId}`, + error + ); } } diff --git a/src/ops/AmConfigOps.ts b/src/ops/AmConfigOps.ts index 88aaf500f..c42ed81a5 100644 --- a/src/ops/AmConfigOps.ts +++ b/src/ops/AmConfigOps.ts @@ -1,10 +1,13 @@ import { AmConfigEntitiesInterface, + ConfigEntitySkeleton, ConfigSkeleton, - getConfigEntities, - putConfigEntities, + EntityInfo, + getConfigEntity, + putConfigEntity, } from '../api/AmConfigApi'; import { AmConfigEntityInterface, PagedResult } from '../api/ApiTypes'; +import Constants from '../shared/Constants'; import { State } from '../shared/State'; import { createProgressIndicator, @@ -12,8 +15,15 @@ import { stopProgressIndicator, updateProgressIndicator, } from '../utils/Console'; -import { getErrorCallback, getMetadata } from '../utils/ExportImportUtils'; -import { getRealmsForExport } from '../utils/ForgeRockUtils'; +import { + getErrorCallback, + getMetadata, + getResult, +} from '../utils/ExportImportUtils'; +import { + getRealmsForExport, + getRealmUsingExportFormat, +} from '../utils/ForgeRockUtils'; import { ExportMetaData, ResultCallback } from './OpsTypes'; export type AmConfig = { @@ -89,6 +99,133 @@ export interface ConfigEntityExportInterface { >; } +const ALL_DEPLOYMENTS = [ + Constants.CLASSIC_DEPLOYMENT_TYPE_KEY, + Constants.CLOUD_DEPLOYMENT_TYPE_KEY, + Constants.FORGEOPS_DEPLOYMENT_TYPE_KEY, +]; +const CLASSIC_DEPLOYMENT = [Constants.CLASSIC_DEPLOYMENT_TYPE_KEY]; + +const NEXT_DESCENDENTS_ACTION = 'nextdescendents'; +const TRUE_QUERY_FILTER = 'true'; + +/** + * Consists of all AM entities that are not currently being exported elsewhere in Frodo. + * Endpoints and resource versions were scraped directly from the Amster entity reference documentation: https://backstage.forgerock.com/docs/amster/7.5/entity-reference/preface.html + */ +const AM_ENTITIES: Record = { + applicationTypes: { + realm: { path: '/applicationtypes', version: '1.0' }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + readonly: true, + }, + authenticationChains: { + realm: { + path: '/realm-config/authentication/chains', + version: '2.0', + importWithId: true, + queryFilter: TRUE_QUERY_FILTER, + }, + global: { + path: '/global-config/authentication/chains', + version: '1.0', + deployments: CLASSIC_DEPLOYMENT, + }, + deployments: ALL_DEPLOYMENTS, + }, + authenticationModules: { + realm: { path: '/realm-config/authentication/modules', version: '2.0' }, + global: { + path: '/global-config/authentication/modules', + version: '1.0', + deployments: CLASSIC_DEPLOYMENT, + }, + deployments: ALL_DEPLOYMENTS, + action: NEXT_DESCENDENTS_ACTION, + readonly: true, + }, + authenticationTreesConfiguration: { + global: { + path: '/global-config/authentication/authenticationtrees', + version: '1.0', + }, + deployments: CLASSIC_DEPLOYMENT, + }, + conditionTypes: { + realm: { path: '/conditiontypes', version: '1.0' }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + readonly: true, + }, + decisionCombiners: { + realm: { path: '/decisioncombiners', version: '1.0' }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + readonly: true, + }, + secrets: { + realm: { path: '/realm-config/secrets', version: '2.0' }, + global: { + path: '/global-config/secrets', + version: '1.0', + deployments: CLASSIC_DEPLOYMENT, + }, + deployments: ALL_DEPLOYMENTS, + action: NEXT_DESCENDENTS_ACTION, + readonly: true, + }, + serverInformation: { + // Note: Amster documentation says to do this by realm, but it really should be global (the API explorer does it this way and it makes more sense) + global: { path: '/serverinfo/*', version: '2.0' }, + deployments: ALL_DEPLOYMENTS, + readonly: true, + }, + serverVersion: { + // Note: Amster documentation says to do this by realm, but it really should be global (the API explorer does it this way and it makes more sense) + global: { path: '/serverinfo/version', version: '1.0' }, + deployments: ALL_DEPLOYMENTS, + readonly: true, + }, + subjectAttributes: { + // Due to a bug with this endpoint, protocol 1.0 is the only way for it to work as of version 7.5.0. + realm: { path: '/subjectattributes', version: '1.0', protocol: '1.0' }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + readonly: true, + }, + subjectTypes: { + realm: { path: '/subjecttypes', version: '1.0' }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + readonly: true, + }, + webhookService: { + realm: { + path: '/realm-config/webhooks', + version: '2.0', + importWithId: true, + queryFilter: TRUE_QUERY_FILTER, + }, + global: { + path: '/global-config/webhooks', + version: '1.0', + ifMatch: '*', + deployments: CLASSIC_DEPLOYMENT, + }, + deployments: ALL_DEPLOYMENTS, + }, + wsEntity: { + realm: { + path: '/realm-config/federation/entityproviders/ws', + version: '2.0', + importWithId: true, + }, + deployments: ALL_DEPLOYMENTS, + queryFilter: TRUE_QUERY_FILTER, + }, +}; + /** * Create an empty config export template * @param {string[]} realms the list of realm names @@ -111,6 +248,229 @@ export async function createConfigEntityExportTemplate({ } as ConfigEntityExportInterface; } +/** + * Get all other AM config entities + * @param {boolean} includeReadOnly Include read only config in the export + * @param {boolean} onlyRealm Get config only from the active realm. If onlyGlobal is also active, then it will also get the global config. + * @param {boolean} onlyGlobal Get global config only. If onlyRealm is also active, then it will also get the active realm config. + * @param {ResultCallback} resultCallback Optional callback to process individual results + * @returns {Promise} a promise that resolves to a config object containing global and realm config entities + */ +export async function getConfigEntities({ + includeReadOnly = false, + onlyRealm = false, + onlyGlobal = false, + resultCallback = void 0, + state, +}: { + includeReadOnly: boolean; + onlyRealm: boolean; + onlyGlobal: boolean; + resultCallback: ResultCallback; + state: State; +}): Promise { + debugMessage({ + message: `AmConfigOps.getConfigEntities: start`, + state, + }); + const realms = await getRealmsForExport({ state }); + const stateRealms = realms.map(getRealmUsingExportFormat); + const entities = { + global: {}, + realm: Object.fromEntries(realms.map((r) => [r, {}])), + } as ConfigSkeleton; + for (const [key, entityInfo] of Object.entries(AM_ENTITIES)) { + if (!includeReadOnly && entityInfo.readonly) { + continue; + } + const deploymentAllowed = + entityInfo.deployments && + entityInfo.deployments.includes(state.getDeploymentType()); + if ( + (onlyGlobal || !onlyRealm) && + entityInfo.global && + ((entityInfo.global.deployments && + entityInfo.global.deployments.includes(state.getDeploymentType())) || + (entityInfo.global.deployments == undefined && deploymentAllowed)) + ) { + debugMessage({ + message: `AmConfigOps.getConfigEntities: delegating to getResult (global)`, + state, + }); + const result: ConfigEntitySkeleton = await getResult( + resultCallback, + `Error getting '${key}' from resource path '${entityInfo.global.path}'`, + getConfigEntity, + { + state, + path: entityInfo.global.path, + version: entityInfo.global.version, + protocol: entityInfo.global.protocol, + queryFilter: entityInfo.global.queryFilter + ? entityInfo.global.queryFilter + : entityInfo.queryFilter, + action: entityInfo.global.action + ? entityInfo.global.action + : entityInfo.action, + } + ); + if (result) { + entities.global[key] = result; + } + } + if ( + (!onlyGlobal || onlyRealm) && + entityInfo.realm && + ((entityInfo.realm.deployments && + entityInfo.realm.deployments.includes(state.getDeploymentType())) || + (entityInfo.realm.deployments == undefined && deploymentAllowed)) + ) { + const activeRealm = state.getRealm(); + for (let i = 0; i < realms.length; i++) { + if ( + onlyRealm && + (activeRealm.startsWith('/') ? activeRealm : '/' + activeRealm) !== + stateRealms[i] + ) { + debugMessage({ + message: `AmConfigOps.getConfigEntities: skipping realm: ${activeRealm}`, + state, + }); + continue; + } + debugMessage({ + message: `AmConfigOps.getConfigEntities: delegating to getResult (realm: ${activeRealm})`, + state, + }); + const result: ConfigEntitySkeleton = await getResult( + resultCallback, + `Error getting '${key}' from resource path '${entityInfo.realm.path}'`, + getConfigEntity, + { + state, + path: entityInfo.realm.path, + version: entityInfo.realm.version, + protocol: entityInfo.realm.protocol, + realm: stateRealms[i], + queryFilter: entityInfo.realm.queryFilter + ? entityInfo.realm.queryFilter + : entityInfo.queryFilter, + action: entityInfo.realm.action + ? entityInfo.realm.action + : entityInfo.action, + } + ); + if (result) { + entities.realm[realms[i]][key] = result; + } + } + } + } + return entities; +} + +/** + * Put all other AM config entities + * @param {ConfigSkeleton} config the config object containing global and realm config entities + * @param {ResultCallback} resultCallback Optional callback to process individual results + * @returns {Promise} a promise that resolves to a config object containing global and realm config entities + */ +export async function putConfigEntities({ + config, + resultCallback = void 0, + state, +}: { + config: ConfigSkeleton; + resultCallback: ResultCallback; + state: State; +}): Promise { + const realms = config.realm ? Object.keys(config.realm) : []; + const stateRealms = realms.map(getRealmUsingExportFormat); + const entities = { + global: {}, + realm: Object.fromEntries(realms.map((r) => [r, {}])), + } as ConfigSkeleton; + for (const [key, entityInfo] of Object.entries(AM_ENTITIES)) { + if (entityInfo.readonly) { + continue; + } + const deploymentAllowed = + entityInfo.deployments && + entityInfo.deployments.includes(state.getDeploymentType()); + if ( + entityInfo.global && + ((entityInfo.global.deployments && + entityInfo.global.deployments.includes(state.getDeploymentType())) || + (entityInfo.global.deployments == undefined && deploymentAllowed)) && + config.global && + config.global[key] + ) { + for (const [id, entityData] of Object.entries(config.global[key])) { + if (!entities.global[key]) { + entities.global[key] = {}; + } + const result: ConfigEntitySkeleton = await getResult( + resultCallback, + `Error putting entity '${id}' of type '${key}' to global resource path '${entityInfo.global.path}'`, + putConfigEntity, + { + state, + entityData: entityData as ConfigEntitySkeleton, + path: + entityInfo.global.path + + (entityInfo.global.importWithId ? `/${id}` : ''), + version: entityInfo.global.version, + protocol: entityInfo.global.protocol, + ifMatch: entityInfo.global.ifMatch, + } + ); + if (result) { + entities.global[key][id] = result; + } + } + } + if ( + entityInfo.realm && + ((entityInfo.realm.deployments && + entityInfo.realm.deployments.includes(state.getDeploymentType())) || + (entityInfo.realm.deployments == undefined && deploymentAllowed)) + ) { + for (let i = 0; i < realms.length; i++) { + if (!config.realm[realms[i]][key]) { + continue; + } + for (const [id, entityData] of Object.entries( + config.realm[realms[i]][key] + )) { + if (!entities.realm[realms[i]][key]) { + entities.realm[realms[i]][key] = {}; + } + const result: ConfigEntitySkeleton = await getResult( + resultCallback, + `Error putting entity '${id}' of type '${key}' to realm resource path '${entityInfo.realm.path}'`, + putConfigEntity, + { + state, + entityData: entityData as ConfigEntitySkeleton, + path: + entityInfo.realm.path + + (entityInfo.realm.importWithId ? `/${id}` : ''), + version: entityInfo.realm.version, + protocol: entityInfo.realm.protocol, + ifMatch: entityInfo.realm.ifMatch, + realm: stateRealms[i], + } + ); + if (result) { + entities.realm[realms[i]][key][id] = result; + } + } + } + } + } + return entities; +} + /** * Export all other AM config entities * @param {boolean} includeReadOnly Include read only config in the export diff --git a/src/ops/ApplicationOps.ts b/src/ops/ApplicationOps.ts index 5b4b6bb67..5da05ce52 100644 --- a/src/ops/ApplicationOps.ts +++ b/src/ops/ApplicationOps.ts @@ -467,7 +467,10 @@ export async function createApplication({ }); return application as ApplicationSkeleton; } catch (error) { - throw new FrodoError(`Error creating application ${applicationId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -489,7 +492,10 @@ export async function readApplication({ }); return application as ApplicationSkeleton; } catch (error) { - throw new FrodoError(`Error reading application ${applicationId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -512,14 +518,19 @@ export async function readApplicationByName({ case 1: return applications[0]; case 0: - throw new Error(`Application '${applicationName}' not found`); + throw new Error( + `${getCurrentRealmName(state) + ' realm'} application '${applicationName}' not found` + ); default: throw new Error( - `${applications.length} applications '${applicationName}' found` + `${applications.length} ${getCurrentRealmName(state) + ' realm'} applications '${applicationName}' found` ); } } catch (error) { - throw new FrodoError(`Error reading application ${applicationName}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} application ${applicationName}`, + error + ); } } @@ -531,14 +542,25 @@ export async function readApplications({ state: State; }): Promise { try { - const applications = await readManagedObjects({ - type: getRealmManagedApplication({ state }), - fields, - state, - }); - return applications as ApplicationSkeleton[]; + if ( + // there are no application objects in the root realm in an AIC deployment + state.getDeploymentType() === constants.CLOUD_DEPLOYMENT_TYPE_KEY && + getCurrentRealmName(state) === '/' + ) { + return []; + } else { + const applications = await readManagedObjects({ + type: getRealmManagedApplication({ state }), + fields, + state, + }); + return applications as ApplicationSkeleton[]; + } } catch (error) { - throw new FrodoError(`Error reading applications`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} applications`, + error + ); } } @@ -560,7 +582,10 @@ export async function updateApplication({ }); return application as ApplicationSkeleton; } catch (error) { - throw new FrodoError(`Error updating application ${applicationId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -677,7 +702,10 @@ async function exportDependencies({ state, }); } catch (error) { - throw new FrodoError(`Error exporting dependencies`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} dependencies`, + error + ); } } @@ -768,7 +796,10 @@ async function importDependencies({ } } if (errors.length) { - throw new FrodoError(`Error importing dependencies`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} dependencies`, + errors + ); } debugMessage({ message: `ApplicationOps.importDependencies: end`, @@ -779,7 +810,10 @@ async function importDependencies({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing dependencies`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} dependencies`, + error + ); } } @@ -886,7 +920,10 @@ async function deleteDependencies({ } } if (errors.length > 0) { - throw new FrodoError(`Error deleting dependencies`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} dependencies`, + errors + ); } debugMessage({ message: `ApplicationOps.deleteDependencies: end`, @@ -897,7 +934,10 @@ async function deleteDependencies({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting dependencies`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} dependencies`, + error + ); } } @@ -924,7 +964,10 @@ export async function deleteApplication({ debugMessage({ message: `ApplicationOps.deleteApplication: end`, state }); return applicationData as ApplicationSkeleton; } catch (error) { - throw new FrodoError(`Error deleting application ${applicationId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -953,7 +996,7 @@ export async function deleteApplicationByName({ } } catch (error) { throw new FrodoError( - `Error deleting application ${applicationName}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} application ${applicationName}`, error ); } @@ -1002,7 +1045,10 @@ export async function deleteApplications({ } } if (errors.length) { - throw new FrodoError(`Error deleting applications`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} applications`, + errors + ); } debugMessage({ message: `ApplicationOps.deleteApplications: end`, state }); return deleted; @@ -1011,7 +1057,10 @@ export async function deleteApplications({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting applications`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} applications`, + error + ); } } @@ -1034,7 +1083,7 @@ export async function queryApplications({ return application as ApplicationSkeleton[]; } catch (error) { throw new FrodoError( - `Error querying applications with filter ${filter}`, + `Error querying ${getCurrentRealmName(state) + ' realm'} applications with filter ${filter}`, error ); } @@ -1068,7 +1117,10 @@ export async function exportApplication({ debugMessage({ message: `ApplicationOps.exportApplication: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting application ${applicationId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -1110,7 +1162,7 @@ export async function exportApplicationByName({ return exportData; } catch (error) { throw new FrodoError( - `Error exporting application ${applicationName}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} application ${applicationName}`, error ); } @@ -1131,13 +1183,13 @@ export async function exportApplications({ const applications = await readApplications({ state }); indicatorId = createProgressIndicator({ total: applications.length, - message: 'Exporting applications...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} applications...`, state, }); for (const applicationData of applications) { updateProgressIndicator({ id: indicatorId, - message: `Exporting application ${applicationData.name}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} application ${applicationData.name}`, state, }); exportData.managedApplication[applicationData._id] = applicationData; @@ -1157,15 +1209,18 @@ export async function exportApplications({ if (errors.length > 0) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting applications`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} applications`, status: 'fail', state, }); - throw new FrodoError(`Error exporting applications`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} applications`, + errors + ); } stopProgressIndicator({ id: indicatorId, - message: `Exported ${applications.length} applications`, + message: `Exported ${applications.length} ${getCurrentRealmName(state) + ' realm'} applications`, state, }); debugMessage({ message: `ApplicationOps.exportApplication: end`, state }); @@ -1173,7 +1228,7 @@ export async function exportApplications({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting applications`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} applications`, status: 'fail', state, }); @@ -1181,7 +1236,10 @@ export async function exportApplications({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting applications`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} applications`, + error + ); } } @@ -1229,7 +1287,7 @@ export async function importApplication({ } if (errors.length > 0) { throw new FrodoError( - `Error importing application ${applicationId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, errors ); } @@ -1244,7 +1302,10 @@ export async function importApplication({ if (errors.length > 0 || imported.length == 0) { throw error; } - throw new FrodoError(`Error importing application ${applicationId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} application ${applicationId}`, + error + ); } } @@ -1294,7 +1355,7 @@ export async function importApplicationByName({ } if (errors.length > 0) { throw new FrodoError( - `Error importing application ${applicationName}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} application ${applicationName}`, errors ); } @@ -1310,7 +1371,7 @@ export async function importApplicationByName({ throw error; } throw new FrodoError( - `Error importing application ${applicationName}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} application ${applicationName}`, error ); } @@ -1355,7 +1416,10 @@ export async function importFirstApplication({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first application`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} application`, + errors + ); } if (0 === imported.length) { throw new FrodoError( @@ -1368,7 +1432,10 @@ export async function importFirstApplication({ if (errors.length > 0 || imported.length == 0) { throw error; } - throw new FrodoError(`Error importing first application`, error); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} application`, + error + ); } } @@ -1414,7 +1481,10 @@ export async function importApplications({ } } if (errors.length) { - throw new FrodoError(`Error importing applications`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} applications`, + errors + ); } return response; } catch (error) { @@ -1422,6 +1492,9 @@ export async function importApplications({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing applications`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} applications`, + error + ); } } diff --git a/src/ops/AuthenticationSettingsOps.ts b/src/ops/AuthenticationSettingsOps.ts index 6667491df..6840f6987 100644 --- a/src/ops/AuthenticationSettingsOps.ts +++ b/src/ops/AuthenticationSettingsOps.ts @@ -6,6 +6,7 @@ import { import { State } from '../shared/State'; import { debugMessage } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; @@ -112,7 +113,18 @@ export async function readAuthenticationSettings({ const settings = await _getAuthenticationSettings({ state, globalConfig }); return settings; } catch (error) { - throw new FrodoError(`Error reading authentication settings`, error); + if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return null; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} authentication settings`, + error + ); + } } } @@ -141,7 +153,10 @@ export async function updateAuthenticationSettings({ }); return response; } catch (error) { - throw new FrodoError(`Error updating authentication settings`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} authentication settings`, + error + ); } } @@ -174,7 +189,10 @@ export async function exportAuthenticationSettings({ }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting authentication settings`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} authentication settings`, + error + ); } } @@ -202,6 +220,9 @@ export async function importAuthenticationSettings({ }); return response; } catch (error) { - throw new FrodoError(`Error importing authentication settings`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} authentication settings`, + error + ); } } diff --git a/src/ops/CirclesOfTrustOps.ts b/src/ops/CirclesOfTrustOps.ts index eb908171e..59f03051c 100644 --- a/src/ops/CirclesOfTrustOps.ts +++ b/src/ops/CirclesOfTrustOps.ts @@ -16,6 +16,7 @@ import { updateProgressIndicator, } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; import { readSaml2EntityIds } from './Saml2Ops'; @@ -262,7 +263,10 @@ export async function readCirclesOfTrust({ }); return result; } catch (error) { - throw new FrodoError(`Error reading circles of trust`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} circles of trust`, + error + ); } } @@ -282,7 +286,10 @@ export async function readCircleOfTrust({ const response = await _getCircleOfTrust({ cotId, state }); return response; } catch (error) { - throw new FrodoError(`Error reading circle of trust ${cotId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ); } } @@ -316,13 +323,13 @@ export async function createCircleOfTrust({ return response; } catch (updateError) { throw new FrodoError( - `Error creating circle of trust ${cotId}`, + `Error creating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, updateError ); } } else { throw new FrodoError( - `Error creating circle of trust ${cotId}`, + `Error creating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, createError ); } @@ -359,10 +366,16 @@ export async function updateCircleOfTrust({ const response = await _updateCircleOfTrust({ cotId, cotData, state }); return response || cotData; } catch (error) { - throw new FrodoError(`Error updating circle of trust ${cotId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ); } } else { - throw new FrodoError(`Error updating circle of trust ${cotId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ); } } } @@ -383,7 +396,10 @@ export async function deleteCircleOfTrust({ const response = await _deleteCircleOfTrust({ cotId, state }); return response; } catch (error) { - throw new FrodoError(`Error deleting circle of trust ${cotId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ); } } @@ -414,7 +430,10 @@ export async function deleteCirclesOfTrust({ } } if (errors.length > 0) { - throw new FrodoError(`Error deleting circles of trust`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} circles of trust`, + errors + ); } debugMessage({ message: `CirclesOfTrustOps.deleteCirclesOfTrust: end`, @@ -426,7 +445,10 @@ export async function deleteCirclesOfTrust({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting circles of trust`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} circles of trust`, + errors + ); } } @@ -459,7 +481,10 @@ export async function exportCircleOfTrust({ }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting circle of trust ${cotId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ); } } @@ -486,25 +511,25 @@ export async function exportCirclesOfTrust({ options?: CircleOfTrustExportOptions; state: State; }): Promise { + const exportData = createCirclesOfTrustExportTemplate({ state }); try { debugMessage({ message: `CirclesOfTrustOps.exportCirclesOfTrust: start`, state, }); - const exportData = createCirclesOfTrustExportTemplate({ state }); let indicatorId: string; const cots = await readCirclesOfTrust({ entityProviders, state }); if (options.indicateProgress) indicatorId = createProgressIndicator({ total: cots.length, - message: 'Exporting circles of trust...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} circles of trust...`, state, }); for (const cot of cots) { if (options.indicateProgress) updateProgressIndicator({ id: indicatorId, - message: `Exporting circle of trust ${cot._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} circle of trust ${cot._id}`, state, }); exportData.saml.cot[cot._id] = cot; @@ -513,7 +538,9 @@ export async function exportCirclesOfTrust({ stopProgressIndicator({ id: indicatorId, message: - cots.length > 1 ? `Exported ${cots.length} circles of trust.` : null, + cots.length > 1 + ? `Exported ${cots.length} ${getCurrentRealmName(state) + ' realm'} circles of trust.` + : null, state, }); debugMessage({ @@ -522,7 +549,17 @@ export async function exportCirclesOfTrust({ }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting circles of trust`); + if ( + error.httpStatus === 403 && + error.httpMessage === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return exportData; + } else { + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} circles of trust` + ); + } } } @@ -612,7 +649,9 @@ export async function importCircleOfTrust({ if (imported.length == 0) { throw error; } - throw new FrodoError(`Error importing circle of trust ${cotId}`); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}` + ); } } @@ -687,7 +726,10 @@ export async function importFirstCircleOfTrust({ break; } } catch (error) { - throw new FrodoError(`Error importing first circle of trust`, error); + throw new FrodoError( + `Error importing first circle of trust into ${getCurrentRealmName(state) + ' realm'}`, + error + ); } throw new FrodoError(`No circles of trust found in import data!`); } @@ -840,14 +882,16 @@ export async function importCirclesOfTrust({ } } catch (error) { debugMessage({ - message: `Error ${error.response?.status} creating/updating circle of trust: ${error.response?.data?.message}`, + message: `Error ${error.response?.status} creating/updating ${getCurrentRealmName(state) + ' realm'} circle of trust: ${error.response?.data?.message}`, state, }); errors.push(error); } } if (errors.length > 0) { - throw new FrodoError(`Error importing circles of trust`); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} circles of trust` + ); } return responses; } catch (error) { @@ -855,6 +899,9 @@ export async function importCirclesOfTrust({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing circles of trust`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} circles of trust`, + error + ); } } diff --git a/src/ops/ConfigOps.ts b/src/ops/ConfigOps.ts index 369d4ed36..4a6df1c00 100644 --- a/src/ops/ConfigOps.ts +++ b/src/ops/ConfigOps.ts @@ -358,6 +358,7 @@ export async function exportFullConfiguration({ resultCallback ); + // export global config let globalConfig = {} as FullGlobalExportInterface; if (!onlyRealm || onlyGlobal) { // Export mappings diff --git a/src/ops/IdmConfigOps.ts b/src/ops/IdmConfigOps.ts index 3d4a287a3..d3f5ae718 100644 --- a/src/ops/IdmConfigOps.ts +++ b/src/ops/IdmConfigOps.ts @@ -632,14 +632,16 @@ export async function exportConfigEntities({ (await Promise.all(entityPromises)) .filter((c) => c) .forEach((entity) => { - const substitutedEntity = substituteEntityWithEnv( - entity as IdObjectSkeletonInterface, - options.envReplaceParams - ); - exportData.idm[(entity as IdObjectSkeletonInterface)._id] = - substitutedEntity; - if (resultCallback) { - resultCallback(undefined, substitutedEntity); + if (entity) { + const substitutedEntity = substituteEntityWithEnv( + entity as IdObjectSkeletonInterface, + options.envReplaceParams + ); + exportData.idm[(entity as IdObjectSkeletonInterface)._id] = + substitutedEntity; + if (resultCallback) { + resultCallback(undefined, substitutedEntity); + } } }); stopProgressIndicator({ @@ -795,30 +797,31 @@ export async function deleteConfigEntities({ message: `IdmConfigOps.deleteConfigEntities: start`, state, }); - const result: IdObjectSkeletonInterface[] = []; + const results: IdObjectSkeletonInterface[] = []; const configEntityStubs = await readConfigEntityStubs({ state }); for (const configEntityStub of configEntityStubs) { debugMessage({ message: `IdmConfigOps.deleteConfigEntities: '${configEntityStub['_id']}'`, state, }); - result.push( - await getResult( - resultCallback, - `Error deleting idm config entity ${configEntityStub._id}`, - _deleteConfigEntity, - { - entityId: configEntityStub['_id'], - state, - } - ) + const result: IdObjectSkeletonInterface = await getResult( + resultCallback, + `Error deleting idm config entity ${configEntityStub._id}`, + _deleteConfigEntity, + { + entityId: configEntityStub['_id'], + state, + } ); + if (result) { + results.push(result); + } } debugMessage({ message: `IdmConfigOps.deleteConfigEntities: end`, state, }); - return result; + return results; } export async function deleteConfigEntitiesByType({ @@ -834,30 +837,31 @@ export async function deleteConfigEntitiesByType({ message: `IdmConfigOps.deleteConfigEntitiesByType: start`, state, }); - const result: IdObjectSkeletonInterface[] = []; + const results: IdObjectSkeletonInterface[] = []; const configEntities = await readConfigEntitiesByType({ type, state }); for (const configEntity of configEntities) { debugMessage({ message: `IdmConfigOps.deleteConfigEntitiesByType: '${configEntity['_id']}'`, state, }); - result.push( - await getResult( - resultCallback, - `Error deleting idm config entity ${configEntity._id}`, - _deleteConfigEntity, - { - entityId: configEntity['_id'] as string, - state, - } - ) + const result: IdObjectSkeletonInterface = await getResult( + resultCallback, + `Error deleting idm config entity ${configEntity._id}`, + _deleteConfigEntity, + { + entityId: configEntity['_id'] as string, + state, + } ); + if (result) { + results.push(result); + } } debugMessage({ message: `IdmConfigOps.deleteConfigEntitiesByType: end`, state, }); - return result; + return results; } export async function deleteConfigEntity({ diff --git a/src/ops/IdpOps.ts b/src/ops/IdpOps.ts index faa37c097..864b324a0 100644 --- a/src/ops/IdpOps.ts +++ b/src/ops/IdpOps.ts @@ -5,6 +5,7 @@ import { putProviderByTypeAndId as _putProviderByTypeAndId, type SocialIdpSkeleton, } from '../api/SocialIdentityProvidersApi'; +import Constants from '../shared/Constants'; import { State } from '../shared/State'; import { createProgressIndicator, @@ -18,6 +19,7 @@ import { convertTextArrayToBase64, getMetadata, } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; import { updateScript } from './ScriptOps'; @@ -420,7 +422,24 @@ export async function readSocialIdentityProviders({ const { result } = await _getSocialIdentityProviders({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading providers`, error); + if ( + // service accounts don't have access to social idps in root realm in AIC + (state.getDeploymentType() === Constants.CLOUD_DEPLOYMENT_TYPE_KEY && + error.response?.status === 403 && + state.getUseBearerTokenForAmApis() && + getCurrentRealmName(state) === '/') || + // hm... not sure if this clause ever tiggers + (error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.') + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} providers`, + error + ); + } } } @@ -450,7 +469,10 @@ export async function readSocialIdentityProvider({ throw new FrodoError(`Multiple providers found`); } } catch (error) { - throw new FrodoError(`Error reading provider ${providerId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + error + ); } } @@ -485,10 +507,15 @@ export async function createSocialIdentityProvider({ }); return result; } catch (error) { - throw new FrodoError(`Error creating provider ${providerId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + error + ); } } - throw new FrodoError(`Provider ${providerId} already exists`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} provider ${providerId} already exists` + ); } export async function updateSocialIdentityProvider({ @@ -552,7 +579,10 @@ export async function updateSocialIdentityProvider({ return response; } else { // unhandleable error - throw new FrodoError(`Error updating provider ${providerId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + error + ); } } } @@ -603,7 +633,10 @@ export async function deleteSocialIdentityProviders({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting providers`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} providers`, + error + ); } } @@ -637,7 +670,10 @@ export async function deleteSocialIdentityProvider({ throw new Error(`Multiple providers found`); } } catch (error) { - throw new FrodoError(`Error deleting provider ${providerId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + error + ); } } @@ -669,13 +705,18 @@ export async function exportSocialIdentityProvider({ ); exportData.script[idpData.transform] = scriptData; } catch (error) { - throw new FrodoError(`Error reading script ${idpData.transform}`); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} script ${idpData.transform}` + ); } } debugMessage({ message: `IdpOps.exportSocialProvider: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting provider ${providerId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + error + ); } } @@ -697,14 +738,14 @@ export async function exportSocialIdentityProviders({ const allIdpsData = await readSocialIdentityProviders({ state }); indicatorId = createProgressIndicator({ total: allIdpsData.length, - message: 'Exporting providers', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} providers`, state, }); for (const idpData of allIdpsData) { try { updateProgressIndicator({ id: indicatorId, - message: `Exporting provider ${idpData._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} provider ${idpData._id}`, state, }); exportData.idp[idpData._id] = idpData; @@ -725,22 +766,28 @@ export async function exportSocialIdentityProviders({ } } if (errors.length > 0) { - throw new FrodoError(`Error exporting dependencies`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} dependencies`, + errors + ); } stopProgressIndicator({ id: indicatorId, - message: `${allIdpsData.length} providers exported.`, + message: `${allIdpsData.length} ${getCurrentRealmName(state) + ' realm'} providers exported.`, state, }); return exportData; } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting providers`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} providers`, status: 'fail', state, }); - throw new FrodoError(`Error exporting providers`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} providers`, + error + ); } } @@ -795,10 +842,15 @@ export async function importSocialIdentityProvider({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing provider ${providerId}`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} provider ${providerId}`, + errors + ); } if (0 === imported.length) { - throw new FrodoError(`Provider ${providerId} not found in import data`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} provider ${providerId} not found in import data` + ); } return response; } @@ -850,7 +902,10 @@ export async function importFirstSocialIdentityProvider({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first provider`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} provider`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No providers found in import data`); @@ -908,7 +963,10 @@ export async function importSocialIdentityProviders({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing providers`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} providers`, + errors + ); } return response; } diff --git a/src/ops/JourneyOps.ts b/src/ops/JourneyOps.ts index 72e03ac36..435b88880 100644 --- a/src/ops/JourneyOps.ts +++ b/src/ops/JourneyOps.ts @@ -798,7 +798,7 @@ async function getSaml2NodeDependencies( } saml2EntityPromises.push(providerResponse); } catch (error) { - error.message = `Error reading saml2 dependencies: ${ + error.message = `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 dependencies: ${ error.response?.data?.message || error.message }`; errors.push(error); @@ -829,14 +829,16 @@ async function getSaml2NodeDependencies( circlesOfTrust, }; } catch (error) { - error.message = `Error reading saml2 dependencies: ${ + error.message = `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 dependencies: ${ error.response?.data?.message || error.message }`; errors.push(error); } if (errors.length) { const errorMessages = errors.map((error) => error.message).join('\n'); - throw new Error(`Saml2 dependencies error:\n${errorMessages}`); + throw new Error( + `${getCurrentRealmName(state) + ' realm'} saml2 dependencies error:\n${errorMessages}` + ); } return saml2NodeDependencies; } @@ -1160,7 +1162,12 @@ export async function exportJourney({ } } } catch (error) { - errors.push(new FrodoError(`Error reading inner nodes`, error)); + errors.push( + new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} inner nodes`, + error + ) + ); } // Process email templates @@ -1235,7 +1242,12 @@ export async function exportJourney({ } } } catch (error) { - errors.push(new FrodoError(`Error reading saml2 dependencies`, error)); + errors.push( + new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 dependencies`, + error + ) + ); } // Process socialIdentityProviders @@ -1274,7 +1286,10 @@ export async function exportJourney({ } } catch (error) { errors.push( - new FrodoError(`Error reading social identity providers`, error) + new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} social identity providers`, + error + ) ); } @@ -1318,7 +1333,12 @@ export async function exportJourney({ } } } catch (error) { - errors.push(new FrodoError(`Error reading scripts`, error)); + errors.push( + new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} scripts`, + error + ) + ); } // Process themes @@ -1361,7 +1381,10 @@ export async function exportJourney({ errors.push(error); } if (errors.length > 0) { - throw new FrodoError(`Error exporting journey ${journeyId}`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + errors + ); } debugMessage({ message: `JourneyOps.exportJourney: end [journey=${journeyId}]`, @@ -1393,18 +1416,13 @@ export async function exportJourneys({ const trees = await readJourneys({ state }); const indicatorId = createProgressIndicator({ total: trees.length, - message: 'Exporting journeys...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} journeys...`, state, }); for (const tree of trees) { - updateProgressIndicator({ - id: indicatorId, - message: `Exporting journey ${tree._id}`, - state, - }); const exportData: SingleTreeExportInterface = await getResult( resultCallback, - `Error exporting the journey ${tree._id}`, + `Error exporting the ${getCurrentRealmName(state) + ' realm'} journey ${tree._id}`, exportJourney, { journeyId: tree._id, @@ -1412,12 +1430,19 @@ export async function exportJourneys({ state, } ); - delete exportData.meta; - multiTreeExport.trees[tree._id] = exportData; + if (exportData) { + delete exportData.meta; + multiTreeExport.trees[tree._id] = exportData; + updateProgressIndicator({ + id: indicatorId, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} journey ${tree._id}`, + state, + }); + } } stopProgressIndicator({ id: indicatorId, - message: `Exported ${trees.length} journeys.`, + message: `Exported ${trees.length} ${getCurrentRealmName(state) + ' realm'} journeys.`, state, }); return multiTreeExport; @@ -1437,7 +1462,10 @@ export async function readJourneys({ result.sort((a, b) => a._id.localeCompare(b._id)); return result; } catch (error) { - throw new FrodoError(`Error reading journeys`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} journeys`, + error + ); } } @@ -1457,7 +1485,10 @@ export async function readJourney({ const response = await getTree({ id: journeyId, state }); return response; } catch (error) { - throw new FrodoError(`Error reading journey ${journeyId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + error + ); } } @@ -1488,10 +1519,15 @@ export async function createJourney({ debugMessage({ message: `JourneyOps.createJourney: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error creating journey ${journeyId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + error + ); } } - throw new FrodoError(`Journey ${journeyId} already exists!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} journey ${journeyId} already exists!` + ); } /** @@ -1516,7 +1552,10 @@ export async function updateJourney({ }); return response; } catch (error) { - throw new FrodoError(`Error updating journey ${journeyId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + error + ); } } @@ -1584,7 +1623,7 @@ export async function importJourney({ } catch (error) { errors.push( new FrodoError( - `Error importing script ${scriptObject['name']} (${scriptId}) in journey ${treeId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} script ${scriptObject['name']} (${scriptId}) in journey ${treeId}`, error ) ); @@ -1642,7 +1681,12 @@ export async function importJourney({ try { await updateThemes({ themeMap: themes, state }); } catch (error) { - errors.push(new FrodoError(`Error importing themes`, error)); + errors.push( + new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} themes`, + error + ) + ); } } @@ -1691,14 +1735,14 @@ export async function importJourney({ }); } catch (importError2) { throw new FrodoError( - `Error importing provider ${providerId} in journey ${treeId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} provider ${providerId} in journey ${treeId}`, importError2 ); } } else { errors.push( new FrodoError( - `Error importing provider ${providerId} in journey ${treeId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} provider ${providerId} in journey ${treeId}`, error ) ); @@ -1761,7 +1805,10 @@ export async function importJourney({ }); } catch (error) { errors.push( - new FrodoError(`Error creating provider ${entityId}`, error) + new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} provider ${entityId}`, + error + ) ); } } else { @@ -1773,7 +1820,10 @@ export async function importJourney({ }); } catch (error) { errors.push( - new FrodoError(`Error updating provider ${entityId}`, error) + new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} provider ${entityId}`, + error + ) ); } } @@ -1815,14 +1865,17 @@ export async function importJourney({ } catch (updateCotErr) { errors.push( new FrodoError( - `Error updating circle of trust ${cotId}`, + `Error updating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, updateCotErr ) ); } } else { errors.push( - new FrodoError(`Error creating circle of trust ${cotId}`, error) + new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} circle of trust ${cotId}`, + error + ) ); } } @@ -1923,7 +1976,7 @@ export async function importJourney({ 'Data validation failed for the attribute, Script' ) { throw new FrodoError( - `Missing script ${ + `Missing ${getCurrentRealmName(state) + ' realm'} script ${ innerNodeData['script'] } referenced by inner node ${innerNodeId}${ innerNodeId === newUuid ? '' : ` [${newUuid}]` @@ -1958,7 +2011,7 @@ export async function importJourney({ }); } catch (nodeImportError2) { throw new FrodoError( - `Error importing node ${innerNodeId}${ + `Error importing ${getCurrentRealmName(state) + ' realm'} node ${innerNodeId}${ innerNodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId}`, nodeImportError2 @@ -1966,14 +2019,14 @@ export async function importJourney({ } } else if (nodeImportError.response?.status === 404) { throw new FrodoError( - `Unable to import node ${innerNodeId}${ + `Unable to import ${getCurrentRealmName(state) + ' realm'} node ${innerNodeId}${ innerNodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId} because its type ${(innerNodeData as NodeSkeleton)._type._id} doesn't exist in deployment`, nodeImportError ); } else { throw new FrodoError( - `Error importing inner node ${innerNodeId}${ + `Error importing ${getCurrentRealmName(state) + ' realm'} inner node ${innerNodeId}${ innerNodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId}`, nodeImportError @@ -2063,7 +2116,7 @@ export async function importJourney({ 'Data validation failed for the attribute, Script' ) { throw new FrodoError( - `Missing script ${ + `Missing ${getCurrentRealmName(state) + ' realm'} script ${ nodeData['script'] } referenced by node ${nodeId}${ nodeId === newUuid ? '' : ` [${newUuid}]` @@ -2093,7 +2146,7 @@ export async function importJourney({ await putNode({ nodeId: newUuid, nodeType, nodeData, state }); } catch (nodeImportError2) { throw new FrodoError( - `Error importing node ${nodeId}${ + `Error importing ${getCurrentRealmName(state) + ' realm'} node ${nodeId}${ nodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId}`, nodeImportError2 @@ -2101,14 +2154,14 @@ export async function importJourney({ } } else if (nodeImportError.response?.status === 404) { throw new FrodoError( - `Unable to import node ${nodeId}${ + `Unable to import ${getCurrentRealmName(state) + ' realm'} node ${nodeId}${ nodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId} because its type ${nodeData._type._id} doesn't exist in deployment`, nodeImportError ); } else { throw new FrodoError( - `Error importing node ${nodeId}${ + `Error importing ${getCurrentRealmName(state) + ' realm'} node ${nodeId}${ nodeId === newUuid ? '' : ` [${newUuid}]` } in journey ${treeId}`, nodeImportError @@ -2215,14 +2268,17 @@ export async function importJourney({ } catch (importError2) { errors.push( new FrodoError( - `Error importing journey flow ${treeId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} journey flow ${treeId}`, importError2 ) ); } } else { errors.push( - new FrodoError(`Error importing journey flow ${treeId}`, importError) + new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} journey flow ${treeId}`, + importError + ) ); } } @@ -2231,7 +2287,7 @@ export async function importJourney({ } if (errors.length > 0) { throw new FrodoError( - `Error importing journey${importData && importData.tree && importData.tree._id ? ` '${importData.tree._id}'` : ''}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} journey${importData && importData.tree && importData.tree._id ? ` '${importData.tree._id}'` : ''}`, errors ); } @@ -2415,7 +2471,7 @@ export async function importJourneys({ const resolvedJourneys = []; let indicatorId = createProgressIndicator({ total: undefined, - message: 'Resolving dependencies', + message: `Resolving ${getCurrentRealmName(state) + ' realm'} dependencies`, type: 'indeterminate', state, }); @@ -2429,7 +2485,7 @@ export async function importJourneys({ // no unresolved journeys stopProgressIndicator({ id: indicatorId, - message: `Resolved all dependencies.`, + message: `Resolved all ${getCurrentRealmName(state) + ' realm'} dependencies.`, status: 'success', state, }); @@ -2438,14 +2494,14 @@ export async function importJourneys({ id: indicatorId, message: `${ Object.keys(unresolvedJourneys).length - } journeys with unresolved dependencies`, + } ${getCurrentRealmName(state) + ' realm'} journeys with unresolved dependencies`, status: 'fail', state, }); const message: string[] = [ `${ Object.keys(unresolvedJourneys).length - } journeys with unresolved dependencies:`, + } ${getCurrentRealmName(state) + ' realm'} journeys with unresolved dependencies:`, ]; for (const journey of Object.keys(unresolvedJourneys)) { message.push(` - ${journey} requires ${unresolvedJourneys[journey]}`); @@ -2454,13 +2510,13 @@ export async function importJourneys({ } indicatorId = createProgressIndicator({ total: resolvedJourneys.length, - message: 'Importing', + message: `Importing into ${getCurrentRealmName(state) + ' realm'}`, state, }); for (const tree of resolvedJourneys) { const result = await getResult( resultCallback, - `Error importing the journey ${tree._id}`, + `Error importing the ${getCurrentRealmName(state) + ' realm'} journey ${tree._id}`, importJourney, { importData: importData.trees[tree], @@ -2468,12 +2524,14 @@ export async function importJourneys({ state, } ); - response.push(result); - updateProgressIndicator({ id: indicatorId, message: `${tree}`, state }); + if (result) { + response.push(result); + updateProgressIndicator({ id: indicatorId, message: `${tree}`, state }); + } } stopProgressIndicator({ id: indicatorId, - message: 'Finished importing journeys', + message: `Finished importing ${getCurrentRealmName(state) + ' realm'} journeys`, state, }); return response; @@ -2794,7 +2852,7 @@ export async function deleteJourney({ if (progress) indicatorId = createProgressIndicator({ total: undefined, - message: `Deleting ${journeyId}...`, + message: `Deleting ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}...`, type: 'indeterminate', state, }); @@ -2951,7 +3009,7 @@ export async function deleteJourney({ if (errorCount === 0) { stopProgressIndicator({ id: indicatorId, - message: `Deleted ${journeyId} and ${ + message: `Deleted ${getCurrentRealmName(state) + ' realm'} journey ${journeyId} and ${ nodeCount - errorCount }/${nodeCount} nodes.`, status: 'success', @@ -2960,7 +3018,7 @@ export async function deleteJourney({ } else { stopProgressIndicator({ id: indicatorId, - message: `Deleted ${journeyId} and ${ + message: `Deleted ${getCurrentRealmName(state) + ' realm'} journey ${journeyId} and ${ nodeCount - errorCount }/${nodeCount} nodes.`, status: 'fail', @@ -2975,13 +3033,13 @@ export async function deleteJourney({ status['error'] = error; stopProgressIndicator({ id: indicatorId, - message: `Error deleting ${journeyId}.`, + message: `Error deleting ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}.`, status: 'fail', state, }); if (verbose) printMessage({ - message: `Error deleting tree ${journeyId}: ${error}`, + message: `Error deleting ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}: ${error}`, type: 'error', state, }); @@ -3015,7 +3073,7 @@ export async function deleteJourneys({ const trees = (await getTrees({ state })).result; const indicatorId = createProgressIndicator({ total: trees.length, - message: 'Deleting journeys...', + message: `Deleting ${getCurrentRealmName(state) + ' realm'} journeys...`, state, }); for (const tree of trees) { @@ -3042,7 +3100,10 @@ export async function deleteJourneys({ if (resultCallback) { resultCallback(e, undefined); } else { - throw new FrodoError(`Error deleting the journey ${tree._id}`, e); + throw new FrodoError( + `Error deleting the ${getCurrentRealmName(state) + ' realm'} journey ${tree._id}`, + e + ); } } } @@ -3065,7 +3126,7 @@ export async function deleteJourneys({ id: indicatorId, message: `Deleted ${ journeyCount - journeyErrorCount - }/${journeyCount} journeys and ${ + }/${journeyCount} ${getCurrentRealmName(state) + ' realm'} journeys and ${ nodeCount - nodeErrorCount }/${nodeCount} nodes.`, state, @@ -3096,7 +3157,10 @@ export async function enableJourney({ }); return newTreeObject; } catch (error) { - throw new FrodoError(`Error enabling journey ${journeyId}`, error); + throw new FrodoError( + `Error enabling ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + error + ); } } @@ -3123,6 +3187,9 @@ export async function disableJourney({ }); return newTreeObject; } catch (error) { - throw new FrodoError(`Error disabling journey ${journeyId}`, error); + throw new FrodoError( + `Error disabling ${getCurrentRealmName(state) + ' realm'} journey ${journeyId}`, + error + ); } } diff --git a/src/ops/OAuth2ClientOps.ts b/src/ops/OAuth2ClientOps.ts index fdabbf10a..f49e9b178 100644 --- a/src/ops/OAuth2ClientOps.ts +++ b/src/ops/OAuth2ClientOps.ts @@ -19,6 +19,7 @@ import { convertBase64TextToArray, getMetadata, } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { readOAuth2Provider } from './OAuth2ProviderOps'; import { ExportMetaData } from './OpsTypes'; @@ -305,7 +306,18 @@ export async function readOAuth2Clients({ const clients = (await _getOAuth2Clients({ state })).result; return clients; } catch (error) { - throw new FrodoError(`Error reading oauth2 clients`, error); + if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} oauth2 clients`, + error + ); + } } } @@ -324,7 +336,10 @@ export async function readOAuth2Client({ try { return _getOAuth2Client({ id: clientId, state }); } catch (error) { - throw new FrodoError(`Error reading oauth2 client ${clientId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + error + ); } } @@ -359,10 +374,15 @@ export async function createOAuth2Client({ }); return result; } catch (error) { - throw new FrodoError(`Error creating oauth2 client ${clientId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + error + ); } } - throw new FrodoError(`OAuth2 client ${clientId} already exists!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} oAuth2 client ${clientId} already exists!` + ); } /** @@ -423,10 +443,16 @@ export async function updateOAuth2Client({ }); return response; } catch (error) { - throw new FrodoError(`Error updating oauth2 client ${clientId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + error + ); } } else { - throw new FrodoError(`Error updating oauth2 client ${clientId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + error + ); } } } @@ -469,7 +495,10 @@ export async function deleteOAuth2Clients({ errors.push(error); } if (errors.length) { - throw new FrodoError(`Error deleting oauth2 clients`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} oauth2 clients`, + errors + ); } debugMessage({ message: `OAuth2ClientOps.deleteOAuth2Clients: end`, @@ -493,7 +522,10 @@ export async function deleteOAuth2Client({ try { return _deleteOAuth2Client({ id: clientId, state }); } catch (error) { - throw new FrodoError(`Error deleting oauth2 client ${clientId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + error + ); } } @@ -538,7 +570,7 @@ async function exportOAuth2ClientDependencies( ) ) { throw new FrodoError( - `Error retrieving script ${scriptId} referenced by ${key} key in client ${clientData['_id']}`, + `Error retrieving ${getCurrentRealmName(state) + ' realm'} script ${scriptId} referenced by ${key} key in client ${clientData['_id']}`, error ); } @@ -577,13 +609,13 @@ export async function exportOAuth2Clients({ const clients = await readOAuth2Clients({ state }); indicatorId = createProgressIndicator({ total: clients.length, - message: 'Exporting OAuth2 clients...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} OAuth2 clients...`, state, }); for (const client of clients) { updateProgressIndicator({ id: indicatorId, - message: `Exporting OAuth2 client ${client._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} OAuth2 client ${client._id}`, state, }); try { @@ -603,14 +635,17 @@ export async function exportOAuth2Clients({ } stopProgressIndicator({ id: indicatorId, - message: `Exported ${clients.length} OAuth2 clients.`, + message: `Exported ${clients.length} ${getCurrentRealmName(state) + ' realm'} OAuth2 clients.`, state, }); } catch (error) { errors.push(error); } if (errors.length > 0) { - throw new FrodoError(`Error exporting oauth2 clients`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} oauth2 clients`, + errors + ); } debugMessage({ message: `OAuth2ClientOps.exportOAuth2Clients: end`, state }); return exportData; @@ -650,7 +685,10 @@ export async function exportOAuth2Client({ errors.push(error); } if (errors.length > 0) { - throw new FrodoError(`Error exporting oauth2 client ${clientId}`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + errors + ); } debugMessage({ message: `OAuth2ClientOps.exportOAuth2Client: end`, state }); return exportData; @@ -680,7 +718,7 @@ async function importOAuth2ClientDependencies( await updateScript({ scriptId, scriptData, state }); } catch (error) { throw new FrodoError( - `Error importing script dependency ${scriptId}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} script dependency ${scriptId}`, error ); } @@ -732,10 +770,15 @@ export async function importOAuth2Client({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing oauth2 client ${clientId}`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId}`, + errors + ); } if (0 === imported.length) { - throw new FrodoError(`Oauth2 client ${clientId} not found in import data!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} oauth2 client ${clientId} not found in import data!` + ); } return response; } @@ -774,7 +817,10 @@ export async function importFirstOAuth2Client({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first oauth2 client`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} oauth2 client`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No oauth2 clients found in import data!`); @@ -815,7 +861,10 @@ export async function importOAuth2Clients({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing oauth2 clients`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} oauth2 clients`, + errors + ); } return response; } diff --git a/src/ops/OAuth2ProviderOps.ts b/src/ops/OAuth2ProviderOps.ts index ce480e51d..6a425d4cd 100644 --- a/src/ops/OAuth2ProviderOps.ts +++ b/src/ops/OAuth2ProviderOps.ts @@ -88,6 +88,12 @@ export async function readOAuth2Provider({ if (error.httpStatus === 404 || error.response?.status === 404) { // return null if no provider exists return null; + } else if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return null; } else { throw new FrodoError(`Error reading oauth2 provider`, error); } diff --git a/src/ops/OAuth2TrustedJwtIssuerOps.ts b/src/ops/OAuth2TrustedJwtIssuerOps.ts index 5cb9583d6..fb31cad88 100644 --- a/src/ops/OAuth2TrustedJwtIssuerOps.ts +++ b/src/ops/OAuth2TrustedJwtIssuerOps.ts @@ -9,6 +9,7 @@ import { import { State } from '../shared/State'; import { debugMessage, printMessage } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { ExportMetaData } from './OpsTypes'; @@ -307,7 +308,18 @@ export async function readOAuth2TrustedJwtIssuers({ const issuers = (await _getOAuth2TrustedJwtIssuers({ state })).result; return issuers; } catch (error) { - throw new FrodoError(`Error reading trusted issuers`, error); + if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + error + ); + } } } @@ -326,7 +338,10 @@ export async function readOAuth2TrustedJwtIssuer({ try { return _getOAuth2TrustedJwtIssuer({ id: issuerId, state }); } catch (error) { - throw new FrodoError(`Error reading trusted issuer ${issuerId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + error + ); } } @@ -364,10 +379,15 @@ export async function createOAuth2TrustedJwtIssuer({ }); return result; } catch (error) { - throw new FrodoError(`Error creating trusted issuer ${issuerId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + error + ); } } - throw new FrodoError(`Trusted issuer ${issuerId} already exists!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId} already exists!` + ); } /** @@ -435,12 +455,15 @@ export async function updateOAuth2TrustedJwtIssuer({ return response; } catch (error) { throw new FrodoError( - `Error updating trusted issuer ${issuerId}`, + `Error updating ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, error ); } } else { - throw new FrodoError(`Error updating trusted issuer ${issuerId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + error + ); } } } @@ -480,7 +503,10 @@ export async function deleteOAuth2TrustedJwtIssuers({ } } if (errors.length > 0) { - throw new FrodoError(`Error deleting trusted issuers`, errors); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + errors + ); } debugMessage({ message: `OAuth2TrustedJwtIssuerOps.deleteOAuth2TrustedJwtIssuers: end`, @@ -492,7 +518,10 @@ export async function deleteOAuth2TrustedJwtIssuers({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error deleting trusted issuers`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + error + ); } } @@ -511,7 +540,10 @@ export async function deleteOAuth2TrustedJwtIssuer({ try { return _deleteOAuth2TrustedJwtIssuer({ id: issuerId, state }); } catch (error) { - throw new FrodoError(`Error deleting trusted issuer ${issuerId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + error + ); } } @@ -541,7 +573,10 @@ export async function exportOAuth2TrustedJwtIssuers({ } } if (errors.length > 0) { - throw new FrodoError(`Error exporting trusted issuers`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + errors + ); } debugMessage({ message: `OAuth2TrustedJwtIssuerOps.exportOAuth2TrustedJwtIssuers: end`, @@ -553,7 +588,10 @@ export async function exportOAuth2TrustedJwtIssuers({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting trusted issuers`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + error + ); } } @@ -584,7 +622,10 @@ export async function exportOAuth2TrustedJwtIssuer({ }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting trusted issuer ${issuerId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + error + ); } } @@ -625,7 +666,10 @@ export async function importOAuth2TrustedJwtIssuer({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing trusted issuer ${issuerId}`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} trusted issuer ${issuerId}`, + errors + ); } if (0 === imported.length) { throw new FrodoError( @@ -668,7 +712,10 @@ export async function importFirstOAuth2TrustedJwtIssuer({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first trusted issuer`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} trusted issuer`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No trusted issuers found in import data!`); @@ -704,7 +751,10 @@ export async function importOAuth2TrustedJwtIssuers({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing trusted issuers`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} trusted issuers`, + errors + ); } return response; } diff --git a/src/ops/PolicyOps.ts b/src/ops/PolicyOps.ts index d24c2718e..743bcc3ea 100644 --- a/src/ops/PolicyOps.ts +++ b/src/ops/PolicyOps.ts @@ -24,6 +24,7 @@ import { convertBase64TextToArray, getMetadata, } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; import { readPolicySet, updatePolicySet } from './PolicySetOps'; @@ -360,7 +361,10 @@ export async function readPolicies({ const { result } = await _getPolicies({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading policies`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} policies`, + error + ); } } @@ -375,7 +379,10 @@ export async function readPolicy({ const response = await _getPolicy({ policyId, state }); return response; } catch (error) { - throw new FrodoError(`Error reading policy ${policyId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + error + ); } } @@ -390,7 +397,10 @@ export async function deletePolicy({ const response = await _deletePolicy({ policyId, state }); return response; } catch (error) { - throw new FrodoError(`Error deleting policy ${policyId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + error + ); } } @@ -410,7 +420,10 @@ export async function readPoliciesByPolicySet({ const data = await _getPoliciesByPolicySet({ policySetId, state }); return data.result; } catch (error) { - throw new FrodoError(`Error reading policies in set ${policySetId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} policies in set ${policySetId}`, + error + ); } } @@ -439,7 +452,10 @@ export async function createPolicy({ }); return result; } catch (error) { - throw new FrodoError(`Error creating policy ${policyId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + error + ); } } throw new Error(`Policy ${policyId} already exists!`); @@ -458,7 +474,10 @@ export async function updatePolicy({ const response = await _putPolicy({ policyId, policyData, state }); return response; } catch (error) { - throw new FrodoError(`Error updating policy ${policyId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + error + ); } } @@ -560,7 +579,7 @@ export async function getScripts({ } catch (error) { errors.push( new FrodoError( - `Error retrieving script ${scriptUuid} referenced in policy ${policyData['name']}`, + `Error retrieving ${getCurrentRealmName(state) + ' realm'} script ${scriptUuid} referenced in policy ${policyData['name']}`, error ) ); @@ -569,13 +588,16 @@ export async function getScripts({ } catch (error) { errors.push( new FrodoError( - `Error finding scripts in policy ${policyData['name']}`, + `Error finding ${getCurrentRealmName(state) + ' realm'} scripts in policy ${policyData['name']}`, error ) ); } if (errors.length > 0) { - throw new FrodoError(`Error getting policy scripts`, errors); + throw new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} policy scripts`, + errors + ); } debugMessage({ message: `PolicySetOps.getScripts: end`, state }); return scripts; @@ -625,7 +647,10 @@ async function exportPolicyPrerequisites({ } } if (errors.length > 0) { - throw new FrodoError(`Error exporting policy prerequisites`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy prerequisites`, + errors + ); } debugMessage({ message: `PolicySetOps.exportPolicyPrerequisites: end`, @@ -666,7 +691,10 @@ async function exportPolicyDependencies({ exportData.script[scriptData._id] = scriptData; } } catch (error) { - throw new FrodoError(`Error exporting policy dependencies`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy dependencies`, + error + ); } debugMessage({ message: `PolicySetOps.exportPolicySetDependencies: end`, @@ -718,12 +746,18 @@ export async function exportPolicy({ } } if (errors.length > 0) { - throw new FrodoError(`Error exporting policy ${policyId}`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + errors + ); } debugMessage({ message: `PolicyOps.exportPolicy: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting policy ${policyId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + error + ); } } @@ -751,13 +785,13 @@ export async function exportPolicies({ const policies = await readPolicies({ state }); indicatorId = createProgressIndicator({ total: policies.length, - message: 'Exporting policies...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} policies...`, state, }); for (const policyData of policies) { updateProgressIndicator({ id: indicatorId, - message: `Exporting policy ${policyData._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} policy ${policyData._id}`, state, }); exportData.policy[policyData._id] = policyData; @@ -782,11 +816,14 @@ export async function exportPolicies({ } } if (errors.length > 0) { - throw new FrodoError(`Error exporting policies`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policies`, + errors + ); } stopProgressIndicator({ id: indicatorId, - message: `Exported ${policies.length} policies.`, + message: `Exported ${policies.length} ${getCurrentRealmName(state) + ' realm'} policies.`, state, }); debugMessage({ message: `PolicyOps.exportPolicies: end`, state }); @@ -794,7 +831,7 @@ export async function exportPolicies({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting policies.`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} policies.`, status: 'fail', state, }); @@ -802,7 +839,10 @@ export async function exportPolicies({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting policies`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policies`, + error + ); } } @@ -857,7 +897,7 @@ export async function exportPoliciesByPolicySet({ } if (errors.length > 0) { throw new FrodoError( - `Error exporting policies in set ${policySetName}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} policies in set ${policySetName}`, errors ); } @@ -869,7 +909,7 @@ export async function exportPoliciesByPolicySet({ throw error; } throw new FrodoError( - `Error exporting policies in set ${policySetName}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} policies in set ${policySetName}`, error ); } @@ -911,7 +951,7 @@ async function importPolicyPrerequisites({ } catch (error) { errors.push( new FrodoError( - `Error importing prerequisite resource type ${policyData.resourceTypeUuid}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} prerequisite resource type ${policyData.resourceTypeUuid}`, error ) ); @@ -931,7 +971,7 @@ async function importPolicyPrerequisites({ } catch (error) { errors.push( new FrodoError( - `Error importing prerequisite policy set ${policyData.applicationName}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} prerequisite policy set ${policyData.applicationName}`, error ) ); @@ -939,7 +979,7 @@ async function importPolicyPrerequisites({ } if (errors.length > 0) { throw new FrodoError( - `Error importing prerequisites for policy ${policyData._id}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} prerequisites for policy ${policyData._id}`, errors ); } @@ -953,7 +993,7 @@ async function importPolicyPrerequisites({ throw error; } throw new FrodoError( - `Error importing prerequisites for policy ${policyData._id}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} prerequisites for policy ${policyData._id}`, error ); } @@ -989,7 +1029,7 @@ async function importPolicyDependencies({ } catch (error) { errors.push( new FrodoError( - `Error importing script ${scriptUuid} for policy ${policyData._id}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} script ${scriptUuid} for policy ${policyData._id}`, error ) ); @@ -997,7 +1037,7 @@ async function importPolicyDependencies({ } if (errors.length > 0) { throw new FrodoError( - `Error importing soft dependencies for policy ${policyData._id}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} soft dependencies for policy ${policyData._id}`, errors ); } @@ -1011,7 +1051,7 @@ async function importPolicyDependencies({ throw error; } throw new FrodoError( - `Error importing soft dependencies for policy ${policyData._id}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} soft dependencies for policy ${policyData._id}`, error ); } @@ -1084,7 +1124,10 @@ export async function importPolicy({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing policy ${policyId}`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} policy ${policyId}`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`Policy ${policyId} not found in import data`); @@ -1155,7 +1198,10 @@ export async function importFirstPolicy({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first policy`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} policy`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No policy found in import data`); @@ -1221,7 +1267,10 @@ export async function importPolicies({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing policies`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} policies`, + errors + ); } return response; } diff --git a/src/ops/PolicySetOps.ts b/src/ops/PolicySetOps.ts index 59f4cbbbf..625bebb1d 100644 --- a/src/ops/PolicySetOps.ts +++ b/src/ops/PolicySetOps.ts @@ -21,6 +21,7 @@ import { convertBase64TextToArray, getMetadata, } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { ExportMetaData } from './OpsTypes'; import { @@ -283,7 +284,10 @@ export async function readPolicySets({ const { result } = await _getPolicySets({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading policy sets`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} policy sets`, + error + ); } } @@ -298,7 +302,10 @@ export async function readPolicySet({ const response = await _getPolicySet({ policySetName, state }); return response; } catch (error) { - throw new FrodoError(`Error reading policy set ${policySetName}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + error + ); } } @@ -323,7 +330,10 @@ export async function createPolicySet({ }); return response; } catch (error) { - throw new FrodoError(`Error creating policy set ${policySetName}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + error + ); } } @@ -344,7 +354,10 @@ export async function updatePolicySet({ }); return response; } catch (error) { - throw new FrodoError(`Error updating policy set ${policySetName}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + error + ); } } @@ -359,7 +372,10 @@ export async function deletePolicySet({ const response = await _deletePolicySet({ policySetName, state }); return response; } catch (error) { - throw new FrodoError(`Error deleting policy set ${policySetName}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + error + ); } } @@ -390,14 +406,17 @@ async function exportPolicySetPrerequisites({ } catch (error) { errors.push( new FrodoError( - `Error retrieving resource type ${resourceTypeUuid} for policy set ${policySetData.name}`, + `Error retrieving ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid} for policy set ${policySetData.name}`, error ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error exporting policy set prerequisites`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy set prerequisites`, + errors + ); } debugMessage({ message: `PolicySetOps.exportPolicySetPrerequisites: end`, @@ -452,7 +471,7 @@ async function exportPolicySetDependencies({ } if (errors.length > 0) { throw new FrodoError( - `Error exporting policy set ${policySetData.name} dependencies` + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetData.name} dependencies` ); } debugMessage({ @@ -465,7 +484,7 @@ async function exportPolicySetDependencies({ throw error; } throw new FrodoError( - `Error exporting policy set ${policySetData.name} dependencies`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetData.name} dependencies`, error ); } @@ -521,7 +540,7 @@ export async function exportPolicySet({ } if (errors.length > 0) { throw new FrodoError( - `Error exporting policy set ${policySetName}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, errors ); } @@ -532,7 +551,10 @@ export async function exportPolicySet({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting policy set ${policySetName}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + error + ); } } @@ -560,13 +582,13 @@ export async function exportPolicySets({ const policySets = await readPolicySets({ state }); indicatorId = createProgressIndicator({ total: policySets.length, - message: 'Exporting policy sets...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} policy sets...`, state, }); for (const policySetData of policySets) { updateProgressIndicator({ id: indicatorId, - message: `Exporting policy set ${policySetData._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} policy set ${policySetData._id}`, state, }); exportData.policyset[policySetData.name] = policySetData; @@ -596,11 +618,14 @@ export async function exportPolicySets({ } stopProgressIndicator({ id: indicatorId, - message: `Exported ${policySets.length} policy sets.`, + message: `Exported ${policySets.length} ${getCurrentRealmName(state) + ' realm'} policy sets.`, state, }); if (errors.length > 0) { - throw new FrodoError(`Error exporting policy sets`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy sets`, + errors + ); } debugMessage({ message: `PolicySetOps.exportPolicySet: end`, state }); return exportData; @@ -609,7 +634,10 @@ export async function exportPolicySets({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting policy sets`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} policy sets`, + error + ); } } @@ -638,7 +666,7 @@ async function importPolicySetPrerequisites({ if (exportData.resourcetype[resourceTypeUuid]) { try { debugMessage({ - message: `Importing resource type ${resourceTypeUuid}`, + message: `Importing ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, state, }); await putResourceType({ @@ -659,7 +687,7 @@ async function importPolicySetPrerequisites({ } if (errors.length > 0) { throw new FrodoError( - `Error importing hard dependencies for policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} hard dependencies for policy set ${policySetData.name}`, errors ); } @@ -673,7 +701,7 @@ async function importPolicySetPrerequisites({ throw error; } throw new FrodoError( - `Error importing hard dependencies for policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} hard dependencies for policy set ${policySetData.name}`, error ); } @@ -706,14 +734,14 @@ async function importPolicySetDependencies({ for (const policyData of policies) { try { debugMessage({ - message: `Importing policy ${policyData._id}`, + message: `Importing ${getCurrentRealmName(state) + ' realm'} policy ${policyData._id}`, state, }); await updatePolicy({ policyId: policyData._id, policyData, state }); } catch (error) { errors.push( new FrodoError( - `Error importing policy ${policyData._id} in policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} policy ${policyData._id} in policy set ${policySetData.name}`, error ) ); @@ -728,7 +756,7 @@ async function importPolicySetDependencies({ } catch (error) { errors.push( new FrodoError( - `Error importing script ${scriptUuid} for policy ${policyData._id} in policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} script ${scriptUuid} for policy ${policyData._id} in policy set ${policySetData.name}`, error ) ); @@ -737,7 +765,7 @@ async function importPolicySetDependencies({ } if (errors.length > 0) { throw new FrodoError( - `Error importing soft dependencies for policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} soft dependencies for policy set ${policySetData.name}`, errors ); } @@ -751,7 +779,7 @@ async function importPolicySetDependencies({ throw error; } throw new FrodoError( - `Error importing soft dependencies for policy set ${policySetData.name}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} soft dependencies for policy set ${policySetData.name}`, error ); } @@ -819,7 +847,10 @@ export async function importPolicySet({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing policy set ${policySetName}`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} policy set ${policySetName}`, + errors + ); } if (0 === imported.length) { throw new FrodoError( @@ -888,7 +919,10 @@ export async function importFirstPolicySet({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first policy set`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} policy set`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No policy sets found in import data`); @@ -951,7 +985,10 @@ export async function importPolicySets({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing policy sets`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} policy sets`, + errors + ); } return response; } diff --git a/src/ops/ResourceTypeOps.ts b/src/ops/ResourceTypeOps.ts index 1d4904e6c..146e603ef 100644 --- a/src/ops/ResourceTypeOps.ts +++ b/src/ops/ResourceTypeOps.ts @@ -15,6 +15,7 @@ import { updateProgressIndicator, } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { FrodoError } from './FrodoError'; import { ExportMetaData } from './OpsTypes'; @@ -289,7 +290,7 @@ export async function readResourceType({ return response; } catch (error) { throw new FrodoError( - `Error reading resource type ${resourceTypeUuid}`, + `Error reading ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, error ); } @@ -308,7 +309,10 @@ export async function readResourceTypes({ const { result } = await _getResourceTypes({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading resource types`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} resource types`, + error + ); } } @@ -338,12 +342,12 @@ export async function readResourceTypeByName({ ); default: throw new FrodoError( - `${result.length} resource types '${resourceTypeName}' found` + `${result.length} ${getCurrentRealmName(state) + ' realm'} resource types '${resourceTypeName}' found` ); } } catch (error) { throw new FrodoError( - `Error reading resource type ${resourceTypeName}`, + `Error reading ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeName}`, error ); } @@ -372,7 +376,7 @@ export async function updateResourceType({ return response; } catch (error) { throw new FrodoError( - `Error updating resource type ${resourceTypeUuid}`, + `Error updating ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, error ); } @@ -390,7 +394,7 @@ export async function deleteResourceType({ return response; } catch (error) { throw new FrodoError( - `Error deleting resource type ${resourceTypeUuid}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, error ); } @@ -416,7 +420,7 @@ export async function deleteResourceTypeByName({ return response; } catch (error) { throw new FrodoError( - `Error deleting resource type ${resourceTypeName}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeName}`, error ); } @@ -447,12 +451,12 @@ export async function exportResourceType({ } catch (error) { if (error.response?.status === 404) { throw new FrodoError( - `Resource type ${resourceTypeUuid} does not exist`, + `${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid} does not exist`, error ); } else { throw new FrodoError( - `Error exporting resource type ${resourceTypeUuid}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, error ); } @@ -489,7 +493,7 @@ export async function exportResourceTypeByName({ return exportData; } catch (error) { throw new FrodoError( - `Error exporting resource type ${resourceTypeName}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeName}`, error ); } @@ -511,20 +515,20 @@ export async function exportResourceTypes({ const resourceTypes = await readResourceTypes({ state }); indicatorId = createProgressIndicator({ total: resourceTypes.length, - message: 'Exporting resource types...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} resource types...`, state, }); for (const resourceTypeData of resourceTypes) { updateProgressIndicator({ id: indicatorId, - message: `Exporting resource type ${resourceTypeData._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeData._id}`, state, }); exportData.resourcetype[resourceTypeData.uuid] = resourceTypeData; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${resourceTypes.length} resource types.`, + message: `Exported ${resourceTypes.length} ${getCurrentRealmName(state) + ' realm'} resource types.`, state, }); debugMessage({ message: `ResourceTypeOps.exportResourceType: end`, state }); @@ -532,11 +536,14 @@ export async function exportResourceTypes({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting resource types`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} resource types`, status: 'fail', state, }); - throw new FrodoError(`Error exporting resource types`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} resource types`, + error + ); } } @@ -581,7 +588,7 @@ export async function importResourceType({ } if (errors.length > 0) { throw new FrodoError( - `Error importing resource type ${resourceTypeUuid}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeUuid}`, errors ); } @@ -634,7 +641,7 @@ export async function importResourceTypeByName({ } if (errors.length > 0) { throw new FrodoError( - `Error importing resource type ${resourceTypeName}`, + `Error importing ${getCurrentRealmName(state) + ' realm'} resource type ${resourceTypeName}`, errors ); } @@ -683,7 +690,10 @@ export async function importFirstResourceType({ break; } if (errors.length > 0) { - throw new FrodoError(`Error importing first resource type`, errors); + throw new FrodoError( + `Error importing first ${getCurrentRealmName(state) + ' realm'} resource type`, + errors + ); } if (0 === imported.length) { throw new FrodoError(`No resource types found in import data!`); @@ -726,7 +736,10 @@ export async function importResourceTypes({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing resource types`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} resource types`, + errors + ); } return response; } @@ -752,7 +765,7 @@ export async function createResourceType({ return response; } catch (error) { throw new FrodoError( - `Error creating resource type${ + `Error creating ${getCurrentRealmName(state) + ' realm'} resource type${ resourceTypeUuid ? ' ' + resourceTypeUuid : '' }`, error diff --git a/src/ops/Saml2Ops.ts b/src/ops/Saml2Ops.ts index ca103d39c..9070e2e43 100644 --- a/src/ops/Saml2Ops.ts +++ b/src/ops/Saml2Ops.ts @@ -27,6 +27,7 @@ import { convertTextArrayToBase64Url, getMetadata, } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { get } from '../utils/JsonUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; @@ -334,7 +335,19 @@ export async function readSaml2ProviderStubs({ const { result } = await _getProviderStubs({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading saml2 provider stubs`, error); + if ( + // operation is not available in PingOne Advanced Identity Cloud + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 provider stubs`, + error + ); + } } } @@ -352,7 +365,19 @@ export async function readSaml2EntityIds({ const entityIds = result.map((stub) => stub.entityId); return entityIds; } catch (error) { - throw new FrodoError(`Error reading saml2 entity ids`, error); + if ( + // operation is not available in PingOne Advanced Identity Cloud + error.httpStatus === 403 && + error.httpMessage === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 entity ids`, + error + ); + } } } @@ -372,7 +397,7 @@ export function getSaml2ProviderMetadataUrl({ return _getProviderMetadataUrl({ entityId, state }); } catch (error) { throw new FrodoError( - `Error getting metadata URL for saml2 provider ${entityId}`, + `Error getting metadata URL for ${getCurrentRealmName(state) + ' realm'} saml2 provider ${entityId}`, error ); } @@ -431,7 +456,10 @@ async function exportDependencies({ fileData.script[attrMapperScriptId] = scriptData; } catch (error) { errors.push( - new FrodoError(`Error getting attribute mapper script`, error) + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} attribute mapper script`, + error + ) ); } } @@ -450,7 +478,12 @@ async function exportDependencies({ scriptData.script = convertBase64TextToArray(scriptData.script as string); fileData.script[idpAdapterScriptId] = scriptData; } catch (error) { - errors.push(new FrodoError(`Error getting idp adapter script`, error)); + errors.push( + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} idp adapter script`, + error + ) + ); } } const spAdapterScriptId = get(providerData, [ @@ -468,12 +501,20 @@ async function exportDependencies({ scriptData.script = convertBase64TextToArray(scriptData.script as string); fileData.script[spAdapterScriptId] = scriptData; } catch (error) { - errors.push(new FrodoError(`Error getting sp adapter script`, error)); + errors.push( + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} sp adapter script`, + error + ) + ); } } if (errors.length > 0) { - throw new FrodoError(`Error exporting saml2 dependencies`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 dependencies`, + errors + ); } // const metaDataResponse = await getSaml2ProviderMetadata({ @@ -547,7 +588,9 @@ export async function readSaml2ProviderStub({ }); switch (found.resultCount) { case 0: - throw new FrodoError(`No provider with entity id '${entityId}' found`); + throw new FrodoError( + `No ${getCurrentRealmName(state) + ' realm'} provider with entity id '${entityId}' found` + ); case 1: { debugMessage({ message: `Saml2Ops.getSaml2ProviderStub: end [entityId=${entityId}]`, @@ -557,12 +600,12 @@ export async function readSaml2ProviderStub({ } default: throw new FrodoError( - `Multiple providers with entity id '${entityId}' found` + `Multiple ${getCurrentRealmName(state) + ' realm'} providers with entity id '${entityId}' found` ); } } catch (error) { throw new FrodoError( - `Error reading saml2 provider stub ${entityId}`, + `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 provider stub ${entityId}`, error ); } @@ -599,7 +642,10 @@ export async function readSaml2Provider({ }); return providerData; } catch (error) { - throw new FrodoError(`Error reading saml2 provider ${entityId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} saml2 provider ${entityId}`, + error + ); } } @@ -624,7 +670,10 @@ export async function createSaml2Provider({ try { return _createProvider({ location, providerData, metaData, state }); } catch (error) { - throw new FrodoError(`Error creating saml2 provider`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} saml2 provider`, + error + ); } } @@ -649,7 +698,10 @@ export async function updateSaml2Provider({ try { return _updateProvider({ location, entityId, providerData, state }); } catch (error) { - throw new FrodoError(`Error updating saml2 provider`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} saml2 provider`, + error + ); } } @@ -684,7 +736,10 @@ export async function deleteSaml2Provider({ }); return providerData; } catch (error) { - throw new FrodoError(`Error deleting saml2 provider ${entityId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} saml2 provider ${entityId}`, + error + ); } } @@ -715,7 +770,10 @@ export async function deleteSaml2Providers({ }); return providers; } catch (error) { - throw new FrodoError(`Error deleting saml2 providers`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} saml2 providers`, + error + ); } } @@ -758,7 +816,10 @@ export async function exportSaml2Provider({ }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting saml2 provider ${entityId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 provider ${entityId}`, + error + ); } } @@ -780,14 +841,14 @@ export async function exportSaml2Providers({ const stubs = await readSaml2ProviderStubs({ state }); indicatorId = createProgressIndicator({ total: stubs.length, - message: 'Exporting SAML2 providers...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} SAML2 providers...`, state, }); for (const stub of stubs) { try { updateProgressIndicator({ id: indicatorId, - message: `Exporting SAML2 provider ${stub._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} SAML2 provider ${stub._id}`, state, }); const providerData = await _getProviderByLocationAndId({ @@ -805,24 +866,41 @@ export async function exportSaml2Providers({ } fileData.saml[stub.location][providerData._id] = providerData; } catch (error) { - errors.push( - new FrodoError(`Error exporting saml2 provider ${stub._id}`, error) - ); + if ( + !( + // operation is not available in PingOne Advanced Identity Cloud + ( + error.httpStatus === 403 && + error.httpMessage === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) + ) + ) { + errors.push( + new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 provider ${stub._id}`, + error + ) + ); + } } } if (errors.length > 0) { - throw new FrodoError(`Error exporting saml2 providers`, errors); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 providers`, + errors + ); } stopProgressIndicator({ id: indicatorId, - message: `Exported ${stubs.length} SAML2 providers.`, + message: `Exported ${stubs.length} ${getCurrentRealmName(state) + ' realm'} SAML2 providers.`, state, }); return fileData; } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting saml2 providers`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 providers`, status: 'fail', state, }); @@ -830,7 +908,10 @@ export async function exportSaml2Providers({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error exporting saml2 providers`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} saml2 providers`, + error + ); } } @@ -869,7 +950,10 @@ export async function importDependencies({ await updateScript({ scriptId: attrMapperScriptId, scriptData, state }); } catch (error) { errors.push( - new FrodoError(`Error getting attribute mapper script`, error) + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} attribute mapper script`, + error + ) ); } } @@ -892,7 +976,10 @@ export async function importDependencies({ await updateScript({ scriptId: idpAdapterScriptId, scriptData, state }); } catch (error) { errors.push( - new FrodoError(`Error getting attribute mapper script`, error) + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} attribute mapper script`, + error + ) ); } } @@ -915,12 +1002,18 @@ export async function importDependencies({ await updateScript({ scriptId: spAdapterScriptId, scriptData, state }); } catch (error) { errors.push( - new FrodoError(`Error getting attribute mapper script`, error) + new FrodoError( + `Error getting ${getCurrentRealmName(state) + ' realm'} attribute mapper script`, + error + ) ); } } if (errors.length > 0) { - throw new FrodoError(`Error importing saml2 dependencies`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} saml2 dependencies`, + errors + ); } debugMessage({ message: `Saml2Ops.importDependencies: end`, state }); } @@ -993,7 +1086,10 @@ export async function importSaml2Provider({ try { response = await _updateProvider({ location, providerData, state }); } catch (error) { - throw new FrodoError(`Error creating saml2 provider`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} saml2 provider`, + error + ); } } } else { @@ -1002,7 +1098,10 @@ export async function importSaml2Provider({ ); } } catch (error) { - throw new FrodoError(`Error importing saml2 provider ${entityId}`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} saml2 provider ${entityId}`, + error + ); } debugMessage({ message: `Saml2Ops.importSaml2Provider: end`, state }); return response; @@ -1074,14 +1173,20 @@ export async function importSaml2Providers({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing saml2 providers`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} saml2 providers`, + errors + ); } } catch (error) { // re-throw previously caught error if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing saml2 providers`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} saml2 providers`, + error + ); } debugMessage({ message: `Saml2Ops.importSaml2Providers: end`, state }); return response; diff --git a/src/ops/ScriptOps.ts b/src/ops/ScriptOps.ts index fa4989d5b..9434b9a88 100644 --- a/src/ops/ScriptOps.ts +++ b/src/ops/ScriptOps.ts @@ -26,7 +26,10 @@ import { getMetadata, getResult, } from '../utils/ExportImportUtils'; -import { applyNameCollisionPolicy } from '../utils/ForgeRockUtils'; +import { + applyNameCollisionPolicy, + getCurrentRealmName, +} from '../utils/ForgeRockUtils'; import { isScriptValid } from '../utils/ScriptValidationUtils'; import { FrodoError } from './FrodoError'; @@ -385,7 +388,10 @@ export async function readScripts({ const { result } = await _getScripts({ state }); return result; } catch (error) { - throw new FrodoError(`Error reading scripts`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} scripts`, + error + ); } } @@ -475,7 +481,10 @@ export async function readScript({ try { return await _getScript({ scriptId, state }); } catch (error) { - throw new FrodoError(`Error reading script ${scriptId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} script ${scriptId}`, + error + ); } } @@ -497,12 +506,19 @@ export async function readScriptByName({ case 1: return result[0]; case 0: - throw new FrodoError(`Script '${scriptName}' not found`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} script '${scriptName}' not found` + ); default: - throw new FrodoError(`${result.length} scripts '${scriptName}' found`); + throw new FrodoError( + `${result.length} ${getCurrentRealmName(state) + ' realm'} scripts '${scriptName}' found` + ); } } catch (error) { - throw new FrodoError(`Error reading script ${scriptName}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} script ${scriptName}`, + error + ); } } @@ -539,10 +555,15 @@ export async function createScript({ debugMessage({ message: `ScriptOps.createOAuth2Client: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error creating script`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} script`, + error + ); } } - throw new FrodoError(`Script ${scriptData._id} already exists!`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} script ${scriptData._id} already exists!` + ); } /** @@ -581,7 +602,11 @@ export async function updateScript({ message: `Saved script as ${newName}`, state, }); - } else throw new FrodoError(`Error updating script`, error); + } else + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} script`, + error + ); } return result; } @@ -601,7 +626,10 @@ export async function deleteScript({ try { return _deleteScript({ scriptId, state }); } catch (error) { - throw new FrodoError(`Error deleting script ${scriptId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} script ${scriptId}`, + error + ); } } @@ -620,7 +648,10 @@ export async function deleteScriptByName({ try { return _deleteScriptByName({ scriptName, state }); } catch (error) { - throw new FrodoError(`Error deleting script ${scriptName}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} script ${scriptName}`, + error + ); } } @@ -641,16 +672,18 @@ export async function deleteScripts({ const scripts = result.filter((s) => !s.default); const deletedScripts = []; for (const script of scripts) { - const result = await getResult( + const result: ScriptSkeleton = await getResult( resultCallback, - `Error deleting script ${script.name}`, + `Error deleting ${getCurrentRealmName(state) + ' realm'} script ${script.name}`, deleteScript, { scriptId: script._id, state, } ); - deletedScripts.push(result); + if (result) { + deletedScripts.push(result); + } } return deletedScripts; } @@ -682,7 +715,10 @@ export async function exportScript({ debugMessage({ message: `ScriptOps.exportScriptById: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting script ${scriptId}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} script ${scriptId}`, + error + ); } } @@ -713,7 +749,10 @@ export async function exportScriptByName({ debugMessage({ message: `ScriptOps.exportScriptByName: end`, state }); return exportData; } catch (error) { - throw new FrodoError(`Error exporting script ${scriptName}`, error); + throw new FrodoError( + `Error exporting ${getCurrentRealmName(state) + ' realm'} script ${scriptName}`, + error + ); } } @@ -744,18 +783,18 @@ export async function exportScripts({ const exportData = createScriptExportTemplate({ state }); const indicatorId = createProgressIndicator({ total: scriptList.length, - message: `Exporting ${scriptList.length} scripts...`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} ${scriptList.length} scripts...`, state, }); for (const scriptData of scriptList) { updateProgressIndicator({ id: indicatorId, - message: `Reading script ${scriptData.name}`, + message: `Reading ${getCurrentRealmName(state) + ' realm'} script ${scriptData.name}`, state, }); - exportData.script[scriptData._id] = await getResult( + const result: ScriptSkeleton = await getResult( resultCallback, - `Error exporting script ${scriptData.name}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} script ${scriptData.name}`, prepareScriptForExport, { scriptData, @@ -763,10 +802,13 @@ export async function exportScripts({ state, } ); + if (result) { + exportData.script[scriptData._id] = result; + } } stopProgressIndicator({ id: indicatorId, - message: `Exported ${scriptList.length} scripts.`, + message: `Exported ${getCurrentRealmName(state) + ' realm'} ${scriptList.length} scripts.`, state, }); return exportData; @@ -831,7 +873,9 @@ export async function importScripts({ } if (validate) { if (!isScriptValid({ scriptData, state })) { - throw new FrodoError(`Script is invalid`); + throw new FrodoError( + `${getCurrentRealmName(state) + ' realm'} script ${newId} is invalid` + ); } } const result = await updateScript({ @@ -848,7 +892,7 @@ export async function importScripts({ resultCallback(e, undefined); } else { throw new FrodoError( - `Error importing script '${importData.script[existingId].name}'`, + `Error importing ${getCurrentRealmName(state) + ' realm'} script '${importData.script[existingId].name}'`, e ); } diff --git a/src/ops/ServiceOps.ts b/src/ops/ServiceOps.ts index 56f7117d5..89d2be21a 100644 --- a/src/ops/ServiceOps.ts +++ b/src/ops/ServiceOps.ts @@ -18,6 +18,7 @@ import { updateProgressIndicator, } from '../utils/Console'; import { getMetadata } from '../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../utils/ForgeRockUtils'; import { cloneDeep } from '../utils/JsonUtils'; import { FrodoError } from './FrodoError'; import { type ExportMetaData } from './OpsTypes'; @@ -255,7 +256,7 @@ export async function getListOfServices({ }: { globalConfig: boolean; state: State; -}) { +}): Promise { try { debugMessage({ message: `ServiceOps.getListOfServices: start`, state }); // Filter out the Scripting service entities since they consist of scripts, which are handled in ScriptOps. @@ -265,10 +266,18 @@ export async function getListOfServices({ debugMessage({ message: `ServiceOps.getListOfServices: end`, state }); return services; } catch (error) { - throw new FrodoError( - `Error getting list of ${globalConfig ? 'global' : 'realm'} services`, - error - ); + if ( + error.response?.status === 403 && + error.response?.data?.message === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) { + return []; + } else { + throw new FrodoError( + `Error getting list of ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} services`, + error + ); + } } } @@ -330,7 +339,7 @@ export async function getFullServices({ return fullServiceData.filter((data) => !!data); // make sure to filter out any undefined objects } catch (error) { throw new FrodoError( - `Error getting ${globalConfig ? 'global' : 'realm'} full service configs`, + `Error getting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} full service configs`, error ); } @@ -467,7 +476,7 @@ export async function putFullService({ } catch (error) { throw new FrodoError( `Error putting ${ - globalConfig ? 'global' : 'realm' + globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}` } full service config ${serviceId}`, error ); @@ -533,7 +542,7 @@ export async function putFullServices({ } if (errors.length > 0) { throw new FrodoError( - `Error putting ${globalConfig ? 'global' : 'realm'} full service configs`, + `Error putting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} full service configs`, errors ); } @@ -583,7 +592,7 @@ export async function deleteFullService({ } catch (error) { throw new FrodoError( `Error deleting ${ - globalConfig ? 'global' : 'realm' + globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}` } full service config ${serviceId}`, error ); @@ -640,7 +649,7 @@ export async function deleteFullServices({ } catch (error) { throw new FrodoError( `Error deleting ${ - globalConfig ? 'global' : 'realm' + globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}` } full service configs`, error ); @@ -681,7 +690,7 @@ export async function exportService({ } catch (error) { throw new FrodoError( `Error exporting ${ - globalConfig ? 'global' : 'realm' + globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}` } service ${serviceId}`, error ); @@ -709,13 +718,13 @@ export async function exportServices({ const services = await getFullServices({ globalConfig, state }); indicatorId = createProgressIndicator({ total: services.length, - message: `Exporting ${globalConfig ? 'global' : 'realm'} services...`, + message: `Exporting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} services...`, state, }); for (const service of services) { updateProgressIndicator({ id: indicatorId, - message: `Exporting ${globalConfig ? 'global' : 'realm'} service ${ + message: `Exporting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} service ${ service._id }`, state, @@ -726,7 +735,7 @@ export async function exportServices({ stopProgressIndicator({ id: indicatorId, message: `Exported ${services.length} ${ - globalConfig ? 'global' : 'realm' + globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}` } services.`, state, }); @@ -735,12 +744,12 @@ export async function exportServices({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting ${globalConfig ? 'global' : 'realm'} services.`, + message: `Error exporting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} services.`, status: 'fail', state, }); throw new FrodoError( - `Error exporting ${globalConfig ? 'global' : 'realm'} services`, + `Error exporting ${globalConfig ? 'global' : `${getCurrentRealmName(state) + ' realm'}`} services`, error ); } diff --git a/src/ops/ThemeOps.ts b/src/ops/ThemeOps.ts index b8c287d7c..645f90273 100644 --- a/src/ops/ThemeOps.ts +++ b/src/ops/ThemeOps.ts @@ -385,7 +385,10 @@ export async function readThemes({ const themes = await getConfigEntity({ entityId: THEMEREALM_ID, state }); return getRealmThemes({ themes, realm }); } catch (error) { - throw new FrodoError(`Error reading themes`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} themes`, + error + ); } } @@ -422,7 +425,10 @@ export async function readTheme({ `Theme with id '${themeId}' not found in realm '${realm}'!` ); } catch (error) { - throw new FrodoError(`Error reading theme ${themeId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} theme ${themeId}`, + error + ); } } @@ -457,7 +463,10 @@ export async function readThemeByName({ } throw new Error(`Theme '${themeName}' not found in realm '${realm}'!`); } catch (error) { - throw new FrodoError(`Error reading theme ${themeName}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} theme ${themeName}`, + error + ); } } @@ -477,21 +486,21 @@ export async function exportThemes({ const themes = await readThemes({ state }); indicatorId = createProgressIndicator({ total: themes.length, - message: 'Exporting themes...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} themes...`, state, }); for (const theme of themes) { if (!theme._id) theme._id = uuidv4(); updateProgressIndicator({ id: indicatorId, - message: `Exporting theme ${theme.name}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} theme ${theme.name}`, state, }); exportData.theme[theme._id] = theme; } stopProgressIndicator({ id: indicatorId, - message: `Exported ${themes.length} themes.`, + message: `Exported ${themes.length} ${getCurrentRealmName(state) + ' realm'} themes.`, state, }); debugMessage({ message: `ThemeOps.exportThemes: end`, state }); @@ -499,11 +508,14 @@ export async function exportThemes({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting themes.`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} themes.`, status: 'fail', state, }); - throw new FrodoError(`Error reading themes`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} themes`, + error + ); } } @@ -537,7 +549,10 @@ export async function createTheme({ }); return result; } catch (error) { - throw new FrodoError(`Error creating theme ${themeId}`, error); + throw new FrodoError( + `Error creating ${getCurrentRealmName(state) + ' realm'} theme ${themeId}`, + error + ); } } } @@ -598,7 +613,10 @@ export async function updateTheme({ `Theme with id '${themeId}' not saved in realm '${realm}'!` ); } catch (error) { - throw new FrodoError(`Error updating theme ${themeId}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} theme ${themeId}`, + error + ); } } @@ -656,7 +674,10 @@ export async function updateThemeByName({ } throw new FrodoError(`Theme '${themeName}' not saved in realm '${realm}'!`); } catch (error) { - throw new FrodoError(`Error updating theme ${themeName}`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} theme ${themeName}`, + error + ); } } @@ -734,7 +755,10 @@ export async function updateThemes({ debugMessage({ message: `ThemeApi.putThemes: finished`, state }); return updatedThemes as Record; } catch (error) { - throw new FrodoError(`Error updating themes`, error); + throw new FrodoError( + `Error updating ${getCurrentRealmName(state) + ' realm'} themes`, + error + ); } } @@ -764,7 +788,10 @@ export async function importThemes({ debugMessage({ message: `ThemeOps.importThemes: end`, state }); return response; } catch (error) { - throw new FrodoError(`Error importing themes`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} themes`, + error + ); } } @@ -815,7 +842,10 @@ export async function deleteTheme({ )}' not deleted from realm '${realm}'!` ); } catch (error) { - throw new FrodoError(`Error deleting theme ${themeId}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} theme ${themeId}`, + error + ); } } @@ -866,7 +896,10 @@ export async function deleteThemeByName({ )}' not deleted from realm '${realm}'!` ); } catch (error) { - throw new FrodoError(`Error deleting theme ${themeName}`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} theme ${themeName}`, + error + ); } } @@ -900,6 +933,9 @@ export async function deleteThemes({ }); return deletedThemes; } catch (error) { - throw new FrodoError(`Error deleting themes`, error); + throw new FrodoError( + `Error deleting ${getCurrentRealmName(state) + ' realm'} themes`, + error + ); } } diff --git a/src/ops/classic/SecretStoreOps.ts b/src/ops/classic/SecretStoreOps.ts index 1f9062e3d..df4eb36f1 100644 --- a/src/ops/classic/SecretStoreOps.ts +++ b/src/ops/classic/SecretStoreOps.ts @@ -15,6 +15,7 @@ import { updateProgressIndicator, } from '../../utils/Console'; import { getMetadata } from '../../utils/ExportImportUtils'; +import { getCurrentRealmName } from '../../utils/ForgeRockUtils'; import { FrodoError } from '../FrodoError'; import { ExportMetaData } from '../OpsTypes'; @@ -232,9 +233,14 @@ export async function readSecretStore({ if (found.length === 1) { return found[0]; } - throw new Error(`Secret store with id '${secretStoreId}' not found!`); + throw new Error( + `${getCurrentRealmName(state) + ' realm'} secret store with id '${secretStoreId}' not found!` + ); } catch (error) { - throw new FrodoError(`Error reading secret store ${secretStoreId}`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} secret store ${secretStoreId}`, + error + ); } } @@ -259,7 +265,10 @@ export async function readSecretStores({ debugMessage({ message: `SecretStoreOps.readSecretStores: end`, state }); return result; } catch (error) { - throw new FrodoError(`Error reading secret stores`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} secret stores`, + error + ); } } @@ -302,7 +311,7 @@ export async function readSecretStoreMappings({ //Ignore this case since not all secret stores have mappings } else { throw new FrodoError( - `Error reading secret store mappings for the secret store '${secretStoreId}'`, + `Error reading secret store mappings for the ${getCurrentRealmName(state) + ' realm'} secret store '${secretStoreId}'`, error ); } @@ -342,7 +351,7 @@ export async function exportSecretStore({ return exportData; } catch (error) { throw new FrodoError( - `Error exporting secret store ${secretStoreId}`, + `Error exporting ${getCurrentRealmName(state) + ' realm'} secret store ${secretStoreId}`, error ); } @@ -370,13 +379,13 @@ export async function exportSecretStores({ const secretStores = await readSecretStores({ globalConfig, state }); indicatorId = createProgressIndicator({ total: secretStores.length, - message: 'Exporting secret stores...', + message: `Exporting ${getCurrentRealmName(state) + ' realm'} secret stores...`, state, }); for (const secretStore of secretStores) { updateProgressIndicator({ id: indicatorId, - message: `Exporting secret store ${secretStore._id}`, + message: `Exporting ${getCurrentRealmName(state) + ' realm'} secret store ${secretStore._id}`, state, }); try { @@ -388,7 +397,7 @@ export async function exportSecretStores({ }); } catch (e) { printMessage({ - message: `Unable to export mapping for secret store with id '${secretStore._id}': ${e.message}`, + message: `Unable to export mapping for ${getCurrentRealmName(state) + ' realm'} secret store with id '${secretStore._id}': ${e.message}`, type: 'error', state, }); @@ -398,7 +407,7 @@ export async function exportSecretStores({ } stopProgressIndicator({ id: indicatorId, - message: `Exported ${secretStores.length} secret stores.`, + message: `Exported ${secretStores.length} ${getCurrentRealmName(state) + ' realm'} secret stores.`, state, }); debugMessage({ message: `SecretStoreOps.exportSecretStores: end`, state }); @@ -406,11 +415,14 @@ export async function exportSecretStores({ } catch (error) { stopProgressIndicator({ id: indicatorId, - message: `Error exporting secret stores.`, + message: `Error exporting ${getCurrentRealmName(state) + ' realm'} secret stores.`, status: 'fail', state, }); - throw new FrodoError(`Error reading secret stores`, error); + throw new FrodoError( + `Error reading ${getCurrentRealmName(state) + ' realm'} secret stores`, + error + ); } } @@ -524,7 +536,10 @@ export async function importSecretStores({ } } if (errors.length > 0) { - throw new FrodoError(`Error importing secret stores`, errors); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} secret stores`, + errors + ); } debugMessage({ message: `SecretStoreOps.importSecretStores: end`, state }); return response; @@ -533,6 +548,9 @@ export async function importSecretStores({ if (errors.length > 0) { throw error; } - throw new FrodoError(`Error importing secret stores`, error); + throw new FrodoError( + `Error importing ${getCurrentRealmName(state) + ' realm'} secret stores`, + error + ); } } diff --git a/src/test/snapshots/ops/AgentOps.test.js.snap b/src/test/snapshots/ops/AgentOps.test.js.snap index 3deff47ea..8aa3f7d78 100644 --- a/src/test/snapshots/ops/AgentOps.test.js.snap +++ b/src/test/snapshots/ops/AgentOps.test.js.snap @@ -73,18 +73,18 @@ exports[`AgentOps Cloud Tests createAgentGroupExportTemplate() 1: Create Agent G `; exports[`AgentOps Cloud Tests deleteIdentityGatewayAgent() 2: Delete agent of wrong type 'FrodoOpsTestJavaAgent9' (J2EEAgent) 1`] = ` -"Error deleting identity gateway agent FrodoOpsTestJavaAgent9 - Identity gateway agent 'FrodoOpsTestJavaAgent9' not found!" +"Error deleting alpha realm identity gateway agent FrodoOpsTestJavaAgent9 + alpha realm identity gateway agent 'FrodoOpsTestJavaAgent9' not found!" `; exports[`AgentOps Cloud Tests deleteJavaAgent() 2: Delete agent of wrong type 'FrodoOpsTestWebAgent9' (WebAgent) 1`] = ` -"Error deleting java agent FrodoOpsTestWebAgent9 - Java agent 'FrodoOpsTestWebAgent9' not found!" +"Error deleting alpha realm java agent FrodoOpsTestWebAgent9 + alpha realm java agent 'FrodoOpsTestWebAgent9' not found!" `; exports[`AgentOps Cloud Tests deleteWebAgent() 2: Delete agent of wrong type 'FrodoOpsTestGatewayAgent9' (IdentityGatewayAgent) 1`] = ` -"Error deleting web agent FrodoOpsTestGatewayAgent9 - Web agent 'FrodoOpsTestGatewayAgent9' not found!" +"Error deleting alpha realm web agent FrodoOpsTestGatewayAgent9 + alpha realm web agent 'FrodoOpsTestGatewayAgent9' not found!" `; exports[`AgentOps Cloud Tests exportAgent() 1: Export agent 'FrodoOpsTestGatewayAgent1' (IdentityGatewayAgent) 1`] = ` @@ -8841,41 +8841,41 @@ exports[`AgentOps Cloud Tests exportWebAgents() 1: Export web agents 1`] = ` `; exports[`AgentOps Cloud Tests importIdentityGatewayAgent() 2: Import gateway agent with wrong type 1`] = ` -"Error importing identity gateway agent FrodoOpsTestJavaAgent7 +"Error importing alpha realm identity gateway agent FrodoOpsTestJavaAgent7 Wrong agent type! Expected 'IdentityGatewayAgent' but got 'J2EEAgent'." `; exports[`AgentOps Cloud Tests importIdentityGatewayAgents() 2: Import gateway agents with wrong type 1`] = ` -"Error importing identity gateway agents - Error importing agent FrodoOpsTestJavaAgent4 of type J2EEAgent +"Error importing alpha realm identity gateway agents + Error importing alpha realm agent FrodoOpsTestJavaAgent4 of type J2EEAgent Wrong agent type! Expected 'IdentityGatewayAgent' but got 'J2EEAgent'. - Error importing agent FrodoOpsTestWebAgent4 of type WebAgent + Error importing alpha realm agent FrodoOpsTestWebAgent4 of type WebAgent Wrong agent type! Expected 'IdentityGatewayAgent' but got 'WebAgent'." `; exports[`AgentOps Cloud Tests importJavaAgent() 2: Import java agent with wrong type 1`] = ` -"Error importing java agent FrodoOpsTestWebAgent7 +"Error importing alpha realm java agent FrodoOpsTestWebAgent7 Wrong agent type! Expected 'J2EEAgent' but got 'WebAgent'." `; exports[`AgentOps Cloud Tests importJavaAgents() 2: Import java agents with wrong type 1`] = ` -"Error importing java agents - Error importing agent FrodoOpsTestWebAgent4 of type WebAgent +"Error importing alpha realm java agents + Error importing alpha realm agent FrodoOpsTestWebAgent4 of type WebAgent Wrong agent type! Expected 'J2EEAgent' but got 'WebAgent'. - Error importing agent FrodoOpsTestGatewayAgent4 of type IdentityGatewayAgent + Error importing alpha realm agent FrodoOpsTestGatewayAgent4 of type IdentityGatewayAgent Wrong agent type! Expected 'J2EEAgent' but got 'IdentityGatewayAgent'." `; exports[`AgentOps Cloud Tests importWebAgent() 2: Import web agent with wrong type 1`] = ` -"Error importing web agent FrodoOpsTestGatewayAgent7 +"Error importing alpha realm web agent FrodoOpsTestGatewayAgent7 Wrong agent type! Expected 'WebAgent' but got 'IdentityGatewayAgent'." `; exports[`AgentOps Cloud Tests importWebAgents() 2: Import web agents with wrong type 1`] = ` -"Error importing web agents - Error importing agent FrodoOpsTestGatewayAgent4 of type IdentityGatewayAgent +"Error importing alpha realm web agents + Error importing alpha realm agent FrodoOpsTestGatewayAgent4 of type IdentityGatewayAgent Wrong agent type! Expected 'WebAgent' but got 'IdentityGatewayAgent'. - Error importing agent FrodoOpsTestJavaAgent4 of type J2EEAgent + Error importing alpha realm agent FrodoOpsTestJavaAgent4 of type J2EEAgent Wrong agent type! Expected 'WebAgent' but got 'J2EEAgent'." `; diff --git a/src/test/snapshots/ops/PolicyOps.test.js.snap b/src/test/snapshots/ops/PolicyOps.test.js.snap index e1694009f..4130b0333 100644 --- a/src/test/snapshots/ops/PolicyOps.test.js.snap +++ b/src/test/snapshots/ops/PolicyOps.test.js.snap @@ -8,7 +8,7 @@ exports[`PolicyOps deletePolicy() 1: Delete existing policy [FrodoTestPolicy7] 1 `; exports[`PolicyOps deletePolicy() 2: Delete non-existing policy [DoesNotExist] 1`] = ` -"Error deleting policy DoesNotExist +"Error deleting alpha realm policy DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -2784,7 +2784,7 @@ exports[`PolicyOps exportPolicy() 2: Export existing policy w/ deps [FrodoTestPo `; exports[`PolicyOps exportPolicy() 3: Export non-existing policy [DoesNotExist] 1`] = ` -"Error exporting policy DoesNotExist +"Error exporting alpha realm policy DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -4127,7 +4127,7 @@ exports[`PolicyOps readPolicy() 1: Get existing policy [FrodoTestPolicy1] 1`] = `; exports[`PolicyOps readPolicy() 2: Get non-existing policy [DoesNotExist] 1`] = ` -"Error reading policy DoesNotExist +"Error reading alpha realm policy DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 diff --git a/src/test/snapshots/ops/PolicySetOps.test.js.snap b/src/test/snapshots/ops/PolicySetOps.test.js.snap index 451ff1930..82a0b1020 100644 --- a/src/test/snapshots/ops/PolicySetOps.test.js.snap +++ b/src/test/snapshots/ops/PolicySetOps.test.js.snap @@ -55,7 +55,7 @@ exports[`PolicySetOps createPolicySet() 1: Create non-existing policy set [Frodo `; exports[`PolicySetOps createPolicySet() 2: Create existing policy set [FrodoTestPolicySet4] 1`] = ` -"Error creating policy set undefined +"Error creating alpha realm policy set undefined HTTP client error Code: ERR_BAD_REQUEST Status: 409 @@ -66,7 +66,7 @@ exports[`PolicySetOps createPolicySet() 2: Create existing policy set [FrodoTest exports[`PolicySetOps deletePolicySet() 1: Delete existing policy set [FrodoTestPolicySet7] 1`] = `{}`; exports[`PolicySetOps deletePolicySet() 2: Delete non-existing policy set [DoesNotExist] 1`] = ` -"Error deleting policy set DoesNotExist +"Error deleting alpha realm policy set DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -199,7 +199,7 @@ exports[`PolicySetOps exportPolicySet() 2: Export existing policy set w/ deps [F `; exports[`PolicySetOps exportPolicySet() 3: Export non-existing policy set [DoesNotExist] 1`] = ` -"Error exporting policy set DoesNotExist +"Error exporting alpha realm policy set DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -961,7 +961,7 @@ exports[`PolicySetOps readPolicySet() 1: Get existing policy set [FrodoTestPolic `; exports[`PolicySetOps readPolicySet() 2: Get non-existing policy set [DoesNotExist] 1`] = ` -"Error reading policy set DoesNotExist +"Error reading alpha realm policy set DoesNotExist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -1386,7 +1386,7 @@ exports[`PolicySetOps updatePolicySet() 1: Update existing policy set [FrodoTest `; exports[`PolicySetOps updatePolicySet() 2: Update non-existing policy set [FrodoTestPolicySet6] 1`] = ` -"Error updating policy set undefined +"Error updating alpha realm policy set undefined HTTP client error Code: ERR_BAD_REQUEST Status: 404 diff --git a/src/test/snapshots/ops/ResourceTypeOps.test.js.snap b/src/test/snapshots/ops/ResourceTypeOps.test.js.snap index f30338d6c..0424342fa 100644 --- a/src/test/snapshots/ops/ResourceTypeOps.test.js.snap +++ b/src/test/snapshots/ops/ResourceTypeOps.test.js.snap @@ -21,7 +21,7 @@ exports[`ResourceTypeOps createResourceType() 1: Create non-existing resource ty `; exports[`ResourceTypeOps createResourceType() 2: Create existing resource type [e219144d-8d94-47b6-8789-3a7b820d6cde - FrodoTestResourceType4] 1`] = ` -"Error creating resource type +"Error creating alpha realm resource type HTTP client error Code: ERR_BAD_REQUEST Status: 409 @@ -32,7 +32,7 @@ exports[`ResourceTypeOps createResourceType() 2: Create existing resource type [ exports[`ResourceTypeOps deleteResourceType() 1: Delete existing resource type [3d66c934-9bab-4363-973b-f5502245decc - FrodoTestResourceType7] 1`] = `{}`; exports[`ResourceTypeOps deleteResourceType() 2: Delete non-existing resource type [00000000-0000-0000-0000-000000000000] 1`] = ` -"Error deleting resource type 00000000-0000-0000-0000-000000000000 +"Error deleting alpha realm resource type 00000000-0000-0000-0000-000000000000 HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -43,8 +43,8 @@ exports[`ResourceTypeOps deleteResourceType() 2: Delete non-existing resource ty exports[`ResourceTypeOps deleteResourceTypeByName() 1: Delete existing resource type by name [FrodoTestResourceType8 - 84f7b719-cbd4-4b82-8170-6c230f2973be] 1`] = `{}`; exports[`ResourceTypeOps deleteResourceTypeByName() 2: Delete non-existing resource type by name [DoesNotExist] 1`] = ` -"Error deleting resource type DoesNotExist - Error reading resource type DoesNotExist +"Error deleting alpha realm resource type DoesNotExist + Error reading alpha realm resource type DoesNotExist Resource Type with name DoesNotExist does not exist in realm alpha" `; @@ -77,7 +77,7 @@ exports[`ResourceTypeOps exportResourceType() 1: Export existing resource type b `; exports[`ResourceTypeOps exportResourceType() 2: Export non-existing resource type by uuid [00000000-0000-0000-0000-000000000000] 1`] = ` -"Resource type 00000000-0000-0000-0000-000000000000 does not exist +"alpha realm resource type 00000000-0000-0000-0000-000000000000 does not exist HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -114,8 +114,8 @@ exports[`ResourceTypeOps exportResourceTypeByName() 1: Export existing resource `; exports[`ResourceTypeOps exportResourceTypeByName() 2: Export non-existing resource type by name [DoesNotExist] 1`] = ` -"Error exporting resource type DoesNotExist - Error reading resource type DoesNotExist +"Error exporting alpha realm resource type DoesNotExist + Error reading alpha realm resource type DoesNotExist Resource Type with name DoesNotExist does not exist in realm alpha" `; @@ -531,7 +531,7 @@ exports[`ResourceTypeOps readResourceType() 1: Get existing resource type by uui `; exports[`ResourceTypeOps readResourceType() 2: Get non-existing resource type by uuid [00000000-0000-0000-0000-000000000000] 1`] = ` -"Error reading resource type 00000000-0000-0000-0000-000000000000 +"Error reading alpha realm resource type 00000000-0000-0000-0000-000000000000 HTTP client error Code: ERR_BAD_REQUEST Status: 404 @@ -560,7 +560,7 @@ exports[`ResourceTypeOps readResourceTypeByName() 1: Get existing resource type `; exports[`ResourceTypeOps readResourceTypeByName() 2: Get non-existing resource type by name [DoesNotExist] 1`] = ` -"Error reading resource type DoesNotExist +"Error reading alpha realm resource type DoesNotExist Resource Type with name DoesNotExist does not exist in realm alpha" `; @@ -850,7 +850,7 @@ exports[`ResourceTypeOps updateResourceType() 1: Update existing resource type [ `; exports[`ResourceTypeOps updateResourceType() 2: Update non-existing resource type [05e5fdb6-435e-43d9-b707-c73f7f347358 - FrodoTestResourceType6] 1`] = ` -"Error updating resource type 05e5fdb6-435e-43d9-b707-c73f7f347358 +"Error updating alpha realm resource type 05e5fdb6-435e-43d9-b707-c73f7f347358 HTTP client error Code: ERR_BAD_REQUEST Status: 404 diff --git a/src/test/snapshots/ops/ThemeOps.test.js.snap b/src/test/snapshots/ops/ThemeOps.test.js.snap index 3b271aa81..295adc52b 100644 --- a/src/test/snapshots/ops/ThemeOps.test.js.snap +++ b/src/test/snapshots/ops/ThemeOps.test.js.snap @@ -394,7 +394,7 @@ exports[`ThemeOps deleteTheme() 3: Delete root theme 'd6636b33-111b-40f2-870d-f4 `; exports[`ThemeOps deleteTheme() 4: Delete theme 'd6636b33-111b-40f2-870d-f4dcb7281e43' from non-existent realm 1`] = ` -"Error deleting theme d6636b33-111b-40f2-870d-f4dcb7281e43 +"Error deleting alpha realm theme d6636b33-111b-40f2-870d-f4dcb7281e43 'd6636b33-111b-40f2-870d-f4dcb7281e43' not found in realm 'doesnotexist'" `; @@ -792,7 +792,7 @@ exports[`ThemeOps deleteThemeByName() 3: Delete root theme 'Starter Theme' by na `; exports[`ThemeOps deleteThemeByName() 4: Delete theme 'Starter Theme' by name from non-existent realm (encore) 1`] = ` -"Error deleting theme Starter Theme +"Error deleting alpha realm theme Starter Theme 'Starter Theme' not found in realm 'doesnotexist'" `; @@ -2522,7 +2522,7 @@ exports[`ThemeOps deleteThemes() 3: Delete all root themes (encore) 1`] = ` `; exports[`ThemeOps deleteThemes() 4: Delete all themes in non-existent realm 1`] = ` -"Error deleting themes +"Error deleting alpha realm themes No theme configuration found for realm 'doesnotexist'" `; @@ -4587,7 +4587,7 @@ exports[`ThemeOps readTheme() 3: Read root theme 'd6636b33-111b-40f2-870d-f4dcb7 `; exports[`ThemeOps readTheme() 4: Read theme 'd6636b33-111b-40f2-870d-f4dcb7281e43' from non-existent realm 1`] = ` -"Error reading theme d6636b33-111b-40f2-870d-f4dcb7281e43 +"Error reading alpha realm theme d6636b33-111b-40f2-870d-f4dcb7281e43 Theme with id 'd6636b33-111b-40f2-870d-f4dcb7281e43' not found in realm 'doesnotexist'!" `; @@ -4985,7 +4985,7 @@ exports[`ThemeOps readThemeByName() 3: Read root theme 'Starter Theme' (encore) `; exports[`ThemeOps readThemeByName() 4: Read theme 'Starter Theme' from non-existent realm 1`] = ` -"Error reading theme Starter Theme +"Error reading alpha realm theme Starter Theme Theme 'Starter Theme' not found in realm 'doesnotexist'!" `; diff --git a/src/utils/ExportImportUtils.ts b/src/utils/ExportImportUtils.ts index 720536094..6d21108ca 100644 --- a/src/utils/ExportImportUtils.ts +++ b/src/utils/ExportImportUtils.ts @@ -677,12 +677,25 @@ export async function getResult( resultCallback(undefined, result); } return result; - } catch (e) { - const error = errorMessage ? new FrodoError(errorMessage, e) : e; - if (resultCallback) { - resultCallback(error, undefined); - } else { - throw error; + } catch (error) { + if ( + !( + // operation is not available in PingOne Advanced Identity Cloud + ( + error.httpStatus === 403 && + error.httpMessage === + 'This operation is not available in PingOne Advanced Identity Cloud.' + ) + ) + ) { + const finalError = errorMessage + ? new FrodoError(errorMessage, error) + : error; + if (resultCallback) { + resultCallback(finalError, undefined); + } else { + throw finalError; + } } } }