Compare commits
No commits in common. "87e05ff637a8e96c74f8d57a93f5fd51a4f8a9e7" and "7238275835a5f53ee7fc86ad8de4cd79e1f9a2b1" have entirely different histories.
87e05ff637
...
7238275835
20
README.md
20
README.md
@ -5,25 +5,7 @@ The official library for the LfK [backend server](https://git.odit.services/lfk/
|
|||||||
Automagicly™ generated by [openapi-typescript-codegen](https://www.npmjs.com/package/openapi-typescript-codegen)
|
Automagicly™ generated by [openapi-typescript-codegen](https://www.npmjs.com/package/openapi-typescript-codegen)
|
||||||
|
|
||||||
## 🛠 Building
|
## 🛠 Building
|
||||||
|
Get's automagicly™ build by drone for every new backend release.
|
||||||
### Setup ⬇️
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://git.odit.services/lfk/lfk-client-js.git
|
|
||||||
cd lfk-client-js
|
|
||||||
pnpm i
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build 🔨
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm update:openapi # Update the openapi.json file
|
|
||||||
pnpm build # Build the project
|
|
||||||
pnpm release # Bump and release to npm
|
|
||||||
|
|
||||||
# Or just do it all in one command
|
|
||||||
pnpm update:auto
|
|
||||||
```
|
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
|
20
package.json
20
package.json
@ -25,10 +25,7 @@
|
|||||||
"build:prepare": "rimraf ./lib ./dist",
|
"build:prepare": "rimraf ./lib ./dist",
|
||||||
"build:lib": "openapi --input ./openapi.json --output ./lib --client fetch",
|
"build:lib": "openapi --input ./openapi.json --output ./lib --client fetch",
|
||||||
"build:compile": "tsc",
|
"build:compile": "tsc",
|
||||||
"build:cleanup": "rimraf ./lib",
|
"build:cleanup": "rimraf ./lib"
|
||||||
"update:openapi": "rimraf ./openapi.json && node ./scripts/getliveopenapi.js",
|
|
||||||
"update:auto": "npm run update:openapi && npm run build && npm run release",
|
|
||||||
"release": "release-it"
|
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://git.odit.services/lfk/lfk-client-js/issues"
|
"url": "https://git.odit.services/lfk/lfk-client-js/issues"
|
||||||
@ -36,22 +33,7 @@
|
|||||||
"homepage": "https://git.odit.services/lfk/lfk-client-js/",
|
"homepage": "https://git.odit.services/lfk/lfk-client-js/",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"openapi-typescript-codegen": "0.7.0",
|
"openapi-typescript-codegen": "0.7.0",
|
||||||
"release-it": "17.10.0",
|
|
||||||
"rimraf": "6.0.1",
|
"rimraf": "6.0.1",
|
||||||
"typescript": "4.9.5"
|
"typescript": "4.9.5"
|
||||||
},
|
|
||||||
"release-it": {
|
|
||||||
"git": {
|
|
||||||
"commit": true,
|
|
||||||
"requireCleanWorkingDir": false,
|
|
||||||
"commitMessage": "chore(release): ${version}",
|
|
||||||
"push": true,
|
|
||||||
"tag": true,
|
|
||||||
"tagName": "${version}",
|
|
||||||
"tagAnnotation": "${version}"
|
|
||||||
},
|
|
||||||
"npm": {
|
|
||||||
"publish": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
1835
pnpm-lock.yaml
generated
1835
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,27 +0,0 @@
|
|||||||
const https = require('https');
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const url = 'https://run.lauf-fuer-kaya.de/api/docs/openapi.json';
|
|
||||||
const output = 'openapi.json';
|
|
||||||
|
|
||||||
https.get(url, (res) => {
|
|
||||||
if (res.statusCode !== 200) {
|
|
||||||
console.error(`Request Failed. Status Code: ${res.statusCode}`);
|
|
||||||
res.resume();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let data = '';
|
|
||||||
res.on('data', chunk => data += chunk);
|
|
||||||
res.on('end', () => {
|
|
||||||
fs.writeFile(output, data, (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.error('Error writing file:', err);
|
|
||||||
} else {
|
|
||||||
console.log(`Saved latest OpenAPI JSON to ${output}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).on('error', (e) => {
|
|
||||||
console.error(`Got error: ${e.message}`);
|
|
||||||
});
|
|
Loading…
x
Reference in New Issue
Block a user