not-node 6.1.2 → 6.1.4
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/.vscode/launch.json +19 -0
- package/bin/not-cli.mjs +6 -11
- package/package.json +1 -1
- package/playground/app/front/build/admin.js +21 -29
- package/playground/app/front/build/client.js +21 -29
- package/playground/app/front/build/guest.css +1 -1
- package/playground/app/front/build/guest.js +29 -21
- package/playground/app/front/build/root.js +21 -29
- package/playground/app/front/build/user.js +21 -29
- package/playground/app/front/src/admin/main/index.js +14 -25
- package/playground/app/front/src/client/main/index.js +14 -25
- package/playground/app/front/src/common/index.js +3 -2
- package/playground/app/front/src/common/ws.client.main.js +2 -3
- package/playground/app/front/src/guest/main/index.js +25 -14
- package/playground/app/front/src/root/main/index.js +14 -25
- package/playground/app/front/src/user/main/index.js +14 -25
- package/playground/app/server/app.js +3 -0
- package/playground/app/server/config/common.json +98 -91
- package/playground/app/server/config/development.json +32 -31
- package/playground/app/server/config/production.json +32 -31
- package/playground/app/server/config/stage.json +32 -31
- package/playground/app/server/views/parts/menu.pug +1 -1
- package/playground/app/server/views/parts/overview.pug +1 -1
- package/src/cli/readers/hostname.mjs +1 -1
- package/src/cli/readers/user.mjs +8 -1
- package/src/cli/readers/ws.mjs +12 -0
- package/src/cli/renderers/controllers.mjs +1 -0
- package/src/init/lib/modules.js +1 -2
- package/src/init/lib/routes.js +4 -1
- package/tmpl/dirs/module.front.mjs +1 -1
- package/tmpl/files/app/app.ejs +3 -0
- package/tmpl/files/module.front/common/index.ejs +7 -6
- package/tmpl/files/module.front/common/ws.client.main.ejs +2 -3
- package/tmpl/files/module.front/role/index.ejs +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"address": "127.0.0.1",
|
|
9
|
+
"localRoot": "${workspaceFolder}/playground",
|
|
10
|
+
"name": "Debug playground",
|
|
11
|
+
"port": 3031,
|
|
12
|
+
"sourceMaps": true,
|
|
13
|
+
"remoteRoot": "${workspaceFolder}/playground",
|
|
14
|
+
"request": "attach",
|
|
15
|
+
"skipFiles": ["<node_internals>/**"],
|
|
16
|
+
"type": "node"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
package/bin/not-cli.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { isAbsolute, resolve, join } from "node:path";
|
|
|
8
8
|
|
|
9
9
|
import { copyFile, constants, mkdir, writeFile } from "node:fs/promises";
|
|
10
10
|
|
|
11
|
-
import { cwd
|
|
11
|
+
import { cwd } from "node:process";
|
|
12
12
|
const CWD = cwd();
|
|
13
13
|
import { spawn } from "node:child_process";
|
|
14
14
|
|
|
@@ -37,7 +37,6 @@ 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";
|
|
41
40
|
|
|
42
41
|
const ApplicationSubStructures = {
|
|
43
42
|
server: ApplicationServerStructure,
|
|
@@ -309,17 +308,17 @@ async function createBootstrapFrontModule(modules_dir, config) {
|
|
|
309
308
|
await createDir(resolve(modules_dir, role));
|
|
310
309
|
const targetFrontModuleDir = resolve(modules_dir, role, "main");
|
|
311
310
|
await createDir(targetFrontModuleDir);
|
|
312
|
-
if (role
|
|
311
|
+
if (role === "guest") {
|
|
313
312
|
await Renderers.frontModuleGuestMain(
|
|
314
313
|
targetFrontModuleDir,
|
|
315
|
-
config,
|
|
314
|
+
{ ...config, roleName: role },
|
|
316
315
|
renderFile,
|
|
317
316
|
PATH_TMPL
|
|
318
317
|
);
|
|
319
318
|
} else {
|
|
320
319
|
await Renderers.frontModuleRoleMain(
|
|
321
320
|
targetFrontModuleDir,
|
|
322
|
-
config,
|
|
321
|
+
{ ...config, roleName: role },
|
|
323
322
|
renderFile,
|
|
324
323
|
PATH_TMPL
|
|
325
324
|
);
|
|
@@ -331,9 +330,7 @@ function installPackages(opts) {
|
|
|
331
330
|
return new Promise((resolve, reject) => {
|
|
332
331
|
console.log("installing packages...");
|
|
333
332
|
let npmInstall = spawn(`npm`, ["i"], { cwd: opts.dir });
|
|
334
|
-
|
|
335
|
-
//console.log(data.toString());
|
|
336
|
-
});
|
|
333
|
+
|
|
337
334
|
npmInstall.stderr.on("data", (data) => {
|
|
338
335
|
console.error(data.toString());
|
|
339
336
|
});
|
|
@@ -351,9 +348,7 @@ function buildClientSideScripts(opts) {
|
|
|
351
348
|
return new Promise((resolve, reject) => {
|
|
352
349
|
console.log("building client side scripts...");
|
|
353
350
|
let npmInstall = spawn(`npm`, ["run", "build"], { cwd: opts.dir });
|
|
354
|
-
|
|
355
|
-
//console.log(data.toString());
|
|
356
|
-
});
|
|
351
|
+
|
|
357
352
|
npmInstall.stderr.on("data", (data) => {
|
|
358
353
|
console.error(data.toString());
|
|
359
354
|
});
|
package/package.json
CHANGED
|
@@ -52156,9 +52156,8 @@
|
|
|
52156
52156
|
logger: logger,
|
|
52157
52157
|
getToken: function () {
|
|
52158
52158
|
return notCommon$3.getApp().getModel('user', {}).$token({}).then(function (res) {
|
|
52159
|
-
|
|
52160
|
-
|
|
52161
|
-
return res.result.token;
|
|
52159
|
+
notCommon$3.getApp().setWorking('token', res.result);
|
|
52160
|
+
return res.result;
|
|
52162
52161
|
});
|
|
52163
52162
|
},
|
|
52164
52163
|
messenger: {
|
|
@@ -52199,9 +52198,10 @@
|
|
|
52199
52198
|
//options for ws client here
|
|
52200
52199
|
main: {
|
|
52201
52200
|
host: window.location.hostname,
|
|
52201
|
+
port: 3030,
|
|
52202
52202
|
path: 'websocket',
|
|
52203
52203
|
secure: true,
|
|
52204
|
-
ssl:
|
|
52204
|
+
ssl: false
|
|
52205
52205
|
}
|
|
52206
52206
|
}
|
|
52207
52207
|
}
|
|
@@ -52234,42 +52234,34 @@
|
|
|
52234
52234
|
}
|
|
52235
52235
|
|
|
52236
52236
|
let manifest = {
|
|
52237
|
-
environment: "
|
|
52237
|
+
environment: "admin",
|
|
52238
52238
|
router: {
|
|
52239
|
+
root: "/dashboard",
|
|
52239
52240
|
manifest: []
|
|
52240
52241
|
},
|
|
52241
52242
|
crud: {
|
|
52242
52243
|
containerSelector: ".main-container"
|
|
52243
52244
|
},
|
|
52244
52245
|
modules: {
|
|
52245
|
-
user: {
|
|
52246
|
-
|
|
52247
|
-
|
|
52248
|
-
|
|
52246
|
+
user: {}
|
|
52247
|
+
},
|
|
52248
|
+
brand: {
|
|
52249
|
+
icon: {
|
|
52250
|
+
src: "/img/icons/icon-w-64.png",
|
|
52251
|
+
width: 48,
|
|
52252
|
+
height: 28
|
|
52253
|
+
},
|
|
52254
|
+
url: "/"
|
|
52249
52255
|
},
|
|
52250
|
-
initController: ncInit,
|
|
52251
52256
|
menu: {
|
|
52257
|
+
side: {
|
|
52258
|
+
sections: []
|
|
52259
|
+
},
|
|
52252
52260
|
top: {
|
|
52253
|
-
|
|
52254
|
-
sections: [],
|
|
52255
|
-
items: [{
|
|
52256
|
-
title: "Вход",
|
|
52257
|
-
url: "/login",
|
|
52258
|
-
priority: 10,
|
|
52259
|
-
showOnTouch: true,
|
|
52260
|
-
type: "button",
|
|
52261
|
-
place: "start"
|
|
52262
|
-
}, {
|
|
52263
|
-
id: 'register',
|
|
52264
|
-
title: 'Регистрация',
|
|
52265
|
-
url: '/register',
|
|
52266
|
-
type: 'button',
|
|
52267
|
-
priority: 11,
|
|
52268
|
-
showOnTouch: true,
|
|
52269
|
-
place: 'start'
|
|
52270
|
-
}]
|
|
52261
|
+
sections: []
|
|
52271
52262
|
}
|
|
52272
|
-
}
|
|
52263
|
+
},
|
|
52264
|
+
initController: ncInit
|
|
52273
52265
|
};
|
|
52274
52266
|
|
|
52275
52267
|
var mod_12 = /*#__PURE__*/Object.freeze({
|
|
@@ -52156,9 +52156,8 @@
|
|
|
52156
52156
|
logger: logger,
|
|
52157
52157
|
getToken: function () {
|
|
52158
52158
|
return notCommon$3.getApp().getModel('user', {}).$token({}).then(function (res) {
|
|
52159
|
-
|
|
52160
|
-
|
|
52161
|
-
return res.result.token;
|
|
52159
|
+
notCommon$3.getApp().setWorking('token', res.result);
|
|
52160
|
+
return res.result;
|
|
52162
52161
|
});
|
|
52163
52162
|
},
|
|
52164
52163
|
messenger: {
|
|
@@ -52199,9 +52198,10 @@
|
|
|
52199
52198
|
//options for ws client here
|
|
52200
52199
|
main: {
|
|
52201
52200
|
host: window.location.hostname,
|
|
52201
|
+
port: 3030,
|
|
52202
52202
|
path: 'websocket',
|
|
52203
52203
|
secure: true,
|
|
52204
|
-
ssl:
|
|
52204
|
+
ssl: false
|
|
52205
52205
|
}
|
|
52206
52206
|
}
|
|
52207
52207
|
}
|
|
@@ -52234,42 +52234,34 @@
|
|
|
52234
52234
|
}
|
|
52235
52235
|
|
|
52236
52236
|
let manifest = {
|
|
52237
|
-
environment: "
|
|
52237
|
+
environment: "client",
|
|
52238
52238
|
router: {
|
|
52239
|
+
root: "/dashboard",
|
|
52239
52240
|
manifest: []
|
|
52240
52241
|
},
|
|
52241
52242
|
crud: {
|
|
52242
52243
|
containerSelector: ".main-container"
|
|
52243
52244
|
},
|
|
52244
52245
|
modules: {
|
|
52245
|
-
user: {
|
|
52246
|
-
|
|
52247
|
-
|
|
52248
|
-
|
|
52246
|
+
user: {}
|
|
52247
|
+
},
|
|
52248
|
+
brand: {
|
|
52249
|
+
icon: {
|
|
52250
|
+
src: "/img/icons/icon-w-64.png",
|
|
52251
|
+
width: 48,
|
|
52252
|
+
height: 28
|
|
52253
|
+
},
|
|
52254
|
+
url: "/"
|
|
52249
52255
|
},
|
|
52250
|
-
initController: ncInit,
|
|
52251
52256
|
menu: {
|
|
52257
|
+
side: {
|
|
52258
|
+
sections: []
|
|
52259
|
+
},
|
|
52252
52260
|
top: {
|
|
52253
|
-
|
|
52254
|
-
sections: [],
|
|
52255
|
-
items: [{
|
|
52256
|
-
title: "Вход",
|
|
52257
|
-
url: "/login",
|
|
52258
|
-
priority: 10,
|
|
52259
|
-
showOnTouch: true,
|
|
52260
|
-
type: "button",
|
|
52261
|
-
place: "start"
|
|
52262
|
-
}, {
|
|
52263
|
-
id: 'register',
|
|
52264
|
-
title: 'Регистрация',
|
|
52265
|
-
url: '/register',
|
|
52266
|
-
type: 'button',
|
|
52267
|
-
priority: 11,
|
|
52268
|
-
showOnTouch: true,
|
|
52269
|
-
place: 'start'
|
|
52270
|
-
}]
|
|
52261
|
+
sections: []
|
|
52271
52262
|
}
|
|
52272
|
-
}
|
|
52263
|
+
},
|
|
52264
|
+
initController: ncInit
|
|
52273
52265
|
};
|
|
52274
52266
|
|
|
52275
52267
|
var mod_12 = /*#__PURE__*/Object.freeze({
|