not-node 6.1.1 → 6.1.2
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/.env +2 -2
- package/bin/not-cli.mjs +53 -12
- package/package.json +1 -1
- package/playground/app/front/build/admin.css +2 -0
- package/playground/app/front/build/admin.js +52427 -0
- package/playground/app/front/build/client.css +2 -0
- package/playground/app/front/build/client.js +52427 -0
- package/playground/app/front/build/guest.css +2 -0
- package/playground/app/front/build/guest.js +50907 -0
- package/playground/app/front/build/root.css +2 -0
- package/playground/app/front/build/root.js +60023 -0
- package/playground/app/front/build/user.css +2 -0
- package/playground/app/front/build/user.js +52425 -0
- package/playground/app/front/index.admin.js +160 -0
- package/playground/app/front/index.client.js +160 -0
- package/playground/app/front/index.guest.js +160 -0
- package/playground/app/front/index.root.js +224 -0
- package/playground/app/front/index.user.js +160 -0
- package/playground/app/front/rollup.admin.js +70 -0
- package/playground/app/front/rollup.client.js +70 -0
- package/playground/app/front/rollup.guest.js +70 -0
- package/playground/app/front/rollup.root.js +70 -0
- package/playground/app/front/rollup.user.js +70 -0
- package/playground/app/server/config/common.json +4 -4
- package/playground/app/server/config/development.json +31 -32
- package/playground/app/server/config/production.json +31 -32
- package/playground/app/server/config/stage.json +31 -32
- package/playground/app/server/routes/index.js +29 -31
- package/playground/app/server/views/parts/header.android.pug +6 -7
- package/playground/app/server/views/parts/header.ios.pug +5 -5
- package/src/metas.js +4 -3
- package/tmpl/files/app/routes/index.ejs +29 -31
- package/tmpl/files/app/views/parts/header.android.ejs +6 -7
- package/tmpl/files/app/views/parts/header.ios.ejs +5 -5
- package/tmpl/files/app/views/parts/menu.ejs +1 -1
- package/tmpl/files/app/views/parts/overview.ejs +1 -1
package/.env
CHANGED
|
@@ -5,8 +5,8 @@ INIT_ROOT_USERNAME=root
|
|
|
5
5
|
INIT_ROOT_EMAIL=admin@appmon.ru
|
|
6
6
|
INIT_ROOT_PASSWORD=tester
|
|
7
7
|
db__mongoose__uri=mongodb://localhost/reporter?authSource=reporter
|
|
8
|
-
db__mongoose__options__user=reporter
|
|
9
|
-
db__mongoose__options__pass=
|
|
8
|
+
db__mongoose__options__user=reporter
|
|
9
|
+
db__mongoose__options__pass=developer
|
|
10
10
|
db__mongoose__options__db=reporter
|
|
11
11
|
db__mongoose__options__host=localhost
|
|
12
12
|
db__mongoose__options__authSource=reporter
|
package/bin/not-cli.mjs
CHANGED
|
@@ -37,6 +37,7 @@ import ApplicationModuleServerControllersCommonStructure from "../tmpl/dirs/modu
|
|
|
37
37
|
import ApplicationModuleFrontStructure from "../tmpl/dirs/module.front.mjs";
|
|
38
38
|
|
|
39
39
|
import { firstLetterToLower } from "../src/common.js";
|
|
40
|
+
import { rejects } from "node:assert";
|
|
40
41
|
|
|
41
42
|
const ApplicationSubStructures = {
|
|
42
43
|
server: ApplicationServerStructure,
|
|
@@ -326,6 +327,55 @@ async function createBootstrapFrontModule(modules_dir, config) {
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
|
|
330
|
+
function installPackages(opts) {
|
|
331
|
+
return new Promise((resolve, reject) => {
|
|
332
|
+
console.log("installing packages...");
|
|
333
|
+
let npmInstall = spawn(`npm`, ["i"], { cwd: opts.dir });
|
|
334
|
+
npmInstall.stdout.on("data", (data) => {
|
|
335
|
+
//console.log(data.toString());
|
|
336
|
+
});
|
|
337
|
+
npmInstall.stderr.on("data", (data) => {
|
|
338
|
+
console.error(data.toString());
|
|
339
|
+
});
|
|
340
|
+
npmInstall.on("exit", (code) => {
|
|
341
|
+
if (code == 0) {
|
|
342
|
+
resolve();
|
|
343
|
+
} else {
|
|
344
|
+
reject(`NPM install exited with code ${code}`);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function buildClientSideScripts(opts) {
|
|
351
|
+
return new Promise((resolve, reject) => {
|
|
352
|
+
console.log("building client side scripts...");
|
|
353
|
+
let npmInstall = spawn(`npm`, ["run", "build"], { cwd: opts.dir });
|
|
354
|
+
npmInstall.stdout.on("data", (data) => {
|
|
355
|
+
//console.log(data.toString());
|
|
356
|
+
});
|
|
357
|
+
npmInstall.stderr.on("data", (data) => {
|
|
358
|
+
console.error(data.toString());
|
|
359
|
+
});
|
|
360
|
+
npmInstall.on("exit", (code) => {
|
|
361
|
+
if (code == 0) {
|
|
362
|
+
resolve();
|
|
363
|
+
} else {
|
|
364
|
+
reject(`npm run build job exited with code ${code}`);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function postStartupInstructions(opts) {
|
|
371
|
+
console.log(
|
|
372
|
+
"Generation of source code, configurations and installation of packages successfully finished."
|
|
373
|
+
);
|
|
374
|
+
console.log(
|
|
375
|
+
`To start server navigate to directory '${opts.dir}' (cd '${opts.dir}') and run 'npm start'`
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
329
379
|
program
|
|
330
380
|
.command("create")
|
|
331
381
|
.addOption(
|
|
@@ -368,18 +418,9 @@ program
|
|
|
368
418
|
await createBootstrapFrontModule(PATH_MODULES_FRONT, AppConfig);
|
|
369
419
|
}
|
|
370
420
|
console.log(`cd '${opts.dir}' && npm i`);
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
npmInstall.stderr.on("data", (data) => {
|
|
377
|
-
console.error(data.toString());
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
npmInstall.on("exit", (code) => {
|
|
381
|
-
console.log(`NPM install exited with code ${code}`);
|
|
382
|
-
});
|
|
421
|
+
await installPackages(opts);
|
|
422
|
+
await buildClientSideScripts(opts);
|
|
423
|
+
postStartupInstructions(opts);
|
|
383
424
|
});
|
|
384
425
|
|
|
385
426
|
program.parse();
|