@larkup/marketplace 0.2.4 → 0.2.5
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/.turbo/turbo-test.log
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
> @larkup/marketplace@0.2.
|
|
2
|
+
> @larkup/marketplace@0.2.5 test /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
RUN v4.1.11 /Users/abdelrahmanabounida/Desktop/my-ai-startup/larkup/larkup/packages/marketplace
|
|
7
7
|
|
|
8
|
-
✓ src/tool-loader.test.ts (3 tests)
|
|
9
|
-
✓ src/
|
|
10
|
-
✓ src/
|
|
11
|
-
ELIFECYCLE Test failed. See above for more details.
|
|
8
|
+
✓ src/tool-loader.test.ts (3 tests) 80ms
|
|
9
|
+
✓ src/storage-provider-s3.test.ts (8 tests) 6ms
|
|
10
|
+
✓ src/tool-registry.test.ts (2 tests) 9ms
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@larkup/marketplace",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dotenv": "^17.4.2",
|
|
34
34
|
"drizzle-kit": "^0.31.10",
|
|
35
35
|
"typescript": "^7.0.2",
|
|
36
|
-
"vitest": "^
|
|
36
|
+
"vitest": "^5.0.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"type-check": "tsc --noEmit",
|
package/src/db/builtin-tools.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const BUILTIN_TOOLS: Record<string, unknown>[] = [
|
|
|
10
10
|
longDescription:
|
|
11
11
|
'Turn videos into knowledge your AI can understand. It listens to what is said, reads what appears on screen, and helps you find the moments that matter.',
|
|
12
12
|
category: 'media',
|
|
13
|
-
version: '0.2.
|
|
13
|
+
version: '0.2.9',
|
|
14
14
|
pricing: 'free',
|
|
15
15
|
emoji: '🎬',
|
|
16
16
|
icon: 'Film',
|
package/src/tool-installer.ts
CHANGED
|
@@ -572,6 +572,7 @@ export async function installTool(
|
|
|
572
572
|
const manifest = await readManifest();
|
|
573
573
|
const existing = manifest.tools.findIndex((t) => t.id === toolId);
|
|
574
574
|
|
|
575
|
+
const existingTool = existing >= 0 ? manifest.tools[existing] : undefined;
|
|
575
576
|
const entry: InstalledTool = {
|
|
576
577
|
id: toolId,
|
|
577
578
|
version: installedVersion,
|
|
@@ -579,7 +580,13 @@ export async function installTool(
|
|
|
579
580
|
packageName: descriptor.packageName,
|
|
580
581
|
resolvedPath,
|
|
581
582
|
source,
|
|
582
|
-
|
|
583
|
+
// Updating a package must not silently discard settings that are kept in
|
|
584
|
+
// the installation manifest. Explicit input still wins over prior values.
|
|
585
|
+
config: {
|
|
586
|
+
...buildDefaultConfig(descriptor),
|
|
587
|
+
...(existingTool?.config ?? {}),
|
|
588
|
+
...initialConfig,
|
|
589
|
+
},
|
|
583
590
|
};
|
|
584
591
|
|
|
585
592
|
if (existing >= 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { buildRegistry, invalidateRegistryCache } from './tool-registry';
|
|
2
|
+
import { buildRegistry, compareToolVersions, invalidateRegistryCache } from './tool-registry';
|
|
3
3
|
|
|
4
4
|
describe('tool registry fallback catalog', () => {
|
|
5
5
|
it('keeps Video Intelligence installable when a remote catalog is stale or incomplete', async () => {
|
|
@@ -13,3 +13,10 @@ describe('tool registry fallback catalog', () => {
|
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
|
+
|
|
17
|
+
describe('tool version comparison', () => {
|
|
18
|
+
it('does not let a stale catalog version outrank a newer installed release', () => {
|
|
19
|
+
expect(compareToolVersions('0.2.9', '0.2.8')).toBeGreaterThan(0);
|
|
20
|
+
expect(compareToolVersions('0.2.8', '0.2.9')).toBeLessThan(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
package/src/tool-registry.ts
CHANGED
|
@@ -23,7 +23,7 @@ function normalizeToolDescriptor(descriptor: ToolDescriptor): ToolDescriptor {
|
|
|
23
23
|
* use stable releases, but accepting a suffix keeps a pre-release catalog
|
|
24
24
|
* entry from incorrectly outranking its corresponding stable release.
|
|
25
25
|
*/
|
|
26
|
-
function compareToolVersions(left: string, right: string): number {
|
|
26
|
+
export function compareToolVersions(left: string, right: string): number {
|
|
27
27
|
const parse = (version: string) => {
|
|
28
28
|
const [core, suffix = ''] = version.split('-', 2);
|
|
29
29
|
const parts = core.split('.').map((part) => Number.parseInt(part, 10) || 0);
|