@voxgig/build 4.12.0 → 4.12.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/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// shared setup (src/env/shared/basic.ts).
|
|
7
7
|
|
|
8
8
|
import Seneca from 'seneca'
|
|
9
|
-
import { Live } from '@voxgig/system'
|
|
9
|
+
import { Live, context } from '@voxgig/system'
|
|
10
10
|
|
|
11
11
|
import { basic, base } from '../shared/basic'
|
|
12
12
|
|
|
@@ -32,11 +32,10 @@ async function getSeneca(srvname: string, complete: Function): Promise<any> {
|
|
|
32
32
|
timeout: srv.env.lambda.timeout * 60 * 1000,
|
|
33
33
|
})).test()
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
seneca
|
|
39
|
-
seneca.context.pkg = Pkg
|
|
35
|
+
// Runtime context: model/pkg/env/stage/srvname. Lambda is the one
|
|
36
|
+
// deployment with a service PER function, so srvname is explicit, and
|
|
37
|
+
// STAGE is resolved here (above) rather than left to context().
|
|
38
|
+
context(seneca, Model, Pkg, { env: 'lambda', srvname, stage: STAGE })
|
|
40
39
|
|
|
41
40
|
basic(seneca, { reload: { active: false } })
|
|
42
41
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// wire the Seneca gateway the way src/env/lambda/lambda.ts does for AWS.
|
|
5
5
|
|
|
6
6
|
import Seneca from 'seneca'
|
|
7
|
+
import { context } from '@voxgig/system'
|
|
7
8
|
|
|
8
9
|
import { basic, base } from '../shared/basic'
|
|
9
10
|
|
|
@@ -19,9 +20,9 @@ async function getSeneca(): Promise<any> {
|
|
|
19
20
|
tag: '$$name$$-azure@' + Pkg.version,
|
|
20
21
|
})).test()
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
seneca
|
|
23
|
+
// Runtime context: model/pkg/env/stage/srvname. This entry used to set
|
|
24
|
+
// only model/env/pkg - `stage` and `srvname` were simply missing.
|
|
25
|
+
context(seneca, Model, Pkg, { env: 'azure' })
|
|
25
26
|
|
|
26
27
|
basic(seneca, { reload: { active: false } })
|
|
27
28
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (main.env.$$env$$).
|
|
6
6
|
|
|
7
7
|
import Seneca from 'seneca'
|
|
8
|
-
import { Local } from '@voxgig/system'
|
|
8
|
+
import { Local, context } from '@voxgig/system'
|
|
9
9
|
|
|
10
10
|
import { basic, base } from '../shared/basic'
|
|
11
11
|
|
|
@@ -26,11 +26,9 @@ async function run() {
|
|
|
26
26
|
log: { level: envdef.log || 'warn' },
|
|
27
27
|
}, envdef.seneca || {}))
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
seneca
|
|
32
|
-
seneca.context.srvname = 'all'
|
|
33
|
-
seneca.context.pkg = Pkg
|
|
29
|
+
// Runtime context: model/pkg/env/stage/srvname. `stage` resolves from
|
|
30
|
+
// STAGE, then the model's main.env.$$env$$.stage, then the env name.
|
|
31
|
+
context(seneca, Model, Pkg, { env: '$$env$$' })
|
|
34
32
|
|
|
35
33
|
basic(seneca)
|
|
36
34
|
|
|
@@ -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 } from '@voxgig/system'
|
|
18
|
+
import { Local, context } from '@voxgig/system'
|
|
19
19
|
|
|
20
20
|
import { basic, base } from '../shared/basic'
|
|
21
21
|
import { seedDemo } from '../shared/seed'
|
|
@@ -40,11 +40,10 @@ async function run() {
|
|
|
40
40
|
|
|
41
41
|
const seneca = Seneca(deep(base.seneca, { tag: '$$name$$-web' }))
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
seneca
|
|
47
|
-
seneca.context.pkg = Pkg
|
|
43
|
+
// Runtime context: model/pkg/env/stage/srvname. env is 'web' - this IS
|
|
44
|
+
// the web environment entry. It reported 'local' before context()
|
|
45
|
+
// existed, which no longer matched the entry it was generated for.
|
|
46
|
+
context(seneca, Model, Pkg, { env: 'web' })
|
|
48
47
|
|
|
49
48
|
seneca.test()
|
|
50
49
|
|