@turboops/cli 1.0.0-dev.705 → 1.0.0-dev.707
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 +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -631,7 +631,8 @@ var apiClient = {
|
|
|
631
631
|
* Get project by slug (CLI endpoint)
|
|
632
632
|
*/
|
|
633
633
|
async getProject(slug) {
|
|
634
|
-
|
|
634
|
+
const prefix = this.isUsingProjectToken() ? "/project" : "/cli";
|
|
635
|
+
return this.request("GET", `${prefix}/deployment/projects/${slug}`);
|
|
635
636
|
},
|
|
636
637
|
/**
|
|
637
638
|
* Create a new project (CLI endpoint)
|
|
@@ -656,18 +657,20 @@ var apiClient = {
|
|
|
656
657
|
* Get environments (stages) for project (CLI endpoint)
|
|
657
658
|
*/
|
|
658
659
|
async getEnvironments(projectId) {
|
|
660
|
+
const prefix = this.isUsingProjectToken() ? "/project" : "/cli";
|
|
659
661
|
return this.request(
|
|
660
662
|
"GET",
|
|
661
|
-
|
|
663
|
+
`${prefix}/deployment/stages?projectId=${projectId}`
|
|
662
664
|
);
|
|
663
665
|
},
|
|
664
666
|
/**
|
|
665
667
|
* Get environment (stage) by slug (CLI endpoint)
|
|
666
668
|
*/
|
|
667
669
|
async getEnvironmentBySlug(projectId, slug) {
|
|
670
|
+
const prefix = this.isUsingProjectToken() ? "/project" : "/cli";
|
|
668
671
|
return this.request(
|
|
669
672
|
"GET",
|
|
670
|
-
|
|
673
|
+
`${prefix}/deployment/stages/${projectId}/${slug}`
|
|
671
674
|
);
|
|
672
675
|
},
|
|
673
676
|
/**
|