repzo 1.0.79 → 1.0.80
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/lib/index.js +22 -11
- package/lib/types/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/index.ts +21 -11
package/lib/index.js
CHANGED
|
@@ -2061,6 +2061,8 @@ Repzo.CommandLog = class {
|
|
|
2061
2061
|
this.processedAt = command_log.processedAt;
|
|
2062
2062
|
this.onGoing = command_log.onGoing || false;
|
|
2063
2063
|
this.trigger = command_log.trigger;
|
|
2064
|
+
this.sync_details = command_log.sync_details;
|
|
2065
|
+
this.error_details = command_log.error_details;
|
|
2064
2066
|
// this.priority = command_log.priority
|
|
2065
2067
|
// ? command_log.priority
|
|
2066
2068
|
// : this.priority
|
|
@@ -2086,10 +2088,12 @@ Repzo.CommandLog = class {
|
|
|
2086
2088
|
} else {
|
|
2087
2089
|
this.error = error;
|
|
2088
2090
|
}
|
|
2089
|
-
this.error_details
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2091
|
+
this.error_details = [
|
|
2092
|
+
{
|
|
2093
|
+
timestamp: Date.now(),
|
|
2094
|
+
error: this.error,
|
|
2095
|
+
},
|
|
2096
|
+
];
|
|
2093
2097
|
return this;
|
|
2094
2098
|
}
|
|
2095
2099
|
switch (status) {
|
|
@@ -2123,7 +2127,12 @@ Repzo.CommandLog = class {
|
|
|
2123
2127
|
setBody(body) {
|
|
2124
2128
|
this.body = body;
|
|
2125
2129
|
if (!this.sync_details) this.sync_details = [];
|
|
2126
|
-
this.sync_details
|
|
2130
|
+
this.sync_details = [
|
|
2131
|
+
{
|
|
2132
|
+
timestamp: Date.now(),
|
|
2133
|
+
body: this.body,
|
|
2134
|
+
},
|
|
2135
|
+
];
|
|
2127
2136
|
return this;
|
|
2128
2137
|
}
|
|
2129
2138
|
setMeta(meta) {
|
|
@@ -2173,13 +2182,15 @@ Repzo.CommandLog = class {
|
|
|
2173
2182
|
return this;
|
|
2174
2183
|
}
|
|
2175
2184
|
addDetail(detail, meta) {
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2185
|
+
if (!this.details) this.details = [];
|
|
2186
|
+
this.details = [
|
|
2187
|
+
{
|
|
2188
|
+
timestamp: Date.now(),
|
|
2189
|
+
content: detail,
|
|
2190
|
+
meta,
|
|
2191
|
+
},
|
|
2192
|
+
];
|
|
2180
2193
|
this.message = detail;
|
|
2181
|
-
if (meta) d.meta = meta;
|
|
2182
|
-
this.details.push(d);
|
|
2183
2194
|
return this;
|
|
2184
2195
|
}
|
|
2185
2196
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7519,6 +7519,18 @@ export declare namespace Service {
|
|
|
7519
7519
|
onGoing?: boolean;
|
|
7520
7520
|
retries?: number;
|
|
7521
7521
|
trigger?: string;
|
|
7522
|
+
sync_details: {
|
|
7523
|
+
timestamp: number;
|
|
7524
|
+
body: {
|
|
7525
|
+
[key: string]: any;
|
|
7526
|
+
};
|
|
7527
|
+
}[];
|
|
7528
|
+
error_details: {
|
|
7529
|
+
timestamp: number;
|
|
7530
|
+
error: {
|
|
7531
|
+
[key: string]: any;
|
|
7532
|
+
};
|
|
7533
|
+
}[];
|
|
7522
7534
|
createdAt: string;
|
|
7523
7535
|
updatedAt: string;
|
|
7524
7536
|
__v: number;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2837,10 +2837,13 @@ export default class Repzo {
|
|
|
2837
2837
|
} else {
|
|
2838
2838
|
this.error = error;
|
|
2839
2839
|
}
|
|
2840
|
-
this.error_details
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2840
|
+
this.error_details = [
|
|
2841
|
+
{
|
|
2842
|
+
timestamp: Date.now(),
|
|
2843
|
+
error: this.error,
|
|
2844
|
+
},
|
|
2845
|
+
];
|
|
2846
|
+
|
|
2844
2847
|
return this;
|
|
2845
2848
|
}
|
|
2846
2849
|
switch (status) {
|
|
@@ -2874,7 +2877,12 @@ export default class Repzo {
|
|
|
2874
2877
|
setBody(body: any) {
|
|
2875
2878
|
this.body = body;
|
|
2876
2879
|
if (!this.sync_details) this.sync_details = [];
|
|
2877
|
-
this.sync_details
|
|
2880
|
+
this.sync_details = [
|
|
2881
|
+
{
|
|
2882
|
+
timestamp: Date.now(),
|
|
2883
|
+
body: this.body,
|
|
2884
|
+
},
|
|
2885
|
+
];
|
|
2878
2886
|
return this;
|
|
2879
2887
|
}
|
|
2880
2888
|
setMeta(meta: any) {
|
|
@@ -2924,13 +2932,15 @@ export default class Repzo {
|
|
|
2924
2932
|
return this;
|
|
2925
2933
|
}
|
|
2926
2934
|
addDetail(detail: string, meta?: any) {
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2935
|
+
if (!this.details) this.details = [];
|
|
2936
|
+
this.details = [
|
|
2937
|
+
{
|
|
2938
|
+
timestamp: Date.now(),
|
|
2939
|
+
content: detail,
|
|
2940
|
+
meta,
|
|
2941
|
+
},
|
|
2942
|
+
];
|
|
2931
2943
|
this.message = detail;
|
|
2932
|
-
if (meta) d.meta = meta;
|
|
2933
|
-
this.details.push(d);
|
|
2934
2944
|
return this;
|
|
2935
2945
|
}
|
|
2936
2946
|
};
|