create-awesome-node-app 0.1.0 → 0.2.1
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 +16 -8
- package/dist/index.js +17 -9
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -3423,6 +3423,7 @@ var require_chalk = __commonJS({
|
|
|
3423
3423
|
// src/index.ts
|
|
3424
3424
|
var import_commander = __toESM(require_commander(), 1);
|
|
3425
3425
|
var import_chalk = __toESM(require_chalk(), 1);
|
|
3426
|
+
var import_semver = __toESM(require("semver"), 1);
|
|
3426
3427
|
var import_core = require("@create-node-app/core");
|
|
3427
3428
|
|
|
3428
3429
|
// src/options.ts
|
|
@@ -3638,7 +3639,7 @@ var getCnaOptions = async (options) => {
|
|
|
3638
3639
|
// package.json
|
|
3639
3640
|
var package_default = {
|
|
3640
3641
|
name: "create-awesome-node-app",
|
|
3641
|
-
version: "0.
|
|
3642
|
+
version: "0.2.0",
|
|
3642
3643
|
type: "module",
|
|
3643
3644
|
description: "Command line tool to create Node apps with a lot of different addons.",
|
|
3644
3645
|
license: "MIT",
|
|
@@ -3685,6 +3686,7 @@ var package_default = {
|
|
|
3685
3686
|
dependencies: {
|
|
3686
3687
|
"@create-node-app/core": "*",
|
|
3687
3688
|
prompts: "^2.4.1",
|
|
3689
|
+
semver: "^7.3.8",
|
|
3688
3690
|
yargs: "^17.0.1"
|
|
3689
3691
|
},
|
|
3690
3692
|
devDependencies: {
|
|
@@ -3715,18 +3717,24 @@ var main = async () => {
|
|
|
3715
3717
|
).option(
|
|
3716
3718
|
"--nodeps",
|
|
3717
3719
|
"generate package.json file without installing dependencies"
|
|
3718
|
-
).option("--inplace", "apply setup to an existing project");
|
|
3719
|
-
|
|
3720
|
+
).option("--inplace", "apply setup to an existing project").parse(process.argv);
|
|
3721
|
+
const latest = await (0, import_core.checkForLatestVersion)("create-awesome-node-app");
|
|
3722
|
+
if (latest && import_semver.default.lt(package_default.version, latest)) {
|
|
3720
3723
|
console.log();
|
|
3721
|
-
console.
|
|
3722
|
-
|
|
3724
|
+
console.error(
|
|
3725
|
+
import_chalk.default.yellow(
|
|
3726
|
+
`You are running \`create-react-app\` ${package_default.version}, which is behind the latest release (${latest}).
|
|
3727
|
+
|
|
3728
|
+
We recommend always using the latest version of create-react-app if possible.`
|
|
3729
|
+
)
|
|
3723
3730
|
);
|
|
3724
3731
|
console.log();
|
|
3725
3732
|
console.log(
|
|
3726
|
-
|
|
3733
|
+
"The latest instructions for creating a new app can be found here:\nhttps://create-react-app.dev/docs/getting-started/"
|
|
3727
3734
|
);
|
|
3728
|
-
console.log(
|
|
3729
|
-
|
|
3735
|
+
console.log();
|
|
3736
|
+
return;
|
|
3737
|
+
}
|
|
3730
3738
|
return (0, import_core.createNodeApp)(
|
|
3731
3739
|
projectName,
|
|
3732
3740
|
{ ...import_commander.default.opts(), projectName },
|
package/dist/index.js
CHANGED
|
@@ -3429,7 +3429,8 @@ var require_chalk = __commonJS({
|
|
|
3429
3429
|
// src/index.ts
|
|
3430
3430
|
var import_commander = __toESM(require_commander(), 1);
|
|
3431
3431
|
var import_chalk = __toESM(require_chalk(), 1);
|
|
3432
|
-
import
|
|
3432
|
+
import semver from "semver";
|
|
3433
|
+
import { createNodeApp, checkForLatestVersion } from "@create-node-app/core";
|
|
3433
3434
|
|
|
3434
3435
|
// src/options.ts
|
|
3435
3436
|
import prompts from "prompts";
|
|
@@ -3644,7 +3645,7 @@ var getCnaOptions = async (options) => {
|
|
|
3644
3645
|
// package.json
|
|
3645
3646
|
var package_default = {
|
|
3646
3647
|
name: "create-awesome-node-app",
|
|
3647
|
-
version: "0.
|
|
3648
|
+
version: "0.2.0",
|
|
3648
3649
|
type: "module",
|
|
3649
3650
|
description: "Command line tool to create Node apps with a lot of different addons.",
|
|
3650
3651
|
license: "MIT",
|
|
@@ -3691,6 +3692,7 @@ var package_default = {
|
|
|
3691
3692
|
dependencies: {
|
|
3692
3693
|
"@create-node-app/core": "*",
|
|
3693
3694
|
prompts: "^2.4.1",
|
|
3695
|
+
semver: "^7.3.8",
|
|
3694
3696
|
yargs: "^17.0.1"
|
|
3695
3697
|
},
|
|
3696
3698
|
devDependencies: {
|
|
@@ -3721,18 +3723,24 @@ var main = async () => {
|
|
|
3721
3723
|
).option(
|
|
3722
3724
|
"--nodeps",
|
|
3723
3725
|
"generate package.json file without installing dependencies"
|
|
3724
|
-
).option("--inplace", "apply setup to an existing project");
|
|
3725
|
-
|
|
3726
|
+
).option("--inplace", "apply setup to an existing project").parse(process.argv);
|
|
3727
|
+
const latest = await checkForLatestVersion("create-awesome-node-app");
|
|
3728
|
+
if (latest && semver.lt(package_default.version, latest)) {
|
|
3726
3729
|
console.log();
|
|
3727
|
-
console.
|
|
3728
|
-
|
|
3730
|
+
console.error(
|
|
3731
|
+
import_chalk.default.yellow(
|
|
3732
|
+
`You are running \`create-react-app\` ${package_default.version}, which is behind the latest release (${latest}).
|
|
3733
|
+
|
|
3734
|
+
We recommend always using the latest version of create-react-app if possible.`
|
|
3735
|
+
)
|
|
3729
3736
|
);
|
|
3730
3737
|
console.log();
|
|
3731
3738
|
console.log(
|
|
3732
|
-
|
|
3739
|
+
"The latest instructions for creating a new app can be found here:\nhttps://create-react-app.dev/docs/getting-started/"
|
|
3733
3740
|
);
|
|
3734
|
-
console.log(
|
|
3735
|
-
|
|
3741
|
+
console.log();
|
|
3742
|
+
return;
|
|
3743
|
+
}
|
|
3736
3744
|
return createNodeApp(
|
|
3737
3745
|
projectName,
|
|
3738
3746
|
{ ...import_commander.default.opts(), projectName },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-awesome-node-app",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Command line tool to create Node apps with a lot of different addons.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@create-node-app/core": "*",
|
|
49
49
|
"prompts": "^2.4.1",
|
|
50
|
+
"semver": "^7.3.8",
|
|
50
51
|
"yargs": "^17.0.1"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|