@livestore/cli 0.0.0-snapshot-8f1fc2005e0669fbb8558ea0e457304267281da5 → 0.0.0-snapshot-240890c3adf9c40d41555a88a1889ed9f7475734
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/dist/bin.js +6 -2
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -7
- package/dist/cli.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/bin.ts +7 -2
- package/src/cli.ts +1 -12
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@livestore/cli",
|
3
|
-
"version": "0.0.0-snapshot-
|
3
|
+
"version": "0.0.0-snapshot-240890c3adf9c40d41555a88a1889ed9f7475734",
|
4
4
|
"type": "module",
|
5
5
|
"sideEffects": false,
|
6
6
|
"exports": {
|
@@ -11,9 +11,9 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"@effect/ai-openai": "0.29.0",
|
14
|
-
"@livestore/common": "0.0.0-snapshot-
|
15
|
-
"@livestore/utils": "0.0.0-snapshot-
|
16
|
-
"@livestore/utils-dev": "0.0.0-snapshot-
|
14
|
+
"@livestore/common": "0.0.0-snapshot-240890c3adf9c40d41555a88a1889ed9f7475734",
|
15
|
+
"@livestore/utils": "0.0.0-snapshot-240890c3adf9c40d41555a88a1889ed9f7475734",
|
16
|
+
"@livestore/utils-dev": "0.0.0-snapshot-240890c3adf9c40d41555a88a1889ed9f7475734"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/node": "24.2.0",
|
package/src/bin.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
|
3
3
|
import { liveStoreVersion } from '@livestore/common'
|
4
|
-
import { Effect, FetchHttpClient, Layer, Logger, LogLevel } from '@livestore/utils/effect'
|
4
|
+
import { Console, Effect, FetchHttpClient, Layer, Logger, LogLevel } from '@livestore/utils/effect'
|
5
5
|
import { Cli, PlatformNode } from '@livestore/utils/node'
|
6
6
|
import { command } from './cli.ts'
|
7
7
|
|
@@ -10,10 +10,15 @@ const cli = Cli.Command.run(command, {
|
|
10
10
|
version: liveStoreVersion,
|
11
11
|
})
|
12
12
|
|
13
|
+
const showExperimentalWarning = Console.log('⚠️ Warning: LiveStore CLI is experimental and under active development')
|
14
|
+
|
13
15
|
const layer = Layer.mergeAll(
|
14
16
|
PlatformNode.NodeContext.layer,
|
15
17
|
FetchHttpClient.layer,
|
16
18
|
Logger.minimumLogLevel(LogLevel.Info),
|
17
19
|
)
|
18
20
|
|
19
|
-
|
21
|
+
Effect.gen(function* () {
|
22
|
+
yield* showExperimentalWarning
|
23
|
+
return yield* cli(process.argv)
|
24
|
+
}).pipe(Effect.provide(layer), PlatformNode.NodeRuntime.runMain)
|
package/src/cli.ts
CHANGED
@@ -1,21 +1,10 @@
|
|
1
|
-
import { Effect } from '@livestore/utils/effect'
|
2
1
|
import { Cli } from '@livestore/utils/node'
|
3
2
|
import { mcpCommand } from './commands/mcp.ts'
|
4
3
|
import { newProjectCommand } from './commands/new-project.ts'
|
5
4
|
|
6
|
-
const helloCommand = Cli.Command.make(
|
7
|
-
'hello',
|
8
|
-
{
|
9
|
-
name: Cli.Options.text('name').pipe(Cli.Options.withDefault('World')),
|
10
|
-
},
|
11
|
-
Effect.fn(function* ({ name }: { name: string }) {
|
12
|
-
yield* Effect.log(`Hello, ${name}! 🎉`)
|
13
|
-
}),
|
14
|
-
)
|
15
|
-
|
16
5
|
export const command = Cli.Command.make('livestore', {
|
17
6
|
verbose: Cli.Options.boolean('verbose').pipe(Cli.Options.withDefault(false)),
|
18
|
-
}).pipe(Cli.Command.withSubcommands([
|
7
|
+
}).pipe(Cli.Command.withSubcommands([mcpCommand, newProjectCommand]))
|
19
8
|
|
20
9
|
if (import.meta.main) {
|
21
10
|
}
|