opticore-installer 1.2.49 → 1.2.50
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.cjs +9 -7
- package/dist/index.js +9 -7
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -100,11 +100,11 @@ var CGeneralMsg = {
|
|
|
100
100
|
// src/core/abstractions/enums/constants/starterOptions.constant.ts
|
|
101
101
|
var CStarterOptions = [
|
|
102
102
|
// { label: "RestFull API complete project", value: ["complete_restfull_project"], hint: "Everything you'll need to build a server render web project" },
|
|
103
|
-
{ label: "Web project", value: ["web_project"], hint: "Everything you'll need to build a server render web project" },
|
|
104
|
-
{ label: "Skeleton project", value: ["skeleton_project"], hint: "A lean OptiCoreJS application with the framework core" },
|
|
105
|
-
{ label: CGeneralMsg.starterOptionsRestFullLabel, value: [CGeneralMsg.starterOptionsRestFullValue], hint: CGeneralMsg.starterOptionsRestFullHint }
|
|
103
|
+
// { label: "Web project", value: ["web_project"], hint: "Everything you'll need to build a server render web project" }, // no template repo yet, disabled
|
|
104
|
+
// { label: "Skeleton project", value: ["skeleton_project"], hint: "A lean OptiCoreJS application with the framework core" }, // no template repo yet, disabled
|
|
105
|
+
{ label: CGeneralMsg.starterOptionsRestFullLabel, value: [CGeneralMsg.starterOptionsRestFullValue], hint: CGeneralMsg.starterOptionsRestFullHint }
|
|
106
106
|
// { label: "Complete restFull API project", value: ["complete_api_restfull_project"], hint: "OptiCoreJS app tailored to create a complete RestFull APIs" },
|
|
107
|
-
{ label: "standard project", value: ["standard_project"], hint: "OptiCoreJS app tailored to create a standard Web project" }
|
|
107
|
+
// { label: "standard project", value: ["standard_project"], hint: "OptiCoreJS app tailored to create a standard Web project" }, // no template repo yet, disabled
|
|
108
108
|
];
|
|
109
109
|
|
|
110
110
|
// src/presentations/starter/starterOptions.starter.ts
|
|
@@ -941,7 +941,7 @@ var SShellEscape = (str) => {
|
|
|
941
941
|
};
|
|
942
942
|
|
|
943
943
|
// src/core/installer.core.ts
|
|
944
|
-
var installerCore = async () => {
|
|
944
|
+
var installerCore = async (initialProjectName2) => {
|
|
945
945
|
let projectName;
|
|
946
946
|
UWelcomeMessage();
|
|
947
947
|
(0, import_prompts12.intro)(import_chalk6.default.bgYellow.black(" Opticore Framework Installer "));
|
|
@@ -952,7 +952,8 @@ var installerCore = async () => {
|
|
|
952
952
|
})() : starter.map(async (value) => {
|
|
953
953
|
switch (value) {
|
|
954
954
|
case CGeneralMsg.starterInitValue:
|
|
955
|
-
|
|
955
|
+
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9]+$");
|
|
956
|
+
projectName = providedNameIsValid ? initialProjectName2 : await SOutputPromptText(
|
|
956
957
|
CGeneralMsg.projectNameMessage,
|
|
957
958
|
CGeneralMsg.projectNamePlaceholder,
|
|
958
959
|
CGeneralMsg.projectNameInvalidValue,
|
|
@@ -971,4 +972,5 @@ var installerCore = async () => {
|
|
|
971
972
|
};
|
|
972
973
|
|
|
973
974
|
// src/index.ts
|
|
974
|
-
|
|
975
|
+
var initialProjectName = process.argv[2];
|
|
976
|
+
(async () => await installerCore(initialProjectName))();
|
package/dist/index.js
CHANGED
|
@@ -77,11 +77,11 @@ var CGeneralMsg = {
|
|
|
77
77
|
// src/core/abstractions/enums/constants/starterOptions.constant.ts
|
|
78
78
|
var CStarterOptions = [
|
|
79
79
|
// { label: "RestFull API complete project", value: ["complete_restfull_project"], hint: "Everything you'll need to build a server render web project" },
|
|
80
|
-
{ label: "Web project", value: ["web_project"], hint: "Everything you'll need to build a server render web project" },
|
|
81
|
-
{ label: "Skeleton project", value: ["skeleton_project"], hint: "A lean OptiCoreJS application with the framework core" },
|
|
82
|
-
{ label: CGeneralMsg.starterOptionsRestFullLabel, value: [CGeneralMsg.starterOptionsRestFullValue], hint: CGeneralMsg.starterOptionsRestFullHint }
|
|
80
|
+
// { label: "Web project", value: ["web_project"], hint: "Everything you'll need to build a server render web project" }, // no template repo yet, disabled
|
|
81
|
+
// { label: "Skeleton project", value: ["skeleton_project"], hint: "A lean OptiCoreJS application with the framework core" }, // no template repo yet, disabled
|
|
82
|
+
{ label: CGeneralMsg.starterOptionsRestFullLabel, value: [CGeneralMsg.starterOptionsRestFullValue], hint: CGeneralMsg.starterOptionsRestFullHint }
|
|
83
83
|
// { label: "Complete restFull API project", value: ["complete_api_restfull_project"], hint: "OptiCoreJS app tailored to create a complete RestFull APIs" },
|
|
84
|
-
{ label: "standard project", value: ["standard_project"], hint: "OptiCoreJS app tailored to create a standard Web project" }
|
|
84
|
+
// { label: "standard project", value: ["standard_project"], hint: "OptiCoreJS app tailored to create a standard Web project" }, // no template repo yet, disabled
|
|
85
85
|
];
|
|
86
86
|
|
|
87
87
|
// src/presentations/starter/starterOptions.starter.ts
|
|
@@ -918,7 +918,7 @@ var SShellEscape = (str) => {
|
|
|
918
918
|
};
|
|
919
919
|
|
|
920
920
|
// src/core/installer.core.ts
|
|
921
|
-
var installerCore = async () => {
|
|
921
|
+
var installerCore = async (initialProjectName2) => {
|
|
922
922
|
let projectName;
|
|
923
923
|
UWelcomeMessage();
|
|
924
924
|
intro(chalk6.bgYellow.black(" Opticore Framework Installer "));
|
|
@@ -929,7 +929,8 @@ var installerCore = async () => {
|
|
|
929
929
|
})() : starter.map(async (value) => {
|
|
930
930
|
switch (value) {
|
|
931
931
|
case CGeneralMsg.starterInitValue:
|
|
932
|
-
|
|
932
|
+
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9]+$");
|
|
933
|
+
projectName = providedNameIsValid ? initialProjectName2 : await SOutputPromptText(
|
|
933
934
|
CGeneralMsg.projectNameMessage,
|
|
934
935
|
CGeneralMsg.projectNamePlaceholder,
|
|
935
936
|
CGeneralMsg.projectNameInvalidValue,
|
|
@@ -948,4 +949,5 @@ var installerCore = async () => {
|
|
|
948
949
|
};
|
|
949
950
|
|
|
950
951
|
// src/index.ts
|
|
951
|
-
|
|
952
|
+
var initialProjectName = process.argv[2];
|
|
953
|
+
(async () => await installerCore(initialProjectName))();
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-installer",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
4
4
|
"description": "opticore framework installer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.
|
|
6
|
+
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|