diff --git a/package-lock.json b/package-lock.json index 8e850bf..faa1e26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,17 +12,17 @@ "@dfinity/utils": "^4.1.0", "@icp-sdk/canisters": "^3.3.0", "@icp-sdk/core": "^5.0.0", - "@junobuild/admin": "^4.1.0-next-2026-03-12", - "@junobuild/cdn": "^2.3.0-next-2026-03-12", - "@junobuild/cli-tools": "^0.10.2-next-2026-03-12", - "@junobuild/config": "^2.11.0-next-2026-03-12", - "@junobuild/config-loader": "^0.4.8-next-2026-03-12", - "@junobuild/core": "^5.2.0-next-2026-03-12", - "@junobuild/functions-tools": "^0.4.0-next-2026-03-12", - "@junobuild/ic-client": "^8.0.0-next-2026-03-12", - "@junobuild/storage": "^2.3.0-next-2026-03-12", - "@junobuild/utils": "^0.2.6-next-2026-03-12", - "@junobuild/zod": "^0.0.2-next-2026-03-12", + "@junobuild/admin": "^4.1.0-next-2026-03-12.2", + "@junobuild/cdn": "^2.3.0-next-2026-03-12.2", + "@junobuild/cli-tools": "^0.10.2-next-2026-03-12.2", + "@junobuild/config": "^2.11.0-next-2026-03-12.2", + "@junobuild/config-loader": "^0.4.8-next-2026-03-12.2", + "@junobuild/core": "^5.2.0-next-2026-03-12.2", + "@junobuild/functions-tools": "^0.4.0-next-2026-03-12.2", + "@junobuild/ic-client": "^8.0.0-next-2026-03-12.2", + "@junobuild/storage": "^2.3.0-next-2026-03-12.2", + "@junobuild/utils": "^0.2.6-next-2026-03-12.2", + "@junobuild/zod": "^0.0.2-next-2026-03-12.2", "chokidar": "^4.0.3", "conf": "^14.0.0", "open": "^11.0.0", @@ -39,7 +39,7 @@ "@eslint/eslintrc": "^3.3.3", "@eslint/js": "^9.39.2", "@junobuild/emulator-playwright": "^0.0.5", - "@junobuild/functions": "^0.5.6-next-2026-03-12", + "@junobuild/functions": "^0.5.6-next-2026-03-12.2", "@playwright/test": "^1.58.1", "@types/node": "24.10.9", "@types/prompts": "^2.4.9", @@ -57,21 +57,6 @@ "node": ">=20" } }, - "../juno-js/packages/admin": { - "name": "@junobuild/admin", - "version": "0.0.58", - "extraneous": true, - "license": "MIT", - "peerDependencies": { - "@dfinity/agent": "^2.1.3", - "@dfinity/ic-management": "^6.0.0-next-2024-11-26", - "@dfinity/identity": "^2.1.3", - "@dfinity/principal": "^2.1.3", - "@junobuild/config": "*", - "@junobuild/utils": "*", - "semver": "7.*" - } - }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -877,9 +862,9 @@ } }, "node_modules/@borewit/text-codec": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.1.tgz", - "integrity": "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", + "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", "license": "MIT", "funding": { "type": "github", @@ -1732,9 +1717,9 @@ } }, "node_modules/@junobuild/admin": { - "version": "4.1.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-4.1.0-next-2026-03-12.tgz", - "integrity": "sha512-3SJOfk0v4CNeiaNE3HwWkXMs+skT5Y/f34GIROY8LqzH8GaegO8b5QF9ATtgseOUwa4J5wUSAaHB01YBBTzO1A==", + "version": "4.1.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-4.1.0-next-2026-03-12.2.tgz", + "integrity": "sha512-A6rQJFG48a8Bip7ooabjgYX7TG1jCWxEQRWUqikDi20H/VASd1cIQRk37iilaY5Ab1H7jmPLTMOekWl7uDWn0g==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*", @@ -1747,9 +1732,9 @@ } }, "node_modules/@junobuild/cdn": { - "version": "2.3.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-2.3.0-next-2026-03-12.tgz", - "integrity": "sha512-i0qFlXKdP4QoebBggQKlFaDN+OdsIKR7z+JVZ9sGMs+0BkZD7/zBva4b13yawa9iSNIg5rpnhfQtaQBs1NzC2g==", + "version": "2.3.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-2.3.0-next-2026-03-12.2.tgz", + "integrity": "sha512-wMKcq7FFAzJztnGKpF+Didwj9BsmD7mToeqE0s/zg4uWc6CrGK8mk8vVXEMnTHy1BSuMbssDaMO6lYbT28prsA==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*", @@ -1762,9 +1747,9 @@ } }, "node_modules/@junobuild/cli-tools": { - "version": "0.10.2-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.10.2-next-2026-03-12.tgz", - "integrity": "sha512-qFxnf5Sny32YHsKSLAYyhcE8QXfdrppUIUg8pymkrRFvx3PpdItJ6GfzXHY2xzEcb+64bineDasYcyFTt0MyWQ==", + "version": "0.10.2-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.10.2-next-2026-03-12.2.tgz", + "integrity": "sha512-ZTugmm2vszW0d/FoiMgTqSrBa+J3ErErJpNGDL9AbaWE0KQVqnI+WOf/WSdu+M1bepyc2Me/HN0nvUaD07RBfg==", "license": "MIT", "dependencies": { "file-type": "^21.1.1", @@ -1783,9 +1768,9 @@ } }, "node_modules/@junobuild/config": { - "version": "2.11.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.11.0-next-2026-03-12.tgz", - "integrity": "sha512-0CSo6NELDokRBnAqYw/NOPrQJ+jeUfXo6kGBZ/RqSEXJl4FFQUCDPAHPDco2QnTahZg3VkhVAoSklwe0qJH1pQ==", + "version": "2.11.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.11.0-next-2026-03-12.2.tgz", + "integrity": "sha512-ijLlEgkK2nbMSrj1vY6Evr5MgxnktpKG20cnHbimKZSdNwLzCDancxHRjwMzXhVpkwOT19biHdz7CsgxJWT63Q==", "license": "MIT", "peerDependencies": { "@junobuild/zod": "*", @@ -1793,9 +1778,9 @@ } }, "node_modules/@junobuild/config-loader": { - "version": "0.4.8-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.4.8-next-2026-03-12.tgz", - "integrity": "sha512-6FWR7ZX2B1vbJ1axkr4cET9XnnkIxLo8ye6+hCAQMVUC0htvVWy0fG/KvhVBcvrw/4txCKDmi7GgNXlWFbjOVw==", + "version": "0.4.8-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.4.8-next-2026-03-12.2.tgz", + "integrity": "sha512-SL9faM1GZcs66fLZk4/rvxG0UBO3xjhmbGt6qOQbWAO/iIxcQsOO1+1MLN+240Sl8QinXeP20lLpGGTbhIDVrA==", "license": "MIT", "peerDependencies": { "@babel/core": "*", @@ -1805,9 +1790,9 @@ } }, "node_modules/@junobuild/core": { - "version": "5.2.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-5.2.0-next-2026-03-12.tgz", - "integrity": "sha512-W5++FvIdstAs7ILmEhNPUMhJQdrNhP11PwlR9zf+hfKUCYf3c0q/durR9SiVHeoh4lIEsEXNu0sRhaLqg7BPcQ==", + "version": "5.2.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-5.2.0-next-2026-03-12.2.tgz", + "integrity": "sha512-alEOcnR+36YI1AcublzvVushSYpSmsQYqCwOXUZMV+SBDTwuZr9DKwa4pXxVY4M8ovRelX5n5TwuJDJ2hQ+VJA==", "license": "MIT", "dependencies": { "@junobuild/auth": "^4", @@ -1881,9 +1866,9 @@ "license": "MIT" }, "node_modules/@junobuild/functions": { - "version": "0.5.6-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.5.6-next-2026-03-12.tgz", - "integrity": "sha512-55in5ImdI+/av4UqPTSetpY7+d5NRTUyBMvBotFW9I6GXK1xGa8Mv1J3Z/GoVacbjrxCdPEp88IrmRyvB4RC6A==", + "version": "0.5.6-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.5.6-next-2026-03-12.2.tgz", + "integrity": "sha512-5eTV1D3SvsbEGU047xb7g+mq8p1q4PBJyuPTLDxRBD+YBsRLjdbrnllHS3aj//4VcDkSraamuwPLkRg+oNTpfw==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*", @@ -1893,9 +1878,9 @@ } }, "node_modules/@junobuild/functions-tools": { - "version": "0.4.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/functions-tools/-/functions-tools-0.4.0-next-2026-03-12.tgz", - "integrity": "sha512-VPpjs3OKKqTDaE+PRuiPchminJ5bweJp6gsWywRJHTVMuKpOnovEOs+GcfWEoIvOnZH+6GFfodEsUNhvsvL7Dw==", + "version": "0.4.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/functions-tools/-/functions-tools-0.4.0-next-2026-03-12.2.tgz", + "integrity": "sha512-RKCl/4SKCQhIhWGQQuczAEf6wWPvf2iA8/bkLxkQhbAuySYChmZK3bxnjRikWGbQUKwrEHuKphTuciUO72oeeg==", "license": "MIT", "peerDependencies": { "@babel/core": "*", @@ -1912,9 +1897,9 @@ } }, "node_modules/@junobuild/ic-client": { - "version": "8.0.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/ic-client/-/ic-client-8.0.0-next-2026-03-12.tgz", - "integrity": "sha512-d/8+Tjbb/dg8YVE4qDSYD/+JRhHMat5J9jZ+d6J1tu9Xm9YJMW6IgabBzVDzxFinC4TYjSm3EeSQsObOt4gMIQ==", + "version": "8.0.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/ic-client/-/ic-client-8.0.0-next-2026-03-12.2.tgz", + "integrity": "sha512-RP01qe/8viKsCIUGRH29RhP8P5yrcPL+qG/AtkU5bpJGxz63gT1Thk2nlqai7sVyhAs2rrme6HY0QTzA3Ol+5g==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*", @@ -1923,9 +1908,9 @@ } }, "node_modules/@junobuild/storage": { - "version": "2.3.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-2.3.0-next-2026-03-12.tgz", - "integrity": "sha512-Ri4VEO1QN2jygCkwPvSAlO4mTSghrmUfoEgrns9mcbwXnpps0iGOdgiBv/5XBnosVViSH3TDtk8v0qZFlCqxbw==", + "version": "2.3.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-2.3.0-next-2026-03-12.2.tgz", + "integrity": "sha512-g2mucX9/umt5aYbYZTHXq5jAyiuE761z1SF+52S53MFf+OOV9Vda4joNbOtn7k3Cz1ZpcbBIoUhVx4TR7sORiA==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*", @@ -1935,18 +1920,18 @@ } }, "node_modules/@junobuild/utils": { - "version": "0.2.6-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.2.6-next-2026-03-12.tgz", - "integrity": "sha512-7MhPh2EgB1in50LdulJISL0Z9iTFdHSJXnoPWyrOwQl9/2nVFvEtnTXGhU56tl6HucgCv8S4bQwyLMOqMnQB/Q==", + "version": "0.2.6-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.2.6-next-2026-03-12.2.tgz", + "integrity": "sha512-tr6ubx/JePzvwDI06LMGbJvLvRXl2Wd8GmGykKaNlcbFemr+GbEOB7yfwFTCAZ1WYoE1X9meIYmZ7KPwt7/VQA==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*" } }, "node_modules/@junobuild/zod": { - "version": "0.0.2-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/zod/-/zod-0.0.2-next-2026-03-12.tgz", - "integrity": "sha512-Or1usOkARbmUszve51k8DSV6cxZPGG5m6lQ0gdUY0JZLFUeh8o/bFJ8Gfqav6Nyb7sX9khA6Ii64VFo3DWpsFQ==", + "version": "0.0.2-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/zod/-/zod-0.0.2-next-2026-03-12.2.tgz", + "integrity": "sha512-m1GI05tOO5mKI+bcm90GLsWhy+D5mh/19zqtk9MqC+nLki0uiKgbJbEQt0rOw4S5WswV9Ij2cAyeeHDuyCUI2Q==", "license": "MIT", "dependencies": { "@dfinity/zod-schemas": "^3.1" @@ -4044,9 +4029,9 @@ } }, "node_modules/file-type": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.0.tgz", - "integrity": "sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==", + "version": "21.3.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.1.tgz", + "integrity": "sha512-SrzXX46I/zsRDjTb82eucsGg0ODq2NpGDp4HcsFKApPy8P8vACjpJRDoGGMfEzhFC0ry61ajd7f72J3603anBA==", "license": "MIT", "dependencies": { "@tokenizer/inflate": "^0.4.1", @@ -7467,9 +7452,9 @@ } }, "@borewit/text-codec": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.1.tgz", - "integrity": "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", + "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==" }, "@dfinity/cbor": { "version": "0.2.2", @@ -7923,21 +7908,21 @@ } }, "@junobuild/admin": { - "version": "4.1.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-4.1.0-next-2026-03-12.tgz", - "integrity": "sha512-3SJOfk0v4CNeiaNE3HwWkXMs+skT5Y/f34GIROY8LqzH8GaegO8b5QF9ATtgseOUwa4J5wUSAaHB01YBBTzO1A==", + "version": "4.1.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-4.1.0-next-2026-03-12.2.tgz", + "integrity": "sha512-A6rQJFG48a8Bip7ooabjgYX7TG1jCWxEQRWUqikDi20H/VASd1cIQRk37iilaY5Ab1H7jmPLTMOekWl7uDWn0g==", "requires": {} }, "@junobuild/cdn": { - "version": "2.3.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-2.3.0-next-2026-03-12.tgz", - "integrity": "sha512-i0qFlXKdP4QoebBggQKlFaDN+OdsIKR7z+JVZ9sGMs+0BkZD7/zBva4b13yawa9iSNIg5rpnhfQtaQBs1NzC2g==", + "version": "2.3.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-2.3.0-next-2026-03-12.2.tgz", + "integrity": "sha512-wMKcq7FFAzJztnGKpF+Didwj9BsmD7mToeqE0s/zg4uWc6CrGK8mk8vVXEMnTHy1BSuMbssDaMO6lYbT28prsA==", "requires": {} }, "@junobuild/cli-tools": { - "version": "0.10.2-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.10.2-next-2026-03-12.tgz", - "integrity": "sha512-qFxnf5Sny32YHsKSLAYyhcE8QXfdrppUIUg8pymkrRFvx3PpdItJ6GfzXHY2xzEcb+64bineDasYcyFTt0MyWQ==", + "version": "0.10.2-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.10.2-next-2026-03-12.2.tgz", + "integrity": "sha512-ZTugmm2vszW0d/FoiMgTqSrBa+J3ErErJpNGDL9AbaWE0KQVqnI+WOf/WSdu+M1bepyc2Me/HN0nvUaD07RBfg==", "requires": { "file-type": "^21.1.1", "listr2": "^9.0.5", @@ -7946,21 +7931,21 @@ } }, "@junobuild/config": { - "version": "2.11.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.11.0-next-2026-03-12.tgz", - "integrity": "sha512-0CSo6NELDokRBnAqYw/NOPrQJ+jeUfXo6kGBZ/RqSEXJl4FFQUCDPAHPDco2QnTahZg3VkhVAoSklwe0qJH1pQ==", + "version": "2.11.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.11.0-next-2026-03-12.2.tgz", + "integrity": "sha512-ijLlEgkK2nbMSrj1vY6Evr5MgxnktpKG20cnHbimKZSdNwLzCDancxHRjwMzXhVpkwOT19biHdz7CsgxJWT63Q==", "requires": {} }, "@junobuild/config-loader": { - "version": "0.4.8-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.4.8-next-2026-03-12.tgz", - "integrity": "sha512-6FWR7ZX2B1vbJ1axkr4cET9XnnkIxLo8ye6+hCAQMVUC0htvVWy0fG/KvhVBcvrw/4txCKDmi7GgNXlWFbjOVw==", + "version": "0.4.8-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.4.8-next-2026-03-12.2.tgz", + "integrity": "sha512-SL9faM1GZcs66fLZk4/rvxG0UBO3xjhmbGt6qOQbWAO/iIxcQsOO1+1MLN+240Sl8QinXeP20lLpGGTbhIDVrA==", "requires": {} }, "@junobuild/core": { - "version": "5.2.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-5.2.0-next-2026-03-12.tgz", - "integrity": "sha512-W5++FvIdstAs7ILmEhNPUMhJQdrNhP11PwlR9zf+hfKUCYf3c0q/durR9SiVHeoh4lIEsEXNu0sRhaLqg7BPcQ==", + "version": "5.2.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-5.2.0-next-2026-03-12.2.tgz", + "integrity": "sha512-alEOcnR+36YI1AcublzvVushSYpSmsQYqCwOXUZMV+SBDTwuZr9DKwa4pXxVY4M8ovRelX5n5TwuJDJ2hQ+VJA==", "requires": { "@junobuild/auth": "^4", "@junobuild/errors": "*", @@ -8002,39 +7987,39 @@ "integrity": "sha512-uyfpITxVCDfxcALXi1CVxrwSK8yoVPZW8pgzf5fD1c2Vp1k7B0AIs/s4usW8SLR1CVvjOzf9m/jtVeFe6kuOtQ==" }, "@junobuild/functions": { - "version": "0.5.6-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.5.6-next-2026-03-12.tgz", - "integrity": "sha512-55in5ImdI+/av4UqPTSetpY7+d5NRTUyBMvBotFW9I6GXK1xGa8Mv1J3Z/GoVacbjrxCdPEp88IrmRyvB4RC6A==", + "version": "0.5.6-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.5.6-next-2026-03-12.2.tgz", + "integrity": "sha512-5eTV1D3SvsbEGU047xb7g+mq8p1q4PBJyuPTLDxRBD+YBsRLjdbrnllHS3aj//4VcDkSraamuwPLkRg+oNTpfw==", "requires": {} }, "@junobuild/functions-tools": { - "version": "0.4.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/functions-tools/-/functions-tools-0.4.0-next-2026-03-12.tgz", - "integrity": "sha512-VPpjs3OKKqTDaE+PRuiPchminJ5bweJp6gsWywRJHTVMuKpOnovEOs+GcfWEoIvOnZH+6GFfodEsUNhvsvL7Dw==", + "version": "0.4.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/functions-tools/-/functions-tools-0.4.0-next-2026-03-12.2.tgz", + "integrity": "sha512-RKCl/4SKCQhIhWGQQuczAEf6wWPvf2iA8/bkLxkQhbAuySYChmZK3bxnjRikWGbQUKwrEHuKphTuciUO72oeeg==", "requires": {} }, "@junobuild/ic-client": { - "version": "8.0.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/ic-client/-/ic-client-8.0.0-next-2026-03-12.tgz", - "integrity": "sha512-d/8+Tjbb/dg8YVE4qDSYD/+JRhHMat5J9jZ+d6J1tu9Xm9YJMW6IgabBzVDzxFinC4TYjSm3EeSQsObOt4gMIQ==", + "version": "8.0.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/ic-client/-/ic-client-8.0.0-next-2026-03-12.2.tgz", + "integrity": "sha512-RP01qe/8viKsCIUGRH29RhP8P5yrcPL+qG/AtkU5bpJGxz63gT1Thk2nlqai7sVyhAs2rrme6HY0QTzA3Ol+5g==", "requires": {} }, "@junobuild/storage": { - "version": "2.3.0-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-2.3.0-next-2026-03-12.tgz", - "integrity": "sha512-Ri4VEO1QN2jygCkwPvSAlO4mTSghrmUfoEgrns9mcbwXnpps0iGOdgiBv/5XBnosVViSH3TDtk8v0qZFlCqxbw==", + "version": "2.3.0-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-2.3.0-next-2026-03-12.2.tgz", + "integrity": "sha512-g2mucX9/umt5aYbYZTHXq5jAyiuE761z1SF+52S53MFf+OOV9Vda4joNbOtn7k3Cz1ZpcbBIoUhVx4TR7sORiA==", "requires": {} }, "@junobuild/utils": { - "version": "0.2.6-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.2.6-next-2026-03-12.tgz", - "integrity": "sha512-7MhPh2EgB1in50LdulJISL0Z9iTFdHSJXnoPWyrOwQl9/2nVFvEtnTXGhU56tl6HucgCv8S4bQwyLMOqMnQB/Q==", + "version": "0.2.6-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.2.6-next-2026-03-12.2.tgz", + "integrity": "sha512-tr6ubx/JePzvwDI06LMGbJvLvRXl2Wd8GmGykKaNlcbFemr+GbEOB7yfwFTCAZ1WYoE1X9meIYmZ7KPwt7/VQA==", "requires": {} }, "@junobuild/zod": { - "version": "0.0.2-next-2026-03-12", - "resolved": "https://registry.npmjs.org/@junobuild/zod/-/zod-0.0.2-next-2026-03-12.tgz", - "integrity": "sha512-Or1usOkARbmUszve51k8DSV6cxZPGG5m6lQ0gdUY0JZLFUeh8o/bFJ8Gfqav6Nyb7sX9khA6Ii64VFo3DWpsFQ==", + "version": "0.0.2-next-2026-03-12.2", + "resolved": "https://registry.npmjs.org/@junobuild/zod/-/zod-0.0.2-next-2026-03-12.2.tgz", + "integrity": "sha512-m1GI05tOO5mKI+bcm90GLsWhy+D5mh/19zqtk9MqC+nLki0uiKgbJbEQt0rOw4S5WswV9Ij2cAyeeHDuyCUI2Q==", "requires": { "@dfinity/zod-schemas": "^3.1" } @@ -9379,9 +9364,9 @@ } }, "file-type": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.0.tgz", - "integrity": "sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==", + "version": "21.3.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.1.tgz", + "integrity": "sha512-SrzXX46I/zsRDjTb82eucsGg0ODq2NpGDp4HcsFKApPy8P8vACjpJRDoGGMfEzhFC0ry61ajd7f72J3603anBA==", "requires": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.4", diff --git a/package.json b/package.json index b1719c0..9ea55f3 100644 --- a/package.json +++ b/package.json @@ -32,17 +32,17 @@ "@dfinity/utils": "^4.1.0", "@icp-sdk/canisters": "^3.3.0", "@icp-sdk/core": "^5.0.0", - "@junobuild/admin": "^4.1.0-next-2026-03-12", - "@junobuild/cdn": "^2.3.0-next-2026-03-12", - "@junobuild/cli-tools": "^0.10.2-next-2026-03-12", - "@junobuild/config": "^2.11.0-next-2026-03-12", - "@junobuild/config-loader": "^0.4.8-next-2026-03-12", - "@junobuild/core": "^5.2.0-next-2026-03-12", - "@junobuild/functions-tools": "^0.4.0-next-2026-03-12", - "@junobuild/ic-client": "^8.0.0-next-2026-03-12", - "@junobuild/storage": "^2.3.0-next-2026-03-12", - "@junobuild/utils": "^0.2.6-next-2026-03-12", - "@junobuild/zod": "^0.0.2-next-2026-03-12", + "@junobuild/admin": "^4.1.0-next-2026-03-12.2", + "@junobuild/cdn": "^2.3.0-next-2026-03-12.2", + "@junobuild/cli-tools": "^0.10.2-next-2026-03-12.2", + "@junobuild/config": "^2.11.0-next-2026-03-12.2", + "@junobuild/config-loader": "^0.4.8-next-2026-03-12.2", + "@junobuild/core": "^5.2.0-next-2026-03-12.2", + "@junobuild/functions-tools": "^0.4.0-next-2026-03-12.2", + "@junobuild/ic-client": "^8.0.0-next-2026-03-12.2", + "@junobuild/storage": "^2.3.0-next-2026-03-12.2", + "@junobuild/utils": "^0.2.6-next-2026-03-12.2", + "@junobuild/zod": "^0.0.2-next-2026-03-12.2", "chokidar": "^4.0.3", "conf": "^14.0.0", "open": "^11.0.0", @@ -56,7 +56,7 @@ "@eslint/eslintrc": "^3.3.3", "@eslint/js": "^9.39.2", "@junobuild/emulator-playwright": "^0.0.5", - "@junobuild/functions": "^0.5.6-next-2026-03-12", + "@junobuild/functions": "^0.5.6-next-2026-03-12.2", "@playwright/test": "^1.58.1", "@types/node": "24.10.9", "@types/prompts": "^2.4.9", diff --git a/src/services/functions/build/build.api.services.ts b/src/services/functions/build/build.api.services.ts new file mode 100644 index 0000000..23867de --- /dev/null +++ b/src/services/functions/build/build.api.services.ts @@ -0,0 +1,111 @@ +import {isNullish} from '@dfinity/utils'; +import type {GenerateResultData} from '@junobuild/cli-tools'; +import { + generateIdlApi as generateIdlApiLib, + generateZodApi as generateZodApiLib, + type TransformerOptions +} from '@junobuild/functions-tools'; +import {existsSync} from 'node:fs'; +import {mkdir, rm} from 'node:fs/promises'; +import {detectJunoConfigType} from '../../../configs/juno.config'; +import {DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH} from '../../../constants/dev.constants'; +import type {BuildLang} from '../../../types/build'; +import {satellitedIdl} from '../../../utils/build.utils'; +import {readPackageJson} from '../../../utils/pkg.utils'; + +export const generateIdlApi = async () => { + const inputFile = satellitedIdl('ts'); + + if (!existsSync(inputFile)) { + return; + } + + const detectedConfig = detectJunoConfigType(); + const lang = detectedConfig?.configType === 'ts' ? 'ts' : 'mjs'; + + const generateFn: GenerateFn = async (params) => { + await generateIdlApiLib({inputFile, ...params}); + }; + + await generateApi({generateFn, lang}); +}; + +export const generateZodApi = async ({ + generatedData, + lang +}: { + generatedData: GenerateResultData; + lang: Omit; +}) => { + const {generate} = generatedData; + + if (isNullish(generate)) { + const {outputFile} = buildOutput({lang}); + await rm(outputFile, {force: true}); + return; + } + + const {updates, queries} = generate; + const functions = [...queries, ...updates]; + + const generateFn: GenerateFn = async (params) => { + await generateZodApiLib({ + ...params, + functions + }); + }; + + await generateApi({generateFn, lang}); +}; + +type GenerateFn = (params: { + outputFile: string; + transformerOptions: TransformerOptions; +}) => Promise; + +const generateApi = async ({ + generateFn, + lang +}: { + generateFn: GenerateFn; + lang: Omit; +}) => { + const readCoreLib = async (): Promise<'core' | 'core-standalone'> => { + try { + const {dependencies} = await readPackageJson(); + return Object.keys(dependencies ?? {}).includes('@junobuild/core-standalone') + ? 'core-standalone' + : 'core'; + } catch (_err: unknown) { + // This should not block the developer therefore we fallback to core which is the common way of using the library + return 'core'; + } + }; + + const coreLib = await readCoreLib(); + + // In TypeScript, unlike for Rust, the declarations folder might not exist yet when the functions + // are parsed for the first time + await mkdir(DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, {recursive: true}); + + const {outputFile, outputLanguage} = buildOutput({lang}); + + await generateFn({ + outputFile, + transformerOptions: { + outputLanguage, + coreLib + } + }); +}; + +const buildOutput = ({ + lang +}: { + lang: Omit; +}): Pick & {outputFile: string} => { + const outputLanguage = lang === 'mjs' ? 'js' : 'ts'; + const outputFile = `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.api.${outputLanguage}`; + + return {outputFile, outputLanguage}; +}; diff --git a/src/services/functions/build/build.did.services.ts b/src/services/functions/build/build.did.services.ts index 6b3150b..7984015 100644 --- a/src/services/functions/build/build.did.services.ts +++ b/src/services/functions/build/build.did.services.ts @@ -1,110 +1,33 @@ import {isNullish} from '@dfinity/utils'; -import {spawn} from '@junobuild/cli-tools'; -import {generateApi as generateApiLib} from '@junobuild/functions-tools'; -import {existsSync} from 'node:fs'; -import {readFile, rename, rm} from 'node:fs/promises'; -import {join} from 'node:path'; -import {detectJunoConfigType} from '../../../configs/juno.config'; +import {type GenerateResultData} from '@junobuild/cli-tools'; +import {generateDid as generateDidLib} from '@junobuild/functions-tools'; +import {rm, writeFile} from 'node:fs/promises'; import { + AUTO_GENERATED, EXTENSION_DID_FILE_NAME, - SATELLITE_CUSTOM_DID_FILE + SATELLITE_CUSTOM_DID_FILE, + SATELLITE_DID_FILE } from '../../../constants/build.constants'; -import {DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH} from '../../../constants/dev.constants'; -import {checkLocalIcpBindgen} from '../../../utils/build.bindgen.utils'; -import {readPackageJson} from '../../../utils/pkg.utils'; -import {detectPackageManager} from '../../../utils/pm.utils'; +import {readSatelliteDid} from '../../../utils/did.utils'; -const satellitedIdl = (type: 'js' | 'ts'): string => - `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.${type === 'ts' ? 'did.d.ts' : 'factory.did.js'}`; +export const generateJsTsDid = async ({generatedData}: {generatedData: GenerateResultData}) => { + const {generate} = generatedData; -export const generateDid = async () => { - // No satellite_extension.did and therefore no services to generate to JS and TS. - if (!existsSync(SATELLITE_CUSTOM_DID_FILE)) { + if (isNullish(generate)) { + await rm(SATELLITE_CUSTOM_DID_FILE, {force: true}); + await rm(SATELLITE_DID_FILE, {force: true}); return; } - // We check if the developer has added any API endpoints. If none, we do not need to generate the bindings for JS and TS. - const extensionDid = await readFile(SATELLITE_CUSTOM_DID_FILE, 'utf-8'); - const noAdditionalExtensionDid = 'service : { build_version : () -> (text) query }'; + const {updates, queries} = generate; - if (extensionDid.trim() === noAdditionalExtensionDid) { - return; - } - - await executeIcpBindgen(); - - // icp-bindgen generates the files in a `declarations` subfolder - // using a different suffix for JavaScript as the one we used to use. - // That's why we have to post-process the results. - const generatedFolder = join(DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, 'declarations'); - - await rename(join(generatedFolder, `${EXTENSION_DID_FILE_NAME}.d.ts`), satellitedIdl('ts')); - await rename(join(generatedFolder, `${EXTENSION_DID_FILE_NAME}.js`), satellitedIdl('js')); - - await rm(generatedFolder, {recursive: true, force: true}); -}; - -const executeIcpBindgen = async () => { - const pm = detectPackageManager(); - - // The assertion on checkIcpBindgen() which requires the installation of icp-bindgen - // is performed earlier to reaching this point. Therefore, we can optimistically - // assume that if no tool is available locally, it should be available globally. - const {valid: localValid} = await checkLocalIcpBindgen({pm}); - const withGlobalCmd = localValid !== true; - - const localCommand = pm === 'npm' || isNullish(pm) ? 'npx' : pm; - - // --actor-disabled: skip generating actor files, since we handle those ourselves - // --force: overwrite files. Required; otherwise, icp-bindgen would delete files at preprocess, - // which causes issues when multiple .did files are located in the same folder. - await spawn({ - command: withGlobalCmd ? 'icp-bindgen' : localCommand, - args: [ - ...(withGlobalCmd ? [] : ['icp-bindgen']), - '--did-file', - SATELLITE_CUSTOM_DID_FILE, - '--out-dir', - DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, - '--actor-disabled', - '--force' - ], - silentOut: true - }); -}; - -export const generateApi = async () => { - const inputFile = satellitedIdl('ts'); - - if (!existsSync(inputFile)) { - return; - } - - const detectedConfig = detectJunoConfigType(); - const outputLanguage = detectedConfig?.configType === 'ts' ? 'ts' : 'js'; - - const outputFile = `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.api.${outputLanguage}`; - - const readCoreLib = async (): Promise<'core' | 'core-standalone'> => { - try { - const {dependencies} = await readPackageJson(); - return Object.keys(dependencies ?? {}).includes('@junobuild/core-standalone') - ? 'core-standalone' - : 'core'; - } catch (_err: unknown) { - // This should not block the developer therefore we fallback to core which is the common way of using the library - return 'core'; - } - }; + await generateDidLib({updates, queries, outputFile: SATELLITE_CUSTOM_DID_FILE}); - const coreLib = await readCoreLib(); + const templateDid = await readSatelliteDid(); - await generateApiLib({ - inputFile, - outputFile, - transformerOptions: { - outputLanguage, - coreLib - } - }); + await writeFile( + SATELLITE_DID_FILE, + `${AUTO_GENERATED}\n\nimport service "${EXTENSION_DID_FILE_NAME}";\n\n${templateDid}`, + 'utf-8' + ); }; diff --git a/src/services/functions/build/build.idl.services.ts b/src/services/functions/build/build.idl.services.ts new file mode 100644 index 0000000..ddb6fe4 --- /dev/null +++ b/src/services/functions/build/build.idl.services.ts @@ -0,0 +1,69 @@ +import {isNullish} from '@dfinity/utils'; +import {spawn} from '@junobuild/cli-tools'; +import {existsSync} from 'node:fs'; +import {readFile, rename, rm} from 'node:fs/promises'; +import {join} from 'node:path'; +import { + EXTENSION_DID_FILE_NAME, + SATELLITE_CUSTOM_DID_FILE +} from '../../../constants/build.constants'; +import {DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH} from '../../../constants/dev.constants'; +import {checkLocalIcpBindgen} from '../../../utils/build.bindgen.utils'; +import {satellitedIdl} from '../../../utils/build.utils'; +import {detectPackageManager} from '../../../utils/pm.utils'; + +export const generateIdl = async () => { + // No satellite_extension.did and therefore no services to generate to JS and TS. + if (!existsSync(SATELLITE_CUSTOM_DID_FILE)) { + return; + } + + // We check if the developer has added any API endpoints. If none, we do not need to generate the bindings for JS and TS. + const extensionDid = await readFile(SATELLITE_CUSTOM_DID_FILE, 'utf-8'); + const noAdditionalExtensionDid = 'service : { build_version : () -> (text) query }'; + + if (extensionDid.trim() === noAdditionalExtensionDid) { + return; + } + + await executeIcpBindgen(); + + // icp-bindgen generates the files in a `declarations` subfolder + // using a different suffix for JavaScript as the one we used to use. + // That's why we have to post-process the results. + const generatedFolder = join(DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, 'declarations'); + + await rename(join(generatedFolder, `${EXTENSION_DID_FILE_NAME}.d.ts`), satellitedIdl('ts')); + await rename(join(generatedFolder, `${EXTENSION_DID_FILE_NAME}.js`), satellitedIdl('js')); + + await rm(generatedFolder, {recursive: true, force: true}); +}; + +const executeIcpBindgen = async () => { + const pm = detectPackageManager(); + + // The assertion on checkIcpBindgen() which requires the installation of icp-bindgen + // is performed earlier to reaching this point. Therefore, we can optimistically + // assume that if no tool is available locally, it should be available globally. + const {valid: localValid} = await checkLocalIcpBindgen({pm}); + const withGlobalCmd = localValid !== true; + + const localCommand = pm === 'npm' || isNullish(pm) ? 'npx' : pm; + + // --actor-disabled: skip generating actor files, since we handle those ourselves + // --force: overwrite files. Required; otherwise, icp-bindgen would delete files at preprocess, + // which causes issues when multiple .did files are located in the same folder. + await spawn({ + command: withGlobalCmd ? 'icp-bindgen' : localCommand, + args: [ + ...(withGlobalCmd ? [] : ['icp-bindgen']), + '--did-file', + SATELLITE_CUSTOM_DID_FILE, + '--out-dir', + DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, + '--actor-disabled', + '--force' + ], + silentOut: true + }); +}; diff --git a/src/services/functions/build/build.javascript.services.ts b/src/services/functions/build/build.javascript.services.ts index 456f4cd..d7998c0 100644 --- a/src/services/functions/build/build.javascript.services.ts +++ b/src/services/functions/build/build.javascript.services.ts @@ -1,4 +1,4 @@ -import {nonNullish, notEmptyString} from '@dfinity/utils'; +import {isNullish, nonNullish, notEmptyString} from '@dfinity/utils'; import { buildAndGenerateFunctions, formatBytes, @@ -6,6 +6,7 @@ import { } from '@junobuild/cli-tools'; import {green, red, yellow} from 'kleur'; import {join} from 'node:path'; +import ora from 'ora'; import { DEPLOY_SPUTNIK_FUNCTIONS_PATH, DEPLOY_SPUTNIK_SCRIPT_PATH, @@ -14,30 +15,71 @@ import { INDEX_TS } from '../../../constants/dev.constants'; import type {BuildArgs, BuildLang, BuildMetadata} from '../../../types/build'; +import {checkIcpBindgen} from '../../../utils/build.bindgen.utils'; import {installEsbuild} from '../../../utils/esbuild.utils'; import {formatTime} from '../../../utils/format.utils'; import {readEmulatorConfigAndCreateDeployTargetDir} from '../../emulator/_fs.services'; +import {generateZodApi} from './build.api.services'; +import {generateJsTsDid} from './build.did.services'; +import {generateIdl} from './build.idl.services'; import {prepareJavaScriptBuildMetadata} from './build.metadata.services'; export const buildTypeScript = async ({ paths, exitOnError }: Pick = {}) => { - await build({lang: 'ts', paths, exitOnError}); + await generateAndBuild({lang: 'ts', paths, exitOnError}); }; export const buildJavaScript = async ({ paths, exitOnError }: Pick = {}) => { - await build({lang: 'mjs', paths, exitOnError}); + await generateAndBuild({lang: 'mjs', paths, exitOnError}); }; type BuildArgsTsJs = {lang: Omit} & Pick; -const build = async ({exitOnError, ...params}: BuildArgsTsJs) => { +const generateAndBuild = async ({lang, ...rest}: BuildArgsTsJs) => { + const result = await build({lang, ...rest}); + + if (result.status === 'error') { + return; + } + + const {result: generatedData} = result; + + const spinner = ora('Generating API...').start(); + + try { + await generateJsTsDid({generatedData}); + + await generateIdl(); + await generateZodApi({generatedData, lang}); + + if (isNullish(generatedData.generate)) { + spinner.stop(); + return; + } + + spinner.succeed('API generated'); + } catch { + spinner.fail('Error generating API'); + } +}; + +const build = async ({ + exitOnError, + ...params +}: BuildArgsTsJs): Promise<{status: 'success'; result: GenerateResultData} | {status: 'error'}> => { await installEsbuild(); + const {valid: validBindgen} = await checkIcpBindgen(); + + if (!validBindgen) { + return {status: 'error'}; + } + await readEmulatorConfigAndCreateDeployTargetDir(); try { @@ -46,10 +88,14 @@ const build = async ({exitOnError, ...params}: BuildArgsTsJs) => { const buildResult = await generate({params, metadata}); printResults({metadata, generateResult: buildResult}); + + return {status: 'success', result: buildResult}; } catch (_error: unknown) { if (exitOnError !== false) { process.exit(1); } + + return {status: 'error'}; } }; @@ -113,10 +159,10 @@ const printResults = ({ console.log(`→ ${yellow(outputPath)} (${formatBytes(bytes)})`); if (nonNullish(generate)) { - const {totalQueries, totalUpdates, outputPath} = generate; + const {queries, updates, outputPath} = generate; console.log( - `${green('⬡')} ${totalQueries} queries and ${totalUpdates} updates generated to ${yellow(outputPath)}` + `${green('⬡')} ${queries.length} queries and ${updates.length} updates generated to ${yellow(outputPath)}` ); } }; diff --git a/src/services/functions/build/build.rust.services.ts b/src/services/functions/build/build.rust.services.ts index 10be897..ef12a19 100644 --- a/src/services/functions/build/build.rust.services.ts +++ b/src/services/functions/build/build.rust.services.ts @@ -27,7 +27,8 @@ import {readSatelliteDid} from '../../../utils/did.utils'; import {checkRustVersion} from '../../../utils/env.utils'; import {formatTime} from '../../../utils/format.utils'; import {readEmulatorConfigAndCreateDeployTargetDir} from '../../emulator/_fs.services'; -import {generateApi, generateDid} from './build.did.services'; +import {generateIdlApi} from './build.api.services'; +import {generateIdl} from './build.idl.services'; import {prepareJunoPkgForSatellite, prepareJunoPkgForSputnik} from './build.metadata.services'; import {dispatchEmulatorTouchSatellite} from './touch.services'; @@ -138,9 +139,9 @@ export const buildRust = async ({ await did({cargoOutputWasm}); if (target !== 'wasm32-wasip1') { - // TODO: support binding files for serverless functions in JS/TS - await generateDid(); - await generateApi(); + // TS/JS Did and Api are generated after build and not based on the extracted did files + await generateIdl(); + await generateIdlApi(); } spinner.text = 'Binding metadata...'; diff --git a/src/utils/build.utils.ts b/src/utils/build.utils.ts index 86edc17..80b7a35 100644 --- a/src/utils/build.utils.ts +++ b/src/utils/build.utils.ts @@ -1,5 +1,6 @@ import {notEmptyString} from '@dfinity/utils'; import {hasArgs, nextArg} from '@junobuild/cli-tools'; +import {DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH} from '../constants/dev.constants'; import type {BuildArgs} from '../types/build'; export const buildArgs = (args?: string[]): BuildArgs => { @@ -39,3 +40,6 @@ const buildLang = (args?: string[]): Pick => { return {}; } }; + +export const satellitedIdl = (type: 'js' | 'ts'): string => + `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.${type === 'ts' ? 'did.d.ts' : 'factory.did.js'}`;