Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"type": "module",
"files": [
"dist",
"assets",
"config",
"schemas",
"cordisx-package.json",
Expand Down
6 changes: 3 additions & 3 deletions src/icon.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const CLI_PROXY_MODEL_PROVIDER_ICON = {
encoding: 'base64',
data: CLI_PROXY_ICON.data,
width: 256,
height: 210,
height: 256,
},
} as const satisfies BrandIconV1

Expand Down
10 changes: 9 additions & 1 deletion test/manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ async function loadModelProviderRegistry() {
return await import(`data:text/javascript;base64,${source}`)
}

test('bundles the plugin-owned 256px brand PNG for Host plugin lists', async () => {
const source = await readFile(new URL('../assets/icon.png', import.meta.url))
assert.equal(plugin.icon.mediaType, 'image/png')
assert.deepEqual(Buffer.from(plugin.icon.data, 'base64'), source)
assert.equal(source.readUInt32BE(16), 256)
assert.equal(source.readUInt32BE(20), 256)
})

test('exports the CLIProxy renderer manifest through public Host contracts', () => {
assert.equal(plugin.manifest.schemaVersion, 1)
assert.equal(plugin.manifest.id, 'cli-proxy-api')
Expand Down Expand Up @@ -188,7 +196,7 @@ test('registers CLIProxyAPI branding and Manager settings without a Provider ses
encoding: 'base64',
data: plugin.icon.data,
width: 256,
height: 210,
height: 256,
},
},
})
Expand Down
1 change: 1 addition & 0 deletions test/package-artifact.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ test('packs gateway runtime data resources into the tarball', async () => {
})
const [{ files }] = JSON.parse(stdout)
const archiveFiles = new Set(files.map(file => file.path))
assert.equal(archiveFiles.has('assets/icon.png'), true, 'tarball is missing the plugin brand PNG')
for (const resource of gatewayRuntimeResources) {
const path = resource.path.slice(2)
assert.equal(archiveFiles.has(path), true, `tarball is missing ${path}`)
Expand Down
Loading