@tsed/temporal 7.79.4 → 7.80.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.
@@ -0,0 +1,12 @@
1
+ import { Logger } from "@tsed/common";
2
+ import { InjectorService } from "@tsed/di";
3
+ import { TemporalClient } from "./services/TemporalFactory.js";
4
+ export declare class TemporalModule {
5
+ private temporalServices;
6
+ protected logger: Logger;
7
+ protected injector: InjectorService;
8
+ protected client: TemporalClient;
9
+ constructor(temporalServices: any[]);
10
+ getActivities(): object;
11
+ protected getActivitiesFromInstance(instance: any): {};
12
+ }
@@ -0,0 +1 @@
1
+ export declare const PROVIDER_TYPE_TEMPORAL = "PROVIDER_TYPE_TEMPORAL";
@@ -0,0 +1,2 @@
1
+ import { ActivityOptions } from "../interfaces/TemporalStore.js";
2
+ export declare function Activity(options?: ActivityOptions): MethodDecorator;
@@ -0,0 +1 @@
1
+ export declare function Temporal(): ClassDecorator;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Automatically generated by @tsed/barrels.
3
+ */
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";
@@ -0,0 +1,9 @@
1
+ export declare const TEMPORAL_STORE_KEY = "temporal";
2
+ export interface ActivityOptions {
3
+ name?: string;
4
+ }
5
+ export interface TemporalStore {
6
+ activities?: {
7
+ [propertyKey: string]: ActivityOptions;
8
+ };
9
+ }
@@ -0,0 +1,12 @@
1
+ import { ClientOptions, ConnectionOptions } from "@temporalio/client";
2
+ declare global {
3
+ namespace TsED {
4
+ interface Configuration {
5
+ temporal?: {
6
+ enabled?: boolean;
7
+ connection?: ConnectionOptions;
8
+ client?: Omit<ClientOptions, "connection">;
9
+ };
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ import { Client, Connection } from "@temporalio/client";
2
+ export declare const TemporalConnection: typeof Connection;
3
+ export type TemporalConnection = Connection;
4
+ export declare const TemporalClient: typeof Client;
5
+ export type TemporalClient = Client;
@@ -0,0 +1,9 @@
1
+ import { PlatformBuilderSettings } from "@tsed/common";
2
+ import { NativeConnection, NativeConnectionOptions, Worker, WorkerOptions } from "@temporalio/worker";
3
+ type BootstrapWorkerOptions = {
4
+ platform?: PlatformBuilderSettings;
5
+ worker: Omit<WorkerOptions, "activities">;
6
+ connection?: NativeConnection | NativeConnectionOptions;
7
+ };
8
+ export declare function bootstrapWorker(mod: any, settings: BootstrapWorkerOptions): Promise<Worker>;
9
+ export {};
package/package.json CHANGED
@@ -1,22 +1,25 @@
1
1
  {
2
2
  "name": "@tsed/temporal",
3
- "version": "7.79.4",
4
3
  "description": "Temporal.io package for Ts.ED framework",
4
+ "type": "commonjs",
5
+ "version": "7.80.1",
5
6
  "source": "./src/index.ts",
6
7
  "main": "./lib/cjs/index.js",
7
8
  "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
- "types": "./lib/types/index.d.ts",
11
- "import": "./lib/esm/index.js",
12
- "require": "./lib/cjs/index.js",
13
- "default": "./lib/esm/index.js"
11
+ ".": {
12
+ "types": "./lib/types/index.d.ts",
13
+ "import": "./lib/esm/index.js",
14
+ "default": "./lib/cjs/index.js"
15
+ }
14
16
  },
15
17
  "scripts": {
16
18
  "build": "yarn barrels && yarn build:ts",
17
19
  "barrels": "barrels",
18
- "test": "jest --runInBand --forceExit && jest-coverage-thresholds-bumper ",
19
- "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
20
+ "test": "vitest run",
21
+ "build:ts": "tsc --build tsconfig.json",
22
+ "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
20
23
  },
21
24
  "dependencies": {
22
25
  "tslib": "2.6.1"
@@ -25,14 +28,15 @@
25
28
  "@temporalio/client": "1.8.4",
26
29
  "@temporalio/testing": "1.8.4",
27
30
  "@temporalio/worker": "1.8.4",
28
- "@tsed/barrels": "7.79.4",
29
- "@tsed/common": "7.79.4",
30
- "@tsed/core": "7.79.4",
31
- "@tsed/di": "7.79.4",
32
- "@tsed/typescript": "7.79.4",
31
+ "@tsed/barrels": "7.80.1",
32
+ "@tsed/common": "7.80.1",
33
+ "@tsed/core": "7.80.1",
34
+ "@tsed/di": "7.80.1",
35
+ "@tsed/typescript": "7.80.1",
33
36
  "cross-env": "7.0.3",
34
37
  "eslint": "^8.57.0",
35
- "jest": "^29.7.0"
38
+ "typescript": "4.9.5",
39
+ "vitest": "2.0.4"
36
40
  },
37
41
  "peerDependencies": {
38
42
  "@temporalio/client": "^1.8.4",
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import {presets} from "@tsed/vitest/presets";
3
+ import {defineConfig} from "vitest/config";
4
+
5
+ export default defineConfig(
6
+ {
7
+ ...presets,
8
+ test: {
9
+ ...presets.test,
10
+ coverage: {
11
+ ...presets.test.coverage,
12
+ thresholds: {
13
+ statements: 0,
14
+ branches: 0,
15
+ functions: 0,
16
+ lines: 0
17
+ }
18
+ }
19
+ }
20
+ }
21
+ );
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }