@larkup/marketplace 0.1.7 → 0.1.8
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/tool-installer.ts +25 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @larkup/marketplace
|
|
2
2
|
|
|
3
|
+
## 0.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 592c637: Fix standalone startup and Docker runtime compatibility, make bundled marketplace tools ready immediately, and improve ingestion, chat retrieval, media preview, and analytics feedback.
|
|
8
|
+
|
|
3
9
|
## 0.1.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
package/src/tool-installer.ts
CHANGED
|
@@ -14,6 +14,16 @@ import { getToolById, invalidateRegistryCache } from './tool-registry';
|
|
|
14
14
|
|
|
15
15
|
const execAsync = promisify(execCb);
|
|
16
16
|
|
|
17
|
+
// npm mutates a shared node_modules tree. Serializing those mutations prevents
|
|
18
|
+
// double-clicks or concurrent API requests from colliding during npm's rename
|
|
19
|
+
// phase (the source of the ENOTEMPTY failures seen in installed applications).
|
|
20
|
+
let packageMutationChain: Promise<unknown> = Promise.resolve();
|
|
21
|
+
function serializePackageMutation<T>(fn: () => Promise<T>): Promise<T> {
|
|
22
|
+
const run = packageMutationChain.then(fn, fn);
|
|
23
|
+
packageMutationChain = run.catch(() => {});
|
|
24
|
+
return run;
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
/**
|
|
18
28
|
* Tool installer — manages installing / uninstalling marketplace tools.
|
|
19
29
|
*
|
|
@@ -96,7 +106,10 @@ async function writeManifest(manifest: InstalledToolsManifest) {
|
|
|
96
106
|
export async function getInstalledTools(): Promise<InstalledTool[]> {
|
|
97
107
|
const manifest = await readManifest();
|
|
98
108
|
const tools = [...manifest.tools];
|
|
99
|
-
|
|
109
|
+
// The desktop/web distribution already ships these first-party packages as
|
|
110
|
+
// direct dependencies. Treat them as available immediately rather than
|
|
111
|
+
// downloading a second copy into the isolated tools folder.
|
|
112
|
+
const bundledIds = (process.env.LARKUP_BUNDLED_TOOLS ?? 'doc-editor,video-audio')
|
|
100
113
|
.split(',')
|
|
101
114
|
.map((id) => id.trim())
|
|
102
115
|
.filter(Boolean);
|
|
@@ -233,6 +246,17 @@ async function execInstall(
|
|
|
233
246
|
version: string,
|
|
234
247
|
target: DeploymentTarget,
|
|
235
248
|
onProgress?: (message: string) => void,
|
|
249
|
+
): Promise<{ resolvedPath: string; version: string }> {
|
|
250
|
+
return serializePackageMutation(() =>
|
|
251
|
+
execInstallUnlocked(packageName, version, target, onProgress),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
async function execInstallUnlocked(
|
|
256
|
+
packageName: string,
|
|
257
|
+
version: string,
|
|
258
|
+
target: DeploymentTarget,
|
|
259
|
+
onProgress?: (message: string) => void,
|
|
236
260
|
): Promise<{ resolvedPath: string; version: string }> {
|
|
237
261
|
const toolsDir = getToolsDir();
|
|
238
262
|
|