question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript declarations

See original GitHub issue

Describe the problem you’d like to have solved

There are no TypeScript declarations for this package! We want to use it programmatically with TypeScript but this is difficult without types.

Describe the ideal solution

It would be nice to include declarations alongside the npm package, or they can be added to https://github.com/DefinitelyTyped/DefinitelyTyped under @types/auth0-deploy-cli

Alternatives and current work-arounds

Currently, we just have declare module 'auth0-deploy-cli'; which is basically just turning off type-checking for the library

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willveddcommented, Apr 15, 2022

Good news folks, this has been added in our 7.8.0 release! I tested this quite a bit and believe it to cover most folks’ use cases, but it may not be 100% perfect. Would be great to have folks give it a go and provide some feedback.

Samples:

import { dump, deploy } from 'auth0-deploy-cli';

await dump({
      output_folder: "./output",
      format: "yaml",
      config: {
        AUTH0_DOMAIN: "<YOUR_DOMAIN>",
        AUTH0_CLIENT_ID: "<YOUR_CLIENT_ID>",
        AUTH0_CLIENT_SECRET: "<YOUR_CLIENT_SECRET>"
   }
});

and

import { dump, deploy } from 'auth0-deploy-cli';

await deploy({
      input_file: "./output/tenant.yaml",
      config: {
        AUTH0_DOMAIN: "<YOUR_DOMAIN>",
        AUTH0_CLIENT_ID: "<YOUR_CLIENT_ID>",
        AUTH0_CLIENT_SECRET: "<YOUR_CLIENT_SECRET>"
    }
});

I’m going to close but please feel empowered to provide feedback regarding refinement and fixes with new issues.

1reaction
mikestopcontinuescommented, Apr 14, 2021

Ditto here. Using it programmatically helps me keep a bunch of params in sync across aws-cdk, vercel env vars, paddle products, and auth0 config. I’ve got types for everything else, either because they’re provided or because I typed the API endpoints I use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Introduction - TypeScript
The Declaration Files section is designed to teach you how to write a high-quality TypeScript Declaration File. We need to assume basic familiarity...
Read more >
A quick introduction to “Type Declaration” files and adding ...
In this lesson, we are going to take a closer look at type declaration files which are one of the key ingredients of...
Read more >
TypeScript — Type Declaration Files | by Makesh Kumar
Type declaration files are the files with d.ts extension, where types were declared via interface or type . These declaration files have no...
Read more >
Writing Declaration Files for @types - TypeScript
Declaration files, if you're not familiar, are just files that describe the shape of an existing JavaScript codebase to TypeScript. By using ...
Read more >
Declaration Files | The TypeScript Workshop
Traditionally, declaration files are kept in their own directory called types/ and are then imported by the modules that they are defining. It's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found