Skip to content

Commit 2c75d0e

Browse files
committed
fix circlular deps
1 parent a3cd17b commit 2c75d0e

12 files changed

Lines changed: 64 additions & 58 deletions

File tree

‎apps/cloud/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@executor/plugin-google-discovery": "workspace:*",
1212
"@executor/plugin-graphql": "workspace:*",
1313
"@executor/plugin-mcp": "workspace:*",
14+
"@executor/plugin-onepassword": "workspace:*",
1415
"@executor/plugin-openapi": "workspace:*",
1516
"@executor/react": "workspace:*",
1617
"@executor/sdk": "workspace:*",

‎apps/cloud/src/routes/index.tsx‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { createFileRoute } from "@tanstack/react-router";
22
import { SourcesPage } from "@executor/react/pages/sources";
3+
import { openApiSourcePlugin } from "@executor/plugin-openapi/react";
4+
import { mcpSourcePlugin } from "@executor/plugin-mcp/react";
5+
import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react";
6+
import { graphqlSourcePlugin } from "@executor/plugin-graphql/react";
7+
8+
const sourcePlugins = [
9+
openApiSourcePlugin,
10+
mcpSourcePlugin,
11+
googleDiscoverySourcePlugin,
12+
graphqlSourcePlugin,
13+
];
314

415
export const Route = createFileRoute("/")({
5-
component: SourcesPage,
16+
component: () => <SourcesPage sourcePlugins={sourcePlugins} />,
617
});

‎apps/cloud/src/routes/secrets.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { createFileRoute } from "@tanstack/react-router";
22
import { SecretsPage } from "@executor/react/pages/secrets";
3+
import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react";
4+
5+
const secretProviderPlugins = [onePasswordSecretProviderPlugin];
36

47
export const Route = createFileRoute("/secrets")({
5-
component: SecretsPage,
8+
component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />,
69
});

‎apps/cloud/src/routes/sources.add.$pluginKey.tsx‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { Schema } from "effect";
22
import { createFileRoute } from "@tanstack/react-router";
33
import { SourcesAddPage } from "@executor/react/pages/sources-add";
4+
import { openApiSourcePlugin } from "@executor/plugin-openapi/react";
5+
import { mcpSourcePlugin } from "@executor/plugin-mcp/react";
6+
import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react";
7+
import { graphqlSourcePlugin } from "@executor/plugin-graphql/react";
8+
9+
const sourcePlugins = [
10+
openApiSourcePlugin,
11+
mcpSourcePlugin,
12+
googleDiscoverySourcePlugin,
13+
graphqlSourcePlugin,
14+
];
415

516
const SearchParams = Schema.standardSchemaV1(
617
Schema.Struct({
@@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({
1425
component: () => {
1526
const { pluginKey } = Route.useParams();
1627
const { url, preset } = Route.useSearch();
17-
return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />;
28+
return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />;
1829
},
1930
});

‎apps/local/src/routes/index.tsx‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { createFileRoute } from "@tanstack/react-router";
22
import { SourcesPage } from "@executor/react/pages/sources";
3+
import { openApiSourcePlugin } from "@executor/plugin-openapi/react";
4+
import { mcpSourcePlugin } from "@executor/plugin-mcp/react";
5+
import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react";
6+
import { graphqlSourcePlugin } from "@executor/plugin-graphql/react";
7+
8+
const sourcePlugins = [
9+
openApiSourcePlugin,
10+
mcpSourcePlugin,
11+
googleDiscoverySourcePlugin,
12+
graphqlSourcePlugin,
13+
];
314

415
export const Route = createFileRoute("/")({
5-
component: SourcesPage,
16+
component: () => <SourcesPage sourcePlugins={sourcePlugins} />,
617
});

‎apps/local/src/routes/secrets.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { createFileRoute } from "@tanstack/react-router";
22
import { SecretsPage } from "@executor/react/pages/secrets";
3+
import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react";
4+
5+
const secretProviderPlugins = [onePasswordSecretProviderPlugin];
36

47
export const Route = createFileRoute("/secrets")({
5-
component: SecretsPage,
8+
component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />,
69
});

‎apps/local/src/routes/sources.add.$pluginKey.tsx‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { Schema } from "effect";
22
import { createFileRoute } from "@tanstack/react-router";
33
import { SourcesAddPage } from "@executor/react/pages/sources-add";
4+
import { openApiSourcePlugin } from "@executor/plugin-openapi/react";
5+
import { mcpSourcePlugin } from "@executor/plugin-mcp/react";
6+
import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react";
7+
import { graphqlSourcePlugin } from "@executor/plugin-graphql/react";
8+
9+
const sourcePlugins = [
10+
openApiSourcePlugin,
11+
mcpSourcePlugin,
12+
googleDiscoverySourcePlugin,
13+
graphqlSourcePlugin,
14+
];
415

516
const SearchParams = Schema.standardSchemaV1(
617
Schema.Struct({
@@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({
1425
component: () => {
1526
const { pluginKey } = Route.useParams();
1627
const { url, preset } = Route.useSearch();
17-
return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />;
28+
return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />;
1829
},
1930
});

‎bun.lock‎

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/react/package.json‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
"@effect/platform": "catalog:",
1818
"@effect-atom/atom-react": "^0.5.0",
1919
"@executor/api": "workspace:*",
20-
"@executor/plugin-google-discovery": "workspace:*",
21-
"@executor/plugin-graphql": "workspace:*",
22-
"@executor/plugin-mcp": "workspace:*",
23-
"@executor/plugin-onepassword": "workspace:*",
24-
"@executor/plugin-openapi": "workspace:*",
2520
"@executor/sdk": "workspace:*",
2621
"@tanstack/react-router": "catalog:",
2722
"@shikijs/langs": "^4.0.2",

‎packages/react/src/pages/secrets.tsx‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { secretsAtom, setSecret, removeSecret } from "../api/atoms";
44
import type { SecretProviderPlugin } from "../plugins/secret-provider-plugin";
55
import { SecretId } from "@executor/sdk";
66
import { useScope } from "../hooks/use-scope";
7-
import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react";
87
import {
98
Dialog,
109
DialogContent,
@@ -256,19 +255,12 @@ function SecretRow(props: {
256255
);
257256
}
258257

259-
// ---------------------------------------------------------------------------
260-
// Secret provider plugins
261-
// ---------------------------------------------------------------------------
262-
263-
const secretProviderPlugins: SecretProviderPlugin[] = [
264-
onePasswordSecretProviderPlugin,
265-
];
266-
267258
// ---------------------------------------------------------------------------
268259
// Page
269260
// ---------------------------------------------------------------------------
270261

271-
export function SecretsPage() {
262+
export function SecretsPage(props: { secretProviderPlugins: readonly SecretProviderPlugin[] }) {
263+
const { secretProviderPlugins } = props;
272264
const [addOpen, setAddOpen] = useState(false);
273265
const scopeId = useScope();
274266
const secrets = useAtomValue(secretsAtom(scopeId));

0 commit comments

Comments
 (0)