-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jdnichollsc/main
fix register client async method
- Loading branch information
Showing
26 changed files
with
3,338 additions
and
1,785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# don't ever lint node_modules | ||
node_modules | ||
|
||
# don't lint build output (make sure it's set to your correct build folder name) | ||
dist | ||
|
||
# don't lint nyc coverage output | ||
coverage | ||
|
||
.eslintrc.js | ||
|
||
.babel.config.js | ||
|
||
lib/**/*.spec.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
sourceType: "module", | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ["@typescript-eslint/eslint-plugin"], | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"prettier/@typescript-eslint", | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
export * from './temporal-module-options.interface'; | ||
export * from './shared-temporal-config.interface'; | ||
export * from './shared-worker-config.interface'; | ||
export * from './shared-runtime-config.interface'; | ||
export * from './shared-connection-config.interface'; | ||
export * from './temporal-module.interface'; | ||
export * from './shared-workflow-client-options.interface'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FactoryProvider, ModuleMetadata, Type } from '@nestjs/common'; | ||
import { NativeConnectionOptions } from '@temporalio/worker'; | ||
|
||
export interface SharedConnectionConfigurationFactory { | ||
createSharedConfiguration(): Promise<NativeConnectionOptions> | NativeConnectionOptions; | ||
} | ||
|
||
export interface SharedConnectionAsyncConfiguration | ||
extends Pick<ModuleMetadata, 'imports'> { | ||
/** | ||
* Existing Provider to be used. | ||
*/ | ||
useExisting?: Type<SharedConnectionConfigurationFactory>; | ||
/** | ||
* Type (class name) of provider (instance to be registered and injected). | ||
*/ | ||
useClass?: Type<SharedConnectionConfigurationFactory>; | ||
/** | ||
* Factory function that returns an instance of the provider to be injected. | ||
*/ | ||
useFactory?: (...args: any[]) => Promise<NativeConnectionOptions> | NativeConnectionOptions; | ||
/** | ||
* Instance of a provider to be injected. | ||
*/ | ||
useValue?: NativeConnectionOptions; | ||
/** | ||
* Optional list of providers to be injected into the context of the Factory function. | ||
*/ | ||
inject?: FactoryProvider['inject']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FactoryProvider, ModuleMetadata, Type } from '@nestjs/common'; | ||
import { RuntimeOptions } from '@temporalio/worker'; | ||
|
||
export interface SharedRuntimeConfigurationFactory { | ||
createSharedConfiguration(): Promise<RuntimeOptions> | RuntimeOptions; | ||
} | ||
|
||
export interface SharedRuntimeAsyncConfiguration | ||
extends Pick<ModuleMetadata, 'imports'> { | ||
/** | ||
* Existing Provider to be used. | ||
*/ | ||
useExisting?: Type<SharedRuntimeConfigurationFactory>; | ||
/** | ||
* Type (class name) of provider (instance to be registered and injected). | ||
*/ | ||
useClass?: Type<SharedRuntimeConfigurationFactory>; | ||
/** | ||
* Factory function that returns an instance of the provider to be injected. | ||
*/ | ||
useFactory?: (...args: any[]) => Promise<RuntimeOptions> | RuntimeOptions; | ||
/** | ||
* Instance of a provider to be injected. | ||
*/ | ||
useValue?: RuntimeOptions; | ||
/** | ||
* Optional list of providers to be injected into the context of the Factory function. | ||
*/ | ||
inject?: FactoryProvider['inject']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
lib/interfaces/shared-workflow-client-options.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { FactoryProvider, ModuleMetadata, Type } from '@nestjs/common'; | ||
import { WorkflowClientOptions } from '@temporalio/client'; | ||
|
||
export interface SharedWorkflowClientOptionsFactory { | ||
createSharedConfiguration(): Promise<WorkflowClientOptions> | WorkflowClientOptions; | ||
} | ||
|
||
export interface SharedWorkflowClientOptions | ||
extends Pick<ModuleMetadata, 'imports'> { | ||
name?: string; | ||
/** | ||
* Existing Provider to be used. | ||
*/ | ||
useExisting?: Type<SharedWorkflowClientOptionsFactory>; | ||
/** | ||
* Type (class name) of provider (instance to be registered and injected). | ||
*/ | ||
useClass?: Type<SharedWorkflowClientOptionsFactory>; | ||
/** | ||
* Factory function that returns an instance of the provider to be injected. | ||
*/ | ||
useFactory?: (...args: any[]) => Promise<WorkflowClientOptions> | WorkflowClientOptions; | ||
/** | ||
* Instance of a provider to be injected. | ||
*/ | ||
useValue?: WorkflowClientOptions; | ||
/** | ||
* Optional list of providers to be injected into the context of the Factory function. | ||
*/ | ||
inject?: FactoryProvider['inject']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.