Skip to content

Commit b83a577

Browse files
authored
Merge pull request #184 from Azure/dev
Merge dev into master for 1.4.1 release
2 parents f5a44af + 5765989 commit b83a577

18 files changed

+48
-6
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "durable-functions",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Durable Functions library for Node.js Azure Functions",
55
"license": "MIT",
66
"repository": {
@@ -20,7 +20,8 @@
2020
"clean": "rimraf lib",
2121
"lint": "tslint --project tsconfig.json --config tslint.json --force --format verbose \"src/**/*.ts\"",
2222
"lint:test": "tslint --force --format verbose \"test/**/*.ts\"",
23-
"build": "npm run clean && npm run lint && npm run lint:test && echo Using TypeScript && tsc --version && tsc --pretty && echo Done",
23+
"stripInternalDocs": "tsc --pretty -p tsconfig.nocomments",
24+
"build": "npm run clean && npm run lint && npm run lint:test && echo Using TypeScript && tsc --version && tsc --pretty && npm run stripInternalDocs && echo Done",
2425
"test": "npm run build && mocha --recursive ./lib/test/**/*-spec.js",
2526
"watch": "npm run build -- --watch",
2627
"watch:test": "npm run test -- --watch",

src/actions/iaction.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ActionType } from "../classes";
22

3+
/** @hidden */
34
export interface IAction {
45
actionType: ActionType;
56
}

src/aggregatederror.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @hidden */
12
const separator = "-----------------------------------";
23

34
/**

src/durableorchestrationclient.ts

+7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
import { HttpRequest } from "@azure/functions";
44
import axios, { AxiosInstance, AxiosResponse } from "axios";
5+
/** @hidden */
56
import cloneDeep = require("lodash/cloneDeep");
7+
/** @hidden */
68
import process = require("process");
9+
/** @hidden */
710
import url = require("url");
811
import { isURL } from "validator";
912
import { Constants, DurableOrchestrationStatus, EntityId, EntityStateResponse,
@@ -13,6 +16,7 @@ import { Constants, DurableOrchestrationStatus, EntityId, EntityStateResponse,
1316
} from "./classes";
1417
import { WebhookUtils } from "./webhookutils";
1518

19+
/** @hidden */
1620
const URL = url.URL;
1721

1822
/**
@@ -41,6 +45,7 @@ export function getClient(context: unknown): DurableOrchestrationClient {
4145
return new DurableOrchestrationClient(clientData);
4246
}
4347

48+
/** @hidden */
4449
function getClientData(context: IOrchestrationFunctionContext): OrchestrationClientInputData {
4550
if (context.bindings) {
4651
const matchingInstances = Object.keys(context.bindings)
@@ -55,6 +60,7 @@ function getClientData(context: IOrchestrationFunctionContext): OrchestrationCli
5560
throw new Error("An orchestration client function must have an orchestrationClient input binding. Check your function.json definition.");
5661
}
5762

63+
/** @hidden */
5864
function correctClientData(clientData: OrchestrationClientInputData): OrchestrationClientInputData {
5965
const returnValue = cloneDeep(clientData);
6066

@@ -64,6 +70,7 @@ function correctClientData(clientData: OrchestrationClientInputData): Orchestrat
6470
return returnValue;
6571
}
6672

73+
/** @hidden */
6774
function correctUrls(obj: { [key: string]: string }): { [key: string]: string } {
6875
const returnValue = cloneDeep(obj);
6976

src/durableorchestrationcontext.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export class DurableOrchestrationContext {
5050
public currentUtcDateTime: Date;
5151

5252
/**
53-
*
53+
* Just an entry point to reference the methods in [[ITaskMethods]].
54+
* Methods to handle collections of pending actions represented by [[Task]]
55+
* instances. For use in parallelization operations.
5456
*/
5557
public Task: ITaskMethods;
5658

src/entities/durablelock.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @hidden
23
* For use with locking operations.
34
* TODO: improve this
45
*/

src/entities/lockstate.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { EntityId } from "../classes";
22

33
/**
4+
* @hidden
45
* Returned by [DurableOrchestrationContext].[isLocked] and
56
* [DurableEntityContext].[isLocked].
67
*/

src/entities/signal.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { EntityId } from "../classes";
22

3+
/** @hidden */
34
export class Signal {
45
constructor(
56
public readonly target: EntityId,

src/guidmanager.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as crypto from "crypto";
2+
/** @hidden */
23
import uuidv5 = require("uuid/v5");
34
import { Utils } from "./classes";
45

@@ -25,6 +26,7 @@ export class GuidManager {
2526
}
2627
}
2728

29+
/** @hidden */
2830
enum DeterministicGuidVersion {
2931
V3 = 0,
3032
V5 = 1,

src/orchestrationfailureerror.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { OrchestratorState } from "./classes";
2-
2+
/** @hidden */
33
const outOfProcDataLabel = "\n\n$OutOfProcData$:";
44

55
/**
6+
* @hidden
67
* A wrapper for all errors thrown within an orchestrator function. This exception will embed
78
* the orchestrator state in a way that the C# extension knows how to read so that it can replay the
89
* actions scheduled before throwing an exception. This prevents non-determinism errors in Durable Task.

src/tasks/task.ts

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import { TaskBase } from "./taskinterfaces";
1010
* [[DurableOrchestrationContext]] operation is not called with `yield`. They
1111
* are useful for parallelization and timeout operations in conjunction with
1212
* Task.all and Task.any.
13+
*
14+
* We discourage the usage of `instanceof`-style guards on this type,
15+
* as it is subject to change in the future.
1316
*
1417
* @example Wait for all parallel operations to complete
1518
* ```javascript
@@ -35,6 +38,7 @@ import { TaskBase } from "./taskinterfaces";
3538
*/
3639
export class Task implements TaskBase {
3740
/**
41+
* @hidden
3842
* Used to keep track of how many times the task has been yielded to avoid
3943
* scheduling the internal action multiple times _Internal use only._
4044
*/
@@ -52,6 +56,7 @@ export class Task implements TaskBase {
5256
*/
5357
public readonly isFaulted: boolean,
5458
/**
59+
* @hidden
5560
* The scheduled action represented by the task. _Internal use only._
5661
*/
5762
public readonly action: IAction,
@@ -60,10 +65,12 @@ export class Task implements TaskBase {
6065
*/
6166
public readonly result?: unknown,
6267
/**
68+
* @hidden
6369
* The timestamp of the task.
6470
*/
6571
public readonly timestamp?: Date,
6672
/**
73+
* @hidden
6774
* The ID number of the task. _Internal use only._
6875
*/
6976
public readonly id?: number,
@@ -75,12 +82,14 @@ export class Task implements TaskBase {
7582
public readonly exception?: Error | undefined,
7683

7784
/**
85+
* @hidden
7886
* The index in the history state where the task was marked completed. _Internal use only._
7987
*/
8088
public readonly completionIndex?: number,
8189
) { }
8290

8391
/**
92+
* @hidden
8493
* _Internal use only._
8594
*/
8695
public yieldNewActions(): IAction[] {

src/tasks/taskfactory.ts

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { TaskBase} from "./taskinterfaces";
44
import { TaskSet } from "./taskset";
55
import { TimerTask } from "./timertask";
66

7+
/** @hidden */
78
export class TaskFactory {
89
public static UncompletedTask(action: IAction): Task {
910
return new Task(false, false, action);

src/tasks/taskfilter.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Task } from "./task";
22
import { CompletedTask, FailedTask, SuccessfulTask, TaskBase, UncompletedTask } from "./taskinterfaces";
33
import { TaskSet } from "./taskset";
44

5+
/** @hidden */
56
export class TaskFilter {
67
public static CompareFinishedTime(taskA: CompletedTask, taskB: CompletedTask) {
78
if (taskA.completionIndex > taskB.completionIndex) { return 1; }

src/tasks/taskinterfaces.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
import { IAction } from "../classes";
22

33
// Base interfaces
4+
/** @hidden */
45
export interface TaskBase {
56
readonly isCompleted: boolean;
67
readonly isFaulted: boolean;
78
yieldNewActions(): IAction[];
89
}
910

11+
/** @hidden */
1012
export interface UncompletedTask extends TaskBase {
1113
readonly isCompleted: false;
1214
readonly isFaulted: false;
1315
}
1416

17+
/** @hidden */
1518
export interface CompletedTask extends TaskBase {
1619
readonly completionIndex: number;
1720
readonly isCompleted: true;
1821
readonly result: unknown | undefined;
1922
}
2023

24+
/** @hidden */
2125
export interface SuccessfulTask extends CompletedTask {
2226
readonly isFaulted: false;
2327
readonly result: unknown;
2428
readonly exception: undefined;
2529
}
2630

31+
/** @hidden */
2732
export interface FailedTask extends CompletedTask {
2833
readonly isFaulted: true;
2934
readonly exception: Error;

src/tasks/timertask.ts

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class TimerTask extends Task {
4545
constructor(
4646
isCompleted: boolean,
4747
/**
48+
* @hidden
4849
* The scheduled action represented by the task. _Internal use only._
4950
*/
5051
public readonly action: CreateTimerAction,

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"noImplicitAny": true,
88
"outDir": "./lib",
99
"preserveConstEnums": true,
10-
"removeComments": true,
10+
"removeComments": false,
1111
"target": "es6",
1212
"sourceMap": true,
1313
"experimentalDecorators": true,

tsconfig.nocomments

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"declaration": false,
5+
"removeComments": true
6+
}
7+
}

0 commit comments

Comments
 (0)