olbed-cli 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -43,12 +43,8 @@ runMain(defineCommand({
43
43
  default: false
44
44
  }
45
45
  },
46
- async run({ args, rawArgs }) {
47
- const filePaths = [];
48
- for (const arg of rawArgs) {
49
- if (arg.startsWith("--") || arg.startsWith("-")) break;
50
- if (arg !== "upload") filePaths.push(arg);
51
- }
46
+ async run({ args }) {
47
+ const filePaths = args._;
52
48
  if (filePaths.length === 0) {
53
49
  console.error("✗ No files specified");
54
50
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olbed-cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "CLI tool for OpenList EdgeOne image hosting service",
5
5
  "bin": {
6
6
  "olbed-cli": "./dist/index.mjs"
package/src/index.ts CHANGED
@@ -37,17 +37,9 @@ const uploadCommand = defineCommand({
37
37
  default: false,
38
38
  },
39
39
  },
40
- async run({ args, rawArgs }) {
41
- // Get all file paths from raw arguments (everything before the first flag)
42
- const filePaths: string[] = [];
43
- for (const arg of rawArgs) {
44
- if (arg.startsWith("--") || arg.startsWith("-")) {
45
- break;
46
- }
47
- if (arg !== "upload") {
48
- filePaths.push(arg);
49
- }
50
- }
40
+ async run({ args }) {
41
+ // Parse file paths - collect all non-flag arguments after 'upload'
42
+ const filePaths: string[] = args._;
51
43
 
52
44
  if (filePaths.length === 0) {
53
45
  console.error("✗ No files specified");