theprogrammablemind 7.3.2-beta.2 → 7.3.2-beta.4

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/client.js +7 -2
  2. package/package.json +33 -33
  3. package/src/config.js +2 -0
package/client.js CHANGED
@@ -21,8 +21,12 @@ let fs
21
21
  let ArgumentParser
22
22
 
23
23
  const setupLibs = () => {
24
- fs = require('fs')
25
- ArgumentParser = require('argparse').ArgumentParser
24
+ if (!fs) {
25
+ fs = require('fs')
26
+ }
27
+ if (!ArgumentParser) {
28
+ ArgumentParser = require('argparse').ArgumentParser
29
+ }
26
30
  }
27
31
 
28
32
  if (isJest()) {
@@ -1491,6 +1495,7 @@ const test = (name) => {
1491
1495
  */
1492
1496
 
1493
1497
  const ensureTestFile = (module, name, type) => {
1498
+ setupLibs()
1494
1499
  const isProcess = require.main === module
1495
1500
  if (isProcess) {
1496
1501
  const fn = `./${name}.${type}.json`
package/package.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "license": "ISC",
3
2
  "files": [
4
3
  "client.js",
5
4
  "index.js",
@@ -15,42 +14,45 @@
15
14
  "src/generators.js",
16
15
  "src/semantics.js"
17
16
  ],
18
- "main": "index.js",
19
- "name": "theprogrammablemind",
20
- "dependencies": {
21
- "base-64": "^1.0.0",
22
- "deep-equal": "^2.0.4",
23
- "node-fetch": "^2.6.1",
24
- "json-diff": "^1.0.3",
25
- "json-stable-stringify": "^1.0.1",
26
- "scriptjs": "^2.5.9",
27
- "readline": "^1.3.0",
28
- "lodash": "^4.17.20",
29
- "sort-json": "^2.0.0",
30
- "uuid": "^8.3.2",
31
- "underscore": "^1.13.1",
32
- "fs": "0.0.1-security"
17
+ "devDependencies": {
18
+ "eslint-config-standard": "^16.0.3",
19
+ "eslint-plugin-import": "^2.23.4",
20
+ "@typescript-eslint/parser": "^4.28.4",
21
+ "eslint-plugin-node": "^11.1.0",
22
+ "eslint-plugin-promise": "^5.1.0",
23
+ "eslint": "^7.31.0",
24
+ "jest": "^26.6.3",
25
+ "@typescript-eslint/eslint-plugin": "^4.28.4"
33
26
  },
27
+ "license": "ISC",
34
28
  "scripts": {
35
- "test": "jest --config ./jest.config.json",
36
29
  "tod": "node inspect node_modules/.bin/jest --runInBand -t NEO",
30
+ "to:debug": "node inspect node_modules/.bin/jest --runInBand -t NEO",
31
+ "to": "node node_modules/.bin/jest --runInBand -t NEO",
32
+ "test:watch": "npm run test -- --watch",
37
33
  "lint:fix": "eslint \"**/*.js\" --fix",
38
34
  "lint": "eslint \"**/*.js\"",
39
- "to": "node node_modules/.bin/jest --runInBand -t NEO",
40
- "test:debug": "node inspect node_modules/.bin/jest --runInBand --config ./jest.config.json",
41
- "to:debug": "node inspect node_modules/.bin/jest --runInBand -t NEO",
42
- "test:watch": "npm run test -- --watch"
35
+ "test": "jest --config ./jest.config.json",
36
+ "test:debug": "node inspect node_modules/.bin/jest --runInBand --config ./jest.config.json"
43
37
  },
44
- "devDependencies": {
45
- "eslint-plugin-node": "^11.1.0",
46
- "jest": "^26.6.3",
47
- "@typescript-eslint/eslint-plugin": "^4.28.4",
48
- "eslint-plugin-promise": "^5.1.0",
49
- "@typescript-eslint/parser": "^4.28.4",
50
- "eslint-plugin-import": "^2.23.4",
51
- "eslint": "^7.31.0",
52
- "eslint-config-standard": "^16.0.3"
38
+ "author": "dev@thinktelligence.com",
39
+ "dependencies": {
40
+ "sort-json": "^2.0.0",
41
+ "json-diff": "^1.0.3",
42
+ "base-64": "^1.0.0",
43
+ "uuid": "^8.3.2",
44
+ "lodash": "^4.17.20",
45
+ "scriptjs": "^2.5.9",
46
+ "json-stable-stringify": "^1.0.1",
47
+ "fs": "0.0.1-security",
48
+ "readline": "^1.3.0",
49
+ "underscore": "^1.13.1",
50
+ "node-fetch": "^2.6.1",
51
+ "deep-equal": "^2.0.4"
53
52
  },
53
+ "main": "index.js",
54
+ "version": "7.3.2-beta.4",
55
+ "name": "theprogrammablemind",
54
56
  "keywords": [
55
57
  "NLP",
56
58
  "NLU",
@@ -59,7 +61,5 @@
59
61
  "natural language generation",
60
62
  "natural language understanding",
61
63
  "chatbot"
62
- ],
63
- "author": "dev@thinktelligence.com",
64
- "version": "7.3.2-beta.2"
64
+ ]
65
65
  }
package/src/config.js CHANGED
@@ -1230,10 +1230,12 @@ class Config {
1230
1230
  return true
1231
1231
  }
1232
1232
 
1233
+ /*
1233
1234
  dump(fn) {
1234
1235
  const fs = require('fs')
1235
1236
  fs.writeFileSync(fn, JSON.stringify(this.config, 0, 2))
1236
1237
  }
1238
+ */
1237
1239
 
1238
1240
  copy (options = {}) {
1239
1241
  this.valid()