@lukoweb/apitogo 0.2.12 → 0.2.14
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/cli/cli.js +6 -8
- package/package.json +1 -1
package/dist/cli/cli.js
CHANGED
|
@@ -9663,7 +9663,7 @@ import {
|
|
|
9663
9663
|
// package.json
|
|
9664
9664
|
var package_default = {
|
|
9665
9665
|
name: "@lukoweb/apitogo",
|
|
9666
|
-
version: "0.2.
|
|
9666
|
+
version: "0.2.14",
|
|
9667
9667
|
type: "module",
|
|
9668
9668
|
sideEffects: [
|
|
9669
9669
|
"**/*.css",
|
|
@@ -28792,11 +28792,9 @@ var ProjectCreateError = class extends ApitogoError {
|
|
|
28792
28792
|
}
|
|
28793
28793
|
};
|
|
28794
28794
|
function modulesForConfig(config2) {
|
|
28795
|
-
return [
|
|
28796
|
-
...config2.portal && config2.portal.enabled !== false ? ["dev-portal"] : [],
|
|
28797
|
-
...config2.gateway && config2.gateway.enabled !== false ? ["apihub"] : []
|
|
28798
|
-
];
|
|
28795
|
+
return config2.portal && config2.portal.enabled !== false ? ["dev-portal"] : [];
|
|
28799
28796
|
}
|
|
28797
|
+
var hostsAnything = (config2) => config2.portal && config2.portal.enabled !== false || config2.gateway && config2.gateway.enabled !== false;
|
|
28800
28798
|
async function createProjectV2(options, deps) {
|
|
28801
28799
|
const { config: config2, resolved } = loadConfigV2(options.dir);
|
|
28802
28800
|
if (resolved.project.id) {
|
|
@@ -28807,10 +28805,10 @@ async function createProjectV2(options, deps) {
|
|
|
28807
28805
|
);
|
|
28808
28806
|
}
|
|
28809
28807
|
const modules = modulesForConfig(config2);
|
|
28810
|
-
if (
|
|
28808
|
+
if (!hostsAnything(config2)) {
|
|
28811
28809
|
throw new ProjectCreateError(
|
|
28812
28810
|
"NOTHING_TO_HOST",
|
|
28813
|
-
"No enabled service needs
|
|
28811
|
+
"No enabled service needs a project.",
|
|
28814
28812
|
"Enable the portal or the gateway first (`apitogo add portal`)."
|
|
28815
28813
|
);
|
|
28816
28814
|
}
|
|
@@ -28904,7 +28902,7 @@ async function createLinkedProject(argv, dir) {
|
|
|
28904
28902
|
return;
|
|
28905
28903
|
}
|
|
28906
28904
|
printDiagnosticsToConsole(
|
|
28907
|
-
`Project ${result.projectName} (${result.projectId}) is ready on the free plan with: ${result.modules.join(", ")}.`
|
|
28905
|
+
`Project ${result.projectName} (${result.projectId}) is ready on the free plan${result.modules.length > 0 ? ` with: ${result.modules.join(", ")}` : " (the gateway is created by `apitogo deploy`)"}.`
|
|
28908
28906
|
);
|
|
28909
28907
|
printResultToConsole(
|
|
28910
28908
|
"The folder is linked. Run `apitogo deploy` to publish."
|