Commit graph

39 commits

Author SHA1 Message Date
Daniel LaCosse
3574b5f5e0
chore: upgrade webpack to v5 to support lts/hydrogen (#1422)
* upgrade dependencies and fix API changes

* skipLibCheck

* attempt test fixes

* fix attempt

* stream-http

* fix final thing i think
2023-10-11 10:44:36 -04:00
J. Yi
244ef06226
build(devtools/build): 👷 exclude jsign.jar from the repository (#1263)
According to #1250 , we are not allowed to include binaries in this repository. In this PR, I removed `./third_party/jsign/jsign-4.2.jar`, it will be downloaded during build process on demand. The workflow is:

* If we are not building for Windows, nothing happens
* If we are building for Windows but not signing the binaries (for example dev builds), nothing happens
* If we are building and signing Windows binaries:
  * If `jsign-4.2.jar` already exists and matches checksum, nothing happens
  * otherwise, we will download it from [jsign's official GitHub releases](https://github.com/ebourg/jsign/releases)
2023-01-06 19:07:40 -05:00
Vinicius Fortuna
ba135267d1
chore(server): upgrades (#1211)
- Upgrade Prometheus to 2.37.1
- Upgrade outline-ss-server to 1.4.0
- Fetch Prometheus and outline-ss-server binaries on demand. Remove from repo because of file size limit
- Upgrade base node image.
2022-10-27 11:59:48 -05:00
Daniel LaCosse
15cf404361
feat(devtools): partial import restrictions (#1114)
* add restrictions - bypassing for draft

* this feels like the correct list?

* this feels like the actual actual correct list?

* comment out rules for later fixing

* upgrade node setup for windows
2022-06-23 17:52:30 -05:00
Daniel LaCosse
2d3481574f
chore(devtools): non-build updates from client (#1103)
* okay put this up see where we're at

* update builds here

* check browserslist

* add badge

* Update build_and_test_debug.yml

* scopes & electron version
2022-06-03 10:08:21 -04:00
J. Yi
c69c7167c0
build(manager): 👷 upgrade packages to fix manager's local build (#1101)
In this PR, I fixed two build errors when starting manager locally on macOS:

1. **Cannot find python** (caused by out-dated `electron-builder`)

> ```
> $ BUILD_ENV=development npm run action server_manager/electron_app/start mac
> ...
> + electron-builder --mac --config.mac.icon=icons/mac/icon.icns --projectDir=build/server_manager/electron_app/static --config.asarUnpack=server_manager/web_app/images --publish=never '--config.artifactName="Outline-Manager.${ext}"'
> ...
>     ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT
> ...
> ```

2. **Cannot run `serve`** (caused by out-dated `webpack-cli`)

> ```
> $ npm run action server_manager/web_app/start
> ...
> TypeError: Class constructor ServeCommand cannot be invoked without 'new'
> ...
> ```

I also added [`@webpack-cli/serve`](https://www.npmjs.com/package/@webpack-cli/serve) as a global package because it is required by `webpack-cli`] when you run `npm run action server_manager/web_app/start`:

```
$ npm run action server_manager/web_app/start
...
Would you like to install serve? (That will run npm install -D @webpack-cli/serve) (yes/NO) : 
@webpack-cli/serve needs to be installed in order to run the command.
...
```
2022-05-31 15:22:33 -04:00
Vinicius Fortuna
167f3b3fb6 Don't use npx for eslint 2022-03-10 01:54:33 +00:00
Vinicius Fortuna
7389ce724f Migrate to eslint 2022-03-10 01:50:59 +00:00
Vinicius Fortuna
17d1a63f2d Add format:all 2022-03-09 23:39:07 +00:00
Vinicius Fortuna
094562252f Fix package.json 2022-03-09 23:27:09 +00:00
Vinicius Fortuna
6f339e163a Remove clang-format 2022-03-09 23:12:12 +00:00
Vinicius Fortuna
3034e59f9f Fix lint 2022-03-09 23:10:15 +00:00
Vinicius Fortuna
c764fef8dd Fix lint 2022-03-09 21:48:27 +00:00
Daniel LaCosse
9d80b6d448
Migrate from Yarn to Node lts/gallium (#1004)
* attempt upgrade over CI

update shadowbox build node version

wild guess

try other image, not holding my breath

switch image back, try no --upgrade? lol

whoops wrong SHA

trying this tip out of hand - will make platform a env var next

apparently buildx is supposed to detect the platform - lets see

find replace yarn w/ npm

fix git hook

cache npm deps

proper lock and enforce engine

licenses are... generated by yarn lmao

some weird leftovers

explode out test workflow jobs

Title Case and check for cache hit

upgrade NPM

check version...

eh, worth a try

reinstall deps for now so we can debug downstream issues

use root bin

fix npm workspace, merge lint w/ setup

HMMM

attempt cache load

fix keys

remove restore-keys

regular install

attempt more "correct" npm approach

annoyingly caching ~/.npm doesn't cache the global npm version

less correct node_module cache, will roll back if doesn't work

er... node 15 :/, restore keys

changing key...?

permission setting so cache can properly hit

separate dependecy permission task

verbose chmod

fix sentry webhook

consistency thing

* print architecture

* attempt amd64-explicit node image

* attempt nodev16 upgrade

* ah, okay, let's try picking this hash

* fix node version reference and npm run clean

* revert untouched files caught in squash

* remove yarn from travis.yml

* testing ci

* npmrc comment, revert one of cis

* Update src/server_manager/web_app/run_gallery_action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* Update src/server_manager/web_app/run_action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* licenses change

* fix package-lock regression

* fix webpack-dev-server properly

* set install to ci in Dockerfile

* forgot to include the README

* add ci where it makes sense

* delete this part of the README

* missed one

* testing sub-node_modules

* better chmod

* prefer glob

* reset .github/workflows/test.yml

* oops, yarn in ci

* rename everything (#1006)

* Update test.yml

* check_requirements (#1008)

* reqcheck draft

* finish drafting script - need to test and add to hooks

* attempt to roll our own setup...

* remove setup script and rename a couple things

* remove this nightmare lol

* Update release_manager.yml

* Update test.yml

* 'do' -> 'action'

* run -> start

* Update src/shadowbox/docker/build.action.sh

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* Update README.md

* Update README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* rename 'action' to action

* add action list to run action itself

* Update src/shadowbox/README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update README.md

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update scripts/run_action.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update src/server_manager/scripts/fill_packaging_opts.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* style guide fixes

* lower case fixes

* enforce major version

* Update scripts/run_action.sh

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

* Update package.json

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>
2021-11-05 16:40:34 -04:00
Daniel LaCosse
f342bca31f
add yarn actions, fix ShadowsocksConfig macro, webpack bin (#993)
* add yarn actions, fix ShadowsocksConfig macro, webpack bin

reverting unnecessary specificity

* tweak action trigger
2021-09-30 13:07:56 -04:00
mpmcroy
b7cda5c7ae
Adds GCP create server flow (#864)
* gitignore

* Adds GCP token to CloudAccounts

* Checkpoint

* Checkpoint

* Refactors cloud accounts

* Addresses comments

* Auto-formatting

* Reverts gallery webpack GCP local server

* Reverts webpack config change

* Minor cleanup

* Removes unused class

* Reverts initial feature flag implementation

* Removes unneeded logging

* Adds credentials getters to CloudAccounts and updates tests

* Auto-format

* Adds FakeCloudAccounts

* Removes credentialsGetter from CloudAccounts

* Removes account factories from CloudAccounts

* Addresses review comments

* Addresses review commetns

* Auto-formatting

* Adds GcpAccount implementation

* Auto-format

* Auto-format

* Replace OAuth config client id

* Adds method to fetch OpenID userinfo

* Adds method to fetch OpenID userinfo

* Checkpoint

* Auto-format

* Adds method to refresh GCP access token

* Uncommenting

* Checkpoint

Auto-formatting

Updates intro step with gcp account

Auto-format

typo

* Add comment

* fetch refactor

* Auto-format

* Remove account from CloudAccounts

* Refactors refresh token exchange

* Auto-format

* Auto-format

* Initial GCP create server UI

* Auto-format

* Addresses review comments

* URL encoding

* Encode URL

* Adds GCP strings

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Adds GCP create server app to gallery; Addresses review comments;

* Auto-formatting

* Addresses review comments

* Auto-format

* Addresses review comments

* Auto-format

* Addresses review comments

* Addresses review comments

* Auto-format

* Addresses review comment

* Auto-format

* Addresses review comments

* Minor fix

* Removes comments

* Addresses review comments

* Auto-format

* Addresses review comments
2021-04-09 14:15:00 -04:00
Ben Schwartz
23e0600898 Remove lingering mentions of Bower
Bower is no longer used
2021-02-22 14:31:02 -05:00
Benjamin M. Schwartz
5814f9772c
Exclude bower_components from tslint
Co-authored-by: Jonathan Cohen <cohenjon@google.com>
2021-02-19 15:15:01 -05:00
Ben Schwartz
1e0a283410 Exclude bower_components 2021-02-19 14:49:36 -05:00
Ben Schwartz
562c610b86 Download a pinned version of Shellcheck 2021-02-18 21:52:28 -05:00
Ben Schwartz
a08f8227d4 Respond to review comments 2021-02-17 16:56:37 -05:00
Ben Schwartz
7d1fe0205c Require scripts to be shellcheck-compliant 2021-02-17 11:57:32 -05:00
Jonathan Cohen
1c5b563d0d
Internationalize units and currency (#780)
* Internationalize data transfer amounts

* Internationalize units and currency

This required updating to Typescript 4 and adding compiler changes for the server manager in order to support newer features of `Intl`.

This change also fixes it so that the server city, creation date, and data limits no longer are stuck to the old language ater changing languages.

* Remove stray log

* Respond to review comments

* Remove byte-size

* Move to `web_app`

This code is only intended to be run in a web environment, not in Node.

* Respond to review comments

* Use property binding to the app language

* Respond to review comments

* Respond to review comments

* s/get/format

* Error out on Node

* Set the persisted app language before starting the app to prevent issues with undefined language at startup

* Respond to review comments and broaden covered languages
2021-02-04 18:47:45 -05:00
alalamav
2790202627
Fix unit tests (#693) 2020-06-22 16:32:48 -04:00
Vinicius Fortuna
373ffd2ceb Run lint in the build 2020-06-11 22:24:45 -04:00
Vinicius Fortuna
401a4f4bc8 Remove cleaning of bower_components 2020-05-14 18:31:49 -04:00
Vinicius Fortuna
59ebbd8a02 Cleanup 2020-05-08 16:43:40 -04:00
Vinicius Fortuna
e1462b757b Upgrade Typescript 2020-04-28 02:04:25 -04:00
alalamav
e9eb2d30ec
Only lint HTML files with prettier (#592) 2020-02-28 17:59:32 -05:00
Jonathan Cohen
565a5d9a6e
Use Prettier to format HTML and CSS files (#583)
* Use Prettier to format HTML, CSS, and Markdown files

Currently alalama uses Sublime's built-in formatter while JonathanDCohen uses VS Code.  This standardizes us on Prettier and adds formatting to our pre-commit hooks.

pretty-quick has no option to only format changed lines, so this commit will be followed by a format of the src/ directory in order to keep unrelated formatting changes from polluting diffs in upcoming commits.

Code contributors can use the instructions at https://prettier.io/docs/en/editors.html if they'd like to integrate prettier with their editor of choice

* Format html and css files in ui_components

* Fix some html errors found by Prettier
2020-02-20 18:10:04 -05:00
Jonathan Cohen
72efc24130
Update to Typescript 3.7 (#558)
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler
2020-01-17 16:42:02 -05:00
Jonathan Cohen
5e72b1d554
Update typescript (#519)
This corresponds with the same change in outline-client

Tested:
yarn do {server_manager/test, shadowbox/test, shadowbox/integration_test/run, sentry_webhook/build, metrics_server/build}
2019-10-22 17:22:27 -04:00
Trevor Johnston
cc417f6abb simplify precommit linting, always use binaries in node_modules 2019-01-07 14:54:18 -05:00
Trevor Johnston
54ca9caa2c migrate to husky 1.x, auto-upgrade config 2019-01-07 14:43:22 -05:00
Trevor Johnston
b3ab9c9962 upgrade to latest bigquery client library, remove now-unnecessary typings 2018-12-11 14:33:08 -05:00
fortuna
67e870e439 Add yarn minimum version 2018-04-06 17:47:31 -04:00
fortuna
d22cbaed8d Use yarn workspaces 2018-04-06 16:29:25 -04:00
fortuna
fb58ec9703 Move bower install into postinstall 2018-04-06 16:22:53 -04:00
Trevor Johnston
c44d9f2fb9 import code 2018-03-14 17:52:39 -04:00