queueobj 14.0.7 → 14.1.1

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/README.md CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
  Queue javascript objects dynamically then process the queue according to the appender. All appenders are handled synchronously.
9
9
 
10
+ ```
11
+
10
12
  Included tag appenders:
11
13
 
12
14
  * files - See if inputed files exists.
@@ -35,33 +37,33 @@ npm test
35
37
  General Setup Test
36
38
  ---------
37
39
  ```
38
- npm run test_files
39
- npm run test_all
40
- npm run test_top_one
41
- npm run test_bottom_one
42
- npm run test_func_all
43
- npm run test_status_matching
44
- npm run test_status_non_matching
45
- npm run test_name_matching
46
- npm run test_name_non_matching
47
- npm run test_version_matching
48
- npm run test_version_non_matching
49
- npm run test_json_all
50
- npm run test_json_top_one
51
- npm run test_json_bottom_one
52
- npm run test_json_func_all
53
- npm run test_json_status_matching
54
- npm run test_json_status_non_matching
55
- npm run test_json_version_matching
56
- npm run test_json_version_non_matching
57
- npm run test_json_name_matching
58
- npm run test_json_name_non_matching
40
+ npm run test_files
41
+ npm run test_all
42
+ npm run test_top_one
43
+ npm run test_bottom_one
44
+ npm run test_func_all
45
+ npm run test_status_matching
46
+ npm run test_status_non_matching
47
+ npm run test_name_matching
48
+ npm run test_name_non_matching
49
+ npm run test_version_matching
50
+ npm run test_version_non_matching
51
+ npm run test_json_all
52
+ npm run test_json_top_one
53
+ npm run test_json_bottom_one
54
+ npm run test_json_func_all
55
+ npm run test_json_status_matching
56
+ npm run test_json_status_non_matching
57
+ npm run test_json_version_matching
58
+ npm run test_json_version_non_matching
59
+ npm run test_json_name_matching
60
+ npm run test_json_name_non_matching
59
61
 
60
62
  ```
61
63
 
62
64
  Usage
63
65
  ---------
64
- ```js
66
+ ```
65
67
 
66
68
  var queue = require("queueobj");
67
69
 
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "author": {
3
3
  "name": "Jim Manton"
4
4
  },
5
- "version": "14.0.7",
5
+ "version": "14.1.1",
6
6
  "bundleDependencies": [],
7
7
  "dependencies": {
8
- "base-queue": "^1.0.4",
8
+ "base-queue": "^2.0.0",
9
9
  "chai": "^4.3.7",
10
10
  "colors": "^1.4.0",
11
11
  "diffler": "^2.0.4",
package/test/package.js CHANGED
@@ -6,10 +6,10 @@ const packageMock = {
6
6
  "author": {
7
7
  "name": "Jim Manton"
8
8
  },
9
- "version": "14.0.7",
9
+ "version": "14.1.1",
10
10
  "bundleDependencies": [],
11
11
  "dependencies": {
12
- "base-queue": "^1.0.4",
12
+ "base-queue": "^2.0.0",
13
13
  "chai": "^4.3.7",
14
14
  "colors": "^1.4.0",
15
15
  "diffler": "^2.0.4",
@@ -30,11 +30,9 @@ var file_object = class file_obj {
30
30
  // t.errors = true
31
31
  // t.error_msg = `some sort of error here`
32
32
  // }
33
- t.base_queue_process_function = t.a_cool_function
34
33
 
35
34
  t.do_checks = t.do_checks.bind(t)
36
- t.a_cool_function = t.a_cool_function.bind(t)
37
- t.base_queue_process_function = t.base_queue_process_function.bind(t)
35
+ t.process = t.process.bind(t)
38
36
 
39
37
  if (props.check) {
40
38
  t.do_checks()
@@ -78,13 +76,10 @@ var file_object = class file_obj {
78
76
  }
79
77
  }
80
78
 
81
- a_cool_function(callback) {
82
- let t = this
83
- t.log({ msg: `processing object id ${t.id} name(${t.name}) status(${t.status}). Do a bunch of stuff here.`.silly, type: "silly" })
84
- if (t.errors)
85
- callback({ error: { msg: t.error_msg } })
86
- else
87
- callback({ success: { msg: `id = ${t.id} name(${t.name}) status(${t.status})`}})
79
+ process(callback) {
80
+ let t = this, fname = "name_matching.test4.process"
81
+ t.log({ msg: `This object (${fname}) is id (${t.id}) name (${t.name}). Do stuff here`.bgBrightGreen, type: "info" })
82
+ callback({ success: { msg: `processing all ${t.name}` } })
88
83
  }
89
84
  }
90
85
 
@@ -92,7 +87,7 @@ var qRequire = new file_queue()
92
87
 
93
88
  qRequire.init().process({
94
89
  appender: "json_name",
95
- exclude_logMsg: ["debug", "silly", "info"], /* default [] */
90
+ exclude_logMsg: ["debug"], /* default [] */
96
91
  process_objects: [file_object],
97
92
  include_names: ["all", "status", "version"],
98
93
  data_to_process_array: file_data
@@ -30,11 +30,9 @@ var file_object = class file_obj {
30
30
  // t.errors = true
31
31
  // t.error_msg = `some sort of error here`
32
32
  // }
33
- t.base_queue_process_function = t.a_cool_function
34
33
 
35
34
  t.do_checks = t.do_checks.bind(t)
36
- t.a_cool_function = t.a_cool_function.bind(t)
37
- t.base_queue_process_function = t.base_queue_process_function.bind(t)
35
+ t.process = t.process.bind(t)
38
36
 
39
37
  if (props.check) {
40
38
  t.do_checks()
@@ -78,13 +76,10 @@ var file_object = class file_obj {
78
76
  }
79
77
  }
80
78
 
81
- a_cool_function(callback) {
82
- let t = this
83
- t.log({ msg: `processing object id ${t.id} name(${t.name}) status(${t.status}). Do a bunch of stuff here.`.silly, type: "silly" })
84
- if (t.errors)
85
- callback({ error: { msg: t.error_msg } })
86
- else
87
- callback({ success: { msg: `id = ${t.id} name(${t.name}) status(${t.status})`}})
79
+ process(callback) {
80
+ let t = this, fname = "name_matching.test4.process"
81
+ t.log({ msg: `This object (${fname}) is id (${t.id}) name (${t.name}). Do stuff here`.bgBrightGreen, type: "info" })
82
+ callback({ success: { msg: `processing all ${t.name}` } })
88
83
  }
89
84
  }
90
85
 
@@ -92,7 +87,7 @@ var qRequire = new file_queue()
92
87
 
93
88
  qRequire.init().process({
94
89
  appender: "json_name",
95
- exclude_logMsg: ["debug", "silly", "info"], /* default [] */
90
+ exclude_logMsg: [], /* default [] */
96
91
  process_objects: [file_object],
97
92
  exclude_names: ["all", "status", "version"],
98
93
  data_to_process_array: file_data
@@ -92,7 +92,7 @@ var qRequire = new file_queue()
92
92
 
93
93
  qRequire.init().process({
94
94
  appender: "json_status",
95
- exclude_logMsg: ["debug", "silly", "info"], /* default [] */
95
+ exclude_logMsg: ["debug"], /* default [] */
96
96
  process_objects: [file_object],
97
97
  exclude_status: ["new", "done"],
98
98
  data_to_process_array: file_data
@@ -97,7 +97,7 @@ qRequire.init().process({
97
97
  include_version: ["2.00", "4.00"],
98
98
  data_to_process_array: file_data
99
99
  }).then((success) => {
100
- qRequire.logMsg({ msg: `test success: json_version objects processed with no errors`.success.italic.bold, type: "success" })
100
+ qRequire.logMsg({ msg: `test success: json version matching objects processed with no errors`.success.italic.bold, type: "success" })
101
101
  }, (error) => {
102
102
  if (typeof error == "string") {
103
103
  qRequire.logMsg({ msg: `error: ${error}`.error.italic.bold, type: "error" })
@@ -94,10 +94,10 @@ qRequire.init().process({
94
94
  appender: "json_version",
95
95
  exclude_logMsg: ["debug", "silly", "info"], /* default [] */
96
96
  process_objects: [file_object],
97
- include_version: ["2.00", "4.00"],
97
+ exclude_version: ["2.00", "4.00"],
98
98
  data_to_process_array: file_data
99
99
  }).then((success) => {
100
- qRequire.logMsg({ msg: `test success: json_version objects processed with no errors`.success.italic.bold, type: "success" })
100
+ qRequire.logMsg({ msg: `test success: json version non matching objects processed with no errors`.success.italic.bold, type: "success" })
101
101
  }, (error) => {
102
102
  if (typeof error == "string") {
103
103
  qRequire.logMsg({ msg: `error: ${error}`.error.italic.bold, type: "error" })