@livestore/cli 0.0.0-snapshot-dad76524c6a08967c53bad1ccd27f7e4bc13f95d → 0.0.0-snapshot-237f2717587ce4f9d7bacedba46b0f5d76398abe

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livestore/cli",
3
- "version": "0.0.0-snapshot-dad76524c6a08967c53bad1ccd27f7e4bc13f95d",
3
+ "version": "0.0.0-snapshot-237f2717587ce4f9d7bacedba46b0f5d76398abe",
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/utils": "0.0.0-snapshot-dad76524c6a08967c53bad1ccd27f7e4bc13f95d",
15
- "@livestore/common": "0.0.0-snapshot-dad76524c6a08967c53bad1ccd27f7e4bc13f95d",
16
- "@livestore/utils-dev": "0.0.0-snapshot-dad76524c6a08967c53bad1ccd27f7e4bc13f95d"
14
+ "@livestore/common": "0.0.0-snapshot-237f2717587ce4f9d7bacedba46b0f5d76398abe",
15
+ "@livestore/utils": "0.0.0-snapshot-237f2717587ce4f9d7bacedba46b0f5d76398abe",
16
+ "@livestore/utils-dev": "0.0.0-snapshot-237f2717587ce4f9d7bacedba46b0f5d76398abe"
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, Console } from '@livestore/utils/effect'
4
+ import { 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,18 +10,10 @@ 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
-
15
13
  const layer = Layer.mergeAll(
16
14
  PlatformNode.NodeContext.layer,
17
15
  FetchHttpClient.layer,
18
16
  Logger.minimumLogLevel(LogLevel.Info),
19
17
  )
20
18
 
21
- Effect.gen(function* () {
22
- yield* showExperimentalWarning
23
- return yield* cli(process.argv)
24
- }).pipe(
25
- Effect.provide(layer),
26
- PlatformNode.NodeRuntime.runMain
27
- )
19
+ cli(process.argv).pipe(Effect.provide(layer), PlatformNode.NodeRuntime.runMain)
package/src/cli.ts CHANGED
@@ -1,10 +1,21 @@
1
+ import { Effect } from '@livestore/utils/effect'
1
2
  import { Cli } from '@livestore/utils/node'
2
3
  import { mcpCommand } from './commands/mcp.ts'
3
4
  import { newProjectCommand } from './commands/new-project.ts'
4
5
 
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
+
5
16
  export const command = Cli.Command.make('livestore', {
6
17
  verbose: Cli.Options.boolean('verbose').pipe(Cli.Options.withDefault(false)),
7
- }).pipe(Cli.Command.withSubcommands([mcpCommand, newProjectCommand]))
18
+ }).pipe(Cli.Command.withSubcommands([helloCommand, mcpCommand, newProjectCommand]))
8
19
 
9
20
  if (import.meta.main) {
10
21
  }