diff --git a/package-lock.json b/package-lock.json index d78f0c48..cf0a6897 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,15 +16,15 @@ "@dfinity/identity": "^2.3.0", "@dfinity/principal": "^2.3.0", "@dfinity/zod-schemas": "^1.0.0", - "@junobuild/admin": "^0.6.8-next-2025-08-02.2", - "@junobuild/cdn": "^0.2.1-next-2025-08-02", - "@junobuild/cli-tools": "^0.3.1-next-2025-08-02", - "@junobuild/config": "^0.4.3-next-2025-08-02", - "@junobuild/config-loader": "^0.3.1-next-2025-08-02", - "@junobuild/core": "^1.0.1-next-2025-08-02", - "@junobuild/did-tools": "^0.2.2-next-2025-08-02", - "@junobuild/storage": "^0.2.2-next-2025-08-02", - "@junobuild/utils": "^0.1.4-next-2025-08-02", + "@junobuild/admin": "^0.6.8-next-2025-08-02.3", + "@junobuild/cdn": "^0.2.1-next-2025-08-02.3", + "@junobuild/cli-tools": "^0.3.1-next-2025-08-02.3", + "@junobuild/config": "^0.4.3-next-2025-08-02.3", + "@junobuild/config-loader": "^0.3.1-next-2025-08-02.3", + "@junobuild/core": "^1.0.1-next-2025-08-02.3", + "@junobuild/did-tools": "^0.2.2-next-2025-08-02.3", + "@junobuild/storage": "^0.2.2-next-2025-08-02.3", + "@junobuild/utils": "^0.1.4-next-2025-08-02.3", "chokidar": "^4.0.3", "conf": "^14.0.0", "open": "^10.2.0", @@ -40,7 +40,7 @@ "devDependencies": { "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.32.0", - "@junobuild/functions": "^0.2.4-next-2025-08-02", + "@junobuild/functions": "^0.2.4-next-2025-08-02.3", "@types/node": "^22.15.27", "@types/prompts": "^2.4.9", "@types/semver": "^7.7.0", @@ -1425,9 +1425,9 @@ } }, "node_modules/@junobuild/admin": { - "version": "0.6.8-next-2025-08-02.2", - "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-0.6.8-next-2025-08-02.2.tgz", - "integrity": "sha512-DJf5YhqkDlMw9yXa9sk3iEVd22/5e3+riKd6GI37QJDXeDoqv5EKObNBs1KDB/vxla0lEIF5G6W20RJswP+rTA==", + "version": "0.6.8-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-0.6.8-next-2025-08-02.3.tgz", + "integrity": "sha512-0tANx/Xb+LB/0eFVQ1FZgprD+nbuf/QQN5G6hQdXyRjGyNaTOVfP6+jE1L9dxWY+SFJTVKq26195X8J0VzXZkw==", "license": "MIT", "peerDependencies": { "@dfinity/agent": "*", @@ -1442,9 +1442,9 @@ } }, "node_modules/@junobuild/cdn": { - "version": "0.2.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-0.2.1-next-2025-08-02.tgz", - "integrity": "sha512-POGrNgCoTl3AtV9K3h4PEW7oqFcwvy7hsMdPA5YWVo3jalR2mT/UPIgCZ6VsVdQdg/r4LgUkPkVlts45Xb4ECA==", + "version": "0.2.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-0.2.1-next-2025-08-02.3.tgz", + "integrity": "sha512-vxC/gcIXsC8/Qkftd49J8fF9VMsDIUyq6ZyPH4iH2w8rzGjvYMbCkCHr1HjOpBq+3qazvDwRvAWj+SHq514Klw==", "license": "MIT", "peerDependencies": { "@dfinity/agent": "*", @@ -1459,9 +1459,9 @@ } }, "node_modules/@junobuild/cli-tools": { - "version": "0.3.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.3.1-next-2025-08-02.tgz", - "integrity": "sha512-VhWIlU5mERMFByAgy3yNN+G3o8krUcmDzfiJGYNtZJcGHx9M/r6VUy1s1kBG5l67M8iJOavTIrUCpFtiEqO0uQ==", + "version": "0.3.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.3.1-next-2025-08-02.3.tgz", + "integrity": "sha512-emBaLY/CcZrxBLOpCc7H9mzy9PBcAIipfyQyp5bfvBRP8Z/CvfAlyc+OmaYtxPfqfKeg1sf0zBBWOuU0GVWSzg==", "license": "MIT", "dependencies": { "file-type": "^21.0.0", @@ -1477,9 +1477,9 @@ } }, "node_modules/@junobuild/config": { - "version": "0.4.3-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.4.3-next-2025-08-02.tgz", - "integrity": "sha512-1TPovXbwt6x5IvqyFVIPgPaCp3MQupjwcNQEC8vET7dZanRIKnMzh1JzlM+JD9wsR9UaG2cJIruk2a98RSlMsA==", + "version": "0.4.3-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.4.3-next-2025-08-02.3.tgz", + "integrity": "sha512-vCza6DFhvg5ty8a5RNBAbf2fFI3vfAOxGRfIJH10uTC812e4VRocnBRnHtZbg/d2Shnepa4j7GTOih5xe5KoBQ==", "license": "MIT", "peerDependencies": { "@dfinity/zod-schemas": "*", @@ -1487,9 +1487,9 @@ } }, "node_modules/@junobuild/config-loader": { - "version": "0.3.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.3.1-next-2025-08-02.tgz", - "integrity": "sha512-3sk65zJXEH3FDePKeoT3QmSyWIFiEwlsGTiakLiNUgBXv1mIITHWp40H8T+l9D4isTXkNQ7lOBfm4pXyP42AEw==", + "version": "0.3.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.3.1-next-2025-08-02.3.tgz", + "integrity": "sha512-VxPmsQM+HM0I2F0bq9WtN4/fRjAPejPfixRR6ovBLqaTydaf6HCtxGELBhvX09xi54goosSv61J6Qu9QN9ZLeQ==", "license": "MIT", "peerDependencies": { "@babel/core": "*", @@ -1499,9 +1499,9 @@ } }, "node_modules/@junobuild/core": { - "version": "1.0.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-1.0.1-next-2025-08-02.tgz", - "integrity": "sha512-Yx5I4MEPRgo0tBLf8N01RaIRMjEnQR8T/ez+XhuTDhVffVnO+matqFm/Y3StQAaLpZBaDd17h2nxo3LCdc4U6A==", + "version": "1.0.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-1.0.1-next-2025-08-02.3.tgz", + "integrity": "sha512-1jIMl8V8rK/ayQtdPbyufQA0JBIexG9K5NlIFdfgHN1hFjyQUU4mhT2Io8TI4AJlmwgRSOWOzNJaz1P8+j5fZg==", "license": "MIT", "dependencies": { "@junobuild/errors": "*", @@ -1518,9 +1518,9 @@ } }, "node_modules/@junobuild/did-tools": { - "version": "0.2.2-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/did-tools/-/did-tools-0.2.2-next-2025-08-02.tgz", - "integrity": "sha512-vpyCgXIh47IJrrw3IF+CrNBLErkO7t4hhPsXs+B5Sd2mXxuE5KT1U8sdvcOzaiPNknzkfM7fLi0WvZ7Ty+jfUw==", + "version": "0.2.2-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/did-tools/-/did-tools-0.2.2-next-2025-08-02.3.tgz", + "integrity": "sha512-27Opazugi7G4N1ITtwI273U8Eo4g2/aSsa45jO6oL1guoyrTW8diNuXR3hTJ1hzCm3cc/tKOOkR39Udb3LgWiQ==", "license": "MIT", "peerDependencies": { "@babel/core": "*", @@ -1539,9 +1539,9 @@ "license": "MIT" }, "node_modules/@junobuild/functions": { - "version": "0.2.4-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.2.4-next-2025-08-02.tgz", - "integrity": "sha512-Tq53mDxc2E8qw7z06JiYFIAHoRix1oNpvP1hAz0xuolpvSNxiFVIqnjC2esEh9ghAmDLaEoYzrKgc53vIfa96Q==", + "version": "0.2.4-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.2.4-next-2025-08-02.3.tgz", + "integrity": "sha512-T8No5iVjkZlQBkkfEE49nPTQhdqcisQEk6Aev7+h9RMHALtZ7Xa3SBYTUyvCaXuK48rPrvHKuw4yDlwbOfoS4Q==", "dev": true, "license": "MIT", "peerDependencies": { @@ -1554,9 +1554,9 @@ } }, "node_modules/@junobuild/storage": { - "version": "0.2.2-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-0.2.2-next-2025-08-02.tgz", - "integrity": "sha512-jXFwWNV/TPbpI1ZgmlwN9ofrB2SvZ1A5dH/mbrvQGHg1QD5M0N+8+JGq3TkCmKlGOCKrbahtJ2lDaLH/M4UvzA==", + "version": "0.2.2-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-0.2.2-next-2025-08-02.3.tgz", + "integrity": "sha512-86/qU2Iu7ZwfMd+vlvvQkf7FIOF9utnNVZ3O+YVEo+iuNvXNtX0m/PzCZ/uw/cV3JILlUhM1N6rbq80vIfhFSw==", "license": "MIT", "peerDependencies": { "@dfinity/agent": "*", @@ -1568,9 +1568,9 @@ } }, "node_modules/@junobuild/utils": { - "version": "0.1.4-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.1.4-next-2025-08-02.tgz", - "integrity": "sha512-EHWoIUAJiDIYJFYKH8BJgyAffQqZNlBWBHaCs+cr9TGwoUWhxa6oMGkTbCKlqrJjIKCgawm/LD/nQxHuTNnsCg==", + "version": "0.1.4-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.1.4-next-2025-08-02.3.tgz", + "integrity": "sha512-7mQJY1YKs2gUm5a+DwOtYHhZ/NFLzpHVBbu6K9nTgFR599JQW2zn3PC4Qy87yMXpShzBFGZ0hQGblrkSHLnORg==", "license": "MIT", "peerDependencies": { "@dfinity/utils": "*" @@ -7892,21 +7892,21 @@ } }, "@junobuild/admin": { - "version": "0.6.8-next-2025-08-02.2", - "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-0.6.8-next-2025-08-02.2.tgz", - "integrity": "sha512-DJf5YhqkDlMw9yXa9sk3iEVd22/5e3+riKd6GI37QJDXeDoqv5EKObNBs1KDB/vxla0lEIF5G6W20RJswP+rTA==", + "version": "0.6.8-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/admin/-/admin-0.6.8-next-2025-08-02.3.tgz", + "integrity": "sha512-0tANx/Xb+LB/0eFVQ1FZgprD+nbuf/QQN5G6hQdXyRjGyNaTOVfP6+jE1L9dxWY+SFJTVKq26195X8J0VzXZkw==", "requires": {} }, "@junobuild/cdn": { - "version": "0.2.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-0.2.1-next-2025-08-02.tgz", - "integrity": "sha512-POGrNgCoTl3AtV9K3h4PEW7oqFcwvy7hsMdPA5YWVo3jalR2mT/UPIgCZ6VsVdQdg/r4LgUkPkVlts45Xb4ECA==", + "version": "0.2.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/cdn/-/cdn-0.2.1-next-2025-08-02.3.tgz", + "integrity": "sha512-vxC/gcIXsC8/Qkftd49J8fF9VMsDIUyq6ZyPH4iH2w8rzGjvYMbCkCHr1HjOpBq+3qazvDwRvAWj+SHq514Klw==", "requires": {} }, "@junobuild/cli-tools": { - "version": "0.3.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.3.1-next-2025-08-02.tgz", - "integrity": "sha512-VhWIlU5mERMFByAgy3yNN+G3o8krUcmDzfiJGYNtZJcGHx9M/r6VUy1s1kBG5l67M8iJOavTIrUCpFtiEqO0uQ==", + "version": "0.3.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/cli-tools/-/cli-tools-0.3.1-next-2025-08-02.3.tgz", + "integrity": "sha512-emBaLY/CcZrxBLOpCc7H9mzy9PBcAIipfyQyp5bfvBRP8Z/CvfAlyc+OmaYtxPfqfKeg1sf0zBBWOuU0GVWSzg==", "requires": { "file-type": "^21.0.0", "listr": "^0.14.3", @@ -7915,21 +7915,21 @@ } }, "@junobuild/config": { - "version": "0.4.3-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.4.3-next-2025-08-02.tgz", - "integrity": "sha512-1TPovXbwt6x5IvqyFVIPgPaCp3MQupjwcNQEC8vET7dZanRIKnMzh1JzlM+JD9wsR9UaG2cJIruk2a98RSlMsA==", + "version": "0.4.3-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.4.3-next-2025-08-02.3.tgz", + "integrity": "sha512-vCza6DFhvg5ty8a5RNBAbf2fFI3vfAOxGRfIJH10uTC812e4VRocnBRnHtZbg/d2Shnepa4j7GTOih5xe5KoBQ==", "requires": {} }, "@junobuild/config-loader": { - "version": "0.3.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.3.1-next-2025-08-02.tgz", - "integrity": "sha512-3sk65zJXEH3FDePKeoT3QmSyWIFiEwlsGTiakLiNUgBXv1mIITHWp40H8T+l9D4isTXkNQ7lOBfm4pXyP42AEw==", + "version": "0.3.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/config-loader/-/config-loader-0.3.1-next-2025-08-02.3.tgz", + "integrity": "sha512-VxPmsQM+HM0I2F0bq9WtN4/fRjAPejPfixRR6ovBLqaTydaf6HCtxGELBhvX09xi54goosSv61J6Qu9QN9ZLeQ==", "requires": {} }, "@junobuild/core": { - "version": "1.0.1-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-1.0.1-next-2025-08-02.tgz", - "integrity": "sha512-Yx5I4MEPRgo0tBLf8N01RaIRMjEnQR8T/ez+XhuTDhVffVnO+matqFm/Y3StQAaLpZBaDd17h2nxo3LCdc4U6A==", + "version": "1.0.1-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/core/-/core-1.0.1-next-2025-08-02.3.tgz", + "integrity": "sha512-1jIMl8V8rK/ayQtdPbyufQA0JBIexG9K5NlIFdfgHN1hFjyQUU4mhT2Io8TI4AJlmwgRSOWOzNJaz1P8+j5fZg==", "requires": { "@junobuild/errors": "*", "@junobuild/storage": "*", @@ -7937,9 +7937,9 @@ } }, "@junobuild/did-tools": { - "version": "0.2.2-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/did-tools/-/did-tools-0.2.2-next-2025-08-02.tgz", - "integrity": "sha512-vpyCgXIh47IJrrw3IF+CrNBLErkO7t4hhPsXs+B5Sd2mXxuE5KT1U8sdvcOzaiPNknzkfM7fLi0WvZ7Ty+jfUw==", + "version": "0.2.2-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/did-tools/-/did-tools-0.2.2-next-2025-08-02.3.tgz", + "integrity": "sha512-27Opazugi7G4N1ITtwI273U8Eo4g2/aSsa45jO6oL1guoyrTW8diNuXR3hTJ1hzCm3cc/tKOOkR39Udb3LgWiQ==", "requires": {} }, "@junobuild/errors": { @@ -7948,22 +7948,22 @@ "integrity": "sha512-elHOG1d/tejSplIF2CE/Nk6Q/GguPAqA/evse+CCDyYs2AtL5mSwpzFyvwV4l2Jby2IzmcLpUac+9PD+WxdH+g==" }, "@junobuild/functions": { - "version": "0.2.4-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.2.4-next-2025-08-02.tgz", - "integrity": "sha512-Tq53mDxc2E8qw7z06JiYFIAHoRix1oNpvP1hAz0xuolpvSNxiFVIqnjC2esEh9ghAmDLaEoYzrKgc53vIfa96Q==", + "version": "0.2.4-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/functions/-/functions-0.2.4-next-2025-08-02.3.tgz", + "integrity": "sha512-T8No5iVjkZlQBkkfEE49nPTQhdqcisQEk6Aev7+h9RMHALtZ7Xa3SBYTUyvCaXuK48rPrvHKuw4yDlwbOfoS4Q==", "dev": true, "requires": {} }, "@junobuild/storage": { - "version": "0.2.2-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-0.2.2-next-2025-08-02.tgz", - "integrity": "sha512-jXFwWNV/TPbpI1ZgmlwN9ofrB2SvZ1A5dH/mbrvQGHg1QD5M0N+8+JGq3TkCmKlGOCKrbahtJ2lDaLH/M4UvzA==", + "version": "0.2.2-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/storage/-/storage-0.2.2-next-2025-08-02.3.tgz", + "integrity": "sha512-86/qU2Iu7ZwfMd+vlvvQkf7FIOF9utnNVZ3O+YVEo+iuNvXNtX0m/PzCZ/uw/cV3JILlUhM1N6rbq80vIfhFSw==", "requires": {} }, "@junobuild/utils": { - "version": "0.1.4-next-2025-08-02", - "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.1.4-next-2025-08-02.tgz", - "integrity": "sha512-EHWoIUAJiDIYJFYKH8BJgyAffQqZNlBWBHaCs+cr9TGwoUWhxa6oMGkTbCKlqrJjIKCgawm/LD/nQxHuTNnsCg==", + "version": "0.1.4-next-2025-08-02.3", + "resolved": "https://registry.npmjs.org/@junobuild/utils/-/utils-0.1.4-next-2025-08-02.3.tgz", + "integrity": "sha512-7mQJY1YKs2gUm5a+DwOtYHhZ/NFLzpHVBbu6K9nTgFR599JQW2zn3PC4Qy87yMXpShzBFGZ0hQGblrkSHLnORg==", "requires": {} }, "@noble/curves": { diff --git a/package.json b/package.json index 2e91b97a..e3a38d67 100644 --- a/package.json +++ b/package.json @@ -30,15 +30,15 @@ "@dfinity/identity": "^2.3.0", "@dfinity/principal": "^2.3.0", "@dfinity/zod-schemas": "^1.0.0", - "@junobuild/admin": "^0.6.8-next-2025-08-02.2", - "@junobuild/cdn": "^0.2.1-next-2025-08-02", - "@junobuild/cli-tools": "^0.3.1-next-2025-08-02", - "@junobuild/config": "^0.4.3-next-2025-08-02", - "@junobuild/config-loader": "^0.3.1-next-2025-08-02", - "@junobuild/core": "^1.0.1-next-2025-08-02", - "@junobuild/did-tools": "^0.2.2-next-2025-08-02", - "@junobuild/storage": "^0.2.2-next-2025-08-02", - "@junobuild/utils": "^0.1.4-next-2025-08-02", + "@junobuild/admin": "^0.6.8-next-2025-08-02.3", + "@junobuild/cdn": "^0.2.1-next-2025-08-02.3", + "@junobuild/cli-tools": "^0.3.1-next-2025-08-02.3", + "@junobuild/config": "^0.4.3-next-2025-08-02.3", + "@junobuild/config-loader": "^0.3.1-next-2025-08-02.3", + "@junobuild/core": "^1.0.1-next-2025-08-02.3", + "@junobuild/did-tools": "^0.2.2-next-2025-08-02.3", + "@junobuild/storage": "^0.2.2-next-2025-08-02.3", + "@junobuild/utils": "^0.1.4-next-2025-08-02.3", "chokidar": "^4.0.3", "conf": "^14.0.0", "open": "^10.2.0", @@ -51,7 +51,7 @@ "devDependencies": { "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.32.0", - "@junobuild/functions": "^0.2.4-next-2025-08-02", + "@junobuild/functions": "^0.2.4-next-2025-08-02.3", "@types/node": "^22.15.27", "@types/prompts": "^2.4.9", "@types/semver": "^7.7.0", diff --git a/src/configs/emulator.config.ts b/src/configs/emulator.config.ts index 97757c5a..3e27c440 100644 --- a/src/configs/emulator.config.ts +++ b/src/configs/emulator.config.ts @@ -1,12 +1,11 @@ import {type EmulatorConfig, EmulatorConfigSchema} from '@junobuild/config'; import {red} from 'kleur'; import {DEPLOY_LOCAL_REPLICA_PATH} from '../constants/dev.constants'; -import {EMULATOR_SATELLITE, EMULATOR_SKYLAB} from '../constants/emulator.constants'; +import {EMULATOR_SKYLAB} from '../constants/emulator.constants'; import {ENV} from '../env'; import type {CliEmulatorConfig} from '../types/emulator'; import {readPackageJson} from '../utils/pkg.utils'; import {junoConfigExist, readJunoConfig} from './juno.config'; -import {junoDevConfigExist} from './juno.dev.config'; export const readEmulatorConfig = async (): Promise< | { @@ -69,16 +68,11 @@ const readProjectName = async (): Promise => { const getEmulatorConfig = async (): Promise => { const configExist = await junoConfigExist(); - const devConfigExist = await junoDevConfigExist(); - if (!configExist && !devConfigExist) { + if (!configExist) { return {skylab: EMULATOR_SKYLAB}; } - if (!configExist && devConfigExist) { - return {satellite: EMULATOR_SATELLITE}; - } - const config = await readJunoConfig(ENV); return config.emulator ?? {skylab: EMULATOR_SKYLAB}; }; diff --git a/src/configs/juno.dev.config.ts b/src/configs/juno.dev.config.ts deleted file mode 100644 index b082a0f1..00000000 --- a/src/configs/juno.dev.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type {ConfigFile, ConfigFilename} from '@junobuild/config-loader'; -import { - detectJunoConfigType as detectJunoConfigTypeTools, - junoConfigExist as junoConfigExistTools, - junoConfigFile as junoConfigFileTools -} from '@junobuild/config-loader'; -import {JUNO_DEV_CONFIG_FILENAME} from '../constants/constants'; - -const JUNO_DEV_CONFIG_FILE: {filename: ConfigFilename} = {filename: JUNO_DEV_CONFIG_FILENAME}; - -export const junoDevConfigExist = async (): Promise => { - return await junoConfigExistTools(JUNO_DEV_CONFIG_FILE); -}; - -export const detectJunoDevConfigType = (): ConfigFile | undefined => - detectJunoConfigTypeTools(JUNO_DEV_CONFIG_FILE); - -export const junoDevConfigFile = (): ConfigFile => junoConfigFileTools(JUNO_DEV_CONFIG_FILE); diff --git a/src/constants/constants.ts b/src/constants/constants.ts index c1586cc6..32cd4fdb 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -1,6 +1,5 @@ export const REDIRECT_URL = 'http://localhost:{port}'; export const JUNO_CONFIG_FILENAME = 'juno.config'; // .json | .js | .mjs | .cjs | .ts -export const JUNO_DEV_CONFIG_FILENAME = 'juno.dev.config'; // .json | .js | .mjs | .cjs | .ts export const SATELLITE_WASM_NAME = 'satellite'; export const MISSION_CONTROL_WASM_NAME = 'mission_control'; export const ORBITER_WASM_NAME = 'orbiter'; diff --git a/src/services/dev/_runner.services.ts b/src/services/dev/_runner.services.ts index 67a0695b..8de7d181 100644 --- a/src/services/dev/_runner.services.ts +++ b/src/services/dev/_runner.services.ts @@ -1,18 +1,11 @@ import {nonNullish} from '@dfinity/utils'; import {assertAnswerCtrlC, execute, spawn} from '@junobuild/cli-tools'; import {type EmulatorPorts} from '@junobuild/config'; -import type {PartialConfigFile} from '@junobuild/config-loader'; import {red, yellow} from 'kleur'; import {basename, join} from 'node:path'; import prompts from 'prompts'; import {readEmulatorConfig} from '../../configs/emulator.config'; -import {detectJunoConfigType, junoConfigExist, junoConfigFile} from '../../configs/juno.config'; -import { - detectJunoDevConfigType, - junoDevConfigExist, - junoDevConfigFile -} from '../../configs/juno.dev.config'; -import {JUNO_DEV_CONFIG_FILENAME} from '../../constants/constants'; +import {junoConfigExist, junoConfigFile} from '../../configs/juno.config'; import { EMULATOR_PORT_ADMIN, EMULATOR_PORT_CONSOLE, @@ -20,7 +13,6 @@ import { EMULATOR_SKYLAB } from '../../constants/emulator.constants'; import {type CliEmulatorConfig, type CliEmulatorDerivedConfig} from '../../types/emulator'; -import {copyTemplateFile} from '../../utils/fs.utils'; import {isHeadless} from '../../utils/process.utils'; import {confirmAndExit} from '../../utils/prompt.utils'; import { @@ -30,10 +22,7 @@ import { isContainerRunning } from '../../utils/runner.utils'; import {createDeployTargetDir} from '../emulator/emulator.fs.services'; -import {initConfigNoneInteractive, promptConfigType} from '../init.services'; - -const TEMPLATE_PATH = '../templates/docker'; -const DESTINATION_PATH = process.cwd(); +import {initConfigNoneInteractive} from '../init.services'; export const startContainer = async () => { const parsedResult = await readEmulatorConfig(); @@ -79,47 +68,12 @@ export const stopContainer = async () => { await stopEmulator({config}); }; -const initJunoDevConfigFile = async () => { - if (await junoDevConfigExist()) { - return; - } - - await confirmAndExit( - `A config file is required for development. Would you like the CLI to create one for you?` - ); - - const {configType, configPath} = await buildConfigType('satellite'); - - await copyTemplateFile({ - template: `${JUNO_DEV_CONFIG_FILENAME}.${configType}`, - sourceFolder: TEMPLATE_PATH, - destinationFolder: DESTINATION_PATH, - ...(nonNullish(configPath) && {destinationFilename: configPath}) - }); -}; - const initJunoConfigFile = async () => { await confirmAndExit(`Your project needs a config file for Juno. Should we create one now?`); await initConfigNoneInteractive(); }; -type ConfigContext = 'skylab' | 'satellite'; - -const buildConfigType = async (context: ConfigContext): Promise => { - // We try to automatically detect if we should create a TypeScript or JavaScript (mjs) configuration. - const fn = context === 'satellite' ? detectJunoDevConfigType : detectJunoConfigType; - const detectedConfig = fn(); - - if (nonNullish(detectedConfig)) { - return detectedConfig; - } - - const configType = await promptConfigType(); - - return {configType}; -}; - const promptEmulatorType = async (): Promise<{emulatorType: 'skylab' | 'satellite'}> => { const {emulatorType}: {emulatorType: 'skylab' | 'satellite' | undefined} = await prompts({ type: 'select', @@ -146,21 +100,15 @@ const assertAndInitConfig = async () => { return; } - const {emulatorType} = (await junoDevConfigExist()) - ? {emulatorType: 'satellite'} - : await promptEmulatorType(); + const {emulatorType} = await promptEmulatorType(); await initConfigFile(emulatorType === 'skylab'); }; -const initConfigFile = async (skylab: boolean) => { +const initConfigFile = async (_skylab: boolean) => { + // TODO: if not skyLab, emulator satellite {} + // or remove question? await initJunoConfigFile(); - - if (skylab) { - return; - } - - await initJunoDevConfigFile(); }; const startEmulator = async ({config: extendedConfig}: {config: CliEmulatorConfig}) => { @@ -221,8 +169,7 @@ const startEmulator = async ({config: extendedConfig}: {config: CliEmulatorConfi const volume = config.runner?.volume ?? containerName.replaceAll('-', '_'); - const fn = emulatorType === 'satellite' ? junoDevConfigFile : junoConfigFile; - const detectedConfig = fn(); + const detectedConfig = junoConfigFile(); const configFile = nonNullish(detectedConfig.configPath) ? basename(detectedConfig.configPath) : undefined; diff --git a/src/services/functions/build/build.rust.services.ts b/src/services/functions/build/build.rust.services.ts index 1ac916a3..d769f012 100644 --- a/src/services/functions/build/build.rust.services.ts +++ b/src/services/functions/build/build.rust.services.ts @@ -7,7 +7,7 @@ import {copyFile, lstat, mkdir, readFile, rename, writeFile} from 'node:fs/promi import {join, relative} from 'node:path'; import ora, {type Ora} from 'ora'; import {compare, minVersion, satisfies} from 'semver'; -import {detectJunoDevConfigType} from '../../../configs/juno.dev.config'; +import {detectJunoConfigType} from '../../../configs/juno.config'; import { DEPLOY_SPUTNIK_PATH, DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH, @@ -259,7 +259,7 @@ const api = async () => { return; } - const detectedConfig = detectJunoDevConfigType(); + const detectedConfig = detectJunoConfigType(); const outputLanguage = detectedConfig?.configType === 'ts' ? 'ts' : 'js'; const outputFile = `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.api.${outputLanguage}`; diff --git a/templates/docker/juno.dev.config.js b/templates/docker/juno.dev.config.js deleted file mode 100644 index 5bac94b1..00000000 --- a/templates/docker/juno.dev.config.js +++ /dev/null @@ -1,12 +0,0 @@ -import {defineDevConfig} from '@junobuild/config'; - -/** @type {import('@junobuild/config').JunoDevConfig} */ -export default defineDevConfig(() => ({ - satellite: { - collections: { - datastore: [], - storage: [] - }, - controllers: [] - } -})); diff --git a/templates/docker/juno.dev.config.json b/templates/docker/juno.dev.config.json deleted file mode 100644 index 9890322b..00000000 --- a/templates/docker/juno.dev.config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "satellite": { - "collections": { - "datastore": [], - "storage": [] - }, - "controllers": [] - } -} diff --git a/templates/docker/juno.dev.config.ts b/templates/docker/juno.dev.config.ts deleted file mode 100644 index f1a74c1c..00000000 --- a/templates/docker/juno.dev.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {defineDevConfig} from '@junobuild/config'; - -export default defineDevConfig(() => ({ - satellite: { - collections: { - datastore: [], - storage: [] - }, - controllers: [] - } -}));