🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@rg-dev/rclone-api

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rg-dev/rclone-api - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
compiled/index.cjs

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