New:Socket for Asana Is Now Available.Learn more
Get Started

eod-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eod-cli - npm Package Compare versions

Comparing version
0.1.0
to
0.2.0
+6
-3
dist/index.mjs

@@ -5,2 +5,7 @@ #!/usr/bin/env node

import { cac } from "cac";
//#region src/command.ts
function registerUploadCommand(cli, action) {
return cli.command("[...files]", "Upload image files to edge-onedrive image hosting").option("--host <host>", "edge-onedrive upload host, for example https://example.com").option("--key <key>", "edge-onedrive API key or access token").option("--keepName", "keep original file names").option("--prefix <prefix>", "public URL prefix for output links, defaults to --host").example("eod-cli --host example.com --key sk_xxx image.png").example("eod-cli --host https://example.com --key sk_xxx --prefix https://cdn.example.com --keepName a.png b.jpg").action(action);
}
//#endregion
//#region src/index.ts

@@ -50,6 +55,4 @@ const cli = cac("eod-cli");

}
cli.command("[files...]", "Upload image files to edge-onedrive image hosting").option("--host <host>", "edge-onedrive upload host, for example https://example.com").option("--key <key>", "edge-onedrive API key or access token").option("--keepName", "keep original file names").option("--prefix <prefix>", "public URL prefix for output links, defaults to --host").example("eod-cli --host example.com --key sk_xxx image.png").example("eod-cli --host https://example.com --key sk_xxx --prefix https://cdn.example.com --keepName a.png b.jpg").action(async (...args) => {
registerUploadCommand(cli, async (files, options) => {
try {
const options = args.at(-1);
const files = args.slice(0, -1);
if (!options.key) throw new Error("--key is required");

@@ -56,0 +59,0 @@ if (!files.length) throw new Error("At least one file is required");

{
"name": "eod-cli",
"version": "0.1.0",
"version": "0.2.0",
"private": false,

@@ -23,10 +23,12 @@ "type": "module",

"dependencies": {
"cac": "^6.7.14"
"cac": "^7.0.0"
},
"devDependencies": {
"bumpp": "^11.1.0",
"tsdown": "^0.22.3"
"tsdown": "^0.22.14",
"vitest": "^4.1.10"
},
"scripts": {
"build": "tsdown",
"test": "vitest run",
"tc": "tsc --noEmit --skipLibCheck",

@@ -33,0 +35,0 @@ "prepublish": "pnpm build",