authy-cli 0.7.1__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.
- authy_cli-0.7.1/.github/workflows/ci.yml +101 -0
- authy_cli-0.7.1/.github/workflows/pages.yml +71 -0
- authy_cli-0.7.1/.github/workflows/release.yml +345 -0
- authy_cli-0.7.1/.gitignore +43 -0
- authy_cli-0.7.1/AGENTS.md +183 -0
- authy_cli-0.7.1/AI_AGENT_GUIDE.md +599 -0
- authy_cli-0.7.1/ARCHITECTURE.md +138 -0
- authy_cli-0.7.1/CHANGELOG.md +115 -0
- authy_cli-0.7.1/CLAUDE.md +58 -0
- authy_cli-0.7.1/Cargo.lock +2829 -0
- authy_cli-0.7.1/Cargo.toml +104 -0
- authy_cli-0.7.1/LICENSE +21 -0
- authy_cli-0.7.1/PKG-INFO +21 -0
- authy_cli-0.7.1/README.md +307 -0
- authy_cli-0.7.1/SECURITY.md +49 -0
- authy_cli-0.7.1/bindings/python/Cargo.toml +13 -0
- authy_cli-0.7.1/bindings/python/python/authy_cli/__init__.py +32 -0
- authy_cli-0.7.1/bindings/python/python/authy_cli/__init__.pyi +44 -0
- authy_cli-0.7.1/bindings/python/src/lib.rs +174 -0
- authy_cli-0.7.1/bindings/python/tests/test_binding.py +121 -0
- authy_cli-0.7.1/docs/GUIDE.md +269 -0
- authy_cli-0.7.1/docs/LAUNCH_PLAYBOOK.md +732 -0
- authy_cli-0.7.1/docs/specs/v0.2/01-json-output.md +192 -0
- authy_cli-0.7.1/docs/specs/v0.2/02-env-command.md +158 -0
- authy_cli-0.7.1/docs/specs/v0.2/03-import-dotenv.md +134 -0
- authy_cli-0.7.1/docs/specs/v0.2/04-export-env.md +128 -0
- authy_cli-0.7.1/docs/specs/v0.2/05-non-interactive.md +84 -0
- authy_cli-0.7.1/docs/specs/v0.2/06-structured-errors.md +123 -0
- authy_cli-0.7.1/docs/specs/v0.2/07-agent-discovery.md +238 -0
- authy_cli-0.7.1/docs/specs/v0.2/README.md +26 -0
- authy_cli-0.7.1/docs/specs/v0.2/todo.md +225 -0
- authy_cli-0.7.1/docs/specs/v0.4/01-file-placeholders.md +90 -0
- authy_cli-0.7.1/docs/specs/v0.4/02-safe-sensitive-split.md +71 -0
- authy_cli-0.7.1/docs/specs/v0.4/03-rekey-vault.md +82 -0
- authy_cli-0.7.1/docs/specs/v0.4/README.md +15 -0
- authy_cli-0.7.1/docs/specs/v0.4/todo.md +47 -0
- authy_cli-0.7.1/docs/specs/v0.6/01-api-extensions.md +77 -0
- authy_cli-0.7.1/docs/specs/v0.6/02-mcp-protocol.md +103 -0
- authy_cli-0.7.1/docs/specs/v0.6/02a-mcp-tools.md +143 -0
- authy_cli-0.7.1/docs/specs/v0.6/03-cli-serve.md +70 -0
- authy_cli-0.7.1/docs/specs/v0.6/04-tui-clipboard.md +91 -0
- authy_cli-0.7.1/docs/specs/v0.6/05-tui-vault-change.md +91 -0
- authy_cli-0.7.1/docs/specs/v0.6/README.md +35 -0
- authy_cli-0.7.1/docs/specs/v0.6/todo.md +107 -0
- authy_cli-0.7.1/docs/specs/v0.7/01-import-external.md +229 -0
- authy_cli-0.7.1/docs/specs/v0.7/02-python-sdk.md +225 -0
- authy_cli-0.7.1/docs/specs/v0.7/03-typescript-sdk.md +230 -0
- authy_cli-0.7.1/docs/specs/v0.7/04-go-sdk.md +224 -0
- authy_cli-0.7.1/docs/specs/v0.7/README.md +31 -0
- authy_cli-0.7.1/docs/specs/v0.7/todo.md +135 -0
- authy_cli-0.7.1/docs/specs/v0.7.1/01-rust-core.md +67 -0
- authy_cli-0.7.1/docs/specs/v0.7.1/02-python-binding.md +159 -0
- authy_cli-0.7.1/docs/specs/v0.7.1/03-node-binding.md +133 -0
- authy_cli-0.7.1/docs/specs/v0.7.1/README.md +31 -0
- authy_cli-0.7.1/install.ps1 +83 -0
- authy_cli-0.7.1/install.sh +110 -0
- authy_cli-0.7.1/landing_page.md +457 -0
- authy_cli-0.7.1/milestones.md +213 -0
- authy_cli-0.7.1/npm/authy-cli/README.md +87 -0
- authy_cli-0.7.1/npm/authy-cli/bin/authy +33 -0
- authy_cli-0.7.1/npm/authy-cli/package.json +13 -0
- authy_cli-0.7.1/packages/go/authy.go +148 -0
- authy_cli-0.7.1/packages/go/authy_test.go +338 -0
- authy_cli-0.7.1/packages/go/errors.go +94 -0
- authy_cli-0.7.1/packages/go/go.mod +5 -0
- authy_cli-0.7.1/packages/go/integration_test.go +153 -0
- authy_cli-0.7.1/packages/go/operations.go +207 -0
- authy_cli-0.7.1/packages/python/dist/authy_secrets-0.7.0-py3-none-any.whl +0 -0
- authy_cli-0.7.1/packages/python/dist/authy_secrets-0.7.0.tar.gz +0 -0
- authy_cli-0.7.1/packages/python/pyproject.toml +33 -0
- authy_cli-0.7.1/packages/python/src/authy_secrets/__init__.py +34 -0
- authy_cli-0.7.1/packages/python/src/authy_secrets/client.py +209 -0
- authy_cli-0.7.1/packages/python/src/authy_secrets/errors.py +53 -0
- authy_cli-0.7.1/packages/python/tests/test_client.py +402 -0
- authy_cli-0.7.1/packages/python/tests/test_integration.py +110 -0
- authy_cli-0.7.1/packages/typescript/package-lock.json +2770 -0
- authy_cli-0.7.1/packages/typescript/package.json +55 -0
- authy_cli-0.7.1/packages/typescript/src/client.ts +266 -0
- authy_cli-0.7.1/packages/typescript/src/errors.ts +77 -0
- authy_cli-0.7.1/packages/typescript/src/index.ts +22 -0
- authy_cli-0.7.1/packages/typescript/src/sync.ts +210 -0
- authy_cli-0.7.1/packages/typescript/src/types.ts +65 -0
- authy_cli-0.7.1/packages/typescript/tests/client.test.ts +502 -0
- authy_cli-0.7.1/packages/typescript/tests/integration.test.ts +144 -0
- authy_cli-0.7.1/packages/typescript/tsconfig.json +20 -0
- authy_cli-0.7.1/packages/typescript/tsup.config.ts +10 -0
- authy_cli-0.7.1/pyproject.toml +34 -0
- authy_cli-0.7.1/research_cli_vault.md +158 -0
- authy_cli-0.7.1/skills/authy/SKILL.md +93 -0
- authy_cli-0.7.1/skills/authy/references/commands.md +47 -0
- authy_cli-0.7.1/src/api.rs +326 -0
- authy_cli-0.7.1/src/audit/mod.rs +168 -0
- authy_cli-0.7.1/src/auth/context.rs +57 -0
- authy_cli-0.7.1/src/auth/mod.rs +177 -0
- authy_cli-0.7.1/src/cli/admin.rs +12 -0
- authy_cli-0.7.1/src/cli/alias.rs +156 -0
- authy_cli-0.7.1/src/cli/audit.rs +114 -0
- authy_cli-0.7.1/src/cli/common.rs +39 -0
- authy_cli-0.7.1/src/cli/config.rs +18 -0
- authy_cli-0.7.1/src/cli/env.rs +164 -0
- authy_cli-0.7.1/src/cli/export.rs +198 -0
- authy_cli-0.7.1/src/cli/get.rs +91 -0
- authy_cli-0.7.1/src/cli/hook.rs +203 -0
- authy_cli-0.7.1/src/cli/import.rs +317 -0
- authy_cli-0.7.1/src/cli/import_sources/hcvault.rs +94 -0
- authy_cli-0.7.1/src/cli/import_sources/mod.rs +13 -0
- authy_cli-0.7.1/src/cli/import_sources/onepassword.rs +131 -0
- authy_cli-0.7.1/src/cli/import_sources/pass.rs +134 -0
- authy_cli-0.7.1/src/cli/import_sources/sops.rs +157 -0
- authy_cli-0.7.1/src/cli/init.rs +39 -0
- authy_cli-0.7.1/src/cli/json_output.rs +109 -0
- authy_cli-0.7.1/src/cli/list.rs +66 -0
- authy_cli-0.7.1/src/cli/mod.rs +395 -0
- authy_cli-0.7.1/src/cli/policy.rs +265 -0
- authy_cli-0.7.1/src/cli/project_info.rs +111 -0
- authy_cli-0.7.1/src/cli/rekey.rs +84 -0
- authy_cli-0.7.1/src/cli/remove.rs +32 -0
- authy_cli-0.7.1/src/cli/resolve.rs +121 -0
- authy_cli-0.7.1/src/cli/rotate.rs +47 -0
- authy_cli-0.7.1/src/cli/run.rs +70 -0
- authy_cli-0.7.1/src/cli/serve.rs +21 -0
- authy_cli-0.7.1/src/cli/session.rs +211 -0
- authy_cli-0.7.1/src/cli/store.rs +51 -0
- authy_cli-0.7.1/src/config/mod.rs +78 -0
- authy_cli-0.7.1/src/config/project.rs +269 -0
- authy_cli-0.7.1/src/error.rs +152 -0
- authy_cli-0.7.1/src/lib.rs +28 -0
- authy_cli-0.7.1/src/main.rs +137 -0
- authy_cli-0.7.1/src/mcp/mod.rs +188 -0
- authy_cli-0.7.1/src/mcp/tools.rs +172 -0
- authy_cli-0.7.1/src/policy/mod.rs +69 -0
- authy_cli-0.7.1/src/session/mod.rs +101 -0
- authy_cli-0.7.1/src/subprocess/mod.rs +58 -0
- authy_cli-0.7.1/src/tui/auth.rs +159 -0
- authy_cli-0.7.1/src/tui/mod.rs +2020 -0
- authy_cli-0.7.1/src/tui/widgets.rs +222 -0
- authy_cli-0.7.1/src/types.rs +4 -0
- authy_cli-0.7.1/src/vault/crypto.rs +114 -0
- authy_cli-0.7.1/src/vault/mod.rs +124 -0
- authy_cli-0.7.1/src/vault/secret.rs +57 -0
- authy_cli-0.7.1/tests/agent_scenario.sh +176 -0
- authy_cli-0.7.1/tests/api_test.rs +442 -0
- authy_cli-0.7.1/tests/integration/alias_test.rs +175 -0
- authy_cli-0.7.1/tests/integration/audit_test.rs +93 -0
- authy_cli-0.7.1/tests/integration/cli_test.rs +89 -0
- authy_cli-0.7.1/tests/integration/env_test.rs +190 -0
- authy_cli-0.7.1/tests/integration/error_test.rs +147 -0
- authy_cli-0.7.1/tests/integration/export_test.rs +218 -0
- authy_cli-0.7.1/tests/integration/hook_test.rs +126 -0
- authy_cli-0.7.1/tests/integration/import_test.rs +469 -0
- authy_cli-0.7.1/tests/integration/json_test.rs +258 -0
- authy_cli-0.7.1/tests/integration/mod.rs +21 -0
- authy_cli-0.7.1/tests/integration/noninteractive_test.rs +154 -0
- authy_cli-0.7.1/tests/integration/policy_test.rs +222 -0
- authy_cli-0.7.1/tests/integration/project_config_test.rs +162 -0
- authy_cli-0.7.1/tests/integration/rekey_test.rs +301 -0
- authy_cli-0.7.1/tests/integration/resolve_test.rs +257 -0
- authy_cli-0.7.1/tests/integration/run_only_test.rs +425 -0
- authy_cli-0.7.1/tests/integration/run_test.rs +118 -0
- authy_cli-0.7.1/tests/integration/serve_test.rs +22 -0
- authy_cli-0.7.1/tests/integration/session_test.rs +186 -0
- authy_cli-0.7.1/tests/integration/vault_test.rs +213 -0
- authy_cli-0.7.1/tests/mcp_test.rs +187 -0
- authy_cli-0.7.1/tui_admin.md +346 -0
- authy_cli-0.7.1/tui_todo.md +119 -0
- authy_cli-0.7.1/web/.gitignore +4 -0
- authy_cli-0.7.1/web/App.tsx +62 -0
- authy_cli-0.7.1/web/README.md +20 -0
- authy_cli-0.7.1/web/components/AgentSkills.tsx +145 -0
- authy_cli-0.7.1/web/components/Comparison.tsx +81 -0
- authy_cli-0.7.1/web/components/FadeIn.tsx +63 -0
- authy_cli-0.7.1/web/components/Features.tsx +93 -0
- authy_cli-0.7.1/web/components/Footer.tsx +53 -0
- authy_cli-0.7.1/web/components/Hero.tsx +90 -0
- authy_cli-0.7.1/web/components/LanguageSwitcher.tsx +80 -0
- authy_cli-0.7.1/web/components/Navbar.tsx +132 -0
- authy_cli-0.7.1/web/components/QuickStart.tsx +130 -0
- authy_cli-0.7.1/web/components/TerminalWindow.tsx +73 -0
- authy_cli-0.7.1/web/i18n.ts +56 -0
- authy_cli-0.7.1/web/index.html +140 -0
- authy_cli-0.7.1/web/index.tsx +16 -0
- authy_cli-0.7.1/web/locales/de.json +148 -0
- authy_cli-0.7.1/web/locales/en.json +147 -0
- authy_cli-0.7.1/web/locales/es.json +148 -0
- authy_cli-0.7.1/web/locales/fr.json +148 -0
- authy_cli-0.7.1/web/locales/ja.json +149 -0
- authy_cli-0.7.1/web/locales/ko.json +149 -0
- authy_cli-0.7.1/web/locales/pt.json +148 -0
- authy_cli-0.7.1/web/locales/zh-TW.json +149 -0
- authy_cli-0.7.1/web/locales/zh.json +148 -0
- authy_cli-0.7.1/web/metadata.json +55 -0
- authy_cli-0.7.1/web/package-lock.json +1922 -0
- authy_cli-0.7.1/web/package.json +25 -0
- authy_cli-0.7.1/web/pnpm-lock.yaml +1218 -0
- authy_cli-0.7.1/web/public/favicon.png +0 -0
- authy_cli-0.7.1/web/tsconfig.json +29 -0
- authy_cli-0.7.1/web/types.ts +26 -0
- authy_cli-0.7.1/web/vite.config.ts +27 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Test
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install Rust toolchain
|
|
20
|
+
run: |
|
|
21
|
+
rustup update stable
|
|
22
|
+
rustup default stable
|
|
23
|
+
|
|
24
|
+
- name: Cache cargo registry & build
|
|
25
|
+
uses: actions/cache@v4
|
|
26
|
+
with:
|
|
27
|
+
path: |
|
|
28
|
+
~/.cargo/registry
|
|
29
|
+
~/.cargo/git
|
|
30
|
+
target
|
|
31
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
32
|
+
restore-keys: ${{ runner.os }}-cargo-
|
|
33
|
+
|
|
34
|
+
- name: Build (workspace)
|
|
35
|
+
run: cargo build --workspace
|
|
36
|
+
|
|
37
|
+
- name: Test (all)
|
|
38
|
+
run: cargo test
|
|
39
|
+
|
|
40
|
+
- name: Clippy (workspace)
|
|
41
|
+
run: cargo clippy --workspace -- -D warnings
|
|
42
|
+
|
|
43
|
+
lib:
|
|
44
|
+
name: Library (no default features)
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Install Rust toolchain
|
|
50
|
+
run: |
|
|
51
|
+
rustup update stable
|
|
52
|
+
rustup default stable
|
|
53
|
+
|
|
54
|
+
- name: Cache cargo registry & build
|
|
55
|
+
uses: actions/cache@v4
|
|
56
|
+
with:
|
|
57
|
+
path: |
|
|
58
|
+
~/.cargo/registry
|
|
59
|
+
~/.cargo/git
|
|
60
|
+
target
|
|
61
|
+
key: ${{ runner.os }}-cargo-lib-${{ hashFiles('**/Cargo.lock') }}
|
|
62
|
+
restore-keys: ${{ runner.os }}-cargo-lib-
|
|
63
|
+
|
|
64
|
+
- name: Build lib (no default features)
|
|
65
|
+
run: cargo build -p authy-cli --lib --no-default-features
|
|
66
|
+
|
|
67
|
+
- name: Test lib (no default features)
|
|
68
|
+
run: cargo test -p authy-cli --lib --no-default-features
|
|
69
|
+
|
|
70
|
+
- name: Test API (lib integration tests)
|
|
71
|
+
run: cargo test --test api
|
|
72
|
+
|
|
73
|
+
bindings:
|
|
74
|
+
name: Check bindings
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- name: Install Rust toolchain
|
|
80
|
+
run: |
|
|
81
|
+
rustup update stable
|
|
82
|
+
rustup default stable
|
|
83
|
+
|
|
84
|
+
- name: Cache cargo registry & build
|
|
85
|
+
uses: actions/cache@v4
|
|
86
|
+
with:
|
|
87
|
+
path: |
|
|
88
|
+
~/.cargo/registry
|
|
89
|
+
~/.cargo/git
|
|
90
|
+
target
|
|
91
|
+
key: ${{ runner.os }}-cargo-bindings-${{ hashFiles('**/Cargo.lock') }}
|
|
92
|
+
restore-keys: ${{ runner.os }}-cargo-bindings-
|
|
93
|
+
|
|
94
|
+
- name: Check Python binding (PyO3)
|
|
95
|
+
run: cargo check -p authy-python
|
|
96
|
+
|
|
97
|
+
- name: Check Node.js binding (napi-rs)
|
|
98
|
+
run: cargo check -p authy-node
|
|
99
|
+
|
|
100
|
+
- name: Clippy bindings
|
|
101
|
+
run: cargo clippy -p authy-python -p authy-node -- -D warnings
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Deploy to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
paths:
|
|
7
|
+
- 'web/**'
|
|
8
|
+
- '.github/workflows/pages.yml'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [main, master]
|
|
11
|
+
paths:
|
|
12
|
+
- 'web/**'
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
pages: write
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: 'pages'
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
defaults:
|
|
28
|
+
run:
|
|
29
|
+
working-directory: web
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- name: Setup pnpm
|
|
35
|
+
uses: pnpm/action-setup@v2
|
|
36
|
+
with:
|
|
37
|
+
version: 9
|
|
38
|
+
|
|
39
|
+
- name: Setup Node
|
|
40
|
+
uses: actions/setup-node@v4
|
|
41
|
+
with:
|
|
42
|
+
node-version: 20
|
|
43
|
+
cache: 'pnpm'
|
|
44
|
+
cache-dependency-path: web/pnpm-lock.yaml
|
|
45
|
+
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: pnpm install
|
|
48
|
+
|
|
49
|
+
- name: Build
|
|
50
|
+
run: pnpm build
|
|
51
|
+
env:
|
|
52
|
+
BASE_URL: '/'
|
|
53
|
+
|
|
54
|
+
- name: Setup Pages
|
|
55
|
+
uses: actions/configure-pages@v4
|
|
56
|
+
|
|
57
|
+
- name: Upload artifact
|
|
58
|
+
uses: actions/upload-pages-artifact@v3
|
|
59
|
+
with:
|
|
60
|
+
path: web/dist
|
|
61
|
+
|
|
62
|
+
deploy:
|
|
63
|
+
environment:
|
|
64
|
+
name: github-pages
|
|
65
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
needs: build
|
|
68
|
+
steps:
|
|
69
|
+
- name: Deploy to GitHub Pages
|
|
70
|
+
id: deployment
|
|
71
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
CARGO_TERM_COLOR: always
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build ${{ matrix.target }}
|
|
17
|
+
runs-on: ${{ matrix.runner }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
include:
|
|
22
|
+
- target: x86_64-unknown-linux-gnu
|
|
23
|
+
runner: ubuntu-latest
|
|
24
|
+
archive: tar.gz
|
|
25
|
+
use-cross: false
|
|
26
|
+
- target: aarch64-unknown-linux-gnu
|
|
27
|
+
runner: ubuntu-latest
|
|
28
|
+
archive: tar.gz
|
|
29
|
+
use-cross: true
|
|
30
|
+
- target: x86_64-apple-darwin
|
|
31
|
+
runner: macos-14
|
|
32
|
+
archive: tar.gz
|
|
33
|
+
use-cross: false
|
|
34
|
+
- target: aarch64-apple-darwin
|
|
35
|
+
runner: macos-14
|
|
36
|
+
archive: tar.gz
|
|
37
|
+
use-cross: false
|
|
38
|
+
- target: x86_64-pc-windows-msvc
|
|
39
|
+
runner: windows-latest
|
|
40
|
+
archive: zip
|
|
41
|
+
use-cross: false
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Install Rust toolchain
|
|
47
|
+
run: |
|
|
48
|
+
rustup update stable
|
|
49
|
+
rustup default stable
|
|
50
|
+
rustup target add ${{ matrix.target }}
|
|
51
|
+
|
|
52
|
+
- name: Install cross
|
|
53
|
+
if: matrix.use-cross
|
|
54
|
+
run: cargo install cross --locked
|
|
55
|
+
|
|
56
|
+
- name: Build
|
|
57
|
+
run: |
|
|
58
|
+
if [ "${{ matrix.use-cross }}" = "true" ]; then
|
|
59
|
+
cross build --release --target ${{ matrix.target }}
|
|
60
|
+
else
|
|
61
|
+
cargo build --release --target ${{ matrix.target }}
|
|
62
|
+
fi
|
|
63
|
+
shell: bash
|
|
64
|
+
|
|
65
|
+
- name: Package (Unix)
|
|
66
|
+
if: matrix.archive == 'tar.gz'
|
|
67
|
+
run: |
|
|
68
|
+
cd target/${{ matrix.target }}/release
|
|
69
|
+
tar czf ../../../authy-${{ matrix.target }}.tar.gz authy
|
|
70
|
+
shell: bash
|
|
71
|
+
|
|
72
|
+
- name: Package (Windows)
|
|
73
|
+
if: matrix.archive == 'zip'
|
|
74
|
+
run: |
|
|
75
|
+
cd target/${{ matrix.target }}/release
|
|
76
|
+
7z a ../../../authy-${{ matrix.target }}.zip authy.exe
|
|
77
|
+
shell: bash
|
|
78
|
+
|
|
79
|
+
- name: Upload artifact
|
|
80
|
+
uses: actions/upload-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
name: authy-${{ matrix.target }}
|
|
83
|
+
path: authy-${{ matrix.target }}.${{ matrix.archive }}
|
|
84
|
+
|
|
85
|
+
release:
|
|
86
|
+
name: GitHub Release
|
|
87
|
+
needs: build
|
|
88
|
+
runs-on: ubuntu-latest
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
|
|
92
|
+
- name: Download artifacts
|
|
93
|
+
uses: actions/download-artifact@v4
|
|
94
|
+
with:
|
|
95
|
+
path: artifacts
|
|
96
|
+
|
|
97
|
+
- name: Create release
|
|
98
|
+
uses: softprops/action-gh-release@v2
|
|
99
|
+
with:
|
|
100
|
+
generate_release_notes: true
|
|
101
|
+
files: artifacts/**/*
|
|
102
|
+
|
|
103
|
+
# ── Node.js native binding (napi-rs) ────────────────────────────
|
|
104
|
+
|
|
105
|
+
node-build:
|
|
106
|
+
name: Node.js ${{ matrix.node-arch }}
|
|
107
|
+
runs-on: ${{ matrix.runner }}
|
|
108
|
+
strategy:
|
|
109
|
+
fail-fast: false
|
|
110
|
+
matrix:
|
|
111
|
+
include:
|
|
112
|
+
- target: x86_64-unknown-linux-gnu
|
|
113
|
+
runner: ubuntu-latest
|
|
114
|
+
node-arch: linux-x64-gnu
|
|
115
|
+
- target: aarch64-unknown-linux-gnu
|
|
116
|
+
runner: ubuntu-latest
|
|
117
|
+
node-arch: linux-arm64-gnu
|
|
118
|
+
use-napi-cross: true
|
|
119
|
+
- target: x86_64-apple-darwin
|
|
120
|
+
runner: macos-14
|
|
121
|
+
node-arch: darwin-x64
|
|
122
|
+
- target: aarch64-apple-darwin
|
|
123
|
+
runner: macos-14
|
|
124
|
+
node-arch: darwin-arm64
|
|
125
|
+
- target: x86_64-pc-windows-msvc
|
|
126
|
+
runner: windows-latest
|
|
127
|
+
node-arch: win32-x64-msvc
|
|
128
|
+
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
|
|
132
|
+
- name: Install Rust toolchain
|
|
133
|
+
run: |
|
|
134
|
+
rustup update stable
|
|
135
|
+
rustup default stable
|
|
136
|
+
rustup target add ${{ matrix.target }}
|
|
137
|
+
|
|
138
|
+
- uses: actions/setup-node@v4
|
|
139
|
+
with:
|
|
140
|
+
node-version: 20
|
|
141
|
+
|
|
142
|
+
- name: Install napi-rs CLI
|
|
143
|
+
run: npm install -g @napi-rs/cli
|
|
144
|
+
|
|
145
|
+
- name: Install aarch64 cross-compilation toolchain
|
|
146
|
+
if: matrix.use-napi-cross
|
|
147
|
+
run: |
|
|
148
|
+
sudo apt-get update
|
|
149
|
+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
|
150
|
+
|
|
151
|
+
- name: Build native module
|
|
152
|
+
working-directory: bindings/node
|
|
153
|
+
run: napi build --release --target ${{ matrix.target }} --platform
|
|
154
|
+
shell: bash
|
|
155
|
+
env:
|
|
156
|
+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: ${{ matrix.use-napi-cross && 'aarch64-linux-gnu-gcc' || '' }}
|
|
157
|
+
|
|
158
|
+
- name: Upload native artifact
|
|
159
|
+
uses: actions/upload-artifact@v4
|
|
160
|
+
with:
|
|
161
|
+
name: node-${{ matrix.node-arch }}
|
|
162
|
+
path: bindings/node/*.node
|
|
163
|
+
if-no-files-found: error
|
|
164
|
+
|
|
165
|
+
# ── Publish unified npm package (native binding + CLI binary) ───
|
|
166
|
+
|
|
167
|
+
npm-publish:
|
|
168
|
+
name: Publish npm package
|
|
169
|
+
needs: [build, node-build, release]
|
|
170
|
+
runs-on: ubuntu-latest
|
|
171
|
+
steps:
|
|
172
|
+
- uses: actions/checkout@v4
|
|
173
|
+
|
|
174
|
+
- uses: actions/setup-node@v4
|
|
175
|
+
with:
|
|
176
|
+
node-version: 20
|
|
177
|
+
registry-url: https://registry.npmjs.org
|
|
178
|
+
|
|
179
|
+
# Collect napi-rs .node files
|
|
180
|
+
- name: Download native binding artifacts
|
|
181
|
+
uses: actions/download-artifact@v4
|
|
182
|
+
with:
|
|
183
|
+
pattern: node-*
|
|
184
|
+
path: bindings/node
|
|
185
|
+
merge-multiple: true
|
|
186
|
+
|
|
187
|
+
# Collect prebuilt CLI binaries
|
|
188
|
+
- name: Download CLI binary artifacts
|
|
189
|
+
uses: actions/download-artifact@v4
|
|
190
|
+
with:
|
|
191
|
+
path: artifacts
|
|
192
|
+
|
|
193
|
+
- name: Place CLI binaries into package
|
|
194
|
+
run: |
|
|
195
|
+
# Linux x64
|
|
196
|
+
tar xzf artifacts/authy-x86_64-unknown-linux-gnu/authy-x86_64-unknown-linux-gnu.tar.gz -C /tmp
|
|
197
|
+
mv /tmp/authy bindings/node/bin/authy-linux-x64
|
|
198
|
+
|
|
199
|
+
# Linux arm64
|
|
200
|
+
tar xzf artifacts/authy-aarch64-unknown-linux-gnu/authy-aarch64-unknown-linux-gnu.tar.gz -C /tmp
|
|
201
|
+
mv /tmp/authy bindings/node/bin/authy-linux-arm64
|
|
202
|
+
|
|
203
|
+
# macOS x64
|
|
204
|
+
tar xzf artifacts/authy-x86_64-apple-darwin/authy-x86_64-apple-darwin.tar.gz -C /tmp
|
|
205
|
+
mv /tmp/authy bindings/node/bin/authy-darwin-x64
|
|
206
|
+
|
|
207
|
+
# macOS arm64
|
|
208
|
+
tar xzf artifacts/authy-aarch64-apple-darwin/authy-aarch64-apple-darwin.tar.gz -C /tmp
|
|
209
|
+
mv /tmp/authy bindings/node/bin/authy-darwin-arm64
|
|
210
|
+
|
|
211
|
+
# Windows x64
|
|
212
|
+
cd artifacts/authy-x86_64-pc-windows-msvc
|
|
213
|
+
7z x authy-x86_64-pc-windows-msvc.zip -o/tmp/win
|
|
214
|
+
cd ../..
|
|
215
|
+
mv /tmp/win/authy.exe bindings/node/bin/authy-win32-x64.exe
|
|
216
|
+
|
|
217
|
+
# Make all binaries executable
|
|
218
|
+
chmod +x bindings/node/bin/authy-*
|
|
219
|
+
|
|
220
|
+
- name: List package contents
|
|
221
|
+
run: |
|
|
222
|
+
echo "=== Native modules ==="
|
|
223
|
+
ls -la bindings/node/*.node
|
|
224
|
+
echo "=== CLI binaries ==="
|
|
225
|
+
ls -la bindings/node/bin/
|
|
226
|
+
|
|
227
|
+
- name: Extract version from tag
|
|
228
|
+
id: version
|
|
229
|
+
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
230
|
+
|
|
231
|
+
- name: Update package version
|
|
232
|
+
working-directory: bindings/node
|
|
233
|
+
run: npm version "${{ steps.version.outputs.version }}" --no-git-tag-version
|
|
234
|
+
|
|
235
|
+
- name: Publish
|
|
236
|
+
working-directory: bindings/node
|
|
237
|
+
env:
|
|
238
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
239
|
+
run: npm publish --access public
|
|
240
|
+
|
|
241
|
+
# ── Python native binding (PyO3 + maturin) ─────────────────────
|
|
242
|
+
|
|
243
|
+
python-build:
|
|
244
|
+
name: Python ${{ matrix.target }}
|
|
245
|
+
runs-on: ${{ matrix.runner }}
|
|
246
|
+
strategy:
|
|
247
|
+
fail-fast: false
|
|
248
|
+
matrix:
|
|
249
|
+
include:
|
|
250
|
+
- target: x86_64-unknown-linux-gnu
|
|
251
|
+
runner: ubuntu-latest
|
|
252
|
+
- target: aarch64-unknown-linux-gnu
|
|
253
|
+
runner: ubuntu-latest
|
|
254
|
+
- target: x86_64-apple-darwin
|
|
255
|
+
runner: macos-14
|
|
256
|
+
- target: aarch64-apple-darwin
|
|
257
|
+
runner: macos-14
|
|
258
|
+
- target: x86_64-pc-windows-msvc
|
|
259
|
+
runner: windows-latest
|
|
260
|
+
|
|
261
|
+
steps:
|
|
262
|
+
- uses: actions/checkout@v4
|
|
263
|
+
|
|
264
|
+
- uses: actions/setup-python@v5
|
|
265
|
+
with:
|
|
266
|
+
python-version: "3.12"
|
|
267
|
+
|
|
268
|
+
- name: Build wheels
|
|
269
|
+
uses: PyO3/maturin-action@v1
|
|
270
|
+
with:
|
|
271
|
+
target: ${{ matrix.target }}
|
|
272
|
+
args: --release --out dist
|
|
273
|
+
manylinux: auto
|
|
274
|
+
working-directory: bindings/python
|
|
275
|
+
|
|
276
|
+
- name: Upload wheel artifacts
|
|
277
|
+
uses: actions/upload-artifact@v4
|
|
278
|
+
with:
|
|
279
|
+
name: python-wheel-${{ matrix.target }}
|
|
280
|
+
path: bindings/python/dist/*.whl
|
|
281
|
+
|
|
282
|
+
python-sdist:
|
|
283
|
+
name: Python sdist
|
|
284
|
+
runs-on: ubuntu-latest
|
|
285
|
+
steps:
|
|
286
|
+
- uses: actions/checkout@v4
|
|
287
|
+
|
|
288
|
+
- name: Build sdist
|
|
289
|
+
uses: PyO3/maturin-action@v1
|
|
290
|
+
with:
|
|
291
|
+
command: sdist
|
|
292
|
+
args: --out dist
|
|
293
|
+
working-directory: bindings/python
|
|
294
|
+
|
|
295
|
+
- name: Upload sdist artifact
|
|
296
|
+
uses: actions/upload-artifact@v4
|
|
297
|
+
with:
|
|
298
|
+
name: python-sdist
|
|
299
|
+
path: bindings/python/dist/*.tar.gz
|
|
300
|
+
|
|
301
|
+
pypi-publish:
|
|
302
|
+
name: Publish to PyPI
|
|
303
|
+
needs: [python-build, python-sdist, release]
|
|
304
|
+
runs-on: ubuntu-latest
|
|
305
|
+
steps:
|
|
306
|
+
- name: Download wheel artifacts
|
|
307
|
+
uses: actions/download-artifact@v4
|
|
308
|
+
with:
|
|
309
|
+
pattern: python-wheel-*
|
|
310
|
+
path: dist
|
|
311
|
+
merge-multiple: true
|
|
312
|
+
|
|
313
|
+
- name: Download sdist artifact
|
|
314
|
+
uses: actions/download-artifact@v4
|
|
315
|
+
with:
|
|
316
|
+
name: python-sdist
|
|
317
|
+
path: dist
|
|
318
|
+
|
|
319
|
+
- name: List distributions
|
|
320
|
+
run: ls -la dist/
|
|
321
|
+
|
|
322
|
+
- name: Publish to PyPI
|
|
323
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
324
|
+
with:
|
|
325
|
+
password: ${{ secrets.PYPI_TOKEN }}
|
|
326
|
+
|
|
327
|
+
# ── Go module tag ──────────────────────────────────────────────
|
|
328
|
+
|
|
329
|
+
go-tag:
|
|
330
|
+
name: Tag Go module
|
|
331
|
+
needs: release
|
|
332
|
+
runs-on: ubuntu-latest
|
|
333
|
+
steps:
|
|
334
|
+
- uses: actions/checkout@v4
|
|
335
|
+
|
|
336
|
+
- name: Extract version from tag
|
|
337
|
+
id: version
|
|
338
|
+
run: echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
|
339
|
+
|
|
340
|
+
- name: Create Go subdirectory tag
|
|
341
|
+
run: |
|
|
342
|
+
git config user.name "github-actions[bot]"
|
|
343
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
344
|
+
git tag "packages/go/${{ steps.version.outputs.version }}"
|
|
345
|
+
git push origin "packages/go/${{ steps.version.outputs.version }}"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Build
|
|
2
|
+
/target
|
|
3
|
+
|
|
4
|
+
# Editor
|
|
5
|
+
*.swp
|
|
6
|
+
*.swo
|
|
7
|
+
*~
|
|
8
|
+
.idea/
|
|
9
|
+
.vscode/
|
|
10
|
+
*.iml
|
|
11
|
+
|
|
12
|
+
# OS
|
|
13
|
+
.DS_Store
|
|
14
|
+
Thumbs.db
|
|
15
|
+
|
|
16
|
+
# Secrets (never commit these)
|
|
17
|
+
.env
|
|
18
|
+
*.key
|
|
19
|
+
*.key.pub
|
|
20
|
+
*.age
|
|
21
|
+
!vault.age.example
|
|
22
|
+
|
|
23
|
+
# Authy runtime
|
|
24
|
+
.authy/
|
|
25
|
+
audit.log
|
|
26
|
+
|
|
27
|
+
# npm platform binaries (injected by CI)
|
|
28
|
+
npm/authy-cli/bin/authy-*
|
|
29
|
+
npm/authy-cli/node_modules/
|
|
30
|
+
*.tgz
|
|
31
|
+
|
|
32
|
+
# SDK build artifacts
|
|
33
|
+
packages/typescript/node_modules/
|
|
34
|
+
packages/typescript/dist/
|
|
35
|
+
__pycache__/
|
|
36
|
+
*.pyc
|
|
37
|
+
|
|
38
|
+
# Native binding build artifacts
|
|
39
|
+
bindings/*/target/
|
|
40
|
+
bindings/*/Cargo.lock
|
|
41
|
+
bindings/node/node_modules/
|
|
42
|
+
bindings/node/*.node
|
|
43
|
+
bindings/node/bin/authy-*
|