@things-factory/shell 6.2.79 → 6.2.88

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.
Files changed (74) hide show
  1. package/dist-server/graphql-local-client.d.ts +19 -0
  2. package/dist-server/graphql-local-client.js +14 -0
  3. package/dist-server/graphql-local-client.js.map +1 -1
  4. package/dist-server/initializers/database.d.ts +26 -0
  5. package/dist-server/initializers/database.js +26 -0
  6. package/dist-server/initializers/database.js.map +1 -1
  7. package/dist-server/pubsub-log-transport.d.ts +27 -0
  8. package/dist-server/pubsub-log-transport.js +15 -0
  9. package/dist-server/pubsub-log-transport.js.map +1 -1
  10. package/dist-server/pubsub.d.ts +7 -0
  11. package/dist-server/pubsub.js +12 -0
  12. package/dist-server/pubsub.js.map +1 -1
  13. package/dist-server/schema.d.ts +4 -0
  14. package/dist-server/schema.js +4 -0
  15. package/dist-server/schema.js.map +1 -1
  16. package/dist-server/tsconfig.tsbuildinfo +1 -1
  17. package/dist-server/typeorm/encrypt-transform.d.ts +5 -0
  18. package/dist-server/typeorm/encrypt-transform.js +25 -0
  19. package/dist-server/typeorm/encrypt-transform.js.map +1 -1
  20. package/dist-server/utils/condition-builder.d.ts +11 -0
  21. package/dist-server/utils/condition-builder.js +11 -0
  22. package/dist-server/utils/condition-builder.js.map +1 -1
  23. package/dist-server/utils/get-domain.d.ts +46 -0
  24. package/dist-server/utils/get-domain.js +70 -0
  25. package/dist-server/utils/get-domain.js.map +1 -1
  26. package/dist-server/utils/get-query-builder-from-list-params.d.ts +12 -2
  27. package/dist-server/utils/get-query-builder-from-list-params.js +24 -8
  28. package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
  29. package/dist-server/utils/get-times-for-period.d.ts +14 -0
  30. package/dist-server/utils/get-times-for-period.js +14 -0
  31. package/dist-server/utils/get-times-for-period.js.map +1 -1
  32. package/dist-server/utils/list-param-adjuster.d.ts +9 -0
  33. package/dist-server/utils/list-param-adjuster.js +9 -0
  34. package/dist-server/utils/list-param-adjuster.js.map +1 -1
  35. package/dist-server/utils/list-params-converter.d.ts +6 -0
  36. package/dist-server/utils/list-params-converter.js +27 -0
  37. package/dist-server/utils/list-params-converter.js.map +1 -1
  38. package/dist-server/utils/list-query-builder.d.ts +10 -1
  39. package/dist-server/utils/list-query-builder.js +10 -1
  40. package/dist-server/utils/list-query-builder.js.map +1 -1
  41. package/dist-server/utils/publish-progress.d.ts +9 -0
  42. package/dist-server/utils/publish-progress.js +9 -0
  43. package/dist-server/utils/publish-progress.js.map +1 -1
  44. package/package.json +3 -3
  45. package/server/graphql-local-client.ts +20 -0
  46. package/server/initializers/database.ts +26 -0
  47. package/server/pubsub-log-transport.ts +29 -0
  48. package/server/pubsub.ts +13 -0
  49. package/server/schema.ts +4 -0
  50. package/server/typeorm/encrypt-transform.ts +26 -0
  51. package/server/utils/condition-builder.ts +12 -8
  52. package/server/utils/get-domain.ts +70 -0
  53. package/server/utils/get-query-builder-from-list-params.ts +26 -16
  54. package/server/utils/get-times-for-period.ts +15 -4
  55. package/server/utils/list-param-adjuster.ts +9 -0
  56. package/server/utils/list-params-converter.ts +28 -4
  57. package/server/utils/list-query-builder.ts +13 -17
  58. package/server/utils/publish-progress.ts +9 -0
  59. package/dist-server/webpack/koa-webpack/client.d.ts +0 -1
  60. package/dist-server/webpack/koa-webpack/client.js +0 -24
  61. package/dist-server/webpack/koa-webpack/client.js.map +0 -1
  62. package/dist-server/webpack/koa-webpack/index.d.ts +0 -2
  63. package/dist-server/webpack/koa-webpack/index.js +0 -58
  64. package/dist-server/webpack/koa-webpack/index.js.map +0 -1
  65. package/dist-server/webpack/koa-webpack/middleware.d.ts +0 -0
  66. package/dist-server/webpack/koa-webpack/middleware.js +0 -42
  67. package/dist-server/webpack/koa-webpack/middleware.js.map +0 -1
  68. package/dist-server/webpack/koa-webpack/validate.d.ts +0 -1
  69. package/dist-server/webpack/koa-webpack/validate.js +0 -26
  70. package/dist-server/webpack/koa-webpack/validate.js.map +0 -1
  71. package/server/webpack/koa-webpack/client.ts +0 -26
  72. package/server/webpack/koa-webpack/index.ts +0 -71
  73. package/server/webpack/koa-webpack/middleware.ts +0 -47
  74. package/server/webpack/koa-webpack/validate.ts +0 -27
@@ -1,71 +0,0 @@
1
- /*
2
- Copyright © 2016 Andrew Powell
3
-
4
- This Source Code Form is subject to the terms of the Mozilla Public
5
- License, v. 2.0. If a copy of the MPL was not distributed with this
6
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
-
8
- The above copyright notice and this permission notice shall be
9
- included in all copies or substantial portions of this Source Code Form.
10
- */
11
- const { join } = require('path')
12
-
13
- const root = require('app-root-path')
14
- const chalk = require('chalk')
15
- const webpack = require('webpack')
16
- const webpackDevMiddleware = require('webpack-dev-middleware')
17
-
18
- const { getClient } = require('./client')
19
- const { getMiddleware } = require('./middleware')
20
- const { validate } = require('./validate')
21
-
22
- const defaults = { devMiddleware: {}, hotClient: {} }
23
-
24
- export default async opts => {
25
- const valid = validate(opts)
26
-
27
- if (valid.error) {
28
- const { error } = console
29
- error(chalk.red('⬢ koa-webpack:'), 'An option was passed to koa-webpack that is not valid')
30
- throw valid.error
31
- }
32
-
33
- const options = Object.assign({}, defaults, opts)
34
-
35
- let { compiler, config } = options
36
-
37
- if (!compiler) {
38
- if (!config) {
39
- // eslint-disable-next-line import/no-dynamic-require, global-require
40
- config = require(options.configPath || join(root.path, 'webpack.config.js'))
41
- }
42
-
43
- compiler = webpack(config)
44
- }
45
-
46
- if (!options.devMiddleware.publicPath) {
47
- const { publicPath } = compiler.options.output
48
-
49
- if (!publicPath) {
50
- throw new Error(
51
- "koa-webpack: publicPath must be set on `dev` options, or in a compiler's `output` configuration."
52
- )
53
- }
54
-
55
- options.devMiddleware.publicPath = publicPath
56
- }
57
-
58
- const hotClient = await getClient(compiler, options)
59
- const devMiddleware = webpackDevMiddleware(compiler, options.devMiddleware)
60
- const middleware = getMiddleware(compiler, devMiddleware)
61
- const close = callback => {
62
- const next = hotClient ? () => hotClient.close(callback) : callback
63
- devMiddleware.close(next)
64
- }
65
-
66
- return Object.assign(middleware, {
67
- hotClient,
68
- devMiddleware,
69
- close
70
- })
71
- }
@@ -1,47 +0,0 @@
1
- /*
2
- Copyright © 2016 Andrew Powell
3
-
4
- This Source Code Form is subject to the terms of the Mozilla Public
5
- License, v. 2.0. If a copy of the MPL was not distributed with this
6
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
-
8
- The above copyright notice and this permission notice shall be
9
- included in all copies or substantial portions of this Source Code Form.
10
- */
11
- module.exports = {
12
- getMiddleware(compiler, devMiddleware) {
13
- return (context, next) => {
14
- // wait for webpack-dev-middleware to signal that the build is ready
15
- const ready = new Promise((resolve, reject) => {
16
- for (const comp of [].concat(compiler.compilers || compiler)) {
17
- comp.hooks.failed.tap('KoaWebpack', error => {
18
- reject(error)
19
- })
20
- }
21
-
22
- devMiddleware.waitUntilValid(() => {
23
- resolve(true)
24
- })
25
- })
26
- // tell webpack-dev-middleware to handle the request
27
- const init = new Promise(resolve => {
28
- devMiddleware(
29
- context.req,
30
- {
31
- end: content => {
32
- // eslint-disable-next-line no-param-reassign
33
- context.body = content
34
- resolve(null)
35
- },
36
- getHeader: context.get.bind(context),
37
- setHeader: context.set.bind(context),
38
- locals: context.state
39
- },
40
- () => resolve(next())
41
- )
42
- })
43
-
44
- return Promise.all([ready, init])
45
- }
46
- }
47
- }
@@ -1,27 +0,0 @@
1
- /*
2
- Copyright © 2016 Andrew Powell
3
-
4
- This Source Code Form is subject to the terms of the Mozilla Public
5
- License, v. 2.0. If a copy of the MPL was not distributed with this
6
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
-
8
- The above copyright notice and this permission notice shall be
9
- included in all copies or substantial portions of this Source Code Form.
10
- */
11
- const Joi = require('joi');
12
-
13
- module.exports = {
14
- validate(options) {
15
- const keys = {
16
- compiler: [Joi.object().allow(null)],
17
- config: [Joi.object().allow(null)],
18
- configPath: [Joi.string().allow(null)],
19
- devMiddleware: [Joi.object()],
20
- hotClient: [Joi.boolean(), Joi.object().allow(null)]
21
- };
22
- const schema = Joi.object().keys(keys);
23
- const results = schema.validate(options);
24
-
25
- return results;
26
- }
27
- };