corsinvest / cv4pve-api-javascript Goto Github PK
View Code? Open in Web Editor NEWProxmox VE Client API JavaScript
Home Page: https://www.corsinvest.it/cv4pve
License: GNU General Public License v3.0
Proxmox VE Client API JavaScript
Home Page: https://www.corsinvest.it/cv4pve
License: GNU General Public License v3.0
i downloaded the file in src/index.js, and tried to load it in my normal file and got the following output
it should have loaded up and excecuted, all i have is
const pve = require("./src/index")
in my file
C:\Users\my username\Downloads\carea\src\index.js:198
async #execute(method, resource, parameters) {
^
SyntaxError: Unexpected token '('
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\ryan\Downloads\carea\index.js:2:13)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
7.0-11
what
No response
Windows
First of all, thank you for developing such a useful library for everyone to use. I find it very convenient.
I encountered a problem where PVE could not resolve the Token when using APIToken. I found that it was on line 229 of src/index.js
if (this.apiToken != '') { headers['Authorization'] = "PVEAPIToken " + this.apiToken; }
There is a missing =
after PVEAPIToken
.
Currently, I can use it by adding an =
in front of it, as follows:
client.apiToken = '=' + this.configService.get('PVE_API_TOKEN');
Therefore, changing PVEAPIToken
to PVEAPIToken=
should make it easier for users to use.
I was reviewing the codebase as I was interested in using this for a personal project. I was wondering if you would be open to me creating a PR to separate everything within the index.js file into separate more appropriate files?
This will certainly help with readability and for future contributors.
I would have went ahead and done the change but figured I would ask beforehand, as I realised a lot of the code may be automatically generated, given its 17k lines.
Right now the project has great autocompletion for creating the requests. But not for responses from the API.
This change would make the package more usable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.