kintone/js-sdk

dts-gen does not output with absolute path

Closed this issue · 0 comments

Target Package

  • @kintone/dts-gen 6.1.9

Environment

  • Operating System: macOS
  • Browser: N/A
  • Node.js version: v14.19.1

Current Behavior

When I try to genearte a type definition file by an absolute path:

$ kintone-dts-gen \
    --base-url https://******.kintone.com --app-id 1 --username ******** --password ******** \
    -o /tmp/my-fields.d.ts

I expect dts-gen generate a type definition on /tmp/my-fileds.d.ts. But actually it is placed on the relative path of the current directory:

$ ls /tmp/my-fields.d.ts
ls: cannot access '/tmp/my-fields.d.ts': No such file or directory

$ ls ./tmp/my-fields.d.ts 
./tmp/my-fields.d.ts

Expected Behavior

When user specify a path starting with /... on most commonly used commands, the command output on absolute path.
Consider behaviors on not only *nix OS such as Linux and macOS, but also Windows.