theprogrammablemind 7.3.5-beta.30 → 7.3.5-beta.32

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 (3) hide show
  1. package/package.json +1 -1
  2. package/readme +7 -0
  3. package/runtime.js +14 -11
package/package.json CHANGED
@@ -61,6 +61,6 @@
61
61
  "json-stable-stringify": "^1.0.1",
62
62
  "node-fetch": "^2.6.1"
63
63
  },
64
- "version": "7.3.5-beta.30",
64
+ "version": "7.3.5-beta.32",
65
65
  "license": "ISC"
66
66
  }
package/readme CHANGED
@@ -144,3 +144,10 @@ Videos with more details can be found at <a href=http://thinktelligence.com/kms>
144
144
 
145
145
  This is a list of statement that will be processed using the given definitions
146
146
 
147
+ # Problems?
148
+
149
+ ## With WebPack?
150
+
151
+ Recent Webpack has an optimization that causes the code not to run like normal javascript. It manifest with errors about fs, or process or util not being defined so you need a polyfill. You can do that if you want or you can used the 4WP (for webpack) versions of this module, <a href='https://www.npmjs.com/package/theprogrammablemind_4wp'>TheProgrammableMind 4WP</a>
152
+
153
+
package/runtime.js CHANGED
@@ -1,15 +1,18 @@
1
+ const ArgumentParser = require('argparse').ArgumentParser
2
+ const fs = require('fs')
3
+
1
4
  module.exports = {
2
5
  process: {
3
- env: "Should not be called in the browser",
4
- exit: "Should not be called in the browser",
5
- stdin: "Should not be called in the browser",
6
- stdout: "Should not be called in the browser",
6
+ env: process.env,
7
+ exit: process.exit,
8
+ stdin: process.stdin,
9
+ stdout: process.stdout,
7
10
  },
8
- child_process: "Should not be called in the browser",
9
- fs: "Should not be called in the browser",
10
- ArgumentParser: "Should not be called in the browser",
11
- readline: "Should not be called in the browser",
12
- jsonDiff: "Should not be called in the browser",
13
- sortJson: "Should not be called in the browser",
14
- util: "Should not be called in the browser",
11
+ child_process: 'wtf',
12
+ fs,
13
+ ArgumentParser,
14
+ readline: require('readline'),
15
+ jsonDiff: require('json-diff'),
16
+ sortJson: require('sort-json'),
17
+ util: require('util'),
15
18
  }