@things-factory/reference-app 5.0.10 → 5.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/reference-app",
3
- "version": "5.0.10",
3
+ "version": "5.0.11",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -62,39 +62,39 @@
62
62
  "@operato/scene-tab": "^1.0.0",
63
63
  "@operato/shell": "^1.0.1",
64
64
  "@operato/utils": "^1.0.1",
65
- "@things-factory/api": "^5.0.7",
66
- "@things-factory/apptool-ui": "^5.0.7",
67
- "@things-factory/attachment-base": "^5.0.7",
68
- "@things-factory/auth-ui": "^5.0.7",
69
- "@things-factory/board-service": "^5.0.7",
70
- "@things-factory/board-ui": "^5.0.7",
71
- "@things-factory/ccp": "^5.0.10",
72
- "@things-factory/context-ui": "^5.0.7",
73
- "@things-factory/dashboard": "^5.0.7",
74
- "@things-factory/dataset": "^5.0.10",
75
- "@things-factory/export-ui": "^5.0.7",
76
- "@things-factory/export-ui-excel": "^5.0.7",
77
- "@things-factory/grist-ui": "^5.0.7",
78
- "@things-factory/help": "^5.0.7",
79
- "@things-factory/integration-ui": "^5.0.7",
80
- "@things-factory/lite-menu": "^5.0.7",
81
- "@things-factory/more-ui": "^5.0.7",
82
- "@things-factory/notification": "^5.0.7",
83
- "@things-factory/oauth2-client": "^5.0.7",
84
- "@things-factory/print-ui": "^5.0.7",
85
- "@things-factory/product-base": "^5.0.7",
86
- "@things-factory/qc": "^5.0.10",
87
- "@things-factory/resource-ui": "^5.0.7",
88
- "@things-factory/routing-base": "^5.0.7",
89
- "@things-factory/setting-base": "^5.0.7",
90
- "@things-factory/setting-ui": "^5.0.7",
91
- "@things-factory/shell": "^5.0.7",
92
- "@things-factory/system-ui": "^5.0.7",
93
- "@things-factory/work-shift": "^5.0.7",
65
+ "@things-factory/api": "^5.0.11",
66
+ "@things-factory/apptool-ui": "^5.0.11",
67
+ "@things-factory/attachment-base": "^5.0.11",
68
+ "@things-factory/auth-ui": "^5.0.11",
69
+ "@things-factory/board-service": "^5.0.11",
70
+ "@things-factory/board-ui": "^5.0.11",
71
+ "@things-factory/ccp": "^5.0.11",
72
+ "@things-factory/context-ui": "^5.0.11",
73
+ "@things-factory/dashboard": "^5.0.11",
74
+ "@things-factory/dataset": "^5.0.11",
75
+ "@things-factory/export-ui": "^5.0.11",
76
+ "@things-factory/export-ui-excel": "^5.0.11",
77
+ "@things-factory/grist-ui": "^5.0.11",
78
+ "@things-factory/help": "^5.0.11",
79
+ "@things-factory/integration-ui": "^5.0.11",
80
+ "@things-factory/lite-menu": "^5.0.11",
81
+ "@things-factory/more-ui": "^5.0.11",
82
+ "@things-factory/notification": "^5.0.11",
83
+ "@things-factory/oauth2-client": "^5.0.11",
84
+ "@things-factory/print-ui": "^5.0.11",
85
+ "@things-factory/product-base": "^5.0.11",
86
+ "@things-factory/qc": "^5.0.11",
87
+ "@things-factory/resource-ui": "^5.0.11",
88
+ "@things-factory/routing-base": "^5.0.11",
89
+ "@things-factory/setting-base": "^5.0.11",
90
+ "@things-factory/setting-ui": "^5.0.11",
91
+ "@things-factory/shell": "^5.0.11",
92
+ "@things-factory/system-ui": "^5.0.11",
93
+ "@things-factory/work-shift": "^5.0.11",
94
94
  "random-words": "^1.2.0"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@things-factory/builder": "^5.0.8"
98
98
  },
99
- "gitHead": "88c669d6f0e5e8d498201e520db9029516533733"
99
+ "gitHead": "37cd4feb62e062899cae7029588d86a5d4b4036a"
100
100
  }
@@ -11,7 +11,6 @@ import { getWorkDateAndShift } from '@things-factory/work-shift'
11
11
  import { DataSampleMockupInfo } from '../service/data-sample-mockup/data-sample-mockup-type'
12
12
 
13
13
  const randomWords = require('random-words')
14
- const debug = require('debug')('things-factory:reference-app:controller/create-data-sample-mockup')
15
14
 
16
15
  const fillDataKeys = (dataKeySet, data) => {
17
16
  const keys = dataKeySet?.dataKeyItems || []
@@ -203,7 +202,6 @@ async function _generateMockupData(dataSources: any, tx: EntityManager) {
203
202
  }
204
203
 
205
204
  const sample = dataSet.dataItems.reduce((prev, next) => fillColumns(prev, next, dict), {})
206
- debug('sample', sample)
207
205
 
208
206
  partitionKeys = formatDate(partitionKeys, localDateTz)
209
207
  partitionKeys = replaceVariables(partitionKeys, {
package/server/routes.ts CHANGED
@@ -1,5 +1,3 @@
1
- const debug = require('debug')('things-factory:reference-app:routes')
2
-
3
1
  process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
4
2
  /*
5
3
  * can add global public routes to application (auth not required, tenancy not required)
@@ -5,8 +5,6 @@ import { DataSample } from '@things-factory/dataset'
5
5
  import { generateMockupData } from '../../controllers/create-data-sample-mockup'
6
6
  import { DataSampleMockupInfo } from './data-sample-mockup-type'
7
7
 
8
- const debug = require('debug')('things-factory:dataset:data-sample:data-sample-mutation')
9
-
10
8
  @Resolver(DataSample)
11
9
  export class DataSampleMockupMutation {
12
10
  @Directive('@privilege(category: "data-sample", privilege: "mutation", domainOwnerGranted: true)')
@@ -25,7 +25,7 @@ export class ReferenceMutation {
25
25
  refType: 'Reference',
26
26
  refBy: 100,
27
27
  category: 'Reference'
28
- }
28
+ } as any
29
29
  })
30
30
  await createAttachments(_, { attachments }, context)
31
31
  }
@@ -1,3 +1,4 @@
1
+ import { GraphQLScalarType } from 'graphql'
1
2
  import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
3
  import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
4
  import { Arg, Ctx, Query, Resolver, Root } from 'type-graphql'
@@ -8,17 +9,15 @@ import { sleep } from '@things-factory/utils'
8
9
 
9
10
  import { extractInfos } from './lambda-call'
10
11
 
11
- const debug = require('debug')('things-factory:reference-app')
12
-
13
12
  @Resolver()
14
13
  export class ReferenceQuery {
15
- @Query(returns => ScalarAny, { description: 'To reference of ocr request' })
14
+ @Query(returns => [ScalarAny], { description: 'To reference of ocr request' })
16
15
  async ocrRequest(
17
16
  @Root() _,
18
17
  @Arg('images', () => [GraphQLUpload])
19
18
  images: FileUpload[],
20
19
  @Ctx() context: any
21
- ): Promise<ScalarAny> {
20
+ ): Promise<GraphQLScalarType[]> {
22
21
  const { domain, user, tx } = context.state
23
22
  const all = Promise.all(images)
24
23
 
@@ -29,7 +28,7 @@ export class ReferenceQuery {
29
28
  refType: 'Reference',
30
29
  refBy: 100,
31
30
  category: 'Reference'
32
- }
31
+ } as any
33
32
  })
34
33
  await createAttachments(_, { attachments }, context)
35
34