@hatchet-dev/typescript-sdk 1.4.1 → 1.5.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/clients/rest/generated/Api.d.ts +4 -0
- package/package.json +1 -1
- package/v1/client/worker/context.js +13 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -966,6 +966,10 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
966
966
|
* @maxLength 36
|
|
967
967
|
*/
|
|
968
968
|
workflowId?: string;
|
|
969
|
+
/** The workflow name to get runs for. */
|
|
970
|
+
workflowName?: string;
|
|
971
|
+
/** The cron name to get runs for. */
|
|
972
|
+
cronName?: string;
|
|
969
973
|
/**
|
|
970
974
|
* A list of metadata key value pairs to filter by
|
|
971
975
|
* @example ["key1:value1","key2:value2"]
|
package/package.json
CHANGED
|
@@ -166,6 +166,19 @@ class Context {
|
|
|
166
166
|
this.logger.warn('cannot log from context without stepRunId');
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
+
const logger = this.v1.config.logger('ctx', this.v1.config.log_level);
|
|
170
|
+
if (!level || level === 'INFO') {
|
|
171
|
+
logger.info(message);
|
|
172
|
+
}
|
|
173
|
+
else if (level === 'DEBUG') {
|
|
174
|
+
logger.debug(message);
|
|
175
|
+
}
|
|
176
|
+
else if (level === 'WARN') {
|
|
177
|
+
logger.warn(message);
|
|
178
|
+
}
|
|
179
|
+
else if (level === 'ERROR') {
|
|
180
|
+
logger.error(message);
|
|
181
|
+
}
|
|
169
182
|
// FIXME: this is a hack to get around the fact that the log level is not typed
|
|
170
183
|
this.v1.event.putLog(stepRunId, message, level);
|
|
171
184
|
}
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.5.0";
|
package/version.js
CHANGED