@rws-framework/client 2.13.1 → 2.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bin/add-v.sh +9 -9
- package/.bin/emerge.sh +15 -15
- package/.emerge-fast.yaml +46 -46
- package/.emerge-typescript-template.yaml +23 -23
- package/.emerge-vis-output/fast-element/emerge-file_result_dependency_graph.graphml +693 -693
- package/.emerge-vis-output/fast-element/emerge-filesystem_graph.graphml +705 -705
- package/.emerge-vis-output/fast-element/emerge-statistics-metrics.txt +440 -440
- package/.emerge-vis-output/fast-element/html/emerge.html +500 -500
- package/.emerge-vis-output/fast-element/html/jsconfig.json +8 -8
- package/.emerge-vis-output/fast-element/html/resources/css/custom.css +211 -211
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_common.js +44 -44
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_data.js +13 -13
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_git.js +1413 -1413
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_graph.js +539 -539
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_heatmap.js +219 -219
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_hull.js +179 -179
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_main.js +1002 -1002
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_search.js +71 -71
- package/.emerge-vis-output/fast-element/html/resources/js/emerge_ui.js +199 -199
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-grid.css +4123 -4123
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-grid.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-grid.rtl.css +4122 -4122
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-grid.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-reboot.css +487 -487
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-reboot.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-reboot.rtl.css +484 -484
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-reboot.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-utilities.css +4265 -4265
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-utilities.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-utilities.rtl.css +4256 -4256
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap-utilities.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap.css +10877 -10877
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap.rtl.css +10841 -10841
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/css/bootstrap.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.bundle.js +7075 -7075
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.bundle.min.js +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.esm.js +5202 -5202
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.esm.min.js +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.js +5249 -5249
- package/.emerge-vis-output/fast-element/html/vendors/bootstrap/js/bootstrap.min.js +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/d3/d3.v7.8.4.min.js +2 -2
- package/.emerge-vis-output/fast-element/html/vendors/d3/d3.v7.min.js +2 -2
- package/.emerge-vis-output/fast-element/html/vendors/dark-mode-switch/css/dark-mode.css +148 -148
- package/.emerge-vis-output/fast-element/html/vendors/daterangepicker/daterangepicker.min.js +7 -7
- package/.emerge-vis-output/fast-element/html/vendors/daterangepicker/moment.min.js +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/hull/hull.js +373 -373
- package/.emerge-vis-output/fast-element/html/vendors/jquery/jquery-3.6.0.min.js +2 -2
- package/.emerge-vis-output/fast-element/html/vendors/popper/popper.min.js +6 -6
- package/.emerge-vis-output/fast-element/html/vendors/simpleheat/simpleheat.js +141 -141
- package/.emerge-vis-output/fast-foundation/emerge-file_result_dependency_graph.graphml +4043 -4043
- package/.emerge-vis-output/fast-foundation/emerge-filesystem_graph.graphml +4538 -4538
- package/.emerge-vis-output/fast-foundation/emerge-statistics-metrics.txt +2510 -2510
- package/.emerge-vis-output/fast-foundation/html/emerge.html +500 -500
- package/.emerge-vis-output/fast-foundation/html/jsconfig.json +8 -8
- package/.emerge-vis-output/fast-foundation/html/resources/css/custom.css +211 -211
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_common.js +44 -44
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_data.js +13 -13
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_git.js +1413 -1413
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_graph.js +539 -539
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_heatmap.js +219 -219
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_hull.js +179 -179
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_main.js +1002 -1002
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_search.js +71 -71
- package/.emerge-vis-output/fast-foundation/html/resources/js/emerge_ui.js +199 -199
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-grid.css +4123 -4123
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-grid.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-grid.rtl.css +4122 -4122
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-grid.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-reboot.css +487 -487
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-reboot.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-reboot.rtl.css +484 -484
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-reboot.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-utilities.css +4265 -4265
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-utilities.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-utilities.rtl.css +4256 -4256
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap-utilities.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap.css +10877 -10877
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap.rtl.css +10841 -10841
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/css/bootstrap.rtl.min.css +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.bundle.js +7075 -7075
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.bundle.min.js +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.esm.js +5202 -5202
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.esm.min.js +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.js +5249 -5249
- package/.emerge-vis-output/fast-foundation/html/vendors/bootstrap/js/bootstrap.min.js +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/d3/d3.v7.8.4.min.js +2 -2
- package/.emerge-vis-output/fast-foundation/html/vendors/d3/d3.v7.min.js +2 -2
- package/.emerge-vis-output/fast-foundation/html/vendors/dark-mode-switch/css/dark-mode.css +148 -148
- package/.emerge-vis-output/fast-foundation/html/vendors/daterangepicker/daterangepicker.min.js +7 -7
- package/.emerge-vis-output/fast-foundation/html/vendors/daterangepicker/moment.min.js +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/hull/hull.js +373 -373
- package/.emerge-vis-output/fast-foundation/html/vendors/jquery/jquery-3.6.0.min.js +2 -2
- package/.emerge-vis-output/fast-foundation/html/vendors/popper/popper.min.js +6 -6
- package/.emerge-vis-output/fast-foundation/html/vendors/simpleheat/simpleheat.js +141 -141
- package/.emerge-vis-output/rws-client/emerge-file_result_dependency_graph.graphml +1143 -1143
- package/.emerge-vis-output/rws-client/emerge-filesystem_graph.graphml +1003 -1003
- package/.emerge-vis-output/rws-client/emerge-statistics-metrics.txt +655 -655
- package/.emerge-vis-output/rws-client/html/emerge.html +500 -500
- package/.emerge-vis-output/rws-client/html/jsconfig.json +8 -8
- package/.emerge-vis-output/rws-client/html/resources/css/custom.css +211 -211
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_common.js +44 -44
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_data.js +13 -13
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_git.js +1413 -1413
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_graph.js +539 -539
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_heatmap.js +219 -219
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_hull.js +179 -179
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_main.js +1002 -1002
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_search.js +71 -71
- package/.emerge-vis-output/rws-client/html/resources/js/emerge_ui.js +199 -199
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-grid.css +4123 -4123
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-grid.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-grid.rtl.css +4122 -4122
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-grid.rtl.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-reboot.css +487 -487
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-reboot.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-reboot.rtl.css +484 -484
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-reboot.rtl.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-utilities.css +4265 -4265
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-utilities.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-utilities.rtl.css +4256 -4256
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap-utilities.rtl.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap.css +10877 -10877
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap.rtl.css +10841 -10841
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/css/bootstrap.rtl.min.css +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.bundle.js +7075 -7075
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.bundle.min.js +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.esm.js +5202 -5202
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.esm.min.js +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.js +5249 -5249
- package/.emerge-vis-output/rws-client/html/vendors/bootstrap/js/bootstrap.min.js +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/d3/d3.v7.8.4.min.js +2 -2
- package/.emerge-vis-output/rws-client/html/vendors/d3/d3.v7.min.js +2 -2
- package/.emerge-vis-output/rws-client/html/vendors/dark-mode-switch/css/dark-mode.css +148 -148
- package/.emerge-vis-output/rws-client/html/vendors/daterangepicker/daterangepicker.min.js +7 -7
- package/.emerge-vis-output/rws-client/html/vendors/daterangepicker/moment.min.js +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/hull/hull.js +373 -373
- package/.emerge-vis-output/rws-client/html/vendors/jquery/jquery-3.6.0.min.js +2 -2
- package/.emerge-vis-output/rws-client/html/vendors/popper/popper.min.js +6 -6
- package/.emerge-vis-output/rws-client/html/vendors/simpleheat/simpleheat.js +141 -141
- package/.eslintrc.json +51 -51
- package/.gitmodules +2 -2
- package/.setup/.eslintrc.json +11 -11
- package/.setup/_base.eslintrc.json +48 -48
- package/.setup/tsconfig.json +28 -28
- package/PLUGINS.MD +188 -188
- package/README.md +1023 -1023
- package/_tools.js +396 -396
- package/builder/vite/index.ts +4 -4
- package/{cfg/build_steps → builder}/vite/loaders/html.ts +11 -11
- package/{cfg/build_steps → builder}/vite/loaders/index.ts +8 -8
- package/{cfg/build_steps → builder}/vite/loaders/loader.type.ts +27 -27
- package/{cfg/build_steps → builder}/vite/loaders/scss.ts +32 -32
- package/{cfg/build_steps → builder}/vite/loaders/ts.ts +309 -312
- package/builder/vite/rws.vite.config.ts +56 -49
- package/{cfg/build_steps → builder}/vite/rws_scss_plugin.ts +61 -60
- package/{cfg/build_steps → builder}/vite/scss/_compiler.ts +95 -94
- package/{cfg/build_steps → builder}/vite/scss/_fonts.ts +80 -80
- package/{cfg/build_steps → builder}/vite/scss/_fs.ts +83 -81
- package/{cfg/build_steps → builder}/vite/scss/_import.ts +191 -184
- package/builder/webpack/after/copy.js +78 -78
- package/builder/webpack/after/sw.js +13 -13
- package/builder/webpack/index.js +10 -10
- package/builder/webpack/loaders/rws_fast_html_loader.js +17 -17
- package/builder/webpack/loaders/rws_fast_scss_loader.js +43 -43
- package/builder/webpack/loaders/rws_fast_ts_loader.js +96 -96
- package/builder/webpack/loaders/ts/html_error.js +19 -19
- package/builder/webpack/rws.webpack.config.js +169 -169
- package/builder/webpack/rws_scss_plugin.js +62 -62
- package/builder/webpack/rws_webpack_plugin.js +137 -137
- package/builder/webpack/scss/_compiler.js +97 -97
- package/builder/webpack/scss/_fonts.js +80 -80
- package/builder/webpack/scss/_fs.js +84 -84
- package/builder/webpack/scss/_import.js +186 -186
- package/cfg/_default.cfg.js +26 -26
- package/cfg/_storage.d.ts +22 -22
- package/cfg/_storage.js +42 -42
- package/cfg/build_steps/vite/_build_config.ts +105 -105
- package/cfg/build_steps/vite/_env_defines.ts +17 -17
- package/cfg/build_steps/vite/_loaders.ts +187 -184
- package/cfg/build_steps/vite/index.ts +2 -2
- package/cfg/build_steps/vite/types.ts +7 -7
- package/cfg/build_steps/webpack/_actions.js +85 -85
- package/cfg/build_steps/webpack/_aliases.js +9 -9
- package/cfg/build_steps/webpack/_build_config.js +76 -76
- package/cfg/build_steps/webpack/_cache.js +98 -98
- package/cfg/build_steps/webpack/_component_handling.js +60 -60
- package/cfg/build_steps/webpack/_dev_servers.js +14 -14
- package/cfg/build_steps/webpack/_env_defines.js +18 -18
- package/cfg/build_steps/webpack/_info.js +18 -18
- package/cfg/build_steps/webpack/_loaders.js +223 -223
- package/cfg/build_steps/webpack/_plugins.js +102 -102
- package/cfg/build_steps/webpack/_production.js +37 -37
- package/cfg/build_steps/webpack/_rws_externals.js +68 -68
- package/cfg/build_steps/webpack/_timing.js +52 -52
- package/cfg/build_steps/webpack/_webpack_config.js +58 -58
- package/cfg/tsconfigSetup.js +150 -150
- package/console.js +86 -86
- package/docs/assets/26e93147f10415a0ed4a.svg +6 -6
- package/docs/assets/75c9471662e97ee24f29.svg +7 -7
- package/docs/assets/db90e4df2373980c497d.svg +9 -9
- package/docs/assets/highlight.css +127 -127
- package/docs/assets/main.js +59 -59
- package/docs/assets/style.css +1414 -1414
- package/docs/classes/ApiServiceInstance.html +25 -25
- package/docs/classes/ConfigServiceInstance.html +21 -21
- package/docs/classes/DOMServiceInstance.html +17 -17
- package/docs/classes/NotifyServiceInstance.html +15 -15
- package/docs/classes/RWSClientInstance.html +45 -45
- package/docs/classes/RWSPlugin.html +13 -13
- package/docs/classes/RWSService.html +10 -10
- package/docs/classes/RWSViewComponent.html +1022 -1022
- package/docs/classes/ServiceWorkerServiceInstance.html +13 -13
- package/docs/classes/UtilsServiceInstance.html +13 -13
- package/docs/functions/attr.html +5 -5
- package/docs/functions/observable.html +3 -3
- package/docs/index.html +179 -179
- package/docs/interfaces/HTMLTag.html +3 -3
- package/docs/interfaces/IRWSConfig.html +20 -20
- package/docs/interfaces/IRWSDecoratorOptions.html +5 -5
- package/docs/interfaces/IRWSHttpRoute.html +2 -2
- package/docs/interfaces/IRWSPrefixedHTTProutes.html +2 -2
- package/docs/interfaces/IRWSUser.html +5 -5
- package/docs/modules.html +45 -45
- package/foundation/index.js +1 -1
- package/foundation/rws-foundation.d.ts +7 -7
- package/foundation/rws-foundation.js +7 -7
- package/package.json +108 -108
- package/service_worker/src/_service_worker.ts +83 -83
- package/service_worker/tsconfig.json +20 -20
- package/service_worker/webpack.config.js +66 -66
- package/src/client/components.ts +67 -67
- package/src/client/config.ts +165 -165
- package/src/client/services.ts +27 -27
- package/src/client.ts +212 -212
- package/src/components/_attrs/_default_observable_accessor.ts +8 -8
- package/src/components/_attrs/_extended_accessor.ts +40 -40
- package/src/components/_attrs/_external_handler.ts +7 -7
- package/src/components/_attrs/_external_observable_accessor.ts +8 -8
- package/src/components/_attrs/angular-attr.ts +34 -34
- package/src/components/_attrs/external-attr.ts +59 -59
- package/src/components/_attrs/external-observable.ts +52 -52
- package/src/components/_attrs/sanitize-html.ts +80 -80
- package/src/components/_component.ts +245 -245
- package/src/components/_container.ts +15 -15
- package/src/components/_decorator.ts +122 -122
- package/src/components/_decorators/RWSFillBuild.ts +54 -54
- package/src/components/_decorators/RWSInject.ts +49 -49
- package/src/components/_decorators/RWSService.ts +11 -11
- package/src/components/_decorators/_di.ts +15 -15
- package/src/components/_definitions.ts +64 -64
- package/src/components/_event_handling.ts +40 -40
- package/src/components/index.ts +14 -14
- package/src/components/loader/component.ts +12 -12
- package/src/components/loader/styles/layout.scss +13 -13
- package/src/components/progress/component.ts +54 -54
- package/src/components/progress/styles/layout.scss +90 -90
- package/src/components/progress/template.html +24 -24
- package/src/components/uploader/component.ts +83 -83
- package/src/components/uploader/styles/layout.scss +130 -130
- package/src/components/uploader/template.html +16 -16
- package/src/index.ts +93 -93
- package/src/plugins/_builder.js +31 -31
- package/src/plugins/_plugin.ts +63 -63
- package/src/services/ApiService.ts +242 -242
- package/src/services/ConfigService.ts +134 -134
- package/src/services/DOMService.ts +100 -100
- package/src/services/NotifyService.ts +47 -47
- package/src/services/ServiceWorkerService.ts +60 -60
- package/src/services/UtilsService.ts +60 -60
- package/src/services/_service.ts +64 -64
- package/src/styles/_darkreader.scss +30 -30
- package/src/styles/_grid.scss +75 -75
- package/src/styles/_misc.scss +8 -8
- package/src/styles/_scrollbars.scss +40 -40
- package/src/styles/includes.scss +4 -4
- package/src/types/IRWSConfig.ts +30 -30
- package/src/types/IRWSPlugin.ts +18 -18
- package/src/types/IRWSUser.ts +6 -6
- package/src/types/IRWSViewComponent.ts +36 -36
- package/src/types/RWSNotify.ts +6 -6
- package/src/types/RWSWindow.ts +41 -41
- package/tsconfig.json +30 -30
- package/typedoc.json +13 -13
- package/types/declarations.d.ts +8 -8
- package/types/docs-typings.d.ts +15 -15
package/cfg/tsconfigSetup.js
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
const md5 = require('md5');
|
|
2
|
-
const chalk = require('chalk');
|
|
3
|
-
const tools = require('../_tools');
|
|
4
|
-
const { rwsPath } = require('@rws-framework/console');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
|
|
8
|
-
function setupTsConfig(tsConfigPath, executionDir, userAliases = {}) {
|
|
9
|
-
|
|
10
|
-
if (!fs.existsSync(tsConfigPath)) {
|
|
11
|
-
throw new Error(`Typescript config file "${tsConfigPath}" does not exist`);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const tsConfigContents = fs.readFileSync(tsConfigPath, 'utf-8');
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
let tsConfig = JSON.parse(tsConfigContents);
|
|
18
|
-
|
|
19
|
-
const declarationsPath = path.resolve(__dirname, '..', 'types') + '/declarations.d.ts';
|
|
20
|
-
const foundationPath = path.resolve(__dirname, '..', 'foundation');
|
|
21
|
-
const testsPath = path.resolve(__dirname, '..', 'tests');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const relativeDeclarationsPath = path.relative(path.dirname(tsConfigPath), declarationsPath);
|
|
25
|
-
const relativeTestsPath = path.relative(path.dirname(tsConfigPath), testsPath);
|
|
26
|
-
const relativeFoundationPath = path.relative(path.dirname(tsConfigPath), foundationPath);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const includedMD5 = [];
|
|
30
|
-
const srcPath = 'src/index.ts';
|
|
31
|
-
|
|
32
|
-
let changed = false;
|
|
33
|
-
|
|
34
|
-
if (!Object.keys(tsConfig).includes('include')) {
|
|
35
|
-
tsConfig['include'] = [];
|
|
36
|
-
} else {
|
|
37
|
-
tsConfig['include'] = tsConfig['include'].filter((inc) => {
|
|
38
|
-
if (inc === srcPath) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return fs.existsSync(rwsPath.relativize(inc, executionDir));
|
|
43
|
-
})
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (!tsConfig['include'].includes(srcPath)) {
|
|
48
|
-
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding RWS project typescript code to project tsconfig.json');
|
|
49
|
-
tsConfig['include'].unshift(srcPath);
|
|
50
|
-
changed = true;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (!Object.keys(tsConfig).includes('exclude')) {
|
|
54
|
-
tsConfig['exclude'] = [];
|
|
55
|
-
changed = true;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const excludeString = '**/*.debug.ts';
|
|
59
|
-
|
|
60
|
-
if (!tsConfig['exclude'].includes(excludeString)) {
|
|
61
|
-
tsConfig['exclude'].push(excludeString);
|
|
62
|
-
changed = true;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
let probablyLinked = false;
|
|
66
|
-
|
|
67
|
-
tsConfig['include'].forEach(element => {
|
|
68
|
-
if (element !== 'src' && element.indexOf('declarations.d.ts') > -1 && md5(fs.readFileSync(rwsPath.relativize(element, executionDir), 'utf-8')) === md5(fs.readFileSync(declarationsPath, 'utf-8'))) {
|
|
69
|
-
probablyLinked = true;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
if (!tsConfig['include'].includes(relativeDeclarationsPath) && !probablyLinked) {
|
|
74
|
-
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding RWS typescript declarations to project tsconfig.json');
|
|
75
|
-
tsConfig['include'].push(relativeDeclarationsPath);
|
|
76
|
-
includedMD5.push(md5(fs.readFileSync(declarationsPath, 'utf-8')));
|
|
77
|
-
changed = true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if(!tsConfig.compilerOptions){
|
|
81
|
-
throw new Error(`${tsConfigPath} needs "compilerOptions" section`)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (Object.keys(userAliases).length) {
|
|
85
|
-
const tsPaths = tsConfig.compilerOptions?.paths || {};
|
|
86
|
-
|
|
87
|
-
// console.log({tsPaths})
|
|
88
|
-
let changedPaths = false;
|
|
89
|
-
|
|
90
|
-
Object.keys(userAliases).forEach((alias) => {
|
|
91
|
-
const aliasPath = userAliases[alias];
|
|
92
|
-
if(!tsPaths[alias]){
|
|
93
|
-
|
|
94
|
-
tsPaths[alias] = [path.relative(executionDir, aliasPath)];
|
|
95
|
-
|
|
96
|
-
console.log({alias, x: tsPaths[alias]});
|
|
97
|
-
|
|
98
|
-
changedPaths = true;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
if(changedPaths){
|
|
103
|
-
console.log('tspaths', tsPaths);
|
|
104
|
-
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding user aliases as paths to project tsconfig.json');
|
|
105
|
-
|
|
106
|
-
tsConfig.compilerOptions.paths = tsPaths;
|
|
107
|
-
changed = true;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (changed) {
|
|
113
|
-
fs.writeFileSync(tsConfigPath, JSON.stringify(tsConfig, null, 2));
|
|
114
|
-
console.log(chalk.yellowBright('Typescript config file'), `"${chalk.blueBright(tsConfigPath)}"`, chalk.yellowBright('has been changed'));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return true;
|
|
118
|
-
} catch (e) {
|
|
119
|
-
const tsConfigFileContent = fs.readFileSync(tsConfigPath, 'utf-8');
|
|
120
|
-
try {
|
|
121
|
-
console.log(chalk.blueBright('TSConfig (parsed)'), JSON.parse(tsConfigFileContent));
|
|
122
|
-
} catch (e) {
|
|
123
|
-
console.log(chalk.yellow('TSConfig (unparsed)'), tsConfigFileContent);
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
console.log(chalk.redBright('Error in tsconfig.json:'));
|
|
127
|
-
console.error(chalk.red(e.stack));
|
|
128
|
-
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function getPartedModeVendorsBannerParams(partedDirUrlPrefix, partedPrefix) {
|
|
134
|
-
return {
|
|
135
|
-
banner: `if(!window.RWS_PARTS_LOADED){
|
|
136
|
-
const script = document.createElement('script');
|
|
137
|
-
script.src = '${partedDirUrlPrefix}/${partedPrefix}.vendors.js';
|
|
138
|
-
script.type = 'text/javascript';
|
|
139
|
-
document.body.appendChild(script);
|
|
140
|
-
window.RWS_PARTS_LOADED = true;
|
|
141
|
-
console.log('[RWS INIT SCRIPT]', 'vendors injected...');
|
|
142
|
-
}`.replace('\n', ''),
|
|
143
|
-
raw: true,
|
|
144
|
-
entryOnly: true,
|
|
145
|
-
include: `${partedPrefix}.client.js`
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
module.exports = {
|
|
150
|
-
setupTsConfig
|
|
1
|
+
const md5 = require('md5');
|
|
2
|
+
const chalk = require('chalk');
|
|
3
|
+
const tools = require('../_tools');
|
|
4
|
+
const { rwsPath } = require('@rws-framework/console');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
function setupTsConfig(tsConfigPath, executionDir, userAliases = {}) {
|
|
9
|
+
|
|
10
|
+
if (!fs.existsSync(tsConfigPath)) {
|
|
11
|
+
throw new Error(`Typescript config file "${tsConfigPath}" does not exist`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const tsConfigContents = fs.readFileSync(tsConfigPath, 'utf-8');
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
let tsConfig = JSON.parse(tsConfigContents);
|
|
18
|
+
|
|
19
|
+
const declarationsPath = path.resolve(__dirname, '..', 'types') + '/declarations.d.ts';
|
|
20
|
+
const foundationPath = path.resolve(__dirname, '..', 'foundation');
|
|
21
|
+
const testsPath = path.resolve(__dirname, '..', 'tests');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const relativeDeclarationsPath = path.relative(path.dirname(tsConfigPath), declarationsPath);
|
|
25
|
+
const relativeTestsPath = path.relative(path.dirname(tsConfigPath), testsPath);
|
|
26
|
+
const relativeFoundationPath = path.relative(path.dirname(tsConfigPath), foundationPath);
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const includedMD5 = [];
|
|
30
|
+
const srcPath = 'src/index.ts';
|
|
31
|
+
|
|
32
|
+
let changed = false;
|
|
33
|
+
|
|
34
|
+
if (!Object.keys(tsConfig).includes('include')) {
|
|
35
|
+
tsConfig['include'] = [];
|
|
36
|
+
} else {
|
|
37
|
+
tsConfig['include'] = tsConfig['include'].filter((inc) => {
|
|
38
|
+
if (inc === srcPath) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return fs.existsSync(rwsPath.relativize(inc, executionDir));
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
if (!tsConfig['include'].includes(srcPath)) {
|
|
48
|
+
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding RWS project typescript code to project tsconfig.json');
|
|
49
|
+
tsConfig['include'].unshift(srcPath);
|
|
50
|
+
changed = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!Object.keys(tsConfig).includes('exclude')) {
|
|
54
|
+
tsConfig['exclude'] = [];
|
|
55
|
+
changed = true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const excludeString = '**/*.debug.ts';
|
|
59
|
+
|
|
60
|
+
if (!tsConfig['exclude'].includes(excludeString)) {
|
|
61
|
+
tsConfig['exclude'].push(excludeString);
|
|
62
|
+
changed = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let probablyLinked = false;
|
|
66
|
+
|
|
67
|
+
tsConfig['include'].forEach(element => {
|
|
68
|
+
if (element !== 'src' && element.indexOf('declarations.d.ts') > -1 && md5(fs.readFileSync(rwsPath.relativize(element, executionDir), 'utf-8')) === md5(fs.readFileSync(declarationsPath, 'utf-8'))) {
|
|
69
|
+
probablyLinked = true;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
if (!tsConfig['include'].includes(relativeDeclarationsPath) && !probablyLinked) {
|
|
74
|
+
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding RWS typescript declarations to project tsconfig.json');
|
|
75
|
+
tsConfig['include'].push(relativeDeclarationsPath);
|
|
76
|
+
includedMD5.push(md5(fs.readFileSync(declarationsPath, 'utf-8')));
|
|
77
|
+
changed = true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if(!tsConfig.compilerOptions){
|
|
81
|
+
throw new Error(`${tsConfigPath} needs "compilerOptions" section`)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (Object.keys(userAliases).length) {
|
|
85
|
+
const tsPaths = tsConfig.compilerOptions?.paths || {};
|
|
86
|
+
|
|
87
|
+
// console.log({tsPaths})
|
|
88
|
+
let changedPaths = false;
|
|
89
|
+
|
|
90
|
+
Object.keys(userAliases).forEach((alias) => {
|
|
91
|
+
const aliasPath = userAliases[alias];
|
|
92
|
+
if(!tsPaths[alias]){
|
|
93
|
+
|
|
94
|
+
tsPaths[alias] = [path.relative(executionDir, aliasPath)];
|
|
95
|
+
|
|
96
|
+
console.log({alias, x: tsPaths[alias]});
|
|
97
|
+
|
|
98
|
+
changedPaths = true;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
if(changedPaths){
|
|
103
|
+
console.log('tspaths', tsPaths);
|
|
104
|
+
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding user aliases as paths to project tsconfig.json');
|
|
105
|
+
|
|
106
|
+
tsConfig.compilerOptions.paths = tsPaths;
|
|
107
|
+
changed = true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
if (changed) {
|
|
113
|
+
fs.writeFileSync(tsConfigPath, JSON.stringify(tsConfig, null, 2));
|
|
114
|
+
console.log(chalk.yellowBright('Typescript config file'), `"${chalk.blueBright(tsConfigPath)}"`, chalk.yellowBright('has been changed'));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return true;
|
|
118
|
+
} catch (e) {
|
|
119
|
+
const tsConfigFileContent = fs.readFileSync(tsConfigPath, 'utf-8');
|
|
120
|
+
try {
|
|
121
|
+
console.log(chalk.blueBright('TSConfig (parsed)'), JSON.parse(tsConfigFileContent));
|
|
122
|
+
} catch (e) {
|
|
123
|
+
console.log(chalk.yellow('TSConfig (unparsed)'), tsConfigFileContent);
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
console.log(chalk.redBright('Error in tsconfig.json:'));
|
|
127
|
+
console.error(chalk.red(e.stack));
|
|
128
|
+
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function getPartedModeVendorsBannerParams(partedDirUrlPrefix, partedPrefix) {
|
|
134
|
+
return {
|
|
135
|
+
banner: `if(!window.RWS_PARTS_LOADED){
|
|
136
|
+
const script = document.createElement('script');
|
|
137
|
+
script.src = '${partedDirUrlPrefix}/${partedPrefix}.vendors.js';
|
|
138
|
+
script.type = 'text/javascript';
|
|
139
|
+
document.body.appendChild(script);
|
|
140
|
+
window.RWS_PARTS_LOADED = true;
|
|
141
|
+
console.log('[RWS INIT SCRIPT]', 'vendors injected...');
|
|
142
|
+
}`.replace('\n', ''),
|
|
143
|
+
raw: true,
|
|
144
|
+
entryOnly: true,
|
|
145
|
+
include: `${partedPrefix}.client.js`
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
module.exports = {
|
|
150
|
+
setupTsConfig
|
|
151
151
|
}
|
package/console.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const chalk = require('chalk');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const tools = require('./_tools');
|
|
7
|
-
|
|
8
|
-
const moduleDir = path.resolve(__dirname);
|
|
9
|
-
const executionDir = path.resolve(process.cwd());
|
|
10
|
-
const workspaceRoot = tools.findRootWorkspacePath(executionDir);
|
|
11
|
-
|
|
12
|
-
const command2map = process.argv[2];
|
|
13
|
-
const firstArg = process.argv[3] || '';
|
|
14
|
-
|
|
15
|
-
const extraArgsAggregated = [];
|
|
16
|
-
|
|
17
|
-
if(process.argv.length > 4){
|
|
18
|
-
for(let i = 4; i <= process.argv.length-1;i++){
|
|
19
|
-
extraArgsAggregated.push(process.argv[i]);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const CMD_LIST = [
|
|
24
|
-
'init',
|
|
25
|
-
'build:sw'
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
async function main() {
|
|
29
|
-
if(!CMD_LIST.includes(command2map) || command2map === 'help'){
|
|
30
|
-
const helpTxt = `RWS Client CLI. \n\n Main features: \n - framerwork init \n - tests \n\n`;
|
|
31
|
-
const cmdList = `Command list: \n ${CMD_LIST.map((el) => `"rws-client ${el}"`).join('\n')}`;
|
|
32
|
-
const currentColor = command2map === 'help' ? chalk.yellow : chalk.red
|
|
33
|
-
|
|
34
|
-
if(command2map === 'help'){
|
|
35
|
-
console.log(currentColor(helpTxt));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
console.log(currentColor(cmdList))
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
switch(command2map){
|
|
43
|
-
case 'init': await initCmd(); break;
|
|
44
|
-
case 'build:sw': await buildSwCmd(); break;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async function initCmd(){
|
|
51
|
-
let workspaced = false;
|
|
52
|
-
if(workspaceRoot !== executionDir){
|
|
53
|
-
workspaced = true;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if(workspaced){
|
|
57
|
-
if(!fs.existsSync(`${executionDir}/.eslintrc.json`)){
|
|
58
|
-
const rcjs = fs.readFileSync(`${moduleDir}/.setup/.eslintrc.json`, 'utf-8');
|
|
59
|
-
fs.writeFile(`${executionDir}/.eslintrc.json`, rcjs.replace('{{frontend_dir}}', executionDir));
|
|
60
|
-
console.log(chalk.green('RWS CLI'), 'Installed eslint base workspace config file.');
|
|
61
|
-
}
|
|
62
|
-
}else{
|
|
63
|
-
if(!fs.existsSync(`${executionDir}/.eslintrc.json`)){
|
|
64
|
-
fs.copyFile(`${moduleDir}/.eslintrc.json`, `${executionDir}/.eslintrc.json`);
|
|
65
|
-
console.log(chalk.green('[RWS Client]'), 'Installed eslint config file.');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if(!fs.existsSync(`${executionDir}/tsconfig.json`)){
|
|
70
|
-
fs.copyFile(`${moduleDir}/.setup/tsconfig.json`, `${executionDir}/tsconfig.json`);
|
|
71
|
-
console.log(chalk.green('[RWS Client]'), 'Installed tsconfig.');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function buildSwCmd(){
|
|
76
|
-
const webpackCmd = `yarn webpack`;
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
console.log(chalk.yellow('[RWS Client]'), 'Installing service worker...');
|
|
80
|
-
await tools.runCommand(`${webpackCmd} --config ${path.resolve(moduleDir, 'service_worker')}/webpack.config.js`, executionDir, false, { env: { SWPATH: firstArg } });
|
|
81
|
-
console.log(chalk.green('[RWS Client]'), 'Service worker installed.');
|
|
82
|
-
}catch(e){
|
|
83
|
-
console.error('runerror',e);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const tools = require('./_tools');
|
|
7
|
+
|
|
8
|
+
const moduleDir = path.resolve(__dirname);
|
|
9
|
+
const executionDir = path.resolve(process.cwd());
|
|
10
|
+
const workspaceRoot = tools.findRootWorkspacePath(executionDir);
|
|
11
|
+
|
|
12
|
+
const command2map = process.argv[2];
|
|
13
|
+
const firstArg = process.argv[3] || '';
|
|
14
|
+
|
|
15
|
+
const extraArgsAggregated = [];
|
|
16
|
+
|
|
17
|
+
if(process.argv.length > 4){
|
|
18
|
+
for(let i = 4; i <= process.argv.length-1;i++){
|
|
19
|
+
extraArgsAggregated.push(process.argv[i]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const CMD_LIST = [
|
|
24
|
+
'init',
|
|
25
|
+
'build:sw'
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
async function main() {
|
|
29
|
+
if(!CMD_LIST.includes(command2map) || command2map === 'help'){
|
|
30
|
+
const helpTxt = `RWS Client CLI. \n\n Main features: \n - framerwork init \n - tests \n\n`;
|
|
31
|
+
const cmdList = `Command list: \n ${CMD_LIST.map((el) => `"rws-client ${el}"`).join('\n')}`;
|
|
32
|
+
const currentColor = command2map === 'help' ? chalk.yellow : chalk.red
|
|
33
|
+
|
|
34
|
+
if(command2map === 'help'){
|
|
35
|
+
console.log(currentColor(helpTxt));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.log(currentColor(cmdList))
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
switch(command2map){
|
|
43
|
+
case 'init': await initCmd(); break;
|
|
44
|
+
case 'build:sw': await buildSwCmd(); break;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function initCmd(){
|
|
51
|
+
let workspaced = false;
|
|
52
|
+
if(workspaceRoot !== executionDir){
|
|
53
|
+
workspaced = true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if(workspaced){
|
|
57
|
+
if(!fs.existsSync(`${executionDir}/.eslintrc.json`)){
|
|
58
|
+
const rcjs = fs.readFileSync(`${moduleDir}/.setup/.eslintrc.json`, 'utf-8');
|
|
59
|
+
fs.writeFile(`${executionDir}/.eslintrc.json`, rcjs.replace('{{frontend_dir}}', executionDir));
|
|
60
|
+
console.log(chalk.green('RWS CLI'), 'Installed eslint base workspace config file.');
|
|
61
|
+
}
|
|
62
|
+
}else{
|
|
63
|
+
if(!fs.existsSync(`${executionDir}/.eslintrc.json`)){
|
|
64
|
+
fs.copyFile(`${moduleDir}/.eslintrc.json`, `${executionDir}/.eslintrc.json`);
|
|
65
|
+
console.log(chalk.green('[RWS Client]'), 'Installed eslint config file.');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if(!fs.existsSync(`${executionDir}/tsconfig.json`)){
|
|
70
|
+
fs.copyFile(`${moduleDir}/.setup/tsconfig.json`, `${executionDir}/tsconfig.json`);
|
|
71
|
+
console.log(chalk.green('[RWS Client]'), 'Installed tsconfig.');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function buildSwCmd(){
|
|
76
|
+
const webpackCmd = `yarn webpack`;
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
console.log(chalk.yellow('[RWS Client]'), 'Installing service worker...');
|
|
80
|
+
await tools.runCommand(`${webpackCmd} --config ${path.resolve(moduleDir, 'service_worker')}/webpack.config.js`, executionDir, false, { env: { SWPATH: firstArg } });
|
|
81
|
+
console.log(chalk.green('[RWS Client]'), 'Service worker installed.');
|
|
82
|
+
}catch(e){
|
|
83
|
+
console.error('runerror',e);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
87
|
main().then((result) => {});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg fill="none" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<title>TypeScript logo</title>
|
|
4
|
-
<rect width="512" height="512" rx="50" fill="#3178c6"/>
|
|
5
|
-
<path d="m317 407v50c8.1 4.2 18 7.3 29 9.4s23 3.1 35 3.1c12 0 23-1.1 34-3.4 11-2.3 20-6.1 28-11 8.1-5.3 15-12 19-21s7.1-19 7.1-32c0-9.1-1.4-17-4.1-24s-6.6-13-12-18c-5.1-5.3-11-10-18-14s-15-8.2-24-12c-6.6-2.7-12-5.3-18-7.9-5.2-2.6-9.7-5.2-13-7.8-3.7-2.7-6.5-5.5-8.5-8.4-2-3-3-6.3-3-10 0-3.4 0.89-6.5 2.7-9.3s4.3-5.1 7.5-7.1c3.2-2 7.2-3.5 12-4.6 4.7-1.1 9.9-1.6 16-1.6 4.2 0 8.6 0.31 13 0.94 4.6 0.63 9.3 1.6 14 2.9 4.7 1.3 9.3 2.9 14 4.9 4.4 2 8.5 4.3 12 6.9v-47c-7.6-2.9-16-5.1-25-6.5s-19-2.1-31-2.1c-12 0-23 1.3-34 3.8s-20 6.5-28 12c-8.1 5.4-14 12-19 21-4.7 8.4-7 18-7 30 0 15 4.3 28 13 38 8.6 11 22 19 39 27 6.9 2.8 13 5.6 19 8.3s11 5.5 15 8.4c4.3 2.9 7.7 6.1 10 9.5 2.5 3.4 3.8 7.4 3.8 12 0 3.2-0.78 6.2-2.3 9s-3.9 5.2-7.1 7.2-7.1 3.6-12 4.8c-4.7 1.1-10 1.7-17 1.7-11 0-22-1.9-32-5.7-11-3.8-21-9.5-30-17zm-84-123h64v-41h-179v41h64v183h51z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd" style="fill:#fff"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg fill="none" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>TypeScript logo</title>
|
|
4
|
+
<rect width="512" height="512" rx="50" fill="#3178c6"/>
|
|
5
|
+
<path d="m317 407v50c8.1 4.2 18 7.3 29 9.4s23 3.1 35 3.1c12 0 23-1.1 34-3.4 11-2.3 20-6.1 28-11 8.1-5.3 15-12 19-21s7.1-19 7.1-32c0-9.1-1.4-17-4.1-24s-6.6-13-12-18c-5.1-5.3-11-10-18-14s-15-8.2-24-12c-6.6-2.7-12-5.3-18-7.9-5.2-2.6-9.7-5.2-13-7.8-3.7-2.7-6.5-5.5-8.5-8.4-2-3-3-6.3-3-10 0-3.4 0.89-6.5 2.7-9.3s4.3-5.1 7.5-7.1c3.2-2 7.2-3.5 12-4.6 4.7-1.1 9.9-1.6 16-1.6 4.2 0 8.6 0.31 13 0.94 4.6 0.63 9.3 1.6 14 2.9 4.7 1.3 9.3 2.9 14 4.9 4.4 2 8.5 4.3 12 6.9v-47c-7.6-2.9-16-5.1-25-6.5s-19-2.1-31-2.1c-12 0-23 1.3-34 3.8s-20 6.5-28 12c-8.1 5.4-14 12-19 21-4.7 8.4-7 18-7 30 0 15 4.3 28 13 38 8.6 11 22 19 39 27 6.9 2.8 13 5.6 19 8.3s11 5.5 15 8.4c4.3 2.9 7.7 6.1 10 9.5 2.5 3.4 3.8 7.4 3.8 12 0 3.2-0.78 6.2-2.3 9s-3.9 5.2-7.1 7.2-7.1 3.6-12 4.8c-4.7 1.1-10 1.7-17 1.7-11 0-22-1.9-32-5.7-11-3.8-21-9.5-30-17zm-84-123h64v-41h-179v41h64v183h51z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd" style="fill:#fff"/>
|
|
6
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
-
<svg viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<g id="#007bffff">
|
|
4
|
-
<path fill="#007bff" opacity="1.00"
|
|
5
|
-
d=" M 9.84 70.86 C 18.37 59.93 32.07 53.35 45.93 53.48 C 99.29 53.43 152.64 53.50 206.00 53.45 C 209.00 53.53 212.11 53.12 215.03 53.98 C 218.18 55.70 220.05 58.98 222.42 61.57 C 234.68 76.00 246.64 90.69 259.08 104.97 C 328.06 105.05 397.05 104.97 466.04 105.01 C 475.98 104.92 485.90 108.15 493.81 114.18 C 504.16 121.79 510.49 133.96 512.00 146.61 L 512.00 403.41 C 510.94 415.48 505.32 427.15 496.01 435.00 C 489.04 441.00 480.20 444.79 471.05 445.68 C 466.04 446.17 461.01 445.97 456.00 446.00 C 323.00 446.00 190.00 446.00 57.00 446.00 C 50.54 445.94 44.03 446.33 37.64 445.23 C 24.25 442.94 12.17 434.24 5.68 422.33 C 2.40 416.54 0.74 410.00 0.00 403.44 L 0.00 95.59 C 1.03 86.67 4.14 77.89 9.84 70.86 Z"/>
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<svg viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<g id="#007bffff">
|
|
4
|
+
<path fill="#007bff" opacity="1.00"
|
|
5
|
+
d=" M 9.84 70.86 C 18.37 59.93 32.07 53.35 45.93 53.48 C 99.29 53.43 152.64 53.50 206.00 53.45 C 209.00 53.53 212.11 53.12 215.03 53.98 C 218.18 55.70 220.05 58.98 222.42 61.57 C 234.68 76.00 246.64 90.69 259.08 104.97 C 328.06 105.05 397.05 104.97 466.04 105.01 C 475.98 104.92 485.90 108.15 493.81 114.18 C 504.16 121.79 510.49 133.96 512.00 146.61 L 512.00 403.41 C 510.94 415.48 505.32 427.15 496.01 435.00 C 489.04 441.00 480.20 444.79 471.05 445.68 C 466.04 446.17 461.01 445.97 456.00 446.00 C 323.00 446.00 190.00 446.00 57.00 446.00 C 50.54 445.94 44.03 446.33 37.64 445.23 C 24.25 442.94 12.17 434.24 5.68 422.33 C 2.40 416.54 0.74 410.00 0.00 403.44 L 0.00 95.59 C 1.03 86.67 4.14 77.89 9.84 70.86 Z"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
-
<svg viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<g id="#007bffff">
|
|
4
|
-
<path fill="#007bff" opacity="1.00"
|
|
5
|
-
d=" M 0.00 80.69 C 0.22 64.54 15.05 50.95 30.99 51.04 C 71.66 50.97 112.33 51.00 153.00 51.02 C 163.06 50.98 173.05 55.84 178.96 64.04 C 190.23 79.65 201.34 95.39 212.61 111.00 C 275.09 111.02 337.57 110.96 400.05 111.03 C 415.75 110.89 430.55 124.04 431.08 139.96 C 431.29 154.12 431.11 168.29 431.16 182.46 C 324.50 182.48 217.83 182.44 111.17 182.48 C 95.16 182.41 79.32 191.83 72.51 206.44 C 48.34 257.13 24.13 307.80 0.00 358.51 L 0.00 80.69 Z"/>
|
|
6
|
-
<path fill="#007bff" opacity="1.00"
|
|
7
|
-
d=" M 91.02 234.95 C 97.86 220.76 113.28 211.54 128.94 211.48 C 241.97 211.45 355.00 211.49 468.03 211.46 C 474.47 211.32 480.96 212.47 486.89 215.04 C 501.07 220.92 511.34 235.20 512.00 250.60 L 512.00 254.16 C 511.61 259.88 510.10 265.50 507.48 270.60 C 482.86 319.94 458.24 369.28 433.63 418.62 C 431.10 423.61 428.85 428.84 425.20 433.15 C 417.67 442.38 405.95 447.99 394.03 447.99 C 274.35 448.02 154.68 447.98 35.01 448.01 C 19.82 449.24 4.46 438.96 0.84 423.98 C 30.92 360.98 60.93 297.95 91.02 234.95 Z"/>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<svg viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<g id="#007bffff">
|
|
4
|
+
<path fill="#007bff" opacity="1.00"
|
|
5
|
+
d=" M 0.00 80.69 C 0.22 64.54 15.05 50.95 30.99 51.04 C 71.66 50.97 112.33 51.00 153.00 51.02 C 163.06 50.98 173.05 55.84 178.96 64.04 C 190.23 79.65 201.34 95.39 212.61 111.00 C 275.09 111.02 337.57 110.96 400.05 111.03 C 415.75 110.89 430.55 124.04 431.08 139.96 C 431.29 154.12 431.11 168.29 431.16 182.46 C 324.50 182.48 217.83 182.44 111.17 182.48 C 95.16 182.41 79.32 191.83 72.51 206.44 C 48.34 257.13 24.13 307.80 0.00 358.51 L 0.00 80.69 Z"/>
|
|
6
|
+
<path fill="#007bff" opacity="1.00"
|
|
7
|
+
d=" M 91.02 234.95 C 97.86 220.76 113.28 211.54 128.94 211.48 C 241.97 211.45 355.00 211.49 468.03 211.46 C 474.47 211.32 480.96 212.47 486.89 215.04 C 501.07 220.92 511.34 235.20 512.00 250.60 L 512.00 254.16 C 511.61 259.88 510.10 265.50 507.48 270.60 C 482.86 319.94 458.24 369.28 433.63 418.62 C 431.10 423.61 428.85 428.84 425.20 433.15 C 417.67 442.38 405.95 447.99 394.03 447.99 C 274.35 448.02 154.68 447.98 35.01 448.01 C 19.82 449.24 4.46 438.96 0.84 423.98 C 30.92 360.98 60.93 297.95 91.02 234.95 Z"/>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|