Skip to content

Commit

Permalink
Merge branch 'master' into daniellacosse/custom_error_details
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse authored Apr 22, 2024
2 parents 12c0b9c + 72083af commit 6b2561b
Show file tree
Hide file tree
Showing 116 changed files with 12,031 additions and 2,945 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build_and_test_debug_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Install NPM Dependencies
run: npm set cache .npm && npm ci

- name: Run Linter
run: npm run action lint

- name: Build Web App
run: npm run action client/src/www/build

Expand Down Expand Up @@ -133,7 +130,7 @@ jobs:

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build macos

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test macos

Expand Down Expand Up @@ -174,7 +171,7 @@ jobs:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build ios
run: npm run action client/src/tun2socks/build ios

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test ios
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/build_and_test_debug_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,9 @@ on:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./server_manager/package.json

- name: Install NPM Dependencies
run: npm ci

- name: Lint
run: npm run lint

web_test:
name: Web Test
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -54,7 +33,7 @@ jobs:

- name: Manager Web Test
run: npm run action server_manager/test

linux_debug_build:
name: Linux Debug Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,7 +80,7 @@ jobs:

- name: Build Windows Manager
run: npm run action server_manager/electron_app/build windows

mac_debug_build:
name: MacOS Debug Build
runs-on: macos-11
Expand All @@ -121,7 +100,7 @@ jobs:

- name: Install NPM Dependencies
run: npm ci

- name: Set XCode Version
run: sudo xcode-select -switch /Applications/Xcode_13.2.app

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Lint

concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json

- name: Install NPM Dependencies
run: npm ci

- name: Lint
run: npm run lint
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
"@types/node": "^14.14.7",
"@types/polymer": "^1.2.9",
"@types/uuidv4": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"@web/dev-server": "^0.1.35",
"@web/dev-server-esbuild": "^0.3.3",
"@web/dev-server-storybook": "^0.5.4",
Expand Down Expand Up @@ -143,5 +141,8 @@
"ios",
"osx"
]
},
"scripts": {
"clean": "rm -rf build output node_modules www platforms plugins"
}
}
4 changes: 2 additions & 2 deletions client/src/www/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as errors from '../model/errors';
import * as events from '../model/events';
import {Server} from '../model/server';
import {OperationTimedOut} from '../../infrastructure/timeout_promise';
import {OperationTimedOut} from '../../../infrastructure/timeout_promise';
import {ServerListItem, ServerConnectionState} from '../views/servers_view';
import {SERVER_CONNECTION_INDICATOR_DURATION_MS} from '../views/servers_view/server_connection_indicator';

Expand All @@ -27,7 +27,7 @@ import {Settings, SettingsKey} from './settings';
import {Updater} from './updater';
import {UrlInterceptor} from './url_interceptor';
import {VpnInstaller} from './vpn_installer';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../infrastructure/i18n';

enum OUTLINE_ACCESS_KEY_SCHEME {
STATIC = 'ss',
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {makeConfig, SIP002_URI} from 'ShadowsocksConfig';
import {OutlinePlatform} from './platform';
import {Settings} from './settings';
import {TunnelFactory} from './tunnel';
import {Localizer} from 'src/infrastructure/i18n.js';
import {Localizer} from '../../../infrastructure/i18n.js';

// Used to determine whether to use Polymer functionality on app initialization failure.
let webComponentsAreReady = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {InMemoryStorage} from '../../../infrastructure/memory_storage';
import {InMemoryStorage} from '../../../../infrastructure/memory_storage';
import {ServerIncompatible, ServerUrlInvalid, ShadowsocksUnsupportedCipher} from '../../model/errors';
import {EventQueue, ServerAdded, ServerForgetUndone, ServerForgotten, ServerRenamed} from '../../model/events';

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/app/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {InMemoryStorage} from '../../infrastructure/memory_storage';
import {InMemoryStorage} from '../../../infrastructure/memory_storage';

import {Settings, SettingsKey} from './settings';

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/model/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import {Server} from './server';
import {CustomError} from '../../infrastructure/custom_error';
import {CustomError} from '../../../infrastructure/custom_error';

export class ServerAlreadyAdded extends CustomError {
constructor(public readonly server: Server) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/testing/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

import type {FormattableMessage, Localizer} from 'src/infrastructure/i18n';
import type {FormattableMessage, Localizer} from '../../../infrastructure/i18n';
import englishMessages from '../messages/en.json';
import IntlMessageFormat from 'intl-messageformat';

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/views/contact_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {IssueType, UNSUPPORTED_ISSUE_TYPE_HELPPAGES} from './issue_type';
import {AppType} from './app_type';
import {FormValues, SupportForm, ValidFormValues} from './support_form';
import {OutlineErrorReporter} from '../../shared/error_reporter';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../../infrastructure/i18n';

/** The possible steps in the stepper. Only one step is shown at a time. */
enum Step {
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/views/contact_view/support_form/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import '@material/mwc-textfield';
import {AppType} from '../app_type';
import {TextField} from '@material/mwc-textfield';
import {SelectedDetail} from '@material/mwc-menu/mwc-menu-base';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../../../infrastructure/i18n';

type FormControl = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/views/servers_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import './server_list';

import {ServerListItem as _ServerListItem} from './server_list_item';
import {ServerConnectionState as _ServerConnectionState} from './server_connection_indicator';
import { Localizer } from 'src/infrastructure/i18n';
import { Localizer } from '../../../../infrastructure/i18n';

export type ServerListItem = _ServerListItem;

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/views/servers_view/server_list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {customElement, property} from 'lit/decorators.js';

import '../server_list_item/server_card';
import {ServerListItem} from '../server_list_item';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../../../infrastructure/i18n';

@customElement('server-list')
export class ServerList extends LitElement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import {Ref} from 'lit/directives/ref';
import {Menu} from '@material/mwc-menu';
import {ServerConnectionState} from '../server_connection_indicator';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../../../infrastructure/i18n';

export enum ServerListItemEvent {
CONNECT = 'ConnectPressed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {Menu} from '@material/mwc-menu';

import {ServerListItem, ServerListItemElement, ServerListItemEvent} from '..';
import {ServerConnectionState} from '../../server_connection_indicator';
import {Localizer} from 'src/infrastructure/i18n';
import {Localizer} from '../../../../../../infrastructure/i18n';

const sharedCSS = css`
/* TODO(daniellacosse): reset via postcss */
Expand Down
2 changes: 1 addition & 1 deletion client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"lib": ["es2022"]
},
"exclude": ["*.cjs", "*.js", "*.mjs", "**/*.spec.ts"],
"include": ["src"]
"include": ["src", "infrastructure"]
}
5 changes: 5 additions & 0 deletions jasmine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"spec_dir": ".",
"spec_files": ["output/build/js/**/*.spec.js"],
"stopSpecOnExpectationFailure": false
}
Loading

0 comments on commit 6b2561b

Please sign in to comment.