@innet/server 1.1.2 → 1.2.0

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.
@@ -1,6 +1,6 @@
1
1
  import html from '@innet/html';
2
2
  import { switchAsync, SwitchProps } from '@innet/switch';
3
- import { arrayAsync } from '@innet/utils';
3
+ import { arrayAsync, async } from '@innet/utils';
4
4
  import { cms, CmsProps, cookie, CookieProps, error, ErrorProps, file, FileProps, header, HeaderProps, proxy, ProxyProps, router, RouterProps, success, SuccessProps, redirect, RedirectProps } from '../plugins';
5
5
  import { server, ServerProps } from '../server';
6
6
  export declare const arrayPlugins: (typeof arrayAsync)[];
@@ -19,6 +19,7 @@ export declare const JSXPlugins: {
19
19
  redirect: typeof redirect;
20
20
  };
21
21
  export declare const objectPlugins: ((handler: any) => import("innet").PluginHandler)[];
22
+ export declare const promisePlugins: (typeof async)[];
22
23
  declare const _default: import("innet").Handler;
23
24
  export default _default;
24
25
  declare global {
@@ -1,7 +1,7 @@
1
1
  import html from '@innet/html';
2
2
  import { jsxPlugins, jsxComponent, jsxTemplate } from '@innet/jsx';
3
3
  import { switchAsync } from '@innet/switch';
4
- import { async, array, object, arrayAsync, arrayClear, arraySingleLess } from '@innet/utils';
4
+ import { promise, array, object, arrayAsync, arrayClear, arraySingleLess, async } from '@innet/utils';
5
5
  import { createHandler } from 'innet';
6
6
  import { cookie } from '../plugins/cookie/cookie.es6.js';
7
7
  import { header } from '../plugins/header/header.es6.js';
@@ -38,10 +38,13 @@ const objectPlugins = [
38
38
  jsxComponent,
39
39
  jsxTemplate,
40
40
  ];
41
- var handler = createHandler([
41
+ const promisePlugins = [
42
42
  async,
43
+ ];
44
+ var handler = createHandler([
45
+ promise(promisePlugins),
43
46
  array(arrayPlugins),
44
47
  object(objectPlugins),
45
48
  ]);
46
49
 
47
- export { JSXPlugins, arrayPlugins, handler as default, objectPlugins };
50
+ export { JSXPlugins, arrayPlugins, handler as default, objectPlugins, promisePlugins };
@@ -46,8 +46,11 @@ var objectPlugins = [
46
46
  jsx.jsxComponent,
47
47
  jsx.jsxTemplate,
48
48
  ];
49
- var handler = innet.createHandler([
49
+ var promisePlugins = [
50
50
  utils.async,
51
+ ];
52
+ var handler = innet.createHandler([
53
+ utils.promise(promisePlugins),
51
54
  utils.array(arrayPlugins),
52
55
  utils.object(objectPlugins),
53
56
  ]);
@@ -56,3 +59,4 @@ exports.JSXPlugins = JSXPlugins;
56
59
  exports.arrayPlugins = arrayPlugins;
57
60
  exports["default"] = handler;
58
61
  exports.objectPlugins = objectPlugins;
62
+ exports.promisePlugins = promisePlugins;
@@ -1 +1 @@
1
- export { JSXPlugins, arrayPlugins, default, objectPlugins } from './handler.es6.js';
1
+ export { JSXPlugins, arrayPlugins, default, objectPlugins, promisePlugins } from './handler.es6.js';
package/handler/index.js CHANGED
@@ -10,3 +10,4 @@ exports.JSXPlugins = handler.JSXPlugins;
10
10
  exports.arrayPlugins = handler.arrayPlugins;
11
11
  exports["default"] = handler["default"];
12
12
  exports.objectPlugins = handler.objectPlugins;
13
+ exports.promisePlugins = handler.promisePlugins;
package/index.es6.js CHANGED
@@ -1,4 +1,4 @@
1
- export { JSXPlugins, arrayPlugins, default, objectPlugins } from './handler/handler.es6.js';
1
+ export { JSXPlugins, arrayPlugins, default, objectPlugins, promisePlugins } from './handler/handler.es6.js';
2
2
  export { server } from './server/server.es6.js';
3
3
  export { cookie } from './plugins/cookie/cookie.es6.js';
4
4
  export { header } from './plugins/header/header.es6.js';
package/index.js CHANGED
@@ -23,6 +23,7 @@ exports.JSXPlugins = handler.JSXPlugins;
23
23
  exports.arrayPlugins = handler.arrayPlugins;
24
24
  exports["default"] = handler["default"];
25
25
  exports.objectPlugins = handler.objectPlugins;
26
+ exports.promisePlugins = handler.promisePlugins;
26
27
  exports.server = server.server;
27
28
  exports.cookie = cookie.cookie;
28
29
  exports.header = header.header;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innet/server",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Create server-side application with innet",
5
5
  "main": "index.js",
6
6
  "module": "index.es6.js",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@cantinc/utils": "^1.0.0",
26
26
  "@innet/html": "^1.0.0",
27
- "@innet/jsx": "^0.1.0",
27
+ "@innet/jsx": "^0.1.1",
28
28
  "@innet/switch": "^1.0.0",
29
- "@innet/utils": "^1.0.0",
29
+ "@innet/utils": "^1.1.0",
30
30
  "@types/cookie": "^0.4.1",
31
31
  "cookie": "^0.4.2",
32
32
  "http-proxy": "^1.18.1",