Skip to content

Commit

Permalink
chore(client): move client/src/infrastructure to `client/infrastruc…
Browse files Browse the repository at this point in the history
…ture` (#1979)

* chore(client): move infrastructure out of src

* update infrastructure paths

* update memory storage location

* fix paths in electron
  • Loading branch information
daniellacosse authored Apr 19, 2024
1 parent a6ef9f7 commit 4bda32a
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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"]
}
2 changes: 1 addition & 1 deletion src/electron/connectivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import * as dns from 'dns';

import {timeoutPromise} from '../../client/src/infrastructure/timeout_promise';
import {timeoutPromise} from '../../client/infrastructure/timeout_promise';
import * as errors from '../../client/src/www/model/errors';

const DNS_LOOKUP_TIMEOUT_MS = 10000;
Expand Down
2 changes: 1 addition & 1 deletion src/electron/go_vpn_tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import {powerMonitor} from 'electron';
import {platform} from 'os';

import {pathToEmbeddedBinary} from '../../client/src/infrastructure/electron/app_paths';
import {pathToEmbeddedBinary} from '../../client/infrastructure/electron/app_paths';
import {ShadowsocksSessionConfig} from '../../client/src/www/app/tunnel';
import {TunnelStatus} from '../../client/src/www/app/tunnel';
import {ErrorCode, fromErrorCode, UnexpectedPluginError} from '../../client/src/www/model/errors';
Expand Down
2 changes: 1 addition & 1 deletion src/electron/routing_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {platform, userInfo} from 'os';
import * as path from 'path';
import * as sudo from 'sudo-prompt';

import {getAppPath} from '../../client/src/infrastructure/electron/app_paths';
import {getAppPath} from '../../client/infrastructure/electron/app_paths';
import {TunnelStatus} from '../../client/src/www/app/tunnel';
import {ErrorCode, SystemConfigurationException} from '../../client/src/www/model/errors';

Expand Down

0 comments on commit 4bda32a

Please sign in to comment.