smoonb 1.0.3 → 1.0.5
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/CHANGELOG.md +20 -45
- package/LICENSE +44 -2
- package/LICENSE.pt-BR.md +58 -18
- package/README.md +59 -9
- package/README.pt-BR.md +56 -6
- package/bin/smoonb.js +16 -2
- package/package.json +1 -2
- package/src/commands/backup/index.js +1 -1
- package/src/commands/backup/steps/01-docker-validation.js +10 -2
- package/src/commands/backup/utils.js +1 -1
- package/src/commands/restore/index.js +2 -2
- package/src/i18n/locales/en.json +12 -5
- package/src/i18n/locales/pt-BR.json +11 -4
- package/src/utils/docker.js +31 -2
- package/LICENSE.md +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -4,75 +4,50 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
-
## [1.0.
|
|
7
|
+
## [1.0.5] - 2026-02-21
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
10
|
|
|
11
|
-
- **
|
|
12
|
-
-
|
|
13
|
-
- **Validation payload** – License validation now sends `installationId` and `cliVersion` with `licenseKey` and `correlationId`.
|
|
11
|
+
- **Flexible Supabase CLI version check** – Instead of requiring the exact latest version, smoonb now accepts any CLI version that is at most 1 minor behind the latest (same major). The minimum accepted version is computed as `major.(minor_latest - 1).0` at runtime from the npm registry. Special case: if `minor_latest === 0`, only the same major.minor is accepted.
|
|
12
|
+
- **`--skip-supabase-version-check` flag** – New opt-in flag for both `backup` and `restore` commands. When set, the Supabase CLI version check is skipped entirely and a warning is displayed. Useful when package managers (e.g. Scoop on Windows) lag behind on updates and the user wants to proceed at their own risk.
|
|
14
13
|
|
|
15
14
|
### Changed
|
|
16
15
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
### Fixed
|
|
22
|
-
|
|
23
|
-
- No offline cache: if validation fails (network or backend), the CLI does not run and shows the full diagnostic bundle.
|
|
16
|
+
- Error message for outdated Supabase CLI now shows the computed minimum accepted version (`minVersion`) and the current latest, instead of only the latest.
|
|
17
|
+
- README (EN and PT-BR): updated Supabase CLI prerequisites section with the new version policy, added examples with `--skip-supabase-version-check`, updated commands table and troubleshooting section.
|
|
18
|
+
- i18n strings (`en.json`, `pt-BR.json`): removed specific version number references in favour of evergreen language ("always use the latest version").
|
|
24
19
|
|
|
25
20
|
---
|
|
26
21
|
|
|
27
|
-
## [1.0.
|
|
28
|
-
|
|
29
|
-
### Fixed
|
|
30
|
-
|
|
31
|
-
- **Backup report** – When Realtime settings are reused from a previous backup file, the final summary now correctly shows "Settings imported from backup {name}" (or the pt-BR equivalent) instead of "Configurations captured interactively"
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## [1.0.1] - 2025-01-29
|
|
36
|
-
|
|
37
|
-
### Removed
|
|
38
|
-
|
|
39
|
-
- **`check` command** – Post-restore integrity verification command removed from CLI, help and documentation
|
|
40
|
-
- **`--skip-realtime`** – Backup option removed; Realtime settings are always captured interactively
|
|
41
|
-
- **`--file` and `--storage` on restore** – Restore no longer accepts direct file paths; use `import` then `restore` to select from the list
|
|
42
|
-
- **`--lang`** – CLI language option removed; language is determined by `SMOONB_LANG` (env or `.env.local`) and system locale only
|
|
22
|
+
## [1.0.4] - 2025-01-29
|
|
43
23
|
|
|
44
24
|
### Changed
|
|
45
25
|
|
|
46
|
-
-
|
|
47
|
-
- Restore flow: backup selection is always interactive (no skip via `--file`)
|
|
48
|
-
- i18n: `detectLocale` no longer reads `--lang` from argv; precedence is SMOONB_LANG → system locale → en
|
|
26
|
+
- Release 1.0.4 – Build and lint verification.
|
|
49
27
|
|
|
50
28
|
---
|
|
51
29
|
|
|
52
|
-
## [1.0.
|
|
30
|
+
## [1.0.3] - 2025-01-29
|
|
53
31
|
|
|
54
32
|
### Added
|
|
55
33
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- Environment variables: `SMOONB_LICENSE_KEY` (required), `SMOONB_TELEMETRY_ENABLED` (optional), `SUPABASE_POSTGRES_MAJOR` (required for backup and restore)
|
|
60
|
-
- i18n (en, pt-BR) for all user-facing messages and help
|
|
34
|
+
- **License binding by installation** – One license is bound to a single installation (machine). On first use, the license is linked to a persistent `installationId` and cannot be moved. To use smoonb on another machine, revoke the license in the desktop app and generate a new one.
|
|
35
|
+
- **Installation ID** – Generated and stored on first run via `env-paths` (Windows: `%APPDATA%/smoonb-nodejs/Config`, macOS/Linux: `~/.config/smoonb-nodejs`). File: `config.json` with `installationId` (uuid v4) and `createdAt`. Never stores the license key.
|
|
36
|
+
- **Validation payload** – License validation now sends `installationId` and `cliVersion` with `licenseKey` and `correlationId`.
|
|
61
37
|
|
|
62
38
|
### Changed
|
|
63
39
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
- Documentation and links point to https://www.smoonb.com (terms, privacy, #price, #faq)
|
|
40
|
+
- **LICENSE_ALREADY_BOUND** – When the server returns this reason, the CLI shows a clear message: "This license is already linked to another machine and cannot be moved" and instructs to revoke and generate a new license at https://www.smoonb.com.
|
|
41
|
+
- **Diagnostic bundle** – Includes masked `InstallationId` (e.g. `2f3a…91bc`) and server `Reason` (or reason code) on validation failure; HTTP status and response body (truncated) on network/HTTP errors.
|
|
42
|
+
- **Telemetry** – Uses the same `installationId` as license validation (shared util); removed duplicate persistence in `~/.smoonb/installation-id`.
|
|
68
43
|
|
|
69
44
|
### Fixed
|
|
70
45
|
|
|
71
|
-
-
|
|
46
|
+
- No offline cache: if validation fails (network or backend), the CLI does not run and shows the full diagnostic bundle.
|
|
47
|
+
|
|
48
|
+
---
|
|
72
49
|
|
|
73
50
|
---
|
|
74
51
|
|
|
75
|
-
[1.0.
|
|
76
|
-
[1.0.
|
|
77
|
-
[1.0.1]: https://github.com/almmello/smoonb/releases/tag/v1.0.1
|
|
78
|
-
[1.0.0]: https://github.com/almmello/smoonb/releases/tag/v1.0.0
|
|
52
|
+
[1.0.5]: https://github.com/almmello/smoonb/releases/tag/v1.0.5
|
|
53
|
+
[1.0.4]: https://github.com/almmello/smoonb/releases/tag/v1.0.4
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
|
+
smoonb — Commercial License Notice + MIT License (Source Code)
|
|
2
|
+
|
|
3
|
+
1) Commercial use (in effect)
|
|
4
|
+
|
|
5
|
+
Supa Moonbase (smoonb) is a commercial product operated by Goalmoon Tecnologia LTDA.
|
|
6
|
+
|
|
7
|
+
To use the smoonb CLI operationally, you must have:
|
|
8
|
+
- An active license key (generated in the desktop app at https://www.smoonb.com)
|
|
9
|
+
- An active subscription after any trial period ends (if applicable)
|
|
10
|
+
|
|
11
|
+
Pricing and plans: https://www.smoonb.com/#price
|
|
12
|
+
Terms of Use: https://www.smoonb.com/terms
|
|
13
|
+
Privacy Policy: https://www.smoonb.com/privacy
|
|
14
|
+
|
|
15
|
+
This Commercial Use Notice does not replace the Terms of Use and Privacy Policy above, which govern the use of smoonb, including licensing, subscriptions, usage limits, enforcement, and support.
|
|
16
|
+
|
|
17
|
+
2) Source code license (MIT)
|
|
18
|
+
|
|
19
|
+
The smoonb source code is made available under the MIT License below.
|
|
20
|
+
|
|
21
|
+
Important: The MIT License applies to the source code only. It does not grant you the right to use the product without a valid license key and an active subscription after the trial period ends (if applicable), as described in the Terms of Use.
|
|
22
|
+
|
|
23
|
+
3) Disclaimers and limitation of liability
|
|
24
|
+
|
|
25
|
+
smoonb is provided "AS IS" and "AS AVAILABLE", without warranties of any kind, to the maximum extent permitted by law.
|
|
26
|
+
|
|
27
|
+
Backup and restore operations are inherently risky and depend on your environment (PostgreSQL, Docker, Supabase CLI, credentials, network, permissions, storage, and your configuration). You are solely responsible for verifying your configuration (including avoiding mixing variables from different projects), validating outputs, and testing restores before relying on results in production.
|
|
28
|
+
|
|
29
|
+
To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to your use of smoonb or the results it produces.
|
|
30
|
+
|
|
31
|
+
Nothing in this notice limits liability where such limits are prohibited by law, including (as applicable) willful misconduct or gross negligence. The complete legal terms are in https://www.smoonb.com/terms.
|
|
32
|
+
|
|
33
|
+
4) Company
|
|
34
|
+
|
|
35
|
+
Goalmoon Tecnologia LTDA
|
|
36
|
+
Website: https://www.smoonb.com
|
|
37
|
+
Copyright © 2026 GoalMoon. All rights reserved.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
============================================================
|
|
41
|
+
MIT License (Source Code)
|
|
42
|
+
============================================================
|
|
43
|
+
|
|
1
44
|
MIT License
|
|
2
45
|
|
|
3
|
-
Copyright (c) Goalmoon Tecnologia
|
|
46
|
+
Copyright (c) 2026 Goalmoon Tecnologia LTDA
|
|
4
47
|
|
|
5
48
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
49
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,4 +62,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
62
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
63
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
64
|
SOFTWARE.
|
|
22
|
-
|
package/LICENSE.pt-BR.md
CHANGED
|
@@ -1,24 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
Licença do smoonb — Aviso de Uso Comercial + Licença MIT (Código-Fonte)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
1) Uso comercial (em vigor)
|
|
4
|
+
|
|
5
|
+
O Supa Moonbase (smoonb) é um produto comercial operado pela Goalmoon Tecnologia LTDA.
|
|
6
|
+
|
|
7
|
+
Para usar o smoonb CLI de forma operacional, é necessário:
|
|
8
|
+
- Uma chave de licença ativa (gerada no app desktop em https://www.smoonb.com)
|
|
9
|
+
- Uma assinatura ativa após o término de eventual período de trial (quando aplicável)
|
|
10
|
+
|
|
11
|
+
Planos e preços: https://www.smoonb.com/#price
|
|
12
|
+
Termos de Uso: https://www.smoonb.com/terms
|
|
13
|
+
Política de Privacidade: https://www.smoonb.com/privacy
|
|
14
|
+
|
|
15
|
+
Este Aviso de Uso Comercial não substitui os Termos de Uso e a Política de Privacidade acima, que regem o uso do smoonb, incluindo licenciamento, assinatura, limites de uso, enforcement e suporte.
|
|
16
|
+
|
|
17
|
+
2) Licença do código (MIT)
|
|
18
|
+
|
|
19
|
+
O código-fonte do smoonb é disponibilizado sob a Licença MIT (texto completo abaixo).
|
|
20
|
+
|
|
21
|
+
Importante: a Licença MIT aplica-se apenas ao código-fonte. Ela não concede o direito de usar o produto sem uma licença válida e uma assinatura ativa após o término do trial (quando aplicável), conforme descrito nos Termos de Uso.
|
|
22
|
+
|
|
23
|
+
3) Avisos legais e limitação de responsabilidade
|
|
4
24
|
|
|
5
|
-
|
|
25
|
+
O smoonb é fornecido "COMO ESTÁ" ("AS IS") e "CONFORME DISPONÍVEL" ("AS AVAILABLE"), sem garantias de qualquer tipo, na máxima extensão permitida pela lei.
|
|
26
|
+
|
|
27
|
+
Operações de backup e restore envolvem riscos inerentes e dependem do seu ambiente (PostgreSQL, Docker, Supabase CLI, credenciais, rede, permissões, storage e sua configuração). Você é o único responsável por verificar sua configuração (inclusive evitando misturar variáveis de projetos diferentes), validar saídas e testar restores antes de confiar em resultados em produção.
|
|
28
|
+
|
|
29
|
+
Na máxima extensão permitida pela lei, a Goalmoon Tecnologia LTDA, seus contribuidores e licenciadores não se responsabilizam por danos indiretos, incidentais, especiais, consequenciais, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes do uso do smoonb ou dos resultados gerados.
|
|
30
|
+
|
|
31
|
+
Nada neste aviso limita responsabilidades onde tal limitação seja proibida por lei, incluindo (quando aplicável) dolo ou culpa grave. Os termos legais completos constam em https://www.smoonb.com/terms.
|
|
32
|
+
|
|
33
|
+
4) Empresa
|
|
34
|
+
|
|
35
|
+
Goalmoon Tecnologia LTDA
|
|
36
|
+
Website: https://www.smoonb.com
|
|
37
|
+
Copyright © 2026 GoalMoon. Todos os direitos reservados.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
============================================================
|
|
41
|
+
Licença MIT (Código-Fonte)
|
|
42
|
+
============================================================
|
|
43
|
+
|
|
44
|
+
Licença MIT
|
|
6
45
|
|
|
7
|
-
|
|
8
|
-
deste software e arquivos de documentação associados (o "Software"), para lidar
|
|
9
|
-
com o Software sem restrições, incluindo, sem limitação, os direitos
|
|
10
|
-
de usar, copiar, modificar, mesclar, publicar, distribuir, sublicenciar e/ou vender
|
|
11
|
-
cópias do Software, e permitir que pessoas a quem o Software é
|
|
12
|
-
fornecido façam o mesmo, sujeito às seguintes condições:
|
|
46
|
+
Copyright (c) 2026 Goalmoon Tecnologia LTDA
|
|
13
47
|
|
|
14
|
-
|
|
15
|
-
|
|
48
|
+
A permissão é concedida, gratuitamente, a qualquer pessoa que obtenha uma cópia
|
|
49
|
+
deste software e dos arquivos de documentação associados (o “Software”), para
|
|
50
|
+
lidar com o Software sem restrições, incluindo, sem limitação, os direitos de
|
|
51
|
+
usar, copiar, modificar, mesclar, publicar, distribuir, sublicenciar e/ou vender
|
|
52
|
+
cópias do Software, e permitir que as pessoas a quem o Software é fornecido o
|
|
53
|
+
façam, sujeito às seguintes condições:
|
|
16
54
|
|
|
17
|
-
O
|
|
18
|
-
|
|
19
|
-
ADEQUAÇÃO A UM FIM ESPECÍFICO E NÃO VIOLAÇÃO. EM NENHUM CASO OS AUTORES OU
|
|
20
|
-
DETENTORES DE DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA
|
|
21
|
-
RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, DELITO OU DE OUTRA FORMA, DECORRENTE DE,
|
|
22
|
-
FORA DE OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTRAS NEGOCIAÇÕES NO
|
|
23
|
-
SOFTWARE.
|
|
55
|
+
O aviso de copyright acima e este aviso de permissão deverão ser incluídos em
|
|
56
|
+
todas as cópias ou partes substanciais do Software.
|
|
24
57
|
|
|
58
|
+
O SOFTWARE É FORNECIDO “NO ESTADO EM QUE SE ENCONTRA”, SEM GARANTIA DE QUALQUER
|
|
59
|
+
TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO, ÀS GARANTIAS DE
|
|
60
|
+
COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO VIOLAÇÃO. EM NENHUM
|
|
61
|
+
CASO OS AUTORES OU DETENTORES DOS DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR
|
|
62
|
+
QUALQUER REIVINDICAÇÃO, DANO OU OUTRA RESPONSABILIDADE, SEJA EM UMA AÇÃO DE
|
|
63
|
+
CONTRATO, ATO ILÍCITO OU OUTRA, DECORRENTE DE, OU EM CONEXÃO COM O SOFTWARE OU O
|
|
64
|
+
USO OU OUTRAS NEGOCIAÇÕES NO SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
Backup and restore: complete and simple, as it should be
|
|
6
6
|
|
|
7
|
-
> **Commercial product.** You need an **active license** and a **valid subscription** (or be on a trial period) to use smoonb. [smoonb.com/#price](https://www.smoonb.com/#price). Use is governed by the [Terms of Service](https://www.smoonb.com/terms) and [Privacy Policy](https://www.smoonb.com/privacy). We do not assume any liability for damage caused by smoonb; the legal disclaimers below remain in effect.
|
|
7
|
+
> **Commercial product.** You need an **active license** and a **valid subscription** (or be on a trial period) to use smoonb. [www.smoonb.com/#price](https://www.smoonb.com/#price). Use is governed by the [Terms of Service](https://www.smoonb.com/terms) and [Privacy Policy](https://www.smoonb.com/privacy). We do not assume any liability for damage caused by smoonb; the legal disclaimers below remain in effect.
|
|
8
8
|
|
|
9
9
|
**Read this in other languages:** [Português (Brasil)](README.pt-BR.md)
|
|
10
10
|
|
|
11
11
|
**Developed by:** Goalmoon Tecnologia LTDA
|
|
12
|
-
**Website:** https://smoonb.com
|
|
12
|
+
**Website:** https://www.smoonb.com
|
|
13
13
|
**GitHub:** https://github.com/almmello/smoonb
|
|
14
14
|
|
|
15
15
|
## 🎯 Objective
|
|
@@ -30,11 +30,11 @@ smoonb performs a complete backup of all components of your Supabase project:
|
|
|
30
30
|
- ✅ **Supabase .temp** (arquivos temporários do Supabase CLI)
|
|
31
31
|
- ✅ **Migrations** (todas as migrations do projeto via `supabase migration fetch`)
|
|
32
32
|
|
|
33
|
-
## ⚠️ Universal Disclaimer /
|
|
33
|
+
## ⚠️ Universal Disclaimer / Legal Notice
|
|
34
34
|
|
|
35
35
|
By continuing, you acknowledge and agree that Supa Moonbase (smoonb) is provided "AS IS" and "AS AVAILABLE", with no warranties of any kind—express, implied, or statutory—including but not limited to merchantability, fitness for a particular purpose, and non-infringement, to the maximum extent permitted by applicable law. Backup and restore operations inherently carry risk, environments vary widely, and we cannot foresee or validate all user setups. You are solely responsible for validating your own environment, keeping independent copies, and verifying results before relying on them in production. We build Supa Moonbase (smoonb) on public, auditable, open-source repositories to help people simplify their workflows, but this does not create any warranty, promise of support, or service-level commitment.
|
|
36
36
|
|
|
37
|
-
**Limitation of liability** — To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to the use of, inability to use, backup/restore operations performed by, or results produced by Supa Moonbase (smoonb).
|
|
37
|
+
**Limitation of liability** — To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to the use of, inability to use, backup/restore operations performed by, or results produced by Supa Moonbase (smoonb).
|
|
38
38
|
|
|
39
39
|
## 🚀 Installation
|
|
40
40
|
|
|
@@ -92,7 +92,11 @@ docker ps
|
|
|
92
92
|
npm install -g supabase
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
**Version policy:** smoonb accepts any Supabase CLI version that is **at most 1 minor behind the latest** (same major). We recommend always using the latest version. Versions that are too old are blocked with an error message.
|
|
96
|
+
|
|
97
|
+
If your package manager (e.g. **Scoop** on Windows) lags behind on updates and you want to proceed anyway, use the `--skip-supabase-version-check` flag (see usage section below).
|
|
98
|
+
|
|
99
|
+
To update the Supabase CLI: [Updating the Supabase CLI](https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli).
|
|
96
100
|
|
|
97
101
|
### 3. Supabase Personal Access Token
|
|
98
102
|
You need to obtain a Supabase personal access token to use the Management API:
|
|
@@ -136,7 +140,7 @@ SMOONB_TELEMETRY_ENABLED=true
|
|
|
136
140
|
SMOONB_OUTPUT_DIR=./backups
|
|
137
141
|
```
|
|
138
142
|
|
|
139
|
-
Required: `SMOONB_LICENSE_KEY` (from [smoonb.com](https://www.smoonb.com) desktop app), `SUPABASE_POSTGRES_MAJOR` (e.g. 17; see Dashboard → Project Settings → Infrastructure → Service Versions). Optional: `SMOONB_TELEMETRY_ENABLED`, `SMOONB_OUTPUT_DIR` (default `./backups`).
|
|
143
|
+
Required: `SMOONB_LICENSE_KEY` (from [www.smoonb.com](https://www.smoonb.com) desktop app), `SUPABASE_POSTGRES_MAJOR` (e.g. 17; see Dashboard → Project Settings → Infrastructure → Service Versions). Optional: `SMOONB_TELEMETRY_ENABLED`, `SMOONB_OUTPUT_DIR` (default `./backups`).
|
|
140
144
|
|
|
141
145
|
#### 3. Interactive Mapping
|
|
142
146
|
|
|
@@ -190,6 +194,17 @@ Language is detected automatically in the following order of precedence:
|
|
|
190
194
|
npx smoonb backup
|
|
191
195
|
```
|
|
192
196
|
|
|
197
|
+
**Available options:**
|
|
198
|
+
|
|
199
|
+
| Flag | Description |
|
|
200
|
+
|------|-------------|
|
|
201
|
+
| `--skip-supabase-version-check` | Skips the Supabase CLI version check. Use when your package manager (e.g. Scoop) lags behind on updates. A warning is shown and the user assumes the risk. |
|
|
202
|
+
|
|
203
|
+
**Example with flag:**
|
|
204
|
+
```bash
|
|
205
|
+
npx smoonb backup --skip-supabase-version-check
|
|
206
|
+
```
|
|
207
|
+
|
|
193
208
|
**Interactive backup flow:**
|
|
194
209
|
|
|
195
210
|
1. **Terms of use** - Displays and requests acceptance of terms
|
|
@@ -252,6 +267,17 @@ backups/backup-2025-10-31-09-37-54/
|
|
|
252
267
|
npx smoonb restore
|
|
253
268
|
```
|
|
254
269
|
|
|
270
|
+
**Available options:**
|
|
271
|
+
|
|
272
|
+
| Flag | Description |
|
|
273
|
+
|------|-------------|
|
|
274
|
+
| `--skip-supabase-version-check` | Skips the Supabase CLI version check. Use when your package manager (e.g. Scoop) lags behind on updates. A warning is shown and the user assumes the risk. |
|
|
275
|
+
|
|
276
|
+
**Example with flag:**
|
|
277
|
+
```bash
|
|
278
|
+
npx smoonb restore --skip-supabase-version-check
|
|
279
|
+
```
|
|
280
|
+
|
|
255
281
|
**Interactive restore flow:**
|
|
256
282
|
|
|
257
283
|
1. **Terms of use** - Displays and requests acceptance of terms
|
|
@@ -345,7 +371,9 @@ After running `import`, run `restore` to choose the imported backup from the lis
|
|
|
345
371
|
| Command | Description |
|
|
346
372
|
|---------|-------------|
|
|
347
373
|
| `npx smoonb backup` | Full interactive backup using Docker |
|
|
374
|
+
| `npx smoonb backup --skip-supabase-version-check` | Backup skipping the Supabase CLI version check |
|
|
348
375
|
| `npx smoonb restore` | Interactive restoration using psql (Docker) |
|
|
376
|
+
| `npx smoonb restore --skip-supabase-version-check` | Restore skipping the Supabase CLI version check |
|
|
349
377
|
| `npx smoonb import --file <path> [--storage <path>]` | Import .backup.gz file and optionally .storage.zip from Supabase Dashboard |
|
|
350
378
|
|
|
351
379
|
## 🏗️ Technical Architecture
|
|
@@ -519,6 +547,28 @@ If not, start Docker Desktop (Windows/macOS) or run `sudo systemctl start docker
|
|
|
519
547
|
npm install -g supabase
|
|
520
548
|
```
|
|
521
549
|
|
|
550
|
+
### Supabase CLI outdated (below minimum accepted version)
|
|
551
|
+
|
|
552
|
+
smoonb accepts versions up to **1 minor behind the latest**. If your installed version is below that threshold, you will see a message like:
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
❌ Supabase CLI X.Y.Z is below the minimum accepted version (X.W.0). Latest: X.V.Z. Update to at least version X.W.0.
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Option 1 — Update the Supabase CLI:**
|
|
559
|
+
```bash
|
|
560
|
+
npm install -g supabase@latest # global install
|
|
561
|
+
npm install supabase@latest # local/project install
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**Option 2 — Skip the check (temporary, user assumes the risk):**
|
|
565
|
+
```bash
|
|
566
|
+
npx smoonb backup --skip-supabase-version-check
|
|
567
|
+
npx smoonb restore --skip-supabase-version-check
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
> **Note for Scoop users (Windows):** the Scoop repository may take a few days to update after a release. Use `--skip-supabase-version-check` until Scoop ships the updated version.
|
|
571
|
+
|
|
522
572
|
### Invalid or missing Personal Access Token
|
|
523
573
|
|
|
524
574
|
1. Verify if `SUPABASE_ACCESS_TOKEN` is in `.env.local`
|
|
@@ -564,7 +614,7 @@ If there are problems:
|
|
|
564
614
|
|
|
565
615
|
Supa Moonbase code is provided under MIT license (see `LICENSE`). To use smoonb you must have an **active license** and a **valid subscription**, or be within a **trial period**. License validation runs at the start of backup and restore; without a valid license and subscription (or trial), the CLI will not run those operations.
|
|
566
616
|
|
|
567
|
-
[smoonb.com/#price](https://www.smoonb.com/#price).
|
|
617
|
+
[www.smoonb.com/#price](https://www.smoonb.com/#price).
|
|
568
618
|
|
|
569
619
|
## 🔒 Privacy and LGPD (summary)
|
|
570
620
|
|
|
@@ -584,11 +634,11 @@ Supa Moonbase code is provided under MIT license. See [LICENSE](LICENSE) for the
|
|
|
584
634
|
|
|
585
635
|
## 🤝 Contributing
|
|
586
636
|
|
|
587
|
-
Contributions are welcome. [smoonb.com/#price](https://www.smoonb.com/#price).
|
|
637
|
+
Contributions are welcome. [www.smoonb.com/#price](https://www.smoonb.com/#price).
|
|
588
638
|
|
|
589
639
|
|
|
590
640
|
---
|
|
591
641
|
|
|
592
642
|
**Developed by:** Goalmoon Tecnologia LTDA
|
|
593
|
-
**Website:** https://smoonb.com
|
|
643
|
+
**Website:** https://www.smoonb.com
|
|
594
644
|
**GitHub:** https://github.com/almmello/smoonb
|
package/README.pt-BR.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
Backup e restauração: completo e simples, como deveria ser
|
|
6
6
|
|
|
7
|
-
> **Produto comercial.** É necessário ter **licença ativa** e **assinatura válida** (ou estar em período de trial) para usar o smoonb. [smoonb.com/#price](https://www.smoonb.com/#price). O uso é regido pelos [Termos de Serviço](https://www.smoonb.com/terms) e pela [Política de Privacidade](https://www.smoonb.com/privacy). Não assumimos responsabilidade por danos causados pelo smoonb; os avisos legais abaixo permanecem válidos.
|
|
7
|
+
> **Produto comercial.** É necessário ter **licença ativa** e **assinatura válida** (ou estar em período de trial) para usar o smoonb. [www.smoonb.com/#price](https://www.smoonb.com/#price). O uso é regido pelos [Termos de Serviço](https://www.smoonb.com/terms) e pela [Política de Privacidade](https://www.smoonb.com/privacy). Não assumimos responsabilidade por danos causados pelo smoonb; os avisos legais abaixo permanecem válidos.
|
|
8
8
|
|
|
9
9
|
**Leia em outro idioma:** [English](README.md)
|
|
10
10
|
|
|
11
11
|
**Desenvolvido por:** Goalmoon Tecnologia LTDA
|
|
12
|
-
**Website:** https://smoonb.com
|
|
12
|
+
**Website:** https://www.smoonb.com
|
|
13
13
|
**GitHub:** https://github.com/almmello/smoonb
|
|
14
14
|
|
|
15
15
|
## 🎯 Objetivo
|
|
@@ -34,7 +34,7 @@ O smoonb faz backup completo de todos os componentes do seu projeto Supabase:
|
|
|
34
34
|
|
|
35
35
|
Ao continuar, você reconhece e concorda que o Supa Moonbase (smoonb) é fornecido "NO ESTADO EM QUE SE ENCONTRA" ("AS IS") e "CONFORME DISPONIBILIDADE" ("AS AVAILABLE"), sem garantias de qualquer natureza—expressas, implícitas ou legais—incluindo, sem limitação, garantias de comercialização, adequação a um fim específico e não violação, na máxima extensão permitida pela lei aplicável. Operações de backup e restauração envolvem riscos inerentes, os ambientes variam amplamente e não podemos prever ou validar todas as configurações dos usuários. Você é o único responsável por validar seu próprio ambiente, manter cópias independentes e verificar os resultados antes de utilizá-los em produção. Construímos o Supa Moonbase (smoonb) com repositórios públicos, auditáveis e de código aberto para ajudar pessoas a simplificar seus fluxos de trabalho, mas isso não cria qualquer garantia, promessa de suporte ou compromisso de nível de serviço.
|
|
36
36
|
|
|
37
|
-
**Limitação de responsabilidade** — Na máxima extensão permitida por lei, a Goalmoon Tecnologia LTDA, seus contribuidores e licenciadores não serão responsáveis por quaisquer danos indiretos, incidentais, especiais, consequentes, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes ou relacionados ao uso, incapacidade de uso, operações de backup/restauração realizadas por, ou resultados produzidos pelo Supa Moonbase (smoonb).
|
|
37
|
+
**Limitação de responsabilidade** — Na máxima extensão permitida por lei, a Goalmoon Tecnologia LTDA, seus contribuidores e licenciadores não serão responsáveis por quaisquer danos indiretos, incidentais, especiais, consequentes, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes ou relacionados ao uso, incapacidade de uso, operações de backup/restauração realizadas por, ou resultados produzidos pelo Supa Moonbase (smoonb).
|
|
38
38
|
|
|
39
39
|
## 🚀 Instalação
|
|
40
40
|
|
|
@@ -92,7 +92,11 @@ docker ps
|
|
|
92
92
|
npm install -g supabase
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
**Política de versão:** o smoonb aceita qualquer versão do Supabase CLI que esteja **no máximo 1 minor atrás da latest** (mesma major). Recomendamos sempre usar a versão mais recente. Versões muito antigas são bloqueadas com mensagem de erro.
|
|
96
|
+
|
|
97
|
+
Se o seu gerenciador de pacotes (ex.: **Scoop** no Windows) instala com atraso e você quer avançar mesmo assim, use a flag `--skip-supabase-version-check` (veja a seção de uso abaixo).
|
|
98
|
+
|
|
99
|
+
Para atualizar o Supabase CLI: [Atualizando o Supabase CLI](https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli).
|
|
96
100
|
|
|
97
101
|
### 3. Personal Access Token do Supabase
|
|
98
102
|
É necessário obter um token de acesso pessoal do Supabase para usar a Management API:
|
|
@@ -190,6 +194,17 @@ O idioma é detectado automaticamente na seguinte ordem de precedência:
|
|
|
190
194
|
npx smoonb backup
|
|
191
195
|
```
|
|
192
196
|
|
|
197
|
+
**Opções disponíveis:**
|
|
198
|
+
|
|
199
|
+
| Flag | Descrição |
|
|
200
|
+
|------|-----------|
|
|
201
|
+
| `--skip-supabase-version-check` | Pula a checagem de versão do Supabase CLI. Use quando seu gerenciador de pacotes (ex.: Scoop) instala com atraso. Um aviso é exibido e o usuário assume o risco. |
|
|
202
|
+
|
|
203
|
+
**Exemplo com a flag:**
|
|
204
|
+
```bash
|
|
205
|
+
npx smoonb backup --skip-supabase-version-check
|
|
206
|
+
```
|
|
207
|
+
|
|
193
208
|
**Fluxo interativo do backup:**
|
|
194
209
|
|
|
195
210
|
1. **Termo de uso** - Exibe e solicita aceitação dos termos
|
|
@@ -252,6 +267,17 @@ backups/backup-2025-10-31-09-37-54/
|
|
|
252
267
|
npx smoonb restore
|
|
253
268
|
```
|
|
254
269
|
|
|
270
|
+
**Opções disponíveis:**
|
|
271
|
+
|
|
272
|
+
| Flag | Descrição |
|
|
273
|
+
|------|-----------|
|
|
274
|
+
| `--skip-supabase-version-check` | Pula a checagem de versão do Supabase CLI. Use quando seu gerenciador de pacotes (ex.: Scoop) instala com atraso. Um aviso é exibido e o usuário assume o risco. |
|
|
275
|
+
|
|
276
|
+
**Exemplo com a flag:**
|
|
277
|
+
```bash
|
|
278
|
+
npx smoonb restore --skip-supabase-version-check
|
|
279
|
+
```
|
|
280
|
+
|
|
255
281
|
**Fluxo interativo do restore:**
|
|
256
282
|
|
|
257
283
|
1. **Termo de uso** - Exibe e solicita aceitação dos termos
|
|
@@ -345,7 +371,9 @@ Após executar `import`, execute `restore` para escolher o backup importado na l
|
|
|
345
371
|
| Comando | Descrição |
|
|
346
372
|
|---------|-----------|
|
|
347
373
|
| `npx smoonb backup` | Backup completo interativo usando Docker |
|
|
374
|
+
| `npx smoonb backup --skip-supabase-version-check` | Backup pulando a checagem de versão do Supabase CLI |
|
|
348
375
|
| `npx smoonb restore` | Restauração interativa usando psql (Docker) |
|
|
376
|
+
| `npx smoonb restore --skip-supabase-version-check` | Restore pulando a checagem de versão do Supabase CLI |
|
|
349
377
|
| `npx smoonb import --file <path> [--storage <path>]` | Importar arquivo .backup.gz e opcionalmente .storage.zip do Dashboard do Supabase |
|
|
350
378
|
|
|
351
379
|
## 🏗️ Arquitetura Técnica
|
|
@@ -519,6 +547,28 @@ Se não estiver, inicie o Docker Desktop (Windows/macOS) ou execute `sudo system
|
|
|
519
547
|
npm install -g supabase
|
|
520
548
|
```
|
|
521
549
|
|
|
550
|
+
### Supabase CLI desatualizado (abaixo da versão mínima aceita)
|
|
551
|
+
|
|
552
|
+
O smoonb aceita versões até **1 minor atrás da latest**. Se sua versão instalada estiver abaixo desse limite, você verá uma mensagem como:
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
❌ Supabase CLI X.Y.Z está abaixo da versão mínima aceita (X.W.0). Versão latest: X.V.Z. Atualize para pelo menos a versão X.W.0.
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Opção 1 — Atualizar o Supabase CLI:**
|
|
559
|
+
```bash
|
|
560
|
+
npm install -g supabase@latest # instalação global
|
|
561
|
+
npm install supabase@latest # instalação local/projeto
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**Opção 2 — Pular a checagem (temporariamente, risco do usuário):**
|
|
565
|
+
```bash
|
|
566
|
+
npx smoonb backup --skip-supabase-version-check
|
|
567
|
+
npx smoonb restore --skip-supabase-version-check
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
> **Nota para usuários de Scoop (Windows):** o repositório do Scoop pode levar alguns dias para atualizar após um release. Use `--skip-supabase-version-check` até que o Scoop disponibilize a versão atualizada.
|
|
571
|
+
|
|
522
572
|
### Personal Access Token inválido ou ausente
|
|
523
573
|
|
|
524
574
|
1. Verificar se `SUPABASE_ACCESS_TOKEN` está no `.env.local`
|
|
@@ -584,11 +634,11 @@ O código do Supa Moonbase é disponibilizado sob licença MIT. Veja [LICENSE](L
|
|
|
584
634
|
|
|
585
635
|
## 🤝 Contribuição
|
|
586
636
|
|
|
587
|
-
Contribuições são bem-vindas. [smoonb.com/#price](https://www.smoonb.com/#price).
|
|
637
|
+
Contribuições são bem-vindas. [www.smoonb.com/#price](https://www.smoonb.com/#price).
|
|
588
638
|
|
|
589
639
|
|
|
590
640
|
---
|
|
591
641
|
|
|
592
642
|
**Desenvolvido por:** Goalmoon Tecnologia LTDA
|
|
593
|
-
**Website:** https://smoonb.com
|
|
643
|
+
**Website:** https://www.smoonb.com
|
|
594
644
|
**GitHub:** https://github.com/almmello/smoonb
|
package/bin/smoonb.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Produto comercial: licença ativa e assinatura válida (ou trial) necessárias. https://www.smoonb.com/#price
|
|
8
8
|
*
|
|
9
9
|
* Desenvolvido por: Goalmoon Tecnologia LTDA
|
|
10
|
-
* Website: https://smoonb.com
|
|
10
|
+
* Website: https://www.smoonb.com
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
const { Command } = require('commander');
|
|
@@ -79,6 +79,10 @@ program
|
|
|
79
79
|
const getT = global.smoonbI18n?.t || t;
|
|
80
80
|
return getT('help.commands.backupDesc');
|
|
81
81
|
})
|
|
82
|
+
.option('--skip-supabase-version-check', () => {
|
|
83
|
+
const getT = global.smoonbI18n?.t || t;
|
|
84
|
+
return getT('help.commands.skipSupabaseVersionCheck');
|
|
85
|
+
})
|
|
82
86
|
.addHelpText('after', () => {
|
|
83
87
|
const getT = global.smoonbI18n?.t || t;
|
|
84
88
|
return `
|
|
@@ -86,6 +90,9 @@ ${chalk.yellow.bold(getT('help.commands.backupExamples'))}
|
|
|
86
90
|
${chalk.white(getT('help.commands.backupExample1'))}
|
|
87
91
|
${chalk.white(getT('help.commands.backupExample1Desc'))}
|
|
88
92
|
|
|
93
|
+
${chalk.white(getT('help.commands.backupExample3'))}
|
|
94
|
+
${chalk.white(getT('help.commands.backupExample3Desc'))}
|
|
95
|
+
|
|
89
96
|
${chalk.yellow.bold(getT('help.commands.backupFlow'))}
|
|
90
97
|
${getT('help.commands.backupFlow1')}
|
|
91
98
|
${getT('help.commands.backupFlow2')}
|
|
@@ -120,6 +127,10 @@ program
|
|
|
120
127
|
const getT = global.smoonbI18n?.t || t;
|
|
121
128
|
return getT('help.commands.restoreDesc');
|
|
122
129
|
})
|
|
130
|
+
.option('--skip-supabase-version-check', () => {
|
|
131
|
+
const getT = global.smoonbI18n?.t || t;
|
|
132
|
+
return getT('help.commands.skipSupabaseVersionCheck');
|
|
133
|
+
})
|
|
123
134
|
.addHelpText('after', () => {
|
|
124
135
|
const getT = global.smoonbI18n?.t || t;
|
|
125
136
|
return `
|
|
@@ -127,6 +138,9 @@ ${chalk.yellow.bold(getT('help.commands.restoreExamples'))}
|
|
|
127
138
|
${chalk.white(getT('help.commands.restoreExample1'))}
|
|
128
139
|
${chalk.white(getT('help.commands.restoreExample1Desc'))}
|
|
129
140
|
|
|
141
|
+
${chalk.white(getT('help.commands.restoreExample4'))}
|
|
142
|
+
${chalk.white(getT('help.commands.restoreExample4Desc'))}
|
|
143
|
+
|
|
130
144
|
${chalk.yellow.bold(getT('help.commands.restoreFlow'))}
|
|
131
145
|
${getT('help.commands.restoreFlow1')}
|
|
132
146
|
${getT('help.commands.restoreFlow2')}
|
|
@@ -144,7 +158,7 @@ ${chalk.yellow.bold(getT('help.commands.restoreFormats'))}
|
|
|
144
158
|
${getT('help.commands.restoreFormats2')}
|
|
145
159
|
`;
|
|
146
160
|
})
|
|
147
|
-
.action(() => commands.restore(
|
|
161
|
+
.action((options) => commands.restore(options));
|
|
148
162
|
|
|
149
163
|
program
|
|
150
164
|
.command('import')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smoonb",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Complete Supabase backup and migration tool. https://www.smoonb.com/#price",
|
|
5
5
|
"preferGlobal": false,
|
|
6
6
|
"preventGlobalInstall": true,
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"README.md",
|
|
61
61
|
"README.pt-BR.md",
|
|
62
62
|
"LICENSE",
|
|
63
|
-
"LICENSE.md",
|
|
64
63
|
"LICENSE.pt-BR.md",
|
|
65
64
|
"CHANGELOG.md"
|
|
66
65
|
]
|
|
@@ -51,7 +51,7 @@ module.exports = async (options) => {
|
|
|
51
51
|
const licenseResult = await step00License({ envPath, command: 'backup' });
|
|
52
52
|
|
|
53
53
|
// Executar validação Docker
|
|
54
|
-
await step01DockerValidation();
|
|
54
|
+
await step01DockerValidation({ skipSupabaseVersionCheck: !!(options && options.skipSupabaseVersionCheck) });
|
|
55
55
|
|
|
56
56
|
// Consentimento para leitura e escrita do .env.local
|
|
57
57
|
console.log(chalk.yellow(`\n⚠️ ${getT('consent.title')}`));
|
|
@@ -6,17 +6,25 @@ const { t } = require('../../../i18n');
|
|
|
6
6
|
/**
|
|
7
7
|
* Etapa 0: Validação Docker
|
|
8
8
|
* Deve ocorrer antes de tudo
|
|
9
|
+
* @param {object} [options]
|
|
10
|
+
* @param {boolean} [options.skipSupabaseVersionCheck=false]
|
|
9
11
|
*/
|
|
10
|
-
module.exports = async () => {
|
|
12
|
+
module.exports = async (options = {}) => {
|
|
11
13
|
const getT = global.smoonbI18n?.t || t;
|
|
12
14
|
console.log(chalk.blue(`\n🐳 ${getT('docker.validation.title')}`));
|
|
13
15
|
console.log(chalk.cyan(`🔍 ${getT('docker.validation.checking')}`));
|
|
14
16
|
|
|
15
|
-
const backupCapability = await canPerformCompleteBackup(
|
|
17
|
+
const backupCapability = await canPerformCompleteBackup({
|
|
18
|
+
skipSupabaseVersionCheck: options.skipSupabaseVersionCheck || false
|
|
19
|
+
});
|
|
16
20
|
|
|
17
21
|
if (!backupCapability.canBackupComplete) {
|
|
18
22
|
showDockerMessagesAndExit(backupCapability.reason, backupCapability);
|
|
19
23
|
}
|
|
24
|
+
|
|
25
|
+
if (backupCapability.supabaseVersionCheckSkipped) {
|
|
26
|
+
console.log(chalk.yellow(`⚠️ ${getT('supabase.cliVersionSkipWarning')}`));
|
|
27
|
+
}
|
|
20
28
|
|
|
21
29
|
console.log(chalk.green(`✅ ${getT('docker.validation.detected')}`));
|
|
22
30
|
console.log(chalk.white(`🐳 ${getT('docker.validation.version', { version: backupCapability.dockerStatus.version })}`));
|
|
@@ -83,7 +83,7 @@ function showDockerMessagesAndExit(reason, data = {}) {
|
|
|
83
83
|
break;
|
|
84
84
|
|
|
85
85
|
case 'supabase_cli_outdated':
|
|
86
|
-
console.log(chalk.red(`❌ ${getT('supabase.cliOutdated', { version: data.supabaseCliVersion || '?', latest: data.supabaseCliLatest || '?' })}`));
|
|
86
|
+
console.log(chalk.red(`❌ ${getT('supabase.cliOutdated', { version: data.supabaseCliVersion || '?', minVersion: data.supabaseCliMinVersion || '?', latest: data.supabaseCliLatest || '?' })}`));
|
|
87
87
|
console.log('');
|
|
88
88
|
console.log(chalk.yellow(`📋 ${getT('supabase.cliUpdateInstructions')}`));
|
|
89
89
|
console.log(chalk.cyan(` ${getT('supabase.cliUpdateCommandExamples')}`));
|
|
@@ -25,7 +25,7 @@ const step07DatabaseSettings = require('./steps/07-database-settings');
|
|
|
25
25
|
const step08RealtimeSettings = require('./steps/08-realtime-settings');
|
|
26
26
|
const { sendTelemetry } = require('../../telemetry');
|
|
27
27
|
|
|
28
|
-
module.exports = async () => {
|
|
28
|
+
module.exports = async (options = {}) => {
|
|
29
29
|
showBetaBanner();
|
|
30
30
|
const restoreStartTime = Date.now();
|
|
31
31
|
let telemetryEnabled = (process.env.SMOONB_TELEMETRY_ENABLED || 'true') !== 'false';
|
|
@@ -49,7 +49,7 @@ module.exports = async () => {
|
|
|
49
49
|
await step00License({ envPath: envPathForLicense, command: 'restore' });
|
|
50
50
|
|
|
51
51
|
// Executar validação Docker
|
|
52
|
-
await step01DockerValidation();
|
|
52
|
+
await step01DockerValidation({ skipSupabaseVersionCheck: !!(options && options.skipSupabaseVersionCheck) });
|
|
53
53
|
|
|
54
54
|
// Consentimento para leitura e escrita do .env.local
|
|
55
55
|
ui.warn(`\n⚠️ ${getT('consent.title')}`);
|
package/src/i18n/locales/en.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"app.title": "Supa Moonbase (smoonb)",
|
|
3
3
|
"app.tagline": "Backup and restore: complete and simple, as it should be",
|
|
4
4
|
"app.developedBy": "Developed by: Goalmoon Tecnologia LTDA",
|
|
5
|
-
"app.website": "Website: https://smoonb.com",
|
|
5
|
+
"app.website": "Website: https://www.smoonb.com",
|
|
6
6
|
"app.documentation": "Documentation: https://github.com/almmello/smoonb",
|
|
7
7
|
"app.issues": "Issues: https://github.com/almmello/smoonb/issues",
|
|
8
8
|
|
|
@@ -72,8 +72,10 @@
|
|
|
72
72
|
"supabase.installLink": "Installation: npm install -g supabase",
|
|
73
73
|
"supabase.required": "Supabase CLI is required for full Supabase backup",
|
|
74
74
|
"supabase.requiredComponents": "Supabase CLI is required for full Supabase backup\n - PostgreSQL Database\n - Edge Functions\n - All components via Docker",
|
|
75
|
-
"supabase.
|
|
76
|
-
"supabase.
|
|
75
|
+
"supabase.cliVersionPolicy": "Version policy: accepts any version up to 1 minor behind the latest (same major). Use --skip-supabase-version-check to bypass the check.",
|
|
76
|
+
"supabase.cliUpdateRecommended": "Supabase CLI {version} detected. We recommend always using the latest version for new features and bug fixes: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli",
|
|
77
|
+
"supabase.cliOutdated": "Supabase CLI {version} is below the minimum accepted version ({minVersion}). Latest: {latest}. Update to at least version {minVersion}.",
|
|
78
|
+
"supabase.cliVersionSkipWarning": "Supabase CLI version check disabled (--skip-supabase-version-check). Proceeding without version check — user assumes the risk.",
|
|
77
79
|
"supabase.cliUpdateInstructions": "Update the Supabase CLI and run smoonb again:",
|
|
78
80
|
"supabase.cliUpdateCommandExamples": "Examples (depending on how you installed):",
|
|
79
81
|
"supabase.cliUpdateCommandGlobal": "npm install -g supabase@latest (global)",
|
|
@@ -120,9 +122,9 @@
|
|
|
120
122
|
"functions.moreOptions": "For more options, use Supabase CLI directly:",
|
|
121
123
|
"functions.error": "Error: {message}",
|
|
122
124
|
|
|
123
|
-
"disclaimer.title": "Universal Disclaimer /
|
|
125
|
+
"disclaimer.title": "Universal Disclaimer / Legal Notice",
|
|
124
126
|
"disclaimer.text": "By continuing, you acknowledge and agree that Supa Moonbase (smoonb) is provided \"AS IS\" and \"AS AVAILABLE\", with no warranties of any kind—express, implied, or statutory—including but not limited to merchantability, fitness for a particular purpose, and non-infringement, to the maximum extent permitted by applicable law. Backup and restore operations inherently carry risk, environments vary widely, and we cannot foresee or validate all user setups. You are solely responsible for validating your own environment, keeping independent copies, and verifying results before relying on them in production. We build Supa Moonbase (smoonb) on public, auditable, open-source repositories to help people simplify their workflows, but this does not create any warranty, promise of support, or service-level commitment.",
|
|
125
|
-
"disclaimer.limitation": "Limitation of liability — To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to the use of, inability to use, backup/restore operations performed by, or results produced by Supa Moonbase (smoonb).
|
|
127
|
+
"disclaimer.limitation": "Limitation of liability — To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to the use of, inability to use, backup/restore operations performed by, or results produced by Supa Moonbase (smoonb). Terms of Use: https://www.smoonb.com/terms. Privacy Policy: https://www.smoonb.com/privacy.",
|
|
126
128
|
"disclaimer.acceptBackup": "Do you accept the Terms of Use and Risk Warning for Backup?",
|
|
127
129
|
"disclaimer.acceptRestore": "Do you accept the Terms of Use and Risk Warning for Restore?",
|
|
128
130
|
"disclaimer.acceptImport": "Do you accept the Terms of Use and Risk Warning for Import?",
|
|
@@ -166,6 +168,7 @@
|
|
|
166
168
|
"help.tip5": "• Storage file format must be: *.storage.zip",
|
|
167
169
|
|
|
168
170
|
"help.commands.backupDesc": "Create a full backup of your Supabase project using Supabase CLI",
|
|
171
|
+
"help.commands.skipSupabaseVersionCheck": "Skip the Supabase CLI version check (user assumes the risk)",
|
|
169
172
|
"help.commands.backupSkipRealtime": "Skip interactive capture of Realtime Settings",
|
|
170
173
|
"help.commands.backupPostgresMajor": "Postgres major version for dump (15, 17). Non-interactive; no menu.",
|
|
171
174
|
"help.commands.backupExamples": "Examples:",
|
|
@@ -173,6 +176,8 @@
|
|
|
173
176
|
"help.commands.backupExample1Desc": "# Complete interactive process",
|
|
174
177
|
"help.commands.backupExample2": "npx smoonb backup --skip-realtime",
|
|
175
178
|
"help.commands.backupExample2Desc": "# Skips Realtime Settings configuration",
|
|
179
|
+
"help.commands.backupExample3": "npx smoonb backup --skip-supabase-version-check",
|
|
180
|
+
"help.commands.backupExample3Desc": "# Skips Supabase CLI version check (use when your package manager lags behind, e.g. Scoop)",
|
|
176
181
|
"help.commands.backupWhat": "What is captured:",
|
|
177
182
|
"help.commands.backupWhat1": "• Database PostgreSQL (pg_dumpall + separate SQL)",
|
|
178
183
|
"help.commands.backupWhat2": "• Database Extensions and Settings",
|
|
@@ -206,6 +211,8 @@
|
|
|
206
211
|
"help.commands.restoreExample2Desc": "# Imports and restores backup file directly",
|
|
207
212
|
"help.commands.restoreExample3": "npx smoonb restore --file \"backup.backup.gz\" --storage \"my-project.storage.zip\"",
|
|
208
213
|
"help.commands.restoreExample3Desc": "# Imports and restores backup and storage together",
|
|
214
|
+
"help.commands.restoreExample4": "npx smoonb restore --skip-supabase-version-check",
|
|
215
|
+
"help.commands.restoreExample4Desc": "# Skips Supabase CLI version check (use when your package manager lags behind, e.g. Scoop)",
|
|
209
216
|
"help.commands.restoreFlow": "Restore flow:",
|
|
210
217
|
"help.commands.restoreFlow1": "1. Terms of use",
|
|
211
218
|
"help.commands.restoreFlow2": "2. License validation (SMOONB_LICENSE_KEY)",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"app.title": "Supa Moonbase (smoonb)",
|
|
3
3
|
"app.tagline": "Backup e restauração: completo e simples, como deveria ser",
|
|
4
4
|
"app.developedBy": "Desenvolvido por: Goalmoon Tecnologia LTDA",
|
|
5
|
-
"app.website": "Website: https://smoonb.com",
|
|
5
|
+
"app.website": "Website: https://www.smoonb.com",
|
|
6
6
|
"app.documentation": "Documentação: https://github.com/almmello/smoonb",
|
|
7
7
|
"app.issues": "Issues: https://github.com/almmello/smoonb/issues",
|
|
8
8
|
|
|
@@ -72,8 +72,10 @@
|
|
|
72
72
|
"supabase.installLink": "Instalação: npm install -g supabase",
|
|
73
73
|
"supabase.required": "Supabase CLI é obrigatório para backup completo do Supabase",
|
|
74
74
|
"supabase.requiredComponents": "Supabase CLI é obrigatório para backup completo do Supabase\n - Database PostgreSQL\n - Edge Functions\n - Todos os componentes via Docker",
|
|
75
|
-
"supabase.
|
|
76
|
-
"supabase.
|
|
75
|
+
"supabase.cliVersionPolicy": "Política de versão: aceita qualquer versão até 1 minor atrás da latest (mesma major). Use --skip-supabase-version-check para pular a checagem.",
|
|
76
|
+
"supabase.cliUpdateRecommended": "Supabase CLI {version} detectado. Recomendamos sempre usar a versão mais recente para obter novos recursos e correções: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli",
|
|
77
|
+
"supabase.cliOutdated": "Supabase CLI {version} está abaixo da versão mínima aceita ({minVersion}). Versão latest: {latest}. Atualize para pelo menos a versão {minVersion}.",
|
|
78
|
+
"supabase.cliVersionSkipWarning": "Checagem de versão do Supabase CLI desabilitada (--skip-supabase-version-check). Prosseguindo sem verificar a versão — o usuário assume o risco.",
|
|
77
79
|
"supabase.cliUpdateInstructions": "Atualize o Supabase CLI e execute o smoonb novamente:",
|
|
78
80
|
"supabase.cliUpdateCommandExamples": "Exemplos (conforme a forma de instalação):",
|
|
79
81
|
"supabase.cliUpdateCommandGlobal": "npm install -g supabase@latest (global)",
|
|
@@ -122,7 +124,7 @@
|
|
|
122
124
|
|
|
123
125
|
"disclaimer.title": "Universal Disclaimer / Aviso Legal Universal",
|
|
124
126
|
"disclaimer.text": "Ao continuar, você reconhece e concorda que o Supa Moonbase (smoonb) é fornecido \"NO ESTADO EM QUE SE ENCONTRA\" (\"AS IS\") e \"CONFORME DISPONIBILIDADE\" (\"AS AVAILABLE\"), sem garantias de qualquer natureza—expressas, implícitas ou legais—incluindo, sem limitação, garantias de comercialização, adequação a um fim específico e não violação, na máxima extensão permitida pela lei aplicável. Operações de backup e restauração envolvem riscos inerentes, os ambientes variam amplamente e não podemos prever ou validar todas as configurações dos usuários. Você é o único responsável por validar seu próprio ambiente, manter cópias independentes e verificar os resultados antes de utilizá-los em produção. Construímos o Supa Moonbase (smoonb) com repositórios públicos, auditáveis e de código aberto para ajudar pessoas a simplificar seus fluxos de trabalho, mas isso não cria qualquer garantia, promessa de suporte ou compromisso de nível de serviço.",
|
|
125
|
-
"disclaimer.limitation": "Limitação de responsabilidade — Na máxima extensão permitida por lei, a Goalmoon Tecnologia LTDA, seus contribuidores e licenciadores não serão responsáveis por quaisquer danos indiretos, incidentais, especiais, consequentes, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes ou relacionados ao uso, incapacidade de uso, operações de backup/restauração realizadas por, ou resultados produzidos pelo Supa Moonbase (smoonb).
|
|
127
|
+
"disclaimer.limitation": "Limitação de responsabilidade — Na máxima extensão permitida por lei, a Goalmoon Tecnologia LTDA, seus contribuidores e licenciadores não serão responsáveis por quaisquer danos indiretos, incidentais, especiais, consequentes, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes ou relacionados ao uso, incapacidade de uso, operações de backup/restauração realizadas por, ou resultados produzidos pelo Supa Moonbase (smoonb). Termos de Uso: https://www.smoonb.com/terms. Política de Privacidade: https://www.smoonb.com/privacy.",
|
|
126
128
|
"disclaimer.acceptBackup": "Você aceita os Termos de Uso e o Aviso de Risco de Backup?",
|
|
127
129
|
"disclaimer.acceptRestore": "Você aceita os Termos de Uso e o Aviso de Risco de Restauração?",
|
|
128
130
|
"disclaimer.acceptImport": "Você aceita os Termos de Uso e o Aviso de Risco de Importação?",
|
|
@@ -166,6 +168,7 @@
|
|
|
166
168
|
"help.tip5": "• O formato do arquivo de storage deve ser: *.storage.zip",
|
|
167
169
|
|
|
168
170
|
"help.commands.backupDesc": "Fazer backup completo do projeto Supabase usando Supabase CLI",
|
|
171
|
+
"help.commands.skipSupabaseVersionCheck": "Pular checagem de versão do Supabase CLI (o usuário assume o risco)",
|
|
169
172
|
"help.commands.backupSkipRealtime": "Pular captura interativa de Realtime Settings",
|
|
170
173
|
"help.commands.backupPostgresMajor": "Versão major do Postgres para o dump (15, 17). Não interativo; sem menu.",
|
|
171
174
|
"help.commands.backupExamples": "Exemplos:",
|
|
@@ -173,6 +176,8 @@
|
|
|
173
176
|
"help.commands.backupExample1Desc": "# Processo interativo completo",
|
|
174
177
|
"help.commands.backupExample2": "npx smoonb backup --skip-realtime",
|
|
175
178
|
"help.commands.backupExample2Desc": "# Pula configuração de Realtime Settings",
|
|
179
|
+
"help.commands.backupExample3": "npx smoonb backup --skip-supabase-version-check",
|
|
180
|
+
"help.commands.backupExample3Desc": "# Pula checagem de versão do Supabase CLI (use quando seu gerenciador de pacotes instala com atraso, ex.: Scoop)",
|
|
176
181
|
"help.commands.backupWhat": "O que é capturado:",
|
|
177
182
|
"help.commands.backupWhat1": "• Database PostgreSQL (pg_dumpall + SQL separado)",
|
|
178
183
|
"help.commands.backupWhat2": "• Database Extensions and Settings",
|
|
@@ -206,6 +211,8 @@
|
|
|
206
211
|
"help.commands.restoreExample2Desc": "# Importa e restaura diretamente o arquivo de backup",
|
|
207
212
|
"help.commands.restoreExample3": "npx smoonb restore --file \"backup.backup.gz\" --storage \"meu-projeto.storage.zip\"",
|
|
208
213
|
"help.commands.restoreExample3Desc": "# Importa e restaura backup e storage juntos",
|
|
214
|
+
"help.commands.restoreExample4": "npx smoonb restore --skip-supabase-version-check",
|
|
215
|
+
"help.commands.restoreExample4Desc": "# Pula checagem de versão do Supabase CLI (use quando seu gerenciador de pacotes instala com atraso, ex.: Scoop)",
|
|
209
216
|
"help.commands.restoreFlow": "Fluxo do restore:",
|
|
210
217
|
"help.commands.restoreFlow1": "1. Termo de uso",
|
|
211
218
|
"help.commands.restoreFlow2": "2. Validação de licença (SMOONB_LICENSE_KEY)",
|
package/src/utils/docker.js
CHANGED
|
@@ -100,6 +100,21 @@ function compareSemver(a, b) {
|
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Calcula a versão mínima aceita: no máximo 1 minor atrás da latest.
|
|
105
|
+
* Ex: latest "2.76.12" → "2.75.0"; latest "3.0.5" → "3.0.0"
|
|
106
|
+
* @param {string} latestVersion
|
|
107
|
+
* @returns {string|null}
|
|
108
|
+
*/
|
|
109
|
+
function getMinAcceptableVersion(latestVersion) {
|
|
110
|
+
if (!latestVersion) return null;
|
|
111
|
+
const parts = latestVersion.split('.').map(Number);
|
|
112
|
+
const major = parts[0] || 0;
|
|
113
|
+
const minor = parts[1] || 0;
|
|
114
|
+
const minMinor = Math.max(0, minor - 1);
|
|
115
|
+
return `${major}.${minMinor}.0`;
|
|
116
|
+
}
|
|
117
|
+
|
|
103
118
|
/**
|
|
104
119
|
* Detecta Docker Desktop completo com versão
|
|
105
120
|
* @returns {Promise<{installed: boolean, running: boolean, version: string}>}
|
|
@@ -159,9 +174,11 @@ async function detectDockerDependencies() {
|
|
|
159
174
|
|
|
160
175
|
/**
|
|
161
176
|
* Detecta se é possível fazer backup completo via Docker
|
|
177
|
+
* @param {object} [opts]
|
|
178
|
+
* @param {boolean} [opts.skipSupabaseVersionCheck=false] - Pular checagem de versão do Supabase CLI
|
|
162
179
|
* @returns {Promise<{canBackupComplete: boolean, reason?: string, dockerStatus: any}>}
|
|
163
180
|
*/
|
|
164
|
-
async function canPerformCompleteBackup() {
|
|
181
|
+
async function canPerformCompleteBackup({ skipSupabaseVersionCheck = false } = {}) {
|
|
165
182
|
const dockerStatus = await detectDockerDesktop();
|
|
166
183
|
|
|
167
184
|
if (!dockerStatus.installed) {
|
|
@@ -189,6 +206,14 @@ async function canPerformCompleteBackup() {
|
|
|
189
206
|
};
|
|
190
207
|
}
|
|
191
208
|
|
|
209
|
+
if (skipSupabaseVersionCheck) {
|
|
210
|
+
return {
|
|
211
|
+
canBackupComplete: true,
|
|
212
|
+
supabaseVersionCheckSkipped: true,
|
|
213
|
+
dockerStatus
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
192
217
|
const supabaseCliVersion = await getSupabaseCLIVersion();
|
|
193
218
|
const latestResult = await getSupabaseCLILatestVersion();
|
|
194
219
|
if (latestResult.error) {
|
|
@@ -200,12 +225,15 @@ async function canPerformCompleteBackup() {
|
|
|
200
225
|
dockerStatus
|
|
201
226
|
};
|
|
202
227
|
}
|
|
203
|
-
|
|
228
|
+
|
|
229
|
+
const minVersion = getMinAcceptableVersion(latestResult.version);
|
|
230
|
+
if (supabaseCliVersion && minVersion && compareSemver(supabaseCliVersion, minVersion) < 0) {
|
|
204
231
|
return {
|
|
205
232
|
canBackupComplete: false,
|
|
206
233
|
reason: 'supabase_cli_outdated',
|
|
207
234
|
supabaseCliVersion,
|
|
208
235
|
supabaseCliLatest: latestResult.version,
|
|
236
|
+
supabaseCliMinVersion: minVersion,
|
|
209
237
|
dockerStatus
|
|
210
238
|
};
|
|
211
239
|
}
|
|
@@ -226,5 +254,6 @@ module.exports = {
|
|
|
226
254
|
getSupabaseCLIVersion,
|
|
227
255
|
getSupabaseCLILatestVersion,
|
|
228
256
|
compareSemver,
|
|
257
|
+
getMinAcceptableVersion,
|
|
229
258
|
canPerformCompleteBackup
|
|
230
259
|
};
|
package/LICENSE.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Licença smoonb
|
|
2
|
-
|
|
3
|
-
## Uso comercial em vigor
|
|
4
|
-
|
|
5
|
-
O smoonb é um **produto comercial**. Para usar o smoonb é necessário:
|
|
6
|
-
|
|
7
|
-
- **Licença ativa** (gerada no app desktop em [smoonb.com](https://smoonb.com))
|
|
8
|
-
- **Assinatura válida** ou estar em **período de trial**
|
|
9
|
-
|
|
10
|
-
[smoonb.com/#price](https://www.smoonb.com/#price). O uso é regido pelos [Termos de Serviço](https://www.smoonb.com/terms) e pela [Política de Privacidade](https://www.smoonb.com/privacy).
|
|
11
|
-
|
|
12
|
-
### Código (MIT)
|
|
13
|
-
|
|
14
|
-
O código-fonte é disponibilizado sob licença MIT (ver LICENSE). Isso não substitui a necessidade de licença e assinatura para uso operacional do CLI, conforme Termos de Serviço.
|
|
15
|
-
|
|
16
|
-
[smoonb.com/#price](https://www.smoonb.com/#price).
|
|
17
|
-
|
|
18
|
-
## Disclaimer (avisos legais)
|
|
19
|
-
|
|
20
|
-
Este software é fornecido "como está" ("AS IS"), sem garantias de qualquer tipo, expressas ou implícitas. O uso é por sua própria conta e risco.
|
|
21
|
-
|
|
22
|
-
**Limitação de responsabilidade**: Não nos responsabilizamos por qualquer perda de dados, danos diretos ou indiretos, interrupção de negócios ou prejuízos decorrentes do uso ou da incapacidade de uso do smoonb, ou das operações de backup/restore por ele realizadas. Os avisos legais completos constam nos [Termos de Serviço](https://www.smoonb.com/terms).
|
|
23
|
-
|
|
24
|
-
## Empresa desenvolvedora
|
|
25
|
-
|
|
26
|
-
**smoonb** é desenvolvido pela **Goalmoon Tecnologia LTDA**
|
|
27
|
-
Website: [smoonb.com](https://smoonb.com)
|
|
28
|
-
|
|
29
|
-
## Contato
|
|
30
|
-
|
|
31
|
-
- [smoonb.com/#price](https://www.smoonb.com/#price)
|
|
32
|
-
- Termos: [www.smoonb.com/terms](https://www.smoonb.com/terms)
|
|
33
|
-
- Privacidade: [www.smoonb.com/privacy](https://www.smoonb.com/privacy)
|