Comparing version 0.3.3 to 0.3.4
@@ -5,3 +5,7 @@ #!/usr/bin/env node | ||
const gluegun_1 = require("gluegun"); | ||
process.removeAllListeners('unhandledRejection'); | ||
process.on('unhandledRejection', () => { | ||
process.exit(1); | ||
}); | ||
gluegun_1.build('supabase').src(__dirname).create().run(); | ||
//# sourceMappingURL=cli.js.map |
@@ -51,3 +51,6 @@ "use strict"; | ||
}, | ||
}))); | ||
}))).catch(() => { | ||
spinner.fail('Error writing Docker setup files.'); | ||
process.exit(1); | ||
}); | ||
spinner.succeed('Supabase Docker ejected.'); | ||
@@ -54,0 +57,0 @@ }), |
@@ -18,3 +18,3 @@ "use strict"; | ||
name: 'init', | ||
run: ({ filesystem: { append, read, exists }, template: { generate }, print: { colors: { highlight }, error, fancy, spin, }, prompt: { ask }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
run: ({ filesystem: { append, read, exists }, template: { generate }, print: { colors: { highlight }, error, fancy, spin, }, prompt: { ask }, system: { run, which }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
if (exists('.supabase')) { | ||
@@ -24,2 +24,7 @@ error(`Project already initialized. Remove ${highlight('.supabase')} to reinitialize.`); | ||
} | ||
const dockerCompose = which('docker-compose'); | ||
if (!dockerCompose) { | ||
error(`Cannot find ${highlight('docker-compose')} executable in PATH.`); | ||
process.exit(1); | ||
} | ||
// Add .supabase to .gitignore | ||
@@ -68,3 +73,10 @@ const gitignore = read('.gitignore'); | ||
}, | ||
}))); | ||
}))).catch(() => { | ||
spinner.fail('Error writing Docker setup files.'); | ||
process.exit(1); | ||
}); | ||
yield run('docker-compose --file .supabase/docker/docker-compose.yml --project-name supabase build --no-cache --parallel --quiet').catch(() => { | ||
spinner.fail('Error running docker-compose.'); | ||
process.exit(1); | ||
}); | ||
spinner.succeed('Project initialized.'); | ||
@@ -71,0 +83,0 @@ fancy(`Supabase URL: ${highlight(`http://localhost:${kongPort}`)} |
@@ -14,10 +14,17 @@ "use strict"; | ||
name: 'start', | ||
run: ({ print: { colors: { highlight }, spin, }, system: { run, which }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const spinner = spin('Starting local Supabase...'); | ||
run: ({ filesystem: { exists }, print: { colors: { highlight }, error, spin, }, system: { run, which }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
if (!exists('.supabase')) { | ||
error(`Cannot find ${highlight('.supabase')} in the current directory. Perhaps you meant to run ${highlight('supabase init')} first?`); | ||
process.exit(1); | ||
} | ||
const dockerCompose = which('docker-compose'); | ||
if (!dockerCompose) { | ||
spinner.fail(`Cannot find ${highlight('docker-compose')} executable in PATH.`); | ||
error(`Cannot find ${highlight('docker-compose')} executable in PATH.`); | ||
process.exit(1); | ||
} | ||
yield run('docker-compose --file .supabase/docker/docker-compose.yml --project-name supabase up --detach'); | ||
const spinner = spin('Starting local Supabase...'); | ||
yield run('docker-compose --file .supabase/docker/docker-compose.yml --project-name supabase up --detach').catch(() => { | ||
spinner.fail('Error running docker-compose.'); | ||
process.exit(1); | ||
}); | ||
spinner.succeed('Started local Supabase.'); | ||
@@ -24,0 +31,0 @@ }), |
@@ -14,10 +14,17 @@ "use strict"; | ||
name: 'stop', | ||
run: ({ print: { colors: { highlight }, spin, }, system: { run, which }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const spinner = spin('Stopping local Supabase...'); | ||
run: ({ filesystem: { exists }, print: { colors: { highlight }, error, spin, }, system: { run, which }, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
if (!exists('.supabase')) { | ||
error(`Cannot find ${highlight('.supabase')} in the current directory. Perhaps you meant to run ${highlight('supabase init')} first?`); | ||
process.exit(1); | ||
} | ||
const dockerCompose = which('docker-compose'); | ||
if (!dockerCompose) { | ||
spinner.fail(`Cannot find ${highlight('docker-compose')} executable in PATH.`); | ||
error(`Cannot find ${highlight('docker-compose')} executable in PATH.`); | ||
process.exit(1); | ||
} | ||
yield run('docker-compose --file .supabase/docker/docker-compose.yml down'); | ||
const spinner = spin('Stopping local Supabase...'); | ||
yield run('docker-compose --file .supabase/docker/docker-compose.yml --project-name supabase down').catch(() => { | ||
spinner.fail('Error running docker-compose.'); | ||
process.exit(1); | ||
}); | ||
spinner.succeed('Stopped local Supabase.'); | ||
@@ -24,0 +31,0 @@ }), |
@@ -1,1 +0,12 @@ | ||
Supabase instructions. | ||
> Why do I have a directory named ".supabase" in my project? | ||
The ".supabase" directory is created by the Supabase CLI. | ||
> What does the "docker" directory contain? | ||
It contains the Docker Compose file and build files for running Supabase locally. | ||
> Should I commit the ".supabase" directory? | ||
No, you should not share the ".supabase" directory with anyone. | ||
Upon creation, it will be automatically added to your ".gitignore" file. |
{ | ||
"name": "supabase", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Supabase CLI", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/supabase/cli", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32310
259