From 97593482f5e54a06da2f63da7a930e85ad605ddb Mon Sep 17 00:00:00 2001 From: dev-AshishRanjan <94990764+dev-AshishRanjan@users.noreply.github.com> Date: Wed, 17 Jan 2024 02:50:06 +0530 Subject: [PATCH] chore: update package.json for actions --- forge.config.js | 12 +++ package-lock.json | 240 ++++++++++++++++++++++++++++++++++++++++++ package.json | 36 ++++++- src/app/contact.html | 19 +++- src/app/css/index.css | 1 + src/app/js/contact.js | 12 ++- src/app/js/custom.js | 7 +- src/index.js | 8 +- 8 files changed, 326 insertions(+), 9 deletions(-) diff --git a/forge.config.js b/forge.config.js index f68783e..75ccbba 100644 --- a/forge.config.js +++ b/forge.config.js @@ -21,6 +21,18 @@ module.exports = { config: {}, }, ], + publishers: [ + { + name: "@electron-forge/publisher-github", + config: { + repository: { + owner: "dev-AshishRanjan", + name: "proxy-manager", + }, + draft: true, + }, + }, + ], plugins: [ { name: "@electron-forge/plugin-auto-unpack-natives", diff --git a/package-lock.json b/package-lock.json index 9cdc08b..b88d25d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@electron-forge/maker-squirrel": "^7.2.0", "@electron-forge/maker-zip": "^7.2.0", "@electron-forge/plugin-auto-unpack-natives": "^7.2.0", + "@electron-forge/publisher-github": "^7.2.0", "electron": "^28.1.3" } }, @@ -320,6 +321,49 @@ "node": ">= 16.4.0" } }, + "node_modules/@electron-forge/publisher-github": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@electron-forge/publisher-github/-/publisher-github-7.2.0.tgz", + "integrity": "sha512-GWoDIxP4h2CuaGnpReJCvxiyWSF6lpbIpNgdtv6l6mdPKLHmSRownJ3aqVl4pD523d00Wuxrdv/wDxZ5RwyedQ==", + "dev": true, + "dependencies": { + "@electron-forge/publisher-base": "7.2.0", + "@electron-forge/shared-types": "7.2.0", + "@octokit/core": "^3.2.4", + "@octokit/plugin-retry": "^3.0.9", + "@octokit/rest": "^18.0.11", + "@octokit/types": "^6.1.2", + "debug": "^4.3.1", + "fs-extra": "^10.0.0", + "mime-types": "^2.1.25" + }, + "engines": { + "node": ">= 16.4.0" + } + }, + "node_modules/@electron-forge/publisher-github/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@electron-forge/publisher-github/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/@electron-forge/shared-types": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@electron-forge/shared-types/-/shared-types-7.2.0.tgz", @@ -997,6 +1041,148 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "dev": true, + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dev": true, + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "dev": true + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", + "dev": true, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/plugin-retry": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz", + "integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.0.3", + "bottleneck": "^2.15.3" + } + }, + "node_modules/@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "dev": true, + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dev": true, + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/rest": { + "version": "18.12.0", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", + "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", + "dev": true, + "dependencies": { + "@octokit/core": "^3.5.1", + "@octokit/plugin-paginate-rest": "^2.16.8", + "@octokit/plugin-request-log": "^1.0.4", + "@octokit/plugin-rest-endpoint-methods": "^5.12.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dev": true, + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -1324,6 +1510,12 @@ } ] }, + "node_modules/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "dev": true + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -1347,6 +1539,12 @@ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", "optional": true }, + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1861,6 +2059,12 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, "node_modules/detect-libc": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", @@ -3484,6 +3688,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -3869,6 +4082,27 @@ "node": ">=8.6" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -5507,6 +5741,12 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/universal-user-agent": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", + "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", + "dev": true + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", diff --git a/package.json b/package.json index 8327ab8..caffe52 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "proxy-manager", "productName": "Proxy Manager", "version": "1.0.0", - "description": "Proxy manager for pc", + "description": "Proxy manager for windows, linux, mac", "main": "src/index.js", "scripts": { "start": "electron-forge start", @@ -29,6 +29,40 @@ "@electron-forge/maker-squirrel": "^7.2.0", "@electron-forge/maker-zip": "^7.2.0", "@electron-forge/plugin-auto-unpack-natives": "^7.2.0", + "@electron-forge/publisher-github": "^7.2.0", "electron": "^28.1.3" + }, + "build": { + "appId": "com.my-website.proxy-manager", + "productName": "Proxy Manager", + "copyright": "Copyright © 2024 ${author}", + "mac": { + "icon": "./src/assets/icons/mac/icon_512.icns", + "category": "public.app-category.developer_tools", + "target": [ + "dmg", + "mas", + "zip" + ] + }, + "win": { + "icon": "./src/assets/icons/win/icon_512.ico" + }, + "files": [ + "./build/**/*", + "./dist/**/*", + "./node_modules/**/*", + "./src/**/*", + "*.js" + ], + "linux": { + "category": "Developer_tools" + }, + "directories": { + "buildResources": "src/assets" + }, + "dmg": { + "icon": false + } } } diff --git a/src/app/contact.html b/src/app/contact.html index 44aa5d8..d323b71 100644 --- a/src/app/contact.html +++ b/src/app/contact.html @@ -17,9 +17,21 @@
diff --git a/src/app/css/index.css b/src/app/css/index.css index 2d57b28..4350db0 100644 --- a/src/app/css/index.css +++ b/src/app/css/index.css @@ -184,6 +184,7 @@ textarea, background: var(--primary-2); color: var(--primary-3); resize: none; + width: 15rem; } .btn { diff --git a/src/app/js/contact.js b/src/app/js/contact.js index b354442..851f778 100644 --- a/src/app/js/contact.js +++ b/src/app/js/contact.js @@ -8,7 +8,17 @@ const btn = document.querySelector(".custom>.btn"); btn && btn.addEventListener("click", () => { - handleSubmission(); + if ( + namet.value == "" || + email.value == "" || + subject.value == "" || + msg.value == "" + ) { + fireToast(`All fields are required`, "error"); + return; + } else { + handleSubmission(); + } }); const handleSubmission = async (e) => { console.log("form submitted"); diff --git a/src/app/js/custom.js b/src/app/js/custom.js index b652138..0d55e23 100644 --- a/src/app/js/custom.js +++ b/src/app/js/custom.js @@ -7,7 +7,12 @@ const btn = document.querySelector(".custom>.btn"); btn && btn.addEventListener("click", () => { - handleSubmission(); + if (title.value == "" || ipAddress.value == "" || port.value == "") { + fireToast(`All Fields are required`, "error"); + return; + }else{ + handleSubmission(); + } }); function handleSubmission(e) { console.log("form submitted"); diff --git a/src/index.js b/src/index.js index 284294f..35caaec 100644 --- a/src/index.js +++ b/src/index.js @@ -32,7 +32,7 @@ const createWindow = () => { contextIsolation: true, }, // autoHideMenuBar: true, - icon:__dirname+'./assets/icons/icon_512.png' + icon: __dirname + "./assets/icons/icon_512.png", }); // and load the index.html of the app. @@ -47,7 +47,9 @@ const createWindow = () => { if (dynamicWindow) { dynamicWindow.close(); } - // app.quit(); + if (!isMac) { + app.quit(); + } }); }; // create dynamic window @@ -62,7 +64,7 @@ const createDynamicWindow = (file) => { }, fullscreenable: false, resizable: false, - icon:__dirname+'./assets/icons/icon_512.png' + icon: __dirname + "./assets/icons/icon_512.png", }); // and load the index.html of the app.