@voxgig/build 4.13.0 → 4.14.0
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/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (main.env.$$env$$).
|
|
6
6
|
|
|
7
7
|
import Seneca from 'seneca'
|
|
8
|
-
import { Local, context } from '@voxgig/system'
|
|
8
|
+
import { Local, context, devtools } from '@voxgig/system'
|
|
9
9
|
|
|
10
10
|
import { basic, base } from '../shared/basic'
|
|
11
11
|
|
|
@@ -30,6 +30,13 @@ async function run() {
|
|
|
30
30
|
// STAGE, then the model's main.env.$$env$$.stage, then the env name.
|
|
31
31
|
context(seneca, Model, Pkg, { env: '$$env$$' })
|
|
32
32
|
|
|
33
|
+
// Dev-only behaviour, from the model: seneca.test() and the @seneca/repl
|
|
34
|
+
// dev REPL. Declared in main.conf.dev, overridable per environment in
|
|
35
|
+
// main.env.$$env$$.dev, and at runtime with SENECA_TEST / SENECA_REPL /
|
|
36
|
+
// SENECA_REPL_PORT. Both default to OFF - a long-lived server picks up
|
|
37
|
+
// neither unless the model asks for it.
|
|
38
|
+
devtools(seneca, Model, { env: '$$env$$' })
|
|
39
|
+
|
|
33
40
|
basic(seneca)
|
|
34
41
|
|
|
35
42
|
seneca.use(Local, {
|
|
@@ -15,7 +15,7 @@ import Express from 'express'
|
|
|
15
15
|
import CookieParser from 'cookie-parser'
|
|
16
16
|
|
|
17
17
|
import Seneca from 'seneca'
|
|
18
|
-
import { Local, context } from '@voxgig/system'
|
|
18
|
+
import { Local, context, devtools } from '@voxgig/system'
|
|
19
19
|
|
|
20
20
|
import { basic, base } from '../shared/basic'
|
|
21
21
|
import { seedDemo } from '../shared/seed'
|
|
@@ -45,20 +45,17 @@ async function run() {
|
|
|
45
45
|
// existed, which no longer matched the entry it was generated for.
|
|
46
46
|
context(seneca, Model, Pkg, { env: 'web' })
|
|
47
47
|
|
|
48
|
-
seneca.test()
|
|
48
|
+
// Dev-only behaviour, from the model: seneca.test() and the @seneca/repl
|
|
49
|
+
// dev REPL - npx seneca-repl telnet://localhost:<conf.port.repl>
|
|
50
|
+
//
|
|
51
|
+
// Declared in main.conf.dev, overridable per environment in
|
|
52
|
+
// main.env.web.dev, and at runtime with SENECA_TEST / SENECA_REPL /
|
|
53
|
+
// SENECA_REPL_PORT. Both default to OFF, so this entry only gets them if
|
|
54
|
+
// the model asks.
|
|
55
|
+
devtools(seneca, Model, { env: 'web' })
|
|
49
56
|
|
|
50
57
|
basic(seneca)
|
|
51
58
|
|
|
52
|
-
// Dev REPL (@seneca/repl): poke the running system with messages -
|
|
53
|
-
// npx seneca-repl telnet://localhost:<port.repl>
|
|
54
|
-
// Disable with REPL=false; override the port with REPL_PORT.
|
|
55
|
-
if ('false' !== process.env.REPL) {
|
|
56
|
-
seneca.use('repl', {
|
|
57
|
-
port: parseInt(process.env.REPL_PORT || '', 10) ||
|
|
58
|
-
(Model as any).main.conf.port.repl,
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
59
|
seneca
|
|
63
60
|
.use('gateway', {
|
|
64
61
|
// THE BROWSER SURFACE. Only aim:web is reachable from a browser:
|
|
@@ -30,7 +30,7 @@ export default defineConfig({
|
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
webServer: {
|
|
33
|
-
command: `npm run build && cd ../backend && PORT=${PORT}
|
|
33
|
+
command: `npm run build && cd ../backend && PORT=${PORT} SENECA_REPL=false node dist/env/web/web.js`,
|
|
34
34
|
url: `http://localhost:${PORT}/`,
|
|
35
35
|
timeout: 60000,
|
|
36
36
|
reuseExistingServer: false,
|