File tree Expand file tree Collapse file tree 5 files changed +15
-10
lines changed
Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @electric-sql/start ' : patch
3+ ---
4+
5+ fix: made sure executable runs
Original file line number Diff line number Diff line change 55 "type" : " module" ,
66 "main" : " ./dist/index.js" ,
77 "bin" : {
8- "start" : " ./dist/cli .js"
8+ "start" : " ./dist/bin .js"
99 },
1010 "exports" : {
1111 "./package.json" : " ./package.json" ,
1919 "scripts" : {
2020 "build" : " shx rm -rf dist && tsup" ,
2121 "prepack" : " pnpm build" ,
22- "dev" : " pnpm run build && node dist/cli .js" ,
22+ "dev" : " pnpm run build && node dist/bin .js" ,
2323 "format" : " eslint . --fix" ,
2424 "stylecheck" : " eslint . --quiet" ,
2525 "test" : " pnpm exec vitest" ,
Original file line number Diff line number Diff line change 1+ import { main } from './cli.js'
2+
3+ main ( ) . catch ( ( error ) => {
4+ console . error ( `Unexpected error:` , error )
5+ process . exit ( 1 )
6+ } )
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
33import { execSync } from 'child_process'
4+ import { realpathSync } from 'fs'
45import { provisionElectricResources } from './electric-api.js'
56import { setupTemplate } from './template-setup.js'
67import { join } from 'path'
@@ -98,11 +99,4 @@ async function main() {
9899 }
99100}
100101
101- if ( import . meta. url === `file://${ process . argv [ 1 ] } ` ) {
102- main ( ) . catch ( ( error ) => {
103- console . error ( `Unexpected error:` , error )
104- process . exit ( 1 )
105- } )
106- }
107-
108102export { main }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export default defineConfig((options) => {
55 const commonOptions : Partial < Options > = {
66 entry : {
77 index : `src/index.ts` ,
8- cli : `src/cli .ts` ,
8+ bin : `src/bin .ts` ,
99 } ,
1010 tsconfig : `./tsconfig.build.json` ,
1111 sourcemap : true ,
You can’t perform that action at this time.
0 commit comments