Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 94 additions & 40 deletions README.md

Large diffs are not rendered by default.

512 changes: 256 additions & 256 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"author": "Internxt <[email protected]>",
"version": "1.6.5",
"version": "1.6.6",
"description": "Internxt CLI to manage your encrypted storage",
"scripts": {
"build": "npm run clean && tsc",
Expand Down Expand Up @@ -38,11 +38,11 @@
"dependencies": {
"@dashlane/pqc-kem-kyber512-node": "1.0.0",
"@inquirer/prompts": "8.5.2",
"@internxt/inxt-js": "3.2.2",
"@internxt/inxt-js": "3.3.1",
"@internxt/lib": "1.4.2",
"@internxt/sdk": "1.17.5",
"@oclif/core": "4.11.6",
"@oclif/plugin-autocomplete": "3.2.50",
"@internxt/sdk": "1.17.9",
"@oclif/core": "4.11.10",
"@oclif/plugin-autocomplete": "3.2.52",
"axios": "1.18.0",
"better-sqlite3": "12.11.1",
"bip39": "3.1.0",
Expand All @@ -53,7 +53,7 @@
"express": "5.2.1",
"express-async-handler": "1.2.0",
"fast-xml-builder": "1.2.0",
"fast-xml-parser": "5.9.0",
"fast-xml-parser": "5.9.3",
"hash-wasm": "4.12.0",
"mime-types": "3.0.2",
"open": "11.0.0",
Expand All @@ -73,15 +73,15 @@
"@types/cli-progress": "^3.11.6",
"@types/express": "^5.0.6",
"@types/mime-types": "^3.0.1",
"@types/node": "^25.9.3",
"@types/node": "^26.0.0",
"@types/range-parser": "^1.2.7",
"@vitest/coverage-istanbul": "^4.1.9",
"@vitest/spy": "^4.1.9",
"eslint": "^10.5.0",
"husky": "^9.1.7",
"lint-staged": "^17.0.7",
"lint-staged": "^17.0.8",
"nodemon": "^3.1.14",
"oclif": "^4.23.16",
"oclif": "^4.23.19",
"prettier": "^3.8.4",
"rimraf": "^6.1.3",
"sql.js": "^1.14.1",
Expand All @@ -91,7 +91,7 @@
"vitest-mock-express": "^2.2.0"
},
"optionalDependencies": {
"sharp": "0.35.1"
"sharp": "0.35.2"
},
"engines": {
"node": "^22.13.0 || >=24.11.0"
Expand Down
5 changes: 4 additions & 1 deletion src/commands/add-cert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export default class AddCert extends Command {
static readonly description = 'Add a self-signed certificate to the trusted store for macOS, Linux, and Windows.';
static readonly aliases = ['add:cert'];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {};
static readonly flags = {
...CLIUtils.CommonFlags,
};
static readonly enableJsonFlag = true;

public run = async () => {
Expand Down Expand Up @@ -42,6 +44,7 @@ export default class AddCert extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default class Config extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/create-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default class CreateFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/delete-permanently-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class DeletePermanentlyFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/delete-permanently-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class DeletePermanentlyFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/download-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default class DownloadFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class List extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/login-legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class LoginLegacy extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
2 changes: 2 additions & 0 deletions src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class Login extends Command {
static readonly aliases = [];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {
...CLIUtils.CommonFlags,
host: Flags.string({
char: 'h',
aliases: ['host'],
Expand Down Expand Up @@ -69,6 +70,7 @@ export default class Login extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
5 changes: 4 additions & 1 deletion src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default class Logout extends Command {
static readonly description = 'Logs out the current internxt user that is logged into the Internxt CLI.';
static readonly aliases = [];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {};
static readonly flags = {
...CLIUtils.CommonFlags,
};
static readonly enableJsonFlag = true;

public run = async () => {
Expand All @@ -33,6 +35,7 @@ export default class Logout extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
5 changes: 4 additions & 1 deletion src/commands/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default class Logs extends Command {
static readonly description = 'Displays the Internxt CLI logs directory path';
static readonly aliases = [];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {};
static readonly flags = {
...CLIUtils.CommonFlags,
};
static readonly enableJsonFlag = true;

public run = async () => {
Expand All @@ -23,6 +25,7 @@ export default class Logs extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/move-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default class MoveFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/move-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default class MoveFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/rename-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class RenameFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/rename-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class RenameFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/trash-clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default class TrashClear extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/trash-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class TrashFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/trash-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class TrashFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
2 changes: 2 additions & 0 deletions src/commands/trash-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class TrashList extends Command {
static readonly aliases = ['trash:list'];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {
...CLIUtils.CommonFlags,
extended: Flags.boolean({
char: 'e',
description: 'Displays additional information in the trash list.',
Expand Down Expand Up @@ -68,6 +69,7 @@ export default class TrashList extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/trash-restore-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class TrashRestoreFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/trash-restore-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default class TrashRestoreFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/upload-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default class UploadFile extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/upload-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class UploadFolder extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/webdav-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default class WebDAVConfig extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
5 changes: 4 additions & 1 deletion src/commands/webdav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default class Webdav extends Command {
'<%= config.bin %> <%= command.id %> restart',
'<%= config.bin %> <%= command.id %> status',
];
static readonly flags = {};
static readonly flags = {
...CLIUtils.CommonFlags,
};
static readonly enableJsonFlag = true;

public run = async () => {
Expand Down Expand Up @@ -76,6 +78,7 @@ export default class Webdav extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
5 changes: 4 additions & 1 deletion src/commands/whoami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export default class Whoami extends Command {
static readonly description = 'Display the current user logged into the Internxt CLI.';
static readonly aliases = [];
static readonly examples = ['<%= config.bin %> <%= command.id %>'];
static readonly flags = {};
static readonly flags = {
...CLIUtils.CommonFlags,
};
static readonly enableJsonFlag = true;

public run = async () => {
Expand Down Expand Up @@ -53,6 +55,7 @@ export default class Whoami extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/workspaces-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default class WorkspacesList extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/workspaces-unset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class WorkspacesUnset extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/commands/workspaces-use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default class WorkspacesUse extends Command {
command: this.id,
logReporter: this.log.bind(this),
jsonFlag: flags['json'],
debugMode: flags['debug'],
});
this.exit(1);
};
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/prerun/auth_check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const CommandsToSkip = [Whoami, Login, LoginLegacy, Logout, Logs, Webdav, WebDAV
const hook: Hook<'prerun'> = async function (opts) {
const { Command, argv } = opts;
const jsonFlag = argv.includes('--json');
const debugFlag = argv.includes('--debug');

const commandsToSkipNames = CommandsToSkip.map((command) => command.name?.toLowerCase()).filter(Boolean);
const commandsToSkipIds = CommandsToSkip.map((command) => command.id?.toLowerCase()).filter(Boolean);
Expand All @@ -42,6 +43,7 @@ const hook: Hook<'prerun'> = async function (opts) {
command: Command.id,
logReporter: this.log.bind(this),
jsonFlag,
debugMode: debugFlag,
});
opts.context.exit(1);
}
Expand Down
Loading
Loading