@temporalio/activity
Advanced tools
Comparing version 0.1.5 to 0.2.0
@@ -49,3 +49,7 @@ /** | ||
*/ | ||
/// <reference types="node" /> | ||
import { AsyncLocalStorage } from 'async_hooks'; | ||
import { AbortSignal } from 'abort-controller'; | ||
/** @ignore */ | ||
export declare const asyncLocalStorage: AsyncLocalStorage<Context>; | ||
/** | ||
@@ -52,0 +56,0 @@ * Thrown in an Activity when the Activity is cancelled while awaiting {@link Context.cancelled}. |
@@ -51,4 +51,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Context = exports.CancellationError = void 0; | ||
const internals_1 = require("./internals"); | ||
exports.Context = exports.CancellationError = exports.asyncLocalStorage = void 0; | ||
const async_hooks_1 = require("async_hooks"); | ||
/** @ignore */ | ||
exports.asyncLocalStorage = new async_hooks_1.AsyncLocalStorage(); | ||
/** | ||
@@ -90,3 +92,3 @@ * Thrown in an Activity when the Activity is cancelled while awaiting {@link Context.cancelled}. | ||
static current() { | ||
const store = internals_1.asyncLocalStorage.getStore(); | ||
const store = exports.asyncLocalStorage.getStore(); | ||
if (store === undefined) { | ||
@@ -93,0 +95,0 @@ throw new Error('Activity context not initialized'); |
{ | ||
"name": "@temporalio/activity", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "Temporal.io SDK Activity sub-package", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "04add82114c495399c4c5d438ea1ce161673fd8b" | ||
"gitHead": "5489bd5bac5ba5c2142c0bb5a081d0eeb90fa53e" | ||
} |
@@ -50,5 +50,8 @@ /** | ||
import { AsyncLocalStorage } from 'async_hooks'; | ||
import { AbortSignal } from 'abort-controller'; | ||
import { asyncLocalStorage } from './internals'; | ||
/** @ignore */ | ||
export const asyncLocalStorage = new AsyncLocalStorage<Context>(); | ||
/** | ||
@@ -55,0 +58,0 @@ * Thrown in an Activity when the Activity is cancelled while awaiting {@link Context.cancelled}. |
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
2
103575
8
473