Skip to content

Commit

Permalink
chore(client): add missing packages and fix some lint issues (#2110)
Browse files Browse the repository at this point in the history
* chore(client): add missing packages and disable triple-slash lint issues

* Add more missing packages.

* Make client package private and reference types.

* Create a `Listener` type for the listen callback function.

* Uninstall `@sentry/types`.
  • Loading branch information
sbruens authored Aug 8, 2024
1 parent de523b8 commit 5cc2a74
Show file tree
Hide file tree
Showing 6 changed files with 786 additions and 52 deletions.
6 changes: 6 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@outline/client",
"version": "0.0.0-debug",
"private": true,
"comments": {
"version": "The 'version' in this file is just a placeholder for 'npx generate-license-file', please do not change it.",
"codrova-osx": "Version-controlled platform config files at src/cordova/apple/xcode/osx/Outline/config.xml, src/cordova/apple/xcode/osx/osx.json, and src/cordova/apple/xcode/osx/www/cordova_plugins.js as a workaround for https://github.com/apache/cordova-osx/issues/106. Delete these files when the issue is fixed."
Expand Down Expand Up @@ -37,13 +38,15 @@
"@polymer/paper-ripple": "^3.0.2",
"@polymer/paper-styles": "^3.0.1",
"@polymer/paper-toast": "^3.0.1",
"@polymer/polymer": "^3.5.1",
"@sentry/browser": "^7.31.1",
"@sentry/electron": "^4.2.0",
"@webcomponents/webcomponentsjs": "^2.4.4",
"auto-launch": "^5.0.5",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.2.3",
"electron-updater": "^5.0.5",
"fs-extra": "^11.2.0",
"lit": "^2.2.2",
"ShadowsocksConfig": "github:Jigsaw-Code/outline-shadowsocksconfig#v0.2.1",
"socks": "^1.1.10",
Expand All @@ -68,6 +71,7 @@
"@types/uuidv4": "^2.0.0",
"@web/dev-server": "^0.1.35",
"@web/dev-server-esbuild": "^0.3.3",
"@web/dev-server-rollup": "^0.6.4",
"@web/dev-server-storybook": "^0.5.4",
"babel-loader": "^8.2.2",
"chalk": "^5.0.1",
Expand All @@ -94,6 +98,7 @@
"html-webpack-plugin": "^5.1.0",
"husky": "^1.3.1",
"i18n-strings-files": "^2.0.0",
"intl-messageformat": "^10.5.14",
"istanbul": "^0.4.5",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.1.0",
Expand All @@ -112,6 +117,7 @@
"rimraf": "^2.7.1",
"rmfr": "^2.0.0",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.3.10",
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"url": "^0.11.0",
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/app/clipboard.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.

/// <reference path='../types/clipboard.d.ts'/>
/// <reference types='../types/clipboard.d.ts'/>

export type ClipboardListener = (text: string) => void;

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

/// <reference types='cordova'/>
/// <reference path='../types/webintents.d.ts'/>
/// <reference types='../types/webintents.d.ts'/>

import '@babel/polyfill';
import 'web-animations-js/web-animations-next-lite.min.js';
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/app/main.electron.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.

/// <reference path="../../../electron/preload.d.ts" />
/// <reference types="../../../electron/preload.d.ts" />

import 'web-animations-js/web-animations-next-lite.min.js';
import '@webcomponents/webcomponentsjs/webcomponents-bundle.js';
Expand Down
8 changes: 5 additions & 3 deletions client/src/www/app/url_interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

/// <reference path='../types/webintents.d.ts'/>
/// <reference types='../types/webintents.d.ts'/>

type Listener = (url: string) => void;

export class UrlInterceptor {
protected launchUrl?: string;
private listeners: Array<(url: string) => void> = [];
private listeners: Array<Listener> = [];

registerListener(listener: (url: string) => void) {
registerListener(listener: Listener) {
this.listeners.push(listener);
if (this.launchUrl) {
listener(this.launchUrl);
Expand Down
Loading

0 comments on commit 5cc2a74

Please sign in to comment.