supa.cc 0.3.0__tar.gz
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.
- supa_cc-0.3.0/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- supa_cc-0.3.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- supa_cc-0.3.0/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- supa_cc-0.3.0/.github/ISSUE_TEMPLATE/install_problem.yml +80 -0
- supa_cc-0.3.0/.github/workflows/ci.yml +84 -0
- supa_cc-0.3.0/.github/workflows/release.yml +104 -0
- supa_cc-0.3.0/.gitignore +124 -0
- supa_cc-0.3.0/AGENTS.md +37 -0
- supa_cc-0.3.0/CHANGELOG.md +31 -0
- supa_cc-0.3.0/CONTRIBUTING.md +50 -0
- supa_cc-0.3.0/Formula/supa-cc.rb +87 -0
- supa_cc-0.3.0/LICENSE +21 -0
- supa_cc-0.3.0/PKG-INFO +113 -0
- supa_cc-0.3.0/README.md +55 -0
- supa_cc-0.3.0/SECURITY.md +15 -0
- supa_cc-0.3.0/SKILL.md +23 -0
- supa_cc-0.3.0/assets/terminal.png +0 -0
- supa_cc-0.3.0/docs/installation.md +132 -0
- supa_cc-0.3.0/docs/release.md +95 -0
- supa_cc-0.3.0/docs/security.md +40 -0
- supa_cc-0.3.0/docs/troubleshooting.md +50 -0
- supa_cc-0.3.0/docs/usage.md +70 -0
- supa_cc-0.3.0/pyproject.toml +90 -0
- supa_cc-0.3.0/runtime-requirements.txt +4 -0
- supa_cc-0.3.0/scripts/__init__.py +0 -0
- supa_cc-0.3.0/scripts/inspect_artifacts.py +97 -0
- supa_cc-0.3.0/scripts/runtime_requirements.py +22 -0
- supa_cc-0.3.0/supa_cc/__init__.py +2 -0
- supa_cc-0.3.0/supa_cc/__main__.py +188 -0
- supa_cc-0.3.0/supa_cc/account_store.py +284 -0
- supa_cc-0.3.0/supa_cc/accounts.py +256 -0
- supa_cc-0.3.0/supa_cc/auth.py +400 -0
- supa_cc-0.3.0/supa_cc/credentials.py +246 -0
- supa_cc-0.3.0/supa_cc/diagnostic_collectors.py +593 -0
- supa_cc-0.3.0/supa_cc/diagnostic_renderers.py +95 -0
- supa_cc-0.3.0/supa_cc/diagnostics.py +9 -0
- supa_cc-0.3.0/supa_cc/environment.py +117 -0
- supa_cc-0.3.0/supa_cc/file_lock.py +130 -0
- supa_cc-0.3.0/supa_cc/installation.py +64 -0
- supa_cc-0.3.0/supa_cc/models.py +18 -0
- supa_cc-0.3.0/supa_cc/native_session.py +260 -0
- supa_cc-0.3.0/supa_cc/process.py +176 -0
- supa_cc-0.3.0/supa_cc/state.py +141 -0
- supa_cc-0.3.0/supa_cc/strings.py +67 -0
- supa_cc-0.3.0/supa_cc/supabase_cli.py +380 -0
- supa_cc-0.3.0/supa_cc/transactions.py +619 -0
- supa_cc-0.3.0/supa_cc/tui.py +7 -0
- supa_cc-0.3.0/supa_cc/ui/__init__.py +5 -0
- supa_cc-0.3.0/supa_cc/ui/animations.py +30 -0
- supa_cc-0.3.0/supa_cc/ui/app.py +38 -0
- supa_cc-0.3.0/supa_cc/ui/console.py +4 -0
- supa_cc-0.3.0/supa_cc/ui/layout.py +51 -0
- supa_cc-0.3.0/supa_cc/ui/navigation.py +42 -0
- supa_cc-0.3.0/supa_cc/ui/render.py +67 -0
- supa_cc-0.3.0/supa_cc/ui/screens.py +225 -0
- supa_cc-0.3.0/supa_cc/ui/state.py +51 -0
- supa_cc-0.3.0/supa_cc/ui/theme.py +68 -0
- supa_cc-0.3.0/tests/conftest.py +32 -0
- supa_cc-0.3.0/tests/helpers.py +90 -0
- supa_cc-0.3.0/tests/test_accounts.py +1934 -0
- supa_cc-0.3.0/tests/test_artifact_inspection.py +108 -0
- supa_cc-0.3.0/tests/test_auth.py +416 -0
- supa_cc-0.3.0/tests/test_cli_commands.py +436 -0
- supa_cc-0.3.0/tests/test_config.py +474 -0
- supa_cc-0.3.0/tests/test_credentials.py +625 -0
- supa_cc-0.3.0/tests/test_diagnostics.py +720 -0
- supa_cc-0.3.0/tests/test_documentation.py +458 -0
- supa_cc-0.3.0/tests/test_environment.py +106 -0
- supa_cc-0.3.0/tests/test_file_lock.py +133 -0
- supa_cc-0.3.0/tests/test_installation.py +48 -0
- supa_cc-0.3.0/tests/test_keychain.py +410 -0
- supa_cc-0.3.0/tests/test_linux_secret_service_smoke.py +81 -0
- supa_cc-0.3.0/tests/test_macos_keychain_smoke.py +78 -0
- supa_cc-0.3.0/tests/test_models.py +63 -0
- supa_cc-0.3.0/tests/test_native_session.py +569 -0
- supa_cc-0.3.0/tests/test_process.py +32 -0
- supa_cc-0.3.0/tests/test_project_identity.py +123 -0
- supa_cc-0.3.0/tests/test_publication_assets.py +545 -0
- supa_cc-0.3.0/tests/test_runtime_requirements.py +10 -0
- supa_cc-0.3.0/tests/test_state.py +154 -0
- supa_cc-0.3.0/tests/test_supabase_cli.py +360 -0
- supa_cc-0.3.0/tests/test_supabase_cli_integration.py +618 -0
- supa_cc-0.3.0/tests/test_tui_app.py +170 -0
- supa_cc-0.3.0/tests/test_tui_entrypoint.py +47 -0
- supa_cc-0.3.0/tests/test_ui_animations.py +44 -0
- supa_cc-0.3.0/tests/test_ui_frame.py +35 -0
- supa_cc-0.3.0/tests/test_ui_layout.py +25 -0
- supa_cc-0.3.0/tests/test_ui_navigation.py +76 -0
- supa_cc-0.3.0/tests/test_ui_render.py +49 -0
- supa_cc-0.3.0/tests/test_ui_screens.py +501 -0
- supa_cc-0.3.0/tests/test_ui_state.py +24 -0
- supa_cc-0.3.0/tests/test_ui_theme.py +18 -0
- supa_cc-0.3.0/tests/test_windows_credential_manager_smoke.py +32 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Relatar um bug
|
|
2
|
+
description: Informe um comportamento incorreto após uma instalação concluída.
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: [bug]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Use o formulário de instalação se o Supa.cc não foi instalado corretamente.
|
|
10
|
+
**Nunca inclua PATs, tokens, dumps de credenciais, itens do armazenamento nativo ou dumps completos de ambiente.**
|
|
11
|
+
- type: input
|
|
12
|
+
id: os
|
|
13
|
+
attributes:
|
|
14
|
+
label: Sistema operacional
|
|
15
|
+
placeholder: Ex. macOS 15, Ubuntu 24.04 ou Windows 11
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: input
|
|
19
|
+
id: supa_cc_version
|
|
20
|
+
attributes:
|
|
21
|
+
label: Versão do Supa.cc
|
|
22
|
+
description: Saída de `supa.cc --version`.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: input
|
|
26
|
+
id: python_version
|
|
27
|
+
attributes:
|
|
28
|
+
label: Versão do Python
|
|
29
|
+
description: Saída de `python3 --version` ou `python --version`.
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
- type: input
|
|
33
|
+
id: supabase_cli_version
|
|
34
|
+
attributes:
|
|
35
|
+
label: Versão do Supabase CLI
|
|
36
|
+
description: Saída de `supabase --version`.
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
- type: dropdown
|
|
40
|
+
id: installation_method
|
|
41
|
+
attributes:
|
|
42
|
+
label: Método de instalação
|
|
43
|
+
options:
|
|
44
|
+
- Homebrew
|
|
45
|
+
- pipx
|
|
46
|
+
- Instalação de desenvolvimento
|
|
47
|
+
- Outro
|
|
48
|
+
validations:
|
|
49
|
+
required: true
|
|
50
|
+
- type: textarea
|
|
51
|
+
id: reproduction
|
|
52
|
+
attributes:
|
|
53
|
+
label: Como reproduzir
|
|
54
|
+
description: Liste os comandos e passos mínimos, sem segredos.
|
|
55
|
+
validations:
|
|
56
|
+
required: true
|
|
57
|
+
- type: textarea
|
|
58
|
+
id: expected
|
|
59
|
+
attributes:
|
|
60
|
+
label: Comportamento esperado
|
|
61
|
+
validations:
|
|
62
|
+
required: true
|
|
63
|
+
- type: textarea
|
|
64
|
+
id: actual
|
|
65
|
+
attributes:
|
|
66
|
+
label: Comportamento atual
|
|
67
|
+
validations:
|
|
68
|
+
required: true
|
|
69
|
+
- type: textarea
|
|
70
|
+
id: doctor
|
|
71
|
+
attributes:
|
|
72
|
+
label: Saída sanitizada de `supa.cc doctor --json`
|
|
73
|
+
description: Remova nomes de contas, caminhos pessoais e outros dados identificáveis. Nunca execute o modo `--live` para preencher este campo.
|
|
74
|
+
render: json
|
|
75
|
+
- type: checkboxes
|
|
76
|
+
id: safety
|
|
77
|
+
attributes:
|
|
78
|
+
label: Confirmação de segurança
|
|
79
|
+
options:
|
|
80
|
+
- label: Revisei o relato e removi PATs, tokens, dumps de credenciais e outros segredos.
|
|
81
|
+
required: true
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Dúvidas e suporte
|
|
4
|
+
url: https://github.com/dgabreuu/supa.cc/issues
|
|
5
|
+
about: Consulte as issues existentes ou escolha um dos formulários oficiais.
|
|
6
|
+
- name: Relatar uma vulnerabilidade
|
|
7
|
+
url: https://github.com/dgabreuu/supa.cc/security/advisories/new
|
|
8
|
+
about: Envie problemas de segurança de forma privada; nunca publique tokens.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Sugerir uma funcionalidade
|
|
2
|
+
description: Proponha uma melhoria ou novo comportamento para o Supa.cc.
|
|
3
|
+
title: "[Funcionalidade]: "
|
|
4
|
+
labels: [enhancement]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Use os formulários específicos para bugs e problemas de instalação.
|
|
10
|
+
**Nunca inclua PATs, tokens, dumps de credenciais, itens do armazenamento nativo ou dumps completos de ambiente.**
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problema ou necessidade
|
|
15
|
+
description: Explique o caso de uso sem incluir dados sensíveis.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: proposal
|
|
20
|
+
attributes:
|
|
21
|
+
label: Solução proposta
|
|
22
|
+
description: Descreva o comportamento desejado e alternativas consideradas.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: checkboxes
|
|
26
|
+
id: safety
|
|
27
|
+
attributes:
|
|
28
|
+
label: Confirmação de segurança
|
|
29
|
+
options:
|
|
30
|
+
- label: Revisei a proposta e removi PATs, tokens, dumps de credenciais e outros segredos.
|
|
31
|
+
required: true
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: Problema de instalação
|
|
2
|
+
description: Peça ajuda para instalar, atualizar ou iniciar o Supa.cc.
|
|
3
|
+
title: "[Instalação]: "
|
|
4
|
+
labels: [installation]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Para bugs após uma instalação concluída, use o formulário de bug.
|
|
10
|
+
**Nunca inclua PATs, tokens, dumps de credenciais, itens do armazenamento nativo ou dumps completos de ambiente.**
|
|
11
|
+
- type: input
|
|
12
|
+
id: os
|
|
13
|
+
attributes:
|
|
14
|
+
label: Sistema operacional
|
|
15
|
+
placeholder: Inclua distribuição e versão, quando aplicável.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: input
|
|
19
|
+
id: supa_cc_version
|
|
20
|
+
attributes:
|
|
21
|
+
label: Versão do Supa.cc
|
|
22
|
+
description: Informe a saída de `supa.cc --version`, ou "não disponível" se o comando não inicia.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: input
|
|
26
|
+
id: python_version
|
|
27
|
+
attributes:
|
|
28
|
+
label: Versão do Python
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
- type: input
|
|
32
|
+
id: supabase_cli_version
|
|
33
|
+
attributes:
|
|
34
|
+
label: Versão do Supabase CLI
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
- type: dropdown
|
|
38
|
+
id: installation_method
|
|
39
|
+
attributes:
|
|
40
|
+
label: Método de instalação
|
|
41
|
+
options:
|
|
42
|
+
- Homebrew
|
|
43
|
+
- pipx
|
|
44
|
+
- Instalação de desenvolvimento
|
|
45
|
+
- Outro
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
- type: textarea
|
|
49
|
+
id: reproduction
|
|
50
|
+
attributes:
|
|
51
|
+
label: Como reproduzir
|
|
52
|
+
description: Inclua o comando de instalação e os passos executados.
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: expected
|
|
57
|
+
attributes:
|
|
58
|
+
label: Comportamento esperado
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
- type: textarea
|
|
62
|
+
id: actual
|
|
63
|
+
attributes:
|
|
64
|
+
label: Comportamento atual
|
|
65
|
+
description: Inclua a mensagem de erro completa depois de remover segredos e caminhos pessoais.
|
|
66
|
+
validations:
|
|
67
|
+
required: true
|
|
68
|
+
- type: textarea
|
|
69
|
+
id: doctor
|
|
70
|
+
attributes:
|
|
71
|
+
label: Saída sanitizada de `supa.cc doctor --json`
|
|
72
|
+
description: Se o comando estiver disponível, remova nomes de contas, caminhos pessoais e dados identificáveis. Nunca use `--live` para este diagnóstico.
|
|
73
|
+
render: json
|
|
74
|
+
- type: checkboxes
|
|
75
|
+
id: safety
|
|
76
|
+
attributes:
|
|
77
|
+
label: Confirmação de segurança
|
|
78
|
+
options:
|
|
79
|
+
- label: Revisei o relato e removi PATs, tokens, dumps de credenciais e outros segredos.
|
|
80
|
+
required: true
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test-build:
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
16
|
+
python-version: ["3.9", "3.x"]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
cache: pip
|
|
24
|
+
- name: Install development dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
python -m pip install -e ".[dev]"
|
|
28
|
+
- name: Test and validate dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pytest
|
|
31
|
+
python -m pip check
|
|
32
|
+
# These fixes require Python 3.10+. Keep exceptions confined to the 3.9 matrix.
|
|
33
|
+
pip-audit --skip-editable ${{ matrix.python-version == '3.9' && '--ignore-vuln PYSEC-2026-1375 --ignore-vuln PYSEC-2026-1374 --ignore-vuln GHSA-6v7p-g79w-8964 --ignore-vuln PYSEC-2026-196 --ignore-vuln GHSA-58qw-9mgm-455v --ignore-vuln GHSA-jp4c-xjxw-mgf9 --ignore-vuln PYSEC-2026-1845 --ignore-vuln GHSA-gc5v-m9x4-r6x2 --ignore-vuln PYSEC-2026-142 --ignore-vuln PYSEC-2026-141' || '' }}
|
|
34
|
+
python scripts/runtime_requirements.py runtime-requirements.txt
|
|
35
|
+
pip-audit --requirement runtime-requirements.txt
|
|
36
|
+
- name: Build artifacts
|
|
37
|
+
run: python -m build
|
|
38
|
+
- name: Inspect artifact members
|
|
39
|
+
run: python scripts/inspect_artifacts.py dist
|
|
40
|
+
- name: Install wheel in isolated environment
|
|
41
|
+
shell: bash
|
|
42
|
+
run: |
|
|
43
|
+
python -m venv wheel-test
|
|
44
|
+
wheel-test/bin/python -m pip install dist/*.whl
|
|
45
|
+
wheel-test/bin/python -m pip check
|
|
46
|
+
wheel-test/bin/supa.cc --version
|
|
47
|
+
wheel-test/bin/supa.cc version
|
|
48
|
+
if: runner.os != 'Windows'
|
|
49
|
+
- name: Install wheel in isolated Windows environment
|
|
50
|
+
if: runner.os == 'Windows'
|
|
51
|
+
shell: pwsh
|
|
52
|
+
run: |
|
|
53
|
+
python -m venv wheel-test
|
|
54
|
+
$wheel = (Get-ChildItem dist\*.whl).FullName
|
|
55
|
+
wheel-test\Scripts\python.exe -m pip install $wheel
|
|
56
|
+
wheel-test\Scripts\python.exe -m pip check
|
|
57
|
+
wheel-test\Scripts\supa.cc.exe --version
|
|
58
|
+
wheel-test\Scripts\supa.cc.exe version
|
|
59
|
+
- uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: packages-${{ matrix.os }}-py${{ matrix.python-version }}
|
|
62
|
+
path: dist/*
|
|
63
|
+
|
|
64
|
+
linux-distributions:
|
|
65
|
+
strategy:
|
|
66
|
+
matrix:
|
|
67
|
+
include:
|
|
68
|
+
- image: fedora:latest
|
|
69
|
+
install: dnf install -y python3 python3-pip
|
|
70
|
+
- image: archlinux:latest
|
|
71
|
+
install: pacman -Syu --noconfirm python python-pip
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
container: ${{ matrix.image }}
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- name: Install Python
|
|
77
|
+
run: ${{ matrix.install }}
|
|
78
|
+
- name: Test environment behavior and build without Secret Service
|
|
79
|
+
run: |
|
|
80
|
+
python3 -m pip install --break-system-packages --upgrade pip
|
|
81
|
+
python3 -m pip install --break-system-packages -e ".[dev]"
|
|
82
|
+
python3 -m pytest -m "not real_keychain and not real_secret_service" tests/test_environment.py tests/test_installation.py tests/test_linux_secret_service_smoke.py
|
|
83
|
+
python3 -m build
|
|
84
|
+
python3 -m pip check
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
name: Publish release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions: {}
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
if: github.event.release.draft == false && github.event.release.prerelease == false
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- name: Require stable published release
|
|
17
|
+
env:
|
|
18
|
+
RELEASE_DRAFT: ${{ github.event.release.draft }}
|
|
19
|
+
RELEASE_PRERELEASE: ${{ github.event.release.prerelease }}
|
|
20
|
+
run: |
|
|
21
|
+
if [ "$RELEASE_DRAFT" != "false" ] || [ "$RELEASE_PRERELEASE" != "false" ]; then
|
|
22
|
+
echo "Refusing to build a draft or prerelease."
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
26
|
+
with:
|
|
27
|
+
ref: ${{ github.event.release.tag_name }}
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
cache: pip
|
|
33
|
+
- name: Validate release tag and package version
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
36
|
+
run: |
|
|
37
|
+
python - <<'PY'
|
|
38
|
+
import os
|
|
39
|
+
import pathlib
|
|
40
|
+
import tomllib
|
|
41
|
+
|
|
42
|
+
version = tomllib.loads(pathlib.Path("pyproject.toml").read_text())["project"]["version"]
|
|
43
|
+
expected_tag = f"v{version}"
|
|
44
|
+
if os.environ["RELEASE_TAG"] != expected_tag:
|
|
45
|
+
raise SystemExit(f"release tag must be {expected_tag}")
|
|
46
|
+
PY
|
|
47
|
+
- name: Install development dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
python -m pip install -e ".[dev]"
|
|
51
|
+
- name: Test and validate dependencies
|
|
52
|
+
run: |
|
|
53
|
+
python -m pytest
|
|
54
|
+
python -m pip check
|
|
55
|
+
pip-audit --skip-editable
|
|
56
|
+
python scripts/runtime_requirements.py runtime-requirements.txt
|
|
57
|
+
pip-audit --requirement runtime-requirements.txt
|
|
58
|
+
- name: Build release artifacts once
|
|
59
|
+
run: python -m build
|
|
60
|
+
- name: Inspect release artifacts
|
|
61
|
+
run: python scripts/inspect_artifacts.py dist
|
|
62
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
63
|
+
with:
|
|
64
|
+
name: python-packages
|
|
65
|
+
path: dist/
|
|
66
|
+
if-no-files-found: error
|
|
67
|
+
retention-days: 7
|
|
68
|
+
|
|
69
|
+
publish:
|
|
70
|
+
needs: build
|
|
71
|
+
if: success()
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment:
|
|
74
|
+
name: pypi
|
|
75
|
+
url: https://pypi.org/project/supa.cc/0.3.0/
|
|
76
|
+
permissions:
|
|
77
|
+
id-token: write
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
80
|
+
with:
|
|
81
|
+
name: python-packages
|
|
82
|
+
path: dist/
|
|
83
|
+
- name: Publish to PyPI with Trusted Publishing
|
|
84
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
85
|
+
|
|
86
|
+
verify-pypi:
|
|
87
|
+
needs: publish
|
|
88
|
+
if: success()
|
|
89
|
+
strategy:
|
|
90
|
+
fail-fast: false
|
|
91
|
+
matrix:
|
|
92
|
+
os: [ubuntu-latest, windows-latest]
|
|
93
|
+
runs-on: ${{ matrix.os }}
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
96
|
+
with:
|
|
97
|
+
python-version: "3.12"
|
|
98
|
+
- name: Install pipx
|
|
99
|
+
run: python -m pip install pipx
|
|
100
|
+
- name: Verify package from PyPI
|
|
101
|
+
run: |
|
|
102
|
+
pipx install supa.cc==0.3.0
|
|
103
|
+
supa.cc --version
|
|
104
|
+
supa.cc version
|
supa_cc-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
.ruff_cache/
|
|
51
|
+
.mypy_cache/
|
|
52
|
+
.pyre/
|
|
53
|
+
.pytype/
|
|
54
|
+
cover/
|
|
55
|
+
|
|
56
|
+
# Python local packages
|
|
57
|
+
__pypackages__/
|
|
58
|
+
|
|
59
|
+
# Virtual environments
|
|
60
|
+
.env
|
|
61
|
+
.env.*
|
|
62
|
+
!.env.example
|
|
63
|
+
!.env.*.example
|
|
64
|
+
.venv
|
|
65
|
+
env/
|
|
66
|
+
venv/
|
|
67
|
+
ENV/
|
|
68
|
+
env.bak/
|
|
69
|
+
venv.bak/
|
|
70
|
+
|
|
71
|
+
# IDEs
|
|
72
|
+
.idea/
|
|
73
|
+
.vscode/
|
|
74
|
+
*.swp
|
|
75
|
+
*.swo
|
|
76
|
+
*~
|
|
77
|
+
|
|
78
|
+
# macOS
|
|
79
|
+
.DS_Store
|
|
80
|
+
.AppleDouble
|
|
81
|
+
.LSOverride
|
|
82
|
+
|
|
83
|
+
# Logs
|
|
84
|
+
*.log
|
|
85
|
+
*.log.*
|
|
86
|
+
logs/
|
|
87
|
+
|
|
88
|
+
# Supabase local CLI state
|
|
89
|
+
.supabase/
|
|
90
|
+
supabase/.temp/
|
|
91
|
+
supabase/.branches/
|
|
92
|
+
supabase/.cache/
|
|
93
|
+
|
|
94
|
+
# Sensitive local artifacts
|
|
95
|
+
*.pem
|
|
96
|
+
*.key
|
|
97
|
+
*.crt
|
|
98
|
+
*.p12
|
|
99
|
+
*.pfx
|
|
100
|
+
*.jks
|
|
101
|
+
*.keystore
|
|
102
|
+
credentials.json
|
|
103
|
+
service-account*.json
|
|
104
|
+
*.diff
|
|
105
|
+
|
|
106
|
+
# supa.cc / Supabase runtime state (never commit; lives under ~/.config by default)
|
|
107
|
+
accounts.json
|
|
108
|
+
active-account
|
|
109
|
+
session-sync.json
|
|
110
|
+
.session-sync.lock
|
|
111
|
+
.accounts.json.lock
|
|
112
|
+
.accounts.json.*
|
|
113
|
+
access-token
|
|
114
|
+
|
|
115
|
+
# Generated publication snapshots
|
|
116
|
+
.publish/
|
|
117
|
+
|
|
118
|
+
# Local agent / editor / session tooling
|
|
119
|
+
.claude/
|
|
120
|
+
.cursor/
|
|
121
|
+
.opencode/
|
|
122
|
+
.superpowers/
|
|
123
|
+
docs/superpowers/
|
|
124
|
+
napkin.md
|
supa_cc-0.3.0/AGENTS.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Instruções para agentes
|
|
2
|
+
|
|
3
|
+
Mantenha toda contribuição genérica e segura para este repositório open source público.
|
|
4
|
+
|
|
5
|
+
## Estrutura
|
|
6
|
+
|
|
7
|
+
| Caminho | Responsabilidade |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `supa_cc/` | Código-fonte Python |
|
|
10
|
+
| `tests/` | Suíte `pytest` |
|
|
11
|
+
| `docs/` | Instalação, uso, segurança, remediação e release |
|
|
12
|
+
| `Formula/` | Fórmula Homebrew |
|
|
13
|
+
| `pyproject.toml` | Metadados, dependências, build e ferramentas |
|
|
14
|
+
| `README.md` | Apresentação pública concisa |
|
|
15
|
+
| `SKILL.md` | Invariantes operacionais para agentes |
|
|
16
|
+
|
|
17
|
+
## Convenções
|
|
18
|
+
|
|
19
|
+
- Python 3.9+, build com `hatchling` e console script `supa.cc`.
|
|
20
|
+
- Siga os padrões existentes em `supa_cc/`, mantenha arquivos focados e cubra mudanças de comportamento em `tests/`.
|
|
21
|
+
- Dependências de runtime: `click`, `questionary`, `rich` e `keyring`. Dependências de desenvolvimento são declaradas em `pyproject.toml`.
|
|
22
|
+
- Execute `python3 -m pytest`; veja [Como contribuir](CONTRIBUTING.md) para preparação do ambiente, build e smokes nativos.
|
|
23
|
+
- Atualize o documento canônico correspondente: [Instalação](docs/installation.md), [Uso](docs/usage.md), [Segurança](docs/security.md) ou [Solução de problemas](docs/troubleshooting.md).
|
|
24
|
+
|
|
25
|
+
## GitHub
|
|
26
|
+
|
|
27
|
+
- O repositório oficial é `https://github.com/dgabreuu/supa.cc.git`.
|
|
28
|
+
- Operações no GitHub assumem a conta `dgabreuu`; não sugira outra conta, chave SSH ou remote.
|
|
29
|
+
- Use mensagens de commit concisas e alinhadas ao histórico.
|
|
30
|
+
|
|
31
|
+
## Segurança pública
|
|
32
|
+
|
|
33
|
+
- Nunca exponha PATs reais em código, testes, logs, documentação, prompts ou transcripts. Os formatos aceitos começam com `sbp_` ou `sbp_oauth_` e são validados antes do armazenamento; não publique exemplos com aparência de credencial.
|
|
34
|
+
- Não publique caminhos locais absolutos, e-mails pessoais, nomes de usuário, remotes privados, dumps completos de ambiente ou conteúdo do armazenamento nativo.
|
|
35
|
+
- Não introduza fallback plaintext, `keyrings.alt` ou backends não suportados. Preserve as invariantes detalhadas em [SKILL.md](SKILL.md) e no [modelo de segurança](docs/security.md).
|
|
36
|
+
- Preserve os backends nativos: Keychain no macOS, Secret Service no Linux e Windows Credential Manager por `WinVaultKeyring` no Windows.
|
|
37
|
+
- Antes de publicar, revise histórico, arquivos ignorados, logs, caches, ambientes virtuais, fixtures e capturas de tela em busca de segredos.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Todas as mudanças relevantes deste projeto serão documentadas neste arquivo.
|
|
4
|
+
O formato segue, de maneira simplificada, o Keep a Changelog.
|
|
5
|
+
|
|
6
|
+
## [0.3.0] - Não lançado (preparado)
|
|
7
|
+
|
|
8
|
+
### Adicionado
|
|
9
|
+
|
|
10
|
+
- Suporte a Debian/Ubuntu, Arch Linux e Fedora com Secret Service, além de suporte ao Windows Credential Manager.
|
|
11
|
+
- Diagnóstico seguro com `doctor`, saída JSON e validação autenticada explícita por `--account <nome> --live`.
|
|
12
|
+
- Sincronização da sessão nativa do perfil oficial `supabase` ao ativar ou remover a conta ativa.
|
|
13
|
+
|
|
14
|
+
### Alterado
|
|
15
|
+
|
|
16
|
+
- A troca de conta passa a verificar a sessão nativa efetiva da Supabase CLI e a manter estado de coordenação sem segredo.
|
|
17
|
+
- O armazenamento de credenciais e os caminhos de estado agora são selecionados de acordo com macOS, Linux ou Windows.
|
|
18
|
+
|
|
19
|
+
### Segurança
|
|
20
|
+
|
|
21
|
+
- Backends de credenciais são restritos ao Keychain, Secret Service ou `WinVaultKeyring`, sem fallback plaintext.
|
|
22
|
+
- No macOS e Linux, o executável da Supabase CLI é validado por tipo, execução, proprietário e modos; no Windows, o arquivo regular e a identidade do caminho são verificados após a abertura e imediatamente antes da criação do processo, sem alegar execução por descritor, validação de ACL ou modos POSIX.
|
|
23
|
+
- A credencial nativa e operações de recuperação são verificadas antes da conclusão de mudanças sensíveis.
|
|
24
|
+
- Travas e metadados de recuperação tornam a atualização da sessão resistente a interrupções entre etapas.
|
|
25
|
+
|
|
26
|
+
### Migração da 0.2.0
|
|
27
|
+
|
|
28
|
+
- No macOS, a 0.3.0 preserva o serviço de credenciais `supa.cc.supabase.accounts.v2` e o índice `~/.config/supa.cc/accounts.json` usados pela 0.2.0.
|
|
29
|
+
- Linux e Windows são canais novos na 0.3.0 e, portanto, não possuem estado da 0.2.0 para migrar nesses sistemas.
|
|
30
|
+
|
|
31
|
+
[0.3.0]: https://github.com/dgabreuu/supa.cc/compare/v0.2.0...HEAD
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Como contribuir
|
|
2
|
+
|
|
3
|
+
Obrigado por contribuir com o Supa.cc. Use as [GitHub Issues](https://github.com/dgabreuu/supa.cc/issues) para bugs, problemas de instalação e propostas de funcionalidade. Vulnerabilidades devem seguir exclusivamente a [política de segurança](SECURITY.md).
|
|
4
|
+
|
|
5
|
+
## Ambiente de desenvolvimento
|
|
6
|
+
|
|
7
|
+
O projeto requer Python 3.9 ou mais recente. Faça um fork, clone o repositório e instale o pacote com as dependências de desenvolvimento.
|
|
8
|
+
|
|
9
|
+
### macOS e Linux (POSIX)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python3 -m pip install -e ".[dev]"
|
|
13
|
+
python3 -m pytest
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Windows
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
py -m pip install -e ".[dev]"
|
|
20
|
+
py -m pytest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Para mudanças de empacotamento, valide também:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
python3 -m build
|
|
27
|
+
python3 scripts/inspect_artifacts.py dist
|
|
28
|
+
# Windows: substitua python3 por py
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Smokes nativos
|
|
32
|
+
|
|
33
|
+
Testes que acessam o armazenamento real são opt-in, específicos da plataforma e exigem consentimento explícito. Eles criam o serviço `supa.cc.tests.<uuid>` e a conta `smoke-<uuid>`, removidos em `finally`; nunca acessa o serviço canônico do Supa.cc nem credenciais do Supabase CLI.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
SUPA_CC_RUN_KEYCHAIN_SMOKE=1 .venv/bin/pytest -q tests/test_macos_keychain_smoke.py
|
|
37
|
+
SUPA_CC_REAL_SECRET_SERVICE=1 .venv/bin/pytest -q tests/test_linux_secret_service_smoke.py
|
|
38
|
+
SUPA_CC_RUN_WINDOWS_CREDENTIAL_MANAGER_SMOKE=1 .venv/bin/pytest -q tests/test_windows_credential_manager_smoke.py
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Diretrizes
|
|
42
|
+
|
|
43
|
+
- Mantenha mudanças pequenas, focadas e acompanhadas por testes quando alterarem comportamento.
|
|
44
|
+
- Preserve suporte a macOS, Debian/Ubuntu, Arch Linux, Fedora e Windows conforme a documentação atual.
|
|
45
|
+
- Atualize a documentação pública quando comandos ou comportamento mudarem.
|
|
46
|
+
- Descreva como a mudança foi validada.
|
|
47
|
+
|
|
48
|
+
## Dados sensíveis
|
|
49
|
+
|
|
50
|
+
Nunca inclua PATs, tokens do Supabase, itens do armazenamento nativo, dumps de credenciais ou dumps completos de ambiente em issues, pull requests, testes, logs ou documentação. Use somente dados fictícios que não tenham formato de credencial real.
|