@turboops/cli 1.0.0-dev.610 → 1.0.0-dev.611
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 +52 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -664,6 +664,12 @@ var apiClient = {
|
|
|
664
664
|
async createStage(data) {
|
|
665
665
|
return this.request("POST", "/deployment/stages/simple", data);
|
|
666
666
|
},
|
|
667
|
+
/**
|
|
668
|
+
* Create a project token (for CI/CD)
|
|
669
|
+
*/
|
|
670
|
+
async createProjectToken(data) {
|
|
671
|
+
return this.request("POST", "/deployment/tokens/simple", data);
|
|
672
|
+
},
|
|
667
673
|
/**
|
|
668
674
|
* Get deployment-ready servers
|
|
669
675
|
*/
|
|
@@ -1706,6 +1712,18 @@ async function createNewProject(slug, verbose = false) {
|
|
|
1706
1712
|
process.exit(13 /* API_ERROR */);
|
|
1707
1713
|
}
|
|
1708
1714
|
logger.success(`Projekt "${newProject.name}" wurde erstellt!`);
|
|
1715
|
+
if (newProject.projectToken) {
|
|
1716
|
+
logger.newline();
|
|
1717
|
+
logger.header("CI/CD Projekt-Token");
|
|
1718
|
+
console.log(chalk5.yellow.bold(" WICHTIG: Diesen Token jetzt kopieren - er wird nur einmal angezeigt!"));
|
|
1719
|
+
logger.newline();
|
|
1720
|
+
console.log(chalk5.cyan(" Token: ") + chalk5.green.bold(newProject.projectToken));
|
|
1721
|
+
logger.newline();
|
|
1722
|
+
console.log(chalk5.dim(" Diesen Token als CI/CD Secret hinterlegen:"));
|
|
1723
|
+
console.log(chalk5.dim(" \u2192 GitLab: Settings \u2192 CI/CD \u2192 Variables \u2192 TURBOOPS_TOKEN"));
|
|
1724
|
+
console.log(chalk5.dim(" \u2192 GitHub: Settings \u2192 Secrets \u2192 Actions \u2192 TURBOOPS_TOKEN"));
|
|
1725
|
+
logger.newline();
|
|
1726
|
+
}
|
|
1709
1727
|
configService.setProject(newProject.slug);
|
|
1710
1728
|
logger.newline();
|
|
1711
1729
|
const { shouldCreateStage } = await prompts2({
|
|
@@ -1877,30 +1895,40 @@ async function showFinalSummary(project) {
|
|
|
1877
1895
|
console.log(` ${chalk5.bold(env.slug)} - ${env.name} (${env.type})`);
|
|
1878
1896
|
}
|
|
1879
1897
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
"
|
|
1900
|
-
"
|
|
1901
|
-
|
|
1902
|
-
"
|
|
1903
|
-
|
|
1898
|
+
if (project.projectToken) {
|
|
1899
|
+
logger.newline();
|
|
1900
|
+
logger.header("N\xE4chste Schritte");
|
|
1901
|
+
logger.list([
|
|
1902
|
+
`Token als CI/CD Secret hinterlegen (${chalk5.bold("TURBOOPS_TOKEN")})`,
|
|
1903
|
+
"Pipeline committen und pushen",
|
|
1904
|
+
"`turbo status` ausf\xFChren um Deployments zu pr\xFCfen"
|
|
1905
|
+
]);
|
|
1906
|
+
} else {
|
|
1907
|
+
logger.newline();
|
|
1908
|
+
logger.header("CI/CD Token einrichten");
|
|
1909
|
+
console.log(chalk5.cyan(" 1. Projekt-Token erstellen:"));
|
|
1910
|
+
console.log(` ${chalk5.dim("\u2192")} TurboOps Web-UI \xF6ffnen`);
|
|
1911
|
+
console.log(` ${chalk5.dim("\u2192")} Projekt "${project.name}" ausw\xE4hlen`);
|
|
1912
|
+
console.log(` ${chalk5.dim("\u2192")} Settings \u2192 Tokens \u2192 "Neuer Token"`);
|
|
1913
|
+
logger.newline();
|
|
1914
|
+
console.log(chalk5.cyan(" 2. Token als CI/CD Secret hinterlegen:"));
|
|
1915
|
+
console.log(chalk5.dim(" GitLab:"));
|
|
1916
|
+
console.log(` ${chalk5.dim("\u2192")} Settings \u2192 CI/CD \u2192 Variables`);
|
|
1917
|
+
console.log(` ${chalk5.dim("\u2192")} Variable: ${chalk5.bold("TURBOOPS_TOKEN")} = <dein-token>`);
|
|
1918
|
+
console.log(` ${chalk5.dim("\u2192")} Flags: Protected, Masked`);
|
|
1919
|
+
logger.newline();
|
|
1920
|
+
console.log(chalk5.dim(" GitHub:"));
|
|
1921
|
+
console.log(` ${chalk5.dim("\u2192")} Settings \u2192 Secrets and variables \u2192 Actions`);
|
|
1922
|
+
console.log(` ${chalk5.dim("\u2192")} New repository secret: ${chalk5.bold("TURBOOPS_TOKEN")}`);
|
|
1923
|
+
logger.newline();
|
|
1924
|
+
logger.header("N\xE4chste Schritte");
|
|
1925
|
+
logger.list([
|
|
1926
|
+
"Projekt-Token in TurboOps erstellen (siehe oben)",
|
|
1927
|
+
"Token als CI/CD Secret hinterlegen",
|
|
1928
|
+
"Pipeline committen und pushen",
|
|
1929
|
+
"`turbo status` ausf\xFChren um Deployments zu pr\xFCfen"
|
|
1930
|
+
]);
|
|
1931
|
+
}
|
|
1904
1932
|
}
|
|
1905
1933
|
async function offerAiAssistance(projectSlug, projectId, verbose = false) {
|
|
1906
1934
|
const detection = await detectProjectConfig();
|