@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -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.4.1";
1
+ export declare const HATCHET_VERSION = "1.5.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '1.4.1';
4
+ exports.HATCHET_VERSION = '1.5.0';