opticore-installer 1.2.60 → 1.2.61
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/README.md +8 -1
- package/dist/index.cjs +16 -13
- package/dist/index.js +16 -13
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -8,5 +8,12 @@ This is the official installer to start new projects based on the OptiCoreJs ful
|
|
|
8
8
|
**This installer is OptiCoreJS's runner** and newer versions. Create your OptiCoreJS project as follows:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm
|
|
11
|
+
npm i opticore-installer
|
|
12
|
+
opticore-new <projectName>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or without installing it first:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx --package=opticore-installer opticore-new <projectName>
|
|
12
19
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -35,19 +35,19 @@ var UWelcomeMessage = () => {
|
|
|
35
35
|
import_cfonts.default.say("OpticoreJS", {
|
|
36
36
|
font: "block",
|
|
37
37
|
align: "left",
|
|
38
|
-
colors: ["
|
|
38
|
+
colors: ["#D4E4FF", "#427ff5"],
|
|
39
39
|
background: "transparent",
|
|
40
40
|
letterSpacing: 1,
|
|
41
41
|
lineHeight: 1,
|
|
42
42
|
space: true,
|
|
43
43
|
maxLength: "0"
|
|
44
44
|
});
|
|
45
|
-
const
|
|
46
|
-
const dim = import_chalk.default.bold.
|
|
47
|
-
console.log(
|
|
48
|
-
console.log(
|
|
45
|
+
const name = import_chalk.default.bold.hex("#003A9F");
|
|
46
|
+
const dim = import_chalk.default.bold.hex("#D4E4FF");
|
|
47
|
+
console.log(`${name("OPTICORE I N S T A L L E R")}`);
|
|
48
|
+
console.log(`${dim("Create \xB7 Configure \xB7 Deploy")}
|
|
49
49
|
`);
|
|
50
|
-
console.log(
|
|
50
|
+
console.log(`${import_chalk.default.bold.dim("Documentation")} ${import_chalk.default.underline.cyan("https://github.com/guyzoum77/opticore-installer")}
|
|
51
51
|
`);
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -86,7 +86,7 @@ var CGeneralMsg = {
|
|
|
86
86
|
noDbCredentials: "You will have to manually set all the variable values in the .env file.",
|
|
87
87
|
starterMsg: "Which starter project would you like to use ?",
|
|
88
88
|
starterInitValue: "restfull_api_project",
|
|
89
|
-
starterOptionsRestFullLabel: "
|
|
89
|
+
starterOptionsRestFullLabel: "Standard projet",
|
|
90
90
|
starterOptionsRestFullValue: "restfull_api_project",
|
|
91
91
|
starterOptionsRestFullHint: "OptiCoreJS app tailored to create a RestFull APIs",
|
|
92
92
|
projectNameMessage: "Enter the name of project :",
|
|
@@ -464,11 +464,7 @@ function endingMessageInfo(projectName) {
|
|
|
464
464
|
`);
|
|
465
465
|
console.log(` ${import_chalk4.default.dim("NB: Before running app, make sure to define in .env file application host and port.")}
|
|
466
466
|
`);
|
|
467
|
-
|
|
468
|
-
console.log(` ${import_chalk4.default.dim("\u276F")} ${import_chalk4.default.cyan("npm install opticore-validator")} ${import_chalk4.default.dim("\u2014 data schema validation with rich rules and custom messages.")}`);
|
|
469
|
-
console.log(` ${import_chalk4.default.dim("\u276F")} ${import_chalk4.default.cyan("npm install opticore-orm-orchestrator")} ${import_chalk4.default.dim("\u2014 interactive model/entity generator for Prisma, TypeORM, Drizzle ORM, MikroORM and Sequelize.")}
|
|
470
|
-
`);
|
|
471
|
-
(0, import_prompts9.outro)(import_chalk4.default.dim("To install opticore components: ") + import_chalk4.default.green("npx opticore list"));
|
|
467
|
+
(0, import_prompts9.outro)(import_chalk4.default.dim("Useful to see all commands : ") + import_chalk4.default.green("opticore list"));
|
|
472
468
|
}
|
|
473
469
|
|
|
474
470
|
// src/presentations/starter/projectCreation.starter.ts
|
|
@@ -527,6 +523,13 @@ var SProjectCreation = async (gitRepo, projectPath, currentPath, projectName) =>
|
|
|
527
523
|
const npmSpinner = ora("Installing dependencies").start();
|
|
528
524
|
await exec("npm install");
|
|
529
525
|
npmSpinner.succeed();
|
|
526
|
+
const cliSpinner = ora("Installing opticore CLI globally").start();
|
|
527
|
+
try {
|
|
528
|
+
await exec("npm install -g opticore-cli@latest");
|
|
529
|
+
cliSpinner.succeed();
|
|
530
|
+
} catch {
|
|
531
|
+
cliSpinner.fail("Could not install opticore-cli globally, run 'npm install -g opticore-cli@latest' manually");
|
|
532
|
+
}
|
|
530
533
|
import_fs3.default.writeFileSync(import_path2.default.join(escapedPath, ".npmrc"), "loglevel=silent\n");
|
|
531
534
|
endingMessageInfo(projectName);
|
|
532
535
|
} catch (err) {
|
|
@@ -966,7 +969,7 @@ var SShellEscape = (str) => {
|
|
|
966
969
|
var installerCore = async (initialProjectName2) => {
|
|
967
970
|
let projectName;
|
|
968
971
|
UWelcomeMessage();
|
|
969
|
-
(0, import_prompts12.intro)(import_chalk6.default.
|
|
972
|
+
(0, import_prompts12.intro)(import_chalk6.default.bgHex("#427ff5").white(" Opticore Framework Installer "));
|
|
970
973
|
const starter = await SOutputPromptSelect(StarterOptions);
|
|
971
974
|
starter instanceof Function ? (() => {
|
|
972
975
|
(0, import_prompts12.cancel)(import_ansi_colors9.default.bgRed(import_ansi_colors9.default.white(" Operation cancelled ")));
|
package/dist/index.js
CHANGED
|
@@ -12,19 +12,19 @@ var UWelcomeMessage = () => {
|
|
|
12
12
|
cfonts.say("OpticoreJS", {
|
|
13
13
|
font: "block",
|
|
14
14
|
align: "left",
|
|
15
|
-
colors: ["
|
|
15
|
+
colors: ["#D4E4FF", "#427ff5"],
|
|
16
16
|
background: "transparent",
|
|
17
17
|
letterSpacing: 1,
|
|
18
18
|
lineHeight: 1,
|
|
19
19
|
space: true,
|
|
20
20
|
maxLength: "0"
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
const dim = chalk.bold.
|
|
24
|
-
console.log(
|
|
25
|
-
console.log(
|
|
22
|
+
const name = chalk.bold.hex("#003A9F");
|
|
23
|
+
const dim = chalk.bold.hex("#D4E4FF");
|
|
24
|
+
console.log(`${name("OPTICORE I N S T A L L E R")}`);
|
|
25
|
+
console.log(`${dim("Create \xB7 Configure \xB7 Deploy")}
|
|
26
26
|
`);
|
|
27
|
-
console.log(
|
|
27
|
+
console.log(`${chalk.bold.dim("Documentation")} ${chalk.underline.cyan("https://github.com/guyzoum77/opticore-installer")}
|
|
28
28
|
`);
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -63,7 +63,7 @@ var CGeneralMsg = {
|
|
|
63
63
|
noDbCredentials: "You will have to manually set all the variable values in the .env file.",
|
|
64
64
|
starterMsg: "Which starter project would you like to use ?",
|
|
65
65
|
starterInitValue: "restfull_api_project",
|
|
66
|
-
starterOptionsRestFullLabel: "
|
|
66
|
+
starterOptionsRestFullLabel: "Standard projet",
|
|
67
67
|
starterOptionsRestFullValue: "restfull_api_project",
|
|
68
68
|
starterOptionsRestFullHint: "OptiCoreJS app tailored to create a RestFull APIs",
|
|
69
69
|
projectNameMessage: "Enter the name of project :",
|
|
@@ -441,11 +441,7 @@ function endingMessageInfo(projectName) {
|
|
|
441
441
|
`);
|
|
442
442
|
console.log(` ${chalk4.dim("NB: Before running app, make sure to define in .env file application host and port.")}
|
|
443
443
|
`);
|
|
444
|
-
|
|
445
|
-
console.log(` ${chalk4.dim("\u276F")} ${chalk4.cyan("npm install opticore-validator")} ${chalk4.dim("\u2014 data schema validation with rich rules and custom messages.")}`);
|
|
446
|
-
console.log(` ${chalk4.dim("\u276F")} ${chalk4.cyan("npm install opticore-orm-orchestrator")} ${chalk4.dim("\u2014 interactive model/entity generator for Prisma, TypeORM, Drizzle ORM, MikroORM and Sequelize.")}
|
|
447
|
-
`);
|
|
448
|
-
outro(chalk4.dim("To install opticore components: ") + chalk4.green("npx opticore list"));
|
|
444
|
+
outro(chalk4.dim("Useful to see all commands : ") + chalk4.green("opticore list"));
|
|
449
445
|
}
|
|
450
446
|
|
|
451
447
|
// src/presentations/starter/projectCreation.starter.ts
|
|
@@ -504,6 +500,13 @@ var SProjectCreation = async (gitRepo, projectPath, currentPath, projectName) =>
|
|
|
504
500
|
const npmSpinner = ora("Installing dependencies").start();
|
|
505
501
|
await exec("npm install");
|
|
506
502
|
npmSpinner.succeed();
|
|
503
|
+
const cliSpinner = ora("Installing opticore CLI globally").start();
|
|
504
|
+
try {
|
|
505
|
+
await exec("npm install -g opticore-cli@latest");
|
|
506
|
+
cliSpinner.succeed();
|
|
507
|
+
} catch {
|
|
508
|
+
cliSpinner.fail("Could not install opticore-cli globally, run 'npm install -g opticore-cli@latest' manually");
|
|
509
|
+
}
|
|
507
510
|
fs3.writeFileSync(path2.join(escapedPath, ".npmrc"), "loglevel=silent\n");
|
|
508
511
|
endingMessageInfo(projectName);
|
|
509
512
|
} catch (err) {
|
|
@@ -943,7 +946,7 @@ var SShellEscape = (str) => {
|
|
|
943
946
|
var installerCore = async (initialProjectName2) => {
|
|
944
947
|
let projectName;
|
|
945
948
|
UWelcomeMessage();
|
|
946
|
-
intro(chalk6.
|
|
949
|
+
intro(chalk6.bgHex("#427ff5").white(" Opticore Framework Installer "));
|
|
947
950
|
const starter = await SOutputPromptSelect(StarterOptions);
|
|
948
951
|
starter instanceof Function ? (() => {
|
|
949
952
|
cancel5(colors9.bgRed(colors9.white(" Operation cancelled ")));
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-installer",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.61",
|
|
4
4
|
"description": "opticore framework installer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|
|
10
|
-
"opticore-new
|
|
10
|
+
"opticore-new": "dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -43,5 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/pg": "^8.20.0"
|
|
46
|
+
},
|
|
47
|
+
"overrides": {
|
|
48
|
+
"esbuild": "^0.28.2"
|
|
46
49
|
}
|
|
47
50
|
}
|