opticore-installer 1.2.50 → 1.2.52
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 +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -292,7 +292,7 @@ var SPromptsDBCredentials = class {
|
|
|
292
292
|
CDbNameLabel.placeholderDBUser,
|
|
293
293
|
CDbNameLabel.dbUserInvalidValue,
|
|
294
294
|
CDbNameLabel.dbUserBadPattern,
|
|
295
|
-
"
|
|
295
|
+
"^.+$",
|
|
296
296
|
this.projectPath
|
|
297
297
|
);
|
|
298
298
|
if (user instanceof Function) {
|
|
@@ -351,7 +351,7 @@ var SPromptsDBCredentials = class {
|
|
|
351
351
|
CDbNameLabel.placeholderDBName,
|
|
352
352
|
CDbNameLabel.dbNameInvalidValue,
|
|
353
353
|
CDbNameLabel.dbNameBadPattern,
|
|
354
|
-
"
|
|
354
|
+
"^.+$",
|
|
355
355
|
this.projectPath
|
|
356
356
|
);
|
|
357
357
|
if (dbName instanceof Function) {
|
|
@@ -952,13 +952,13 @@ var installerCore = async (initialProjectName2) => {
|
|
|
952
952
|
})() : starter.map(async (value) => {
|
|
953
953
|
switch (value) {
|
|
954
954
|
case CGeneralMsg.starterInitValue:
|
|
955
|
-
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9]
|
|
955
|
+
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9][a-zA-Z0-9_-]*$");
|
|
956
956
|
projectName = providedNameIsValid ? initialProjectName2 : await SOutputPromptText(
|
|
957
957
|
CGeneralMsg.projectNameMessage,
|
|
958
958
|
CGeneralMsg.projectNamePlaceholder,
|
|
959
959
|
CGeneralMsg.projectNameInvalidValue,
|
|
960
960
|
CGeneralMsg.projectNameBadPattern,
|
|
961
|
-
"^[a-zA-Z0-9]
|
|
961
|
+
"^[a-zA-Z0-9][a-zA-Z0-9_-]*$"
|
|
962
962
|
);
|
|
963
963
|
if (typeof projectName === "string") {
|
|
964
964
|
const tpl = await templateStarter(projectName);
|
package/dist/index.js
CHANGED
|
@@ -269,7 +269,7 @@ var SPromptsDBCredentials = class {
|
|
|
269
269
|
CDbNameLabel.placeholderDBUser,
|
|
270
270
|
CDbNameLabel.dbUserInvalidValue,
|
|
271
271
|
CDbNameLabel.dbUserBadPattern,
|
|
272
|
-
"
|
|
272
|
+
"^.+$",
|
|
273
273
|
this.projectPath
|
|
274
274
|
);
|
|
275
275
|
if (user instanceof Function) {
|
|
@@ -328,7 +328,7 @@ var SPromptsDBCredentials = class {
|
|
|
328
328
|
CDbNameLabel.placeholderDBName,
|
|
329
329
|
CDbNameLabel.dbNameInvalidValue,
|
|
330
330
|
CDbNameLabel.dbNameBadPattern,
|
|
331
|
-
"
|
|
331
|
+
"^.+$",
|
|
332
332
|
this.projectPath
|
|
333
333
|
);
|
|
334
334
|
if (dbName instanceof Function) {
|
|
@@ -929,13 +929,13 @@ var installerCore = async (initialProjectName2) => {
|
|
|
929
929
|
})() : starter.map(async (value) => {
|
|
930
930
|
switch (value) {
|
|
931
931
|
case CGeneralMsg.starterInitValue:
|
|
932
|
-
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9]
|
|
932
|
+
const providedNameIsValid = !!initialProjectName2 && !SValidate(initialProjectName2, CGeneralMsg.projectNameInvalidValue, CGeneralMsg.projectNameBadPattern, "^[a-zA-Z0-9][a-zA-Z0-9_-]*$");
|
|
933
933
|
projectName = providedNameIsValid ? initialProjectName2 : await SOutputPromptText(
|
|
934
934
|
CGeneralMsg.projectNameMessage,
|
|
935
935
|
CGeneralMsg.projectNamePlaceholder,
|
|
936
936
|
CGeneralMsg.projectNameInvalidValue,
|
|
937
937
|
CGeneralMsg.projectNameBadPattern,
|
|
938
|
-
"^[a-zA-Z0-9]
|
|
938
|
+
"^[a-zA-Z0-9][a-zA-Z0-9_-]*$"
|
|
939
939
|
);
|
|
940
940
|
if (typeof projectName === "string") {
|
|
941
941
|
const tpl = await templateStarter(projectName);
|