vpn-split 21.0.13 → 21.0.16
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/browser/package.json +1 -1
- package/browser-prod/fesm2022/vpn-split-browser.mjs +19 -20
- package/browser-prod/fesm2022/vpn-split-browser.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod.re-export.json +1 -0
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib/vpn-split.backend.js +3 -2
- package/lib/vpn-split.backend.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.ts +27 -0
- package/lib-prod/env/env.angular-node-app.ts +66 -0
- package/lib-prod/env/env.docs-webapp.ts +66 -0
- package/lib-prod/env/env.electron-app.ts +66 -0
- package/lib-prod/env/env.mobile-app.ts +66 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.ts +66 -0
- package/lib-prod/env/env.vscode-plugin.ts +66 -0
- package/lib-prod/hostile.backend.ts +123 -0
- package/lib-prod/{index._auto-generated_.js → index._auto-generated_.ts} +0 -1
- package/lib-prod/{index.d.ts → index.ts} +3 -0
- package/lib-prod/lib-info.md +8 -0
- package/lib-prod/migrations/index.ts +2 -0
- package/lib-prod/migrations/migrations-info.md +6 -0
- package/lib-prod/migrations/{migrations_index._auto-generated_.js → migrations_index._auto-generated_.ts} +2 -1
- package/lib-prod/models.ts +250 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/{start.backend.js → start.backend.ts} +6 -2
- package/lib-prod/vpn-split.backend.ts +1039 -0
- package/lib-prod.re-export.json +1 -0
- package/package.json +2 -1
- package/websql/package.json +1 -1
- package/websql-prod/fesm2022/vpn-split-websql.mjs +19 -20
- package/websql-prod/fesm2022/vpn-split-websql.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod.re-export.json +1 -0
- package/lib-prod/build-info._auto-generated_.d.ts +0 -24
- package/lib-prod/build-info._auto-generated_.js +0 -30
- package/lib-prod/build-info._auto-generated_.js.map +0 -1
- package/lib-prod/env/env.angular-node-app.d.ts +0 -64
- package/lib-prod/env/env.angular-node-app.js +0 -71
- package/lib-prod/env/env.angular-node-app.js.map +0 -1
- package/lib-prod/env/env.docs-webapp.d.ts +0 -64
- package/lib-prod/env/env.docs-webapp.js +0 -71
- package/lib-prod/env/env.docs-webapp.js.map +0 -1
- package/lib-prod/env/env.electron-app.d.ts +0 -64
- package/lib-prod/env/env.electron-app.js +0 -71
- package/lib-prod/env/env.electron-app.js.map +0 -1
- package/lib-prod/env/env.mobile-app.d.ts +0 -64
- package/lib-prod/env/env.mobile-app.js +0 -71
- package/lib-prod/env/env.mobile-app.js.map +0 -1
- package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +0 -64
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +0 -71
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +0 -1
- package/lib-prod/env/env.vscode-plugin.d.ts +0 -64
- package/lib-prod/env/env.vscode-plugin.js +0 -71
- package/lib-prod/env/env.vscode-plugin.js.map +0 -1
- package/lib-prod/env/index.js +0 -23
- package/lib-prod/env/index.js.map +0 -1
- package/lib-prod/hostile.backend.d.ts +0 -37
- package/lib-prod/hostile.backend.js +0 -122
- package/lib-prod/hostile.backend.js.map +0 -1
- package/lib-prod/index._auto-generated_.d.ts +0 -0
- package/lib-prod/index._auto-generated_.js.map +0 -1
- package/lib-prod/index.js +0 -21
- package/lib-prod/index.js.map +0 -1
- package/lib-prod/migrations/index.d.ts +0 -1
- package/lib-prod/migrations/index.js +0 -19
- package/lib-prod/migrations/index.js.map +0 -1
- package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js.map +0 -1
- package/lib-prod/models.d.ts +0 -61
- package/lib-prod/models.js +0 -182
- package/lib-prod/models.js.map +0 -1
- package/lib-prod/start.backend.d.ts +0 -0
- package/lib-prod/start.backend.js.map +0 -1
- package/lib-prod/vpn-split.backend.d.ts +0 -56
- package/lib-prod/vpn-split.backend.js +0 -742
- package/lib-prod/vpn-split.backend.js.map +0 -1
- /package/lib-prod/env/{index.d.ts → index.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
|
+
export const ENV_MOBILE_APP_WEBSITE_DOMAIN = 'vpn-split.example.domain.com';
|
|
3
|
+
export const ENV_MOBILE_APP_WEBSITE_TITLE = 'Vpn Split';
|
|
4
|
+
export const ENV_MOBILE_APP_RELEASE_TARGET_ARTIFACT = 'mobile-app';
|
|
5
|
+
export const ENV_MOBILE_APP_RELEASE_ENV_NAME = '__';
|
|
6
|
+
export const ENV_MOBILE_APP_CONTAINER_ONLY = undefined;
|
|
7
|
+
export const ENV_MOBILE_APP_CONTAINER_END = undefined;
|
|
8
|
+
export const ENV_MOBILE_APP_CONTAINER_START = undefined;
|
|
9
|
+
export const ENV_MOBILE_APP_CONTAINER_SKIP_RELEASED = undefined;
|
|
10
|
+
export const ENV_MOBILE_APP_CONTAINER_SKIP = undefined;
|
|
11
|
+
export const ENV_MOBILE_APP_INIT_BRANDING = undefined;
|
|
12
|
+
export const ENV_MOBILE_APP_INIT_STRUCT = undefined;
|
|
13
|
+
export const ENV_MOBILE_APP_BUILD_PWA_DISABLE_SERVICE_WORKER = undefined;
|
|
14
|
+
export const ENV_MOBILE_APP_BUILD_PWA_NAME = undefined;
|
|
15
|
+
export const ENV_MOBILE_APP_BUILD_PWA_SHORT_NAME = undefined;
|
|
16
|
+
export const ENV_MOBILE_APP_BUILD_PWA_START_URL = undefined;
|
|
17
|
+
export const ENV_MOBILE_APP_BUILD_ELECTRON_SHOW_DEV_TOOLS = undefined;
|
|
18
|
+
export const ENV_MOBILE_APP_BUILD_SSR = undefined;
|
|
19
|
+
export const ENV_MOBILE_APP_BUILD_WEBSQL = undefined;
|
|
20
|
+
export const ENV_MOBILE_APP_BUILD_PROD = undefined;
|
|
21
|
+
export const ENV_MOBILE_APP_BUILD_OVERRIDE_OUTPUT_PATH = undefined;
|
|
22
|
+
export const ENV_MOBILE_APP_BUILD_BASE_HREF = undefined;
|
|
23
|
+
export const ENV_MOBILE_APP_BUILD_WATCH = undefined;
|
|
24
|
+
export const ENV_MOBILE_APP_BUILD_GEN_ONLY_CLIENT_CODE = undefined;
|
|
25
|
+
export const ENV_MOBILE_APP_LOADING_PRE_ANGULAR_BOOTSTRAP_LOADER = undefined;
|
|
26
|
+
export const ENV_MOBILE_APP_LOADING_PRE_ANGULAR_BOOTSTRAP_BACKGROUND = undefined;
|
|
27
|
+
export const ENV_MOBILE_APP_RELEASE_CLI_MINIFY = undefined;
|
|
28
|
+
export const ENV_MOBILE_APP_RELEASE_CLI_INCLUDE_NODE_MODULES = undefined;
|
|
29
|
+
export const ENV_MOBILE_APP_RELEASE_CLI_UGLIFY = undefined;
|
|
30
|
+
export const ENV_MOBILE_APP_RELEASE_CLI_OBSCURE = undefined;
|
|
31
|
+
export const ENV_MOBILE_APP_RELEASE_CLI_COMPRESS = undefined;
|
|
32
|
+
export const ENV_MOBILE_APP_RELEASE_NODE_BACKEND_APP_MINIFY = undefined;
|
|
33
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_REMOVE_DTS = undefined;
|
|
34
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_OBSCURE_FILE_BY_FILE = undefined;
|
|
35
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_UGLIFY_FILE_BY_FILE = undefined;
|
|
36
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_INCLUDE_SOURCE_MAPS = undefined;
|
|
37
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_COMPRESS = undefined;
|
|
38
|
+
export const ENV_MOBILE_APP_RELEASE_LIB_DO_NOT_INCLUDE_LIB_FILES = undefined;
|
|
39
|
+
export const ENV_MOBILE_APP_RELEASE_RESOLVED_NEW_VERSION = undefined;
|
|
40
|
+
export const ENV_MOBILE_APP_RELEASE_RELEASE_VERSION_BUMP_TYPE = undefined;
|
|
41
|
+
export const ENV_MOBILE_APP_RELEASE_ENV_NUMBER = undefined;
|
|
42
|
+
export const ENV_MOBILE_APP_RELEASE_INSTALL_LOCALLY = undefined;
|
|
43
|
+
export const ENV_MOBILE_APP_RELEASE_REMOVE_RELEASE_OUTPUT_AFTER_LOCAL_INSTALL = undefined;
|
|
44
|
+
export const ENV_MOBILE_APP_RELEASE_RELEASE_TYPE = undefined;
|
|
45
|
+
export const ENV_MOBILE_APP_RELEASE_AUTO_RELEASE_USING_CONFIG = undefined;
|
|
46
|
+
export const ENV_MOBILE_APP_RELEASE_AUTO_RELEASE_TASK_NAME = undefined;
|
|
47
|
+
export const ENV_MOBILE_APP_RELEASE_TAON_INSTANCE_IP = undefined;
|
|
48
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_NPM_PUBLISH = undefined;
|
|
49
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_DEPLOY = undefined;
|
|
50
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_TAG_GIT_PUSH = undefined;
|
|
51
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_RELEASE_QUESTION = undefined;
|
|
52
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_RESOLVING_GIT_CHANGES = undefined;
|
|
53
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_CODE_CUTTING = undefined;
|
|
54
|
+
export const ENV_MOBILE_APP_RELEASE_SKIP_BUILDING_ARTIFACTS = undefined;
|
|
55
|
+
export const ENV_MOBILE_APP_COPY_TO_MANAGER_BEFORE_COPY_HOOK = undefined;
|
|
56
|
+
export const ENV_MOBILE_APP_COPY_TO_MANAGER_COPY_TO_LOCATIONS = undefined;
|
|
57
|
+
export const ENV_MOBILE_APP_COPY_TO_MANAGER_COPY_TO_PROJECTS = undefined;
|
|
58
|
+
export const ENV_MOBILE_APP_COPY_TO_MANAGER_SKIP = undefined;
|
|
59
|
+
export const ENV_MOBILE_APP_WEBSITE_USE_DOMAIN = undefined;
|
|
60
|
+
export const ENV_MOBILE_APP_PURPOSE = undefined;
|
|
61
|
+
export const ENV_MOBILE_APP_RECURSIVE_ACTION = undefined;
|
|
62
|
+
export const ENV_MOBILE_APP_IS_CI_PROCESS = undefined;
|
|
63
|
+
export const ENV_MOBILE_APP_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
|
+
export const ENV_MOBILE_APP_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
|
+
export const ENV_MOBILE_APP_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_WEBSITE_DOMAIN = 'vpn-split.example.domain.com';
|
|
3
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_WEBSITE_TITLE = 'Vpn Split';
|
|
4
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_TARGET_ARTIFACT = 'npm-lib-and-cli-tool';
|
|
5
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_ENV_NAME = '__';
|
|
6
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_CONTAINER_ONLY = undefined;
|
|
7
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_CONTAINER_END = undefined;
|
|
8
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_CONTAINER_START = undefined;
|
|
9
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_CONTAINER_SKIP_RELEASED = undefined;
|
|
10
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_CONTAINER_SKIP = undefined;
|
|
11
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_INIT_BRANDING = undefined;
|
|
12
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_INIT_STRUCT = undefined;
|
|
13
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_PWA_DISABLE_SERVICE_WORKER = undefined;
|
|
14
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_PWA_NAME = undefined;
|
|
15
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_PWA_SHORT_NAME = undefined;
|
|
16
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_PWA_START_URL = undefined;
|
|
17
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_ELECTRON_SHOW_DEV_TOOLS = undefined;
|
|
18
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_SSR = undefined;
|
|
19
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_WEBSQL = undefined;
|
|
20
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_PROD = undefined;
|
|
21
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_OVERRIDE_OUTPUT_PATH = undefined;
|
|
22
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_BASE_HREF = undefined;
|
|
23
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_WATCH = undefined;
|
|
24
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_BUILD_GEN_ONLY_CLIENT_CODE = undefined;
|
|
25
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_LOADING_PRE_ANGULAR_BOOTSTRAP_LOADER = undefined;
|
|
26
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_LOADING_PRE_ANGULAR_BOOTSTRAP_BACKGROUND = undefined;
|
|
27
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_CLI_MINIFY = undefined;
|
|
28
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_CLI_INCLUDE_NODE_MODULES = undefined;
|
|
29
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_CLI_UGLIFY = undefined;
|
|
30
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_CLI_OBSCURE = undefined;
|
|
31
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_CLI_COMPRESS = undefined;
|
|
32
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_NODE_BACKEND_APP_MINIFY = undefined;
|
|
33
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_REMOVE_DTS = undefined;
|
|
34
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_OBSCURE_FILE_BY_FILE = undefined;
|
|
35
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_UGLIFY_FILE_BY_FILE = undefined;
|
|
36
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_INCLUDE_SOURCE_MAPS = undefined;
|
|
37
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_COMPRESS = undefined;
|
|
38
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_LIB_DO_NOT_INCLUDE_LIB_FILES = undefined;
|
|
39
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_RESOLVED_NEW_VERSION = undefined;
|
|
40
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_RELEASE_VERSION_BUMP_TYPE = undefined;
|
|
41
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_ENV_NUMBER = undefined;
|
|
42
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_INSTALL_LOCALLY = undefined;
|
|
43
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_REMOVE_RELEASE_OUTPUT_AFTER_LOCAL_INSTALL = undefined;
|
|
44
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_RELEASE_TYPE = undefined;
|
|
45
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_AUTO_RELEASE_USING_CONFIG = undefined;
|
|
46
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_AUTO_RELEASE_TASK_NAME = undefined;
|
|
47
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_TAON_INSTANCE_IP = undefined;
|
|
48
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_NPM_PUBLISH = undefined;
|
|
49
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_DEPLOY = undefined;
|
|
50
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_TAG_GIT_PUSH = undefined;
|
|
51
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_RELEASE_QUESTION = undefined;
|
|
52
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_RESOLVING_GIT_CHANGES = undefined;
|
|
53
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_CODE_CUTTING = undefined;
|
|
54
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RELEASE_SKIP_BUILDING_ARTIFACTS = undefined;
|
|
55
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_COPY_TO_MANAGER_BEFORE_COPY_HOOK = undefined;
|
|
56
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_COPY_TO_MANAGER_COPY_TO_LOCATIONS = undefined;
|
|
57
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_COPY_TO_MANAGER_COPY_TO_PROJECTS = undefined;
|
|
58
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_COPY_TO_MANAGER_SKIP = undefined;
|
|
59
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_WEBSITE_USE_DOMAIN = undefined;
|
|
60
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_PURPOSE = undefined;
|
|
61
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_RECURSIVE_ACTION = undefined;
|
|
62
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_IS_CI_PROCESS = undefined;
|
|
63
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
|
+
export const ENV_NPM_LIB_AND_CLI_TOOL_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
|
+
export const ENV_VSCODE_PLUGIN_WEBSITE_DOMAIN = 'vpn-split.example.domain.com';
|
|
3
|
+
export const ENV_VSCODE_PLUGIN_WEBSITE_TITLE = 'Vpn Split';
|
|
4
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_TARGET_ARTIFACT = 'vscode-plugin';
|
|
5
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_ENV_NAME = '__';
|
|
6
|
+
export const ENV_VSCODE_PLUGIN_CONTAINER_ONLY = undefined;
|
|
7
|
+
export const ENV_VSCODE_PLUGIN_CONTAINER_END = undefined;
|
|
8
|
+
export const ENV_VSCODE_PLUGIN_CONTAINER_START = undefined;
|
|
9
|
+
export const ENV_VSCODE_PLUGIN_CONTAINER_SKIP_RELEASED = undefined;
|
|
10
|
+
export const ENV_VSCODE_PLUGIN_CONTAINER_SKIP = undefined;
|
|
11
|
+
export const ENV_VSCODE_PLUGIN_INIT_BRANDING = undefined;
|
|
12
|
+
export const ENV_VSCODE_PLUGIN_INIT_STRUCT = undefined;
|
|
13
|
+
export const ENV_VSCODE_PLUGIN_BUILD_PWA_DISABLE_SERVICE_WORKER = undefined;
|
|
14
|
+
export const ENV_VSCODE_PLUGIN_BUILD_PWA_NAME = undefined;
|
|
15
|
+
export const ENV_VSCODE_PLUGIN_BUILD_PWA_SHORT_NAME = undefined;
|
|
16
|
+
export const ENV_VSCODE_PLUGIN_BUILD_PWA_START_URL = undefined;
|
|
17
|
+
export const ENV_VSCODE_PLUGIN_BUILD_ELECTRON_SHOW_DEV_TOOLS = undefined;
|
|
18
|
+
export const ENV_VSCODE_PLUGIN_BUILD_SSR = undefined;
|
|
19
|
+
export const ENV_VSCODE_PLUGIN_BUILD_WEBSQL = undefined;
|
|
20
|
+
export const ENV_VSCODE_PLUGIN_BUILD_PROD = undefined;
|
|
21
|
+
export const ENV_VSCODE_PLUGIN_BUILD_OVERRIDE_OUTPUT_PATH = undefined;
|
|
22
|
+
export const ENV_VSCODE_PLUGIN_BUILD_BASE_HREF = undefined;
|
|
23
|
+
export const ENV_VSCODE_PLUGIN_BUILD_WATCH = undefined;
|
|
24
|
+
export const ENV_VSCODE_PLUGIN_BUILD_GEN_ONLY_CLIENT_CODE = undefined;
|
|
25
|
+
export const ENV_VSCODE_PLUGIN_LOADING_PRE_ANGULAR_BOOTSTRAP_LOADER = undefined;
|
|
26
|
+
export const ENV_VSCODE_PLUGIN_LOADING_PRE_ANGULAR_BOOTSTRAP_BACKGROUND = undefined;
|
|
27
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_MINIFY = undefined;
|
|
28
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_INCLUDE_NODE_MODULES = undefined;
|
|
29
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_UGLIFY = undefined;
|
|
30
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_OBSCURE = undefined;
|
|
31
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_COMPRESS = undefined;
|
|
32
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_NODE_BACKEND_APP_MINIFY = undefined;
|
|
33
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_REMOVE_DTS = undefined;
|
|
34
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_OBSCURE_FILE_BY_FILE = undefined;
|
|
35
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_UGLIFY_FILE_BY_FILE = undefined;
|
|
36
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_INCLUDE_SOURCE_MAPS = undefined;
|
|
37
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_COMPRESS = undefined;
|
|
38
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_DO_NOT_INCLUDE_LIB_FILES = undefined;
|
|
39
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_RESOLVED_NEW_VERSION = undefined;
|
|
40
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_RELEASE_VERSION_BUMP_TYPE = undefined;
|
|
41
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_ENV_NUMBER = undefined;
|
|
42
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_INSTALL_LOCALLY = undefined;
|
|
43
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_REMOVE_RELEASE_OUTPUT_AFTER_LOCAL_INSTALL = undefined;
|
|
44
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_RELEASE_TYPE = undefined;
|
|
45
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_AUTO_RELEASE_USING_CONFIG = undefined;
|
|
46
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_AUTO_RELEASE_TASK_NAME = undefined;
|
|
47
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_TAON_INSTANCE_IP = undefined;
|
|
48
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_NPM_PUBLISH = undefined;
|
|
49
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_DEPLOY = undefined;
|
|
50
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_TAG_GIT_PUSH = undefined;
|
|
51
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_RELEASE_QUESTION = undefined;
|
|
52
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_RESOLVING_GIT_CHANGES = undefined;
|
|
53
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_CODE_CUTTING = undefined;
|
|
54
|
+
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_BUILDING_ARTIFACTS = undefined;
|
|
55
|
+
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_BEFORE_COPY_HOOK = undefined;
|
|
56
|
+
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_COPY_TO_LOCATIONS = undefined;
|
|
57
|
+
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_COPY_TO_PROJECTS = undefined;
|
|
58
|
+
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_SKIP = undefined;
|
|
59
|
+
export const ENV_VSCODE_PLUGIN_WEBSITE_USE_DOMAIN = undefined;
|
|
60
|
+
export const ENV_VSCODE_PLUGIN_PURPOSE = undefined;
|
|
61
|
+
export const ENV_VSCODE_PLUGIN_RECURSIVE_ACTION = undefined;
|
|
62
|
+
export const ENV_VSCODE_PLUGIN_IS_CI_PROCESS = undefined;
|
|
63
|
+
export const ENV_VSCODE_PLUGIN_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
|
+
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
|
+
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
//#region imports
|
|
2
|
+
import * as hostile from 'hostile';
|
|
3
|
+
import { chalk, net } from 'tnp-core/lib-prod';
|
|
4
|
+
//#endregion
|
|
5
|
+
|
|
6
|
+
export class Hostile {
|
|
7
|
+
/**
|
|
8
|
+
* Display all current ip records
|
|
9
|
+
*/
|
|
10
|
+
list() {
|
|
11
|
+
var lines;
|
|
12
|
+
try {
|
|
13
|
+
lines = hostile.get(false);
|
|
14
|
+
} catch (err) {
|
|
15
|
+
return this.error(err);
|
|
16
|
+
}
|
|
17
|
+
lines.forEach(item => {
|
|
18
|
+
if (item.length > 1) {
|
|
19
|
+
console.log(item[0], chalk.green(item[1]));
|
|
20
|
+
} else {
|
|
21
|
+
console.log(item);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Set a new host
|
|
28
|
+
* @param {string} ip
|
|
29
|
+
* @param {string} host
|
|
30
|
+
*/
|
|
31
|
+
set(ip, host) {
|
|
32
|
+
if (!ip || !host) {
|
|
33
|
+
return this.error('Invalid syntax: hostile set <ip> <host>');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (ip === 'local' || ip === 'localhost') {
|
|
37
|
+
ip = '127.0.0.1';
|
|
38
|
+
} else if (!net.isIP(ip)) {
|
|
39
|
+
return this.error('Invalid IP address');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
hostile.set(ip, host);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
return this.error('Error: ' + err.message + '. Are you running as root?');
|
|
46
|
+
}
|
|
47
|
+
console.log(chalk.green('Added ' + host));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Remove a host
|
|
52
|
+
* @param {string} host
|
|
53
|
+
*/
|
|
54
|
+
remove(host) {
|
|
55
|
+
var lines;
|
|
56
|
+
try {
|
|
57
|
+
lines = hostile.get(false);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
return this.error(err);
|
|
60
|
+
}
|
|
61
|
+
lines.forEach(item => {
|
|
62
|
+
if (item[1] === host) {
|
|
63
|
+
try {
|
|
64
|
+
hostile.remove(item[0], host);
|
|
65
|
+
} catch (err) {
|
|
66
|
+
return this.error(
|
|
67
|
+
'Error: ' + err.message + '. Are you running as root?',
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
console.log(chalk.green('Removed ' + host));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Load hosts given a file
|
|
77
|
+
* @param {string} filePath
|
|
78
|
+
*/
|
|
79
|
+
load(filePath) {
|
|
80
|
+
var lines = this.parseFile(filePath);
|
|
81
|
+
|
|
82
|
+
lines.forEach(item => {
|
|
83
|
+
this.set(item[0], item[1]);
|
|
84
|
+
});
|
|
85
|
+
console.log(chalk.green('\nAdded %d hosts!'), lines.length);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Remove hosts given a file
|
|
90
|
+
* @param {string} filePath
|
|
91
|
+
*/
|
|
92
|
+
unload(filePath) {
|
|
93
|
+
var lines = this.parseFile(filePath);
|
|
94
|
+
|
|
95
|
+
lines.forEach(item => {
|
|
96
|
+
this.remove(item[1]);
|
|
97
|
+
});
|
|
98
|
+
console.log(chalk.green('Removed %d hosts!'), lines.length);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Get all the lines of the file as array of arrays [[IP, host]]
|
|
103
|
+
* @param {string} filePath
|
|
104
|
+
*/
|
|
105
|
+
parseFile(filePath) {
|
|
106
|
+
var lines;
|
|
107
|
+
try {
|
|
108
|
+
lines = hostile.getFile(filePath, false);
|
|
109
|
+
} catch (err) {
|
|
110
|
+
return this.error(err);
|
|
111
|
+
}
|
|
112
|
+
return lines;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Print an error and exit the program
|
|
117
|
+
* @param {string} message
|
|
118
|
+
*/
|
|
119
|
+
error(err) {
|
|
120
|
+
console.error(chalk.red(err.message || err));
|
|
121
|
+
process.exit(-1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
//#region imports
|
|
2
|
+
import { chalk, ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith, UtilsNetwork__NS__checkIfServerOnline, UtilsNetwork__NS__checkIfServerPings, UtilsNetwork__NS__checkPing, UtilsNetwork__NS__etcHostHasProperLocalhostIp4Entry, UtilsNetwork__NS__etcHostHasProperLocalhostIp6Entry, UtilsNetwork__NS__getCurrentPublicIpAddress, UtilsNetwork__NS__getEtcHostEntriesByDomain, UtilsNetwork__NS__getEtcHostEntryByComment, UtilsNetwork__NS__getEtcHostEntryByIp, UtilsNetwork__NS__getEtcHostsPath, UtilsNetwork__NS__getFirstIpV4LocalActiveIpAddress, UtilsNetwork__NS__getLocalIpAddresses, UtilsNetwork__NS__isValidDomain, UtilsNetwork__NS__isValidIp, UtilsNetwork__NS__LocalIpInfo, UtilsNetwork__NS__PingResult, UtilsNetwork__NS__removeEtcHost, UtilsNetwork__NS__setEtcHost, UtilsNetwork__NS__SIMULATE_DOMAIN_TAG, UtilsNetwork__NS__simulateDomain, UtilsNetwork__NS__urlParse } from 'tnp-core/lib-prod';
|
|
3
|
+
import { Helpers__NS___fixCommand, Helpers__NS__bigMaxBuffer, Helpers__NS__checkProcess, Helpers__NS__cleanExit, Helpers__NS__clearConsole, Helpers__NS__command, Helpers__NS__commandOutputAsString, Helpers__NS__commandOutputAsStringAsync, Helpers__NS__compilationWrapper, Helpers__NS__contain, Helpers__NS__createFolder, Helpers__NS__createSymLink, Helpers__NS__error, Helpers__NS__execute, Helpers__NS__exists, Helpers__NS__filesFrom, Helpers__NS__foldersFrom, Helpers__NS__getFilesFrom, Helpers__NS__getFoldersFrom, Helpers__NS__getIsBrowser, Helpers__NS__getIsElectron, Helpers__NS__getIsNode, Helpers__NS__getIsRunningInGitBash, Helpers__NS__getIsSupportedTaonTerminal, Helpers__NS__getIsVerboseMode, Helpers__NS__getIsWebSQL, Helpers__NS__getIsWsl, Helpers__NS__getStdio, Helpers__NS__hideNodeWarnings, Helpers__NS__info, Helpers__NS__isBlob, Helpers__NS__isBuffer, Helpers__NS__isClass, Helpers__NS__isExistedSymlink, Helpers__NS__isFile, Helpers__NS__isFolder, Helpers__NS__isRunningInDocker, Helpers__NS__isRunningInLinuxGraphicsCapableEnvironment, Helpers__NS__isSymlinkFileExitedOrUnexisted, Helpers__NS__isSymlinkThatMatchesUrl, Helpers__NS__isUnexistedLink, Helpers__NS__killOnPort, Helpers__NS__killProcess, Helpers__NS__killProcessByPort, Helpers__NS__linksToFolderFrom, Helpers__NS__linksToFoldersFrom, Helpers__NS__log, Helpers__NS__logError, Helpers__NS__logInfo, Helpers__NS__logProc, Helpers__NS__logSuccess, Helpers__NS__logWarn, Helpers__NS__mediaTypeFromSrc, Helpers__NS__mkdirp, Helpers__NS__modifyLineByLine, Helpers__NS__msgCacheClear, Helpers__NS__openFolderInFileExplorer, Helpers__NS__parse, Helpers__NS__pathContainLink, Helpers__NS__questionYesNo, Helpers__NS__readFile, Helpers__NS__readJson, Helpers__NS__readJson5, Helpers__NS__readJsonC, Helpers__NS__relative, Helpers__NS__remove, Helpers__NS__removeEmptyLineFromString, Helpers__NS__removeFileIfExists, Helpers__NS__removeFolderIfExists, Helpers__NS__removeIfExists, Helpers__NS__removeSlashAtBegin, Helpers__NS__removeSlashAtEnd, Helpers__NS__removeSymlinks, Helpers__NS__renderError, Helpers__NS__replaceLinesInFile, Helpers__NS__run, Helpers__NS__runAsyncIn, Helpers__NS__runSyncIn, Helpers__NS__runSyncOrAsync, Helpers__NS__sleep, Helpers__NS__stopApplication, Helpers__NS__stringify, Helpers__NS__success, Helpers__NS__taskDone, Helpers__NS__taskStarted, Helpers__NS__throwError, Helpers__NS__timeout, Helpers__NS__tryCatchError, Helpers__NS__tryReadFile, Helpers__NS__tryRemoveDir, Helpers__NS__values, Helpers__NS__wait, Helpers__NS__warn, Helpers__NS__writeFile, Helpers__NS__writeJson, Helpers__NS__writeJson5, Helpers__NS__writeJsonC } from 'tnp-helpers/lib-prod';
|
|
4
|
+
//#endregion
|
|
5
|
+
|
|
6
|
+
/***
|
|
7
|
+
* @deprecated
|
|
8
|
+
* use normal objects
|
|
9
|
+
*/
|
|
10
|
+
export type EtcHosts = { [hostName in string]: HostForServer };
|
|
11
|
+
|
|
12
|
+
/***
|
|
13
|
+
* @deprecated
|
|
14
|
+
* use normal objects
|
|
15
|
+
*/
|
|
16
|
+
export type IEtcHosts = {
|
|
17
|
+
[hostName in string]: Partial<
|
|
18
|
+
Pick<HostForServer, 'aliases' | 'ipOrDomain' | 'environmentName'>
|
|
19
|
+
>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export interface OptHostForServer {
|
|
23
|
+
ip?: string;
|
|
24
|
+
domain?: string;
|
|
25
|
+
ipOrDomain?: string;
|
|
26
|
+
environmentName?: string;
|
|
27
|
+
aliases?: string[];
|
|
28
|
+
skipUpdateOfServerEtcHosts?: boolean;
|
|
29
|
+
isDefault?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* ip from command: vpn-cli 192.168.1.1 192.168.1.2
|
|
32
|
+
*/
|
|
33
|
+
originHostname?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
/**
|
|
36
|
+
* if true - ip and domain will output empty string
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class HostForServer implements OptHostForServer {
|
|
42
|
+
private _data: OptHostForServer;
|
|
43
|
+
|
|
44
|
+
public clone() {
|
|
45
|
+
return HostForServer.From(this);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static From(
|
|
49
|
+
ipOrDomain:
|
|
50
|
+
| string
|
|
51
|
+
| URL
|
|
52
|
+
| Pick<
|
|
53
|
+
OptHostForServer | HostForServer,
|
|
54
|
+
| 'ipOrDomain'
|
|
55
|
+
| 'aliases'
|
|
56
|
+
| 'originHostname'
|
|
57
|
+
| 'skipUpdateOfServerEtcHosts'
|
|
58
|
+
>,
|
|
59
|
+
name = '',
|
|
60
|
+
disabled = false,
|
|
61
|
+
): HostForServer {
|
|
62
|
+
if (!ipOrDomain) {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
if (___NS__isObject(ipOrDomain) && ipOrDomain instanceof HostForServer) {
|
|
66
|
+
const dataClone = ___NS__cloneDeep(ipOrDomain._data) as OptHostForServer;
|
|
67
|
+
dataClone.name = name && name.trim() !== '' ? name : dataClone.name;
|
|
68
|
+
if (!___NS__isBoolean(dataClone.disabled)) {
|
|
69
|
+
dataClone.disabled = disabled;
|
|
70
|
+
}
|
|
71
|
+
return new HostForServer(dataClone);
|
|
72
|
+
}
|
|
73
|
+
if (___NS__isString(ipOrDomain)) {
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
const parsed = UtilsNetwork__NS__urlParse(ipOrDomain);
|
|
76
|
+
if (parsed) {
|
|
77
|
+
ipOrDomain = parsed as any;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (___NS__isObject(ipOrDomain) && ipOrDomain instanceof URL) {
|
|
82
|
+
ipOrDomain = ipOrDomain as URL;
|
|
83
|
+
if (UtilsNetwork__NS__isValidIp(ipOrDomain?.host)) {
|
|
84
|
+
return new HostForServer({ ip: ipOrDomain.origin, name, disabled });
|
|
85
|
+
} else {
|
|
86
|
+
return new HostForServer({ domain: ipOrDomain.origin, name, disabled });
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
if (___NS__isString(ipOrDomain)) {
|
|
90
|
+
return new HostForServer({ ipOrDomain, name, disabled });
|
|
91
|
+
} else {
|
|
92
|
+
(ipOrDomain as OptHostForServer).name =
|
|
93
|
+
name && name.trim() !== ''
|
|
94
|
+
? name
|
|
95
|
+
: (ipOrDomain as OptHostForServer).name;
|
|
96
|
+
if (!___NS__isBoolean((ipOrDomain as OptHostForServer).disabled)) {
|
|
97
|
+
(ipOrDomain as OptHostForServer).disabled = disabled;
|
|
98
|
+
}
|
|
99
|
+
return new HostForServer(ipOrDomain as any);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
constructor(data: OptHostForServer) {
|
|
105
|
+
if (data?.ipOrDomain) {
|
|
106
|
+
if (UtilsNetwork__NS__isValidIp(data.ipOrDomain)) {
|
|
107
|
+
data.ip = data.ipOrDomain;
|
|
108
|
+
} else {
|
|
109
|
+
data.domain = data.ipOrDomain;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (data && !data.ip) {
|
|
113
|
+
data.ip = '';
|
|
114
|
+
}
|
|
115
|
+
if (data && !data.domain) {
|
|
116
|
+
data.domain = '';
|
|
117
|
+
}
|
|
118
|
+
if (!data) {
|
|
119
|
+
data = {};
|
|
120
|
+
}
|
|
121
|
+
if (___NS__isString(data?.aliases)) {
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
data.aliases = Helpers.strings.splitIfNeed(data.aliases);
|
|
124
|
+
}
|
|
125
|
+
this._data = data;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public get ip() {
|
|
129
|
+
if (this.disabled) {
|
|
130
|
+
return '';
|
|
131
|
+
}
|
|
132
|
+
return this._data.ip;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
public set ip(newIpAddress: string) {
|
|
136
|
+
this._data.ip = newIpAddress;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public get domain() {
|
|
140
|
+
if (this.disabled) {
|
|
141
|
+
return '';
|
|
142
|
+
}
|
|
143
|
+
return this._data.domain;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
public get aliases(): string[] {
|
|
147
|
+
if (this.disabled) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
if (___NS__isString(this._data.aliases)) {
|
|
151
|
+
return this._data.aliases.split(' ');
|
|
152
|
+
}
|
|
153
|
+
if (!___NS__isArray(this._data.aliases)) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
return this._data.aliases;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
public get firstAlias() {
|
|
160
|
+
return ___NS__first(this.aliases);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public get name() {
|
|
164
|
+
return this._data.name;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public set name(v) {
|
|
168
|
+
this._data.name = v;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
public get originHostname() {
|
|
172
|
+
return this._data.originHostname;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
public set originHostname(v) {
|
|
176
|
+
this._data.originHostname = v;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
public get disabled() {
|
|
180
|
+
return this._data.disabled;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
public get isDefault() {
|
|
184
|
+
return this._data.isDefault;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
public get identifier() {
|
|
188
|
+
return ___NS__kebabCase(this._data.name);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public set disabled(v) {
|
|
192
|
+
this._data.disabled = v;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
public get environmentName() {
|
|
196
|
+
return this._data.environmentName || '';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public get skipUpdateOfServerEtcHosts() {
|
|
200
|
+
return this._data.skipUpdateOfServerEtcHosts || false;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
public set skipUpdateOfServerEtcHosts(v) {
|
|
204
|
+
this._data.skipUpdateOfServerEtcHosts = v;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
public get ipOrDomain() {
|
|
208
|
+
if (this.disabled) {
|
|
209
|
+
return '';
|
|
210
|
+
}
|
|
211
|
+
const res = (this.domain ? this.domain : this.ip) || '';
|
|
212
|
+
return res;
|
|
213
|
+
// return res.startsWith('http') ? res : `http://${res}`;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
public get ipOrFirstAlias() {
|
|
217
|
+
if (this.disabled) {
|
|
218
|
+
return '';
|
|
219
|
+
}
|
|
220
|
+
const res = (this.firstAlias ? this.firstAlias : this.ip) || '';
|
|
221
|
+
return res;
|
|
222
|
+
// return res.startsWith('http') ? res : `http://${res}`;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
public get hostname() {
|
|
226
|
+
// @ts-ignore
|
|
227
|
+
const h = UtilsNetwork__NS__urlParse(this.ipOrFirstAlias, { forceDomain: true });
|
|
228
|
+
return h ? h.hostname : void 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
public get hostnameFirstAlias() {
|
|
232
|
+
// @ts-ignore
|
|
233
|
+
const h = UtilsNetwork__NS__urlParse(this.firstAlias, { forceDomain: true });
|
|
234
|
+
return h ? h.hostname : void 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
public get hostnameIp() {
|
|
238
|
+
// @ts-ignore
|
|
239
|
+
const h = UtilsNetwork__NS__urlParse(this.ip);
|
|
240
|
+
return h ? h.hostname : void 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
public get nameWithIpOrDomain() {
|
|
244
|
+
return chalk.underline(`${this.name} ${this.ipOrDomain}`);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
toString = () => {
|
|
248
|
+
return `[string version] ${this.nameWithIpOrDomain}`;
|
|
249
|
+
};
|
|
250
|
+
}
|
package/lib-prod/package.json
CHANGED
|
@@ -2,23 +2,27 @@
|
|
|
2
2
|
// import { Helpers } from 'tnp-helpers';
|
|
3
3
|
// import { VpnSplit } from './vpn-split.backend';
|
|
4
4
|
// import { EtcHosts, HostForServer } from './models.backend';
|
|
5
|
+
|
|
5
6
|
// const TO_DELETE = {} as EtcHosts;
|
|
7
|
+
|
|
6
8
|
// export async function run(args: string[]) {
|
|
7
9
|
// Helpers.clearConsole();
|
|
8
10
|
// const { local }: { local: boolean } = require('minimist')(args);
|
|
9
11
|
// const saveHostInUserFolder = !!local;
|
|
10
12
|
// args = args.join(' ').replace('--local', '').split(' ');
|
|
13
|
+
|
|
11
14
|
// const ins = await VpnSplit.Instance({
|
|
12
15
|
// additionalDefaultHosts: TO_DELETE,
|
|
13
16
|
// allowNotSudo: !!saveHostInUserFolder
|
|
14
17
|
// });
|
|
18
|
+
|
|
15
19
|
// if (args.join().trim() === '') {
|
|
16
20
|
// await ins.startServer(saveHostInUserFolder);
|
|
17
21
|
// } else {
|
|
18
22
|
// // await ins.startClient(args.split Helpers.urlParse(args.shift()));
|
|
19
23
|
// await ins.startClient(args.map(arg => Helpers.urlParse(arg)));
|
|
20
24
|
// }
|
|
25
|
+
|
|
21
26
|
// process.stdin.resume();
|
|
22
27
|
// }
|
|
23
|
-
//#endregion
|
|
24
|
-
//# sourceMappingURL=start.backend.js.map
|
|
28
|
+
//#endregion
|