JS Interface fails without Error
khrome83 opened this issue · 2 comments
khrome83 commented
I am trying to use the JS interface, but I get a failure without any error.
const emitter = degit(args.repo, {
cache: false,
force: true,
verbose: true,
});
In this case args.repo
is a valid user/repo
path for GitHub. I can validate it works by running the CLI degit user/repo
without any issue.
Adding the following results in zero messaging being displayed.
emitter.on('info', (info: DegitMessage) => {
console.log(info.message);
});
emitter.on('warn', (info: DegitMessage) => {
console.log(info.message);
});
Any code below the emitter seems to work, so it's not killing the file processing, it just does nothing.
DegitMessage is just a
ts
interface I made.
When outputting the emitter to the console, I get the following -
Degit {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
src: 'user/repo',
cache: false,
force: true,
verbose: true,
proxy: undefined,
repo:
{ site: 'github',
user: 'user',
name: 'repo',
ref: 'master',
url: 'https://github.com/user/repo',
ssh: 'git@github.com:user/repo',
subdir: undefined,
mode: 'tar' },
mode: 'tar',
_hasStashed: false,
directiveActions:
{ clone: [AsyncFunction: clone],
remove: [Function: bound remove] } }
Rich-Harris commented
Can you create a repro?
keerthivasan-r commented
@khrome83 What do you mean by JS interface? Javascript doesn't have Interfaces, AFAIK