Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 23:15 UTC
chore(cli): move dir generation from "pyFindComposioCoreGenerated" to "generatePythonTypeStubs" fn
jkomyno committed
Jun 30, 2025 at 23:19 UTC
8e54dbeac396bdbef5eb7e28a306bda5290f56b0
2 files changed
+4
-11
ts/packages/cli/src/commands/py/commands/py.generate.cmd.ts
+2
-5
@@ -38,15 +38,12 @@ export function generatePythonTypeStubs({ outputOpt }: GetCmdParams<typeof _pyCm
38
onNone: () => pyFindComposioCoreGenerated(cwd),
39
40
// If an output directory is specified, validate and create it
41
- onSome: outputDir =>
42
- pipe(
43
- Effect.succeed(outputDir),
44
- Effect.tap(fs.makeDirectory(outputDir, { recursive: true }))
45
- ),
41
+ onSome: Effect.succeed,
42
})
43
);
44
45
yield* Effect.log(`Writing type stubs to ${outputDir}...`);
46
+ yield* fs.makeDirectory(outputDir, { recursive: true });
47
48
// Fetch data from Composio API
49
yield* Console.log('Fetching latest data from Composio API...');
ts/packages/cli/src/effects/find-composio-core-generated.ts
+2
-6
@@ -1,11 +1,10 @@
1
import path from 'node:path';
2
import { Command, FileSystem } from '@effect/platform';
3
-import { Data, Effect, Match, Option } from 'effect';
3
+import { Data, Effect, Match } from 'effect';
4
import {
5
JsPackageManagerDetector,
6
type PackageManager,
7
} from 'src/services/js-package-manager-detector';
8
-import type { PlatformError } from '@effect/platform/Error';
8
9
export class ComposioCorePkgNotFound extends Data.TaggedError('error/ComposioCorePkgNotFound')<{
10
readonly message: string;
@@ -64,11 +63,8 @@ export function pyFindComposioCoreGenerated(cwd: string) {
63
const composioCorePath = `${path.dirname(stdout)}/generated`;
64
yield* Effect.logDebug({ composioCorePath });
65
67
- const fs = yield* FileSystem.FileSystem;
68
- yield* fs.makeDirectory(composioCorePath, { recursive: true });
69
-
66
return composioCorePath;
71
- }) satisfies Effect.Effect<string, ComposioCorePkgNotFound | PlatformError, unknown>;
67
+ }) satisfies Effect.Effect<string, ComposioCorePkgNotFound, unknown>;
68
}
69
70
/**