I can't find the javascript in main bracket in bower - bower

I already added the dependency of blueimp-file-upload in my bower file. ( bower.json)
{
"name": "redca-admin-web",
"version": "0.0.1",
"description": "RedCA Admin frontend implementation",
"authors": [
"redca <redca#samsung.com>"
],
"main": "index.html",
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": ">=1.6",
"jquery-ui": ">=1.6",
"rdash-ui": "1.0.*",
"angular": "~1.2.21",
"angular-cookies": "~1.2.28",
"angular-bootstrap": "~0.11.0",
"angular-ui-router": "^0.2.10",
"bootstrap": "~3.2.0",
"font-awesome": "~4.1.0",
"angular-route": "~1.2.28",
"angular-resource": "~1.2.28",
"font-awesome": "~4.1.0",
"blueimp-file-upload" : "9.9.3"
},
"repository": {
"type": "git",
"url": "https://github.com/rdash/rdash-angular"
}
}
and I installed the dependency with the command, "bower install" and I can confirmed the dependencies in the folder, "src/components". But I can't find the
classes in main bracket in the followings. I saw the explanation of bower main page that the java script files in the main bracket are heavily used files.
main string or array: The primary acting files necessary to use your
package.
I am confused whether or not I misunderstood. Should I download the library that contains java-script files in main bracket separately?
{
"name": "blueimp-file-upload",
"version": "9.9.3",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
"keywords": [
"jquery",
"file",
"upload",
"widget",
"multiple",
"selection",
"drag",
"drop",
"progress",
"preview",
"cross-domain",
"cross-site",
"chunk",
"resume",
"gae",
"go",
"python",
"php",
"bootstrap"
],
"homepage": "https://github.com/blueimp/jQuery-File-Upload",
"author": {
"name": "Sebastian Tschan",
"url": "https://blueimp.net"
},
"maintainers": [
{
"name": "Sebastian Tschan",
"url": "https://blueimp.net"
}
],
"repository": {
"type": "git",
"url": "git://github.com/blueimp/jQuery-File-Upload.git"
},
"bugs": "https://github.com/blueimp/jQuery-File-Upload/issues",
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"dependencies": {
"jquery": ">=1.6",
"blueimp-tmpl": ">=2.5.4",
"blueimp-load-image": ">=1.13.0",
"blueimp-canvas-to-blob": ">=2.1.1"
},
"main": [
"css/jquery.fileupload.css",
"css/jquery.fileupload-ui.css",
"css/jquery.fileupload-noscript.css",
"css/jquery.fileupload-ui-noscript.css",
"js/cors/jquery.postmessage-transport.js",
"js/cors/jquery.xdr-transport.js",
"js/vendor/jquery.ui.widget.js",
"js/jquery.fileupload.js",
"js/jquery.fileupload-process.js",
"js/jquery.fileupload-validate.js",
"js/jquery.fileupload-image.js",
"js/jquery.fileupload-audio.js",
"js/jquery.fileupload-video.js",
"js/jquery.fileupload-ui.js",
"js/jquery.fileupload-jquery-ui.js",
"js/jquery.fileupload-angular.js",
"js/jquery.iframe-transport.js"
],
"ignore": [
"/*.*",
"/cors",
"css/demo-ie8.css",
"css/demo.css",
"css/style.css",
"js/app.js",
"js/main.js",
"server",
"test"
],
"_release": "9.9.3",
"_resolution": {
"type": "version",
"tag": "9.9.3",
"commit": "d4b0492c6e0ba77b446a3bfb2847a0a4827a9c08"
},
"_source": "https://github.com/blueimp/jQuery-File-Upload.git",
"_target": "9.9.3"
}

Related

How can I set the filename of the created .deb file when building my Electron.NET application for Linux?

This is my electron.manifest.json
{
"executable": "MyApplication.UI",
"splashscreen": {
"imageFile": "/wwwroot/assets/Animation.svg"
},
"author": "MyCompany",
"environment": "Production",
"singleInstance": false,
"build": {
"appId": "com.mycompany.myapplication",
"productName": "MyApplication",
"copyright": "Copyright # 2022",
"buildVersion": "2022.1.0",
"compression": "maximum",
"fileAssociations": [
{
"ext": "sdg",
"name": "MyApplication File",
"role": "Editor"
}
],
"publish": {
"provider": "generic",
"url": "https://mydomain.io/Installer/MyApplication/",
"channel": "latest"
},
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false,
"perMachine": true,
"installerIcon": "bin/Assets/icon.ico",
"uninstallerIcon": "bin/Assets/icon.ico",
"installerHeaderIcon": "bin/Assets/icon.ico",
"menuCategory": true
},
"win": {
"target": [
"nsis"
],
"icon": "Assets/icon.ico"
},
"linux": {
"target": "deb",
"maintainer": "MyCompany",
"vendor": "MyCompany",
"synopsis": "MyApplication",
"executableName": "MyApplication",
"description": "Doing some magic.",
"category": "Development",
"icon": "./../../Assets/Icons/32x32.png"
},
"directories": {
"output": "../../../bin/Installer",
"buildResources": "Assets"
},
"extraResources": [
{
"from": "./bin",
"to": "bin",
"filter": [
"**/*"
]
}
],
"files": [
{
"from": "./ElectronHostHook/node_modules",
"to": "ElectronHostHook/node_modules",
"filter": [
"**/*"
]
},
"**/*"
]
}
}
The created .deb file when building for linux is called electron-net_{version}.deb. That wouldn't be a problem but when executed, the application name electron-net is shown.
How can I change that? I checked the documentation (here https://www.electron.build/configuration/linux) already but I dont see any more options in my config?
I am using ElectronNET.CLI Version 15.5.1 on Ubuntu 20.04.4, .NET Version 5.0.406
I think you're looking for the artifactName property under build for your file name and the name property under at root for the name that is displayed
{
"name" : "MyApplication",
"executable" : "MyApplication",
"build": {
"artifactName": "my-application.${ext}",
}
}

Electron app Failed to get ipaddress when exported as Flatpak

I am trying to make a Flatpak for my little application “OpenSpeedTest-Server”
This is a simple network performance estimation tool. It is working fine on Windows, Mac and Linux (DEB).
1) When i Export the same in Flatpak, Application unable to get the client device ip address.
2) Also i am not able to put a custom icon for my Flatpak.
I used electronforge.
Here is my package.json
{
"name": "OpenSpeedTest-Server",
"productName": "OpenSpeedTest-Server",
"version": "2.1.0",
"description": "Network Speed Test Server - by OpenSpeedTest",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "OpenSpeedTest",
"email": "support#openspeedtest.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"icon": "src/icon.png"
},
"makers": [
{
"name": "#electron-forge/maker-flatpak",
"config": {
"name": "OpenSpeedTest_Server",
"options": {
"categories": [
"Utility"
],
"icon": "src/icon.png"
}
}
},
{
"name": "#electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "#electron-forge/maker-deb",
"config": {}
},
{
"name": "#electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"cors": "^2.8.5",
"electron-squirrel-startup": "^1.0.0",
"express": "^4.17.1",
"internal-ip": "^6.2.0",
"tcp-port-used": "^1.0.2"
},
"devDependencies": {
"#davidwinter/electron-forge-maker-snap": "^2.0.4",
"#electron-forge/cli": "^6.0.0-beta.57",
"#electron-forge/maker-deb": "^6.0.0-beta.57",
"#electron-forge/maker-flatpak": "^6.0.0-beta.57",
"#electron-forge/maker-rpm": "^6.0.0-beta.57",
"#electron-forge/maker-squirrel": "^6.0.0-beta.57",
"#electron-forge/maker-zip": "^6.0.0-beta.57",
"electron": "13.1.2"
}
}
How can i solve this issue?
Solved the issue by adding iproute2 to source and specifying icon dimension. Max supported was 512x512 and i was using 1024x1024
{
"name": "#electron-forge/maker-flatpak",
"config": {
"name": "OpenSpeedTest_Server",
"options": {
"categories": [
"Utility"
],
"icon": {
"512x512": "src/android-chrome-512x512.png"
}
},
"modules": [
{
"name": "zypak",
"sources": [
{
"type": "git",
"url": "https://github.com/refi64/zypak",
"tag": "v2021.02"
}
]
},
{
"name": "iproute2",
"make-install-args": [
"PREFIX=/app",
"CONFDIR=/app/share/iproute2",
"SBINDIR=/app/bin"
],
"sources": [
{
"type": "archive",
"url": "https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.7.0.tar.xz",
"sha256": "725dc7ba94aae54c6f8d4223ca055d9fb4fe89d6994b1c03bfb4411c4dd10f21"
}
],
"cleanup": [
"/include",
"/share/bash-completion",
"/share/man"
]
}
]
}
},

Electron app Failed to get ipaddress when exported as Snap

I am trying to make a snap for my little application “OpenSpeedTest-Server” This is a simple network performance estimation tool.
It is working fine on Windows, Mac and Linux (DEB). When i Export the same in Snap, Application unable to get the client device ip address.
i try “confinement”: “classic”, and plugs network observe etc. but nothing worked.
I added “#davidwinter/electron-forge-maker-snap” DevDependency manually and exporting it as snap actually working.
The only problem is application cannot get device ip address.
My Electron Forge package.json
{
"name": "OpenSpeedTest-Server",
"productName": "OpenSpeedTest-Server",
"version": "2.1.0",
"description": "Network Speed Test Server - by OpenSpeedTest",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "OpenSpeedTest",
"email": "support#openspeedtest.com"
},
"license": "MIT",
"config": {
"confinement": "devmode",
"forge": {
"packagerConfig": {
"icon": "src/icon.png"
},
"makers": [
{
"name": "#davidwinter/electron-forge-maker-snap",
"config": {
"name": "OpenSpeedTest_Server",
"categories": [
"Utility"
]
}
},
{
"name": "#electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "#electron-forge/maker-deb",
"config": {}
},
{
"name": "#electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"#davidwinter/electron-forge-maker-snap": "^2.0.4",
"cors": "^2.8.5",
"electron-squirrel-startup": "^1.0.0",
"express": "^4.17.1",
"internal-ip": "^6.2.0",
"tcp-port-used": "^1.0.2"
},
"devDependencies": {
"#electron-forge/cli": "^6.0.0-beta.57",
"#electron-forge/maker-deb": "^6.0.0-beta.57",
"#electron-forge/maker-rpm": "^6.0.0-beta.57",
"#electron-forge/maker-squirrel": "^6.0.0-beta.57",
"#electron-forge/maker-zip": "^6.0.0-beta.57",
"electron": "13.1.2"
}
}
{
“name”: “#davidwinter/electron-forge-maker-snap”,
“config”: {
“name”: “OpenSpeedTest_Server”,
“categories”: [
“Utility”
],
“stagePackages”: [
“default”,
“iproute2”
]
}
},
My devDep.
},
"dependencies": {
"cors": "^2.8.5",
"electron-squirrel-startup": "^1.0.0",
"express": "^4.17.1",
"internal-ip": "^6.2.0",
"tcp-port-used": "^1.0.2"
},
Internal IP is responsible for getting ip address.
https://www.npmjs.com/package/internal-ip
The module returns the address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, undefined will be returned.
The module relies on operating systems tools. On Linux and Android, the ip command must be available, which depending on distribution might not be installed by default. It is usually provided by the iproute2 package. .v4.sync() and .v6.sync() are not supported in browsers and just return undefined.
so we need to add iproute2 in stagePackages for get this to work on snap.

publish to github with electron-builder

when I test to publish on github I get this error write ECONNRESET at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:87:16)
Here is my code
{
"name": "app",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"dist": "electron-builder",
"publish": "electron-builder --publish always"
},
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^8.0.0",
"electron-builder": "^22.3.2"
},
"repository": {
"type" : "git",
"url" : "https://github.com/Fizo55/app.git"
},
"build": {
"appId": "com.fizo55.app",
"productName": "app",
"target": "NSIS",
"directories": {
"output": "build"
},
"publish": [
{
"provider": "github",
"private": true,
"owner": "Fizo55",
"repo": "app",
"token": "mytoken"
}
],
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false
}
}
}
Thanks for your help
After some test, it was my connection the problem, I switched on my 4G and now it work perfectly.

Using grep to find specific version number of a package in composer.lock file?

I am wanting to grep the version number of a package that I have pulled in via composer from my composer.lock file.
I have extracted the object that contains the version number to make it easy to see on StackOverflow. However there are multiple other packages being pulled in by composer as well which all have their own version number of course. I need to the version number of the silverstripe/framework which is 3.5.3 as per below.
How can I do this via the command line using grep? Also open to other solutions if there is a better/easier way.
composer.lock
{
"name": "silverstripe/framework",
"version": "3.5.3",
"source": {
"type": "git",
"url": "https://github.com/silverstripe/silverstripe-framework.git",
"reference": "a2580456bda9ff513cf80227039fc79405908f3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silverstripe/silverstripe-framework/zipball/a2580456bda9ff513cf80227039fc79405908f3f",
"reference": "a2580456bda9ff513cf80227039fc79405908f3f",
"shasum": ""
},
"require": {
"composer/installers": "~1.0",
"php": ">=5.3.3,<7"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "silverstripe-module",
"extra": {
"branch-alias": {
"3.x-dev": "3.5.x-dev"
}
},
"autoload": {
"classmap": [
"tests/behat/features/bootstrap"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "SilverStripe",
"homepage": "http://silverstripe.com"
},
{
"name": "The SilverStripe Community",
"homepage": "http://silverstripe.org"
}
],
"description": "The SilverStripe framework",
"homepage": "http://silverstripe.org",
"keywords": [
"framework",
"silverstripe"
],
"time": "2017-02-20 17:01:16"
},
jq is a proper tool for manipulating JSON data:
jq '.packages[] | select(.name == "silverstripe/framework").version' composer.lock
"3.5.3"

Resources