@rg-dev/rclone-api
Advanced tools
Sorry, the diff of this file is too big to display
+127
-8
@@ -0,1 +1,3 @@ | ||
| import { Readable } from 'stream'; | ||
| interface FileEntry { | ||
@@ -11,9 +13,108 @@ Path: string; | ||
| interface CommandArgsStream{ | ||
| args?:string[] | ||
| opts?:Record<string,string|number> | ||
| returnType?:CommandReturnTypesStream | ||
| } | ||
| interface CommandArgs{ | ||
| args?:string[] | ||
| opts?:Record<string,string|number> | ||
| } | ||
| type RcCommands = | ||
| | 'about' | ||
| | 'archive' | ||
| | 'archive create' | ||
| | 'archive extract' | ||
| | 'archive list' | ||
| | 'authorize' | ||
| | 'backend' | ||
| | 'bisync' | ||
| | 'cat' | ||
| | 'check' | ||
| | 'checksum' | ||
| | 'cleanup' | ||
| | 'copy' | ||
| | 'copyto' | ||
| | 'copyurl' | ||
| | 'cryptcheck' | ||
| | 'cryptdecode' | ||
| | 'dedupe' | ||
| | 'delete' | ||
| | 'deletefile' | ||
| | 'gendocs' | ||
| | 'gitannex' | ||
| | 'hashsum' | ||
| | 'link' | ||
| | 'listremotes' | ||
| | 'ls' | ||
| | 'lsd' | ||
| | 'lsf' | ||
| | 'lsjson' | ||
| | 'lsl' | ||
| | 'md5sum' | ||
| | 'mkdir' | ||
| | 'move' | ||
| | 'moveto' | ||
| | 'ncdu' | ||
| | 'nfsmount' | ||
| | 'obscure' | ||
| | 'purge' | ||
| | 'rclone' // base help command | ||
| | 'rc' | ||
| | 'rcat' | ||
| | 'rcd' | ||
| | 'rmdir' | ||
| | 'rmdirs' | ||
| | 'settier' | ||
| | 'sha1sum' | ||
| | 'size' | ||
| | 'sync' | ||
| | 'touch' | ||
| | 'tree' | ||
| | 'version'; | ||
| //'"COMBINED_OUTPUT", "STREAM", "STREAM_ONLY_STDOUT", "STREAM_ONLY_STDERR"' | ||
| type CommandReturnTypesStream = 'STREAM' | 'STREAM_ONLY_STDOUT' | 'STREAM_ONLY_STDERR' | ||
| type Src = 'local' | (string & {}); | ||
| declare class rcloneClient { | ||
| declare class rcloneCliApi { | ||
| private rcloneBin; | ||
| private srcFs; | ||
| constructor(rcloneBin: string, srcFs: Src); | ||
| private checkBin; | ||
| deleteFile(dest: string): Promise<void>; | ||
| listFiles(dest: string): Promise<string[]>; | ||
| mkdir(dest: string): Promise<void>; | ||
| copyFolder(src: string, dest: string): Promise<void>; | ||
| copyFile(src: string, dest: string): Promise<void>; | ||
| } | ||
| declare class rcloneRestApi { | ||
| private srcFs; | ||
| private apiUrl; | ||
| private axiosClient; | ||
| constructor(srcFs: Src); | ||
| static listRemotes(): Promise<string[]>; | ||
| deleteFile(filePath: string): Promise<any>; | ||
| constructor(srcFs: Src, apiUrl?: string); | ||
| listRemotes(): Promise<{ | ||
| remotes: string[]; | ||
| }>; | ||
| listJobs(): Promise<{ | ||
| jobids: number[]; | ||
| }>; | ||
| deleteFile(filePath: string): Promise<void>; | ||
| uploadLocalFileAsync(srcPath: string, dstPath: string): Promise<{ | ||
| id: number; | ||
| stop: () => Promise<any>; | ||
| getProgress: () => Promise<any>; | ||
| }>; | ||
| uploadLocalFile(localFilePath: string, dstPath: string): Promise<string>; | ||
| downloadFile(remoteFilePath: string, localSavePath: string): Promise<string>; | ||
| renameFile(oldPath: string, newPath: string): Promise<any>; | ||
@@ -28,7 +129,25 @@ mkDir(path: string): Promise<void>; | ||
| }>; | ||
| getJobStatus(jobId: number | string): Promise<any>; | ||
| uploadFile(dstPath: string, buff: Buffer): Promise<string>; | ||
| uploadFileAtomic(dstPath: string, buff: Buffer): Promise<string>; | ||
| uploadTest(sourcePath: string, destPath: string): Promise<Readable>; | ||
| getJobProgress(jobid: string | number): Promise<any>; | ||
| deleteJob(jobid: string | number): Promise<any>; | ||
| runCliCommandSync(command: RcCommands, args?: CommandArgs): Promise<string>; | ||
| runCliCommandStream(command: RcCommands, args?: CommandArgsStream): Promise<Readable>; | ||
| private uploadFile; | ||
| uploadFileFromBuffer(dstPath: string, buff: Buffer): Promise<string>; | ||
| } | ||
| export { rcloneClient }; | ||
| declare class rcloneHelper { | ||
| private static kill; | ||
| static dowlonadBin(outputPath: string, force?: boolean): Promise<string>; | ||
| static deSpawn(): void; | ||
| static spawnRestApi(binPath: string, opts?: { | ||
| port?: number; | ||
| address?: string; | ||
| onMessage?: (msg: string) => void; | ||
| }): Promise<{ | ||
| pid: number; | ||
| kill: () => void; | ||
| }>; | ||
| } | ||
| export { rcloneCliApi, rcloneHelper, rcloneRestApi }; |
+11
-9
| { | ||
| "name": "@rg-dev/rclone-api", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "", | ||
| "bin": "compiled/index.cjs", | ||
| "scripts": { | ||
| "test": "tsup && node dist/index.cjs", | ||
| "build": "tsup" | ||
| "build": "es-helper . && tsup" | ||
| }, | ||
@@ -13,3 +14,4 @@ "author": "", | ||
| "files": [ | ||
| "dist" | ||
| "dist", | ||
| "compiled" | ||
| ], | ||
@@ -26,2 +28,4 @@ "module": "./dist/index.cjs", | ||
| "devDependencies": { | ||
| "@rg-dev/stdlib": "^1.0.42", | ||
| "@types/adm-zip": "^0.5.7", | ||
| "@types/node": "^14.18.36", | ||
@@ -31,13 +35,11 @@ "builtin-modules": "^3.3.0", | ||
| "tsup": "^8.0.2", | ||
| "typescript": "^5.4.5", | ||
| "@rg-dev/stdlib": "^1.0.41" | ||
| "typescript": "^5.4.5" | ||
| }, | ||
| "publishConfig": { | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "adm-zip": "^0.5.16", | ||
| "axios": "^1.13.2", | ||
| "execa-helper": "github:RGdevz/execa-helper", | ||
| "form-data": "^4.0.5", | ||
@@ -44,0 +46,0 @@ "pathe": "^2.0.3" |
Sorry, the diff of this file is too big to display
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
862989
7500.75%4
33.33%27811
8226.65%5
66.67%7
16.67%1
Infinity%168
16700%28
1300%+ Added
+ Added