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

Update do-vue to fix template generation #52

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 2 additions & 131 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"dependencies": {
"do-bulma": "github:do-community/do-bulma",
"do-vue": "github:do-community/do-vue",
"node-fetch": "^3.3.2",
"pretty-checkbox-vue": "^1.1.9",
"vue": "^3.4.15"
},
Expand Down
8 changes: 3 additions & 5 deletions src/build/get.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 DigitalOcean
Copyright 2024 DigitalOcean

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -18,18 +18,16 @@ const fs = require('fs');
const path = require('path');
const imageFilter = require('./imageFilter');

const fetch = import('node-fetch');

let token = process.env.DIGITALOCEAN_TOKEN;
if (fs.existsSync(path.join(__dirname, '..', '..', 'config.js'))) {
const config = require('../../config');
token = config.token;
}

const get = async url => {
const res = await fetch.then(({ default: run }) => run(url, {
const res = await fetch(url, {
headers: { Authorization: `Bearer ${token}` },
}));
});
if (!res.ok) throw new Error(`Failed to fetch ${url}: ${res.status} ${res.statusText}`);
return await res.json();
};
Expand Down
Loading