caprover-api 0.0.16 → 0.0.18
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/dist/api/ApiManager.d.ts +5 -0
- package/dist/api/ApiManager.js +15 -0
- package/dist/models/OneClickAppDeploymentState.d.ts +6 -0
- package/dist/models/OneClickAppDeploymentState.js +2 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +2 -2
- package/src/api/ApiManager.ts +29 -0
- package/src/models/OneClickAppDeploymentState.ts +6 -0
- package/src/models/index.ts +1 -0
package/dist/api/ApiManager.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import LogsResponse from '../models/LogsResponse';
|
|
|
17
17
|
import { NetDataInfo } from '../models/NetDataInfo';
|
|
18
18
|
import NginxConfig from '../models/NginxConfig';
|
|
19
19
|
import OneClickAppDefinitionResponse from '../models/OneClickAppDefinitionResponse';
|
|
20
|
+
import OneClickAppDeploymentState from '../models/OneClickAppDeploymentState';
|
|
20
21
|
import OneClickAppRepositories from '../models/OneClickAppRepositories';
|
|
21
22
|
import OneClickAppResponse from '../models/OneClickAppResponse';
|
|
22
23
|
import { ProjectDefinition } from '../models/ProjectDefinition';
|
|
@@ -123,5 +124,9 @@ export default class ApiManager {
|
|
|
123
124
|
addNewCustomOneClickRepo(repositoryUrl: string): Promise<void>;
|
|
124
125
|
deleteCustomOneClickRepo(repositoryUrl: string): Promise<void>;
|
|
125
126
|
addDockerNode(nodeType: string, privateKey: string, remoteNodeIpAddress: string, sshPort: string, sshUser: string, captainIpAddress: string): Promise<void>;
|
|
127
|
+
startOneClickAppDeploy(template: any, values?: any): Promise<{
|
|
128
|
+
jobId: string;
|
|
129
|
+
}>;
|
|
130
|
+
getOneClickAppDeployProgress(jobId: string): Promise<OneClickAppDeploymentState>;
|
|
126
131
|
executeGenericApiCommand(verb: 'GET' | 'POST', endpoint: string, data: any): Promise<any>;
|
|
127
132
|
}
|
package/dist/api/ApiManager.js
CHANGED
|
@@ -507,6 +507,21 @@ class ApiManager {
|
|
|
507
507
|
captainIpAddress,
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
|
+
startOneClickAppDeploy(template, values) {
|
|
511
|
+
const http = this.http;
|
|
512
|
+
return Promise.resolve() //
|
|
513
|
+
.then(http.fetch(http.POST, '/user/oneclick/deploy', {
|
|
514
|
+
template,
|
|
515
|
+
values,
|
|
516
|
+
}));
|
|
517
|
+
}
|
|
518
|
+
getOneClickAppDeployProgress(jobId) {
|
|
519
|
+
const http = this.http;
|
|
520
|
+
return Promise.resolve() //
|
|
521
|
+
.then(http.fetch(http.GET, '/user/oneclick/deploy/progress', {
|
|
522
|
+
jobId,
|
|
523
|
+
}));
|
|
524
|
+
}
|
|
510
525
|
executeGenericApiCommand(verb, endpoint, data) {
|
|
511
526
|
const http = this.http;
|
|
512
527
|
return Promise.resolve() //
|
package/dist/models/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './LogsResponse';
|
|
|
30
30
|
export * from './NetDataInfo';
|
|
31
31
|
export * from './NginxConfig';
|
|
32
32
|
export * from './OneClickAppDefinitionResponse';
|
|
33
|
+
export * from './OneClickAppDeploymentState';
|
|
33
34
|
export * from './OneClickAppRepositories';
|
|
34
35
|
export * from './OneClickAppResponse';
|
|
35
36
|
export * from './OtherTypes';
|
package/dist/models/index.js
CHANGED
|
@@ -46,6 +46,7 @@ __exportStar(require("./LogsResponse"), exports);
|
|
|
46
46
|
__exportStar(require("./NetDataInfo"), exports);
|
|
47
47
|
__exportStar(require("./NginxConfig"), exports);
|
|
48
48
|
__exportStar(require("./OneClickAppDefinitionResponse"), exports);
|
|
49
|
+
__exportStar(require("./OneClickAppDeploymentState"), exports);
|
|
49
50
|
__exportStar(require("./OneClickAppRepositories"), exports);
|
|
50
51
|
__exportStar(require("./OneClickAppResponse"), exports);
|
|
51
52
|
__exportStar(require("./OtherTypes"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caprover-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "API client for CapRover",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
13
|
"build": "rm -rf ./dist && npm run tslint && npx tsc && chmod +x ./dist -R",
|
|
14
14
|
"dev": "rm -rf ./dist && npx tsc && node ./dist/example.js",
|
|
15
|
-
"generate-barrels": "barrelsby --directory src/models"
|
|
15
|
+
"generate-barrels": "rm ./src/models/index.ts && barrelsby --directory src/models"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"caprover",
|
package/src/api/ApiManager.ts
CHANGED
|
@@ -22,6 +22,7 @@ import LogsResponse from '../models/LogsResponse'
|
|
|
22
22
|
import { NetDataInfo } from '../models/NetDataInfo'
|
|
23
23
|
import NginxConfig from '../models/NginxConfig'
|
|
24
24
|
import OneClickAppDefinitionResponse from '../models/OneClickAppDefinitionResponse'
|
|
25
|
+
import OneClickAppDeploymentState from '../models/OneClickAppDeploymentState'
|
|
25
26
|
import OneClickAppRepositories from '../models/OneClickAppRepositories'
|
|
26
27
|
import OneClickAppResponse from '../models/OneClickAppResponse'
|
|
27
28
|
import { ProjectDefinition } from '../models/ProjectDefinition'
|
|
@@ -862,6 +863,34 @@ export default class ApiManager {
|
|
|
862
863
|
)
|
|
863
864
|
}
|
|
864
865
|
|
|
866
|
+
startOneClickAppDeploy(
|
|
867
|
+
template: any,
|
|
868
|
+
values?: any
|
|
869
|
+
): Promise<{ jobId: string }> {
|
|
870
|
+
const http = this.http
|
|
871
|
+
|
|
872
|
+
return Promise.resolve() //
|
|
873
|
+
.then(
|
|
874
|
+
http.fetch(http.POST, '/user/oneclick/deploy', {
|
|
875
|
+
template,
|
|
876
|
+
values,
|
|
877
|
+
})
|
|
878
|
+
)
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
getOneClickAppDeployProgress(
|
|
882
|
+
jobId: string
|
|
883
|
+
): Promise<OneClickAppDeploymentState> {
|
|
884
|
+
const http = this.http
|
|
885
|
+
|
|
886
|
+
return Promise.resolve() //
|
|
887
|
+
.then(
|
|
888
|
+
http.fetch(http.GET, '/user/oneclick/deploy/progress', {
|
|
889
|
+
jobId,
|
|
890
|
+
})
|
|
891
|
+
)
|
|
892
|
+
}
|
|
893
|
+
|
|
865
894
|
executeGenericApiCommand(
|
|
866
895
|
verb: 'GET' | 'POST',
|
|
867
896
|
endpoint: string,
|
package/src/models/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * from './LogsResponse'
|
|
|
31
31
|
export * from './NetDataInfo'
|
|
32
32
|
export * from './NginxConfig'
|
|
33
33
|
export * from './OneClickAppDefinitionResponse'
|
|
34
|
+
export * from './OneClickAppDeploymentState'
|
|
34
35
|
export * from './OneClickAppRepositories'
|
|
35
36
|
export * from './OneClickAppResponse'
|
|
36
37
|
export * from './OtherTypes'
|