alchemy 2.0.0-beta.34 → 2.0.0-beta.35
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/bin/cli.js +8 -7
- package/bin/exec.js +226 -52
- package/bin/exec.js.map +1 -1
- package/lib/AWS/AuthProvider.d.ts +7 -6
- package/lib/AWS/AuthProvider.d.ts.map +1 -1
- package/lib/AWS/AuthProvider.js +143 -134
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/Bootstrap.d.ts +2 -2
- package/lib/AWS/Bootstrap.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.d.ts +1 -1
- package/lib/AWS/Environment.d.ts +25 -3
- package/lib/AWS/Environment.d.ts.map +1 -1
- package/lib/AWS/Environment.js +47 -3
- package/lib/AWS/Environment.js.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts +14 -6
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.js +6 -3
- package/lib/AWS/IAM/OpenIDConnectProvider.js.map +1 -1
- package/lib/AWS/IAM/Policy.d.ts +1 -1
- package/lib/AWS/IAM/Policy.d.ts.map +1 -1
- package/lib/AWS/IAM/Policy.js.map +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts.map +1 -1
- package/lib/AWS/Providers.d.ts +1 -1
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +2 -1
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/Auth/Credentials.d.ts +21 -6
- package/lib/Auth/Credentials.d.ts.map +1 -1
- package/lib/Auth/Credentials.js +30 -31
- package/lib/Auth/Credentials.js.map +1 -1
- package/lib/Auth/Profile.d.ts +31 -34
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +46 -31
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Axiom/AuthProvider.d.ts +2 -1
- package/lib/Axiom/AuthProvider.d.ts.map +1 -1
- package/lib/Axiom/AuthProvider.js +149 -143
- package/lib/Axiom/AuthProvider.js.map +1 -1
- package/lib/Axiom/Credentials.d.ts +2 -1
- package/lib/Axiom/Credentials.d.ts.map +1 -1
- package/lib/Axiom/Credentials.js +4 -4
- package/lib/Axiom/Credentials.js.map +1 -1
- package/lib/Axiom/Providers.d.ts +1 -1
- package/lib/Axiom/Providers.d.ts.map +1 -1
- package/lib/Axiom/Providers.js +3 -1
- package/lib/Axiom/Providers.js.map +1 -1
- package/lib/Cli/LoggingCli.d.ts.map +1 -1
- package/lib/Cli/LoggingCli.js +105 -7
- package/lib/Cli/LoggingCli.js.map +1 -1
- package/lib/Cli/checkVersion.d.ts +13 -0
- package/lib/Cli/checkVersion.d.ts.map +1 -0
- package/lib/Cli/checkVersion.js +47 -0
- package/lib/Cli/checkVersion.js.map +1 -0
- package/lib/Cli/commands/_shared.d.ts +2 -2
- package/lib/Cli/commands/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js +3 -3
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/aws.d.ts +6 -0
- package/lib/Cli/commands/aws.d.ts.map +1 -0
- package/lib/Cli/commands/aws.js +63 -0
- package/lib/Cli/commands/aws.js.map +1 -0
- package/lib/Cli/commands/cloudflare.d.ts +17 -0
- package/lib/Cli/commands/cloudflare.d.ts.map +1 -0
- package/lib/Cli/commands/cloudflare.js +111 -0
- package/lib/Cli/commands/cloudflare.js.map +1 -0
- package/lib/Cli/commands/deploy.d.ts +6 -5
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.js +10 -10
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cli/commands/dev.d.ts.map +1 -1
- package/lib/Cli/commands/dev.js +16 -16
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/login.d.ts +2 -1
- package/lib/Cli/commands/login.d.ts.map +1 -1
- package/lib/Cli/commands/login.js +9 -8
- package/lib/Cli/commands/login.js.map +1 -1
- package/lib/Cli/commands/logs.d.ts +1 -1
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/logs.js +7 -7
- package/lib/Cli/commands/logs.js.map +1 -1
- package/lib/Cli/commands/profile.d.ts +3 -1
- package/lib/Cli/commands/profile.d.ts.map +1 -1
- package/lib/Cli/commands/profile.js +14 -11
- package/lib/Cli/commands/profile.js.map +1 -1
- package/lib/Cli/commands/state.d.ts +1 -1
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/state.js +8 -8
- package/lib/Cli/commands/state.js.map +1 -1
- package/lib/Cli/commands/tail.d.ts +1 -1
- package/lib/Cli/commands/tail.d.ts.map +1 -1
- package/lib/Cli/commands/tail.js +7 -7
- package/lib/Cli/commands/tail.js.map +1 -1
- package/lib/Cli/exec.d.ts.map +1 -1
- package/lib/Cli/exec.js +5 -3
- package/lib/Cli/exec.js.map +1 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +17 -5
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cli/selectCli.d.ts +12 -0
- package/lib/Cli/selectCli.d.ts.map +1 -0
- package/lib/Cli/selectCli.js +32 -0
- package/lib/Cli/selectCli.js.map +1 -0
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +235 -214
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +2 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.js +3 -2
- package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +2 -1
- package/lib/Cloudflare/Credentials.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.js +4 -4
- package/lib/Cloudflare/Credentials.js.map +1 -1
- package/lib/Cloudflare/D1/D1Clone.d.ts +2 -1
- package/lib/Cloudflare/D1/D1Clone.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Database.d.ts +2 -1
- package/lib/Cloudflare/D1/D1Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Import.d.ts +3 -1
- package/lib/Cloudflare/D1/D1Import.d.ts.map +1 -1
- package/lib/Cloudflare/Local/Sidecar.d.ts +11 -4
- package/lib/Cloudflare/Local/Sidecar.d.ts.map +1 -1
- package/lib/Cloudflare/Local/Sidecar.js +8 -6
- package/lib/Cloudflare/Local/Sidecar.js.map +1 -1
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts.map +1 -1
- package/lib/Cloudflare/Local/SidecarHandlers.js +1 -5
- package/lib/Cloudflare/Local/SidecarHandlers.js.map +1 -1
- package/lib/Cloudflare/Local/SidecarServer.js +5 -2
- package/lib/Cloudflare/Local/SidecarServer.js.map +1 -1
- package/lib/Cloudflare/Logs.d.ts +5 -0
- package/lib/Cloudflare/Logs.d.ts.map +1 -1
- package/lib/Cloudflare/Logs.js +70 -1
- package/lib/Cloudflare/Logs.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts +1 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +4 -1
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts +1 -1
- package/lib/Cloudflare/Queue/Queue.js +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts +6 -2
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.js +194 -53
- package/lib/Cloudflare/Queue/QueueConsumer.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts +106 -0
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts.map +1 -0
- package/lib/Cloudflare/Queue/QueueEventSource.js +145 -0
- package/lib/Cloudflare/Queue/QueueEventSource.js.map +1 -0
- package/lib/Cloudflare/Queue/index.d.ts +1 -0
- package/lib/Cloudflare/Queue/index.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/index.js +1 -0
- package/lib/Cloudflare/Queue/index.js.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.d.ts +94 -0
- package/lib/Cloudflare/R2/R2Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.js +186 -2
- package/lib/Cloudflare/R2/R2Bucket.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +4 -3
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +16 -8
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/VpcService/VpcServiceRef.d.ts +1 -1
- package/lib/Cloudflare/VpcService/VpcServiceRef.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.js +10 -1
- package/lib/Cloudflare/Website/StaticSite.js.map +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +11 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +9 -7
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +62 -142
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts +2 -0
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +21 -7
- package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
- package/lib/Cloudflare/Zone.d.ts +14 -0
- package/lib/Cloudflare/Zone.d.ts.map +1 -0
- package/lib/Cloudflare/Zone.js +44 -0
- package/lib/Cloudflare/Zone.js.map +1 -0
- package/lib/Drizzle/Schema.d.ts.map +1 -1
- package/lib/Drizzle/Schema.js +20 -5
- package/lib/Drizzle/Schema.js.map +1 -1
- package/lib/GitHub/AuthProvider.d.ts +3 -1
- package/lib/GitHub/AuthProvider.d.ts.map +1 -1
- package/lib/GitHub/AuthProvider.js +114 -108
- package/lib/GitHub/AuthProvider.js.map +1 -1
- package/lib/GitHub/Credentials.d.ts +2 -1
- package/lib/GitHub/Credentials.d.ts.map +1 -1
- package/lib/GitHub/Credentials.js +4 -4
- package/lib/GitHub/Credentials.js.map +1 -1
- package/lib/GitHub/Providers.d.ts +1 -1
- package/lib/GitHub/Providers.d.ts.map +1 -1
- package/lib/GitHub/Providers.js +3 -1
- package/lib/GitHub/Providers.js.map +1 -1
- package/lib/GitHub/Secrets.d.ts.map +1 -1
- package/lib/GitHub/Secrets.js +14 -1
- package/lib/GitHub/Secrets.js.map +1 -1
- package/lib/GitHub/Variables.d.ts +40 -0
- package/lib/GitHub/Variables.d.ts.map +1 -0
- package/lib/GitHub/Variables.js +28 -0
- package/lib/GitHub/Variables.js.map +1 -0
- package/lib/GitHub/index.d.ts +1 -0
- package/lib/GitHub/index.d.ts.map +1 -1
- package/lib/GitHub/index.js +1 -0
- package/lib/GitHub/index.js.map +1 -1
- package/lib/Neon/AuthProvider.d.ts +3 -1
- package/lib/Neon/AuthProvider.d.ts.map +1 -1
- package/lib/Neon/AuthProvider.js +87 -80
- package/lib/Neon/AuthProvider.js.map +1 -1
- package/lib/Neon/Credentials.d.ts +2 -1
- package/lib/Neon/Credentials.d.ts.map +1 -1
- package/lib/Neon/Credentials.js +4 -4
- package/lib/Neon/Credentials.js.map +1 -1
- package/lib/Neon/NeonEnvironment.d.ts +2 -1
- package/lib/Neon/NeonEnvironment.d.ts.map +1 -1
- package/lib/Neon/NeonEnvironment.js +3 -2
- package/lib/Neon/NeonEnvironment.js.map +1 -1
- package/lib/Neon/Project.d.ts +16 -0
- package/lib/Neon/Project.d.ts.map +1 -1
- package/lib/Neon/Project.js +25 -0
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Neon/Providers.d.ts +1 -1
- package/lib/Neon/Providers.d.ts.map +1 -1
- package/lib/Neon/Providers.js +3 -1
- package/lib/Neon/Providers.js.map +1 -1
- package/lib/Neon/api.d.ts +1 -0
- package/lib/Neon/api.d.ts.map +1 -1
- package/lib/Neon/api.js +1 -0
- package/lib/Neon/api.js.map +1 -1
- package/lib/Sidecar/RpcClient.d.ts.map +1 -1
- package/lib/Sidecar/RpcClient.js +8 -5
- package/lib/Sidecar/RpcClient.js.map +1 -1
- package/lib/Sidecar/RpcPaths.d.ts +5 -0
- package/lib/Sidecar/RpcPaths.d.ts.map +1 -1
- package/lib/Sidecar/RpcPaths.js +10 -1
- package/lib/Sidecar/RpcPaths.js.map +1 -1
- package/lib/Sidecar/RpcServer.d.ts +24 -4
- package/lib/Sidecar/RpcServer.d.ts.map +1 -1
- package/lib/Sidecar/RpcServer.js +70 -15
- package/lib/Sidecar/RpcServer.js.map +1 -1
- package/lib/Sidecar/RpcServerBun.d.ts +4 -0
- package/lib/Sidecar/RpcServerBun.d.ts.map +1 -0
- package/lib/Sidecar/RpcServerBun.js +28 -0
- package/lib/Sidecar/RpcServerBun.js.map +1 -0
- package/lib/Sidecar/RpcServerNode.d.ts +4 -0
- package/lib/Sidecar/RpcServerNode.d.ts.map +1 -0
- package/lib/Sidecar/RpcServerNode.js +39 -0
- package/lib/Sidecar/RpcServerNode.js.map +1 -0
- package/lib/Sidecar/RpcServices.d.ts +6 -0
- package/lib/Sidecar/RpcServices.d.ts.map +1 -0
- package/lib/Sidecar/RpcServices.js +29 -0
- package/lib/Sidecar/RpcServices.js.map +1 -0
- package/lib/Stack.d.ts +5 -3
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +3 -1
- package/lib/Stack.js.map +1 -1
- package/lib/Test/Core.d.ts.map +1 -1
- package/lib/Test/Core.js +5 -4
- package/lib/Test/Core.js.map +1 -1
- package/lib/Util/PlatformServices.js +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +15 -12
- package/src/AWS/AuthProvider.ts +269 -259
- package/src/AWS/Environment.ts +57 -3
- package/src/AWS/IAM/OpenIDConnectProvider.ts +19 -8
- package/src/AWS/IAM/Policy.ts +1 -1
- package/src/AWS/Providers.ts +2 -0
- package/src/Auth/Credentials.ts +82 -46
- package/src/Auth/Profile.ts +123 -69
- package/src/Axiom/AuthProvider.ts +263 -255
- package/src/Axiom/Credentials.ts +3 -4
- package/src/Axiom/Providers.ts +4 -0
- package/src/Cli/LoggingCli.ts +127 -11
- package/src/Cli/checkVersion.ts +57 -0
- package/src/Cli/commands/_shared.ts +4 -4
- package/src/Cli/commands/aws.ts +127 -0
- package/src/Cli/commands/cloudflare.ts +222 -0
- package/src/Cli/commands/deploy.ts +11 -10
- package/src/Cli/commands/dev.ts +28 -33
- package/src/Cli/commands/login.ts +9 -12
- package/src/Cli/commands/logs.ts +8 -8
- package/src/Cli/commands/profile.ts +14 -16
- package/src/Cli/commands/state.ts +8 -8
- package/src/Cli/commands/tail.ts +8 -8
- package/src/Cli/exec.ts +7 -3
- package/src/Cli/main.ts +20 -5
- package/src/Cli/selectCli.ts +33 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +445 -430
- package/src/Cloudflare/CloudflareEnvironment.ts +3 -2
- package/src/Cloudflare/Credentials.ts +3 -4
- package/src/Cloudflare/Local/Sidecar.ts +13 -10
- package/src/Cloudflare/Local/SidecarHandlers.ts +8 -13
- package/src/Cloudflare/Local/SidecarServer.ts +6 -1
- package/src/Cloudflare/Logs.ts +115 -1
- package/src/Cloudflare/Providers.ts +6 -0
- package/src/Cloudflare/Queue/Queue.ts +1 -1
- package/src/Cloudflare/Queue/QueueConsumer.ts +262 -60
- package/src/Cloudflare/Queue/QueueEventSource.ts +234 -0
- package/src/Cloudflare/Queue/index.ts +1 -0
- package/src/Cloudflare/R2/R2Bucket.ts +337 -2
- package/src/Cloudflare/StateStore/State.ts +25 -16
- package/src/Cloudflare/Website/StaticSite.ts +11 -1
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +9 -1
- package/src/Cloudflare/Workers/Worker.ts +83 -203
- package/src/Cloudflare/Workers/WorkerBundle.ts +38 -12
- package/src/Cloudflare/Zone.ts +88 -0
- package/src/Drizzle/Schema.ts +21 -5
- package/src/GitHub/AuthProvider.ts +221 -217
- package/src/GitHub/Credentials.ts +3 -4
- package/src/GitHub/Providers.ts +4 -0
- package/src/GitHub/Secrets.ts +25 -1
- package/src/GitHub/Variables.ts +54 -0
- package/src/GitHub/index.ts +1 -0
- package/src/Neon/AuthProvider.ts +160 -154
- package/src/Neon/Credentials.ts +3 -4
- package/src/Neon/NeonEnvironment.ts +3 -2
- package/src/Neon/Project.ts +42 -0
- package/src/Neon/Providers.ts +4 -0
- package/src/Neon/api.ts +2 -0
- package/src/Sidecar/RpcClient.ts +8 -7
- package/src/Sidecar/RpcPaths.ts +11 -1
- package/src/Sidecar/RpcServer.ts +97 -24
- package/src/Sidecar/RpcServerBun.ts +41 -0
- package/src/Sidecar/RpcServerNode.ts +51 -0
- package/src/Sidecar/RpcServices.ts +48 -0
- package/src/Stack.ts +8 -0
- package/src/Test/Core.ts +10 -4
- package/src/Util/PlatformServices.ts +1 -1
- package/lib/Cli/commands/bootstrap.d.ts +0 -20
- package/lib/Cli/commands/bootstrap.d.ts.map +0 -1
- package/lib/Cli/commands/bootstrap.js +0 -107
- package/lib/Cli/commands/bootstrap.js.map +0 -1
- package/lib/Sidecar/RpcTransport.d.ts +0 -22
- package/lib/Sidecar/RpcTransport.d.ts.map +0 -1
- package/lib/Sidecar/RpcTransport.js +0 -81
- package/lib/Sidecar/RpcTransport.js.map +0 -1
- package/lib/Test/TestCli.d.ts +0 -19
- package/lib/Test/TestCli.d.ts.map +0 -1
- package/lib/Test/TestCli.js +0 -175
- package/lib/Test/TestCli.js.map +0 -1
- package/src/Cli/commands/bootstrap.ts +0 -216
- package/src/Sidecar/RpcTransport.ts +0 -85
- package/src/Test/TestCli.ts +0 -221
|
@@ -7,16 +7,12 @@ import * as Layer from "effect/Layer";
|
|
|
7
7
|
import * as Logger from "effect/Logger";
|
|
8
8
|
import { Command, Flag } from "effect/unstable/cli";
|
|
9
9
|
|
|
10
|
-
import { AuthProviders } from "
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "
|
|
16
|
-
import { Stage } from "../..//Stage";
|
|
17
|
-
import * as State from "../..//State/index";
|
|
18
|
-
import { loadConfigProvider } from "../..//Util/ConfigProvider";
|
|
19
|
-
import { fileLogger } from "../..//Util/FileLogger";
|
|
10
|
+
import { AuthProviders } from "../../Auth/AuthProvider.ts";
|
|
11
|
+
import { Profile, withProfileOverride } from "../../Auth/Profile.ts";
|
|
12
|
+
import { Stage } from "../../Stage.ts";
|
|
13
|
+
import * as State from "../../State/index.ts";
|
|
14
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider.ts";
|
|
15
|
+
import { fileLogger } from "../../Util/FileLogger.ts";
|
|
20
16
|
|
|
21
17
|
import {
|
|
22
18
|
envFile,
|
|
@@ -73,6 +69,7 @@ export const loginCommand = Command.make(
|
|
|
73
69
|
);
|
|
74
70
|
|
|
75
71
|
yield* Effect.gen(function* () {
|
|
72
|
+
const profiles = yield* Profile;
|
|
76
73
|
yield* Effect.catchCause(stackEffect, (cause) =>
|
|
77
74
|
Console.warn(
|
|
78
75
|
`Ignoring error while building stack for login (likely due to missing or broken credentials):\n${Cause.pretty(cause)}`,
|
|
@@ -93,13 +90,13 @@ export const loginCommand = Command.make(
|
|
|
93
90
|
providers,
|
|
94
91
|
(provider) =>
|
|
95
92
|
Effect.gen(function* () {
|
|
96
|
-
const existing = yield* getProfile(profile);
|
|
93
|
+
const existing = yield* profiles.getProfile(profile);
|
|
97
94
|
const stored = existing?.[provider.name];
|
|
98
95
|
|
|
99
96
|
let cfg: { method: string };
|
|
100
97
|
if (configure || stored == null) {
|
|
101
98
|
cfg = yield* provider.configure(profile, { ci });
|
|
102
|
-
yield* setProfile(profile, {
|
|
99
|
+
yield* profiles.setProfile(profile, {
|
|
103
100
|
...existing,
|
|
104
101
|
[provider.name]: cfg,
|
|
105
102
|
});
|
package/src/Cli/commands/logs.ts
CHANGED
|
@@ -6,14 +6,14 @@ import * as Logger from "effect/Logger";
|
|
|
6
6
|
import * as Option from "effect/Option";
|
|
7
7
|
import { Command, Flag } from "effect/unstable/cli";
|
|
8
8
|
|
|
9
|
-
import { findProviderByType, type LogLine } from "
|
|
10
|
-
import { Stage } from "
|
|
11
|
-
import * as State from "
|
|
12
|
-
import { loadConfigProvider } from "
|
|
13
|
-
import { fileLogger } from "
|
|
14
|
-
|
|
15
|
-
import { AuthProviders } from "
|
|
16
|
-
import { withProfileOverride } from "
|
|
9
|
+
import { findProviderByType, type LogLine } from "../../Provider.ts";
|
|
10
|
+
import { Stage } from "../../Stage.ts";
|
|
11
|
+
import * as State from "../../State/index.ts";
|
|
12
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider.ts";
|
|
13
|
+
import { fileLogger } from "../../Util/FileLogger.ts";
|
|
14
|
+
|
|
15
|
+
import { AuthProviders } from "../../Auth/AuthProvider.ts";
|
|
16
|
+
import { withProfileOverride } from "../../Auth/Profile.ts";
|
|
17
17
|
import {
|
|
18
18
|
envFile,
|
|
19
19
|
formatLocalTimestamp,
|
|
@@ -5,18 +5,13 @@ import * as Layer from "effect/Layer";
|
|
|
5
5
|
import * as Logger from "effect/Logger";
|
|
6
6
|
import { Command } from "effect/unstable/cli";
|
|
7
7
|
|
|
8
|
-
import { AuthProviders } from "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "../..//Auth/Profile";
|
|
16
|
-
import { AwsAuth } from "../..//AWS/AuthProvider";
|
|
17
|
-
import { CloudflareAuth } from "../..//Cloudflare/Auth/AuthProvider";
|
|
18
|
-
import { loadConfigProvider } from "../..//Util/ConfigProvider";
|
|
19
|
-
import { fileLogger } from "../../Util/FileLogger";
|
|
8
|
+
import { AuthProviders } from "../../Auth/AuthProvider.ts";
|
|
9
|
+
import { CredentialsStore } from "../../Auth/Credentials.ts";
|
|
10
|
+
import { Profile, withProfileOverride } from "../../Auth/Profile.ts";
|
|
11
|
+
import { AwsAuth } from "../../AWS/AuthProvider.ts";
|
|
12
|
+
import { CloudflareAuth } from "../../Cloudflare/Auth/AuthProvider.ts";
|
|
13
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider.ts";
|
|
14
|
+
import { fileLogger } from "../../Util/FileLogger.ts";
|
|
20
15
|
|
|
21
16
|
import { envFile, instrumentCommand, profile } from "./_shared.ts";
|
|
22
17
|
|
|
@@ -27,9 +22,10 @@ const showCommand = Command.make(
|
|
|
27
22
|
"alchemy.profile": a.profile,
|
|
28
23
|
}))(
|
|
29
24
|
Effect.fnUntraced(function* ({ profile, envFile }) {
|
|
30
|
-
const
|
|
25
|
+
const profiles = yield* Profile;
|
|
26
|
+
const stored = yield* profiles.getProfile(profile);
|
|
31
27
|
if (stored == null) {
|
|
32
|
-
const config = yield* readConfig;
|
|
28
|
+
const config = yield* profiles.readConfig;
|
|
33
29
|
const names = Object.keys(config.profiles);
|
|
34
30
|
yield* Console.log(`Profile '${profile}' not found.`);
|
|
35
31
|
if (names.length > 0) {
|
|
@@ -96,8 +92,10 @@ const clearCommand = Command.make(
|
|
|
96
92
|
"alchemy.profile": a.profile,
|
|
97
93
|
}))(
|
|
98
94
|
Effect.fnUntraced(function* ({ profile }) {
|
|
99
|
-
const
|
|
100
|
-
yield*
|
|
95
|
+
const profiles = yield* Profile;
|
|
96
|
+
const store = yield* CredentialsStore;
|
|
97
|
+
const removed = yield* profiles.deleteProfile(profile);
|
|
98
|
+
yield* store.deleteProfile(profile);
|
|
101
99
|
if (removed) {
|
|
102
100
|
yield* Console.log(
|
|
103
101
|
`Cleared profile '${profile}' and all its credentials.`,
|
|
@@ -6,14 +6,14 @@ import * as Logger from "effect/Logger";
|
|
|
6
6
|
import * as Option from "effect/Option";
|
|
7
7
|
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
8
8
|
|
|
9
|
-
import { AuthProviders } from "../../Auth/AuthProvider";
|
|
10
|
-
import { withProfileOverride } from "../../Auth/Profile";
|
|
11
|
-
import { Stage } from "../../Stage";
|
|
12
|
-
import * as State from "../../State/index";
|
|
13
|
-
import { encodeState } from "../../State/StateEncoding";
|
|
14
|
-
import * as Clank from "../../Util/Clank";
|
|
15
|
-
import { loadConfigProvider } from "../../Util/ConfigProvider";
|
|
16
|
-
import { fileLogger } from "../../Util/FileLogger";
|
|
9
|
+
import { AuthProviders } from "../../Auth/AuthProvider.ts";
|
|
10
|
+
import { withProfileOverride } from "../../Auth/Profile.ts";
|
|
11
|
+
import { Stage } from "../../Stage.ts";
|
|
12
|
+
import * as State from "../../State/index.ts";
|
|
13
|
+
import { encodeState } from "../../State/StateEncoding.ts";
|
|
14
|
+
import * as Clank from "../../Util/Clank.ts";
|
|
15
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider.ts";
|
|
16
|
+
import { fileLogger } from "../../Util/FileLogger.ts";
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
envFile,
|
package/src/Cli/commands/tail.ts
CHANGED
|
@@ -6,14 +6,14 @@ import * as Logger from "effect/Logger";
|
|
|
6
6
|
import * as Stream from "effect/Stream";
|
|
7
7
|
import * as Command from "effect/unstable/cli/Command";
|
|
8
8
|
|
|
9
|
-
import { findProviderByType, type LogLine } from "
|
|
10
|
-
import { Stage } from "
|
|
11
|
-
import * as State from "
|
|
12
|
-
import { loadConfigProvider } from "
|
|
13
|
-
import { fileLogger } from "
|
|
14
|
-
|
|
15
|
-
import { AuthProviders } from "
|
|
16
|
-
import { withProfileOverride } from "
|
|
9
|
+
import { findProviderByType, type LogLine } from "../../Provider.ts";
|
|
10
|
+
import { Stage } from "../../Stage.ts";
|
|
11
|
+
import * as State from "../../State/index.ts";
|
|
12
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider.ts";
|
|
13
|
+
import { fileLogger } from "../../Util/FileLogger.ts";
|
|
14
|
+
|
|
15
|
+
import { AuthProviders } from "../../Auth/AuthProvider.ts";
|
|
16
|
+
import { withProfileOverride } from "../../Auth/Profile.ts";
|
|
17
17
|
import {
|
|
18
18
|
envFile,
|
|
19
19
|
formatLocalTimestamp,
|
package/src/Cli/exec.ts
CHANGED
|
@@ -4,16 +4,20 @@ import * as Layer from "effect/Layer";
|
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
6
6
|
|
|
7
|
-
import { AlchemyContextLive } from "../AlchemyContext";
|
|
7
|
+
import { AlchemyContextLive } from "../AlchemyContext.ts";
|
|
8
|
+
import { CredentialsStoreLive } from "../Auth/Credentials.ts";
|
|
9
|
+
import { ProfileLive } from "../Auth/Profile.ts";
|
|
8
10
|
import { PlatformServices } from "../Util/PlatformServices.ts";
|
|
9
11
|
import { execStack, ExecStackOptions } from "./commands/deploy.ts";
|
|
10
|
-
import {
|
|
12
|
+
import { selectCli } from "./selectCli.ts";
|
|
11
13
|
|
|
12
14
|
const services = Layer.mergeAll(
|
|
13
15
|
Layer.provideMerge(AlchemyContextLive, PlatformServices),
|
|
16
|
+
Layer.provide(ProfileLive, PlatformServices),
|
|
17
|
+
Layer.provide(CredentialsStoreLive, PlatformServices),
|
|
14
18
|
FetchHttpClient.layer,
|
|
15
19
|
ConfigProvider.layer(ConfigProvider.fromEnv()),
|
|
16
|
-
|
|
20
|
+
selectCli(),
|
|
17
21
|
);
|
|
18
22
|
|
|
19
23
|
export const exec = () =>
|
package/src/Cli/main.ts
CHANGED
|
@@ -5,12 +5,16 @@ import * as Command from "effect/unstable/cli/Command";
|
|
|
5
5
|
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
6
6
|
|
|
7
7
|
import { AlchemyContextLive } from "alchemy/AlchemyContext";
|
|
8
|
+
import { CredentialsStoreLive } from "alchemy/Auth/Credentials";
|
|
9
|
+
import { ProfileLive } from "alchemy/Auth/Profile";
|
|
8
10
|
import { TelemetryLive } from "alchemy/Telemetry/Layer";
|
|
9
11
|
import { PlatformServices } from "alchemy/Util/PlatformServices";
|
|
10
12
|
import packageJson from "../../package.json" with { type: "json" };
|
|
11
13
|
|
|
14
|
+
import { checkLatestVersion } from "./checkVersion.ts";
|
|
12
15
|
import { handleCancellation } from "./commands/_shared.ts";
|
|
13
|
-
import {
|
|
16
|
+
import { awsCommand } from "./commands/aws.ts";
|
|
17
|
+
import { cloudflareCommand } from "./commands/cloudflare.ts";
|
|
14
18
|
import {
|
|
15
19
|
deployCommand,
|
|
16
20
|
destroyCommand,
|
|
@@ -22,11 +26,12 @@ import { logsCommand } from "./commands/logs.ts";
|
|
|
22
26
|
import { profileCommand } from "./commands/profile.ts";
|
|
23
27
|
import { stateCommand } from "./commands/state.ts";
|
|
24
28
|
import { tailCommand } from "./commands/tail.ts";
|
|
25
|
-
import {
|
|
29
|
+
import { selectCli } from "./selectCli.ts";
|
|
26
30
|
|
|
27
31
|
const root = Command.make("alchemy", {}).pipe(
|
|
28
32
|
Command.withSubcommands([
|
|
29
|
-
|
|
33
|
+
awsCommand,
|
|
34
|
+
cloudflareCommand,
|
|
30
35
|
deployCommand,
|
|
31
36
|
devCommand,
|
|
32
37
|
destroyCommand,
|
|
@@ -46,13 +51,23 @@ const cli = Command.run(root, {
|
|
|
46
51
|
|
|
47
52
|
const services = Layer.mergeAll(
|
|
48
53
|
Layer.provideMerge(AlchemyContextLive, PlatformServices),
|
|
54
|
+
Layer.provide(ProfileLive, PlatformServices),
|
|
55
|
+
Layer.provide(CredentialsStoreLive, PlatformServices),
|
|
49
56
|
FetchHttpClient.layer,
|
|
50
57
|
ConfigProvider.layer(ConfigProvider.fromEnv()),
|
|
51
58
|
TelemetryLive,
|
|
52
|
-
|
|
59
|
+
selectCli(),
|
|
53
60
|
);
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
const program = Effect.gen(function* () {
|
|
63
|
+
// Best-effort, non-blocking check for a newer published version. If the
|
|
64
|
+
// CLI command finishes before the registry responds, the fiber is
|
|
65
|
+
// interrupted on scope close — that's intentional.
|
|
66
|
+
yield* checkLatestVersion.pipe(Effect.forkScoped);
|
|
67
|
+
return yield* cli;
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const main = program.pipe(
|
|
56
71
|
// $USER and $STAGE are set by the environment
|
|
57
72
|
Effect.provide(services),
|
|
58
73
|
Effect.scoped,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as Layer from "effect/Layer";
|
|
2
|
+
import type { Cli } from "./Cli.ts";
|
|
3
|
+
import { LoggingCli } from "./LoggingCli.ts";
|
|
4
|
+
import { inkCLI } from "./tui/InkCLI.tsx";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns true when the current process looks like it's being driven by a
|
|
8
|
+
* coding agent, CI runner, or anything else that won't render an interactive
|
|
9
|
+
* TUI well. The Ink renderer repaints the screen on every event, which floods
|
|
10
|
+
* agent transcripts with redundant frames; LoggingCli emits one line per
|
|
11
|
+
* status change instead.
|
|
12
|
+
*/
|
|
13
|
+
export const isNonInteractive = (): boolean => {
|
|
14
|
+
const env = process.env;
|
|
15
|
+
if (env.ALCHEMY_PLAIN === "1" || env.ALCHEMY_NO_TUI === "1") return true;
|
|
16
|
+
if (env.ALCHEMY_TUI === "1") return false;
|
|
17
|
+
if (!process.stdout.isTTY) return true;
|
|
18
|
+
if (env.CI) return true;
|
|
19
|
+
// Known coding-agent env vars. These are best-effort — the isTTY check
|
|
20
|
+
// above already catches most cases since agents typically pipe stdout.
|
|
21
|
+
if (
|
|
22
|
+
env.CLAUDECODE ||
|
|
23
|
+
env.CLAUDE_CODE_ENTRYPOINT ||
|
|
24
|
+
env.CURSOR_AGENT ||
|
|
25
|
+
env.AIDER_MODEL ||
|
|
26
|
+
env.CODEX_CLI
|
|
27
|
+
)
|
|
28
|
+
return true;
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const selectCli = (): Layer.Layer<Cli> =>
|
|
33
|
+
isNonInteractive() ? LoggingCli : inkCLI();
|