plugnz 0.0.23 → 0.0.24

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.
Files changed (2) hide show
  1. package/dist/plugnz.mjs +8 -4
  2. package/package.json +1 -1
package/dist/plugnz.mjs CHANGED
@@ -19705,7 +19705,7 @@ var codexWriter = {
19705
19705
  [`, idx + header.length);
19706
19706
  const end = nextTable === -1 ? toml.length : nextTable;
19707
19707
  const block = toml.slice(idx, end);
19708
- const withoutEnabled = block.replace(/^enabled\s*=\s*(true|false)\s*\n?/mu, "");
19708
+ const withoutEnabled = block.replace(enabledAssignment("true|false", true), "");
19709
19709
  const remaining = withoutEnabled.slice(header.length).trim();
19710
19710
  const replacement = remaining === "" ? "" : `${withoutEnabled.trimEnd()}
19711
19711
  enabled = false
@@ -19717,6 +19717,10 @@ enabled = false
19717
19717
  rmSync7(candidate, { recursive: true, force: true });
19718
19718
  }
19719
19719
  };
19720
+ var ENABLED_ASSIGNMENT_TAIL = String.raw`[ \t]*(?:#.*)?`;
19721
+ function enabledAssignment(value, consumeNewline = false) {
19722
+ return new RegExp(`^enabled\\s*=\\s*(?:${value})${ENABLED_ASSIGNMENT_TAIL}$${consumeNewline ? "\\n?" : ""}`, "mu");
19723
+ }
19720
19724
  function enable(configPath, id) {
19721
19725
  let toml = existsSync22(configPath) ? readFileSync23(configPath, "utf8") : "";
19722
19726
  parseConfigToml(toml, configPath);
@@ -19728,7 +19732,7 @@ function enable(configPath, id) {
19728
19732
  [`, idx + header.length);
19729
19733
  const blockEnd = nextTable !== -1 ? nextTable : toml.length;
19730
19734
  const block = toml.slice(idx, blockEnd);
19731
- const enabled = /^([ \t]*enabled[ \t]*=[ \t]*)(true|false)([ \t]*(?:#.*)?)$/gmu;
19735
+ const enabled = new RegExp(`^([ \\t]*enabled[ \\t]*=[ \\t]*)(true|false)(${ENABLED_ASSIGNMENT_TAIL})$`, "gmu");
19732
19736
  const matches = [...block.matchAll(enabled)];
19733
19737
  if (matches.length > 1)
19734
19738
  throw new Error(`duplicate enabled keys in Codex plugin config: ${id}`);
@@ -19772,7 +19776,7 @@ function isEnabled(configPath, id) {
19772
19776
  const nextTable = toml.indexOf(`
19773
19777
  [`, idx + header.length);
19774
19778
  const block = toml.slice(idx, nextTable === -1 ? toml.length : nextTable);
19775
- return !/^enabled\s*=\s*false\s*$/mu.test(block);
19779
+ return !enabledAssignment("false").test(block);
19776
19780
  }
19777
19781
  function readConfigSnapshot(path) {
19778
19782
  if (!existsSync22(path))
@@ -34017,7 +34021,7 @@ function legacyCommandAction(command) {
34017
34021
  // package.json
34018
34022
  var package_default = {
34019
34023
  name: "plugnz",
34020
- version: "0.0.23",
34024
+ version: "0.0.24",
34021
34025
  description: "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
34022
34026
  license: "MIT",
34023
34027
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugnz",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
5
5
  "license": "MIT",
6
6
  "type": "module",