in src/nodes/server/hf-hub-login.ts [137:162]
async runWithInputs(inputs: Inputs) {
const { apikey } = inputs;
let _apikey: string | undefined;
if (this.oauthResult && typeof this.oauthResult === "object") {
_apikey = this.oauthResult?.accessToken;
}
if (apikey) {
_apikey = apikey.trim();
}
if (!_apikey) {
this.dispatchEvent(
new CustomEvent("outputs", {
detail: {
error: {
title: "Error",
message: "No API Key provided",
},
},
})
);
return;
}
this.dispatchEvent(
new CustomEvent("outputs", { detail: { apikey: _apikey } })
);
}