ocx 1.0.18 → 1.0.19

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/dist/index.js CHANGED
@@ -4515,7 +4515,7 @@ import { dirname, join } from "path";
4515
4515
  // package.json
4516
4516
  var package_default = {
4517
4517
  name: "ocx",
4518
- version: "1.0.18",
4518
+ version: "1.0.19",
4519
4519
  description: "OCX CLI - ShadCN-style registry for OpenCode extensions. Install agents, plugins, skills, and MCP servers.",
4520
4520
  author: "kdcokenny",
4521
4521
  license: "MIT",
@@ -12530,11 +12530,16 @@ class BuildRegistryError extends Error {
12530
12530
  }
12531
12531
  async function buildRegistry(options2) {
12532
12532
  const { source: sourcePath, out: outPath } = options2;
12533
- const registryFile = Bun.file(join2(sourcePath, "registry.json"));
12534
- if (!await registryFile.exists()) {
12535
- throw new BuildRegistryError("No registry.json found in source directory");
12536
- }
12537
- const registryData = await registryFile.json();
12533
+ const jsoncFile = Bun.file(join2(sourcePath, "registry.jsonc"));
12534
+ const jsonFile = Bun.file(join2(sourcePath, "registry.json"));
12535
+ const jsoncExists = await jsoncFile.exists();
12536
+ const jsonExists = await jsonFile.exists();
12537
+ if (!jsoncExists && !jsonExists) {
12538
+ throw new BuildRegistryError("No registry.jsonc or registry.json found in source directory");
12539
+ }
12540
+ const registryFile = jsoncExists ? jsoncFile : jsonFile;
12541
+ const content2 = await registryFile.text();
12542
+ const registryData = parse2(content2, [], { allowTrailingComma: true });
12538
12543
  const parseResult = registrySchema.safeParse(registryData);
12539
12544
  if (!parseResult.success) {
12540
12545
  const errors3 = parseResult.error.errors.map((e3) => `${e3.path.join(".")}: ${e3.message}`);
@@ -14184,7 +14189,7 @@ async function hashBundle2(files) {
14184
14189
  `));
14185
14190
  }
14186
14191
  // src/index.ts
14187
- var version = "1.0.18";
14192
+ var version = "1.0.19";
14188
14193
  async function main2() {
14189
14194
  const program2 = new Command().name("ocx").description("OpenCode Extensions - Install agents, skills, plugins, and commands").version(version);
14190
14195
  registerInitCommand(program2);
@@ -14210,4 +14215,4 @@ export {
14210
14215
  buildRegistry
14211
14216
  };
14212
14217
 
14213
- //# debugId=EB704B787D95653F64756E2164756E21
14218
+ //# debugId=0D49BD27AE67423564756E2164756E21