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 +2 -0
- package/package.json +2 -2
- package/test/package.js +2 -2
- package/tests/json_name_matching.js +6 -11
- package/tests/json_name_non_matching.js +6 -11
- package/tests/json_status_matching.js +1 -1
- package/tests/json_status_non_matching.js +2 -2
- package/tests/json_version_matching.js +1 -1
- package/tests/json_version_non_matching.js +2 -2
package/README.md
CHANGED
package/package.json
CHANGED
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
|
|
9
|
+
"version": "14.1.0",
|
|
10
10
|
"bundleDependencies": [],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"base-queue": "^
|
|
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.
|
|
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
|
-
|
|
82
|
-
let t = this
|
|
83
|
-
t.log({ msg: `
|
|
84
|
-
|
|
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"
|
|
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.
|
|
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
|
-
|
|
82
|
-
let t = this
|
|
83
|
-
t.log({ msg: `
|
|
84
|
-
|
|
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: [
|
|
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
|
-
|
|
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"
|
|
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
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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" })
|