| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import * as NodeRuntime from "@effect/platform-node/NodeRuntime"; |
| 4 | 4 | import * as NodeServices from "@effect/platform-node/NodeServices"; |
| 5 | | import { Data, Effect, FileSystem, Logger, Path } from "effect"; |
| 5 | import { Data, Effect, FileSystem, Logger, Option, Path } from "effect"; |
| 6 | 6 | import { Command, Flag } from "effect/unstable/cli"; |
| 7 | 7 | import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; |
| 8 | 8 | |
| ... | ... | @@ -77,6 +77,7 @@ const publishCmd = Command.make( |
| 77 | 77 | { |
| 78 | 78 | tag: Flag.string("tag").pipe(Flag.withDefault("latest")), |
| 79 | 79 | access: Flag.string("access").pipe(Flag.withDefault("public")), |
| 80 | appVersion: Flag.string("app-version").pipe(Flag.optional), |
| 80 | 81 | provenance: Flag.boolean("provenance").pipe(Flag.withDefault(false)), |
| 81 | 82 | dryRun: Flag.boolean("dry-run").pipe(Flag.withDefault(false)), |
| 82 | 83 | verbose: Flag.boolean("verbose").pipe(Flag.withDefault(false)), |
| ... | ... | @@ -107,10 +108,11 @@ const publishCmd = Command.make( |
| 107 | 108 | yield* fs.writeFileString(backupPath, original); |
| 108 | 109 | |
| 109 | 110 | // Build package.json for publish |
| 111 | const version = Option.getOrElse(config.appVersion, () => serverPackageJson.version); |
| 110 | 112 | const pkg = { |
| 111 | 113 | name: serverPackageJson.name, |
| 112 | 114 | type: serverPackageJson.type, |
| 113 | | version: serverPackageJson.version, |
| 115 | version, |
| 114 | 116 | engines: serverPackageJson.engines, |
| 115 | 117 | files: serverPackageJson.files, |
| 116 | 118 | dependencies: serverPackageJson.dependencies as Record<string, unknown>, |