@webqit/webflo 0.11.61-0 → 0.11.61
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/.gitignore +7 -7
- package/LICENSE +20 -20
- package/README.md +2079 -2074
- package/docker/Dockerfile +42 -42
- package/docker/README.md +91 -91
- package/docker/package.json +2 -2
- package/package.json +80 -81
- package/src/Context.js +79 -79
- package/src/config-pi/deployment/Env.js +68 -68
- package/src/config-pi/deployment/Layout.js +63 -63
- package/src/config-pi/deployment/Origins.js +139 -139
- package/src/config-pi/deployment/Proxy.js +74 -74
- package/src/config-pi/deployment/index.js +17 -17
- package/src/config-pi/index.js +15 -15
- package/src/config-pi/runtime/Client.js +116 -98
- package/src/config-pi/runtime/Server.js +125 -125
- package/src/config-pi/runtime/client/Worker.js +109 -134
- package/src/config-pi/runtime/client/index.js +11 -11
- package/src/config-pi/runtime/index.js +17 -17
- package/src/config-pi/runtime/server/Headers.js +74 -74
- package/src/config-pi/runtime/server/Redirects.js +69 -69
- package/src/config-pi/runtime/server/index.js +13 -13
- package/src/config-pi/static/Manifest.js +319 -319
- package/src/config-pi/static/Ssg.js +49 -49
- package/src/config-pi/static/index.js +13 -13
- package/src/deployment-pi/index.js +10 -10
- package/src/deployment-pi/origins/index.js +216 -216
- package/src/index.js +19 -19
- package/src/runtime-pi/Application.js +28 -28
- package/src/runtime-pi/Cookies.js +81 -81
- package/src/runtime-pi/HttpEvent.js +106 -106
- package/src/runtime-pi/Router.js +130 -130
- package/src/runtime-pi/Runtime.js +20 -20
- package/src/runtime-pi/client/Application.js +76 -100
- package/src/runtime-pi/client/Context.js +7 -7
- package/src/runtime-pi/client/Router.js +48 -48
- package/src/runtime-pi/client/Runtime.js +524 -331
- package/src/runtime-pi/client/Url.js +204 -205
- package/src/runtime-pi/client/Workport.js +190 -178
- package/src/runtime-pi/client/createStorage.js +57 -56
- package/src/runtime-pi/client/generate.js +480 -471
- package/src/runtime-pi/client/index.js +21 -21
- package/src/runtime-pi/client/worker/Application.js +44 -44
- package/src/runtime-pi/client/worker/Context.js +7 -7
- package/src/runtime-pi/client/worker/Runtime.js +274 -268
- package/src/runtime-pi/client/worker/Workport.js +77 -85
- package/src/runtime-pi/client/worker/index.js +21 -21
- package/src/runtime-pi/index.js +13 -13
- package/src/runtime-pi/server/Application.js +100 -115
- package/src/runtime-pi/server/Context.js +15 -15
- package/src/runtime-pi/server/Router.js +159 -159
- package/src/runtime-pi/server/Runtime.js +557 -556
- package/src/runtime-pi/server/index.js +21 -21
- package/src/runtime-pi/util-http.js +85 -85
- package/src/runtime-pi/util-url.js +146 -146
- package/src/runtime-pi/xFormData.js +23 -23
- package/src/runtime-pi/xHeaders.js +145 -145
- package/src/runtime-pi/xRequest.js +45 -45
- package/src/runtime-pi/xRequestHeaders.js +108 -108
- package/src/runtime-pi/xResponse.js +32 -32
- package/src/runtime-pi/xResponseHeaders.js +116 -116
- package/src/runtime-pi/xURL.js +105 -105
- package/src/runtime-pi/xfetch.js +22 -22
- package/src/runtime-pi/xxHttpMessage.js +101 -101
- package/src/services-pi/cert/http-auth-hook.js +22 -22
- package/src/services-pi/cert/http-cleanup-hook.js +22 -22
- package/src/services-pi/cert/index.js +79 -79
- package/src/services-pi/index.js +8 -8
- package/src/static-pi/index.js +10 -10
- package/src/webflo.js +30 -30
- package/test/index.test.js +26 -26
- package/test/site/package.json +9 -9
- package/test/site/public/bundle.html +5 -5
- package/test/site/public/bundle.html.json +3 -3
- package/test/site/public/bundle.js +2 -2
- package/test/site/public/bundle.webflo.js +15 -15
- package/test/site/public/index.html +29 -29
- package/test/site/public/index1.html +34 -34
- package/test/site/public/page-2/bundle.html +4 -4
- package/test/site/public/page-2/bundle.js +2 -2
- package/test/site/public/page-2/index.html +45 -45
- package/test/site/public/page-2/main.html +2 -2
- package/test/site/public/page-4/subpage/bundle.js +2 -2
- package/test/site/public/page-4/subpage/index.html +30 -30
- package/test/site/public/sparoots.json +4 -4
- package/test/site/public/worker.js +3 -3
- package/test/site/server/index.js +15 -15
- package/src/runtime-pi/client/oohtml/full.js +0 -7
- package/src/runtime-pi/client/oohtml/namespacing.js +0 -7
- package/src/runtime-pi/client/oohtml/scripting.js +0 -8
- package/src/runtime-pi/client/oohtml/templating.js +0 -8
|
@@ -1,86 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
export default class Workport {
|
|
3
|
-
|
|
4
|
-
constructor() {
|
|
5
|
-
// --------
|
|
6
|
-
// Post messaging
|
|
7
|
-
// --------
|
|
8
|
-
this.messaging = {
|
|
9
|
-
post: (message, client = this.client) => {
|
|
10
|
-
if (!client) throw new Error(`No client for this operation.`);
|
|
11
|
-
client.postMessage(message);
|
|
12
|
-
return this
|
|
13
|
-
},
|
|
14
|
-
listen: (callback, client = this.client) => {
|
|
15
|
-
(client || self).addEventListener('message', evt => {
|
|
16
|
-
this.client = evt.source;
|
|
17
|
-
const response = callback(evt);
|
|
18
|
-
let responsePort = evt.ports[0];
|
|
19
|
-
if (responsePort) {
|
|
20
|
-
if (response instanceof Promise) {
|
|
21
|
-
response.then(data => {
|
|
22
|
-
responsePort.postMessage(data);
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
responsePort.postMessage(response);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return this
|
|
30
|
-
},
|
|
31
|
-
request: (message, client = this.client) => {
|
|
32
|
-
if (!client) throw new Error(`No client for this operation.`);
|
|
33
|
-
return new Promise(res => {
|
|
34
|
-
let messageChannel = new MessageChannel();
|
|
35
|
-
client.postMessage(message, [ messageChannel.port2 ]);
|
|
36
|
-
messageChannel.port1.onmessage = e => res(e.data);
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
channel(channelId) {
|
|
40
|
-
if (!this.channels.has(channelId)) { this.channels.set(channelId, new BroadcastChannel(channel)); }
|
|
41
|
-
let channel = this.channels.get(channelId);
|
|
42
|
-
return {
|
|
43
|
-
broadcast: message => channel.postMessage(message),
|
|
44
|
-
listen: callback => channel.addEventListener('message', callback),
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
channels: new Map,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// --------
|
|
51
|
-
// Notifications
|
|
52
|
-
// --------
|
|
53
|
-
this.notifications = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
setCurrentClient(client) {
|
|
83
|
-
this.client = client;
|
|
84
|
-
}
|
|
85
|
-
|
|
1
|
+
|
|
2
|
+
export default class Workport {
|
|
3
|
+
|
|
4
|
+
constructor() {
|
|
5
|
+
// --------
|
|
6
|
+
// Post messaging
|
|
7
|
+
// --------
|
|
8
|
+
this.messaging = {
|
|
9
|
+
post: (message, client = this.client) => {
|
|
10
|
+
if (!client) throw new Error(`No client for this operation.`);
|
|
11
|
+
client.postMessage(message);
|
|
12
|
+
return this;
|
|
13
|
+
},
|
|
14
|
+
listen: (callback, client = this.client) => {
|
|
15
|
+
(client || self).addEventListener('message', evt => {
|
|
16
|
+
this.client = evt.source;
|
|
17
|
+
const response = callback(evt);
|
|
18
|
+
let responsePort = evt.ports[0];
|
|
19
|
+
if (responsePort) {
|
|
20
|
+
if (response instanceof Promise) {
|
|
21
|
+
response.then(data => {
|
|
22
|
+
responsePort.postMessage(data);
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
responsePort.postMessage(response);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return this;
|
|
30
|
+
},
|
|
31
|
+
request: (message, client = this.client) => {
|
|
32
|
+
if (!client) throw new Error(`No client for this operation.`);
|
|
33
|
+
return new Promise(res => {
|
|
34
|
+
let messageChannel = new MessageChannel();
|
|
35
|
+
client.postMessage(message, [ messageChannel.port2 ]);
|
|
36
|
+
messageChannel.port1.onmessage = e => res(e.data);
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
channel(channelId) {
|
|
40
|
+
if (!this.channels.has(channelId)) { this.channels.set(channelId, new BroadcastChannel(channel)); }
|
|
41
|
+
let channel = this.channels.get(channelId);
|
|
42
|
+
return {
|
|
43
|
+
broadcast: message => channel.postMessage(message),
|
|
44
|
+
listen: callback => channel.addEventListener('message', callback),
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
channels: new Map,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// --------
|
|
51
|
+
// Notifications
|
|
52
|
+
// --------
|
|
53
|
+
this.notifications = {
|
|
54
|
+
handle: callback => {
|
|
55
|
+
self.addEventListener('notificationclick', e => e.waitUntil(callback(e)));
|
|
56
|
+
return this;
|
|
57
|
+
},
|
|
58
|
+
fire: (title, params = {}) => {
|
|
59
|
+
return self.registration.showNotification(title, params);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// --------
|
|
64
|
+
// Push Notifications
|
|
65
|
+
// --------
|
|
66
|
+
this.push = {
|
|
67
|
+
listen: callback => {
|
|
68
|
+
self.addEventListener('push', e => e.waitUntil(callback(e)));
|
|
69
|
+
return this;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
setCurrentClient(client) {
|
|
75
|
+
this.client = client;
|
|
76
|
+
}
|
|
77
|
+
|
|
86
78
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import Context from './Context.js';
|
|
6
|
-
import Application from './Application.js';
|
|
7
|
-
import Runtime from './Runtime.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @start
|
|
11
|
-
*/
|
|
12
|
-
export async function start(applicationInstance = null) {
|
|
13
|
-
const cx = this || {};
|
|
14
|
-
const defaultApplicationInstance = _cx => new Application(_cx);
|
|
15
|
-
return new Runtime(Context.create(cx), applicationInstance || defaultApplicationInstance);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @APIS
|
|
20
|
-
*/
|
|
21
|
-
export * as APIS from './Runtime.js';
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import Context from './Context.js';
|
|
6
|
+
import Application from './Application.js';
|
|
7
|
+
import Runtime from './Runtime.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @start
|
|
11
|
+
*/
|
|
12
|
+
export async function start(applicationInstance = null) {
|
|
13
|
+
const cx = this || {};
|
|
14
|
+
const defaultApplicationInstance = _cx => new Application(_cx);
|
|
15
|
+
return new Runtime(Context.create(cx), applicationInstance || defaultApplicationInstance);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @APIS
|
|
20
|
+
*/
|
|
21
|
+
export * as APIS from './Runtime.js';
|
package/src/runtime-pi/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import * as server from './server/index.js';
|
|
6
|
-
import * as client from './client/generate.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @exports
|
|
10
|
-
*/
|
|
11
|
-
export {
|
|
12
|
-
server,
|
|
13
|
-
client,
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import * as server from './server/index.js';
|
|
6
|
+
import * as client from './client/generate.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @exports
|
|
10
|
+
*/
|
|
11
|
+
export {
|
|
12
|
+
server,
|
|
13
|
+
client,
|
|
14
14
|
}
|
|
@@ -1,116 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* imports
|
|
4
|
-
*/
|
|
5
|
-
import Fs from 'fs';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
window.document.setState({
|
|
102
|
-
env: 'server',
|
|
103
|
-
}, { update: true });
|
|
104
|
-
}
|
|
105
|
-
window.document.setState({ data, url: httpEvent.url }, { update: 'merge' });
|
|
106
|
-
}
|
|
107
|
-
if (window.document.templates) {
|
|
108
|
-
window.document.body.setAttribute('template', 'routes/' + httpEvent.url.pathname.split('/').filter(a => a).map(a => a + '+-').join('/'));
|
|
109
|
-
}
|
|
110
|
-
await new Promise(res => setTimeout(res, 60));
|
|
111
|
-
return window;
|
|
112
|
-
});
|
|
113
|
-
return rendering + '';
|
|
114
|
-
}
|
|
115
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* imports
|
|
4
|
+
*/
|
|
5
|
+
import Fs from 'fs';
|
|
6
|
+
import Url from 'url';
|
|
7
|
+
import Path from 'path';
|
|
8
|
+
import QueryString from 'querystring';
|
|
9
|
+
import Router from './Router.js';
|
|
10
|
+
import _Application from '../Application.js';
|
|
11
|
+
|
|
12
|
+
export default class Application extends _Application {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Application
|
|
16
|
+
*
|
|
17
|
+
* @param Context cx
|
|
18
|
+
*/
|
|
19
|
+
constructor(cx) {
|
|
20
|
+
super(cx);
|
|
21
|
+
this.renderFileCache = {};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Returns router class
|
|
25
|
+
get Router() {
|
|
26
|
+
return Router;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Handles navigation events.
|
|
31
|
+
*
|
|
32
|
+
* @param NavigationEvent httpEvent
|
|
33
|
+
* @param Function remoteFetch
|
|
34
|
+
*
|
|
35
|
+
* @return Response
|
|
36
|
+
*/
|
|
37
|
+
async handle(httpEvent, remoteFetch) {
|
|
38
|
+
// The app router
|
|
39
|
+
const router = new this.Router(this.cx, httpEvent.url.pathname);
|
|
40
|
+
const handle = async () => {
|
|
41
|
+
return await router.route([httpEvent.request.method, 'default'], httpEvent, {}, async event => {
|
|
42
|
+
return router.file(event);
|
|
43
|
+
}, remoteFetch);
|
|
44
|
+
};
|
|
45
|
+
return (this.cx.middlewares || []).concat(handle).reverse().reduce((next, fn) => {
|
|
46
|
+
return () => fn.call(this.cx, httpEvent, router, next);
|
|
47
|
+
}, null)();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Renderer
|
|
51
|
+
async render(httpEvent, response) {
|
|
52
|
+
let data = await response.jsonfy();
|
|
53
|
+
const router = new this.Router(this.cx, httpEvent.url.pathname);
|
|
54
|
+
return router.route('render', httpEvent, data, async (httpEvent, data) => {
|
|
55
|
+
let renderFile, pathnameSplit = httpEvent.url.pathname.split('/');
|
|
56
|
+
while ((renderFile = Path.join(this.cx.CWD, this.cx.layout.PUBLIC_DIR, './' + pathnameSplit.join('/'), 'index.html'))
|
|
57
|
+
&& (this.renderFileCache[renderFile] === false/* false on previous runs */ || !Fs.existsSync(renderFile))) {
|
|
58
|
+
this.renderFileCache[renderFile] = false;
|
|
59
|
+
pathnameSplit.pop();
|
|
60
|
+
}
|
|
61
|
+
const dirPublic = Url.pathToFileURL( Path.resolve( Path.join(this.cx.CWD, this.cx.layout.PUBLIC_DIR) ) );
|
|
62
|
+
const instanceParams = QueryString.stringify({
|
|
63
|
+
file: renderFile,
|
|
64
|
+
url: dirPublic.href,// httpEvent.url.href,
|
|
65
|
+
root: this.cx.CWD,
|
|
66
|
+
});
|
|
67
|
+
const { window, document } = await import('@webqit/oohtml-ssr/src/instance.js?' + instanceParams);
|
|
68
|
+
await new Promise(res => {
|
|
69
|
+
if (document.readyState === 'complete') return res();
|
|
70
|
+
document.addEventListener('load', res);
|
|
71
|
+
});
|
|
72
|
+
if (window.webqit?.oohtml?.configs) {
|
|
73
|
+
const {
|
|
74
|
+
CONTEXT_API: { attr: contextConfig } = {},
|
|
75
|
+
BINDINGS_API: { api: bindingsConfig } = {},
|
|
76
|
+
HTML_IMPORTS: { attr: modulesContextAttrs } = {},
|
|
77
|
+
} = window.webqit.oohtml.configs;
|
|
78
|
+
if ( bindingsConfig ) {
|
|
79
|
+
document[ bindingsConfig.bind ]({
|
|
80
|
+
env: 'server',
|
|
81
|
+
state: this.cx.runtime,
|
|
82
|
+
...data
|
|
83
|
+
}, { diff: true });
|
|
84
|
+
}
|
|
85
|
+
if ( modulesContextAttrs ) {
|
|
86
|
+
const routingContext = document.body.querySelector(`[${ window.CSS.escape( contextConfig.contextname ) }="route"]`) || document.body;
|
|
87
|
+
routingContext.setAttribute( modulesContextAttrs.importscontext, '/' + `routes/${ httpEvent.url.pathname }`.split('/').map(a => a.trim()).filter(a => a).join('/'));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (window.webqit.$qCompilerImport) {
|
|
91
|
+
await new Promise(res => {
|
|
92
|
+
window.webqit.$qCompilerImport.then(res);
|
|
93
|
+
setTimeout(res, 300);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
await new Promise(res => setTimeout(res, 50));
|
|
97
|
+
return window;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
116
101
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
export default class Context extends
|
|
8
|
-
// env
|
|
9
|
-
get env() {
|
|
10
|
-
return this.dict.env || {};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
set env(value) {
|
|
14
|
-
this.dict.env = value;
|
|
15
|
-
}
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import _Context from '../../Context.js';
|
|
6
|
+
|
|
7
|
+
export default class Context extends _Context {
|
|
8
|
+
// env
|
|
9
|
+
get env() {
|
|
10
|
+
return this.dict.env || {};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
set env(value) {
|
|
14
|
+
this.dict.env = value;
|
|
15
|
+
}
|
|
16
16
|
}
|