fraim-hub 2.0.252 → 2.0.253
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.
|
@@ -99,17 +99,21 @@ function configureAutoUpdater() {
|
|
|
99
99
|
// ---------------------------------------------------------------------------
|
|
100
100
|
// Word manifest sideload (runs once on first launch)
|
|
101
101
|
// ---------------------------------------------------------------------------
|
|
102
|
-
function ensureWordSideload(projectPath,
|
|
102
|
+
function ensureWordSideload(projectPath, httpsPort) {
|
|
103
103
|
// Flag version bump: bump this string when new manifests are added so all
|
|
104
104
|
// users get re-sideloaded on their next launch.
|
|
105
|
-
const FLAG_VERSION = '
|
|
106
|
-
const expectedFlag = `${FLAG_VERSION}:${
|
|
105
|
+
const FLAG_VERSION = 'v5-https-port';
|
|
106
|
+
const expectedFlag = `${FLAG_VERSION}:${httpsPort}`;
|
|
107
107
|
const flagPath = path_1.default.join(electron_1.app.getPath('userData'), 'word-sideloaded.flag');
|
|
108
108
|
const existingFlag = fs_1.default.existsSync(flagPath) ? fs_1.default.readFileSync(flagPath, 'utf8') : null;
|
|
109
109
|
if ((0, office_sideload_1.shouldSkipSideloadForFlag)(existingFlag, expectedFlag, (0, office_sideload_1.isSideloaded)()))
|
|
110
110
|
return;
|
|
111
|
-
if (
|
|
112
|
-
const result = (0, office_sideload_1.sideloadManifest)(projectPath, {
|
|
111
|
+
if (httpsPort > 0) {
|
|
112
|
+
const result = (0, office_sideload_1.sideloadManifest)(projectPath, {
|
|
113
|
+
webPort: httpsPort,
|
|
114
|
+
webProtocol: 'https',
|
|
115
|
+
userDataDir: electron_1.app.getPath('userData'),
|
|
116
|
+
});
|
|
113
117
|
if (!result.ok) {
|
|
114
118
|
console.warn('[fraim] Office sideload skipped:', result.reason);
|
|
115
119
|
return; // don't write flag — retry next launch
|
|
@@ -362,7 +366,7 @@ async function launchDesktopShell(options) {
|
|
|
362
366
|
catch (err) {
|
|
363
367
|
console.warn('[fraim] could not write hub runtime file:', err);
|
|
364
368
|
}
|
|
365
|
-
ensureWordSideload(resolvedProjectPath,
|
|
369
|
+
ensureWordSideload(resolvedProjectPath, httpsPort);
|
|
366
370
|
const hubUrl = `http://127.0.0.1:${httpPort}/ai-hub/`;
|
|
367
371
|
createTray(hubUrl, runtimeId);
|
|
368
372
|
await createWindow(hubUrl, runtimeId);
|
|
@@ -62,18 +62,20 @@ function macWefPath(container, guid) {
|
|
|
62
62
|
function generatedManifestPath(entry, userDataDir) {
|
|
63
63
|
return path_1.default.join(userDataDir, 'office-manifests', entry.guid, 'manifest.xml');
|
|
64
64
|
}
|
|
65
|
-
function manifestXmlForPort(xml,
|
|
66
|
-
return xml.replace(/https?:\/\/(?:localhost|127\.0\.0\.1):(43091|43092)/g,
|
|
65
|
+
function manifestXmlForPort(xml, webPort, protocol = 'https') {
|
|
66
|
+
return xml.replace(/https?:\/\/(?:localhost|127\.0\.0\.1):(43091|43092)/g, `${protocol}://127.0.0.1:${webPort}`);
|
|
67
67
|
}
|
|
68
68
|
function shouldSkipSideloadForFlag(existingFlag, expectedFlag, sideloaded) {
|
|
69
69
|
return existingFlag?.trim() === expectedFlag && sideloaded;
|
|
70
70
|
}
|
|
71
71
|
function prepareManifestForSideload(entry, sourcePath, options) {
|
|
72
|
-
|
|
72
|
+
const webPort = options.webPort ?? options.httpPort;
|
|
73
|
+
if (!webPort)
|
|
73
74
|
return sourcePath;
|
|
75
|
+
const webProtocol = options.webProtocol ?? 'https';
|
|
74
76
|
const userDataDir = options.userDataDir || path_1.default.join(os_1.default.homedir(), '.fraim');
|
|
75
77
|
const dest = generatedManifestPath(entry, userDataDir);
|
|
76
|
-
const rendered = manifestXmlForPort(fs_1.default.readFileSync(sourcePath, 'utf8'),
|
|
78
|
+
const rendered = manifestXmlForPort(fs_1.default.readFileSync(sourcePath, 'utf8'), webPort, webProtocol);
|
|
77
79
|
fs_1.default.mkdirSync(path_1.default.dirname(dest), { recursive: true });
|
|
78
80
|
fs_1.default.writeFileSync(dest, rendered, { encoding: 'utf8' });
|
|
79
81
|
return dest;
|
|
@@ -120,6 +122,7 @@ function winWriteRegisteredValue(guid, manifestPath) {
|
|
|
120
122
|
// Remove the older root-value registration if present. Office does not need
|
|
121
123
|
// it, and keeping two registration shapes makes stale-state diagnosis harder.
|
|
122
124
|
(0, child_process_1.spawnSync)('reg', ['delete', WEF_DEVELOPER_KEY, '/v', guid, '/f'], { encoding: 'utf8' });
|
|
125
|
+
(0, child_process_1.spawnSync)('reg', ['delete', `${WEF_DEVELOPER_KEY}\\${guid}`, '/f'], { encoding: 'utf8' });
|
|
123
126
|
return { ok: true };
|
|
124
127
|
}
|
|
125
128
|
// ---------------------------------------------------------------------------
|
|
@@ -178,6 +181,7 @@ function removeSideload() {
|
|
|
178
181
|
for (const entry of MANIFESTS) {
|
|
179
182
|
if (process.platform === 'win32') {
|
|
180
183
|
(0, child_process_1.spawnSync)('reg', ['delete', WEF_DEVELOPER_KEY, '/v', entry.guid, '/f'], { encoding: 'utf8' });
|
|
184
|
+
(0, child_process_1.spawnSync)('reg', ['delete', `${WEF_DEVELOPER_KEY}\\${entry.guid}`, '/f'], { encoding: 'utf8' });
|
|
181
185
|
(0, child_process_1.spawnSync)('reg', ['delete', winDeveloperManifestSubkey(entry.guid), '/f'], { encoding: 'utf8' });
|
|
182
186
|
}
|
|
183
187
|
else if (process.platform === 'darwin') {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
|
|
5
5
|
xsi:type="TaskPaneApp">
|
|
6
6
|
<Id>d1090951-50cf-4cf2-9d12-b0f8541d265c</Id>
|
|
7
|
-
<Version>1.0.
|
|
7
|
+
<Version>1.0.1.0</Version>
|
|
8
8
|
<ProviderName>FRAIM</ProviderName>
|
|
9
9
|
<DefaultLocale>en-US</DefaultLocale>
|
|
10
10
|
<DisplayName DefaultValue="FRAIM"/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-hub",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.253",
|
|
4
4
|
"description": "FRAIM Hub local companion package.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fraim-hub": "bin/fraim-hub.js",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"electron": "^41.2.2",
|
|
164
164
|
"electron-updater": "^6.8.9",
|
|
165
165
|
"express": "^5.2.1",
|
|
166
|
-
"fraim": "2.0.
|
|
166
|
+
"fraim": "2.0.253",
|
|
167
167
|
"mongodb": "^7.0.0",
|
|
168
168
|
"node-cron": "4.2.1",
|
|
169
169
|
"node-edge-tts": "^1.2.10",
|