@ooneex/cli 1.34.1 → 1.35.1

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
@@ -14717,16 +14717,11 @@ class CommandRunCommand {
14717
14717
  });
14718
14718
  const proc = Bun.spawn(["bun", "run", commandRunPath, commandName, ...extraArgs], {
14719
14719
  cwd: process.cwd(),
14720
- stdout: "pipe",
14721
- stderr: "pipe"
14720
+ stdout: "inherit",
14721
+ stderr: "inherit"
14722
14722
  });
14723
- const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);
14724
14723
  const exitCode = await proc.exited;
14725
14724
  if (exitCode === 0) {
14726
- if (stdout)
14727
- process.stdout.write(stdout);
14728
- if (stderr)
14729
- process.stderr.write(stderr);
14730
14725
  logger.success(`Command "${commandName}" completed for ${name}`, undefined, {
14731
14726
  showTimestamp: false,
14732
14727
  showArrow: false,
@@ -15331,10 +15326,10 @@ var issueSkeletonToYaml = (id, title, description) => {
15331
15326
  import { join as join12 } from "path";
15332
15327
  import { decorator as decorator12 } from "@ooneex/command";
15333
15328
 
15334
- // ../../node_modules/.bun/@linear+sdk@84.0.0+618aff23f8790294/node_modules/@linear/sdk/dist/chunk-DPPnyiuk.mjs
15329
+ // ../../node_modules/.bun/@linear+sdk@84.0.0+1394496806effeb6/node_modules/@linear/sdk/dist/chunk-DPPnyiuk.mjs
15335
15330
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
15336
15331
 
15337
- // ../../node_modules/.bun/@linear+sdk@84.0.0+618aff23f8790294/node_modules/@linear/sdk/dist/index.mjs
15332
+ // ../../node_modules/.bun/@linear+sdk@84.0.0+1394496806effeb6/node_modules/@linear/sdk/dist/index.mjs
15338
15333
  var LinearErrorType = /* @__PURE__ */ function(LinearErrorType$1) {
15339
15334
  LinearErrorType$1["FeatureNotAccessible"] = "FeatureNotAccessible";
15340
15335
  LinearErrorType$1["InvalidInput"] = "InvalidInput";
@@ -95129,35 +95124,35 @@ describe("{{NAME}}Ai", () => {
95129
95124
  expect({{NAME}}Ai.name.endsWith("Ai")).toBe(true);
95130
95125
  });
95131
95126
 
95127
+ test("should have no constructor dependencies", () => {
95128
+ expect({{NAME}}Ai.length).toBe(0);
95129
+ });
95130
+
95132
95131
  test("should have 'run' method", () => {
95133
95132
  expect({{NAME}}Ai.prototype.run).toBeDefined();
95134
95133
  expect(typeof {{NAME}}Ai.prototype.run).toBe("function");
95135
95134
  });
95136
95135
 
95137
- test("should have 'runStream' method", () => {
95136
+ test("should have 'runStream' async generator method", () => {
95138
95137
  expect({{NAME}}Ai.prototype.runStream).toBeDefined();
95139
95138
  expect(typeof {{NAME}}Ai.prototype.runStream).toBe("function");
95139
+ const AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor;
95140
+ expect({{NAME}}Ai.prototype.runStream).toBeInstanceOf(AsyncGeneratorFunction);
95140
95141
  });
95141
95142
  });
95142
95143
  `;
95143
95144
 
95144
95145
  // src/templates/ai.txt
95145
- var ai_default = `import { decorator, type IAiChat, OpenAi, type OpenAiConfigType } from "@ooneex/ai";
95146
- import { inject } from "@ooneex/container";
95146
+ var ai_default = `import { decorator, type IAiChat } from "@ooneex/ai";
95147
95147
 
95148
95148
  @decorator.ai()
95149
- export class {{NAME}}Ai implements IAiChat<OpenAiConfigType> {
95150
- constructor(@inject(OpenAi) private readonly ai: OpenAi) {}
95151
-
95152
- public async run<T>(prompt?: string, config?: Omit<OpenAiConfigType, "prompt">): Promise<T> {
95153
- return this.ai.run<T>(prompt || "My prompt", config);
95149
+ export class {{NAME}}Ai implements IAiChat {
95150
+ public async run<T>(content?: string): Promise<T> {
95151
+ return {} as T;
95154
95152
  }
95155
95153
 
95156
- public async *runStream(
95157
- prompt?: string,
95158
- config?: Omit<OpenAiConfigType, "prompt" | "output">,
95159
- ): AsyncGenerator<string, void, unknown> {
95160
- yield* this.ai.runStream(prompt || "My prompt", config);
95154
+ public async *runStream(content?: string): AsyncGenerator<string, void, unknown> {
95155
+ yield "";
95161
95156
  }
95162
95157
  }
95163
95158
  `;
@@ -95452,6 +95447,7 @@ class MakeCommandCommand {
95452
95447
  const base = join16("modules", module);
95453
95448
  const { commandPath: filePath, testPath } = await commandCreate({
95454
95449
  name,
95450
+ module,
95455
95451
  commandDir: join16(base, "src", "commands"),
95456
95452
  testsDir: join16(base, "tests", "commands")
95457
95453
  });
@@ -109765,4 +109761,4 @@ SeedRunCommand = __legacyDecorateClassTS([
109765
109761
  // src/index.ts
109766
109762
  await run();
109767
109763
 
109768
- //# debugId=1A6419EF7EB53FE364756E2164756E21
109764
+ //# debugId=361C007C2B31AB6A64756E2164756E21