sptc 0.0.13 → 0.0.15
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/engine/index.js +1 -1
- package/engine/interpreter.js +7 -1
- package/package.json +1 -1
package/engine/index.js
CHANGED
package/engine/interpreter.js
CHANGED
|
@@ -2,7 +2,8 @@ const _module=require('module')
|
|
|
2
2
|
const vm=require('vm')
|
|
3
3
|
const path=require('path')
|
|
4
4
|
const Compiler=require('./compiler')
|
|
5
|
-
const
|
|
5
|
+
const Utils=require('../utils')
|
|
6
|
+
const {generate_uuid, PromiseWithResolvers}=Utils
|
|
6
7
|
|
|
7
8
|
/*
|
|
8
9
|
const tt={x: 2, b: [2, 5], c: _=>2, d: /xx/ig}
|
|
@@ -125,6 +126,7 @@ function securityPatch() {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
const NOOP=_=>null
|
|
129
|
+
const Application={}
|
|
128
130
|
function buildContext(ctx0, option) {
|
|
129
131
|
|
|
130
132
|
const {
|
|
@@ -155,6 +157,10 @@ function buildContext(ctx0, option) {
|
|
|
155
157
|
isMaster: !masterPriv,
|
|
156
158
|
})
|
|
157
159
|
|
|
160
|
+
ctx.Application=Application
|
|
161
|
+
|
|
162
|
+
ctx.Utils=Utils
|
|
163
|
+
|
|
158
164
|
// Dynamically set the cache configuration.
|
|
159
165
|
ctx.configSptcFileCache=(cacheVersion, cacheSeconds)=>{
|
|
160
166
|
if(!isEntry) {
|