@turboops/cli 1.0.0-dev.671 → 1.0.0-dev.683
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/index.js +29 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -549,7 +549,7 @@ var apiClient = {
|
|
|
549
549
|
}
|
|
550
550
|
const apiUrl = configService.getApiUrl();
|
|
551
551
|
try {
|
|
552
|
-
const response = await fetch(`${apiUrl}/
|
|
552
|
+
const response = await fetch(`${apiUrl}/project/validate-token`, {
|
|
553
553
|
method: "POST",
|
|
554
554
|
headers: { "Content-Type": "application/json" },
|
|
555
555
|
body: JSON.stringify({ token })
|
|
@@ -622,19 +622,19 @@ var apiClient = {
|
|
|
622
622
|
}
|
|
623
623
|
},
|
|
624
624
|
/**
|
|
625
|
-
* Get current user
|
|
625
|
+
* Get current user (CLI endpoint)
|
|
626
626
|
*/
|
|
627
627
|
async whoami() {
|
|
628
|
-
return this.request("GET", "/user/me");
|
|
628
|
+
return this.request("GET", "/cli/user/me");
|
|
629
629
|
},
|
|
630
630
|
/**
|
|
631
|
-
* Get project by slug
|
|
631
|
+
* Get project by slug (CLI endpoint)
|
|
632
632
|
*/
|
|
633
633
|
async getProject(slug) {
|
|
634
|
-
return this.request("GET", `/deployment/projects
|
|
634
|
+
return this.request("GET", `/cli/deployment/projects/${slug}`);
|
|
635
635
|
},
|
|
636
636
|
/**
|
|
637
|
-
* Create a new project
|
|
637
|
+
* Create a new project (CLI endpoint)
|
|
638
638
|
*/
|
|
639
639
|
async createProject(data) {
|
|
640
640
|
const payload = {
|
|
@@ -644,81 +644,81 @@ var apiClient = {
|
|
|
644
644
|
if (data.customer) payload.customer = data.customer;
|
|
645
645
|
if (data.description) payload.description = data.description;
|
|
646
646
|
if (data.repositoryUrl) payload.repositoryUrl = data.repositoryUrl;
|
|
647
|
-
return this.request("POST", "/deployment/projects
|
|
647
|
+
return this.request("POST", "/cli/deployment/projects", payload);
|
|
648
648
|
},
|
|
649
649
|
/**
|
|
650
|
-
* Get all customers (simplified list for selection)
|
|
650
|
+
* Get all customers (CLI endpoint - simplified list for selection)
|
|
651
651
|
*/
|
|
652
652
|
async getCustomers() {
|
|
653
|
-
return this.request("GET", "/
|
|
653
|
+
return this.request("GET", "/cli/customers");
|
|
654
654
|
},
|
|
655
655
|
/**
|
|
656
|
-
* Get environments (stages) for project
|
|
656
|
+
* Get environments (stages) for project (CLI endpoint)
|
|
657
657
|
*/
|
|
658
658
|
async getEnvironments(projectId) {
|
|
659
659
|
return this.request(
|
|
660
660
|
"GET",
|
|
661
|
-
`/deployment/stages?projectId=${projectId}`
|
|
661
|
+
`/cli/deployment/stages?projectId=${projectId}`
|
|
662
662
|
);
|
|
663
663
|
},
|
|
664
664
|
/**
|
|
665
|
-
* Get environment (stage) by slug
|
|
665
|
+
* Get environment (stage) by slug (CLI endpoint)
|
|
666
666
|
*/
|
|
667
667
|
async getEnvironmentBySlug(projectId, slug) {
|
|
668
668
|
return this.request(
|
|
669
669
|
"GET",
|
|
670
|
-
`/deployment/stages
|
|
670
|
+
`/cli/deployment/stages/${projectId}/${slug}`
|
|
671
671
|
);
|
|
672
672
|
},
|
|
673
673
|
/**
|
|
674
|
-
* Create a new stage
|
|
674
|
+
* Create a new stage (CLI endpoint)
|
|
675
675
|
*/
|
|
676
676
|
async createStage(data) {
|
|
677
|
-
return this.request("POST", "/deployment/stages
|
|
677
|
+
return this.request("POST", "/cli/deployment/stages", data);
|
|
678
678
|
},
|
|
679
679
|
/**
|
|
680
|
-
* Create a project token (for CI/CD)
|
|
680
|
+
* Create a project token (for CI/CD) (CLI endpoint)
|
|
681
681
|
*/
|
|
682
682
|
async createProjectToken(data) {
|
|
683
|
-
return this.request("POST", "/deployment/tokens
|
|
683
|
+
return this.request("POST", "/cli/deployment/tokens", data);
|
|
684
684
|
},
|
|
685
685
|
/**
|
|
686
|
-
* Get deployment-ready servers
|
|
686
|
+
* Get deployment-ready servers (CLI endpoint)
|
|
687
687
|
*/
|
|
688
688
|
async getDeploymentServers() {
|
|
689
|
-
return this.request("GET", "/
|
|
689
|
+
return this.request("GET", "/cli/servers");
|
|
690
690
|
},
|
|
691
691
|
/**
|
|
692
|
-
* Update project's detected configuration (partial update)
|
|
692
|
+
* Update project's detected configuration (partial update) (CLI endpoint)
|
|
693
693
|
*/
|
|
694
694
|
async updateProjectConfig(projectId, config) {
|
|
695
|
-
return this.request("PATCH", `/deployment/projects/${projectId}/config`, config);
|
|
695
|
+
return this.request("PATCH", `/cli/deployment/projects/${projectId}/config`, config);
|
|
696
696
|
},
|
|
697
697
|
/**
|
|
698
|
-
* Generate CI/CD pipeline configuration
|
|
698
|
+
* Generate CI/CD pipeline configuration (CLI endpoint)
|
|
699
699
|
*/
|
|
700
700
|
async generatePipeline(projectId, type) {
|
|
701
|
-
return this.request("GET", `/deployment/projects/${projectId}/pipeline/${type}`);
|
|
701
|
+
return this.request("GET", `/cli/deployment/projects/${projectId}/pipeline/${type}`);
|
|
702
702
|
},
|
|
703
703
|
/**
|
|
704
|
-
* Get required secrets for pipeline
|
|
704
|
+
* Get required secrets for pipeline (CLI endpoint)
|
|
705
705
|
*/
|
|
706
706
|
async getPipelineSecrets(projectId, type) {
|
|
707
|
-
return this.request("GET", `/deployment/projects/${projectId}/pipeline/${type}/secrets`);
|
|
707
|
+
return this.request("GET", `/cli/deployment/projects/${projectId}/pipeline/${type}/secrets`);
|
|
708
708
|
},
|
|
709
709
|
/**
|
|
710
|
-
* Trigger a deployment
|
|
710
|
+
* Trigger a deployment (Project Token endpoint for CI/CD)
|
|
711
711
|
*/
|
|
712
712
|
async deploy(stageId, imageTag) {
|
|
713
713
|
const body = { stage: stageId };
|
|
714
714
|
if (imageTag) body.imageTag = imageTag;
|
|
715
|
-
return this.request("POST", "/deployment/
|
|
715
|
+
return this.request("POST", "/project/deployment/deploy", body);
|
|
716
716
|
},
|
|
717
717
|
/**
|
|
718
|
-
* Get deployment status
|
|
718
|
+
* Get deployment status (Project Token endpoint for CI/CD)
|
|
719
719
|
*/
|
|
720
720
|
async getDeploymentStatus(deploymentId) {
|
|
721
|
-
return this.request("GET", `/deployment/
|
|
721
|
+
return this.request("GET", `/project/deployment/status/${deploymentId}`);
|
|
722
722
|
},
|
|
723
723
|
/**
|
|
724
724
|
* Wait for deployment to complete
|