queueobj 14.0.6 → 14.1.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.
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.
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "author": {
3
3
  "name": "Jim Manton"
4
4
  },
5
- "version": "14.0.6",
5
+ "version": "14.1.0",
6
6
  "bundleDependencies": [],
7
7
  "dependencies": {
8
- "base-queue": "^1.0.3",
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.6",
9
+ "version": "14.1.0",
10
10
  "bundleDependencies": [],
11
11
  "dependencies": {
12
- "base-queue": "^1.0.3",
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
@@ -94,7 +94,7 @@ qRequire.init().process({
94
94
  appender: "json_status",
95
95
  exclude_logMsg: ["debug", "silly", "info"], /* default [] */
96
96
  process_objects: [file_object],
97
- include_names: ["all", "status"],
97
+ include_status: ["new", "done"],
98
98
  data_to_process_array: file_data
99
99
  }).then((success) => {
100
100
  qRequire.logMsg({ msg: `test success: json status matching objects processed with no errors`.success.italic.bold, type: "success" })
@@ -92,9 +92,9 @@ 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
- exclude_names: ["all", "status"],
97
+ exclude_status: ["new", "done"],
98
98
  data_to_process_array: file_data
99
99
  }).then((success) => {
100
100
  qRequire.logMsg({ msg: `test success: json status non matching objects processed with no errors`.success.italic.bold, type: "success" })
@@ -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" })