diff --git a/package-lock.json b/package-lock.json index a9f140c6f..76cfe4c18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19729,7 +19729,7 @@ }, "packages/bruno-electron": { "name": "bruno", - "version": "v1.17.0", + "version": "v1.18.0", "dependencies": { "@aws-sdk/credential-providers": "3.525.0", "@usebruno/common": "0.1.0", @@ -20762,21 +20762,6 @@ "node": ">=14.0.0" } }, - "packages/bruno-electron/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "packages/bruno-electron/node_modules/fs-extra": { "version": "10.1.0", "license": "MIT", @@ -20789,11 +20774,6 @@ "node": ">=12" } }, - "packages/bruno-electron/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "packages/bruno-graphql-docs": { "name": "@usebruno/graphql-docs", "version": "0.1.0", @@ -27012,40 +26992,6 @@ "tslib": "^2.5.0" } }, - "@usebruno/js": { - "version": "https://registry.npmjs.org/@usebruno/js/-/js-0.11.0.tgz", - "integrity": "sha512-csbKAnFtLTupG46aMIahRWeNW8/rdDeaZPtvr4kIzcHDPNmKNowcFcrIR4VSpceh47Ltpm8n0sgzrHzw8P8Yjg==", - "requires": { - "@usebruno/query": "0.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "atob": "^2.1.2", - "axios": "^1.5.1", - "btoa": "^1.2.1", - "chai": "^4.3.7", - "chai-string": "^1.5.0", - "crypto-js": "^4.1.1", - "handlebars": "^4.7.8", - "json-query": "^2.2.2", - "lodash": "^4.17.21", - "moment": "^2.29.4", - "nanoid": "3.3.4", - "node-fetch": "2.*", - "node-vault": "^0.10.2", - "uuid": "^9.0.0" - } - }, - "ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", - "requires": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - } - }, "fs-extra": { "version": "10.1.0", "requires": { @@ -27053,11 +26999,6 @@ "jsonfile": "^6.0.1", "universalify": "^2.0.0" } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" } } }, diff --git a/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js b/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js index e7c8d24d6..d829baf10 100644 --- a/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js +++ b/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js @@ -17,32 +17,32 @@ const ImportCollection = ({ onClose, handleSubmit }) => { }); const handleImportBrunoCollection = () => { importBrunoCollection() - .then((collection) => { - handleSubmit(collection); + .then(({ collection }) => { + handleSubmit({ collection }); }) .catch((err) => toastError(err, 'Import collection failed')); }; const handleImportPostmanCollection = () => { importPostmanCollection(options) - .then((collection) => { - handleSubmit(collection); + .then(({ collection, translationLog }) => { + handleSubmit({ collection, translationLog }); }) .catch((err) => toastError(err, 'Postman Import collection failed')); }; const handleImportInsomniaCollection = () => { importInsomniaCollection() - .then((collection) => { - handleSubmit(collection); + .then(({ collection }) => { + handleSubmit({ collection }); }) .catch((err) => toastError(err, 'Insomnia Import collection failed')); }; const handleImportOpenapiCollection = () => { importOpenapiCollection() - .then((collection) => { - handleSubmit(collection); + .then(({ collection }) => { + handleSubmit({ collection }); }) .catch((err) => toastError(err, 'OpenAPI v3 Import collection failed')); }; diff --git a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js index 719f23804..7962da07f 100644 --- a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js +++ b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js @@ -23,7 +23,9 @@ const TitleBar = () => { const handleImportCollection = ({ collection, translationLog }) => { setImportedCollection(collection); - setImportedTranslationLog(translationLog); + if (translationLog) { + setImportedTranslationLog(translationLog); + } setImportCollectionModalOpen(false); setImportCollectionLocationModalOpen(true); }; diff --git a/packages/bruno-app/src/components/Welcome/index.js b/packages/bruno-app/src/components/Welcome/index.js index a5ec0dffd..7f60377b6 100644 --- a/packages/bruno-app/src/components/Welcome/index.js +++ b/packages/bruno-app/src/components/Welcome/index.js @@ -24,9 +24,11 @@ const Welcome = () => { ); }; - const handleImportCollection = (collection, translationLog) => { + const handleImportCollection = ({ collection, translationLog }) => { setImportedCollection(collection); - setImportedTranslationLog(translationLog); + if (translationLog) { + setImportedTranslationLog(translationLog); + } setImportCollectionModalOpen(false); setImportCollectionLocationModalOpen(true); }; @@ -53,7 +55,7 @@ const Welcome = () => { /> ) : null} -