Skip to content

Commit 505b2f2

Browse files
committed
fix: stuff
1 parent a780d67 commit 505b2f2

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

bun.lock

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dependencies": {
77
"@effect/cli": "^0.60.1",
88
"@effect/platform": "^0.81.1",
9-
"@effect/platform-bun": "^0.62.1",
9+
"@effect/platform-node": "^0.78.1",
1010
"chalk": "^5.4.1",
1111
"effect": "^3.14.22",
1212
"figlet": "^1.8.1",
@@ -186,7 +186,7 @@
186186

187187
"@effect/platform": ["@effect/platform@0.81.1", "", { "dependencies": { "find-my-way-ts": "^0.1.5", "msgpackr": "^1.11.2", "multipasta": "^0.2.5" }, "peerDependencies": { "effect": "^3.14.22" } }, "sha512-TdhF7kqIrnk9sJD2w99sK1BEPWWNflCU/PdEXJlqdtOiLPLxYQbg/l+2fZ8F3+xF2lCMX6ynO0ifQkOzgD0/9Q=="],
188188

189-
"@effect/platform-bun": ["@effect/platform-bun@0.62.1", "", { "dependencies": { "@effect/platform-node-shared": "^0.32.1", "multipasta": "^0.2.5" }, "peerDependencies": { "@effect/cluster": "^0.31.1", "@effect/platform": "^0.81.1", "@effect/rpc": "^0.57.1", "@effect/sql": "^0.34.1", "effect": "^3.14.22" } }, "sha512-KDtvAVa8Cr/w07yLcrGskG9spGAd8TkLX9zTOQhH98nqOEcVfRyVWMt4It2YJzwgdlyNlD4++WpTnGJ8ufNXuQ=="],
189+
"@effect/platform-node": ["@effect/platform-node@0.78.1", "", { "dependencies": { "@effect/platform-node-shared": "^0.32.1", "mime": "^3.0.0", "undici": "^7.1.0", "ws": "^8.18.0" }, "peerDependencies": { "@effect/cluster": "^0.31.1", "@effect/platform": "^0.81.1", "@effect/rpc": "^0.57.1", "@effect/sql": "^0.34.1", "effect": "^3.14.22" } }, "sha512-Xyc16WGBDot3NcxnRYhlzSN3XNVzR+Q3EMDTTWRKasgh1ja4Sc6hRwln8Eue9ZWu3tjYLCIoo197UJzMKvZHBg=="],
190190

191191
"@effect/platform-node-shared": ["@effect/platform-node-shared@0.32.1", "", { "dependencies": { "@parcel/watcher": "^2.4.1", "multipasta": "^0.2.5", "ws": "^8.18.0" }, "peerDependencies": { "@effect/cluster": "^0.31.1", "@effect/platform": "^0.81.1", "@effect/rpc": "^0.57.1", "@effect/sql": "^0.34.1", "effect": "^3.14.22" } }, "sha512-5BIEYmnT0xfiXdvz4j1HQ6V+XhiUUCRnPpejKBOJz4wVGvuv1ZUgsVd2R3l8jrCBwMGpzv150tcLCrHTboQ2EA=="],
192192

@@ -778,6 +778,8 @@
778778

779779
"micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
780780

781+
"mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],
782+
781783
"mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="],
782784

783785
"mime-types": ["mime-types@3.0.1", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA=="],
@@ -1136,6 +1138,8 @@
11361138

11371139
"@commitlint/top-level/find-up": ["find-up@7.0.0", "", { "dependencies": { "locate-path": "^7.2.0", "path-exists": "^5.0.0", "unicorn-magic": "^0.1.0" } }, "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g=="],
11381140

1141+
"@effect/platform-node/undici": ["undici@7.9.0", "", {}, "sha512-e696y354tf5cFZPXsF26Yg+5M63+5H3oE6Vtkh2oqbvsE2Oe7s2nIbcQh5lmG7Lp/eS29vJtTpw9+p6PX0qNSg=="],
1142+
11391143
"@inquirer/core/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="],
11401144

11411145
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"dependencies": {
4747
"@effect/cli": "^0.60.1",
4848
"@effect/platform": "^0.81.1",
49-
"@effect/platform-bun": "^0.62.1",
49+
"@effect/platform-node": "^0.78.1",
5050
"chalk": "^5.4.1",
5151
"effect": "^3.14.22",
5252
"figlet": "^1.8.1",

src/commands/init.command.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Command } from "@effect/cli"
2-
import { Effect } from "effect"
2+
import { Console, Effect } from "effect"
33

4-
import { Command as RawCommand } from "@effect/platform"
4+
import { FileSystem, Command as RawCommand } from "@effect/platform"
55
import { REGISTRY_URL } from "~/consts"
66

77
import { BunCommandExecutor } from "@effect/platform-bun"
@@ -14,6 +14,15 @@ const shadcnInit = RawCommand.make("shadcnClone", "init", `${REGISTRY_URL}/r/def
1414

1515
export const initCommand = Command.make("init", {}, () =>
1616
Effect.gen(function* () {
17+
const fileSytem = yield* FileSystem.FileSystem
18+
19+
const hasIntentUiConfig = yield* fileSytem.exists("intentui.json")
20+
const hasComponentJson = yield* fileSytem.exists("component.json")
21+
22+
if (hasIntentUiConfig && !hasComponentJson) {
23+
yield* Console.log("Migrating to new config format...")
24+
}
25+
1726
const results = yield* RawCommand.exitCode(shadcnInit)
1827
}).pipe(Effect.scoped, Effect.provide(BunCommandExecutor.layer)),
1928
).pipe(Command.withDescription("Initializes the project and sets up necessary configurations."))

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env bun
22

33
import { Command } from "@effect/cli"
4-
import { BunContext, BunRuntime } from "@effect/platform-bun"
4+
import { NodeContext, NodeRuntime } from "@effect/platform-node"
55
import { Console, Effect } from "effect"
66

77
import chalk from "chalk"
@@ -71,4 +71,4 @@ const cli = Command.run(command, {
7171
version: "v2.9.0",
7272
})
7373

74-
cli(process.argv).pipe(Effect.scoped, Effect.provide(BunContext.layer), BunRuntime.runMain)
74+
cli(process.argv).pipe(Effect.scoped, Effect.provide(NodeContext.layer), NodeRuntime.runMain)

0 commit comments

Comments
 (0)