@etsoo/appscript 1.2.37 → 1.2.38
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.
|
@@ -14,7 +14,11 @@ var ExternalSettings;
|
|
|
14
14
|
const settings = Reflect.get(globalThis, 'settings');
|
|
15
15
|
if (typeof settings === 'object') {
|
|
16
16
|
if (typeof window !== 'undefined') {
|
|
17
|
-
|
|
17
|
+
// Host name
|
|
18
|
+
let hostname = window.location.hostname;
|
|
19
|
+
// Empty string returned under Electron
|
|
20
|
+
if (hostname === '')
|
|
21
|
+
hostname = 'localhost';
|
|
18
22
|
// replace {hostname}
|
|
19
23
|
for (const key in settings) {
|
|
20
24
|
const value = settings[key];
|
|
@@ -11,7 +11,11 @@ export var ExternalSettings;
|
|
|
11
11
|
const settings = Reflect.get(globalThis, 'settings');
|
|
12
12
|
if (typeof settings === 'object') {
|
|
13
13
|
if (typeof window !== 'undefined') {
|
|
14
|
-
|
|
14
|
+
// Host name
|
|
15
|
+
let hostname = window.location.hostname;
|
|
16
|
+
// Empty string returned under Electron
|
|
17
|
+
if (hostname === '')
|
|
18
|
+
hostname = 'localhost';
|
|
15
19
|
// replace {hostname}
|
|
16
20
|
for (const key in settings) {
|
|
17
21
|
const value = settings[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.38",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@babel/preset-env": "^7.16.11",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.17.0",
|
|
67
67
|
"@types/jest": "^27.4.0",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.11.0",
|
|
70
70
|
"eslint": "^8.8.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -40,7 +40,12 @@ export namespace ExternalSettings {
|
|
|
40
40
|
const settings = Reflect.get(globalThis, 'settings');
|
|
41
41
|
if (typeof settings === 'object') {
|
|
42
42
|
if (typeof window !== 'undefined') {
|
|
43
|
-
|
|
43
|
+
// Host name
|
|
44
|
+
let hostname = window.location.hostname;
|
|
45
|
+
|
|
46
|
+
// Empty string returned under Electron
|
|
47
|
+
if (hostname === '') hostname = 'localhost';
|
|
48
|
+
|
|
44
49
|
// replace {hostname}
|
|
45
50
|
for (const key in settings) {
|
|
46
51
|
const value = settings[key];
|