From 0271d86add83cf262305998ff1120ddc7cad74dd Mon Sep 17 00:00:00 2001 From: Richard Park Date: Fri, 13 Dec 2019 13:45:08 +0900 Subject: [PATCH] configuration of daesang is added --- angular.json | 67 ++++++++++++ config/main.webpack.config.ts | 45 ++++---- .../README.md | 25 +++++ .../karma.conf.js | 34 +++++++ .../package.json | 5 + .../electron-update-window.service.ts | 1 + .../src/public-api.ts | 3 + .../src/test.ts | 21 ++++ .../tsconfig.lib.json | 12 +++ .../tsconfig.spec.json | 17 ++++ .../tslint.json | 17 ++++ .../{image => images}/btn_call_message.png | Bin .../{image => images}/btn_call_receive.png | Bin .../{image => images}/btn_call_refuse.png | Bin .../{image => images}/btn_call_transfer.png | Bin .../{image => images}/btn_close.png | Bin .../{image => images}/btn_close_gray.png | Bin .../{image => images}/btn_noti_call.png | Bin .../{image => images}/img_nophoto_50.png | Bin .../{sound => sounds}/messageAlarm.mp3 | Bin .../notification/styles/noti_messege.css | 4 +- .../resources/notification/template.html | 20 ++-- .../resources/update-window/preload.js | 0 .../resources/update-window/template.html | 0 .../ucap-webmessenger-electron/src/index.ts | 17 +++- .../tsconfig.electron.json | 3 + package.json | 10 ++ .../environment-browser.daesang.dev.ts | 7 ++ .../environment-browser.daesang.prod.ts | 7 ++ .../environment-renderer.daesang.dev.ts | 7 ++ .../environment-renderer.daesang.prod.ts | 7 ++ .../environments/environment.daesang.dev.ts | 96 ++++++++++++++++++ .../environments/environment.daesang.prod.ts | 96 ++++++++++++++++++ tsconfig.json | 3 + 34 files changed, 488 insertions(+), 36 deletions(-) create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/README.md create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/karma.conf.js create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/package.json create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/src/lib/services/electron-update-window.service.ts create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/src/public-api.ts create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/src/test.ts create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/tsconfig.lib.json create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/tsconfig.spec.json create mode 100644 electron-projects/ucap-webmessenger-electron-update-window/tslint.json rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_call_message.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_call_receive.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_call_refuse.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_call_transfer.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_close.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_close_gray.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/btn_noti_call.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{image => images}/img_nophoto_50.png (100%) rename electron-projects/ucap-webmessenger-electron/resources/notification/{sound => sounds}/messageAlarm.mp3 (100%) create mode 100644 electron-projects/ucap-webmessenger-electron/resources/update-window/preload.js create mode 100644 electron-projects/ucap-webmessenger-electron/resources/update-window/template.html create mode 100644 projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.dev.ts create mode 100644 projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.prod.ts create mode 100644 projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.dev.ts create mode 100644 projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.prod.ts create mode 100644 projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts create mode 100644 projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts diff --git a/angular.json b/angular.json index b24b253d..fb6dca3f 100644 --- a/angular.json +++ b/angular.json @@ -98,6 +98,7 @@ } ] }, + "renderer-development": { "fileReplacements": [ { @@ -157,6 +158,66 @@ "maximumError": "10kb" } ] + }, + "renderer-daesang-development": { + "fileReplacements": [ + { + "replace": "projects/ucap-webmessenger-app/src/environments/environment.ts", + "with": "projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.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", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + }, + "renderer-daesang-production": { + "fileReplacements": [ + { + "replace": "projects/ucap-webmessenger-app/src/environments/environment.ts", + "with": "projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.prod.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" + } + ] } } }, @@ -178,6 +239,12 @@ }, "renderer-production": { "browserTarget": "ucap-webmessenger-app:build:renderer-production" + }, + "renderer-daesang-development": { + "browserTarget": "ucap-webmessenger-app:build:renderer-daesang-development" + }, + "renderer-daesang-production": { + "browserTarget": "ucap-webmessenger-app:build:renderer-daesang-production" } } }, diff --git a/config/main.webpack.config.ts b/config/main.webpack.config.ts index 5759bf65..0dfc5816 100644 --- a/config/main.webpack.config.ts +++ b/config/main.webpack.config.ts @@ -20,18 +20,18 @@ const mainConfig: webpack.Configuration = { __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: [ @@ -44,7 +44,7 @@ const mainConfig: webpack.Configuration = { 'electron-projects/ucap-webmessenger-electron/src' ), path.resolve(__dirname, '..', 'electron-projects'), - path.resolve(__dirname, '..', 'projects'), + path.resolve(__dirname, '..', 'projects') ], use: [ { @@ -55,20 +55,20 @@ const mainConfig: webpack.Configuration = { __dirname, '..', '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 }), @@ -77,16 +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: 'ucap-webmessenger-electron/resources/**/*', to: path.resolve(__dirname, '..', 'dist'), - context: 'electron-projects', - }, - ]), + context: 'electron-projects' + } + ]) ], resolve: { extensions: ['.js', '.ts'], @@ -101,6 +101,11 @@ const mainConfig: webpack.Configuration = { '..', 'electron-projects/ucap-webmessenger-electron-notification/src/public-api' ), + '@ucap-webmessenger/electron-update-window': path.resolve( + __dirname, + '..', + 'electron-projects/ucap-webmessenger-electron-update-window/src/public-api' + ), '@ucap-webmessenger/core': path.resolve( __dirname, '..', @@ -120,14 +125,14 @@ const mainConfig: webpack.Configuration = { __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]; diff --git a/electron-projects/ucap-webmessenger-electron-update-window/README.md b/electron-projects/ucap-webmessenger-electron-update-window/README.md new file mode 100644 index 00000000..db69062e --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/README.md @@ -0,0 +1,25 @@ +# UcapWebmessengerElectronUpdateWindow + +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-update-window` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucap-webmessenger-electron-update-window`. + +> Note: Don't forget to add `--project ucap-webmessenger-electron-update-window` or else it will be added to the default project in your `angular.json` file. + +## Build + +Run `ng build ucap-webmessenger-electron-update-window` 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-update-window`, go to the dist folder `cd dist/ucap-webmessenger-electron-update-window` and run `npm publish`. + +## Running unit tests + +Run `ng test ucap-webmessenger-electron-update-window` 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). diff --git a/electron-projects/ucap-webmessenger-electron-update-window/karma.conf.js b/electron-projects/ucap-webmessenger-electron-update-window/karma.conf.js new file mode 100644 index 00000000..3859d39f --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/karma.conf.js @@ -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-update-window' + ), + 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 + }); +}; diff --git a/electron-projects/ucap-webmessenger-electron-update-window/package.json b/electron-projects/ucap-webmessenger-electron-update-window/package.json new file mode 100644 index 00000000..e48fb351 --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/package.json @@ -0,0 +1,5 @@ +{ + "name": "@ucap-webmessenger/electron-update-window", + "version": "0.0.1", + "peerDependencies": {} +} diff --git a/electron-projects/ucap-webmessenger-electron-update-window/src/lib/services/electron-update-window.service.ts b/electron-projects/ucap-webmessenger-electron-update-window/src/lib/services/electron-update-window.service.ts new file mode 100644 index 00000000..886ec675 --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/src/lib/services/electron-update-window.service.ts @@ -0,0 +1 @@ +export class ElectronUpdateWindowService {} diff --git a/electron-projects/ucap-webmessenger-electron-update-window/src/public-api.ts b/electron-projects/ucap-webmessenger-electron-update-window/src/public-api.ts new file mode 100644 index 00000000..8efee9e2 --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/src/public-api.ts @@ -0,0 +1,3 @@ +/* + * Public API Surface of ucap-webmessenger-electron-update-window + */ diff --git a/electron-projects/ucap-webmessenger-electron-update-window/src/test.ts b/electron-projects/ucap-webmessenger-electron-update-window/src/test.ts new file mode 100644 index 00000000..978c64fb --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/src/test.ts @@ -0,0 +1,21 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone'; +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.lib.json b/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.lib.json new file mode 100644 index 00000000..33840d86 --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.lib.json @@ -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"] +} diff --git a/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.spec.json b/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.spec.json new file mode 100644 index 00000000..16da33db --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/tsconfig.spec.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/electron-projects/ucap-webmessenger-electron-update-window/tslint.json b/electron-projects/ucap-webmessenger-electron-update-window/tslint.json new file mode 100644 index 00000000..95437ac7 --- /dev/null +++ b/electron-projects/ucap-webmessenger-electron-update-window/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "ucapElectronUpdateWindow", + "camelCase" + ], + "component-selector": [ + true, + "element", + "ucap-electron-update-window", + "kebab-case" + ] + } +} diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_message.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_message.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_message.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_message.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_receive.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_receive.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_receive.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_receive.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_refuse.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_refuse.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_refuse.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_refuse.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_transfer.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_transfer.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_call_transfer.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_transfer.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_close.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_close.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_close_gray.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close_gray.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_close_gray.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close_gray.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_noti_call.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_noti_call.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/btn_noti_call.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_noti_call.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/image/img_nophoto_50.png b/electron-projects/ucap-webmessenger-electron/resources/notification/images/img_nophoto_50.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/image/img_nophoto_50.png rename to electron-projects/ucap-webmessenger-electron/resources/notification/images/img_nophoto_50.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/sound/messageAlarm.mp3 b/electron-projects/ucap-webmessenger-electron/resources/notification/sounds/messageAlarm.mp3 similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/sound/messageAlarm.mp3 rename to electron-projects/ucap-webmessenger-electron/resources/notification/sounds/messageAlarm.mp3 diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css b/electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css index 02cbf609..ce92d6c7 100644 --- a/electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css +++ b/electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css @@ -63,7 +63,7 @@ a:active { top: 6px; width: 20px; height: 20px; - background: url(../image/btn_close_gray.png) no-repeat 50% 50%; + background: url(../images/btn_close_gray.png) no-repeat 50% 50%; } .btn_close:hover { opacity: 0.7; @@ -78,7 +78,7 @@ a:active { width: 54px; height: 54px; border-radius: 50%; - background: #5bc1ff url(../image/img_nophoto_50.png) no-repeat 50% 50%; + background: #5bc1ff url(../images/img_nophoto_50.png) no-repeat 50% 50%; border: 2px solid #ddd; } .info .profile { diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/template.html b/electron-projects/ucap-webmessenger-electron/resources/notification/template.html index 5bec4a80..ef896e72 100644 --- a/electron-projects/ucap-webmessenger-electron/resources/notification/template.html +++ b/electron-projects/ucap-webmessenger-electron/resources/notification/template.html @@ -1,16 +1,12 @@ - - + + [개발]M Messenger - 메시지 알림 - - + + - +
@@ -28,7 +24,7 @@
@@ -46,5 +42,5 @@ - - + + diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/preload.js b/electron-projects/ucap-webmessenger-electron/resources/update-window/preload.js new file mode 100644 index 00000000..e69de29b diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/template.html b/electron-projects/ucap-webmessenger-electron/resources/update-window/template.html new file mode 100644 index 00000000..e69de29b diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 7fdd62ce..e84ff168 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -26,6 +26,10 @@ import { UpdateCheckConfig } from '@ucap-webmessenger/native'; import { ElectronAppChannel } from '@ucap-webmessenger/electron-core'; + +import { autoUpdater, CancellationToken } from 'electron-updater'; +import log from 'electron-log'; + import { RendererUpdater } from './lib/renderer-updater'; const appIconPath = __LINUX__ @@ -80,6 +84,12 @@ isDuplicateInstance = !gotSingleInstanceLock; let idle: IdleChecker | null; let rendererUpdater: RendererUpdater | undefined; +log.transports.file.level = 'debug'; + +let autoUpdaterCancellationToken: CancellationToken; +autoUpdater.autoDownload = false; +autoUpdater.logger = log; + app.on(ElectronAppChannel.SecondInstance, (event, args, workingDirectory) => { // Someone tried to run a second instance, we should focus our window. if (appWindow) { @@ -400,12 +410,15 @@ ipcMain.on( text: noti.contents, image: noti.image || - path.join(__dirname, 'resources/notification/image/img_nophoto_50.png'), + path.join( + __dirname, + 'resources/notification/images/img_nophoto_50.png' + ), sound: noti.useSound ? path.join( 'file://', __dirname, - 'resources/notification/sound/messageAlarm.mp3' + 'resources/notification/sounds/messageAlarm.mp3' ) : '', onClick: e => { diff --git a/electron-projects/ucap-webmessenger-electron/tsconfig.electron.json b/electron-projects/ucap-webmessenger-electron/tsconfig.electron.json index d01f9dcd..951a541b 100644 --- a/electron-projects/ucap-webmessenger-electron/tsconfig.electron.json +++ b/electron-projects/ucap-webmessenger-electron/tsconfig.electron.json @@ -19,6 +19,9 @@ "@ucap-webmessenger/electron-notification": [ "../ucap-webmessenger-electron-notification/src/public-api" ], + "@ucap-webmessenger/electron-update-window": [ + "../ucap-webmessenger-electron-update-window/src/public-api" + ], "@ucap-webmessenger/core": [ "../../projects/ucap-webmessenger-core/src/public-api" ], diff --git a/package.json b/package.json index 8effa38e..23fb5380 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,22 @@ "start": "npm-run-all -p start:renderer start:main", "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:daesang": "npm-run-all -p start:daesang:renderer start:daesang:main", + "start:daesang:main": "wait-on http-get://localhost:4200/ && npm run build:daesang:main:development && electron --nolazy --inspect-brk=9229 .", + "start:daesang:renderer": "cross-env UCAP_ENV_RUNTIME=ELECTRON ng serve -c renderer-daesang-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:daesang": "npm-run-all -p build:daesang:renderer build:daesang:main:production", "build:renderer": "cross-env NODE_ENV=production ng build -c renderer-development --base-href ./", + "build:daesang:renderer": "cross-env NODE_ENV=production ng build -c renderer-daesang-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", + "build:daesang:main:development": "cross-env NODE_ENV=development TS_NODE_PROJECT='./config/tsconfig.webpack.json' parallel-webpack --config=config/main.webpack.config.ts", + "build:daesang: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", + "run:daesang": "npm-run-all -p run:daesang:renderer run:daesang:main", + "run:daesang:main": "wait-on http-get://localhost:4200/ && npm run build:daesang:main:development && electron --nolazy --inspect-brk=9229 .", + "run:daesang:renderer": "cross-env UCAP_ENV_RUNTIME=ELECTRON ng serve -c renderer-daesang-production", "electron:local": "electron .", "electron:windows": "npm run build && electron-builder build --windows", "electron:mac": "npm run build && electron-builder build --mac", diff --git a/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.dev.ts new file mode 100644 index 00000000..7352f661 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.dev.ts @@ -0,0 +1,7 @@ +import { Environment } from './environment.type'; +import { environment as devEnvironment } from './environment.daesang.dev'; + +export const environment: Environment = { + ...devEnvironment, + runtime: 'browser' +}; diff --git a/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.prod.ts new file mode 100644 index 00000000..0b208823 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment-browser.daesang.prod.ts @@ -0,0 +1,7 @@ +import { Environment } from './environment.type'; +import { environment as prodEnvironment } from './environment.daesang.prod'; + +export const environment: Environment = { + ...prodEnvironment, + runtime: 'browser' +}; diff --git a/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.dev.ts new file mode 100644 index 00000000..6b2e3ba3 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.dev.ts @@ -0,0 +1,7 @@ +import { Environment } from './environment.type'; +import { environment as devEnvironment } from './environment.daesang.dev'; + +export const environment: Environment = { + ...devEnvironment, + runtime: 'electron' +}; diff --git a/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.prod.ts new file mode 100644 index 00000000..4344affb --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment-renderer.daesang.prod.ts @@ -0,0 +1,7 @@ +import { Environment } from './environment.type'; +import { environment as prodEnvironment } from './environment.daesang.prod'; + +export const environment: Environment = { + ...prodEnvironment, + runtime: 'electron' +}; diff --git a/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts new file mode 100644 index 00000000..d7cb303f --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts @@ -0,0 +1,96 @@ +import { + Environment, + commonApiUrls, + commonApiacceptableFileExtensions, + publicApiUrls, + externalApiUrls, + piUrls, + protocolUrls, + messageApiUrls +} from './environment.type'; +import { DeviceType } from '@ucap-webmessenger/core'; + +export const environment: Environment = { + production: false, + title: `[개발] DS Talk`, + + companyConfig: { + companyGroupCode: 'LG' + }, + + productConfig: { + productId: 'PRO_000482', + productName: 'EZMessenger', + authentication: { + usePrivateInformationAgree: false + }, + updateCheckConfig: { + deviceType: DeviceType.Renderer, + intervalHour: 1 + } + }, + + commonApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: '15.164.139.105', + port: 8011 + }, + urls: commonApiUrls, + acceptableFileExtensions: commonApiacceptableFileExtensions + }, + + publicApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: '15.164.139.105', + port: 8011 + }, + urls: publicApiUrls + }, + + externalApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: '15.164.139.105', + port: 8011 + }, + urls: externalApiUrls + }, + + messageApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: '15.164.139.105', + port: 9098 + }, + urls: messageApiUrls + }, + + piModuleConfig: { + hostConfig: { + protocol: 'http', + domain: '15.164.139.105', + port: 9097 + }, + urls: piUrls + }, + + protocolModuleConfig: { + hostConfig: { + protocol: 'ws', + domain: '15.164.139.105', + port: 8080 + }, + urls: protocolUrls, + reconnect: { + delay: 1000 + }, + requestId: { + min: 1, + max: 59999 + } + }, + + nativeModuleConfig: {} +}; diff --git a/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts new file mode 100644 index 00000000..be59dd85 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts @@ -0,0 +1,96 @@ +import { + Environment, + commonApiUrls, + commonApiacceptableFileExtensions, + publicApiUrls, + externalApiUrls, + piUrls, + protocolUrls, + messageApiUrls +} from './environment.type'; +import { DeviceType } from '@ucap-webmessenger/core'; + +export const environment: Environment = { + production: false, + title: `DS Talk`, + + companyConfig: { + companyGroupCode: 'LG' + }, + + productConfig: { + productId: 'PRO_000482', + productName: 'EZMessenger', + authentication: { + usePrivateInformationAgree: false + }, + updateCheckConfig: { + deviceType: DeviceType.Renderer, + intervalHour: 1 + } + }, + + commonApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: 'messenger.daesang.com', + port: 8011 + }, + urls: commonApiUrls, + acceptableFileExtensions: commonApiacceptableFileExtensions + }, + + publicApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: 'messenger.daesang.com', + port: 8011 + }, + urls: publicApiUrls + }, + + externalApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: 'messenger.daesang.com', + port: 8011 + }, + urls: externalApiUrls + }, + + messageApiModuleConfig: { + hostConfig: { + protocol: 'http', + domain: 'messenger.daesang.com', + port: 9098 + }, + urls: messageApiUrls + }, + + piModuleConfig: { + hostConfig: { + protocol: 'http', + domain: 'messenger.daesang.com', + port: 9097 + }, + urls: piUrls + }, + + protocolModuleConfig: { + hostConfig: { + protocol: 'ws', + domain: 'messenger.daesang.com', + port: 8080 + }, + urls: protocolUrls, + reconnect: { + delay: 1000 + }, + requestId: { + min: 1, + max: 59999 + } + }, + + nativeModuleConfig: {} +}; diff --git a/tsconfig.json b/tsconfig.json index 96365baf..2b65e11b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -141,6 +141,9 @@ "@ucap-webmessenger/electron-notification": [ "electron-projects/ucap-webmessenger-electron-notification/src/public-api" ], + "@ucap-webmessenger/electron-update-window": [ + "electron-projects/ucap-webmessenger-electron-update-window/src/public-api" + ], "@ucap-webmessenger/electron": [ "electron-projects/ucap-webmessenger-electron/src/public-api" ]