Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dts-gen show unclear message when specifying invalid namespace #2096

Open
hung-cybo opened this issue May 19, 2023 · 0 comments
Open

dts-gen show unclear message when specifying invalid namespace #2096

hung-cybo opened this issue May 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@hung-cybo
Copy link
Contributor

Summary

Currently, when using dts-gen package with an invalid namespace (containing hyphen characters -), an unclear error message is shown.

Error: failed to fix lint errors on generated type definition file.
    at /Users/h000953/Development/js-sdk/packages/dts-gen/dist/templates/template.js:61:15
    at Generator.next (<anonymous>)
    at fulfilled (/Users/h000953/Development/js-sdk/packages/dts-gen/dist/templates/template.js:28:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Target Package

@kintone/dts-gen

Target Version

6.1.31

Reproduction

Run the following command:

$ kintone-dts-gen --base-url https://your_domain.com -u ****** -p ****** --app-id 1 --type-name SampleFields --namespace sample-fields

** Invalid namespace: sample-fields
** Valid namespace: sampleFields

Expected Behavior

Show a clear error message that relates to namespace.

For example: ERR: The namespace is invalid

Actual Behavior

Error: failed to fix lint errors on generated type definition file.
    at /Users/h000953/Development/js-sdk/packages/dts-gen/dist/templates/template.js:61:15
    at Generator.next (<anonymous>)
    at fulfilled (/Users/h000953/Development/js-sdk/packages/dts-gen/dist/templates/template.js:28:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Environment

System:
OS: macOS 13.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 3.44 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.5.1 - /usr/local/bin/npm
Browsers:
Chrome: 113.0.5672.126
Safari: 16.4

@hung-cybo hung-cybo added the bug Something isn't working label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant