@interopio/iocd-cli 0.0.11 → 0.0.13
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/dist/cli.js +0 -0
- package/dist/services/components/stores/github.store.js +103 -3
- package/dist/services/components/stores/github.store.js.map +1 -1
- package/dist/services/installer/installer.service.js +2 -12
- package/dist/services/installer/installer.service.js.map +1 -1
- package/dist/templates/ioconnect-desktop/package.json +1 -1
- package/dist/templates/splash/apps/splash/assets/fonts/Inter-Regular.ttf +0 -0
- package/dist/templates/splash/apps/splash/assets/images/splash-background.png +0 -0
- package/dist/templates/splash/apps/splash/assets/styles/style.css +39 -0
- package/dist/templates/splash/apps/splash/iocd.app.json +6 -18
- package/dist/templates/splash/apps/splash/script.js +53 -0
- package/dist/templates/splash/apps/splash/splash.html +25 -0
- package/package.json +2 -2
- package/dist/templates/splash/apps/splash/README.md +0 -119
- package/dist/templates/splash/apps/splash/config/system-dev.json +0 -9
- package/dist/templates/splash/apps/splash/index.html +0 -55
- package/dist/templates/splash/apps/splash/package-lock.json +0 -1059
- package/dist/templates/splash/apps/splash/package.json +0 -17
- package/dist/templates/splash/apps/splash/public/assets/fonts/PTSans-Regular.ttf +0 -0
- package/dist/templates/splash/apps/splash/public/assets/images/logo-light.svg +0 -85
- package/dist/templates/splash/apps/splash/public/assets/images/splash-bg.png +0 -0
- package/dist/templates/splash/apps/splash/public/assets/styles/style.css +0 -149
- package/dist/templates/splash/apps/splash/public/assets/styles/style.scss +0 -90
- package/dist/templates/splash/apps/splash/src/main.ts +0 -93
- package/dist/templates/splash/apps/splash/src/types.ts +0 -28
- package/dist/templates/splash/apps/splash/tsconfig.json +0 -25
- package/dist/templates/splash/apps/splash/vite.config.ts +0 -27
- /package/dist/templates/splash/apps/splash/{public/assets → assets}/styles/style.css.map +0 -0
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -14,10 +14,111 @@ class GitHubComponentsStore {
|
|
|
14
14
|
usePrereleases = false;
|
|
15
15
|
logger = logger_1.Logger.getInstance("github.store");
|
|
16
16
|
cachedReleases = null;
|
|
17
|
+
retryOptions = {
|
|
18
|
+
maxRetries: 3,
|
|
19
|
+
baseDelay: 1000, // Start with 1 second
|
|
20
|
+
maxDelay: 30000, // Maximum 30 seconds
|
|
21
|
+
backoffMultiplier: 2
|
|
22
|
+
};
|
|
17
23
|
constructor(repo = "interopio/desktop-releases/releases", usePrereleases = false) {
|
|
18
24
|
this.baseUrl = `https://api.github.com/repos/${repo}`;
|
|
19
25
|
this.usePrereleases = usePrereleases;
|
|
20
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Configure retry options for API requests
|
|
29
|
+
*/
|
|
30
|
+
setRetryOptions(options) {
|
|
31
|
+
this.retryOptions = { ...this.retryOptions, ...options };
|
|
32
|
+
this.logger.debug(`Updated retry options:`, this.retryOptions);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Clear cached releases to force fresh fetch on next request
|
|
36
|
+
*/
|
|
37
|
+
clearCache() {
|
|
38
|
+
this.cachedReleases = null;
|
|
39
|
+
this.logger.debug('Cleared GitHub releases cache');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Fetch with retry logic for handling rate limits and temporary failures
|
|
43
|
+
*/
|
|
44
|
+
async fetchWithRetry(url, attempt = 1) {
|
|
45
|
+
try {
|
|
46
|
+
this.logger.debug(`Fetching ${url} (attempt ${attempt}/${this.retryOptions.maxRetries + 1})`);
|
|
47
|
+
const response = await fetch(url);
|
|
48
|
+
// Log current rate limit status for debugging
|
|
49
|
+
const rateLimitRemaining = response.headers.get('x-ratelimit-remaining');
|
|
50
|
+
const rateLimitLimit = response.headers.get('x-ratelimit-limit');
|
|
51
|
+
if (rateLimitRemaining && rateLimitLimit) {
|
|
52
|
+
this.logger.debug(`GitHub rate limit: ${rateLimitRemaining}/${rateLimitLimit} remaining`);
|
|
53
|
+
}
|
|
54
|
+
// Handle rate limiting (403) and server errors (5xx)
|
|
55
|
+
if (response.status === 403) {
|
|
56
|
+
const rateLimitRemaining = response.headers.get('x-ratelimit-remaining');
|
|
57
|
+
const rateLimitReset = response.headers.get('x-ratelimit-reset');
|
|
58
|
+
if (rateLimitRemaining === '0' && rateLimitReset) {
|
|
59
|
+
// We've hit the rate limit - wait until reset time
|
|
60
|
+
const resetTime = new Date(parseInt(rateLimitReset) * 1000);
|
|
61
|
+
const waitTime = Math.max(resetTime.getTime() - Date.now(), 1000); // Minimum 1 second
|
|
62
|
+
if (attempt <= this.retryOptions.maxRetries && waitTime <= this.retryOptions.maxDelay) {
|
|
63
|
+
this.logger.debug(`GitHub rate limit exceeded. Waiting ${Math.ceil(waitTime / 1000)}s until reset at ${resetTime.toLocaleTimeString()}`);
|
|
64
|
+
await this.delay(waitTime);
|
|
65
|
+
return this.fetchWithRetry(url, attempt + 1);
|
|
66
|
+
}
|
|
67
|
+
else if (waitTime > this.retryOptions.maxDelay) {
|
|
68
|
+
throw new Error(`GitHub rate limit exceeded. Reset time (${Math.ceil(waitTime / 1000)}s) exceeds maximum wait time (${this.retryOptions.maxDelay / 1000}s). Please try again later.`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Handle other 403 errors (like secondary rate limits) with exponential backoff
|
|
72
|
+
if (attempt <= this.retryOptions.maxRetries) {
|
|
73
|
+
const delay = this.calculateBackoffDelay(attempt);
|
|
74
|
+
this.logger.debug(`GitHub API returned 403 (${response.statusText}). This might be a secondary rate limit. Retrying in ${delay}ms...`);
|
|
75
|
+
await this.delay(delay);
|
|
76
|
+
return this.fetchWithRetry(url, attempt + 1);
|
|
77
|
+
}
|
|
78
|
+
// If we've exhausted retries, provide helpful error message
|
|
79
|
+
const errorBody = await response.text().catch(() => 'Unable to read error details');
|
|
80
|
+
throw new Error(`GitHub API rate limit or access denied (403). ${errorBody}. Try again later or check your network connection.`);
|
|
81
|
+
}
|
|
82
|
+
// Handle server errors (5xx) with exponential backoff
|
|
83
|
+
if (response.status >= 500 && response.status < 600) {
|
|
84
|
+
if (attempt <= this.retryOptions.maxRetries) {
|
|
85
|
+
const delay = this.calculateBackoffDelay(attempt);
|
|
86
|
+
this.logger.warn(`GitHub API server error ${response.status} (${response.statusText}). Retrying in ${delay}ms...`);
|
|
87
|
+
await this.delay(delay);
|
|
88
|
+
return this.fetchWithRetry(url, attempt + 1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Handle other client errors (4xx) - don't retry these
|
|
92
|
+
if (response.status >= 400 && response.status < 500 && response.status !== 403) {
|
|
93
|
+
const errorBody = await response.text().catch(() => 'Unable to read error details');
|
|
94
|
+
throw new Error(`GitHub API client error ${response.status} (${response.statusText}): ${errorBody}`);
|
|
95
|
+
}
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
// Handle network errors and other exceptions
|
|
100
|
+
if (attempt <= this.retryOptions.maxRetries && error instanceof Error && !error.message.includes('GitHub API')) {
|
|
101
|
+
const delay = this.calculateBackoffDelay(attempt);
|
|
102
|
+
this.logger.warn(`Network error: ${error.message}. Retrying in ${delay}ms...`);
|
|
103
|
+
await this.delay(delay);
|
|
104
|
+
return this.fetchWithRetry(url, attempt + 1);
|
|
105
|
+
}
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Calculate exponential backoff delay
|
|
111
|
+
*/
|
|
112
|
+
calculateBackoffDelay(attempt) {
|
|
113
|
+
const delay = this.retryOptions.baseDelay * Math.pow(this.retryOptions.backoffMultiplier, attempt - 1);
|
|
114
|
+
return Math.min(delay, this.retryOptions.maxDelay);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sleep for the specified number of milliseconds
|
|
118
|
+
*/
|
|
119
|
+
delay(ms) {
|
|
120
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
121
|
+
}
|
|
21
122
|
async getAll() {
|
|
22
123
|
const allReleases = await this.getAllReleases();
|
|
23
124
|
return this.parseReleases(allReleases);
|
|
@@ -28,9 +129,8 @@ class GitHubComponentsStore {
|
|
|
28
129
|
if (!targetComponent) {
|
|
29
130
|
throw new Error(`No component found for ${name}@${version}`);
|
|
30
131
|
}
|
|
31
|
-
// Download the asset
|
|
32
132
|
this.logger.debug(`Downloading ${targetComponent.name} from ${targetComponent.downloadUrl}`);
|
|
33
|
-
const response = await
|
|
133
|
+
const response = await this.fetchWithRetry(targetComponent.downloadUrl);
|
|
34
134
|
if (!response.ok) {
|
|
35
135
|
throw new Error(`Failed to download asset: ${response.status} ${response.statusText}`);
|
|
36
136
|
}
|
|
@@ -87,7 +187,7 @@ class GitHubComponentsStore {
|
|
|
87
187
|
const allReleases = [];
|
|
88
188
|
let nextUrl = `${this.baseUrl}?per_page=100&page=1`;
|
|
89
189
|
while (nextUrl) {
|
|
90
|
-
const response = await
|
|
190
|
+
const response = await this.fetchWithRetry(nextUrl);
|
|
91
191
|
if (!response.ok) {
|
|
92
192
|
throw new Error(`GitHub API error: ${response.status} ${response.statusText}`);
|
|
93
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.store.js","sourceRoot":"","sources":["../../../../src/services/components/stores/github.store.ts"],"names":[],"mappings":";;;AAAA,gEAAwD;AACxD,kDAA+C;AAG/C,sDAA2D;AAC3D,0DAAoD;AAiBnD,CAAC;
|
|
1
|
+
{"version":3,"file":"github.store.js","sourceRoot":"","sources":["../../../../src/services/components/stores/github.store.ts"],"names":[],"mappings":";;;AAAA,gEAAwD;AACxD,kDAA+C;AAG/C,sDAA2D;AAC3D,0DAAoD;AAiBnD,CAAC;AASF,yEAAyE;AACzE,wEAAwE;AACxE,kGAAkG;AAClG,MAAa,qBAAqB;IACtB,OAAO,GAAG,EAAE,CAAC;IACb,cAAc,GAAY,KAAK,CAAC;IAChC,MAAM,GAAG,eAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC5C,cAAc,GAAgC,IAAI,CAAC;IACnD,YAAY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K,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;oBACjC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;oBAClD,MAAM,SAAS,GAAG,uCAAsB,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC5E,UAAU,CAAC,IAAI,CAAC;wBACZ,IAAI;wBACJ,OAAO,EAAE,WAAW;wBACpB,WAAW,EAAE,WAAW;wBACxB,WAAW,EAAE,OAAO;wBACpB,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,QAAQ,IAAI,uCAAsB,CAAC,kBAAkB,EAAE;wBACvF,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,OAAO,CAAC,IAAW;wBACnD,WAAW,EAAE,KAAK,CAAC,oBAAoB;wBACvC,QAAQ,EAAE,KAAK,CAAC,IAAI;wBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;qBACjC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8CAA8C,OAAO,CAAC,IAAI,YAAa,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YACrH,CAAC;QACL,CAAC;QACD,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA5SD,sDA4SC"}
|
|
@@ -20,22 +20,12 @@ const config_service_1 = require("../config/config.service");
|
|
|
20
20
|
// Conditionally import macOS helper only on macOS
|
|
21
21
|
let macOSInstallerHelper = null;
|
|
22
22
|
if (process.platform === 'darwin') {
|
|
23
|
-
|
|
24
|
-
macOSInstallerHelper = require('./macOS.helper');
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
// Will be handled later when needed
|
|
28
|
-
}
|
|
23
|
+
macOSInstallerHelper = require('./macOS.helper');
|
|
29
24
|
}
|
|
30
25
|
// Conditionally import windows helper only on Windows
|
|
31
26
|
let windowsHelper = null;
|
|
32
27
|
if (process.platform === 'win32') {
|
|
33
|
-
|
|
34
|
-
windowsHelper = require('./windows.helper');
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
// Will be handled later when needed
|
|
38
|
-
}
|
|
28
|
+
windowsHelper = require('./windows.helper');
|
|
39
29
|
}
|
|
40
30
|
const logger = logger_1.Logger.getInstance("installer.service");
|
|
41
31
|
async function makeInstaller(_options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.service.js","sourceRoot":"","sources":["../../../src/services/installer/installer.service.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"installer.service.js","sourceRoot":"","sources":["../../../src/services/installer/installer.service.ts"],"names":[],"mappings":";;;;;AA4BA,sCA8BC;AA1DD,+CAA4C;AAC5C,kFAA4E;AAC5E,2BAA8B;AAC9B,mDAAwD;AACxD,iEAAwC;AACxC,0FAAiE;AACjE,mDAAiE;AACjE,+CAA2C;AAC3C,2CAA6C;AAC7C,+BAA4B;AAC5B,0CAA0C;AAC1C,uCAAyD;AACzD,6DAAyD;AAEzD,kDAAkD;AAClD,IAAI,oBAAoB,GAAQ,IAAI,CAAC;AACrC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;IAClC,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,CAAC;AAED,sDAAsD;AACtD,IAAI,aAAa,GAAQ,IAAI,CAAC;AAC9B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;IACjC,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,MAAM,GAAG,eAAM,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;AAEhD,KAAK,UAAU,aAAa,CAAC,QAAkD;IACpF,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,SAAS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AuB,IAAI,yBAAyB,CAAC,CAAC;gBACnE,SAAS;YACX,CAAC;YAED,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAC1C,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;YAE/C,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,OAAO,QAAQ,MAAM,CAAC,CAAC;YACtD,MAAM,IAAA,aAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI,gBAAgB,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC;QACpD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-weight: 400;
|
|
3
|
+
font-family: "Inter";
|
|
4
|
+
font-style: normal;
|
|
5
|
+
src: url("../fonts/Inter-Regular.ttf") format("truetype");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
font-size: 13px;
|
|
10
|
+
color: #B0B2B5;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
clear: both;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
user-select: none;
|
|
16
|
+
font-family: "Inter", "Poppins", Arial, Helvetica, sans-serif;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.splash-wrapper {
|
|
20
|
+
width: 750px;
|
|
21
|
+
height: 500px;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
padding: 24px;
|
|
26
|
+
background-color: #23272A; /* Fallback color */
|
|
27
|
+
background: url("../images/splash-background.png") no-repeat center center;
|
|
28
|
+
background-size: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.version {
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
margin: 40px 0 0 84px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.copyright {
|
|
37
|
+
margin: auto 0 10px 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
"build": {
|
|
12
|
-
"script": "build",
|
|
13
|
-
"modifications": [
|
|
14
|
-
{
|
|
15
|
-
"source": "/dist/",
|
|
16
|
-
"destination": "/modifications-build/iocd/assets/splash"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
2
|
+
"modifications": [
|
|
3
|
+
{
|
|
4
|
+
"source": "./",
|
|
5
|
+
"destination": "/modifications/iocd/assets/splash"
|
|
6
|
+
}
|
|
7
|
+
]
|
|
20
8
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
glue42splash.on("updateStatus", (arg) => {
|
|
2
|
+
updateStatus(arg.text);
|
|
3
|
+
});
|
|
4
|
+
|
|
5
|
+
glue42splash.on("pingGW", (arg) => {
|
|
6
|
+
const gwURL = arg.gwURL;
|
|
7
|
+
|
|
8
|
+
const retry = () => {
|
|
9
|
+
console.log(`testing connectivity to ${gwURL}`);
|
|
10
|
+
|
|
11
|
+
const webSocket = new WebSocket(gwURL);
|
|
12
|
+
console.log(webSocket);
|
|
13
|
+
|
|
14
|
+
webSocket.onopen = () => {
|
|
15
|
+
console.log(`received open from GW on ${gwURL} - resolving...`);
|
|
16
|
+
webSocket.close();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
webSocket.onerror = (err) => {
|
|
20
|
+
console.log(`received error from GW on ${gwURL} - will retry`, err);
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
retry();
|
|
23
|
+
}, 500);
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
retry();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
document.addEventListener("DOMContentLoaded", function (event) {
|
|
31
|
+
// copyright
|
|
32
|
+
const copyright = document.getElementById("copyright");
|
|
33
|
+
const year = new Date().getFullYear();
|
|
34
|
+
copyright.innerHTML = `© ${year} ${copyright.innerHTML}`;
|
|
35
|
+
|
|
36
|
+
// parse url params - splash.html?message=Starting&env=DEMO®ion=INTEROP.IO&version=9.0.0.25
|
|
37
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
38
|
+
const message = urlParams.get("message");
|
|
39
|
+
updateStatus(message);
|
|
40
|
+
const version = urlParams.get("version");
|
|
41
|
+
if (version) {
|
|
42
|
+
const env = urlParams.get("env");
|
|
43
|
+
const region = urlParams.get("region");
|
|
44
|
+
const status = document.getElementById("version");
|
|
45
|
+
status.innerHTML = `${version} (${env}) - ${region}`;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
function updateStatus(message) {
|
|
50
|
+
console.log(`updating status to ${message}`);
|
|
51
|
+
var status = document.getElementById("status");
|
|
52
|
+
status.innerHTML = message + "...";
|
|
53
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" http-equiv="CACHE-CONTROL" content="NO-CACHE" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1,
|
|
8
|
+
shrink-to-fit=no"
|
|
9
|
+
/>
|
|
10
|
+
<script src="script.js"></script>
|
|
11
|
+
|
|
12
|
+
<meta name="description" content="io.Connect Desktop" />
|
|
13
|
+
<meta name="author" content="interop.io" />
|
|
14
|
+
<link rel="stylesheet" href="./assets/styles/style.css" />
|
|
15
|
+
<title>io.Connect Desktop</title>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body style="-webkit-app-region: drag">
|
|
19
|
+
<div class="splash-wrapper">
|
|
20
|
+
<div class="version" id="version"><span> </span></div>
|
|
21
|
+
<div class="copyright" id="copyright">Interop Inc All rights reserved.</div>
|
|
22
|
+
<div class="status" id="status">...</div>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interopio/iocd-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "CLI tool for setting up, building and packaging io.Connect Desktop platforms",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"iocd": "./dist/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "tsc && npm run copy-assets",
|
|
13
|
+
"build": "node ./scripts/delete-dist.js && tsc && npm run copy-assets",
|
|
14
14
|
"copy-assets": "node ./scripts/copy-assets.js",
|
|
15
15
|
"dev": "tsc --watch",
|
|
16
16
|
"test": "jest",
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# io.Connect Desktop Splash Screen
|
|
2
|
-
|
|
3
|
-
A modern TypeScript-based splash screen application built with Vite for io.Connect Desktop.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
This splash screen application is built using Vite with TypeScript and replicates the functionality of the original JavaScript-based splash screen. It provides a loading interface during application startup with status updates and gateway connectivity testing.
|
|
8
|
-
|
|
9
|
-
## Features
|
|
10
|
-
|
|
11
|
-
- **TypeScript Support**: Full type safety with proper interfaces
|
|
12
|
-
- **Modern Build System**: Vite for fast development and optimized builds
|
|
13
|
-
- **Status Updates**: Displays loading messages and progress
|
|
14
|
-
- **Gateway Testing**: Tests WebSocket connectivity to the gateway
|
|
15
|
-
- **URL Parameter Support**: Configurable via query parameters
|
|
16
|
-
- **Responsive Design**: Maintains the original visual design
|
|
17
|
-
|
|
18
|
-
## Development
|
|
19
|
-
|
|
20
|
-
### Prerequisites
|
|
21
|
-
|
|
22
|
-
- Node.js (v16 or higher)
|
|
23
|
-
- npm
|
|
24
|
-
|
|
25
|
-
### Getting Started
|
|
26
|
-
|
|
27
|
-
1. Install dependencies:
|
|
28
|
-
```bash
|
|
29
|
-
npm install
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
2. Start development server:
|
|
33
|
-
```bash
|
|
34
|
-
npm run dev
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
3. Build for production:
|
|
38
|
-
```bash
|
|
39
|
-
npm run build
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
4. Preview production build:
|
|
43
|
-
```bash
|
|
44
|
-
npm run preview
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Type Checking
|
|
48
|
-
|
|
49
|
-
Run TypeScript type checking:
|
|
50
|
-
```bash
|
|
51
|
-
npm run type-check
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## URL Parameters
|
|
55
|
-
|
|
56
|
-
The splash screen accepts the following URL parameters:
|
|
57
|
-
|
|
58
|
-
- `message`: Initial status message to display
|
|
59
|
-
- `version`: Application version number
|
|
60
|
-
- `env`: Environment name (e.g., "DEMO", "PROD")
|
|
61
|
-
- `region`: Region identifier (e.g., "INTEROP.IO")
|
|
62
|
-
|
|
63
|
-
Example:
|
|
64
|
-
```
|
|
65
|
-
splash.html?message=Starting&env=DEMO®ion=INTEROP.IO&version=9.0.0.25
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## API Integration
|
|
69
|
-
|
|
70
|
-
The splash screen integrates with the main application via the `glue42splash` global object:
|
|
71
|
-
|
|
72
|
-
### Events
|
|
73
|
-
|
|
74
|
-
- **updateStatus**: Updates the status message
|
|
75
|
-
```typescript
|
|
76
|
-
glue42splash.on("updateStatus", (arg: { text: string }) => {
|
|
77
|
-
// Updates status display
|
|
78
|
-
});
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
- **pingGW**: Tests gateway connectivity
|
|
82
|
-
```typescript
|
|
83
|
-
glue42splash.on("pingGW", (arg: { gwURL: string }) => {
|
|
84
|
-
// Tests WebSocket connection to gateway
|
|
85
|
-
});
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## File Structure
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
src/
|
|
92
|
-
├── main.ts # Main application logic
|
|
93
|
-
├── types.ts # TypeScript type definitions
|
|
94
|
-
public/
|
|
95
|
-
├── assets/ # Copied from original splash screen
|
|
96
|
-
│ ├── images/ # Logo and background images
|
|
97
|
-
│ ├── styles/ # CSS styles
|
|
98
|
-
│ └── fonts/ # Custom fonts
|
|
99
|
-
└── index.html # Main HTML template
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Build Output
|
|
103
|
-
|
|
104
|
-
The build process generates optimized files in the `dist/` directory:
|
|
105
|
-
- `index.html` - Main HTML file
|
|
106
|
-
- `assets/` - Bundled and optimized JavaScript/CSS files
|
|
107
|
-
- `assets/` - Static assets (images, fonts, styles)
|
|
108
|
-
|
|
109
|
-
## Migration from Original
|
|
110
|
-
|
|
111
|
-
This Vite-based implementation maintains 100% functional compatibility with the original JavaScript-based splash screen while adding:
|
|
112
|
-
|
|
113
|
-
- TypeScript type safety
|
|
114
|
-
- Modern ES6+ syntax and features
|
|
115
|
-
- Optimized build process
|
|
116
|
-
- Better development experience
|
|
117
|
-
- Modular code organization
|
|
118
|
-
|
|
119
|
-
The visual appearance and all functionality remain identical to ensure seamless integration with existing io.Connect Desktop applications.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" http-equiv="CACHE-CONTROL" content="NO-CACHE" />
|
|
5
|
-
<meta
|
|
6
|
-
name="viewport"
|
|
7
|
-
content="width=device-width, initial-scale=1,
|
|
8
|
-
shrink-to-fit=no"
|
|
9
|
-
/>
|
|
10
|
-
<meta name="description" content="io.Connect Desktop" />
|
|
11
|
-
<meta name="author" content="interop.io" />
|
|
12
|
-
<link rel="stylesheet" href="/assets/styles/style.css" />
|
|
13
|
-
<title>io.Connect Desktop</title>
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body style="-webkit-app-region: drag">
|
|
17
|
-
<div class="splash-wrapper">
|
|
18
|
-
<div class="logo-wrapper">
|
|
19
|
-
<img
|
|
20
|
-
src="/assets/images/logo-light.svg"
|
|
21
|
-
width="160"
|
|
22
|
-
class="logo"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="version" id="version"><span> </span></div>
|
|
26
|
-
<div class="status" id="status">...</div>
|
|
27
|
-
<div class="loader">
|
|
28
|
-
<div></div>
|
|
29
|
-
<div></div>
|
|
30
|
-
<div></div>
|
|
31
|
-
<div></div>
|
|
32
|
-
<div></div>
|
|
33
|
-
<div></div>
|
|
34
|
-
<div></div>
|
|
35
|
-
<div></div>
|
|
36
|
-
<div></div>
|
|
37
|
-
<div></div>
|
|
38
|
-
<div></div>
|
|
39
|
-
<div></div>
|
|
40
|
-
<div></div>
|
|
41
|
-
<div></div>
|
|
42
|
-
<div></div>
|
|
43
|
-
<div></div>
|
|
44
|
-
<div></div>
|
|
45
|
-
<div></div>
|
|
46
|
-
<div></div>
|
|
47
|
-
<div></div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="copyright" id="copyright">
|
|
50
|
-
Interop Inc All rights reserved.
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<script type="module" src="/src/main.ts"></script>
|
|
54
|
-
</body>
|
|
55
|
-
</html>
|