This commit is contained in:
병준 박 2019-11-29 06:45:47 +09:00
parent dbfd0fd765
commit 1810bbbd29
459 changed files with 40550 additions and 3335 deletions

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
{
"trailingComma": "none",
"tabWidth": 2,
"singleQuote": true
}

View File

@ -7,8 +7,10 @@
"editor.trimAutoWhitespace": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.watcherExclude": {
"**/dist/electron/win-unpacked/**": true
},
"go.testFlags": ["-v"],
"go.testTimeout": "100s",
"prettier.singleQuote": true,
"debug.node.autoAttach": "on"
}

View File

@ -30,18 +30,52 @@
"styles": ["projects/ucap-webmessenger-app/src/styles.scss"],
"scripts": [],
"customWebpackConfig": {
"path": "./config/renderer.webpack.config.js",
"mergeStrategies": { "externals": "replace" }
"path": "./config/angular.webpack.config.js"
}
},
"configurations": {
"production": {
"browser-development": {
"fileReplacements": [
{
"replace": "projects/ucap-webmessenger-app/src/environments/environment.ts",
"with": "projects/ucap-webmessenger-app/src/environments/environment.prod.ts"
"with": "projects/ucap-webmessenger-app/src/environments/environment-browser.dev.ts"
}
],
"outputPath": "dist/ucap-webmessenger-app-browser",
"polyfills": "projects/ucap-webmessenger-app/src/polyfills-es5.ts",
"tsConfig": "projects/ucap-webmessenger-app/tsconfig-es5.app.json",
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
},
"browser-production": {
"fileReplacements": [
{
"replace": "projects/ucap-webmessenger-app/src/environments/environment.ts",
"with": "projects/ucap-webmessenger-app/src/environments/environment-browser.prod.ts"
}
],
"outputPath": "dist/ucap-webmessenger-app-browser",
"polyfills": "projects/ucap-webmessenger-app/src/polyfills-es5.ts",
"tsConfig": "projects/ucap-webmessenger-app/tsconfig-es5.app.json",
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
@ -51,6 +85,36 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
},
"renderer-development": {
"fileReplacements": [
{
"replace": "projects/ucap-webmessenger-app/src/environments/environment.ts",
"with": "projects/ucap-webmessenger-app/src/environments/environment-renderer.dev.ts"
}
],
"tsConfig": "projects/ucap-webmessenger-app/tsconfig-es5.app.json",
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
@ -63,17 +127,57 @@
"maximumError": "10kb"
}
]
},
"renderer-production": {
"fileReplacements": [
{
"replace": "projects/ucap-webmessenger-app/src/environments/environment.ts",
"with": "projects/ucap-webmessenger-app/src/environments/environment-renderer.prod.ts"
}
],
"tsConfig": "projects/ucap-webmessenger-app/tsconfig-es5.app.json",
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "ucap-webmessenger-app:build"
"browserTarget": "ucap-webmessenger-app:build",
"disableHostCheck": true
},
"configurations": {
"production": {
"browserTarget": "ucap-webmessenger-app:build:production"
"browser-development": {
"browserTarget": "ucap-webmessenger-app:build:browser-development"
},
"browser-production": {
"browserTarget": "ucap-webmessenger-app:build:browser-production"
},
"renderer-development": {
"browserTarget": "ucap-webmessenger-app:build:renderer-development"
},
"renderer-production": {
"browserTarget": "ucap-webmessenger-app:build:renderer-production"
}
}
},
@ -84,7 +188,7 @@
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"main": "projects/ucap-webmessenger-app/src/test.ts",
"polyfills": "projects/ucap-webmessenger-app/src/polyfills.ts",
@ -95,7 +199,10 @@
"projects/ucap-webmessenger-app/src/assets"
],
"styles": ["projects/ucap-webmessenger-app/src/styles.scss"],
"scripts": []
"scripts": [],
"customWebpackConfig": {
"path": "./config/angular.webpack.config.js"
}
}
},
"lint": {
@ -256,6 +363,40 @@
}
}
},
"ucap-webmessenger-api-message": {
"projectType": "library",
"root": "projects/ucap-webmessenger-api-message",
"sourceRoot": "projects/ucap-webmessenger-api-message/src",
"prefix": "ucap-api-message",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-api-message/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-api-message/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-api-message/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-api-message/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-api-message/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-api-message/tsconfig.lib.json",
"projects/ucap-webmessenger-api-message/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-api": {
"projectType": "library",
"root": "projects/ucap-webmessenger-api",
@ -588,6 +729,39 @@
}
}
},
"ucap-webmessenger-ui-settings": {
"projectType": "library",
"root": "projects/ucap-webmessenger-ui-settings",
"sourceRoot": "projects/ucap-webmessenger-ui-settings/src",
"prefix": "ucap-settings",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-ui-settings/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-ui-settings/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-ui-settings/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-ui-settings/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-ui-settings/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-ui-settings/tsconfig.lib.json",
"projects/ucap-webmessenger-ui-settings/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-protocol": {
"projectType": "library",
"root": "projects/ucap-webmessenger-protocol",
@ -1182,72 +1356,6 @@
}
}
},
"ucap-webmessenger-native": {
"projectType": "library",
"root": "projects/ucap-webmessenger-native",
"sourceRoot": "projects/ucap-webmessenger-native/src",
"prefix": "ucap-native",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-native/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-native/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-native/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-native/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-native/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-native/tsconfig.lib.json",
"projects/ucap-webmessenger-native/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-native-electron": {
"projectType": "library",
"root": "projects/ucap-webmessenger-native-electron",
"sourceRoot": "projects/ucap-webmessenger-native-electron/src",
"prefix": "ucap-native-electron",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-native-electron/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-native-electron/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-native-electron/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-native-electron/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-native-electron/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-native-electron/tsconfig.lib.json",
"projects/ucap-webmessenger-native-electron/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-web-socket": {
"projectType": "library",
"root": "projects/ucap-webmessenger-web-socket",
@ -1413,6 +1521,72 @@
}
}
},
"ucap-webmessenger-native": {
"projectType": "library",
"root": "projects/ucap-webmessenger-native",
"sourceRoot": "projects/ucap-webmessenger-native/src",
"prefix": "ucap-native",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-native/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-native/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-native/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-native/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-native/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-native/tsconfig.lib.json",
"projects/ucap-webmessenger-native/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-native-electron": {
"projectType": "library",
"root": "projects/ucap-webmessenger-native-electron",
"sourceRoot": "projects/ucap-webmessenger-native-electron/src",
"prefix": "ucap-native-electron",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-native-electron/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-native-electron/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-native-electron/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-native-electron/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-native-electron/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-native-electron/tsconfig.lib.json",
"projects/ucap-webmessenger-native-electron/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ucap-webmessenger-native-browser": {
"projectType": "library",
"root": "projects/ucap-webmessenger-native-browser",
@ -1445,76 +1619,6 @@
}
}
}
},
"ucap-webmessenger-electron-notification": {
"projectType": "library",
"root": "projects/ucap-webmessenger-electron-notification",
"sourceRoot": "projects/ucap-webmessenger-electron-notification/src",
"prefix": "ucap-electron-notification",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-electron-notification/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-electron-notification/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-electron-notification/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-electron-notification/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-electron-notification/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-electron-notification/tsconfig.lib.json",
"projects/ucap-webmessenger-electron-notification/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ucap-webmessenger-electron-core": {
"projectType": "library",
"root": "projects/ucap-webmessenger-electron-core",
"sourceRoot": "projects/ucap-webmessenger-electron-core/src",
"prefix": "ucap-electron-core",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ucap-webmessenger-electron-core/tsconfig.lib.json",
"project": "projects/ucap-webmessenger-electron-core/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ucap-webmessenger-electron-core/src/test.ts",
"tsConfig": "projects/ucap-webmessenger-electron-core/tsconfig.spec.json",
"karmaConfig": "projects/ucap-webmessenger-electron-core/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ucap-webmessenger-electron-core/tsconfig.lib.json",
"projects/ucap-webmessenger-electron-core/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ucap-webmessenger-app"

View File

@ -2,8 +2,16 @@ const path = require('path');
module.exports = (config, options) => {
const PRODUCTION = process.env.NODE_ENV === 'production';
const BROWSER = process.env.UCAP_ENV_RUNTIME === 'BROWSER';
if (!BROWSER) {
config.target = 'electron-renderer';
} else {
config.target = 'web';
config.node = {
fs: 'empty',
};
}
config.resolve.alias = {
...config.resolve.alias,
@ -11,7 +19,7 @@ module.exports = (config, options) => {
__dirname,
'..',
'projects/ucap-webmessenger-ui/src/assets/scss'
)
),
};
return config;

View File

@ -1,4 +1,3 @@
import * as fs from 'fs';
import * as Path from 'path';
const projectRoot = Path.dirname(__dirname);
@ -14,6 +13,6 @@ export function getEnviroments() {
__DEV__: channel === 'development',
'process.platform': s(process.platform),
'process.env.NODE_ENV': s(process.env.NODE_ENV || 'development'),
'process.env.TEST_ENV': s(process.env.TEST_ENV)
'process.env.TEST_ENV': s(process.env.TEST_ENV),
};
}

View File

@ -12,28 +12,39 @@ export const externals = [nodeExternals()];
// externals.push('devtron');
// }
const outputDir = 'dist/main';
const outputDir = 'dist/ucap-webmessenger-electron';
const mainConfig: webpack.Configuration = {
entry: { main: path.resolve(__dirname, '..', 'main/src/index') },
entry: {
main: path.resolve(
__dirname,
'..',
'electron-projects/ucap-webmessenger-electron/src/index'
),
},
target: 'electron-main',
mode: enviroments.__DEV__ ? 'development' : 'production',
devtool: 'source-map',
optimization: {
noEmitOnErrors: true
noEmitOnErrors: true,
},
externals,
output: {
filename: '[name].js',
path: path.resolve(__dirname, '..', outputDir)
path: path.resolve(__dirname, '..', outputDir),
},
module: {
rules: [
{
test: /\.tsx?$/,
include: [
path.resolve(__dirname, '..', 'main/src'),
path.resolve(__dirname, '..', 'projects')
path.resolve(
__dirname,
'..',
'electron-projects/ucap-webmessenger-electron/src'
),
path.resolve(__dirname, '..', 'electron-projects'),
path.resolve(__dirname, '..', 'projects'),
],
use: [
{
@ -43,21 +54,21 @@ const mainConfig: webpack.Configuration = {
configFileName: path.resolve(
__dirname,
'..',
'main/tsconfig.main.json'
)
}
}
'electron-projects/ucap-webmessenger-electron/tsconfig.electron.json'
),
},
},
],
exclude: /node_modules/
exclude: /node_modules/,
},
{
test: /\.node$/,
loader: 'awesome-node-loader',
options: {
name: '[name].[ext]'
}
}
]
name: '[name].[ext]',
},
},
],
},
plugins: [
new CleanWebpackPlugin({ verbose: false }),
@ -66,15 +77,16 @@ const mainConfig: webpack.Configuration = {
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.DefinePlugin(
Object.assign({}, enviroments, {
__PROCESS_KIND__: JSON.stringify('main')
__PROCESS_KIND__: JSON.stringify('main'),
})
),
new CopyWebpackPlugin([
{
from: 'main/resources/**/*',
to: path.resolve(__dirname, '..', 'dist')
}
])
from: 'ucap-webmessenger-electron/resources/**/*',
to: path.resolve(__dirname, '..', 'dist'),
context: 'electron-projects',
},
]),
],
resolve: {
extensions: ['.js', '.ts'],
@ -82,12 +94,17 @@ const mainConfig: webpack.Configuration = {
'@ucap-webmessenger/electron-core': path.resolve(
__dirname,
'..',
'projects/ucap-webmessenger-electron-core/src/public-api'
'electron-projects/ucap-webmessenger-electron-core/src/public-api'
),
'@ucap-webmessenger/electron-notification': path.resolve(
__dirname,
'..',
'projects/ucap-webmessenger-electron-notification/src/public-api'
'electron-projects/ucap-webmessenger-electron-notification/src/public-api'
),
'@ucap-webmessenger/core': path.resolve(
__dirname,
'..',
'projects/ucap-webmessenger-core/src/public-api'
),
'@ucap-webmessenger/native': path.resolve(
__dirname,
@ -98,14 +115,19 @@ const mainConfig: webpack.Configuration = {
__dirname,
'..',
'projects/ucap-webmessenger-native-electron/src/public-api'
)
),
'@ucap-webmessenger/electron': path.resolve(
__dirname,
'..',
'electron-projects/ucap-webmessenger-electron/src/public-api'
),
},
modules: [path.resolve(__dirname, '..', 'node_modules/')]
modules: [path.resolve(__dirname, '..', 'node_modules/')],
},
node: {
__dirname: false,
__filename: false
}
__filename: false,
},
};
export default [mainConfig];

10
docker/docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
version: '3.1'
services:
nginx:
image: nginx:1.17.5-alpine
volumes:
- ../dist/web:/usr/share/nginx/html:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 8099:80

40
docker/nginx/nginx.conf Normal file
View File

@ -0,0 +1,40 @@
worker_processes 4;
events { worker_connections 1024; }
http {
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 30m;
#See http://blog.argteam.com/coding/hardening-node-js-for-production-part-2-using-nginx-to-avoid-node-js-load
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
expires -1;
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
}
}
}

View File

@ -1,10 +1,10 @@
{
"productName": "WooriTalk",
"appId": "lgcns.ucap.messenger",
"productName": "UCapMessenger",
"appId": "com.lgucap.messenger",
"asar": true,
"protocols": {
"name": "WooriTalk",
"schemes": ["WooriTalk"]
"name": "UCapMessenger",
"schemes": ["UCapMessenger"]
},
"publish": {
"provider": "generic",
@ -12,19 +12,19 @@
},
"mac": {
"target": ["default"],
"icon": "./resources/installer/woori.icns"
"icon": "./dist/ucap-webmessenger-electron/resources/installer/woori.icns"
},
"dmg": {
"title": "WooriTalk",
"icon": "./resources/installer/woori.icns"
"title": "UCapMessenger",
"icon": "./dist/ucap-webmessenger-electron/resources/installer/woori.icns"
},
"win": {
"target": ["zip", "nsis"],
"icon": "./resources/installer/woori_256x256.ico"
"icon": "./dist/ucap-webmessenger-electron/resources/image/16_16.ico"
},
"linux": {
"target": ["AppImage", "deb", "rpm", "zip", "tar.gz"],
"icon": "./resources/linuxicon"
"icon": "./dist/ucap-webmessenger-electron/resources/linuxicon"
},
"nsis": {
"oneClick": false,
@ -33,8 +33,8 @@
"differentialPackage": true
},
"directories": {
"buildResources": "resources/installer/",
"output": "dist-electron/",
"buildResources": "./dist/ucap-webmessenger-electron/resources/installer/",
"output": "./dist/electron/",
"app": "."
}
}

View File

@ -0,0 +1,34 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(
__dirname,
'../../coverage/ucap-webmessenger-electron-core'
),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,5 @@
{
"name": "@ucap-webmessenger/electron-core",
"version": "0.0.1",
"peerDependencies": {}
}

View File

@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": ["dom", "es2018"]
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}

View File

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": ["jasmine", "node"]
},
"files": ["src/test.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}

View File

@ -0,0 +1,34 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(
__dirname,
'../../coverage/ucap-webmessenger-electron-notification'
),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -40,7 +40,7 @@ export const DefaultElectronNotificationOptions: ElectronNotificationOptions = {
borderRadius: 5,
displayTime: 5000,
animationSteps: 5,
animationStepMs: 5,
animationStepMs: 20,
appIcon: null,
pathToModule: '',
logging: true,

View File

@ -3,7 +3,7 @@ import { ElectronNotificationEventType } from '../types/event.type';
export interface ElectronNotificationEvent {
type: ElectronNotificationEventType;
id: number;
close?: (reason: any) => void;
close?: (reason?: any) => void;
}
export interface ElectronNotification {

View File

@ -1,10 +1,11 @@
import * as path from 'path';
import * as url from 'url';
import * as fse from 'fs-extra';
import { AnimationQueue } from '../utils/animation-queue';
import {
ElectronNotificationOptions,
DefaultElectronNotificationOptions
DefaultElectronNotificationOptions,
} from '../models/electron-notification-options';
import { screen, BrowserWindow, ipcMain, IpcMainEvent, shell } from 'electron';
import { ElectronNotification } from '../models/electron-notification';
@ -42,12 +43,12 @@ export class ElectronNotificationService {
constructor(options?: ElectronNotificationOptions) {
this.customOptions = {
...DefaultElectronNotificationOptions
...DefaultElectronNotificationOptions,
};
if (!!options) {
this.customOptions = {
...this.customOptions,
...options
...options,
};
}
@ -59,7 +60,7 @@ export class ElectronNotificationService {
if (!!options) {
this.customOptions = {
...this.customOptions,
...options
...options,
};
}
this.calcDimensions();
@ -88,7 +89,7 @@ export class ElectronNotificationService {
this.animationQueue.push({
context: this,
func: this.showNotification,
args: [notification]
args: [notification],
});
return notification.id;
}
@ -123,7 +124,7 @@ export class ElectronNotificationService {
this.lowerRightCornerPosition = {
x: display.bounds.x + display.workArea.x + display.workAreaSize.width,
y: display.bounds.y + display.workArea.y + display.workAreaSize.height
y: display.bounds.y + display.workArea.y + display.workAreaSize.height,
};
this.calcDimensions();
@ -176,7 +177,7 @@ export class ElectronNotificationService {
notificationWindow[onClickElectronNotification]({
type: ElectronNotificationEventType.Click,
id: notification.id,
close: self.buildCloseNotificationSafely(onClose)
close: self.buildCloseNotificationSafely(onClose),
});
delete notificationWindow[onClickElectronNotification];
}
@ -187,17 +188,17 @@ export class ElectronNotificationService {
private calcDimensions() {
this.totalDimension = {
width: this.customOptions.width + this.customOptions.padding,
height: this.customOptions.height + this.customOptions.padding
height: this.customOptions.height + this.customOptions.padding,
};
this.firstPosition = {
x: this.lowerRightCornerPosition.x = this.totalDimension.width,
y: this.lowerRightCornerPosition.y = this.totalDimension.height
x: this.lowerRightCornerPosition.x - this.totalDimension.width,
y: this.lowerRightCornerPosition.y - this.totalDimension.height,
};
this.nextInsertPosition = {
x: this.firstPosition.x,
y: this.firstPosition.y
y: this.firstPosition.y,
};
}
@ -211,18 +212,12 @@ export class ElectronNotificationService {
private updateTemplatePath() {
try {
import('fs')
.then(fs => {
fs.statSync(this.customOptions.templatePath).isFile();
fse.statSync(this.customOptions.templatePath).isFile();
this.templateUrl = url.format({
pathname: this.customOptions.templatePath,
protocol: 'file:',
slashes: true
});
})
.catch(reason => {
throw reason;
slashes: true,
});
} catch (e) {
console.log(
@ -237,26 +232,27 @@ export class ElectronNotificationService {
}
private showNotification(notification: ElectronNotification): Promise<any> {
const self = this;
return new Promise<any>((resolve, reject) => {
if (this.activeNotifications.length < this.maxVisibleNotifications) {
this.getWindow().then(notificationWindow => {
this.calcInsertPosition();
self.getWindow().then(notificationWindow => {
self.calcInsertPosition();
notificationWindow.setPosition(
this.nextInsertPosition.x,
this.nextInsertPosition.y
self.nextInsertPosition.x,
self.nextInsertPosition.y
);
this.activeNotifications.push(notificationWindow);
self.activeNotifications.push(notificationWindow);
const displayTime = !!notification.displayTime
? notification.displayTime
: this.customOptions.displayTime;
: self.customOptions.displayTime;
let timeoutId: any;
const onClose = this.buildCloseNotification(
const onClose = self.buildCloseNotification(
notificationWindow,
notification,
() => timeoutId
);
const onCloseNotificationSafely = this.buildCloseNotificationSafely(
const onCloseNotificationSafely = self.buildCloseNotificationSafely(
onClose
);
timeoutId = setTimeout(() => {
@ -270,11 +266,11 @@ export class ElectronNotificationService {
notification.onShow({
type: ElectronNotificationEventType.Show,
id: notification.id,
close: onCloseNotificationSafely
close: onCloseNotificationSafely,
});
}
if (!!notification.onClose) {
if (!!notification.onClick) {
notificationWindow[onClickElectronNotification] =
notification.onClick;
} else {
@ -296,7 +292,7 @@ export class ElectronNotificationService {
resolve(notificationWindow);
});
} else {
this.notificationQueue.push(notification);
self.notificationQueue.push(notification);
resolve();
}
});
@ -307,24 +303,25 @@ export class ElectronNotificationService {
notification: ElectronNotification,
timeoutIdFunc?: () => number
) {
const self = this;
return (e: ElectronNotificationEventType): Promise<void> => {
if (notificationWindow.isDestroyed()) {
return;
}
if (this.closedNotifications.has(notification.id)) {
this.closedNotifications.delete(notification.id);
if (self.closedNotifications.has(notification.id)) {
self.closedNotifications.delete(notification.id);
return new Promise<void>(resolve => {
resolve();
});
} else {
this.closedNotifications.set(notification.id, true);
self.closedNotifications.set(notification.id, true);
}
if (!!notificationWindow[onCloseElectronNotification]) {
notificationWindow[onCloseElectronNotification]({
type: e,
id: notification.id
id: notification.id,
});
delete notificationWindow[onCloseElectronNotification];
}
@ -334,29 +331,30 @@ export class ElectronNotificationService {
if (!!timeoutIdFunc) {
clearTimeout(timeoutIdFunc());
}
const i = this.activeNotifications.indexOf(notificationWindow);
this.activeNotifications.splice(i, 1);
this.inactiveWindows.push(notificationWindow);
const i = self.activeNotifications.indexOf(notificationWindow);
self.activeNotifications.splice(i, 1);
self.inactiveWindows.push(notificationWindow);
notificationWindow.hide();
this.checkForQueuedNotifications();
self.checkForQueuedNotifications();
return this.moveOneDown(i);
return self.moveOneDown(i);
};
}
private buildCloseNotificationSafely(
onClose: (e: ElectronNotificationEventType) => any
) {
const self = this;
return (reason: any) => {
if (!reason) {
reason = 'closedByAPI';
this.animationQueue.push({
context: this,
func: onClose,
args: [reason]
});
}
self.animationQueue.push({
context: self,
func: onClose,
args: [reason],
});
};
}
@ -368,30 +366,31 @@ export class ElectronNotificationService {
this.animationQueue.push({
context: this,
func: this.showNotification,
args: [this.notificationQueue.shift()]
args: [this.notificationQueue.shift()],
});
}
}
private getWindow(): Promise<BrowserWindow> {
const slef = this;
return new Promise<BrowserWindow>((resolve, reject) => {
if (0 < this.inactiveWindows.length) {
resolve(this.inactiveWindows.pop());
if (0 < slef.inactiveWindows.length) {
resolve(slef.inactiveWindows.pop());
} else {
const windowProperties = this.customOptions.defaultWindow;
windowProperties.width = this.customOptions.width;
windowProperties.height = this.customOptions.height;
const windowProperties = slef.customOptions.defaultWindow;
windowProperties.width = slef.customOptions.width;
windowProperties.height = slef.customOptions.height;
const notificationWindow = new BrowserWindow(windowProperties);
notificationWindow.setVisibleOnAllWorkspaces(true);
notificationWindow.loadURL(this.templatePath);
notificationWindow.loadURL(slef.templatePath);
notificationWindow.webContents.on(
ElectronWebContentsChannel.DidFinishLoad,
() => {
// Done
notificationWindow.webContents.send(
Channel.loadConfig,
this.customOptions
slef.customOptions
);
resolve(notificationWindow);
}
@ -407,20 +406,21 @@ export class ElectronNotificationService {
}
private moveOneDown(startPos: number): Promise<void> {
const self = this;
return new Promise<void>(async (resolve, reject) => {
if (startPos >= this.activeNotifications.length || -1 === startPos) {
if (startPos >= self.activeNotifications.length || -1 === startPos) {
resolve();
return;
}
const aryNotificationPos: number[] = [];
for (let i = startPos; i < this.activeNotifications.length; i++) {
for (let i = startPos; i < self.activeNotifications.length; i++) {
aryNotificationPos.push(i);
}
await Promise.all(
aryNotificationPos.map(async index => {
await this.moveNotificationAnimation(index);
await self.moveNotificationAnimation(index);
})
);
resolve();
@ -428,28 +428,29 @@ export class ElectronNotificationService {
}
private moveNotificationAnimation(index: number): Promise<void> {
const self = this;
return new Promise<void>((resolve, reject) => {
const notificationWindow = this.activeNotifications[index];
const notificationWindow = self.activeNotifications[index];
const newY =
this.lowerRightCornerPosition.y -
this.totalDimension.height * (index + 1);
self.lowerRightCornerPosition.y -
self.totalDimension.height * (index + 1);
const startY = notificationWindow.getPosition()[1];
const step = (newY - startY) / this.customOptions.animationSteps;
const step = (newY - startY) / self.customOptions.animationSteps;
let curStep = 1;
const animationInterval = setInterval(() => {
// Abort condition
if (curStep === this.customOptions.animationSteps) {
notificationWindow.setPosition(this.firstPosition.x, newY);
if (curStep === self.customOptions.animationSteps) {
notificationWindow.setPosition(self.firstPosition.x, newY);
clearInterval(animationInterval);
return resolve();
}
// Move one step down
notificationWindow.setPosition(
this.firstPosition.x,
self.firstPosition.x,
Math.trunc(startY + curStep * step)
);
curStep++;
}, this.customOptions.animationStepMs);
}, self.customOptions.animationStepMs);
});
}
}

View File

@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": ["dom", "es2018"]
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}

View File

@ -0,0 +1,24 @@
# UcapWebmessengerElectron
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.11.
## Code scaffolding
Run `ng generate component component-name --project ucap-webmessenger-electron` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucap-webmessenger-electron`.
> Note: Don't forget to add `--project ucap-webmessenger-electron` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build ucap-webmessenger-electron` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build ucap-webmessenger-electron`, go to the dist folder `cd dist/ucap-webmessenger-electron` and run `npm publish`.
## Running unit tests
Run `ng test ucap-webmessenger-electron` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@ -0,0 +1,34 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(
__dirname,
'../../coverage/ucap-webmessenger-electron'
),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,5 @@
{
"name": "@ucap-webmessenger/electron",
"version": "0.0.1",
"peerDependencies": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View File

@ -26,7 +26,7 @@ export class AppWindow {
private minWidth = 960;
private minHeight = 660;
public constructor() {
public constructor(private appIconPath: string) {
const savedWindowState = windowStateKeeper({
defaultWidth: this.minWidth,
defaultHeight: this.minHeight
@ -52,7 +52,7 @@ export class AppWindow {
nodeIntegration: true
},
acceptFirstMouse: true,
icon: path.join(__dirname, 'resources/image', 'ico_64_64.png')
icon: this.appIconPath
};
if (__DARWIN__) {
@ -60,7 +60,6 @@ export class AppWindow {
} else if (__WIN32__) {
windowOptions.frame = false;
} else if (__LINUX__) {
windowOptions.icon = path.join(__dirname, 'static', 'icon-logo.png');
}
this.window = new BrowserWindow(windowOptions);
@ -85,6 +84,19 @@ export class AppWindow {
e.preventDefault();
}
});
} else if (__WIN32__) {
this.window.on(ElectronBrowserWindowChannel.Minimize, e => {
if (!quitting) {
e.preventDefault();
this.window.hide();
}
});
this.window.on(ElectronBrowserWindowChannel.Close, e => {
if (!quitting) {
e.preventDefault();
this.window.hide();
}
});
}
if (__WIN32__) {
@ -200,6 +212,10 @@ export class AppWindow {
this.window.show();
}
public hide() {
this.window.hide();
}
/**
* Get the time (in milliseconds) spent loading the page.
*

View File

@ -1,4 +1,12 @@
import { app, ipcMain, IpcMainEvent, remote } from 'electron';
import {
app,
ipcMain,
IpcMainEvent,
remote,
Tray,
Menu,
dialog
} from 'electron';
import * as path from 'path';
import * as url from 'url';
import * as fse from 'fs-extra';
@ -12,7 +20,9 @@ import {
UpdaterChannel,
FileChannel,
IdleStateChannel,
NotificationChannel
NotificationChannel,
ChatChannel,
MessengerChannel
} from '@ucap-webmessenger/native-electron';
import { ElectronNotificationService } from '@ucap-webmessenger/electron-notification';
@ -24,7 +34,12 @@ import { IdleChecker } from './lib/idle-checker';
import { NotificationRequest } from '@ucap-webmessenger/native';
import { ElectronAppChannel } from '@ucap-webmessenger/electron-core';
const appIconPath = __LINUX__
? path.join(__dirname, 'static', 'icon-logo.png')
: path.join(__dirname, 'resources/image', 'ico_64_64.png');
let appWindow: AppWindow | null = null;
let appTray: Tray | null = null;
const launchTime = now();
let readyTime: number | null = null;
@ -90,7 +105,7 @@ if (isDuplicateInstance) {
}
function createWindow() {
const window = new AppWindow();
const window = new AppWindow(appIconPath);
if (__DEV__) {
// const {
@ -142,6 +157,48 @@ function createWindow() {
appWindow = window;
}
function createTray() {
appTray = new Tray(appIconPath);
const contextMenu = Menu.buildFromTemplate([
{
label: '로그아웃',
// accelerator: 'Q',
// selector: 'terminate:',
click: () => {
appWindow.show();
appWindow.browserWindow.webContents.send(MessengerChannel.Logout);
}
},
{
label: '설정',
// accelerator: 'Q',
// selector: 'terminate:',
click: () => {
appWindow.show();
appWindow.browserWindow.webContents.send(MessengerChannel.ShowSetting);
}
},
{ label: '버전', submenu: [{ label: 'Ver. ' + app.getVersion() }] },
{
label: '종료',
// accelerator: 'Q',
// selector: 'terminate:',
click: () => {
// 메신저에 로그아웃 후 종료
appWindow = null;
app.exit();
}
}
]);
appTray.setToolTip('UCapMessenger');
appTray.setContextMenu(contextMenu);
appTray.on('click', () => {
appWindow.isVisible() ? appWindow.hide() : appWindow.show();
});
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
@ -154,10 +211,12 @@ app.on(ElectronAppChannel.Ready, () => {
createWindow();
createTray();
notificationService = new ElectronNotificationService({
width: 340,
height: 100,
padding: 10,
padding: 0,
borderRadius: 0,
// appIcon: iconPath,
displayTime: 5000,
@ -240,8 +299,9 @@ ipcMain.on(
try {
const buffer: Buffer = args[0];
const fileName: string = args[1];
const mimeType: string = args[2];
let savePath: string = path.join(
!!args[2] ? args[2] : DefaultFolder.downloads(),
!!args[3] ? args[3] : DefaultFolder.downloads(),
fileName
);
savePath = await FileUtil.uniqueFileName(savePath);
@ -289,12 +349,15 @@ ipcMain.on(
'resources/notification/sound/messageAlarm.mp3'
)
: '',
onClick: () => {
console.log('onClick');
onClick: e => {
appWindow.browserWindow.webContents.send(
ChatChannel.OpenRoom,
noti.roomSeq
);
appWindow.show();
e.close();
}
});
console.log('Channel.notify', noti);
}
);

View File

@ -51,11 +51,9 @@ export class IdleChecker {
// global.opt_idleTimeLimit = limitedMin;
this.startChecker();
console.log('RESET IDLE TIMER in ' + limitedMin + 'm');
}
public startChecker() {
console.log('Idle Checker Start');
if (!this.intervalObject) {
this.intervalObject = setInterval(() => {
this.doCheckIdle();
@ -64,7 +62,6 @@ export class IdleChecker {
}
public destoryChecker() {
console.log('Idle Checker Destory');
if (!!this.intervalObject) {
clearInterval(this.intervalObject);
}

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "../dist/main",
"outDir": "../../dist/main",
"sourceMap": true,
"declaration": false,
"module": "commonjs",
@ -14,19 +14,24 @@
"lib": ["es2017", "es2016", "es2015", "dom"],
"paths": {
"@ucap-webmessenger/electron-core": [
"../projects/ucap-webmessenger-electron-core/src/public-api"
"../ucap-webmessenger-electron-core/src/public-api"
],
"@ucap-webmessenger/electron-notification": [
"../projects/ucap-webmessenger-electron-notification/src/public-api"
"../ucap-webmessenger-electron-notification/src/public-api"
],
"@ucap-webmessenger/core": [
"../../projects/ucap-webmessenger-core/src/public-api"
],
"@ucap-webmessenger/native": [
"../projects/ucap-webmessenger-native/src/public-api"
"../../projects/ucap-webmessenger-native/src/public-api"
],
"@ucap-webmessenger/native-electron": [
"../projects/ucap-webmessenger-native-electron/src/public-api"
"../../projects/ucap-webmessenger-native-electron/src/public-api"
],
"@ucap-webmessenger/electron": [
"../../projects/ucap-webmessenger-electron/src/public-api"
]
}
},
"exclude": ["../node_modules", "**/*.spec.ts"]
"exclude": ["../../node_modules", "**/*.spec.ts"]
}

View File

@ -0,0 +1,7 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [true, "attribute", "ucapElectron", "camelCase"],
"component-selector": [true, "element", "ucap-electron", "kebab-case"]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

896
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,21 +2,31 @@
"name": "ucap-webmessenger",
"version": "0.0.0",
"scripts": {
"postinstall": "electron-builder install-app-deps",
"ng": "ng",
"start": "npm-run-all -p start:renderer start:main",
"start:main": "wait-on http-get://localhost:4200/ && npm run build:main:dev && electron --nolazy --inspect-brk=9229 .",
"start:renderer": "ng serve",
"start:web": "cross-env UCAP_ENV=WEB ng serve",
"start:production": "npm run build:renderer && npm run build:main:prod && electron --nolazy --inspect-brk=9229 .",
"build:renderer": "cross-env NODE_ENV=production ng build --base-href ./",
"build:main:dev": "cross-env NODE_ENV=development TS_NODE_PROJECT='./config/tsconfig.webpack.json' parallel-webpack --config=config/main.webpack.config.ts",
"build:main:prod": "cross-env NODE_ENV=production TS_NODE_PROJECT='./config/tsconfig.webpack.json' NODE_OPTIONS='--max_old_space_size=4096' parallel-webpack --config=config/main.webpack.config.ts",
"start:main": "wait-on http-get://localhost:4200/ && npm run build:main:development && electron --nolazy --inspect-brk=9229 .",
"start:renderer": "cross-env UCAP_ENV_RUNTIME=ELECTRON ng serve -c renderer-development",
"start:browser": "cross-env UCAP_ENV_RUNTIME=BROWSER ng serve -c browser-development -o",
"build": "npm-run-all -p build:renderer build:main:production",
"build:renderer": "cross-env NODE_ENV=production ng build -c renderer-development --base-href ./",
"build:browser": "cross-env UCAP_ENV_RUNTIME=BROWSER ng build -c browser-development --base-href ./NextMessenger_POC",
"build:main:development": "cross-env NODE_ENV=development TS_NODE_PROJECT='./config/tsconfig.webpack.json' parallel-webpack --config=config/main.webpack.config.ts",
"build:main:production": "cross-env NODE_ENV=production TS_NODE_PROJECT='./config/tsconfig.webpack.json' NODE_OPTIONS='--max_old_space_size=4096' parallel-webpack --config=config/main.webpack.config.ts",
"electron:local": "electron .",
"electron:windows": "npm run build && electron-builder build --windows",
"electron:mac": "npm run build && electron-builder build --mac",
"electron:linux": "npm run build && electron-builder build --linux",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/core": "~8.2.12",
"electron-window-state": "^5.0.3",
"fs-extra": "^8.1.0",
"rxjs": "^6.5.2",
"tslib": "^1.10.0"
},
"devDependencies": {
@ -29,7 +39,6 @@
"@angular/common": "~8.2.12",
"@angular/compiler": "~8.2.12",
"@angular/compiler-cli": "~8.2.12",
"@angular/core": "~8.2.12",
"@angular/flex-layout": "^8.0.0-beta.27",
"@angular/forms": "~8.2.12",
"@angular/language-service": "~8.2.12",
@ -60,8 +69,11 @@
"@types/webpack": "^4.39.5",
"@types/webpack-merge": "^4.1.5",
"@types/webpack-node-externals": "^1.6.3",
"angular-split": "^3.0.2",
"autolinker": "^3.11.1",
"awesome-node-loader": "^1.1.1",
"awesome-typescript-loader": "^5.2.1",
"classlist.js": "^1.1.20150312",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.0.4",
"codelyzer": "^5.0.0",
@ -70,17 +82,15 @@
"cross-env": "^5.2.1",
"detect-browser": "^4.6.0",
"devtron": "^1.4.0",
"electron": "^6.1.2",
"electron": "^7.1.1",
"electron-builder": "^21.2.0",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"electron-log": "^3.0.8",
"electron-log": "^3.0.9",
"electron-reload": "^1.5.0",
"electron-store": "^4.0.0",
"electron-updater": "^4.1.2",
"electron-window-state": "^5.0.3",
"electron-store": "^5.1.0",
"electron-updater": "^4.2.0",
"file-saver": "^2.0.2",
"fs-extra": "^8.1.0",
"filesize": "^4.1.2",
"hammerjs": "^2.0.8",
"jasmine-core": "~3.4.0",
@ -95,11 +105,11 @@
"ngrx-store-freeze": "^0.2.4",
"ngx-logger": "^4.0.5",
"ngx-perfect-scrollbar": "^8.0.0",
"rimraf": "^3.0.0",
"npm-run-all": "^4.1.5",
"parallel-webpack": "^2.4.0",
"protractor": "~5.4.0",
"queueing-subject": "^0.3.4",
"rxjs": "^6.5.2",
"semver": "^6.3.0",
"ts-node": "~7.0.0",
"tsickle": "^0.37.0",
@ -107,10 +117,11 @@
"tslint": "~5.15.0",
"typescript": "~3.5.3",
"wait-on": "^3.3.0",
"web-animations-js": "^2.3.2",
"webpack": "4.39.2",
"webpack-cli": "^3.3.7",
"webpack-node-externals": "^1.7.2",
"zone.js": "~0.9.1"
},
"main": "./dist/main/main.js"
"main": "./dist/ucap-webmessenger-electron/main.js"
}

View File

@ -0,0 +1,7 @@
import { ModuleConfig as CoreModuleConfig } from '@ucap-webmessenger/core';
import { Urls } from './urls';
export interface ModuleConfig extends CoreModuleConfig<Urls> {
acceptableFileExtensions: string[];
}

Some files were not shown because too many files have changed in this diff Show More