chore: deleted unused chrome extension package

This commit is contained in:
Anoop M D 2023-02-21 00:22:20 +05:30
parent 5efb18ad63
commit d07744d5c2
9 changed files with 0 additions and 105 deletions

View File

@ -28,7 +28,6 @@
"dev:electron": "npm run dev --workspace=packages/bruno-electron", "dev:electron": "npm run dev --workspace=packages/bruno-electron",
"build:bruno-query": "npm run build --workspace=packages/bruno-query", "build:bruno-query": "npm run build --workspace=packages/bruno-query",
"build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs", "build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs",
"build:chrome-extension": "./scripts/build-chrome-extension.sh",
"build:electron": "./scripts/build-electron.sh", "build:electron": "./scripts/build-electron.sh",
"test:e2e": "npx playwright test", "test:e2e": "npx playwright test",
"test:report": "npx playwright show-report" "test:report": "npx playwright show-report"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,52 +0,0 @@
let currentTab = {
id: null,
url: null,
};
const getExtensionId = () => {
const matches = chrome.runtime.getURL('x').match(/.*\/\/(.*)\/x$/);
if (matches) {
return matches[1];
}
return chrome.runtime.id;
};
// Create a new tab for the extension
function createNewTab() {
chrome.tabs.create({ url: 'index.html' }, function (tab) {
currentTab = {
id: tab.id,
url: tab.url
};
});
}
// Focus on the open extension tab
function focusTab(tabId) {
var updateProperties = { "active": true };
chrome.tabs.update(tabId, updateProperties, function (tab) { });
}
// Open the extension tab when the extension icon is clicked
chrome.action.onClicked.addListener(function (tab) {
if (!currentTab || !currentTab.id) {
createNewTab();
} else {
chrome.tabs.get(currentTab.id, function (tab) {
console.log(chrome.runtime.id, tab.url);
if (tab && tab.url && tab.url.includes(getExtensionId())) {
focusTab(currentTab.id);
} else {
createNewTab();
}
});
}
});
// When a tab is closed, check if it is the extension tab that was closed, and unset currentTabId
chrome.tabs.onRemoved.addListener(function (tabId) {
if (tabId === currentTab.id) {
currentTab = {};
}
});

View File

@ -1,26 +0,0 @@
{
"manifest_version": 3,
"version": "0.1.0",
"name": "Bruno API Client",
"short_name": "Bruno",
"description": "Opensource API Client",
"icons": {
"16": "assets/images/logo-16x16.png",
"48": "assets/images/logo-48x48.png",
"128": "assets/images/logo-128x128.png"
},
"background": {
"service_worker": "js/background.js"
},
"action": {
"default_icon": "assets/images/logo-128x128.png"
},
"permissions": [
"tabs",
"storage"
],
"host_permissions": [
"http://*/",
"https://*/"
]
}

View File

@ -1,26 +0,0 @@
#!/bin/bash
# Remove any chrome-extension directory
rm -rf chrome-extension
# Remove any bruno.zip files
rm bruno.zip
# Create a new chrome-extension directory
mkdir chrome-extension
# Copy build
cp -r packages/bruno-app/out/* chrome-extension
# Copy the chrome extension files
cp -r packages/bruno-chrome-extension/* chrome-extension
# Filenames starting with "_" are reserved for use by the system
mv chrome-extension/_next chrome-extension/next
sed -i'' -e 's@/_next/@/next/@g' chrome-extension/**.html
# Remove sourcemaps
find chrome-extension -name '*.map' -type f -delete
# Compress the chrome-extension directory into a zip file
zip -r bruno.zip chrome-extension