@walkhi/code-relax 0.1.0-beta.78 → 0.1.0-beta.79
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/build-platform.json +1 -1
- package/dist/src/server.mjs +3 -3
- package/package.json +4 -4
package/dist/build-platform.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"layout":"npm-platform-packages","version":"0.1.0-beta.
|
|
1
|
+
{"layout":"npm-platform-packages","version":"0.1.0-beta.79"}
|
package/dist/src/server.mjs
CHANGED
|
@@ -123,7 +123,7 @@ const managedAppServer = new ManagedAppServer({ stateRoot, host: desktopHost, di
|
|
|
123
123
|
const hostedHistoryCache = new HostedHistoryCache(stateRoot);
|
|
124
124
|
const dotsServer = new DotsAppServer(managedAppServer.client, desktopDotsProfiles(codexDataRoot, stateRoot), hostedHistoryCache, { uploadsRoot });
|
|
125
125
|
const dotsImages = new DotsMessageImages({ localServer: managedAppServer.client, identity: () => dotsServer.profileIdentity,
|
|
126
|
-
cache: attachmentCache, capabilityKey: imageCapabilityKey, maxEntries: MAX_CACHED_ATTACHMENTS, maxBytes:
|
|
126
|
+
cache: attachmentCache, capabilityKey: imageCapabilityKey, maxEntries: MAX_CACHED_ATTACHMENTS, maxBytes: MAX_IMAGE_PREVIEW_BYTES });
|
|
127
127
|
const dotsChat = new DotsChatServer(dotsServer, undefined, { uploadsRoot });
|
|
128
128
|
managedAppServer.on('state', state => { if (state.ready) dotsChat.startBackgroundActivity(); });
|
|
129
129
|
const runtimeDiscovery = new RuntimeDiscovery({ stateRoot, host: desktopHost,
|
|
@@ -1815,7 +1815,7 @@ function cacheDataImage(dataUrl, name) {
|
|
|
1815
1815
|
if (!match) return null;
|
|
1816
1816
|
try {
|
|
1817
1817
|
const buffer = Buffer.from(match[2], 'base64');
|
|
1818
|
-
if (!buffer.length || buffer.length >
|
|
1818
|
+
if (!buffer.length || buffer.length > MAX_IMAGE_PREVIEW_BYTES) return null;
|
|
1819
1819
|
return rememberAttachment(buffer, match[1].toLowerCase(), name);
|
|
1820
1820
|
} catch {
|
|
1821
1821
|
return null;
|
|
@@ -1854,7 +1854,7 @@ function recoverLocalImage(id, token) {
|
|
|
1854
1854
|
decipher.update(value.subarray(28)), decipher.final(),
|
|
1855
1855
|
]).toString('utf8'));
|
|
1856
1856
|
if (typeof filePath !== 'string' || !path.isAbsolute(filePath)
|
|
1857
|
-
|| !Number.isSafeInteger(size) || size <= 0 || size >
|
|
1857
|
+
|| !Number.isSafeInteger(size) || size <= 0 || size > MAX_IMAGE_PREVIEW_BYTES
|
|
1858
1858
|
|| typeof mtimeMs !== 'number' || !Number.isFinite(mtimeMs)) return null;
|
|
1859
1859
|
const stat = fs.statSync(filePath);
|
|
1860
1860
|
const mimeType = imageMimeType(filePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkhi/code-relax",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.79",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"tag": "beta"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@walkhi/code-relax-native-win32-x64": "0.1.0-beta.
|
|
45
|
-
"@walkhi/code-relax-native-darwin-arm64": "0.1.0-beta.
|
|
46
|
-
"@walkhi/code-relax-native-darwin-x64": "0.1.0-beta.
|
|
44
|
+
"@walkhi/code-relax-native-win32-x64": "0.1.0-beta.79",
|
|
45
|
+
"@walkhi/code-relax-native-darwin-arm64": "0.1.0-beta.79",
|
|
46
|
+
"@walkhi/code-relax-native-darwin-x64": "0.1.0-beta.79"
|
|
47
47
|
}
|
|
48
48
|
}
|