diff --git a/src/generators/rclone-conf.ts b/src/generators/rclone-conf.ts index efcc72a..2e35325 100644 --- a/src/generators/rclone-conf.ts +++ b/src/generators/rclone-conf.ts @@ -11,6 +11,10 @@ const RCLONE_TYPE_MAP: Record = { azureblob: 'azureblob', s3: 's3', 's3-compatible': 's3', + onedrive: 'onedrive', + sftp: 'sftp', + gcs: 'google cloud storage', + b2: 'b2', }; export function buildRcloneConf(state: WizardState): string { diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 238fd1e..8bcdb3b 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -21,5 +21,9 @@ export const BACKEND_SCHEMAS = { azureblob: buildZodSchema('azureblob'), s3: buildZodSchema('s3'), 's3-compatible': buildZodSchema('s3-compatible'), + onedrive: buildZodSchema('onedrive'), + sftp: buildZodSchema('sftp'), + gcs: buildZodSchema('gcs'), + b2: buildZodSchema('b2'), } as const; diff --git a/src/schemas/registry.ts b/src/schemas/registry.ts index bdd43c6..14eedb9 100644 --- a/src/schemas/registry.ts +++ b/src/schemas/registry.ts @@ -16,9 +16,6 @@ export interface FieldDef { options?: { value: string; label: string }[]; // for inputType: 'select' } -// NOTE: 'sftp' entry is intentionally missing — Plan 02 (06-02-PLAN.md) adds it. -// The type cast below suppresses the incomplete-record error until that plan runs. -// eslint-disable-next-line @typescript-eslint/no-explicit-any export const BACKEND_REGISTRY = { azureblob: { displayName: 'Azure Blob Storage', @@ -180,6 +177,41 @@ export const BACKEND_REGISTRY = { }, ], }, + sftp: { + displayName: 'SFTP', + description: 'SSH File Transfer Protocol', + fields: [ + { + key: 'host', + label: 'Host', + inputType: 'text', + required: true, + placeholder: 'sftp.example.com', + helpText: 'The SSH server hostname or IP address', + }, + { + key: 'user', + label: 'Username', + inputType: 'text', + required: true, + placeholder: 'admin', + }, + { + key: 'pass', + label: 'Password', + inputType: 'password', + required: false, + helpText: 'SFTP password. Note: rclone may require the password to be obscured using `rclone obscure `. If authentication fails, use the obscured value instead of the plain password.', + }, + { + key: 'key_pem', + label: 'Private Key (PEM)', + inputType: 'password', + required: false, + helpText: 'Paste your private key in PEM format (-----BEGIN ... PRIVATE KEY-----)', + }, + ], + }, b2: { displayName: 'Backblaze B2', description: 'Backblaze B2 Cloud Storage',