Skip to content

Develop - #144

Merged
AndreasGassmann merged 31 commits into
mainfrom
develop
Jul 20, 2026
Merged

Develop#144
AndreasGassmann merged 31 commits into
mainfrom
develop

Conversation

@AndreasGassmann

Copy link
Copy Markdown
Collaborator

No description provided.

kaltra-muho and others added 30 commits May 25, 2026 15:38
The CLI-playground tests use ESM module mocking (jest.unstable_mockModule
+ top-level await) and load the ESM-only @acurast/sdk. Run jest with
--experimental-vm-modules and compile tests via an esnext/bundler tsconfig
so top-level await compiles and package exports subpaths resolve.
- Global login at ~/.acurast/auth.json shared across projects, with an
  optional per-project pin at ./.acurast/auth.json that overrides it.
- Signing-mode resolution: env force > project pin > mnemonic > global login.
- init asks how to sign (default browser wallet); browser mode writes no
  mnemonic and offers to log in inline.
- login --project; logout --project/--all; whoami shows account source.
- deploy prints a visible signing notice, explicit about local-mnemonic use.
- Extract ensureDirectoryExistence to break the constants<->storeDeployment
  import cycle (surfaced under ESM tests).
…utable

- Remove unref() on the login callback server: login awaits the callback with
  no other active handle, so an unref'd socket let the process exit instantly
  and the browser hit ECONNREFUSED. The listening socket now keeps the CLI
  alive until close() runs in login's finally.
- build: chmod dist/index.js to 0755 so tsc overwriting it doesn't strip the
  bin's execute bit (npm i -g relinks but won't re-chmod on 'up to date').
Chromium tags the hub's https->http login redirect as Sec-Fetch-Site:
cross-site, which the same-origin guard rejected with 403. Allow top-level
navigations (Sec-Fetch-Mode: navigate / Sec-Fetch-Dest: document) — the
per-session token is the CSRF defense there — while still blocking cross-site
fetches to /payload and /result.
…ompt

- init only asks the signing-method question in the greenfield path and only
  when stdin is a TTY; the existing-json path and non-tty runs fall back to the
  local mnemonic (legacy behaviour), so `acurast init` on an existing project
  no longer blocks waiting for input.
- init.exp answers the new signing-method select (picks Local mnemonic) so the
  wizard writes ACURAST_MNEMONIC as the e2e scenarios expect.
Deploy an SSH-able VPS on a processor without an acurast.json:
vendors the app-tunnel/cargo example (Shell runtime, dropbear over
the Acurast reverse tunnel) as a CLI-shipped template and
synthesizes the project config from flags, VPS_* env vars, or an
interactive wizard (precedence in that order).

- extract executeDeployFlow from the deploy action so both commands
  share signer/balance/pricing/submission logic
- enable positional options so flags shared with `deploy`
  (--dry-run, --min-memory, ...) reach the subcommand
- image aliases: ubuntu24 (noble, default) / ubuntu25 (questing),
  pinned proot-distro tarballs with sha256
- SSH auth: password and/or authorized key (SSH_AUTHORIZED_KEY
  written to authorized_keys by the template's start.sh)
DevTools log forwarding only works for NodeJS runtimes — the Shell
(cargo) runtime has no snippet to inject, so the post-deploy hint was
misleading. Since the tunnel hostname is generated on the processor and
there is no remote log access, a missing callback URL makes the SSH
connect command unrecoverable: warn, and in interactive mode require
confirmation before deploying without one.
executeDeployFlow decided whether to wait for EnvironmentVariablesSet
by checking config.includeEnvironmentVariables. `deploy vps` passes
env vars directly without listing them there, so the CLI exited right
after processor acknowledgement — killing the SDK's in-flight
setEnvVars submission. The processor never received NETWORK /
SSH_PASSWORD / CALLBACK_URL and the tunnel app aborted on startup.
Wizard answers are written as VPS_* variables (existing lines updated,
rest of the file preserved), so subsequent runs pre-fill from the
environment and skip the questions. Prompt only appears when the
wizard actually asked something.
The non-interactive benchmark gate returned before the dry-run exit,
so `--dry-run --non-interactive` with filters never printed
"Dry run, not deploying" (e2e scenario 07 failure). A dry run submits
nothing — skip the abort.
feat(deploy): add `deploy vps` command
@AndreasGassmann
AndreasGassmann merged commit 490ba7a into main Jul 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants