alchemy 2.0.0-beta.13 → 2.0.0-beta.15
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/alchemy.js +9477 -9290
- package/bin/alchemy.js.map +1 -1
- package/bin/alchemy.ts +6 -2
- package/bin/cli.js +61 -0
- package/bin/commands/deploy.ts +6 -4
- package/bin/commands/login.ts +1 -1
- package/bin/commands/logs.ts +1 -1
- package/bin/commands/state.ts +233 -0
- package/bin/commands/tail.ts +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts +1 -1
- package/lib/AWS/EC2/Instance.d.ts +1 -1
- package/lib/AWS/EC2/hosted.d.ts +2 -2
- package/lib/AWS/ECS/Task.d.ts +4 -4
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +2 -2
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/Environment.d.ts +2 -2
- 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/Function.d.ts +2 -2
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +1 -2
- package/lib/AWS/Lambda/Function.js.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/SQS/QueueSink.d.ts.map +1 -1
- package/lib/AWS/SQS/QueueSink.js +1 -2
- package/lib/AWS/SQS/QueueSink.js.map +1 -1
- package/lib/Agent/coding/bash.d.ts +2 -6
- package/lib/Agent/coding/bash.d.ts.map +1 -1
- package/lib/Agent/coding/bash.js +2 -3
- package/lib/Agent/coding/bash.js.map +1 -1
- package/lib/Agent/coding/edit.d.ts +1 -1
- package/lib/Agent/coding/glob.d.ts +2 -4
- package/lib/Agent/coding/glob.d.ts.map +1 -1
- package/lib/Agent/coding/glob.js +1 -2
- package/lib/Agent/coding/glob.js.map +1 -1
- package/lib/Agent/coding/grep.d.ts +2 -4
- package/lib/Agent/coding/grep.d.ts.map +1 -1
- package/lib/Agent/coding/grep.js +1 -2
- package/lib/Agent/coding/grep.js.map +1 -1
- package/lib/Agent/coding/read.d.ts +1 -1
- package/lib/Agent/coding/write.d.ts +1 -1
- package/lib/Agent/lsp/client.d.ts +2 -2
- package/lib/Agent/util/ripgrep.d.ts +2 -2
- package/lib/AlchemyContext.d.ts +13 -0
- package/lib/AlchemyContext.d.ts.map +1 -0
- package/lib/AlchemyContext.js +18 -0
- package/lib/AlchemyContext.js.map +1 -0
- package/lib/Auth/AuthProvider.js +1 -1
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Profile.d.ts +1 -1
- package/lib/Auth/index.d.ts +3 -1
- package/lib/Auth/index.d.ts.map +1 -1
- package/lib/Auth/index.js +3 -0
- package/lib/Auth/index.js.map +1 -1
- package/lib/Build/Command.d.ts +1 -1
- package/lib/Build/Memo.d.ts +1 -1
- package/lib/Bundle/Docker.d.ts +3 -3
- package/lib/Bundle/TempRoot.d.ts +3 -3
- package/lib/Cli/LoggingCli.d.ts +4 -0
- package/lib/Cli/LoggingCli.d.ts.map +1 -0
- package/lib/{Test/TestCli.js → Cli/LoggingCli.js} +3 -3
- package/lib/Cli/LoggingCli.js.map +1 -0
- package/lib/Cli/index.d.ts +0 -1
- package/lib/Cli/index.d.ts.map +1 -1
- package/lib/Cli/index.js +4 -1
- package/lib/Cli/index.js.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts +58 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.js +137 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -0
- package/lib/Cloudflare/ApiToken/Common.d.ts +91 -0
- package/lib/Cloudflare/ApiToken/Common.d.ts.map +1 -0
- package/lib/Cloudflare/ApiToken/Common.js +61 -0
- package/lib/Cloudflare/ApiToken/Common.js.map +1 -0
- package/lib/Cloudflare/ApiToken/PermissionGroups.d.ts +1549 -0
- package/lib/Cloudflare/ApiToken/PermissionGroups.d.ts.map +1 -0
- package/lib/Cloudflare/ApiToken/PermissionGroups.js +1856 -0
- package/lib/Cloudflare/ApiToken/PermissionGroups.js.map +1 -0
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +49 -0
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts.map +1 -0
- package/lib/Cloudflare/ApiToken/UserApiToken.js +113 -0
- package/lib/Cloudflare/ApiToken/UserApiToken.js.map +1 -0
- package/lib/Cloudflare/ApiToken/index.d.ts +5 -0
- package/lib/Cloudflare/ApiToken/index.d.ts.map +1 -0
- package/lib/Cloudflare/ApiToken/index.js +5 -0
- package/lib/Cloudflare/ApiToken/index.js.map +1 -0
- package/lib/Cloudflare/Auth/AuthProvider.js +2 -2
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts +2 -2
- package/lib/Cloudflare/Container/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.js +7 -2
- package/lib/Cloudflare/Container/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/EdgeSession.d.ts +53 -0
- package/lib/Cloudflare/EdgeSession.d.ts.map +1 -0
- package/lib/Cloudflare/EdgeSession.js +78 -0
- package/lib/Cloudflare/EdgeSession.js.map +1 -0
- 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/StateStore/Api.d.ts +61 -0
- package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/Api.js +103 -0
- package/lib/Cloudflare/StateStore/Api.js.map +1 -0
- package/lib/Cloudflare/StateStore/State.d.ts +39 -0
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/State.js +217 -0
- package/lib/Cloudflare/StateStore/State.js.map +1 -0
- package/lib/Cloudflare/StateStore/Store.d.ts +82 -0
- package/lib/Cloudflare/StateStore/Store.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/Store.js +191 -0
- package/lib/Cloudflare/StateStore/Store.js.map +1 -0
- package/lib/Cloudflare/StateStore/Token.d.ts +43 -0
- package/lib/Cloudflare/StateStore/Token.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/Token.js +61 -0
- package/lib/Cloudflare/StateStore/Token.js.map +1 -0
- package/lib/Cloudflare/StateStore/index.d.ts +2 -0
- package/lib/Cloudflare/StateStore/index.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/index.js +2 -0
- package/lib/Cloudflare/StateStore/index.js.map +1 -0
- package/lib/Cloudflare/Workers/Assets.d.ts +2 -2
- package/lib/Cloudflare/Workers/DurableObjectNamespace.d.ts +2 -2
- package/lib/Cloudflare/Workers/DurableObjectNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js +0 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +5 -5
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +0 -1
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/index.d.ts +4 -1
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +4 -1
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/Deploy.d.ts +10 -0
- package/lib/Deploy.d.ts.map +1 -0
- package/lib/Deploy.js +12 -0
- package/lib/Deploy.js.map +1 -0
- package/lib/Destroy.d.ts +8 -3
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Destroy.js +8 -8
- package/lib/Destroy.js.map +1 -1
- package/lib/GitHub/Providers.d.ts +3 -0
- package/lib/GitHub/Providers.d.ts.map +1 -0
- package/lib/GitHub/Providers.js +5 -0
- package/lib/GitHub/Providers.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/Http.d.ts +1 -1
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js +7 -3
- package/lib/Http.js.map +1 -1
- package/lib/Kubernetes/client.d.ts +10 -10
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +4 -0
- package/lib/Output.js.map +1 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +4 -0
- package/lib/Plan.js.map +1 -1
- package/lib/Platform.d.ts +2 -2
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +0 -1
- package/lib/Provider.js.map +1 -1
- package/lib/Stack.d.ts +24 -12
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +47 -10
- package/lib/Stack.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +96 -0
- package/lib/State/HttpStateApi.d.ts.map +1 -0
- package/lib/State/HttpStateApi.js +96 -0
- package/lib/State/HttpStateApi.js.map +1 -0
- package/lib/State/HttpStateStore.d.ts +10 -0
- package/lib/State/HttpStateStore.d.ts.map +1 -0
- package/lib/State/HttpStateStore.js +102 -0
- package/lib/State/HttpStateStore.js.map +1 -0
- package/lib/State/InMemoryState.d.ts +2 -30
- package/lib/State/InMemoryState.d.ts.map +1 -1
- package/lib/State/InMemoryState.js +23 -18
- package/lib/State/InMemoryState.js.map +1 -1
- package/lib/State/LocalState.d.ts +4 -2
- package/lib/State/LocalState.d.ts.map +1 -1
- package/lib/State/LocalState.js +9 -41
- package/lib/State/LocalState.js.map +1 -1
- package/lib/State/State.d.ts +11 -4
- package/lib/State/State.d.ts.map +1 -1
- package/lib/State/State.js +1 -1
- package/lib/State/State.js.map +1 -1
- package/lib/State/StateEncoding.d.ts +31 -0
- package/lib/State/StateEncoding.d.ts.map +1 -0
- package/lib/State/StateEncoding.js +82 -0
- package/lib/State/StateEncoding.js.map +1 -0
- package/lib/State/Sync.d.ts +23 -0
- package/lib/State/Sync.d.ts.map +1 -0
- package/lib/State/Sync.js +49 -0
- package/lib/State/Sync.js.map +1 -0
- package/lib/State/index.d.ts +4 -0
- package/lib/State/index.d.ts.map +1 -1
- package/lib/State/index.js +4 -0
- package/lib/State/index.js.map +1 -1
- package/lib/Test/Bun.d.ts +13 -17
- package/lib/Test/Bun.d.ts.map +1 -1
- package/lib/Test/Bun.js +17 -36
- package/lib/Test/Bun.js.map +1 -1
- package/lib/Test/TestState.d.ts +1 -2
- package/lib/Test/TestState.d.ts.map +1 -1
- package/lib/Test/TestState.js +5 -9
- package/lib/Test/TestState.js.map +1 -1
- package/lib/Test/Vitest.d.ts +3 -2
- package/lib/Test/Vitest.d.ts.map +1 -1
- package/lib/Test/Vitest.js +20 -11
- package/lib/Test/Vitest.js.map +1 -1
- package/lib/Test/index.d.ts +0 -1
- package/lib/Test/index.d.ts.map +1 -1
- package/lib/Test/index.js +0 -1
- package/lib/Test/index.js.map +1 -1
- package/lib/Util/FileLogger.d.ts +2 -2
- package/lib/Util/FileLogger.d.ts.map +1 -1
- package/lib/Util/FileLogger.js +2 -2
- package/lib/Util/FileLogger.js.map +1 -1
- package/lib/cli/index.d.ts +10 -5
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +2 -43045
- package/lib/cli/index.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +30 -15
- package/src/AWS/ECS/Task.ts +4 -4
- package/src/AWS/Lambda/Function.ts +2 -3
- package/src/AWS/SQS/QueueSink.ts +1 -2
- package/src/Agent/coding/bash.ts +2 -3
- package/src/Agent/coding/glob.ts +1 -2
- package/src/Agent/coding/grep.ts +1 -2
- package/src/AlchemyContext.ts +27 -0
- package/src/Auth/AuthProvider.ts +1 -1
- package/src/Auth/index.ts +3 -1
- package/src/{Test/TestCli.ts → Cli/LoggingCli.ts} +2 -2
- package/src/Cli/index.ts +4 -1
- package/src/Cloudflare/ApiToken/AccountApiToken.ts +197 -0
- package/src/Cloudflare/ApiToken/Common.ts +148 -0
- package/src/Cloudflare/ApiToken/PermissionGroups.ts +1910 -0
- package/src/Cloudflare/ApiToken/UserApiToken.ts +168 -0
- package/src/Cloudflare/ApiToken/index.ts +4 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +2 -2
- package/src/Cloudflare/Container/ContainerApplication.ts +8 -2
- package/src/Cloudflare/EdgeSession.ts +144 -0
- package/src/Cloudflare/Providers.ts +5 -0
- package/src/Cloudflare/StateStore/Api.ts +159 -0
- package/src/Cloudflare/StateStore/State.ts +318 -0
- package/src/Cloudflare/StateStore/Store.ts +290 -0
- package/src/Cloudflare/StateStore/Token.ts +68 -0
- package/src/Cloudflare/StateStore/index.ts +1 -0
- package/src/Cloudflare/Workers/DurableObjectNamespace.ts +1 -6
- package/src/Cloudflare/Workers/HttpServer.ts +1 -1
- package/src/Cloudflare/Workers/Worker.ts +7 -7
- package/src/Cloudflare/index.ts +4 -1
- package/src/Deploy.ts +25 -0
- package/src/Destroy.ts +25 -13
- package/src/GitHub/Providers.ts +6 -0
- package/src/GitHub/index.ts +1 -0
- package/src/Http.ts +31 -16
- package/src/Output.ts +3 -2
- package/src/Plan.ts +3 -0
- package/src/Platform.ts +8 -2
- package/src/Provider.ts +0 -2
- package/src/Stack.ts +146 -45
- package/src/State/HttpStateApi.ts +155 -0
- package/src/State/HttpStateStore.ts +156 -0
- package/src/State/InMemoryState.ts +15 -17
- package/src/State/LocalState.ts +13 -45
- package/src/State/State.ts +13 -4
- package/src/State/StateEncoding.ts +83 -0
- package/src/State/Sync.ts +89 -0
- package/src/State/index.ts +4 -0
- package/src/Test/Bun.ts +31 -89
- package/src/Test/TestState.ts +6 -8
- package/src/Test/Vitest.ts +32 -19
- package/src/Test/index.ts +0 -1
- package/src/Util/FileLogger.ts +2 -2
- package/src/index.ts +2 -1
- package/lib/Config.d.ts +0 -20
- package/lib/Config.d.ts.map +0 -1
- package/lib/Config.js +0 -22
- package/lib/Config.js.map +0 -1
- package/lib/Observability.d.ts +0 -2
- package/lib/Observability.d.ts.map +0 -1
- package/lib/Observability.js +0 -1
- package/lib/Observability.js.map +0 -1
- package/lib/Test/TestCli.d.ts +0 -4
- package/lib/Test/TestCli.d.ts.map +0 -1
- package/lib/Test/TestCli.js.map +0 -1
- package/src/Config.ts +0 -31
- package/src/Observability.ts +0 -0
package/src/Test/Bun.ts
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
1
|
-
import { BunServices } from "@effect/platform-bun";
|
|
2
1
|
import bun from "bun:test";
|
|
3
2
|
import { ConfigProvider } from "effect/ConfigProvider";
|
|
4
3
|
import * as Effect from "effect/Effect";
|
|
5
4
|
import * as Layer from "effect/Layer";
|
|
6
5
|
import * as Logger from "effect/Logger";
|
|
7
6
|
import * as Option from "effect/Option";
|
|
8
|
-
import type { Scope } from "effect/Scope";
|
|
9
7
|
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
10
|
-
import type { HttpClient } from "effect/unstable/http/HttpClient";
|
|
11
8
|
import type { HookOptions } from "node:test";
|
|
12
|
-
import
|
|
9
|
+
import { AlchemyContext, AlchemyContextLive } from "../AlchemyContext.ts";
|
|
13
10
|
import { provideFreshArtifactStore } from "../Artifacts.ts";
|
|
14
11
|
import { AuthProviders } from "../Auth/AuthProvider.ts";
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
|
|
12
|
+
import { inkCLI } from "../Cli/InkCLI.tsx";
|
|
13
|
+
import { deploy as _deploy } from "../Deploy.ts";
|
|
14
|
+
import { destroy as _destroy } from "../Destroy.ts";
|
|
15
|
+
import {
|
|
16
|
+
type CompiledStack,
|
|
17
|
+
type StackEffect,
|
|
18
|
+
type StackServices,
|
|
19
|
+
} from "../Stack.ts";
|
|
20
20
|
import * as State from "../State/index.ts";
|
|
21
21
|
import { loadConfigProvider } from "../Util/ConfigProvider.ts";
|
|
22
|
-
import {
|
|
22
|
+
import { PlatformServices } from "../Util/PlatformServices.ts";
|
|
23
23
|
|
|
24
24
|
export type ProvidedServices = StackServices;
|
|
25
25
|
|
|
26
|
-
type TestEffect<A, Req = never> =
|
|
27
|
-
A,
|
|
28
|
-
any,
|
|
29
|
-
BunServices.BunServices | HttpClient | Scope | Req
|
|
30
|
-
>;
|
|
26
|
+
type TestEffect<A, Req = never> = StackEffect<A, any, Req>;
|
|
31
27
|
|
|
32
|
-
const platform = Layer.mergeAll(
|
|
28
|
+
const platform = Layer.mergeAll(PlatformServices, FetchHttpClient.layer);
|
|
33
29
|
|
|
34
|
-
// override alchemy state store, CLI/reporting and dotAlchemy
|
|
30
|
+
// override alchemy state store, CLI/reporting, state, and dotAlchemy
|
|
35
31
|
const alchemy = Layer.mergeAll(
|
|
36
|
-
|
|
37
|
-
State.LocalState,
|
|
38
|
-
// CLI.inkCLI(),
|
|
39
|
-
// optional
|
|
32
|
+
inkCLI(),
|
|
40
33
|
Logger.layer([Logger.consolePretty()]),
|
|
41
|
-
|
|
34
|
+
AlchemyContextLive,
|
|
42
35
|
);
|
|
43
36
|
|
|
44
37
|
const run = <A>(effect: TestEffect<A>) =>
|
|
@@ -51,6 +44,7 @@ const run = <A>(effect: TestEffect<A>) =>
|
|
|
51
44
|
);
|
|
52
45
|
}).pipe(
|
|
53
46
|
Effect.provideService(AuthProviders, {}),
|
|
47
|
+
Effect.provide(State.localState()),
|
|
54
48
|
Effect.provide(Layer.provideMerge(alchemy, platform)),
|
|
55
49
|
Effect.scoped,
|
|
56
50
|
Effect.runPromise,
|
|
@@ -106,10 +100,7 @@ export namespace test {
|
|
|
106
100
|
|
|
107
101
|
export const describe = bun.describe;
|
|
108
102
|
|
|
109
|
-
export function beforeAll<A>(
|
|
110
|
-
eff: Effect.Effect<A, any>,
|
|
111
|
-
options?: HookOptions,
|
|
112
|
-
) {
|
|
103
|
+
export function beforeAll<A>(eff: TestEffect<A>, options?: HookOptions) {
|
|
113
104
|
let a: A;
|
|
114
105
|
bun.beforeAll(
|
|
115
106
|
() => run(eff).then((v) => (a = v)),
|
|
@@ -120,21 +111,17 @@ export function beforeAll<A>(
|
|
|
120
111
|
return Effect.sync(() => a);
|
|
121
112
|
}
|
|
122
113
|
|
|
123
|
-
export function beforeEach(
|
|
124
|
-
eff: Effect.Effect<void, any>,
|
|
125
|
-
options?: HookOptions,
|
|
126
|
-
) {
|
|
114
|
+
export function beforeEach(eff: TestEffect<void>, options?: HookOptions) {
|
|
127
115
|
bun.beforeEach(() => run(eff), options);
|
|
128
116
|
}
|
|
129
117
|
|
|
130
|
-
export function afterAll(eff:
|
|
118
|
+
export function afterAll(eff: TestEffect<any>, options?: HookOptions) {
|
|
131
119
|
bun.afterAll(() => run(eff), options);
|
|
132
120
|
}
|
|
133
121
|
|
|
134
122
|
export namespace afterAll {
|
|
135
123
|
export const skipIf =
|
|
136
|
-
(predicate: boolean) =>
|
|
137
|
-
(test: Effect.Effect<void, any>, options?: HookOptions) => {
|
|
124
|
+
(predicate: boolean) => (test: TestEffect<void>, options?: HookOptions) => {
|
|
138
125
|
if (predicate) {
|
|
139
126
|
} else {
|
|
140
127
|
bun.afterAll(
|
|
@@ -147,75 +134,30 @@ export namespace afterAll {
|
|
|
147
134
|
};
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
export function afterEach(
|
|
151
|
-
eff: Effect.Effect<void, any>,
|
|
152
|
-
options?: HookOptions,
|
|
153
|
-
) {
|
|
137
|
+
export function afterEach(eff: TestEffect<void>, options?: HookOptions) {
|
|
154
138
|
bun.afterEach(() => run(eff), options);
|
|
155
139
|
}
|
|
156
140
|
|
|
157
141
|
export const deploy = <A>(
|
|
158
|
-
|
|
142
|
+
stack: TestEffect<CompiledStack<A>, AlchemyContext>,
|
|
159
143
|
options?: {
|
|
160
144
|
/** @default test */
|
|
161
145
|
stage?: string;
|
|
162
146
|
},
|
|
163
147
|
) =>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const plan = yield* Plan.make(stack);
|
|
169
|
-
const output = yield* Apply.apply(plan);
|
|
170
|
-
return output as Input.Resolve<A>;
|
|
171
|
-
}),
|
|
172
|
-
options,
|
|
173
|
-
);
|
|
148
|
+
_deploy({
|
|
149
|
+
stack: stack,
|
|
150
|
+
stage: options?.stage ?? "test",
|
|
151
|
+
});
|
|
174
152
|
|
|
175
153
|
export const destroy = (
|
|
176
|
-
|
|
154
|
+
stack: TestEffect<CompiledStack, AlchemyContext>,
|
|
177
155
|
options?: {
|
|
178
156
|
/** @default test */
|
|
179
157
|
stage?: string;
|
|
180
158
|
},
|
|
181
159
|
) =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const plan = yield* Plan.make({
|
|
187
|
-
...stack,
|
|
188
|
-
// zero these out (destroy will treat all as orphans)
|
|
189
|
-
// TODO(sam): probably better to have Plan.destroy and Plan.update
|
|
190
|
-
resources: {},
|
|
191
|
-
bindings: {},
|
|
192
|
-
output: {},
|
|
193
|
-
});
|
|
194
|
-
yield* Apply.apply(plan);
|
|
195
|
-
}),
|
|
196
|
-
options,
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
const exec = <A, B>(
|
|
200
|
-
effect: TestEffect<CompiledStack<A>, Stage | DotAlchemy>,
|
|
201
|
-
fn: (stack: CompiledStack<A>) => Effect.Effect<B, any, any>,
|
|
202
|
-
options?: {
|
|
203
|
-
stage?: string;
|
|
204
|
-
},
|
|
205
|
-
) =>
|
|
206
|
-
Effect.gen(function* () {
|
|
207
|
-
const stack = yield* effect;
|
|
208
|
-
const configProvider = yield* loadConfigProvider(Option.none());
|
|
209
|
-
|
|
210
|
-
return yield* fn(stack).pipe(
|
|
211
|
-
provideFreshArtifactStore,
|
|
212
|
-
Effect.provide(stack.services),
|
|
213
|
-
Effect.provide(Layer.succeed(ConfigProvider, configProvider)),
|
|
214
|
-
);
|
|
215
|
-
}).pipe(
|
|
216
|
-
Effect.provideService(AuthProviders, {}),
|
|
217
|
-
Effect.provide(Layer.succeed(Stage, options?.stage ?? "test")),
|
|
218
|
-
Effect.provide(TestCli),
|
|
219
|
-
Effect.provide(Layer.provideMerge(alchemy, platform)),
|
|
220
|
-
Effect.scoped,
|
|
221
|
-
);
|
|
160
|
+
_destroy({
|
|
161
|
+
stack,
|
|
162
|
+
stage: options?.stage ?? "test",
|
|
163
|
+
});
|
package/src/Test/TestState.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
1
|
import * as Layer from "effect/Layer";
|
|
3
2
|
import { Stack } from "../Stack.ts";
|
|
4
|
-
import { Stage } from "../Stage.ts";
|
|
5
3
|
import * as State from "../State/index.ts";
|
|
6
4
|
|
|
7
5
|
export const state = (resources: Record<string, State.ResourceState> = {}) =>
|
|
8
6
|
Layer.effect(
|
|
9
7
|
State.State,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[
|
|
13
|
-
[
|
|
8
|
+
Stack.useSync((stack) =>
|
|
9
|
+
State.InMemoryService({
|
|
10
|
+
[stack.name]: {
|
|
11
|
+
[stack.stage]: resources,
|
|
14
12
|
},
|
|
15
|
-
})
|
|
16
|
-
|
|
13
|
+
}),
|
|
14
|
+
),
|
|
17
15
|
);
|
|
18
16
|
|
|
19
17
|
export const defaultState = (
|
package/src/Test/Vitest.ts
CHANGED
|
@@ -22,6 +22,7 @@ import * as AWS from "../AWS/index.ts";
|
|
|
22
22
|
import * as Cloudflare from "../Cloudflare/index.ts";
|
|
23
23
|
|
|
24
24
|
import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
25
|
+
import { AlchemyContext, AlchemyContextLive } from "../AlchemyContext.ts";
|
|
25
26
|
import { apply } from "../Apply.ts";
|
|
26
27
|
import { Artifacts, provideFreshArtifactStore } from "../Artifacts.ts";
|
|
27
28
|
import { AuthProviders } from "../Auth/AuthProvider.ts";
|
|
@@ -30,12 +31,12 @@ import * as AWSEnvironment from "../AWS/Environment.ts";
|
|
|
30
31
|
import * as AWSRegion from "../AWS/Region.ts";
|
|
31
32
|
import type { Command } from "../Build/Command.ts";
|
|
32
33
|
import type { Cli } from "../Cli/index.ts";
|
|
34
|
+
import { LoggingCli } from "../Cli/LoggingCli.ts";
|
|
33
35
|
import {
|
|
34
36
|
buildNamespaceTree,
|
|
35
37
|
flattenTree,
|
|
36
38
|
type DerivedAction,
|
|
37
39
|
} from "../Cli/NamespaceTree.ts";
|
|
38
|
-
import { DotAlchemy, dotAlchemy } from "../Config.ts";
|
|
39
40
|
import { ExecutionContext } from "../ExecutionContext.ts";
|
|
40
41
|
import type { Input } from "../Input.ts";
|
|
41
42
|
import type { Output } from "../Output.ts";
|
|
@@ -47,7 +48,6 @@ import * as Stack from "../Stack.ts";
|
|
|
47
48
|
import * as Stage from "../Stage.ts";
|
|
48
49
|
import * as State from "../State/index.ts";
|
|
49
50
|
import { PlatformServices } from "../Util/PlatformServices.ts";
|
|
50
|
-
import { TestCli } from "./TestCli.ts";
|
|
51
51
|
|
|
52
52
|
export const expectEmptyObject = () =>
|
|
53
53
|
expect.toSatisfy(
|
|
@@ -70,7 +70,7 @@ type Provided =
|
|
|
70
70
|
| Stack.Stack
|
|
71
71
|
| State.State
|
|
72
72
|
| Stage.Stage
|
|
73
|
-
|
|
|
73
|
+
| AlchemyContext
|
|
74
74
|
| HttpClient.HttpClient
|
|
75
75
|
| FileSystem.FileSystem
|
|
76
76
|
| Path.Path
|
|
@@ -101,7 +101,7 @@ const platform = Layer.mergeAll(
|
|
|
101
101
|
|
|
102
102
|
const awsEnvironment = Layer.unwrap(
|
|
103
103
|
Effect.gen(function* () {
|
|
104
|
-
const
|
|
104
|
+
const _profileName = yield* Config.string("AWS_PROFILE").pipe(
|
|
105
105
|
Config.withDefault("default"),
|
|
106
106
|
);
|
|
107
107
|
const LOCAL = yield* Config.boolean("LOCAL").pipe(
|
|
@@ -176,8 +176,8 @@ const runWithContext = <A, Err>(
|
|
|
176
176
|
);
|
|
177
177
|
|
|
178
178
|
const alchemy = Layer.provideMerge(
|
|
179
|
-
Layer.mergeAll(options.state ?? State.
|
|
180
|
-
Layer.mergeAll(stack,
|
|
179
|
+
Layer.mergeAll(options.state ?? State.localState(), LoggingCli),
|
|
180
|
+
Layer.mergeAll(stack, AlchemyContextLive),
|
|
181
181
|
);
|
|
182
182
|
|
|
183
183
|
const context = {
|
|
@@ -357,23 +357,26 @@ export namespace test {
|
|
|
357
357
|
export const deploy = <A, Err = never, Req = any>(
|
|
358
358
|
effect: Effect.Effect<A, Err, Req>,
|
|
359
359
|
): Effect.Effect<Input.Resolve<A>, Err, Req | Stack.Stack> =>
|
|
360
|
-
Stack.Stack.use((stack) =>
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
360
|
+
Stack.Stack.use((stack) =>
|
|
361
|
+
effect.pipe(
|
|
362
|
+
// @ts-expect-error - test harness reuses ambient runtime context
|
|
363
|
+
Stack.make({
|
|
364
|
+
name: stack.name,
|
|
365
|
+
providers: Layer.effectContext(Effect.context<never>()),
|
|
366
|
+
state: State.localState(),
|
|
367
|
+
stack: {
|
|
366
368
|
...stack,
|
|
367
369
|
resources: {},
|
|
368
370
|
bindings: {},
|
|
369
371
|
output: {},
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
),
|
|
375
|
-
|
|
376
|
-
|
|
372
|
+
},
|
|
373
|
+
}),
|
|
374
|
+
Effect.flatMap(Plan.make),
|
|
375
|
+
Effect.tap((plan) => Effect.logInfo(formatPlan(plan))),
|
|
376
|
+
Effect.flatMap(apply),
|
|
377
|
+
provideFreshArtifactStore,
|
|
378
|
+
),
|
|
379
|
+
);
|
|
377
380
|
}
|
|
378
381
|
|
|
379
382
|
type AnyAction = Plan.CRUD["action"] | Plan.BindingAction | DerivedAction;
|
|
@@ -528,3 +531,13 @@ export function afterAll<A, E, R extends Provided = never>(
|
|
|
528
531
|
options?.timeout,
|
|
529
532
|
);
|
|
530
533
|
}
|
|
534
|
+
export const destroy = () =>
|
|
535
|
+
Stack.Stack.use((stack) =>
|
|
536
|
+
Plan.make({
|
|
537
|
+
name: stack.name,
|
|
538
|
+
stage: stack.stage,
|
|
539
|
+
resources: {},
|
|
540
|
+
bindings: {},
|
|
541
|
+
output: {},
|
|
542
|
+
}).pipe(Effect.flatMap(apply), provideFreshArtifactStore),
|
|
543
|
+
);
|
package/src/Test/index.ts
CHANGED
package/src/Util/FileLogger.ts
CHANGED
|
@@ -2,12 +2,12 @@ import * as Effect from "effect/Effect";
|
|
|
2
2
|
import * as FileSystem from "effect/FileSystem";
|
|
3
3
|
import * as Logger from "effect/Logger";
|
|
4
4
|
import { Path } from "effect/Path";
|
|
5
|
-
import {
|
|
5
|
+
import { AlchemyContext } from "../AlchemyContext.ts";
|
|
6
6
|
|
|
7
7
|
export const fileLogger = Effect.fnUntraced(function* (
|
|
8
8
|
...segments: ReadonlyArray<string>
|
|
9
9
|
) {
|
|
10
|
-
const dotAlchemy = yield*
|
|
10
|
+
const { dotAlchemy } = yield* AlchemyContext;
|
|
11
11
|
const fs = yield* FileSystem.FileSystem;
|
|
12
12
|
const path = yield* Path;
|
|
13
13
|
const logFile = path.join(dotAlchemy, "log", ...segments);
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as AdoptPolicy from "./AdoptPolicy.ts";
|
|
2
|
+
export * from "./AlchemyContext.ts";
|
|
2
3
|
export * from "./Apply.ts";
|
|
3
4
|
export {
|
|
4
5
|
Service as BindingService,
|
|
@@ -8,7 +9,6 @@ export {
|
|
|
8
9
|
type PolicyLike,
|
|
9
10
|
type PolicyShape,
|
|
10
11
|
} from "./Binding.ts";
|
|
11
|
-
export * from "./Config.ts";
|
|
12
12
|
export * from "./Destroy.ts";
|
|
13
13
|
export * from "./Diff.ts";
|
|
14
14
|
export * from "./Input.ts";
|
|
@@ -27,6 +27,7 @@ export * as Server from "./Server/index.ts";
|
|
|
27
27
|
export * as Serverless from "./Serverless/index.ts";
|
|
28
28
|
export { Stack } from "./Stack.ts";
|
|
29
29
|
export * from "./Stage.ts";
|
|
30
|
+
export { inMemoryState, localState } from "./State/index.ts";
|
|
30
31
|
export * from "./Trait.ts";
|
|
31
32
|
|
|
32
33
|
export * as Construct from "./Construct.ts";
|
package/lib/Config.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as FileSystem from "effect/FileSystem";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as Path from "effect/Path";
|
|
5
|
-
export type cwd = typeof cwd;
|
|
6
|
-
/**
|
|
7
|
-
* Placeholder for referencing the current working directory in module-scoped code.
|
|
8
|
-
*
|
|
9
|
-
* Will be replaced lazily with the actual current working directory (as provided by Effect context).
|
|
10
|
-
*/
|
|
11
|
-
export declare const cwd: {
|
|
12
|
-
readonly type: "cwd";
|
|
13
|
-
};
|
|
14
|
-
export declare const isCwd: (x: any) => x is cwd;
|
|
15
|
-
declare const DotAlchemy_base: Context.ServiceClass<DotAlchemy, ".alchemy", string>;
|
|
16
|
-
export declare class DotAlchemy extends DotAlchemy_base {
|
|
17
|
-
}
|
|
18
|
-
export declare const dotAlchemy: Layer.Layer<DotAlchemy, import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=Config.d.ts.map
|
package/lib/Config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC;AAE7B;;;;GAIG;AACH,eAAO,MAAM,GAAG;;CAA2B,CAAC;AAE5C,eAAO,MAAM,KAAK,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,GAAwB,CAAC;;AAE7D,qBAAa,UAAW,SAAQ,eAE/B;CAAG;AAEJ,eAAO,MAAM,UAAU,0GAStB,CAAC"}
|
package/lib/Config.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as FileSystem from "effect/FileSystem";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Path from "effect/Path";
|
|
6
|
-
/**
|
|
7
|
-
* Placeholder for referencing the current working directory in module-scoped code.
|
|
8
|
-
*
|
|
9
|
-
* Will be replaced lazily with the actual current working directory (as provided by Effect context).
|
|
10
|
-
*/
|
|
11
|
-
export const cwd = { type: "cwd" };
|
|
12
|
-
export const isCwd = (x) => x?.type === "cwd";
|
|
13
|
-
export class DotAlchemy extends Context.Service()(".alchemy") {
|
|
14
|
-
}
|
|
15
|
-
export const dotAlchemy = Layer.effect(DotAlchemy, Effect.gen(function* () {
|
|
16
|
-
const fs = yield* FileSystem.FileSystem;
|
|
17
|
-
const path = yield* Path.Path;
|
|
18
|
-
const dir = path.join(process.cwd(), ".alchemy");
|
|
19
|
-
yield* fs.makeDirectory(dir, { recursive: true });
|
|
20
|
-
return dir;
|
|
21
|
-
}));
|
|
22
|
-
//# sourceMappingURL=Config.js.map
|
package/lib/Config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAIpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,KAAK,EAAW,CAAC;AAE5C,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAM,EAAY,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,KAAK,CAAC;AAE7D,MAAM,OAAO,UAAW,SAAQ,OAAO,CAAC,OAAO,EAAsB,CACnE,UAAU,CACX;CAAG;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CACpC,UAAU,EACV,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;IACjD,KAAK,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CACH,CAAC"}
|
package/lib/Observability.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Observability.d.ts","sourceRoot":"","sources":["../src/Observability.ts"],"names":[],"mappings":""}
|
package/lib/Observability.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Observability.js.map
|
package/lib/Observability.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Observability.js","sourceRoot":"","sources":["../src/Observability.ts"],"names":[],"mappings":""}
|
package/lib/Test/TestCli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TestCli.d.ts","sourceRoot":"","sources":["../../src/Test/TestCli.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,eAAO,MAAM,OAAO,gCAgBnB,CAAC"}
|
package/lib/Test/TestCli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TestCli.js","sourceRoot":"","sources":["../../src/Test/TestCli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAClC,GAAG,EACH,GAAG,CAAC,EAAE,CAAC;IACL,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;IACvC,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI;IAC9B,iBAAiB,EAAE,GAAG,EAAE,CACtB,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI;QACvB,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CACd,MAAM,CAAC,GAAG,CACR,KAAK,CAAC,IAAI,KAAK,eAAe;YAC5B,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,GAAG;YAC9C,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,CACpC;KACJ,CAAC;CACL,CAAC,CACH,CAAC"}
|
package/src/Config.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as FileSystem from "effect/FileSystem";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Path from "effect/Path";
|
|
6
|
-
|
|
7
|
-
export type cwd = typeof cwd;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Placeholder for referencing the current working directory in module-scoped code.
|
|
11
|
-
*
|
|
12
|
-
* Will be replaced lazily with the actual current working directory (as provided by Effect context).
|
|
13
|
-
*/
|
|
14
|
-
export const cwd = { type: "cwd" } as const;
|
|
15
|
-
|
|
16
|
-
export const isCwd = (x: any): x is cwd => x?.type === "cwd";
|
|
17
|
-
|
|
18
|
-
export class DotAlchemy extends Context.Service<DotAlchemy, string>()(
|
|
19
|
-
".alchemy",
|
|
20
|
-
) {}
|
|
21
|
-
|
|
22
|
-
export const dotAlchemy = Layer.effect(
|
|
23
|
-
DotAlchemy,
|
|
24
|
-
Effect.gen(function* () {
|
|
25
|
-
const fs = yield* FileSystem.FileSystem;
|
|
26
|
-
const path = yield* Path.Path;
|
|
27
|
-
const dir = path.join(process.cwd(), ".alchemy");
|
|
28
|
-
yield* fs.makeDirectory(dir, { recursive: true });
|
|
29
|
-
return dir;
|
|
30
|
-
}),
|
|
31
|
-
);
|
package/src/Observability.ts
DELETED
|
File without changes
|