122 Commits

Author SHA1 Message Date
David Cassany
cd3b23eb79 Add RPM and DEB targets to electron-builder
This commit adds RPM and DEB targets to the electron builder manifest
and uploads the result within the packaging workflow.

Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-08 10:52:05 +02:00
David Cassany
cf0150272e Add linux certificates management
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
3e7be298c4 Adding linux support for Rancher Desktop
Rancher Desktop support for linux is currently based on flatpak.

Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:41 +02:00
Matt Farina
b9918f6360 Incrementing to 0.6 and marking as beta
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-10-05 14:21:31 -04:00
Mark Yen
a450725f0a nerdctl-stub: Tests.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-17 15:40:21 -07:00
Mark Yen
0ae90b18c7 WSL: Do argument translation for nerdctl
This updates nerdctl-stub to parse arguments (such as
`nerdctl build --file`) and translate the paths.  On Windows (the host),
this just means convert it to `/mnt/c/...` form; on Linux (a second WSL
distribution), this means making a temporary bind mount under `/mnt/wsl/`
and converting relevant arguments to point to that instead.

In order to do the mounting, the nerdctl-stub binary needs to be setuid
root.  We therefore need to copy it to somewhere under `/mnt/wsl/` as well,
since anything under `/mnt/c/` (DrvFS) doesn't support setuid properly.

In order to correctly parse the arguments, we use a generator that parses
the output of `nerdctl -help` (and various subcommands) to build our
understanding of the available subcommands and options.  This may be
triggered on a Windows machine with the `rancher-desktop` WSL distribution
using `npm run generate:nerdctl-stub`.  (The requirement is to be able to
execute the `nerdctl` binary to parse its output.)

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-17 15:40:20 -07:00
Mark Yen
12d3f582ed Merge pull request #600 from mook-as/win-nerdctl
nerdctl for Windows.
2021-09-17 12:07:13 -07:00
Mark Yen
faf218b794 package.json: add tar.
This will be used to tranfer multiple files to the VM.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-14 11:40:13 -07:00
Mark Yen
e392685741 WSL: Move wsl-helper to src/go
We will add more golang helpers soon.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-10 17:58:23 -07:00
Phillip Rak
05e3c56022 Merge pull request #595 from rak-phillip/bugfix/575-tray-icon
Fix tray context menu immediately closing when window is not focused
2021-09-08 18:26:47 -07:00
Phillip Rak
e8fa50885b Tick electron version number
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-09-08 17:02:30 -07:00
Phillip Rak
2b87c74a66 Revert Tick electron version number
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-09-08 17:01:27 -07:00
Phillip Rak
75980ca333 Update @nuxtjs/style-resources
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-09-08 16:57:40 -07:00
Phillip Rak
87eca80327 Revert Update @nuxtjs/style-resources
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-09-08 16:56:54 -07:00
Phillip Rak
6c230e94f7 Update @nuxtjs/style-resources
Signed-off-by: Phillip Rak <phillip.rak@suse.com>
2021-09-08 16:08:34 -07:00
Phillip Rak
fcce9a4868 Tick electron version number
Signed-off-by: Phillip Rak <phillip.rak@suse.com>
2021-09-08 14:53:37 -07:00
Matt Farina
60455272fb Bumping version to 0.5
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-09-03 09:22:05 -04:00
Mark Yen
e34c0eeae3 Package.json: Drop node-sass, use sass.
The node-sass package is a binding to libsass and requires building a C
extension; whereas the sass package is implemented in Dart (compiled to
JavaScript) and doesn't require a C extension.  This makes it easier to
build Rancher Desktop.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-01 12:09:06 -07:00
Mark Yen
7b0314484a ESLint: Cause deprecations to trigger an error.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-08-23 14:42:39 -07:00
Mark Yen
9190e5acd2 Package.json: add raw-loader
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-08-17 11:07:49 -07:00
Matt Farina
4fda47d632 Bumping the internal version to 0.4.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-08-09 17:08:34 -04:00
Matt Farina
c72fdca443 Merge pull request #435 from mook-as/system-proxy-custom
Support for system proxy configuration.
2021-08-09 17:07:12 -04:00
Mark Yen
83d1a15586 background: Support for system proxy configuration.
This adds support for use the system proxy configuration (by asking the
embedded Chrome to resolve the proxy configuration).  The idea to ask
Chrome was from the electron-proxy-agent package; however, it had
significant issues on supporting system CA certificates, and the result
ended up being a complete rewrite.

We need the wrapper classes for HttpsProxyAgent and SocksProxyAgent so that
we can pass the CA options down to the eventual tls.connect() call.  This
is due to https://github.com/TooTallNate/node-https-proxy-agent/issues/89

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-08-06 16:09:25 -07:00
Mark Yen
92e133de6f E2E: Use custom script for building
This lets us drop the SPECTRON_RUN environment variable, so we can be sure
that users will not accidentally stumble upon it (causing the deprecated
remoting API to be enabled).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-08-04 17:17:00 -07:00
Gunasekhar Matamalam
5a157b0110 Removed dependencies that are not required anymore
Signed-off-by: Gunasekhar Matamalam <gunasekhar.matamalam@suse.com>
2021-08-03 10:02:52 -07:00
Gunasekhar Matamalam
c894eed4bc Replaced mocha setup with Jest for e2e
Signed-off-by: Gunasekhar Matamalam <gunasekhar.matamalam@suse.com>
2021-08-03 10:02:47 -07:00
Gunasekhar Matamalam
9f9bae59fe Intermediate commit - e2e with jest
Signed-off-by: Gunasekhar Matamalam <gunasekhar.matamalam@suse.com>
2021-08-03 10:01:37 -07:00
Gunasekhar Matamalam
b4635725f9 Another experimentation branch to explore spectron e2e setup
Signed-off-by: Gunasekhar Matamalam <gunasekhar.matamalam@suse.com>
2021-08-03 10:01:34 -07:00
Mark Yen
1ea96a05a9 Merge pull request #405 from mook-as/code-signing-v2
Code Signing on Windows, Try 2
2021-07-26 15:26:27 -07:00
Mark Yen
da8fc702be package.json: Add gofmt
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-07-16 13:23:33 -07:00
Mark Yen
213d66ed2d scripts/sign: Initial signing implementation for Windows.
This script handles code signing on Windows, using a certificate that is
always specified via the certificate fingerprint.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-07-08 17:25:41 -07:00
Mark Yen
9541a6c211 package.json: Add extract-zip
This will be used to help sign pre-built Windows builds.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-07-08 17:25:40 -07:00
Mark Yen
a3fe9c8255 package.json: Add ts-node dev dependency
This will let use write build scripts using the same language as the rest
of the application (which means possible code sharing).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-07-08 17:25:39 -07:00
Mark Yen
387c9d4105 package.json: Add marked & dompurify
These will be used to render the release notes.

Signed-off-by: Mark Yen <mark.yen@suse.com>
# Conflicts:
#	package-lock.json
#	package.json
2021-07-05 18:16:15 -07:00
Mark Yen
f3f08c5d5b Electron-builder: Create custom publisher
We plan on using Longhorn's upgrade-responder to handle upgrade pings,
backed by GitHub releases for the actual binaries.  As a first step, we
need to create a custom electron-builder Publisher backend to generate the
necessary fields to be examined durin the upgrade ping process.

Note that this publisher does not actually publish anything; it just
resolves the options at build time to be written into the configuration
file.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-07-05 18:16:12 -07:00
Mark Yen
a2a7df257a Package.json: Add electron-updater
We'll be using this as part of the auto-updater implementation.

Signed-off-by: Mark Yen <mark.yen@suse.com>
# Conflicts:
#	package-lock.json
#	package.json
2021-07-05 18:15:48 -07:00
Eric Promislow
28e27fae29 Import dashboard components for configuring port
These are needed to support LabeledInput components

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-06-25 15:42:18 -07:00
Mark Yen
0b28c486ff packages.json: Remove @pooperjs/core
This is no longer needed, once we removed ButtonDropdown.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-06-09 16:15:21 -07:00
Matt Farina
3d86ab7481 Incrementing the build version to 0.3.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-06-08 12:06:32 -04:00
Eric Promislow
b7af1570a9 Always yaml.parse the config
- This works because JSON is a subset of YAML, so json files are yaml-parsable

- Also include 'yaml' in package.json because we now explicitly depend on it.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-06-02 13:09:31 -07:00
Eric Promislow
26b979493c Upgrade to Electron 12 (currently 12.0.9)
We were affected by one breaking change:
https://www.electronjs.org/docs/breaking-changes#default-changed-contextisolation-defaults-to-true:

'''
In Electron 12, contextIsolation will be enabled by default. To restore the previous behavior, contextIsolation: false must be specified in WebPreferences.
'''

This compromises security but enables `window.require`. Some of the external processes
we spawn take user-supplied arguments. As long as we run them using array-based methods like
`child_process.execFile(Sync)` and `child_process.spawn(Sync)`,
and not `child_process.exec(Sync)` we should be ok.

Also pull the `@types/node` entry out of `devDependencies` as electron pulls it in
and we don't directly depend on it.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-05-26 10:41:52 -07:00
Matt Farina
33f94b8947 Incrementing to 0.2.1
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-05-17 17:07:36 -04:00
Eric Promislow
aeab21992d Provide a safeRename function
* Fallback to `copy+remove` when optimized `fs.rename` fails

* Write unit tests to verify this happens for renaming both
  files and directories.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-05-17 10:53:50 -07:00
Mark Yen
66a3de7ced package.json: Add babel-core as dev dependeny
We need it for tests; it was previously pulled in by @vue/cli

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-05-14 09:16:23 -07:00
Matt Farina
6f2a7ecabd Bumping to v0.2.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-05-13 18:12:13 -04:00
Mark Yen
16f45849b3 package.json: Add @types/node-forge
Needed to interact with the certificate authority libraries

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-05-11 12:32:11 -07:00
Mark Yen
cb2e16f939 Package.json: Add win-ca and mac-ca
These will help in using system certificate stores, mainly for machines on
corporate networks with MITM proxies.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-05-11 12:30:32 -07:00
Mark Yen
203be6fc86 Merge pull request #271 from mook-as/remove-vue-cli-deps
Remove Unnecessary Dependencies
2021-05-07 16:25:27 -07:00
Mark Yen
5e96364f03 package.json: Remove unused Vue packages
They were used with the Vue cli, which we no longer use.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-05-06 18:02:23 -07:00
Mark Yen
9049e1e861 package.json: Remove canvas
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-05-06 17:55:38 -07:00