@xen-orchestra/rest-api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "author": {
3
+ "name": "Vates SAS",
4
+ "url": "https://vates.fr"
5
+ },
6
+ "main": "./dist/index.mjs",
7
+ "name": "@xen-orchestra/rest-api",
8
+ "homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/rest-api",
9
+ "version": "0.1.0",
10
+ "description": "REST API to manage your XOA",
11
+ "license": "AGPL-3.0-or-later",
12
+ "private": false,
13
+ "type": "module",
14
+ "engines": {
15
+ "node": ">=20.18"
16
+ },
17
+ "scripts": {
18
+ "build": "tsoa spec-and-routes && tsc",
19
+ "dev": "tsoa spec-and-routes && tsc --watch",
20
+ "prepublishOnly": "npm run build",
21
+ "postversion": "npm publish --access public"
22
+ },
23
+ "devDependencies": {
24
+ "@eslint/js": "^9.19.0",
25
+ "@types/express": "^5.0.0",
26
+ "@types/swagger-ui-express": "^4.1.7",
27
+ "typescript": "~5.6.3",
28
+ "typescript-eslint": "^8.23.0"
29
+ },
30
+ "dependencies": {
31
+ "@vates/types": "^0.0.0",
32
+ "@xen-orchestra/log": "^0.7.1",
33
+ "complex-matcher": "^0.7.1",
34
+ "inversify": "^6.2.2",
35
+ "inversify-binding-decorators": "^4.0.0",
36
+ "lodash": "^4.17.21",
37
+ "swagger-ui-express": "^5.0.1",
38
+ "tsoa": "^6.6.0",
39
+ "xo-common": "^0.8.0"
40
+ },
41
+ "bugs": "https://github.com/vatesfr/xen-orchestra/issues",
42
+ "repository": {
43
+ "directory": "@xen-orchestra/rest-api",
44
+ "type": "git",
45
+ "url": "https://github.com/vatesfr/xen-orchestra.git"
46
+ }
47
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist",
4
+ "rootDir": "./src",
5
+
6
+ "strict": true,
7
+ "module": "ESNext",
8
+ "moduleResolution": "bundler",
9
+ "target": "ES2023",
10
+ "skipLibCheck": true,
11
+ "noImplicitAny": false, // otherwise it will throw an error when importing packages without type definition
12
+
13
+ /* Experimental options */
14
+ "experimentalDecorators": true // used by the TSOA framework
15
+ },
16
+ "include": ["./src/**/*"],
17
+ "exclude": ["./node_modules", "./dist"]
18
+ }
package/tsoa.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "entryFile": "./src/index.mts",
3
+ "noImplicitAdditionalProperties": "throw-on-extras",
4
+ "controllerPathGlobs": ["./src/**/*.controller.mts"],
5
+ "spec": {
6
+ "outputDirectory": "./open-api/spec",
7
+ "specVersion": 3,
8
+ "basePath": "/rest/v0",
9
+ "securityDefinitions": {
10
+ "token": {
11
+ "type": "apiKey",
12
+ "name": "authenticationToken",
13
+ "in": "cookie"
14
+ }
15
+ }
16
+ },
17
+ "routes": {
18
+ "routesDir": "./src/open-api/routes",
19
+ "esm": true,
20
+ "middleware": "express",
21
+ "basePath": "/rest/v0",
22
+ "authenticationModule": "./src/middlewares/authentication.middleware.mts",
23
+ "iocModule": "./src/ioc/ioc.mts"
24
+ }
25
+ }