4bnode 1.0.1 → 1.0.3

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/add-login.js CHANGED
File without changes
File without changes
File without changes
package/add-mongo-read.js CHANGED
File without changes
File without changes
package/add-mongo.js CHANGED
File without changes
package/add-socket.js CHANGED
File without changes
package/add-websocket.js CHANGED
File without changes
package/index.js CHANGED
@@ -78,7 +78,7 @@ function checkMongoConfig() {
78
78
  function showHelp() {
79
79
  console.log(
80
80
  chalk.green(`
81
- Usage: ${chalk.bold("node-app <command> [options]")}
81
+ Usage: ${chalk.bold("4bnode <command> [options]")}
82
82
 
83
83
  Commands:
84
84
  ${chalk.blue(
@@ -120,13 +120,13 @@ const param = args[1];
120
120
 
121
121
  if (command === "init") {
122
122
  if (!param) {
123
- console.error(chalk.red("Usage: node-app init <projectName>"));
123
+ console.error(chalk.red("Usage: 4bnode init <projectName>"));
124
124
  process.exit(1);
125
125
  }
126
126
  createSkeletonApp(param);
127
127
  } else if (command === "add-api") {
128
128
  if (!param) {
129
- console.error(chalk.red("Usage: node-app add-api <endpointName>"));
129
+ console.error(chalk.red("Usage: 4bnode add-api <endpointName>"));
130
130
  process.exit(1);
131
131
  }
132
132
  execSync(`node ${path.join(__dirname, "add-api.js")} ${param}`, {
@@ -146,13 +146,13 @@ if (command === "init") {
146
146
  });
147
147
  } else if (command === "add-mongo-schema") {
148
148
  if (!param) {
149
- console.error(chalk.red("Usage: node-app add-mongo-schema <schemaName>"));
149
+ console.error(chalk.red("Usage: 4bnode add-mongo-schema <schemaName>"));
150
150
  process.exit(1);
151
151
  }
152
152
  if (!checkMongoConfig()) {
153
153
  console.error(
154
154
  chalk.red(
155
- "MongoDB is not configured. Please run 'node-app add-mongo' first."
155
+ "MongoDB is not configured. Please run '4bnode add-mongo' first."
156
156
  )
157
157
  );
158
158
  process.exit(1);
package/package.json CHANGED
@@ -1,21 +1,11 @@
1
1
  {
2
2
  "name": "4bnode",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "A CLI tool to generate a Node.js app by 4Brains Technologies",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "4bnode": "index.js",
9
- "add-api": "add-api.js",
10
- "add-mongo": "add-mongo.js",
11
- "add-socket": "add-socket.js",
12
- "add-websocket": "add-websocket.js",
13
- "add-mongo-schema": "add-mongo-schema.js",
14
- "add-login": "add-login.js",
15
- "add-mongo-insert": "add-mongo-insert.js",
16
- "add-mongo-update": "add-mongo-update.js",
17
- "add-mongo-read": "add-mongo-read.js",
18
- "add-mongo-delete": "add-mongo-delete.js"
8
+ "4bnode": "index.js"
19
9
  },
20
10
  "scripts": {
21
11
  "test": "echo \"Error: no test specified\" && exit 1"