I am trying to connect with the Jira REST api using Deno. My Library of choice is
This is my code.
//import { Version2Client } from "./node_modules/jira.js/src/index.ts";
import * as jira from "https://deno.land/x/[email protected]/src/index.ts";
const client = new Version2Client({
host: 'https://FFFFFF.atlassian.net',
authentication: {
basic: {
email: '[email protected]',
apiToken: 'FFFFFFFF',
},
},
});
async function main() {
const projects = await client.projects.getAllProjects();
console.log(projects);
}
main();
CodePudding user response:
jira.js
does not support Deno directly. But you can run it with NPM compatibility mode, for that, you'll need to replace your import to use npm:
specifier: npm:jira.js
import { Version2Client } from 'npm:jira.js';
const client = new Version2Client({
host: 'https://FFFFFF.atlassian.net',
authentication: {
basic: {
email: '[email protected]',
apiToken: 'FFFFFFFF',
},
},
});
// ...