@things-factory/edge 8.0.0 → 9.0.0-beta.3

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/server/index.ts DELETED
@@ -1,17 +0,0 @@
1
- export * from './service'
2
-
3
- import { initSyncConnectionsSubscription } from './controllers/sync-connections'
4
- import { initConnectConnectionsSubscription } from './controllers/connect-connections'
5
- import { initDisconnectConnectionsSubscription } from './controllers/disconnect-connections'
6
- import { initRunTaskSubscription } from './controllers/run-task'
7
-
8
- process.on('bootstrap-module-start' as any, async ({ app, config, client }: any) => {
9
- try {
10
- await initSyncConnectionsSubscription()
11
- await initDisconnectConnectionsSubscription()
12
- await initConnectConnectionsSubscription()
13
- await initRunTaskSubscription()
14
- } catch (ex) {
15
- console.error('Just has failed to initialize Edge Server.', ex)
16
- }
17
- })
@@ -1,21 +0,0 @@
1
- import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'
2
-
3
- import { Appliance, User } from '@things-factory/auth-base'
4
- import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
5
-
6
- import { ConnectionManager, Connection } from '@things-factory/integration-base'
7
-
8
- @Resolver(Connection)
9
- export class ConnectionQuery {
10
- @Query(returns => [Connection], { description: 'To fetch multiple connections' })
11
- async connectionsOnEdge(@Ctx() context: ResolverContext): Promise<Connection[]> {
12
- const entities: { [domainId: string]: { [name: string]: Connection } } = ConnectionManager.getEntities()
13
- const connections = Object.values(entities).reduce((sum, keyval) => {
14
- const items = Object.values(keyval)
15
- sum.push(...items)
16
- return sum
17
- }, [] as any)
18
-
19
- return connections
20
- }
21
- }
@@ -1,3 +0,0 @@
1
- import { ConnectionQuery } from './connection-query'
2
-
3
- export const resolvers = [ConnectionQuery]
@@ -1,19 +0,0 @@
1
- /* EXPORT ENTITY TYPES */
2
-
3
- /* IMPORT ENTITIES AND RESOLVERS */
4
- import { resolvers as ConnectionResolvers } from './connection'
5
-
6
- export const entities = [
7
- /* ENTITIES */
8
- ]
9
-
10
- export const subscribers = [
11
- /* SUBSCRIBERS */
12
- ]
13
-
14
- export const schema = {
15
- resolverClasses: [
16
- /* RESOLVER CLASSES */
17
- ...ConnectionResolvers
18
- ]
19
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig-base.json",
3
- "compilerOptions": {
4
- "strict": false,
5
- "module": "commonjs",
6
- "outDir": "../dist-server",
7
- "baseUrl": "./"
8
- },
9
- "include": ["./**/*"]
10
- }