@tsed/temporal 7.70.2 → 7.71.1
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/jest.config.js +3 -1
- package/lib/cjs/TemporalModule.js +6 -6
- package/lib/cjs/TemporalModule.js.map +1 -1
- package/lib/cjs/decorators/activity.js +2 -2
- package/lib/cjs/decorators/activity.js.map +1 -1
- package/lib/cjs/decorators/temporal.js +2 -2
- package/lib/cjs/decorators/temporal.js.map +1 -1
- package/lib/cjs/index.js +11 -11
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/worker.js +2 -2
- package/lib/cjs/utils/worker.js.map +1 -1
- package/lib/esm/TemporalModule.js.map +1 -1
- package/lib/esm/decorators/activity.js.map +1 -1
- package/lib/esm/decorators/temporal.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/worker.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/TemporalModule.d.ts +1 -1
- package/lib/types/decorators/activity.d.ts +1 -1
- package/lib/types/index.d.ts +9 -9
- package/package.json +7 -7
- package/readme.md +7 -4
- package/src/TemporalModule.ts +3 -3
- package/src/decorators/activity.spec.ts +2 -2
- package/src/decorators/activity.ts +1 -1
- package/src/decorators/temporal.spec.ts +1 -1
- package/src/decorators/temporal.ts +1 -1
- package/src/index.ts +9 -10
- package/src/utils/worker.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Logger } from "@tsed/common";
|
|
2
2
|
import { InjectorService } from "@tsed/di";
|
|
3
|
-
import { TemporalClient } from "./services/TemporalFactory";
|
|
3
|
+
import { TemporalClient } from "./services/TemporalFactory.js";
|
|
4
4
|
export declare class TemporalModule {
|
|
5
5
|
private temporalServices;
|
|
6
6
|
protected logger: Logger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActivityOptions } from "../interfaces/TemporalStore";
|
|
1
|
+
import { ActivityOptions } from "../interfaces/TemporalStore.js";
|
|
2
2
|
export declare function Activity(options?: ActivityOptions): MethodDecorator;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./decorators/
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./interfaces/TemporalStore";
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./utils/worker";
|
|
4
|
+
export * from "./constants.js";
|
|
5
|
+
export * from "./decorators/activity.js";
|
|
6
|
+
export * from "./decorators/temporal.js";
|
|
7
|
+
export * from "./interfaces/interfaces.js";
|
|
8
|
+
export * from "./interfaces/TemporalStore.js";
|
|
9
|
+
export * from "./services/TemporalFactory.js";
|
|
10
|
+
export * from "./TemporalModule.js";
|
|
11
|
+
export * from "./utils/worker.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/temporal",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.71.1",
|
|
4
4
|
"description": "Temporal.io package for Ts.ED framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "yarn barrels && yarn build:ts",
|
|
17
|
-
"barrels": "
|
|
17
|
+
"barrels": "barrels",
|
|
18
18
|
"test": "jest --runInBand --forceExit && jest-coverage-thresholds-bumper ",
|
|
19
19
|
"build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
|
|
20
20
|
},
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@temporalio/client": "1.8.4",
|
|
26
26
|
"@temporalio/testing": "1.8.4",
|
|
27
27
|
"@temporalio/worker": "1.8.4",
|
|
28
|
-
"@tsed/
|
|
29
|
-
"@tsed/
|
|
30
|
-
"@tsed/
|
|
31
|
-
"@tsed/
|
|
32
|
-
"
|
|
28
|
+
"@tsed/barrels": "7.71.1",
|
|
29
|
+
"@tsed/common": "7.71.1",
|
|
30
|
+
"@tsed/core": "7.71.1",
|
|
31
|
+
"@tsed/di": "7.71.1",
|
|
32
|
+
"@tsed/typescript": "7.71.1",
|
|
33
33
|
"cross-env": "7.0.3",
|
|
34
34
|
"eslint": "^8.57.0",
|
|
35
35
|
"jest": "^29.7.0"
|
package/readme.md
CHANGED
|
@@ -83,7 +83,10 @@ import {Temporal, Activity} from "@tsed/temporal";
|
|
|
83
83
|
|
|
84
84
|
@Temporal()
|
|
85
85
|
export class UserOnboardingActivities {
|
|
86
|
-
constructor(
|
|
86
|
+
constructor(
|
|
87
|
+
private userService: UserService,
|
|
88
|
+
private emailService: EmailService
|
|
89
|
+
) {}
|
|
87
90
|
|
|
88
91
|
@Activity()
|
|
89
92
|
async sendVerificationEmail(email: string) {
|
|
@@ -136,7 +139,7 @@ Do not import any non temporal packages here. The workflows are bundled internal
|
|
|
136
139
|
|
|
137
140
|
```ts
|
|
138
141
|
import {proxyActivities, defineSignal, setHandler, condition, sleep} from "@temporalio/workflow";
|
|
139
|
-
import {Activities} from "../activities";
|
|
142
|
+
import {Activities} from "../activities.js";
|
|
140
143
|
|
|
141
144
|
export const isVerifiedSignal = defineSignal("verificationSignal");
|
|
142
145
|
|
|
@@ -177,7 +180,7 @@ Inject the TemporalClient instance to interact with it directly, e.g. to start a
|
|
|
177
180
|
```typescript
|
|
178
181
|
import {Service, AfterRoutesInit} from "@tsed/common";
|
|
179
182
|
import {TemporalClient} from "@tsed/temporal";
|
|
180
|
-
import {onboardUser} from "../workflows";
|
|
183
|
+
import {onboardUser} from "../workflows.js";
|
|
181
184
|
|
|
182
185
|
@Service()
|
|
183
186
|
export class UsersService implements AfterRoutesInit {
|
|
@@ -205,7 +208,7 @@ Read more about it [here](https://docs.temporal.io/typescript/troubleshooting/#w
|
|
|
205
208
|
|
|
206
209
|
```ts
|
|
207
210
|
import {bootstrapWorker} from "@tsed/temporal";
|
|
208
|
-
import {Server} from "./app/Server";
|
|
211
|
+
import {Server} from "./app/Server.js";
|
|
209
212
|
|
|
210
213
|
const worker = await bootstrapWorker(Server, {
|
|
211
214
|
worker: {
|
package/src/TemporalModule.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {classOf} from "@tsed/core";
|
|
2
2
|
import {Logger} from "@tsed/common";
|
|
3
3
|
import {Inject, InjectorService, Module, Provider} from "@tsed/di";
|
|
4
|
-
import {PROVIDER_TYPE_TEMPORAL} from "./constants";
|
|
5
|
-
import {TemporalStore, TEMPORAL_STORE_KEY} from "./interfaces/TemporalStore";
|
|
6
|
-
import {TemporalClient} from "./services/TemporalFactory";
|
|
4
|
+
import {PROVIDER_TYPE_TEMPORAL} from "./constants.js";
|
|
5
|
+
import {TemporalStore, TEMPORAL_STORE_KEY} from "./interfaces/TemporalStore.js";
|
|
6
|
+
import {TemporalClient} from "./services/TemporalFactory.js";
|
|
7
7
|
|
|
8
8
|
@Module()
|
|
9
9
|
export class TemporalModule {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Store} from "@tsed/core";
|
|
2
|
-
import {Activity} from "./activity";
|
|
3
|
-
import {Temporal} from "./temporal";
|
|
2
|
+
import {Activity} from "./activity.js";
|
|
3
|
+
import {Temporal} from "./temporal.js";
|
|
4
4
|
|
|
5
5
|
describe("@Activity()", () => {
|
|
6
6
|
it("should set metadata", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Store} from "@tsed/core";
|
|
2
|
-
import {TemporalStore, ActivityOptions, TEMPORAL_STORE_KEY} from "../interfaces/TemporalStore";
|
|
2
|
+
import {TemporalStore, ActivityOptions, TEMPORAL_STORE_KEY} from "../interfaces/TemporalStore.js";
|
|
3
3
|
|
|
4
4
|
export function Activity(options: ActivityOptions = {}): MethodDecorator {
|
|
5
5
|
return (target: any, propertyKey: string | symbol) => {
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./utils/worker";
|
|
4
|
+
export * from "./constants.js";
|
|
5
|
+
export * from "./decorators/activity.js";
|
|
6
|
+
export * from "./decorators/temporal.js";
|
|
7
|
+
export * from "./interfaces/interfaces.js";
|
|
8
|
+
export * from "./interfaces/TemporalStore.js";
|
|
9
|
+
export * from "./services/TemporalFactory.js";
|
|
10
|
+
export * from "./TemporalModule.js";
|
|
11
|
+
export * from "./utils/worker.js";
|
package/src/utils/worker.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {PlatformBuilderSettings, PlatformTest} from "@tsed/common";
|
|
|
2
2
|
import {$log} from "@tsed/logger";
|
|
3
3
|
|
|
4
4
|
import {NativeConnection, NativeConnectionOptions, Worker, WorkerOptions} from "@temporalio/worker";
|
|
5
|
-
import {TemporalModule} from "../TemporalModule";
|
|
5
|
+
import {TemporalModule} from "../TemporalModule.js";
|
|
6
6
|
|
|
7
7
|
type BootstrapWorkerOptions = {
|
|
8
8
|
platform?: PlatformBuilderSettings;
|