@useorgx/wizard 0.1.61 → 0.1.62
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/cli.js +69 -20
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
|
|
5
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
5
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="132d0d75-ee1b-5262-9ce6-1091765e2527")}catch(e){}}();
|
|
6
6
|
import * as clack from "@clack/prompts";
|
|
7
7
|
import { spawnSync as spawnSync5 } from "child_process";
|
|
8
8
|
import { readFileSync as readFileSync10 } from "fs";
|
|
@@ -6354,7 +6354,7 @@ function initializeWizardSentry() {
|
|
|
6354
6354
|
Sentry.init({
|
|
6355
6355
|
dsn,
|
|
6356
6356
|
environment: process.env.ORGX_SENTRY_ENVIRONMENT || "production",
|
|
6357
|
-
release: "useorgx-wizard@0.1.
|
|
6357
|
+
release: "useorgx-wizard@0.1.62",
|
|
6358
6358
|
tracesSampleRate: sampleRate(process.env.ORGX_SENTRY_TRACES_SAMPLE_RATE),
|
|
6359
6359
|
enableLogs: true,
|
|
6360
6360
|
sendDefaultPii: false,
|
|
@@ -14885,11 +14885,6 @@ function mergeCodexHooks(raw, paths) {
|
|
|
14885
14885
|
outboxPath: paths.outboxPath,
|
|
14886
14886
|
sourceClient: "codex"
|
|
14887
14887
|
});
|
|
14888
|
-
const already = existing.some(
|
|
14889
|
-
(entry) => isRecord(entry) && typeof entry.command === "string" && entry.command.includes(HOOK_MARKER)
|
|
14890
|
-
);
|
|
14891
|
-
const next = already ? [...existing] : [...existing, { command }];
|
|
14892
|
-
if (!already) changed = true;
|
|
14893
14888
|
const desiredSummaryCommand = buildSummaryHookCommand({
|
|
14894
14889
|
deliveryCliPath: paths.deliveryCliPath,
|
|
14895
14890
|
deliveryNodePath: paths.deliveryNodePath,
|
|
@@ -14899,20 +14894,74 @@ function mergeCodexHooks(raw, paths) {
|
|
|
14899
14894
|
sourceClient: "codex",
|
|
14900
14895
|
summaryHookScriptPath: paths.summaryHookScriptPath
|
|
14901
14896
|
});
|
|
14902
|
-
|
|
14903
|
-
(entry) => isRecord(entry) &&
|
|
14897
|
+
let universal = existing.find(
|
|
14898
|
+
(entry) => isRecord(entry) && Array.isArray(entry.hooks) && (entry.matcher === void 0 || entry.matcher === "")
|
|
14904
14899
|
);
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14900
|
+
if (!isRecord(universal)) {
|
|
14901
|
+
universal = { matcher: "", hooks: [] };
|
|
14902
|
+
existing.push(universal);
|
|
14903
|
+
changed = true;
|
|
14904
|
+
}
|
|
14905
|
+
const universalGroup = universal;
|
|
14906
|
+
const desired = [
|
|
14907
|
+
{ marker: HOOK_MARKER, command },
|
|
14908
|
+
{ marker: SUMMARY_HOOK_MARKER, command: desiredSummaryCommand }
|
|
14909
|
+
];
|
|
14910
|
+
const kept = /* @__PURE__ */ new Set();
|
|
14911
|
+
const normalized = [];
|
|
14912
|
+
for (const entry of existing) {
|
|
14913
|
+
if (!isRecord(entry)) {
|
|
14914
|
+
normalized.push(entry);
|
|
14915
|
+
continue;
|
|
14916
|
+
}
|
|
14917
|
+
const legacyCommand = entry.command;
|
|
14918
|
+
if (typeof legacyCommand === "string") {
|
|
14919
|
+
if (desired.some(({ marker }) => legacyCommand.includes(marker))) {
|
|
14920
|
+
changed = true;
|
|
14921
|
+
continue;
|
|
14922
|
+
}
|
|
14923
|
+
normalized.push(entry);
|
|
14924
|
+
continue;
|
|
14925
|
+
}
|
|
14926
|
+
if (!Array.isArray(entry.hooks)) {
|
|
14927
|
+
normalized.push(entry);
|
|
14928
|
+
continue;
|
|
14929
|
+
}
|
|
14930
|
+
const nextHandlers = [];
|
|
14931
|
+
for (const handler of entry.hooks) {
|
|
14932
|
+
if (!isRecord(handler)) {
|
|
14933
|
+
nextHandlers.push(handler);
|
|
14934
|
+
continue;
|
|
14935
|
+
}
|
|
14936
|
+
const handlerCommand = handler.command;
|
|
14937
|
+
if (typeof handlerCommand !== "string") {
|
|
14938
|
+
nextHandlers.push(handler);
|
|
14939
|
+
continue;
|
|
14940
|
+
}
|
|
14941
|
+
const target = desired.find(
|
|
14942
|
+
({ marker }) => handlerCommand.includes(marker)
|
|
14943
|
+
);
|
|
14944
|
+
if (!target) {
|
|
14945
|
+
nextHandlers.push(handler);
|
|
14946
|
+
continue;
|
|
14947
|
+
}
|
|
14948
|
+
if (entry === universalGroup && handler.type === "command" && handlerCommand === target.command && !kept.has(target.marker)) {
|
|
14949
|
+
nextHandlers.push(handler);
|
|
14950
|
+
kept.add(target.marker);
|
|
14951
|
+
} else {
|
|
14952
|
+
changed = true;
|
|
14953
|
+
}
|
|
14954
|
+
}
|
|
14955
|
+
entry.hooks = nextHandlers;
|
|
14956
|
+
normalized.push(entry);
|
|
14957
|
+
}
|
|
14958
|
+
const universalHandlers = universalGroup.hooks;
|
|
14959
|
+
for (const target of desired) {
|
|
14960
|
+
if (kept.has(target.marker)) continue;
|
|
14961
|
+
universalHandlers.push({ type: "command", command: target.command });
|
|
14912
14962
|
changed = true;
|
|
14913
|
-
continue;
|
|
14914
14963
|
}
|
|
14915
|
-
hooks[event] =
|
|
14964
|
+
hooks[event] = normalized;
|
|
14916
14965
|
}
|
|
14917
14966
|
value.hooks = hooks;
|
|
14918
14967
|
return { changed: changed || !raw, value };
|
|
@@ -18385,7 +18434,7 @@ async function main() {
|
|
|
18385
18434
|
initializeWizardSentry();
|
|
18386
18435
|
const program = new Command();
|
|
18387
18436
|
program.name("orgx-wizard").description("Add OrgX MCP configs, skills/rules, and companion plugins to your local AI tools.").showHelpAfterError();
|
|
18388
|
-
const pkgVersion = true ? "0.1.
|
|
18437
|
+
const pkgVersion = true ? "0.1.62" : void 0;
|
|
18389
18438
|
program.version(pkgVersion ?? "unknown", "-V, --version");
|
|
18390
18439
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
18391
18440
|
if (Boolean(actionCommand.optsWithGlobals().json)) return;
|
|
@@ -19429,4 +19478,4 @@ main().catch(async (error) => {
|
|
|
19429
19478
|
process.exitCode = 1;
|
|
19430
19479
|
});
|
|
19431
19480
|
//# sourceMappingURL=cli.js.map
|
|
19432
|
-
//# debugId=
|
|
19481
|
+
//# debugId=132d0d75-ee1b-5262-9ce6-1091765e2527
|