@ooneex/cli 1.40.0 → 1.41.0

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
@@ -7140,6 +7140,62 @@ var createSpinner = (message) => {
7140
7140
  }
7141
7141
  };
7142
7142
  };
7143
+ var logSubprocessError = (stderr, logger) => {
7144
+ const opts = { showTimestamp: false, showArrow: false, useSymbol: false };
7145
+ const dim = (s) => `\x1B[2m${s}\x1B[0m`;
7146
+ const isCodeContextLine = (raw, trimmed) => /^\d+\s*\|/.test(trimmed) || /^\s*\^+\s*$/.test(raw);
7147
+ const lines = stderr.split(`
7148
+ `);
7149
+ const pendingContext = [];
7150
+ let currentMessage = "";
7151
+ let currentFrames = [];
7152
+ const flush = () => {
7153
+ if (!currentMessage)
7154
+ return;
7155
+ logger.error(currentMessage, undefined, opts);
7156
+ const visible = currentFrames.slice(0, 5);
7157
+ for (const frame of visible) {
7158
+ process.stderr.write(` ${dim(frame)}
7159
+ `);
7160
+ }
7161
+ if (currentFrames.length > 5) {
7162
+ process.stderr.write(` ${dim(`... and ${currentFrames.length - 5} more`)}
7163
+ `);
7164
+ }
7165
+ currentMessage = "";
7166
+ currentFrames = [];
7167
+ };
7168
+ for (const line of lines) {
7169
+ const trimmed = line.trim();
7170
+ if (!trimmed)
7171
+ continue;
7172
+ if (trimmed.startsWith("at ")) {
7173
+ currentFrames.push(trimmed);
7174
+ } else if (isCodeContextLine(line, trimmed)) {
7175
+ flush();
7176
+ pendingContext.push(line.trimEnd());
7177
+ } else {
7178
+ if (pendingContext.length > 0) {
7179
+ process.stderr.write(`
7180
+ `);
7181
+ for (const ctx of pendingContext)
7182
+ process.stderr.write(`${dim(ctx)}
7183
+ `);
7184
+ pendingContext.length = 0;
7185
+ }
7186
+ flush();
7187
+ currentMessage = trimmed;
7188
+ }
7189
+ }
7190
+ if (pendingContext.length > 0) {
7191
+ process.stderr.write(`
7192
+ `);
7193
+ for (const ctx of pendingContext)
7194
+ process.stderr.write(`${dim(ctx)}
7195
+ `);
7196
+ }
7197
+ flush();
7198
+ };
7143
7199
  var ensureModule = async (module) => {
7144
7200
  const moduleDir = join3(process.cwd(), "modules", module);
7145
7201
  const moduleDirExists = await Bun.file(join3(moduleDir, "package.json")).exists();
@@ -10762,6 +10818,10 @@ chore(common): Update bun.lock dependencies
10762
10818
 
10763
10819
  Use the \`/commit\` skill to automate this workflow.
10764
10820
 
10821
+ ### Commit Trailers
10822
+
10823
+ Do not add any \`Co-Authored-By\` trailer to commits.
10824
+
10765
10825
  ## Naming Conventions
10766
10826
 
10767
10827
  **Strictly enforced** by DI decorators \u2014 violations throw at startup:
@@ -10872,6 +10932,10 @@ git commit -m "chore(common): Update dependencies and cache package"
10872
10932
  - **Deleted files only**: use \`refactor\` (e.g., \`refactor(user): Remove deprecated UserAdapter\`)
10873
10933
  - **Renamed/moved files**: use \`refactor\` (e.g., \`refactor(product): Reorganize service file structure\`)
10874
10934
 
10935
+ ## Commit Trailers
10936
+
10937
+ Do not add any \`Co-Authored-By\` trailer to commits.
10938
+
10875
10939
  ## Coding Conventions
10876
10940
 
10877
10941
  Apply all coding conventions from the \`optimize\` skill.
@@ -10989,7 +11053,7 @@ Only if \`resources.repository\` is present.
10989
11053
  /make:repository --name=<resources.repository> --module=<module>
10990
11054
  \`\`\`
10991
11055
 
10992
- Retain only the CRUD methods that are needed by this issue (e.g. \`.create\` needs \`save\`; \`.read\` needs \`findById\`; \`.list\` needs \`find\`; \`.delete\` needs \`delete\`).
11056
+ Retain only the CRUD methods that are needed by this issue (e.g. \`.create\` needs \`save\`; \`.read\` needs \`findById\`; \`.list\` needs \`find\`; \`.delete\` needs \`delete\`). For each repository, remove any methods that are not called by a service or other consumer \u2014 do not keep unused methods.
10993
11057
 
10994
11058
  ### 6. Create or update the service
10995
11059
 
@@ -14407,13 +14471,12 @@ class ClaudeSkillCreateCommand {
14407
14471
  }
14408
14472
  async run() {
14409
14473
  const claudeLocalDir = ".claude";
14410
- const claudeDir = join4(process.cwd(), claudeLocalDir);
14411
14474
  const skillsLocalDir = join4(claudeLocalDir, "skills");
14412
14475
  const skillsDir = join4(process.cwd(), skillsLocalDir);
14413
14476
  const logger = new TerminalLogger3;
14414
- const claudeMdPath = join4(claudeDir, "CLAUDE.md");
14477
+ const claudeMdPath = join4(process.cwd(), "CLAUDE.md");
14415
14478
  await Bun.write(claudeMdPath, CLAUDE_md_default);
14416
- logger.success(`${join4(claudeLocalDir, "CLAUDE.md")} created successfully`, undefined, {
14479
+ logger.success("CLAUDE.md created successfully", undefined, {
14417
14480
  showTimestamp: false,
14418
14481
  showArrow: false,
14419
14482
  useSymbol: true
@@ -14886,7 +14949,7 @@ class CommandRunCommand {
14886
14949
  const proc = Bun.spawn(["bun", "run", commandRunPath, commandName, ...extraArgs], {
14887
14950
  cwd: process.cwd(),
14888
14951
  stdout: "inherit",
14889
- stderr: "inherit"
14952
+ stderr: "pipe"
14890
14953
  });
14891
14954
  const exitCode = await proc.exited;
14892
14955
  if (exitCode === 0) {
@@ -14897,7 +14960,9 @@ class CommandRunCommand {
14897
14960
  });
14898
14961
  return;
14899
14962
  }
14900
- logger.warn(`Command "${commandName}" not found in ${name}`, undefined, {
14963
+ const errorOutput = await new Response(proc.stderr).text();
14964
+ const trimmed = errorOutput.trim();
14965
+ logger.warn(`Command "${commandName}" not found in ${name}`, trimmed ? { message: trimmed } : undefined, {
14901
14966
  showTimestamp: false,
14902
14967
  showArrow: false,
14903
14968
  useSymbol: false
@@ -99216,7 +99281,7 @@ class MigrationUpCommand {
99216
99281
  const proc = Bun.spawn(args, {
99217
99282
  cwd: dir,
99218
99283
  stdout: "inherit",
99219
- stderr: "inherit"
99284
+ stderr: "pipe"
99220
99285
  });
99221
99286
  const exitCode = await proc.exited;
99222
99287
  if (exitCode === 0) {
@@ -99226,6 +99291,9 @@ class MigrationUpCommand {
99226
99291
  useSymbol: true
99227
99292
  });
99228
99293
  } else {
99294
+ const errorOutput = await new Response(proc.stderr).text();
99295
+ if (errorOutput.trim())
99296
+ logSubprocessError(errorOutput, logger);
99229
99297
  logger.error(`Migrations failed for ${name} (exit code: ${exitCode})`, undefined, {
99230
99298
  showTimestamp: false,
99231
99299
  showArrow: false,
@@ -99631,7 +99699,7 @@ class SeedRunCommand {
99631
99699
  const proc = Bun.spawn(args, {
99632
99700
  cwd: dir,
99633
99701
  stdout: "inherit",
99634
- stderr: "inherit",
99702
+ stderr: "pipe",
99635
99703
  env
99636
99704
  });
99637
99705
  const exitCode = await proc.exited;
@@ -99642,6 +99710,9 @@ class SeedRunCommand {
99642
99710
  useSymbol: true
99643
99711
  });
99644
99712
  } else {
99713
+ const errorOutput = await new Response(proc.stderr).text();
99714
+ if (errorOutput.trim())
99715
+ logSubprocessError(errorOutput, logger);
99645
99716
  logger.error(`Seeds failed for ${name} (exit code: ${exitCode})`, undefined, {
99646
99717
  showTimestamp: false,
99647
99718
  showArrow: false,
@@ -99657,4 +99728,4 @@ SeedRunCommand = __legacyDecorateClassTS([
99657
99728
  // src/index.ts
99658
99729
  await run();
99659
99730
 
99660
- //# debugId=3C100A421DA692FB64756E2164756E21
99731
+ //# debugId=66DF020982EECE7364756E2164756E21