alchemy 2.0.0-beta.25 → 2.0.0-beta.27
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.d.ts +2 -0
- package/bin/alchemy.d.ts.map +1 -0
- package/bin/alchemy.js +3 -57288
- package/bin/alchemy.js.map +1 -1
- package/bin/alchemy.ts +3 -59
- package/bin/exec.d.ts +2 -0
- package/bin/exec.d.ts.map +1 -0
- package/bin/exec.js +2360 -0
- package/bin/exec.js.map +1 -0
- package/bin/exec.ts +3 -21
- package/lib/AWS/AuthProvider.d.ts +1 -1
- package/lib/AWS/AuthProvider.d.ts.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/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +20 -3
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Lock.d.ts +12 -0
- package/lib/Auth/Lock.d.ts.map +1 -0
- package/lib/Auth/Lock.js +27 -0
- package/lib/Auth/Lock.js.map +1 -0
- package/lib/Axiom/AuthProvider.d.ts +1 -1
- package/lib/Axiom/AuthProvider.d.ts.map +1 -1
- package/lib/Axiom/Credentials.d.ts +1 -1
- package/lib/Axiom/Credentials.d.ts.map +1 -1
- package/lib/Bundle/Bundle.d.ts +3 -3
- package/lib/Cli/commands/_shared.d.ts +51 -0
- package/lib/Cli/commands/_shared.d.ts.map +1 -0
- package/lib/Cli/commands/_shared.js +176 -0
- package/lib/Cli/commands/_shared.js.map +1 -0
- package/lib/Cli/commands/bootstrap.d.ts +6 -0
- package/lib/Cli/commands/bootstrap.d.ts.map +1 -0
- package/lib/Cli/commands/bootstrap.js +106 -0
- package/lib/Cli/commands/bootstrap.js.map +1 -0
- package/lib/Cli/commands/deploy.d.ts +56 -0
- package/lib/Cli/commands/deploy.d.ts.map +1 -0
- package/lib/Cli/commands/deploy.js +128 -0
- package/lib/Cli/commands/deploy.js.map +1 -0
- package/lib/Cli/commands/dev.d.ts +10 -0
- package/lib/Cli/commands/dev.d.ts.map +1 -0
- package/lib/Cli/commands/dev.js +45 -0
- package/lib/Cli/commands/dev.js.map +1 -0
- package/lib/Cli/commands/login.d.ts +10 -0
- package/lib/Cli/commands/login.d.ts.map +1 -0
- package/lib/Cli/commands/login.js +59 -0
- package/lib/Cli/commands/login.js.map +1 -0
- package/lib/Cli/commands/logs.d.ts +12 -0
- package/lib/Cli/commands/logs.d.ts.map +1 -0
- package/lib/Cli/commands/logs.js +99 -0
- package/lib/Cli/commands/logs.js.map +1 -0
- package/lib/Cli/commands/profile.d.ts +3 -0
- package/lib/Cli/commands/profile.d.ts.map +1 -0
- package/lib/Cli/commands/profile.js +76 -0
- package/lib/Cli/commands/profile.js.map +1 -0
- package/lib/Cli/commands/state.d.ts +3 -0
- package/lib/Cli/commands/state.d.ts.map +1 -0
- package/lib/Cli/commands/state.js +221 -0
- package/lib/Cli/commands/state.js.map +1 -0
- package/lib/Cli/commands/tail.d.ts +9 -0
- package/lib/Cli/commands/tail.d.ts.map +1 -0
- package/lib/Cli/commands/tail.js +93 -0
- package/lib/Cli/commands/tail.js.map +1 -0
- package/lib/Cli/exec.d.ts +3 -0
- package/lib/Cli/exec.d.ts.map +1 -0
- package/lib/Cli/exec.js +12 -0
- package/lib/Cli/exec.js.map +1 -0
- package/lib/Cli/index.d.ts +2 -1
- package/lib/Cli/index.d.ts.map +1 -1
- package/lib/Cli/index.js +2 -5
- package/lib/Cli/index.js.map +1 -1
- package/lib/Cli/main.d.ts +3 -0
- package/lib/Cli/main.d.ts.map +1 -0
- package/lib/Cli/main.js +40 -0
- package/lib/Cli/main.js.map +1 -0
- package/lib/Cli/{InkCLI.d.ts → tui/InkCLI.d.ts} +1 -1
- package/lib/Cli/tui/InkCLI.d.ts.map +1 -0
- package/lib/Cli/{InkCLI.js → tui/InkCLI.js} +1 -1
- package/lib/Cli/tui/InkCLI.js.map +1 -0
- package/lib/Cli/{components → tui/components}/ApprovePlan.d.ts +1 -1
- package/lib/Cli/tui/components/ApprovePlan.d.ts.map +1 -0
- package/lib/Cli/tui/components/ApprovePlan.js.map +1 -0
- package/lib/Cli/{components → tui/components}/Plan.d.ts +1 -1
- package/lib/Cli/tui/components/Plan.d.ts.map +1 -0
- package/lib/Cli/{components → tui/components}/Plan.js +1 -1
- package/lib/Cli/tui/components/Plan.js.map +1 -0
- package/lib/Cli/{components → tui/components}/PlanProgress.d.ts +3 -3
- package/lib/Cli/tui/components/PlanProgress.d.ts.map +1 -0
- package/lib/Cli/{components → tui/components}/PlanProgress.js +1 -1
- package/lib/Cli/tui/components/PlanProgress.js.map +1 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +0 -4
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +1 -1
- package/lib/Cloudflare/Credentials.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Clone.d.ts +1 -1
- package/lib/Cloudflare/D1/D1Clone.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Import.d.ts +1 -1
- package/lib/Cloudflare/D1/D1Import.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Migrations.d.ts +1 -1
- package/lib/Cloudflare/D1/D1Migrations.d.ts.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.d.ts +1 -1
- package/lib/Cloudflare/KV/KVNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/Logs.d.ts +1 -1
- package/lib/Cloudflare/Logs.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.d.ts +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretsStore.d.ts +1 -1
- package/lib/Cloudflare/SecretsStore/SecretsStore.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretsStore.js +5 -5
- package/lib/Cloudflare/SecretsStore/SecretsStore.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +13 -0
- package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/Api.js +15 -2
- package/lib/Cloudflare/StateStore/Api.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +3 -3
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.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/Worker.d.ts +2 -2
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +14 -12
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts.map +1 -1
- package/lib/Deploy.d.ts +1 -1
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Destroy.d.ts +1 -1
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/GitHub/AuthProvider.d.ts +1 -1
- package/lib/GitHub/AuthProvider.d.ts.map +1 -1
- package/lib/GitHub/Credentials.d.ts +1 -1
- package/lib/GitHub/Credentials.d.ts.map +1 -1
- package/lib/GitHub/Providers.d.ts +1 -1
- package/lib/GitHub/Providers.d.ts.map +1 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +13 -2
- package/lib/Output.js.map +1 -1
- package/lib/Provider.d.ts +1 -1
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Stack.js +2 -2
- package/lib/Stack.js.map +1 -1
- package/lib/Telemetry/Layer.d.ts.map +1 -1
- package/lib/Telemetry/Layer.js +13 -1
- package/lib/Telemetry/Layer.js.map +1 -1
- package/lib/Test/Bun.d.ts +59 -28
- package/lib/Test/Bun.d.ts.map +1 -1
- package/lib/Test/Bun.js +77 -81
- package/lib/Test/Bun.js.map +1 -1
- package/lib/Test/Core.d.ts +73 -0
- package/lib/Test/Core.d.ts.map +1 -0
- package/lib/Test/Core.js +98 -0
- package/lib/Test/Core.js.map +1 -0
- package/lib/Test/Vitest.d.ts +53 -72
- package/lib/Test/Vitest.d.ts.map +1 -1
- package/lib/Test/Vitest.js +73 -232
- 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/index.d.ts +1 -0
- package/lib/Util/index.d.ts.map +1 -1
- package/lib/Util/index.js +1 -0
- package/lib/Util/index.js.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +68 -52
- package/src/Auth/AuthProvider.ts +22 -4
- package/src/Auth/Lock.ts +35 -0
- package/{bin → src/Cli}/commands/_shared.ts +5 -5
- package/{bin → src/Cli}/commands/bootstrap.ts +18 -14
- package/{bin → src/Cli}/commands/deploy.ts +16 -16
- package/{bin → src/Cli}/commands/dev.ts +13 -3
- package/{bin → src/Cli}/commands/login.ts +9 -9
- package/{bin → src/Cli}/commands/logs.ts +11 -11
- package/{bin → src/Cli}/commands/profile.ts +8 -8
- package/{bin → src/Cli}/commands/state.ts +47 -26
- package/{bin → src/Cli}/commands/tail.ts +11 -11
- package/src/Cli/exec.ts +23 -0
- package/src/Cli/index.ts +2 -5
- package/src/Cli/main.ts +60 -0
- package/src/Cli/{InkCLI.tsx → tui/InkCLI.tsx} +3 -3
- package/src/Cli/{components → tui/components}/ApprovePlan.tsx +1 -1
- package/src/Cli/{components → tui/components}/Plan.tsx +6 -2
- package/src/Cli/{components → tui/components}/PlanProgress.tsx +7 -3
- package/src/Cloudflare/Auth/AuthProvider.ts +0 -5
- package/src/Cloudflare/SecretsStore/SecretsStore.ts +5 -5
- package/src/Cloudflare/StateStore/Api.ts +15 -2
- package/src/Cloudflare/StateStore/State.ts +3 -9
- package/src/Cloudflare/Workers/Worker.ts +29 -44
- package/src/Output.ts +10 -2
- package/src/Provider.ts +1 -1
- package/src/Stack.ts +2 -2
- package/src/Telemetry/Layer.ts +13 -1
- package/src/Test/Bun.ts +164 -140
- package/src/Test/Core.ts +225 -0
- package/src/Test/Vitest.ts +157 -509
- package/src/Test/index.ts +0 -1
- package/src/Util/index.ts +1 -0
- package/src/index.ts +14 -0
- package/lib/Cli/InkCLI.d.ts.map +0 -1
- package/lib/Cli/InkCLI.js.map +0 -1
- package/lib/Cli/components/ApprovePlan.d.ts.map +0 -1
- package/lib/Cli/components/ApprovePlan.js.map +0 -1
- package/lib/Cli/components/Plan.d.ts.map +0 -1
- package/lib/Cli/components/Plan.js.map +0 -1
- package/lib/Cli/components/PlanProgress.d.ts.map +0 -1
- package/lib/Cli/components/PlanProgress.js.map +0 -1
- package/lib/cli/index.d.ts +0 -413
- package/lib/cli/index.d.ts.map +0 -1
- package/lib/cli/index.js +0 -10
- package/lib/cli/index.js.map +0 -1
- /package/lib/Cli/{components → tui/components}/ApprovePlan.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alchemy",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.27",
|
|
4
4
|
"homepage": "https://alchemy.run",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Sam Goodwin <sam@alchemy.run>",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"scripts": {
|
|
23
23
|
"dev": "tsdown --watch",
|
|
24
|
-
"build": "
|
|
24
|
+
"build": "bun bundle",
|
|
25
25
|
"bundle": "tsdown",
|
|
26
26
|
"bundle:watch": "tsdown --watch",
|
|
27
27
|
"publish:npm": "cp ../README.md . && bun publish && rm README.md",
|
|
@@ -29,204 +29,218 @@
|
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
".": {
|
|
32
|
-
"types": "./
|
|
32
|
+
"types": "./lib/index.d.ts",
|
|
33
33
|
"bun": "./src/index.ts",
|
|
34
34
|
"worker": "./src/index.ts",
|
|
35
35
|
"import": "./lib/index.js"
|
|
36
36
|
},
|
|
37
37
|
"./*": {
|
|
38
|
-
"types": "./
|
|
38
|
+
"types": "./lib/*.d.ts",
|
|
39
39
|
"bun": "./src/*.ts",
|
|
40
40
|
"worker": "./src/*.ts",
|
|
41
41
|
"import": "./lib/*.js"
|
|
42
42
|
},
|
|
43
43
|
"./Agent": {
|
|
44
|
-
"types": "./
|
|
44
|
+
"types": "./lib/Agent/index.d.ts",
|
|
45
45
|
"bun": "./src/Agent/index.ts",
|
|
46
46
|
"worker": "./src/Agent/index.ts",
|
|
47
47
|
"import": "./lib/Agent/index.js"
|
|
48
48
|
},
|
|
49
49
|
"./Auth": {
|
|
50
|
-
"types": "./
|
|
50
|
+
"types": "./lib/Auth/index.d.ts",
|
|
51
51
|
"bun": "./src/Auth/index.ts",
|
|
52
52
|
"worker": "./src/Auth/index.ts",
|
|
53
53
|
"import": "./lib/Auth/index.js"
|
|
54
54
|
},
|
|
55
55
|
"./AWS": {
|
|
56
|
-
"types": "./
|
|
56
|
+
"types": "./lib/AWS/index.d.ts",
|
|
57
57
|
"bun": "./src/AWS/index.ts",
|
|
58
58
|
"worker": "./src/AWS/index.ts",
|
|
59
59
|
"import": "./lib/AWS/index.js"
|
|
60
60
|
},
|
|
61
61
|
"./AWS/*": {
|
|
62
|
-
"types": "./
|
|
62
|
+
"types": "./lib/AWS/*/index.d.ts",
|
|
63
63
|
"bun": "./src/AWS/*/index.ts",
|
|
64
64
|
"worker": "./src/AWS/*/index.ts",
|
|
65
65
|
"import": "./lib/AWS/*/index.js"
|
|
66
66
|
},
|
|
67
67
|
"./AWS/Credentials": {
|
|
68
|
-
"types": "./
|
|
68
|
+
"types": "./lib/AWS/Credentials/index.d.ts",
|
|
69
69
|
"bun": "./src/AWS/Credentials/index.ts",
|
|
70
70
|
"worker": "./src/AWS/Credentials/index.ts",
|
|
71
71
|
"import": "./lib/AWS/Credentials/index.js"
|
|
72
72
|
},
|
|
73
73
|
"./AWS/Endpoint": {
|
|
74
|
-
"types": "./
|
|
74
|
+
"types": "./lib/AWS/Endpoint/index.d.ts",
|
|
75
75
|
"bun": "./src/AWS/Endpoint/index.ts",
|
|
76
76
|
"worker": "./src/AWS/Endpoint/index.ts",
|
|
77
77
|
"import": "./lib/AWS/Endpoint/index.js"
|
|
78
78
|
},
|
|
79
79
|
"./AWS/Region": {
|
|
80
|
-
"types": "./
|
|
80
|
+
"types": "./lib/AWS/Region/index.d.ts",
|
|
81
81
|
"bun": "./src/AWS/Region/index.ts",
|
|
82
82
|
"worker": "./src/AWS/Region/index.ts",
|
|
83
83
|
"import": "./lib/AWS/Region/index.js"
|
|
84
84
|
},
|
|
85
85
|
"./AWS/Profile": {
|
|
86
|
-
"types": "./
|
|
86
|
+
"types": "./lib/AWS/Profile/index.d.ts",
|
|
87
87
|
"bun": "./src/AWS/Profile/index.ts",
|
|
88
88
|
"worker": "./src/AWS/Profile/index.ts",
|
|
89
89
|
"import": "./lib/AWS/Profile/index.js"
|
|
90
90
|
},
|
|
91
91
|
"./AWS/Lambda/*": {
|
|
92
|
-
"types": "./
|
|
92
|
+
"types": "./lib/AWS/Lambda/*.d.ts",
|
|
93
93
|
"bun": "./src/AWS/Lambda/*.ts",
|
|
94
94
|
"worker": "./src/AWS/Lambda/*.ts",
|
|
95
95
|
"import": "./lib/AWS/Lambda/*.js"
|
|
96
96
|
},
|
|
97
97
|
"./Build": {
|
|
98
|
-
"types": "./
|
|
98
|
+
"types": "./lib/Build/index.d.ts",
|
|
99
99
|
"bun": "./src/Build/index.ts",
|
|
100
100
|
"worker": "./src/Build/index.ts",
|
|
101
101
|
"import": "./lib/Build/index.js"
|
|
102
102
|
},
|
|
103
103
|
"./Construct": {
|
|
104
|
-
"types": "./
|
|
104
|
+
"types": "./lib/Construct/index.d.ts",
|
|
105
105
|
"bun": "./src/Construct/index.ts",
|
|
106
106
|
"worker": "./src/Construct/index.ts",
|
|
107
107
|
"import": "./lib/Construct/index.js"
|
|
108
108
|
},
|
|
109
109
|
"./Bundle": {
|
|
110
|
-
"types": "./
|
|
110
|
+
"types": "./lib/Bundle/index.d.ts",
|
|
111
111
|
"bun": "./src/Bundle/index.ts",
|
|
112
112
|
"worker": "./src/Bundle/index.ts",
|
|
113
113
|
"import": "./lib/Bundle/index.js"
|
|
114
114
|
},
|
|
115
115
|
"./ContentType": {
|
|
116
|
-
"types": "./
|
|
116
|
+
"types": "./lib/ContentType.d.ts",
|
|
117
117
|
"bun": "./src/ContentType.ts",
|
|
118
118
|
"worker": "./src/ContentType.ts",
|
|
119
119
|
"import": "./lib/ContentType.js"
|
|
120
120
|
},
|
|
121
|
+
"./Cli": {
|
|
122
|
+
"types": "./lib/Cli/index.d.ts",
|
|
123
|
+
"bun": "./src/Cli/index.ts",
|
|
124
|
+
"worker": "./src/Cli/index.ts",
|
|
125
|
+
"import": "./lib/Cli/index.js"
|
|
126
|
+
},
|
|
127
|
+
"./Cli/InkCLI": {
|
|
128
|
+
"types": "./lib/Cli/InkCLI.d.ts",
|
|
129
|
+
"bun": "./src/Cli/InkCLI.tsx",
|
|
130
|
+
"worker": "./src/Cli/InkCLI.tsx",
|
|
131
|
+
"import": "./lib/Cli/InkCLI.js"
|
|
132
|
+
},
|
|
121
133
|
"./Cloudflare": {
|
|
122
|
-
"types": "./
|
|
134
|
+
"types": "./lib/Cloudflare/index.d.ts",
|
|
123
135
|
"bun": "./src/Cloudflare/index.ts",
|
|
124
136
|
"worker": "./src/Cloudflare/index.ts",
|
|
125
137
|
"import": "./lib/Cloudflare/index.js"
|
|
126
138
|
},
|
|
127
139
|
"./Cloudflare/Live": {
|
|
128
|
-
"types": "./
|
|
140
|
+
"types": "./lib/Cloudflare/Live.d.ts",
|
|
129
141
|
"bun": "./src/Cloudflare/Live.ts",
|
|
130
142
|
"worker": "./src/Cloudflare/Live.ts",
|
|
131
143
|
"import": "./lib/Cloudflare/Live.js"
|
|
132
144
|
},
|
|
133
145
|
"./Cloudflare/*": {
|
|
134
|
-
"types": "./
|
|
146
|
+
"types": "./lib/Cloudflare/*/index.d.ts",
|
|
135
147
|
"bun": "./src/Cloudflare/*/index.ts",
|
|
136
148
|
"worker": "./src/Cloudflare/*/index.ts",
|
|
137
149
|
"import": "./lib/Cloudflare/*/index.js"
|
|
138
150
|
},
|
|
139
151
|
"./Axiom": {
|
|
140
|
-
"types": "./
|
|
152
|
+
"types": "./lib/Axiom/index.d.ts",
|
|
141
153
|
"bun": "./src/Axiom/index.ts",
|
|
142
154
|
"worker": "./src/Axiom/index.ts",
|
|
143
155
|
"import": "./lib/Axiom/index.js"
|
|
144
156
|
},
|
|
145
157
|
"./GitHub": {
|
|
146
|
-
"types": "./
|
|
158
|
+
"types": "./lib/GitHub/index.d.ts",
|
|
147
159
|
"bun": "./src/GitHub/index.ts",
|
|
148
160
|
"worker": "./src/GitHub/index.ts",
|
|
149
161
|
"import": "./lib/GitHub/index.js"
|
|
150
162
|
},
|
|
151
163
|
"./Endpoint": {
|
|
152
|
-
"types": "./
|
|
164
|
+
"types": "./lib/Endpoint/index.d.ts",
|
|
153
165
|
"bun": "./src/Endpoint/index.ts",
|
|
154
166
|
"worker": "./src/Endpoint/index.ts",
|
|
155
167
|
"import": "./lib/Endpoint/index.js"
|
|
156
168
|
},
|
|
157
169
|
"./Kubernetes": {
|
|
158
|
-
"types": "./
|
|
170
|
+
"types": "./lib/Kubernetes/index.d.ts",
|
|
159
171
|
"bun": "./src/Kubernetes/index.ts",
|
|
160
172
|
"worker": "./src/Kubernetes/index.ts",
|
|
161
173
|
"import": "./lib/Kubernetes/index.js"
|
|
162
174
|
},
|
|
163
175
|
"./Output": {
|
|
164
|
-
"types": "./
|
|
176
|
+
"types": "./lib/Output.d.ts",
|
|
165
177
|
"bun": "./src/Output.ts",
|
|
166
178
|
"worker": "./src/Output.ts",
|
|
167
179
|
"import": "./lib/Output.js"
|
|
168
180
|
},
|
|
169
181
|
"./Process": {
|
|
170
|
-
"types": "./
|
|
182
|
+
"types": "./lib/Process/index.d.ts",
|
|
171
183
|
"bun": "./src/Process/index.ts",
|
|
172
184
|
"worker": "./src/Process/index.ts",
|
|
173
185
|
"import": "./lib/Process/index.js"
|
|
174
186
|
},
|
|
175
187
|
"./SQLite": {
|
|
176
|
-
"types": "./
|
|
188
|
+
"types": "./lib/SQLite/index.d.ts",
|
|
177
189
|
"bun": "./src/SQLite/index.ts",
|
|
178
190
|
"worker": "./src/SQLite/index.ts",
|
|
179
191
|
"import": "./lib/SQLite/index.js"
|
|
180
192
|
},
|
|
181
193
|
"./TUI": {
|
|
182
|
-
"types": "./
|
|
194
|
+
"types": "./lib/TUI/index.d.ts",
|
|
183
195
|
"bun": "./src/TUI/index.ts",
|
|
184
196
|
"worker": "./src/TUI/index.ts",
|
|
185
197
|
"import": "./lib/TUI/index.js"
|
|
186
198
|
},
|
|
187
199
|
"./Server": {
|
|
188
|
-
"types": "./
|
|
200
|
+
"types": "./lib/Server/index.d.ts",
|
|
189
201
|
"bun": "./src/Server/index.ts",
|
|
190
202
|
"worker": "./src/Server/index.ts",
|
|
191
203
|
"import": "./lib/Server/index.js"
|
|
192
204
|
},
|
|
193
205
|
"./Stack": {
|
|
194
|
-
"types": "./
|
|
206
|
+
"types": "./lib/Stack.d.ts",
|
|
195
207
|
"bun": "./src/Stack.ts",
|
|
196
208
|
"worker": "./src/Stack.ts",
|
|
197
209
|
"import": "./lib/Stack.js"
|
|
198
210
|
},
|
|
199
211
|
"./State": {
|
|
200
|
-
"types": "./
|
|
212
|
+
"types": "./lib/State/index.d.ts",
|
|
201
213
|
"bun": "./src/State/index.ts",
|
|
202
214
|
"worker": "./src/State/index.ts",
|
|
203
215
|
"import": "./lib/State/index.js"
|
|
204
216
|
},
|
|
205
217
|
"./State/*": {
|
|
206
|
-
"types": "./
|
|
218
|
+
"types": "./lib/State/*.d.ts",
|
|
207
219
|
"bun": "./src/State/*.ts",
|
|
208
220
|
"worker": "./src/State/*.ts",
|
|
209
221
|
"import": "./lib/State/*.js"
|
|
210
222
|
},
|
|
211
223
|
"./Test/Bun": {
|
|
212
|
-
"types": "./
|
|
224
|
+
"types": "./lib/Test/Bun.d.ts",
|
|
213
225
|
"bun": "./src/Test/Bun.ts",
|
|
214
226
|
"worker": "./src/Test/Bun.ts",
|
|
215
227
|
"import": "./lib/Test/Bun.js"
|
|
216
228
|
},
|
|
217
229
|
"./Util": {
|
|
218
|
-
"types": "./
|
|
230
|
+
"types": "./lib/Util/index.d.ts",
|
|
219
231
|
"bun": "./src/Util/index.ts",
|
|
220
232
|
"worker": "./src/Util/index.ts",
|
|
221
233
|
"import": "./lib/Util/index.js"
|
|
222
234
|
},
|
|
223
235
|
"./Util/Clank": {
|
|
224
|
-
"types": "./
|
|
236
|
+
"types": "./lib/Util/Clank.d.ts",
|
|
225
237
|
"bun": "./src/Util/Clank.ts",
|
|
226
238
|
"worker": "./src/Util/Clank.ts",
|
|
227
239
|
"import": "./lib/Util/Clank.js"
|
|
228
240
|
},
|
|
229
|
-
"./bin/alchemy.js": "./bin/alchemy.js"
|
|
241
|
+
"./bin/alchemy.js": "./bin/alchemy.js",
|
|
242
|
+
"./bin/exec.ts": "./bin/exec.ts",
|
|
243
|
+
"./bin/exec.js": "./bin/exec.js"
|
|
230
244
|
},
|
|
231
245
|
"publishConfig": {
|
|
232
246
|
"access": "public"
|
|
@@ -237,14 +251,14 @@
|
|
|
237
251
|
"@ai-sdk/provider": "^3.0.8",
|
|
238
252
|
"@aws-sdk/credential-providers": "^3.0.0",
|
|
239
253
|
"@clack/prompts": "^0.11.0",
|
|
240
|
-
"@distilled.cloud/aws": "^0.
|
|
241
|
-
"@distilled.cloud/axiom": "^0.
|
|
242
|
-
"@distilled.cloud/cloudflare": "^0.
|
|
254
|
+
"@distilled.cloud/aws": "^0.15.2",
|
|
255
|
+
"@distilled.cloud/axiom": "^0.15.2",
|
|
256
|
+
"@distilled.cloud/cloudflare": "^0.15.2",
|
|
243
257
|
"@distilled.cloud/cloudflare-rolldown-plugin": "0.3.0",
|
|
244
258
|
"@distilled.cloud/cloudflare-runtime": "0.1.1",
|
|
245
259
|
"@distilled.cloud/cloudflare-vite-plugin": "0.2.0",
|
|
246
|
-
"@distilled.cloud/core": "^0.
|
|
247
|
-
"@effect/vitest": "4.0.0-beta.58",
|
|
260
|
+
"@distilled.cloud/core": "^0.15.2",
|
|
261
|
+
"@effect/vitest": ">=4.0.0-beta.58 || >=4.0.0",
|
|
248
262
|
"@libsql/client": "^0.17.0",
|
|
249
263
|
"@octokit/rest": "^22.0.1",
|
|
250
264
|
"@smithy/node-config-provider": "^4.0.0",
|
|
@@ -261,10 +275,14 @@
|
|
|
261
275
|
"fast-xml-parser": "^5.3.4",
|
|
262
276
|
"foreground-child": "^4.0.3",
|
|
263
277
|
"ignore": "^7.0.5",
|
|
278
|
+
"ink": "^6.3.1",
|
|
264
279
|
"jszip": "^3.10.1",
|
|
265
280
|
"libsodium-wrappers": "^0.8.3",
|
|
266
281
|
"magic-string": "^0.30.21",
|
|
282
|
+
"pathe": "^2.0.3",
|
|
267
283
|
"picomatch": "^4.0.4",
|
|
284
|
+
"proper-lockfile": "^4.1.2",
|
|
285
|
+
"react": "^19.2.0",
|
|
268
286
|
"rolldown": "1.0.0-rc.17",
|
|
269
287
|
"sonda": "^0.11.1",
|
|
270
288
|
"web-tree-sitter": "0.25.10",
|
|
@@ -274,31 +292,29 @@
|
|
|
274
292
|
"devDependencies": {
|
|
275
293
|
"@clack/prompts": "^0.11.0",
|
|
276
294
|
"@cloudflare/workers-types": "^4.20250805.0",
|
|
277
|
-
"@effect/platform-bun": "4.0.0-beta.58",
|
|
278
|
-
"@effect/platform-node": "4.0.0-beta.58",
|
|
279
|
-
"@effect/platform-node-shared": "4.0.0-beta.58",
|
|
295
|
+
"@effect/platform-bun": ">=4.0.0-beta.58 || >=4.0.0",
|
|
296
|
+
"@effect/platform-node": ">=4.0.0-beta.58 || >=4.0.0",
|
|
297
|
+
"@effect/platform-node-shared": ">=4.0.0-beta.58 || >=4.0.0",
|
|
280
298
|
"@oxc-project/types": "^0.127.0",
|
|
281
299
|
"@types/aws-lambda": "^8.10.152",
|
|
282
300
|
"@types/bun": "latest",
|
|
283
301
|
"@types/node": "latest",
|
|
284
302
|
"@types/picomatch": "^4.0.0",
|
|
303
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
285
304
|
"@types/react": "^19.2.2",
|
|
286
305
|
"better-auth": "^1.6.2",
|
|
287
|
-
"effect": "4.0.0-beta.58",
|
|
288
|
-
"ink": "^6.3.1",
|
|
289
|
-
"pathe": "^2.0.3",
|
|
290
|
-
"react": "^19.2.0",
|
|
306
|
+
"effect": ">=4.0.0-beta.58 || >=4.0.0",
|
|
291
307
|
"react-devtools-core": "^7.0.1",
|
|
292
308
|
"solid-js": "latest",
|
|
293
309
|
"tsconfig-paths": "^4.2.0",
|
|
294
310
|
"tsdown": "^0.15.4",
|
|
295
311
|
"tsx": "^4.20.6",
|
|
296
|
-
"typescript": "^
|
|
312
|
+
"typescript": "^6.0.3"
|
|
297
313
|
},
|
|
298
314
|
"peerDependencies": {
|
|
299
|
-
"@effect/platform-bun": "4.0.0-beta.58",
|
|
300
|
-
"@effect/platform-node": "4.0.0-beta.58",
|
|
301
|
-
"effect": "4.0.0-beta.58",
|
|
315
|
+
"@effect/platform-bun": ">=4.0.0-beta.58 || >=4.0.0",
|
|
316
|
+
"@effect/platform-node": ">=4.0.0-beta.58 || >=4.0.0",
|
|
317
|
+
"effect": ">=4.0.0-beta.58 || >=4.0.0",
|
|
302
318
|
"vite": "^8.0.7"
|
|
303
319
|
},
|
|
304
320
|
"peerDependenciesMeta": {
|
package/src/Auth/AuthProvider.ts
CHANGED
|
@@ -2,6 +2,17 @@ import * as Context from "effect/Context";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
|
+
import { withLock } from "./Lock.ts";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Methods on an {@link AuthProviderImpl} that mutate (or could trigger
|
|
9
|
+
* mutation of) on-disk credentials. The factory wraps these in a
|
|
10
|
+
* cross-process file lock keyed by `(profileName, providerName)` so that
|
|
11
|
+
* concurrent processes never refresh / write credentials simultaneously.
|
|
12
|
+
*
|
|
13
|
+
* `prettyPrint` is intentionally excluded: it's read-only display.
|
|
14
|
+
*/
|
|
15
|
+
const LOCKED_METHODS = new Set(["read", "login", "logout", "configure"]);
|
|
5
16
|
|
|
6
17
|
export class AuthError extends Schema.TaggedErrorClass<AuthError>()(
|
|
7
18
|
"AuthError",
|
|
@@ -129,10 +140,17 @@ export const AuthProvider =
|
|
|
129
140
|
kind: "AuthProvider",
|
|
130
141
|
name,
|
|
131
142
|
...Object.fromEntries(
|
|
132
|
-
Object.entries(service).map(([
|
|
133
|
-
|
|
134
|
-
(...args: Parameters<typeof fn>) =>
|
|
135
|
-
fn(...args).pipe(
|
|
143
|
+
Object.entries(service).map(([methodName, fn]) => [
|
|
144
|
+
methodName,
|
|
145
|
+
(...args: Parameters<typeof fn>) => {
|
|
146
|
+
const eff = (fn as any)(...args).pipe(
|
|
147
|
+
Effect.provideContext(ctx),
|
|
148
|
+
);
|
|
149
|
+
if (!LOCKED_METHODS.has(methodName)) return eff;
|
|
150
|
+
// First positional arg is always `profileName`.
|
|
151
|
+
const profileName = args[0] as string;
|
|
152
|
+
return withLock(`${profileName}-${name}`, eff);
|
|
153
|
+
},
|
|
136
154
|
]),
|
|
137
155
|
),
|
|
138
156
|
} as AuthProvider<Config, Credentials>),
|
package/src/Auth/Lock.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as fs from "node:fs/promises";
|
|
3
|
+
import * as path from "pathe";
|
|
4
|
+
import lockfile from "proper-lockfile";
|
|
5
|
+
import { rootDir } from "./Profile.ts";
|
|
6
|
+
|
|
7
|
+
const lockDir = path.join(rootDir, "lock");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serialise execution of `effect` so no two callers ever run inside the
|
|
11
|
+
* critical section concurrently for the same `key`, both within this
|
|
12
|
+
* process and across other processes on the same machine.
|
|
13
|
+
*
|
|
14
|
+
* Uses `proper-lockfile` for both: it tracks in-process holders by path
|
|
15
|
+
* (so same-process callers wait via `retries`) and uses an OS file lock
|
|
16
|
+
* for cross-process coordination, with stale-lock detection at 60s.
|
|
17
|
+
*/
|
|
18
|
+
export const withLock = <A, E, R>(
|
|
19
|
+
key: string,
|
|
20
|
+
effect: Effect.Effect<A, E, R>,
|
|
21
|
+
): Effect.Effect<A, E, R> => {
|
|
22
|
+
const lockPath = path.join(lockDir, `${key}.lock`);
|
|
23
|
+
return Effect.acquireUseRelease(
|
|
24
|
+
Effect.promise(async () => {
|
|
25
|
+
await fs.mkdir(lockDir, { recursive: true });
|
|
26
|
+
await fs.writeFile(lockPath, "", { flag: "a" });
|
|
27
|
+
return await lockfile.lock(lockPath, {
|
|
28
|
+
retries: { retries: 600, minTimeout: 50, maxTimeout: 50 },
|
|
29
|
+
stale: 5_000,
|
|
30
|
+
});
|
|
31
|
+
}),
|
|
32
|
+
() => effect,
|
|
33
|
+
(release) => Effect.promise(() => release().catch(() => {})),
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -9,10 +9,10 @@ import * as Argument from "effect/unstable/cli/Argument";
|
|
|
9
9
|
import * as CliError from "effect/unstable/cli/CliError";
|
|
10
10
|
import * as Flag from "effect/unstable/cli/Flag";
|
|
11
11
|
|
|
12
|
-
import { AuthError } from "../../
|
|
13
|
-
import type * as Stack from "../../
|
|
14
|
-
import { recordCli } from "../../
|
|
15
|
-
import { PromptCancelled } from "../../
|
|
12
|
+
import { AuthError } from "../../Auth/AuthProvider";
|
|
13
|
+
import type * as Stack from "../../Stack";
|
|
14
|
+
import { recordCli } from "../../Telemetry/Metrics";
|
|
15
|
+
import { PromptCancelled } from "../../Util/Clank";
|
|
16
16
|
|
|
17
17
|
export const USER = Config.string("USER").pipe(
|
|
18
18
|
Config.orElse(() => Config.string("USERNAME")),
|
|
@@ -131,7 +131,7 @@ export const force = Flag.boolean("force").pipe(
|
|
|
131
131
|
Flag.withDefault(false),
|
|
132
132
|
);
|
|
133
133
|
|
|
134
|
-
export const
|
|
134
|
+
export const script = Argument.file("main", {
|
|
135
135
|
mustExist: true,
|
|
136
136
|
}).pipe(
|
|
137
137
|
Argument.withDescription("Main file to deploy, defaults to alchemy.run.ts"),
|
|
@@ -14,18 +14,18 @@ import type { HttpClient } from "effect/unstable/http/HttpClient";
|
|
|
14
14
|
import {
|
|
15
15
|
bootstrap as bootstrapAws,
|
|
16
16
|
destroyBootstrap as destroyBootstrapAws,
|
|
17
|
-
} from "../../
|
|
18
|
-
import * as AWSCredentials from "../../
|
|
19
|
-
import * as AWSEnvironment from "../../
|
|
20
|
-
import * as AWSRegion from "../../
|
|
21
|
-
import { AuthProviders } from "../../
|
|
22
|
-
import { withProfileOverride } from "../../
|
|
23
|
-
import { CloudflareAuth } from "../../
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import { bootstrap as bootstrapCloudflare } from "../../
|
|
27
|
-
import { loadConfigProvider } from "../../
|
|
28
|
-
import { fileLogger } from "../../
|
|
17
|
+
} from "../../AWS/Bootstrap";
|
|
18
|
+
import * as AWSCredentials from "../../AWS/Credentials";
|
|
19
|
+
import * as AWSEnvironment from "../../AWS/Environment";
|
|
20
|
+
import * as AWSRegion from "../../AWS/Region";
|
|
21
|
+
import { AuthProviders } from "../../Auth/AuthProvider";
|
|
22
|
+
import { withProfileOverride } from "../../Auth/Profile";
|
|
23
|
+
import { CloudflareAuth } from "../../Cloudflare/Auth/AuthProvider";
|
|
24
|
+
import * as CloudflareEnvironment from "../../Cloudflare/CloudflareEnvironment";
|
|
25
|
+
import * as CloudflareCredentials from "../../Cloudflare/Credentials";
|
|
26
|
+
import { bootstrap as bootstrapCloudflare } from "../../Cloudflare/StateStore/State";
|
|
27
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider";
|
|
28
|
+
import { fileLogger } from "../../Util/FileLogger";
|
|
29
29
|
|
|
30
30
|
import { envFile, instrumentCommand, profile } from "./_shared.ts";
|
|
31
31
|
|
|
@@ -65,7 +65,9 @@ const bootstrapAwsCommand = Command.make(
|
|
|
65
65
|
}),
|
|
66
66
|
)(
|
|
67
67
|
Effect.fnUntraced(function* ({ envFile, profile, region, destroy }) {
|
|
68
|
-
const logger = Logger.layer([fileLogger("bootstrap.txt")]
|
|
68
|
+
const logger = Logger.layer([fileLogger("bootstrap.txt")], {
|
|
69
|
+
mergeWithExisting: true,
|
|
70
|
+
});
|
|
69
71
|
|
|
70
72
|
return yield* Effect.gen(function* () {
|
|
71
73
|
const ssoProfile = yield* Auth.loadProfile(profile);
|
|
@@ -168,7 +170,9 @@ const bootstrapCloudflareCommand = Command.make(
|
|
|
168
170
|
}),
|
|
169
171
|
)(
|
|
170
172
|
Effect.fnUntraced(function* ({ envFile, profile, force, workerName }) {
|
|
171
|
-
const logger = Logger.layer([fileLogger("bootstrap.txt")]
|
|
173
|
+
const logger = Logger.layer([fileLogger("bootstrap.txt")], {
|
|
174
|
+
mergeWithExisting: true,
|
|
175
|
+
});
|
|
172
176
|
|
|
173
177
|
// Wire up the same Cloudflare auth chain that
|
|
174
178
|
// `Cloudflare.state(...)` uses internally. CloudflareAuth is an
|
|
@@ -8,17 +8,17 @@ import * as Schema from "effect/Schema";
|
|
|
8
8
|
import * as Command from "effect/unstable/cli/Command";
|
|
9
9
|
import * as Flag from "effect/unstable/cli/Flag";
|
|
10
10
|
|
|
11
|
-
import { AdoptPolicy } from "../../
|
|
12
|
-
import { AlchemyContext } from "../../
|
|
13
|
-
import { apply } from "../../
|
|
14
|
-
import { ArtifactStore, createArtifactStore } from "../../
|
|
15
|
-
import { AuthProviders } from "../../
|
|
16
|
-
import { withProfileOverride } from "../../
|
|
17
|
-
import * as CLI from "../../
|
|
18
|
-
import * as Plan from "../../
|
|
19
|
-
import { Stage } from "../../
|
|
20
|
-
import { loadConfigProvider } from "../../
|
|
21
|
-
import { fileLogger } from "../../
|
|
11
|
+
import { AdoptPolicy } from "../../AdoptPolicy";
|
|
12
|
+
import { AlchemyContext } from "../../AlchemyContext";
|
|
13
|
+
import { apply } from "../../Apply";
|
|
14
|
+
import { ArtifactStore, createArtifactStore } from "../../Artifacts";
|
|
15
|
+
import { AuthProviders } from "../../Auth/AuthProvider";
|
|
16
|
+
import { withProfileOverride } from "../../Auth/Profile";
|
|
17
|
+
import * as CLI from "../../Cli/Cli.ts";
|
|
18
|
+
import * as Plan from "../../Plan";
|
|
19
|
+
import { Stage } from "../../Stage";
|
|
20
|
+
import { loadConfigProvider } from "../../Util/ConfigProvider";
|
|
21
|
+
import { fileLogger } from "../../Util/FileLogger";
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
24
|
dryRun as dryRunFlag,
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
force,
|
|
27
27
|
importStack,
|
|
28
28
|
instrumentCommand,
|
|
29
|
-
main,
|
|
30
29
|
profile,
|
|
30
|
+
script,
|
|
31
31
|
stage,
|
|
32
32
|
yes,
|
|
33
33
|
} from "./_shared.ts";
|
|
@@ -106,7 +106,7 @@ export const execStack = Effect.fn(function* ({
|
|
|
106
106
|
ConfigProvider.layer(
|
|
107
107
|
withProfileOverride(yield* loadConfigProvider(envFile), profile),
|
|
108
108
|
),
|
|
109
|
-
Logger.layer([fileLogger("out")]),
|
|
109
|
+
Logger.layer([fileLogger("out")], { mergeWithExisting: true }),
|
|
110
110
|
Layer.succeed(Stage, stage),
|
|
111
111
|
);
|
|
112
112
|
|
|
@@ -163,7 +163,7 @@ export const deployCommand = Command.make(
|
|
|
163
163
|
{
|
|
164
164
|
dryRun: dryRunFlag,
|
|
165
165
|
force,
|
|
166
|
-
main,
|
|
166
|
+
main: script,
|
|
167
167
|
envFile,
|
|
168
168
|
stage,
|
|
169
169
|
yes,
|
|
@@ -177,7 +177,7 @@ export const destroyCommand = Command.make(
|
|
|
177
177
|
"destroy",
|
|
178
178
|
{
|
|
179
179
|
dryRun: dryRunFlag,
|
|
180
|
-
main,
|
|
180
|
+
main: script,
|
|
181
181
|
envFile,
|
|
182
182
|
stage,
|
|
183
183
|
yes,
|
|
@@ -197,7 +197,7 @@ export const destroyCommand = Command.make(
|
|
|
197
197
|
export const planCommand = Command.make(
|
|
198
198
|
"plan",
|
|
199
199
|
{
|
|
200
|
-
main,
|
|
200
|
+
main: script,
|
|
201
201
|
envFile,
|
|
202
202
|
stage,
|
|
203
203
|
profile,
|
|
@@ -3,14 +3,24 @@ import * as Schema from "effect/Schema";
|
|
|
3
3
|
import * as Command from "effect/unstable/cli/Command";
|
|
4
4
|
import * as ChildProcess from "effect/unstable/process/ChildProcess";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { envFile, force,
|
|
6
|
+
import { envFile, force, profile, script, stage } from "./_shared.ts";
|
|
7
7
|
import { ExecStackOptions } from "./deploy.ts";
|
|
8
8
|
|
|
9
|
+
// Source iteration uses unbundled exec.ts so --watch sees source-file changes;
|
|
10
|
+
// published installs use the bundled exec.js so react/ink/pathe stay
|
|
11
|
+
// devDependencies (matching the CLI bundle's intent). Detect which world we're
|
|
12
|
+
// in by whether dev.ts (or the alchemy.js bundle that contains it) lives
|
|
13
|
+
// inside a node_modules tree — same heuristic as bin/cli.js.
|
|
14
|
+
const selfPath = fileURLToPath(import.meta.url);
|
|
15
|
+
const isInstalled =
|
|
16
|
+
selfPath.includes("/node_modules/") || selfPath.includes("\\node_modules\\");
|
|
17
|
+
const execEntry = isInstalled ? "alchemy/bin/exec.js" : "alchemy/bin/exec.ts";
|
|
18
|
+
|
|
9
19
|
export const devCommand = Command.make(
|
|
10
20
|
"dev",
|
|
11
21
|
{
|
|
12
22
|
force,
|
|
13
|
-
main,
|
|
23
|
+
main: script,
|
|
14
24
|
envFile,
|
|
15
25
|
stage,
|
|
16
26
|
profile,
|
|
@@ -28,7 +38,7 @@ export const devCommand = Command.make(
|
|
|
28
38
|
"run",
|
|
29
39
|
"--watch",
|
|
30
40
|
"--no-clear-screen",
|
|
31
|
-
fileURLToPath(import.meta.resolve(
|
|
41
|
+
fileURLToPath(import.meta.resolve(execEntry)),
|
|
32
42
|
],
|
|
33
43
|
{
|
|
34
44
|
stdin: "inherit",
|