Skip to content

Commit 128f09c

Browse files
authored
fix: add marketplace plugin icon
Adds a Codex marketplace composer icon, wires the plugin manifest, and validates icon/version integrity.
1 parent a00fb61 commit 128f09c

3 files changed

Lines changed: 84 additions & 1 deletion

File tree

.codex-plugin/plugin.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "codex-multi-auth",
3-
"version": "1.2.2",
3+
"version": "2.1.10",
44
"description": "Install and operate codex-multi-auth for the official @openai/codex CLI with multi-account OAuth rotation, switching, health checks, and recovery tools.",
5+
"interface": {
6+
"composerIcon": "./assets/codex-multi-auth-icon.svg"
7+
},
58
"skills": "./skills/"
69
}

assets/codex-multi-auth-icon.svg

Lines changed: 39 additions & 0 deletions
Loading

test/plugin-manifest.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { existsSync, readFileSync } from "node:fs";
2+
import path from "node:path";
3+
import { describe, expect, it } from "vitest";
4+
5+
type PluginManifest = {
6+
version?: string;
7+
interface?: {
8+
composerIcon?: string;
9+
};
10+
};
11+
12+
type PackageManifest = {
13+
version?: string;
14+
};
15+
16+
const pluginManifestPath = path.join(".codex-plugin", "plugin.json");
17+
18+
const readJson = <T>(filePath: string): T => JSON.parse(readFileSync(filePath, "utf8")) as T;
19+
20+
const resolveRepoRootRelativePath = (relativePath: string): string =>
21+
path.resolve(relativePath.replace(/^\.\//, ""));
22+
23+
describe("Codex plugin manifest", () => {
24+
it("declares an existing marketplace composer icon and matches the package version", () => {
25+
const manifest = readJson<PluginManifest>(pluginManifestPath);
26+
const pkg = readJson<PackageManifest>("package.json");
27+
28+
expect(manifest.interface?.composerIcon).toBe("./assets/codex-multi-auth-icon.svg");
29+
expect(manifest.version).toBe(pkg.version);
30+
31+
const iconPath = manifest.interface?.composerIcon;
32+
expect(iconPath).toBeDefined();
33+
expect(existsSync(resolveRepoRootRelativePath(iconPath ?? ""))).toBe(true);
34+
});
35+
36+
it("normalizes dot-slash icon paths before resolving them from the repository root", () => {
37+
expect(resolveRepoRootRelativePath("./assets/codex-multi-auth-icon.svg")).toBe(
38+
path.resolve("assets", "codex-multi-auth-icon.svg"),
39+
);
40+
});
41+
});

0 commit comments

Comments
 (0)