feat: add quota tracking
This commit is contained in:
@@ -96,7 +96,7 @@ async function install(mode: "native" | "checksum" | "legacy", configured = fals
|
||||
version: "1.0.0",
|
||||
type: "module",
|
||||
main: "./dist/index.js",
|
||||
exports: "./dist/index.js",
|
||||
exports: { ".": "./dist/index.js", "./tui": "./dist/tui.js" },
|
||||
scripts: { postinstall: "bun ./postinstall.js" },
|
||||
}),
|
||||
),
|
||||
@@ -111,6 +111,10 @@ async function install(mode: "native" | "checksum" | "legacy", configured = fals
|
||||
? 'export default { id: "stanp-opencode", async server() { return {}; } };\n'
|
||||
: 'export default { id: "stanp-opencode", setup() { return "native-ready"; } };\n'),
|
||||
),
|
||||
writeFile(
|
||||
join(fixture, "dist", "tui.js"),
|
||||
'export default { id: "stanp-opencode.quota-tui", setup() { return "tui-ready"; } };\n',
|
||||
),
|
||||
]);
|
||||
const env = {
|
||||
...Bun.env,
|
||||
@@ -220,6 +224,7 @@ test("installs an importable native plugin and default config under XDG without
|
||||
expect(await Bun.file(join(config, "plugins", "stanp-opencode", "package.json")).exists()).toBe(
|
||||
true,
|
||||
);
|
||||
expect(await Bun.file(join(config, "plugins", "stanp-opencode", "tui.js")).exists()).toBe(true);
|
||||
expect(
|
||||
await readFile(join(config, "stanp-opencode", "install.previous", "index.js"), "utf8"),
|
||||
).toBe(previousPlugin);
|
||||
|
||||
Reference in New Issue
Block a user