{"_id":"@codenanny/adapters","name":"@codenanny/adapters","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@codenanny/adapters","version":"0.4.0","description":"Delivery adapters for codenanny static exports (local/gdrive/ftp/scp).","license":"MIT","author":{"name":"nobleglitch"},"type":"module","main":"./index.js","exports":{".":"./index.js"},"dependencies":{"basic-ftp":"^5.0.5","ssh2-sftp-client":"^12.1.1"},"publishConfig":{"access":"public"},"_id":"@codenanny/adapters@0.4.0","gitHead":"e4477af983a7ab4abc3342c7ec1de112dbdd7b9b","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-dmFIe51vgDDLjZE5dl0Mxp4aCF7M654hYkQy8mCrvTVIOzoFWa7oz7P22sMIFuhhfkMuSfAlmk5201oakeABGg==","shasum":"4b60ac75adb7796fc42575698e3a4475a8a0132f","tarball":"https://registry.npmjs.org/@codenanny/adapters/-/adapters-0.4.0.tgz","fileCount":8,"unpackedSize":15818,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCq0zLE0NCJu4F//jSkwqGRXLokY9r/8QG7S6OkYScLFAIgJzN4yDzbJdNiNecxukB0tNDbmA7AgnZ1Vx3EfILlHyk="}]},"_npmUser":{"name":"nobleglitch","email":"desertshibari@gmail.com"},"directories":{},"maintainers":[{"name":"nobleglitch","email":"desertshibari@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapters_0.4.0_1781790438300_0.35333962769212857"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T13:47:18.169Z","0.4.0":"2026-06-18T13:47:18.440Z","modified":"2026-06-18T13:47:18.753Z"},"maintainers":[{"name":"nobleglitch","email":"desertshibari@gmail.com"}],"description":"Delivery adapters for codenanny static exports (local/gdrive/ftp/scp).","author":{"name":"nobleglitch"},"license":"MIT","readme":"# @codenanny/adapters\n\nDelivery adapters for codenanny static exports.\n\n| Adapter | Status | Underlying |\n|---|---|---|\n| `local`  | Functional | filesystem |\n| `scp`    | Functional | `ssh2-sftp-client` |\n| `gdrive` | Functional (credential-based) | Google Drive REST v3 (no SDK; uses `fetch`) |\n| `ftp`    | Functional | `basic-ftp` (plain FTP + FTPS; password auth only, key auth deferred) |\n\n```js\nimport { getAdapter } from '@codenanny/adapters';\nconst adapter = getAdapter('local');\nawait adapter.deliver(bundle, { path: '/somewhere' });\n```\n\n## Adapter interface\n\n```ts\ndeliver(bundle, options) -> Promise<{ type, location, sessions_written, ... }>\n```\n\n## Per-adapter options\n\n### `local`\n- `path` — destination directory (will be created if missing)\n\n### `scp`\n- `path` — `scp://user@host[:port]/path` OR `/path` plus separate `host`, `user`, `port`\n- `auth` — password OR PEM private key string\n\n### `gdrive`\n- `path` — Google Drive folder ID or empty for root.\n  **The wizard picks it for you — no manual steps needed.** After completing OAuth\n  in the wizard, the folder picker lets you browse and select a Drive folder by\n  clicking, then writes the ID into this field automatically.\n  Manual paste is still supported for headless or re-config flows: paste the folder\n  ID directly from your Drive URL (the segment after `/folders/`), or use the\n  \"Paste folder ID instead\" link inside the wizard picker.\n- Credentials, either:\n  - `auth` = JSON string `{\"client_id\":\"...\",\"client_secret\":\"...\",\"refresh_token\":\"...\"}`\n  - or `host`=client_id, `user`=client_secret, `auth`=refresh_token\n\n### `ftp`\n- `host` — hostname or `host:port` (env: `CODENANNY_FTP_HOST`)\n- `user` — FTP username (env: `CODENANNY_FTP_USER`)\n- `auth` — FTP password (env: `CODENANNY_FTP_AUTH`)\n- `path` — remote directory (created automatically via `ensureDir`)\n- **TLS:** port 990 → implicit FTPS; `CODENANNY_FTP_SECURE=true` → explicit FTPS; otherwise plain FTP on port 21.\n- Key-based auth is not yet supported (password only).\n\n## Google Drive one-time setup\n\nSee [docs/GDRIVE.md](../../docs/GDRIVE.md) for the full canonical walkthrough:\nCloud Console setup → OAuth in the wizard → folder picker → done.\n\n**Short version (v0.4+):** enable the Drive API, create an OAuth client ID\n(Web application, redirect URI `http://localhost:7700/oauth/gdrive/callback`),\npaste `client_id` + `client_secret` into the wizard, click **\"Connect Google Drive\"**,\nand then use the built-in folder picker to select your target folder — no manual\nfolder ID copy-paste required.\n\n**Manual alternative (no wizard):** if you already have a refresh token, paste it\ndirectly into the `auth` field and enter the folder ID in the `path` field.\nOr use https://developers.google.com/oauthplayground with scope\n`https://www.googleapis.com/auth/drive.file` to generate a refresh token.\n\n## Security note\n\nCredentials passed to adapters are forwarded to network calls in plaintext. When stored in the codenanny database (via connection profiles), they're encrypted at rest (AES-256-GCM, key from the `CODENANNY_SECRET` env var). Don't commit your refresh_token to git.\n","readmeFilename":"README.md","_rev":"1-f6942b65dd5c2ac236f0dd34ea5aac08"}