@innet/server 2.0.0-beta.4 → 2.0.0-beta.6

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 (64) hide show
  1. package/README.md +335 -9
  2. package/handler/handler.d.ts +5 -2
  3. package/handler/handler.es6.js +2 -0
  4. package/handler/handler.js +2 -0
  5. package/hooks/index.d.ts +24 -24
  6. package/hooks/index.es6.js +24 -24
  7. package/hooks/index.js +24 -24
  8. package/index.d.ts +2 -2
  9. package/index.es6.js +87 -86
  10. package/index.js +198 -195
  11. package/package.json +3 -3
  12. package/plugins/index.d.ts +2 -2
  13. package/plugins/index.es6.js +2 -2
  14. package/plugins/index.js +2 -2
  15. package/plugins/main/index.d.ts +8 -8
  16. package/plugins/main/index.es6.js +8 -8
  17. package/plugins/main/index.js +8 -8
  18. package/plugins/request/index.d.ts +5 -5
  19. package/plugins/request/index.es6.js +5 -5
  20. package/plugins/request/index.js +5 -5
  21. package/plugins/schema/array/array.d.ts +3 -0
  22. package/plugins/schema/array/array.es6.js +10 -1
  23. package/plugins/schema/array/array.js +10 -1
  24. package/plugins/schema/field/field.d.ts +2 -0
  25. package/plugins/schema/field/field.es6.js +7 -1
  26. package/plugins/schema/field/field.js +7 -1
  27. package/plugins/schema/index.d.ts +8 -8
  28. package/plugins/schema/index.es6.js +8 -8
  29. package/plugins/schema/index.js +8 -8
  30. package/plugins/schema/integer/integer.d.ts +37 -0
  31. package/plugins/schema/integer/integer.es6.js +21 -7
  32. package/plugins/schema/integer/integer.js +21 -7
  33. package/plugins/schema/number/number.d.ts +32 -0
  34. package/plugins/schema/number/number.es6.js +21 -5
  35. package/plugins/schema/number/number.js +21 -5
  36. package/plugins/schema/string/string.d.ts +27 -0
  37. package/plugins/schema/string/string.es6.js +9 -3
  38. package/plugins/schema/string/string.js +9 -3
  39. package/plugins/utils/index.d.ts +3 -2
  40. package/plugins/utils/index.es6.js +3 -2
  41. package/plugins/utils/index.js +3 -2
  42. package/plugins/utils/swagger/swagger.d.ts +1 -0
  43. package/plugins/utils/swagger/swagger.es6.js +1 -0
  44. package/plugins/utils/swagger/swagger.js +1 -0
  45. package/plugins/utils/ui/index.d.ts +1 -0
  46. package/plugins/utils/ui/index.es6.js +1 -0
  47. package/plugins/utils/ui/index.js +10 -0
  48. package/plugins/utils/ui/rapidoc.html.es6.js +3 -0
  49. package/plugins/utils/ui/rapidoc.html.js +7 -0
  50. package/plugins/utils/ui/redoc.html.es6.js +3 -0
  51. package/plugins/utils/ui/redoc.html.js +7 -0
  52. package/plugins/utils/ui/scalar.html.es6.js +3 -0
  53. package/plugins/utils/ui/scalar.html.js +7 -0
  54. package/plugins/utils/ui/swagger.html.es6.js +3 -0
  55. package/plugins/utils/ui/swagger.html.js +7 -0
  56. package/plugins/utils/ui/ui.d.ts +13 -0
  57. package/plugins/utils/ui/ui.es6.js +45 -0
  58. package/plugins/utils/ui/ui.js +50 -0
  59. package/utils/index.d.ts +8 -8
  60. package/utils/index.es6.js +8 -8
  61. package/utils/index.js +8 -8
  62. package/utils/rules/index.d.ts +17 -17
  63. package/utils/rules/index.es6.js +17 -17
  64. package/utils/rules/index.js +18 -18
package/README.md CHANGED
@@ -581,7 +581,7 @@ This section contains elements of utils.
581
581
 
582
582
  [← back](#index)
583
583
 
584
- [\<swagger>](#swagger)
584
+ [\<ui>](#ui)
585
585
  [\<env>](#env)
586
586
  [\<dts>](#dts)
587
587
  [\<blacklist>](#blacklist)
@@ -590,40 +590,151 @@ This section contains elements of utils.
590
590
 
591
591
  ---
592
592
 
593
- ### \<swagger>
593
+ ### \<ui>
594
594
 
595
595
  [← back](#utils)
596
596
 
597
- Use `<swagger>` element to add Swagger UI documentation.
598
- `<swagger>` element MUST be placed in `<api>` element.
597
+ Use `<ui>` element to add API documentation UI. This element supports multiple documentation viewers including Swagger UI, RapiDoc, ReDoc, and Scalar.
598
+ `<ui>` element MUST be placed in `<api>` element.
599
599
 
600
600
  *src/app.tsx*
601
601
  ```typescript jsx
602
602
  export default (
603
603
  <server>
604
604
  <api>
605
- <swagger />
605
+ <ui />
606
606
  </api>
607
607
  </server>
608
608
  )
609
609
  ```
610
610
 
611
- Open http://localhost:80/swagger-ui
612
- You will see Swagger UI documentation.
611
+ Open http://localhost:80/ui
612
+ You will see Swagger UI documentation by default.
613
613
 
614
- You can change the Swagger UI URL path by `path` property of `<swagger>` element.
614
+ #### html
615
+
616
+ You can provide custom HTML template for the documentation viewer.
617
+ Built-in presets are available: `uiPresets.swagger`, `uiPresets.rapidoc`, `uiPresets.redoc`, `uiPresets.scalar`.
618
+
619
+ *src/app.tsx*
620
+ ```typescript jsx
621
+ import { uiPresets } from '@innet/server'
622
+
623
+ export default (
624
+ <server>
625
+ <api>
626
+ <ui html={uiPresets.rapidoc} />
627
+ </api>
628
+ </server>
629
+ )
630
+ ```
631
+
632
+ #### params
633
+
634
+ You can pass additional parameters to the documentation viewer. Parameters depend on the selected UI library.
635
+
636
+ For **Swagger UI** (default):
615
637
 
616
638
  *src/app.tsx*
617
639
  ```typescript jsx
618
640
  export default (
619
641
  <server>
620
642
  <api>
621
- <swagger path='/swagger' />
643
+ <ui
644
+ params={{
645
+ docExpansion: 'full',
646
+ filter: true,
647
+ showExtensions: true,
648
+ }}
649
+ />
622
650
  </api>
623
651
  </server>
624
652
  )
625
653
  ```
626
654
 
655
+ For **Scalar**:
656
+
657
+ *src/app.tsx*
658
+ ```typescript jsx
659
+ import { uiPresets } from '@innet/server'
660
+
661
+ export default (
662
+ <server>
663
+ <api>
664
+ <ui
665
+ html={uiPresets.scalar}
666
+ params={{
667
+ theme: 'moon',
668
+ layout: 'classic',
669
+ }}
670
+ />
671
+ </api>
672
+ </server>
673
+ )
674
+ ```
675
+
676
+ For **RapiDoc**:
677
+
678
+ *src/app.tsx*
679
+ ```typescript jsx
680
+ import { uiPresets } from '@innet/server'
681
+
682
+ export default (
683
+ <server>
684
+ <api>
685
+ <ui
686
+ html={uiPresets.rapidoc}
687
+ params={{
688
+ theme: 'dark',
689
+ layout: 'row',
690
+ showHeader: 'false',
691
+ }}
692
+ />
693
+ </api>
694
+ </server>
695
+ )
696
+ ```
697
+
698
+ For **ReDoc**:
699
+
700
+ *src/app.tsx*
701
+ ```typescript jsx
702
+ import { uiPresets } from '@innet/server'
703
+
704
+ export default (
705
+ <server>
706
+ <api>
707
+ <ui
708
+ html={uiPresets.redoc}
709
+ params={{
710
+ disableSearch: 'true',
711
+ hideDownloadButton: 'true',
712
+ nativeScrollbars: 'true',
713
+ theme: '{"sidebar": {"backgroundColor": "#d1e5ef"}}',
714
+ }}
715
+ />
716
+ </api>
717
+ </server>
718
+ )
719
+ ```
720
+
721
+ #### path
722
+
723
+ You can change the documentation UI URL path by `path` property of `<ui>` element.
724
+
725
+ *src/app.tsx*
726
+ ```typescript jsx
727
+ export default (
728
+ <server>
729
+ <api>
730
+ <ui path='/docs' />
731
+ </api>
732
+ </server>
733
+ )
734
+ ```
735
+
736
+ *default: `INNET_UI_PATH` || `'/ui'`*
737
+
627
738
  ### \<env>
628
739
 
629
740
  [← back](#utils)
@@ -2176,6 +2287,26 @@ you get an error:
2176
2287
  }
2177
2288
  ```
2178
2289
 
2290
+ #### format
2291
+
2292
+ An optional format modifier serves as a hint at the contents and format of the string.
2293
+ Available formats include: `email`, `date-time`, `date`, `uri`, `hostname`, `ipv4`, `ipv6`, `uuid`, `byte`, `binary`, `password` or custom string.
2294
+
2295
+ *src/app.tsx*
2296
+ ```typescript jsx
2297
+ export default (
2298
+ <server>
2299
+ <api>
2300
+ <endpoint method='get' path='/users'>
2301
+ <param in='query' name='email'>
2302
+ <string format='email' />
2303
+ </param>
2304
+ </endpoint>
2305
+ </api>
2306
+ </server>
2307
+ )
2308
+ ```
2309
+
2179
2310
  ### \<number>
2180
2311
 
2181
2312
  [← back](#primitive-data)
@@ -2325,6 +2456,66 @@ export default (
2325
2456
 
2326
2457
  *In this example `/products?rating=5` is valid and `/products?rating=6` is not*
2327
2458
 
2459
+ #### exclusiveMinimum, exclusiveMaximum
2460
+
2461
+ These props restrict the value to be strictly greater than or less than the specified number.
2462
+
2463
+ *src/app.tsx*
2464
+ ```typescript jsx
2465
+ export default (
2466
+ <server>
2467
+ <api>
2468
+ <endpoint method='get' path='/products'>
2469
+ <param in='query' name='rating'>
2470
+ <number
2471
+ exclusiveMinimum={0}
2472
+ exclusiveMaximum={5}
2473
+ />
2474
+ </param>
2475
+ </endpoint>
2476
+ </api>
2477
+ </server>
2478
+ )
2479
+ ```
2480
+
2481
+ #### multipleOf
2482
+
2483
+ This prop restricts the value to be a multiple of the specified number.
2484
+
2485
+ *src/app.tsx*
2486
+ ```typescript jsx
2487
+ export default (
2488
+ <server>
2489
+ <api>
2490
+ <endpoint method='get' path='/products'>
2491
+ <param in='query' name='quantity'>
2492
+ <number multipleOf={10} />
2493
+ </param>
2494
+ </endpoint>
2495
+ </api>
2496
+ </server>
2497
+ )
2498
+ ```
2499
+
2500
+ #### format
2501
+
2502
+ An optional format modifier serves as a hint at the contents and format of the number.
2503
+
2504
+ *src/app.tsx*
2505
+ ```typescript jsx
2506
+ export default (
2507
+ <server>
2508
+ <api>
2509
+ <endpoint method='get' path='/products'>
2510
+ <param in='query' name='price'>
2511
+ <number format='float' />
2512
+ </param>
2513
+ </endpoint>
2514
+ </api>
2515
+ </server>
2516
+ )
2517
+ ```
2518
+
2328
2519
  ### \<integer>
2329
2520
 
2330
2521
  [← back](#primitive-data)
@@ -2498,6 +2689,47 @@ export default (
2498
2689
 
2499
2690
  *In this example `/products?rating=5` is valid and `/products?rating=6` is not*
2500
2691
 
2692
+ #### exclusiveMinimum, exclusiveMaximum
2693
+
2694
+ These props restrict the value to be strictly greater than or less than the specified number.
2695
+
2696
+ *src/app.tsx*
2697
+ ```typescript jsx
2698
+ export default (
2699
+ <server>
2700
+ <api>
2701
+ <endpoint method='get' path='/products'>
2702
+ <param in='query' name='count'>
2703
+ <integer
2704
+ exclusiveMinimum={0}
2705
+ exclusiveMaximum={100}
2706
+ />
2707
+ </param>
2708
+ </endpoint>
2709
+ </api>
2710
+ </server>
2711
+ )
2712
+ ```
2713
+
2714
+ #### multipleOf
2715
+
2716
+ This prop restricts the value to be a multiple of the specified number.
2717
+
2718
+ *src/app.tsx*
2719
+ ```typescript jsx
2720
+ export default (
2721
+ <server>
2722
+ <api>
2723
+ <endpoint method='get' path='/products'>
2724
+ <param in='query' name='quantity'>
2725
+ <integer multipleOf={5} />
2726
+ </param>
2727
+ </endpoint>
2728
+ </api>
2729
+ </server>
2730
+ )
2731
+ ```
2732
+
2501
2733
  ### \<date>
2502
2734
 
2503
2735
  [← back](#primitive-data)
@@ -3135,6 +3367,48 @@ export default (
3135
3367
  )
3136
3368
  ```
3137
3369
 
3370
+ #### minItems, maxItems
3371
+
3372
+ Those two props validate the array by minimum and maximum number of items.
3373
+
3374
+ *src/app.tsx*
3375
+ ```typescript jsx
3376
+ export default (
3377
+ <server>
3378
+ <api>
3379
+ <endpoint method='get' path='/products'>
3380
+ <param in='query' name='tags'>
3381
+ <array minItems={1} maxItems={10}>
3382
+ <string />
3383
+ </array>
3384
+ </param>
3385
+ </endpoint>
3386
+ </api>
3387
+ </server>
3388
+ )
3389
+ ```
3390
+
3391
+ #### uniqueItems
3392
+
3393
+ This prop validates that all items in the array are unique.
3394
+
3395
+ *src/app.tsx*
3396
+ ```typescript jsx
3397
+ export default (
3398
+ <server>
3399
+ <api>
3400
+ <endpoint method='get' path='/products'>
3401
+ <param in='query' name='ids'>
3402
+ <array uniqueItems>
3403
+ <number />
3404
+ </array>
3405
+ </param>
3406
+ </endpoint>
3407
+ </api>
3408
+ </server>
3409
+ )
3410
+ ```
3411
+
3138
3412
  ### \<object>
3139
3413
 
3140
3414
  [← back](#list-of-data)
@@ -3298,6 +3572,58 @@ export default (
3298
3572
  )
3299
3573
  ```
3300
3574
 
3575
+ #### readOnly
3576
+
3577
+ You can mark a field as read-only, meaning it can only be returned in responses, not sent in requests.
3578
+
3579
+ *src/app.tsx*
3580
+ ```typescript jsx
3581
+ export default (
3582
+ <server>
3583
+ <api>
3584
+ <endpoint method='get' path='/users'>
3585
+ <response>
3586
+ <object>
3587
+ <field key='id' readOnly>
3588
+ <uuid />
3589
+ </field>
3590
+ <field key='name'>
3591
+ <string />
3592
+ </field>
3593
+ </object>
3594
+ </response>
3595
+ </endpoint>
3596
+ </api>
3597
+ </server>
3598
+ )
3599
+ ```
3600
+
3601
+ #### writeOnly
3602
+
3603
+ You can mark a field as write-only, meaning it can only be sent in requests, not returned in responses.
3604
+
3605
+ *src/app.tsx*
3606
+ ```typescript jsx
3607
+ export default (
3608
+ <server>
3609
+ <api>
3610
+ <endpoint method='post' path='/users'>
3611
+ <body>
3612
+ <object>
3613
+ <field key='password' writeOnly>
3614
+ <string />
3615
+ </field>
3616
+ <field key='name'>
3617
+ <string />
3618
+ </field>
3619
+ </object>
3620
+ </body>
3621
+ </endpoint>
3622
+ </api>
3623
+ </server>
3624
+ )
3625
+ ```
3626
+
3301
3627
  ## Run-Time
3302
3628
 
3303
3629
  Next elements relate to run-time action.
@@ -1,6 +1,6 @@
1
1
  import { type JSXElement } from '@innet/jsx';
2
2
  import { arraySync, async } from '@innet/utils';
3
- import { type AnyProps, type ApiProps, type ArrayProps, type BinaryProps, blacklist, type BlacklistProps, type BodyProps, type BooleanProps, cms, type CmsProps, type ContactProps, type CookieProps, type DateProps, type DtsProps, type EndpointProps, type EnvProps, type ErrorProps, type FieldProps, file, type FileProps, type HeaderProps, type HostProps, type IntegerProps, type LicenseProps, type NullProps, type NumberProps, type ObjectProps, type ParamProps, preset, type PresetProps, protection, type ProtectionProps, type ProxyProps, type RedirectProps, type ResponseProps, type ReturnProps, type ServerProps, type StringProps, type SuccessProps, type SwaggerProps, type TagProps, type TupleProps, type UuidProps, type VariableProps, whitelist, type WhitelistProps } from '../plugins';
3
+ import { type AnyProps, type ApiProps, type ArrayProps, type BinaryProps, blacklist, type BlacklistProps, type BodyProps, type BooleanProps, cms, type CmsProps, type ContactProps, type CookieProps, type DateProps, type DtsProps, type EndpointProps, type EnvProps, type ErrorProps, type FieldProps, file, type FileProps, type HeaderProps, type HostProps, type IntegerProps, type LicenseProps, type NullProps, type NumberProps, type ObjectProps, type ParamProps, preset, type PresetProps, protection, type ProtectionProps, type ProxyProps, type RedirectProps, type ResponseProps, type ReturnProps, type ServerProps, type StringProps, type SuccessProps, type SwaggerProps, type TagProps, type TupleProps, type UiProps, type UuidProps, type VariableProps, whitelist, type WhitelistProps } from '../plugins';
4
4
  export declare const arrayPlugins: (typeof arraySync)[];
5
5
  export declare const JSXPlugins: {
6
6
  any: import("innet").HandlerPlugin;
@@ -40,6 +40,7 @@ export declare const JSXPlugins: {
40
40
  swagger: import("innet").HandlerPlugin;
41
41
  tag: import("innet").HandlerPlugin;
42
42
  tuple: import("innet").HandlerPlugin;
43
+ ui: import("innet").HandlerPlugin;
43
44
  uuid: import("innet").HandlerPlugin;
44
45
  variable: import("innet").HandlerPlugin;
45
46
  whitelist: typeof whitelist;
@@ -50,7 +51,7 @@ export declare const promisePlugins: (typeof async)[];
50
51
  export declare const handler: import("innet").Handler;
51
52
  declare global {
52
53
  namespace JSX {
53
- type Element = ArrayElement | FunctionElement | JSXElement | boolean | null | number | (string & {}) | undefined;
54
+ type Element = ({} & string) | ArrayElement | FunctionElement | JSXElement | boolean | null | number | undefined;
54
55
  interface ArrayElement extends Array<Element> {
55
56
  }
56
57
  type FunctionElement = () => Element;
@@ -92,9 +93,11 @@ declare global {
92
93
  server: ServerProps;
93
94
  string: StringProps;
94
95
  success: SuccessProps;
96
+ /** @deprecated Use <ui> */
95
97
  swagger: SwaggerProps;
96
98
  tag: TagProps;
97
99
  tuple: TupleProps;
100
+ ui: UiProps;
98
101
  uuid: UuidProps;
99
102
  variable: VariableProps;
100
103
  whitelist: WhitelistProps;
@@ -39,6 +39,7 @@ import { success } from '../plugins/request/success/success.es6.js';
39
39
  import { swagger } from '../plugins/utils/swagger/swagger.es6.js';
40
40
  import { tag } from '../plugins/main/tag/tag.es6.js';
41
41
  import { tuple } from '../plugins/schema/tuple/tuple.es6.js';
42
+ import { ui } from '../plugins/utils/ui/ui.es6.js';
42
43
  import { uuid } from '../plugins/schema/uuid/uuid.es6.js';
43
44
  import { variable } from '../plugins/main/variable/variable.es6.js';
44
45
  import { whitelist } from '../plugins/utils/whitelist/whitelist.es6.js';
@@ -85,6 +86,7 @@ const JSXPlugins = {
85
86
  swagger,
86
87
  tag,
87
88
  tuple,
89
+ ui,
88
90
  uuid,
89
91
  variable,
90
92
  whitelist,
@@ -43,6 +43,7 @@ var success = require('../plugins/request/success/success.js');
43
43
  var swagger = require('../plugins/utils/swagger/swagger.js');
44
44
  var tag = require('../plugins/main/tag/tag.js');
45
45
  var tuple = require('../plugins/schema/tuple/tuple.js');
46
+ var ui = require('../plugins/utils/ui/ui.js');
46
47
  var uuid = require('../plugins/schema/uuid/uuid.js');
47
48
  var variable = require('../plugins/main/variable/variable.js');
48
49
  var whitelist = require('../plugins/utils/whitelist/whitelist.js');
@@ -89,6 +90,7 @@ const JSXPlugins = {
89
90
  swagger: swagger.swagger,
90
91
  tag: tag.tag,
91
92
  tuple: tuple.tuple,
93
+ ui: ui.ui,
92
94
  uuid: uuid.uuid,
93
95
  variable: variable.variable,
94
96
  whitelist: whitelist.whitelist,
package/hooks/index.d.ts CHANGED
@@ -1,33 +1,33 @@
1
- export * from './useServer';
1
+ export * from './useAction';
2
2
  export * from './useApi';
3
- export * from './useHost';
4
- export * from './useTag';
5
- export * from './useComponentName';
6
- export * from './useOneElementError';
7
- export * from './useSchemaContext';
8
- export * from './useSchemaType';
9
- export * from './useNewSchema';
10
- export * from './useRequest';
11
- export * from './useResponse';
12
- export * from './useParams';
3
+ export * from './useBlock';
13
4
  export * from './useBody';
14
- export * from './useSearch';
15
- export * from './useParam';
5
+ export * from './useBodyFile';
6
+ export * from './useClientIp';
7
+ export * from './useComponentName';
8
+ export * from './useCookies';
9
+ export * from './useEffect';
16
10
  export * from './useEndpoint';
17
- export * from './useBlock';
18
11
  export * from './useHeaders';
19
- export * from './useCookies';
20
- export * from './useAction';
21
- export * from './useThrow';
22
- export * from './useRule';
12
+ export * from './useHost';
13
+ export * from './useIsServerHttps';
14
+ export * from './useNewSchema';
23
15
  export * from './useObjectRule';
24
- export * from './useBodyFile';
16
+ export * from './useObjectSchemaContext';
17
+ export * from './useOneElementError';
18
+ export * from './useParam';
19
+ export * from './useParams';
25
20
  export * from './usePath';
21
+ export * from './useRequest';
22
+ export * from './useRequestHandler';
23
+ export * from './useResponse';
24
+ export * from './useRule';
25
+ export * from './useSchemaContext';
26
+ export * from './useSchemaType';
27
+ export * from './useSearch';
28
+ export * from './useServer';
26
29
  export * from './useServerPlugin';
27
- export * from './useClientIp';
28
30
  export * from './useServerPlugins';
29
- export * from './useObjectSchemaContext';
30
31
  export * from './useServerPort';
31
- export * from './useIsServerHttps';
32
- export * from './useRequestHandler';
33
- export * from './useEffect';
32
+ export * from './useTag';
33
+ export * from './useThrow';
@@ -1,33 +1,33 @@
1
- import './useServer/index.es6.js';
1
+ import './useAction/index.es6.js';
2
2
  import './useApi/index.es6.js';
3
- import './useHost/index.es6.js';
4
- import './useTag/index.es6.js';
5
- import './useComponentName/index.es6.js';
6
- import './useOneElementError/index.es6.js';
7
- import './useSchemaContext/index.es6.js';
8
- import './useSchemaType/index.es6.js';
9
- import './useNewSchema/index.es6.js';
10
- import './useRequest/index.es6.js';
11
- import './useResponse/index.es6.js';
12
- import './useParams/index.es6.js';
3
+ import './useBlock/index.es6.js';
13
4
  import './useBody/index.es6.js';
14
- import './useSearch/index.es6.js';
15
- import './useParam/index.es6.js';
5
+ import './useBodyFile/index.es6.js';
6
+ import './useClientIp/index.es6.js';
7
+ import './useComponentName/index.es6.js';
8
+ import './useCookies/index.es6.js';
9
+ import './useEffect/index.es6.js';
16
10
  import './useEndpoint/index.es6.js';
17
- import './useBlock/index.es6.js';
18
11
  import './useHeaders/index.es6.js';
19
- import './useCookies/index.es6.js';
20
- import './useAction/index.es6.js';
21
- import './useThrow/index.es6.js';
22
- import './useRule/index.es6.js';
12
+ import './useHost/index.es6.js';
13
+ import './useIsServerHttps/index.es6.js';
14
+ import './useNewSchema/index.es6.js';
23
15
  import './useObjectRule/index.es6.js';
24
- import './useBodyFile/index.es6.js';
16
+ import './useObjectSchemaContext/index.es6.js';
17
+ import './useOneElementError/index.es6.js';
18
+ import './useParam/index.es6.js';
19
+ import './useParams/index.es6.js';
25
20
  import './usePath/index.es6.js';
21
+ import './useRequest/index.es6.js';
22
+ import './useRequestHandler/index.es6.js';
23
+ import './useResponse/index.es6.js';
24
+ import './useRule/index.es6.js';
25
+ import './useSchemaContext/index.es6.js';
26
+ import './useSchemaType/index.es6.js';
27
+ import './useSearch/index.es6.js';
28
+ import './useServer/index.es6.js';
26
29
  import './useServerPlugin/index.es6.js';
27
- import './useClientIp/index.es6.js';
28
30
  import './useServerPlugins/index.es6.js';
29
- import './useObjectSchemaContext/index.es6.js';
30
31
  import './useServerPort/index.es6.js';
31
- import './useIsServerHttps/index.es6.js';
32
- import './useRequestHandler/index.es6.js';
33
- import './useEffect/index.es6.js';
32
+ import './useTag/index.es6.js';
33
+ import './useThrow/index.es6.js';
package/hooks/index.js CHANGED
@@ -1,36 +1,36 @@
1
1
  'use strict';
2
2
 
3
- require('./useServer/index.js');
3
+ require('./useAction/index.js');
4
4
  require('./useApi/index.js');
5
- require('./useHost/index.js');
6
- require('./useTag/index.js');
7
- require('./useComponentName/index.js');
8
- require('./useOneElementError/index.js');
9
- require('./useSchemaContext/index.js');
10
- require('./useSchemaType/index.js');
11
- require('./useNewSchema/index.js');
12
- require('./useRequest/index.js');
13
- require('./useResponse/index.js');
14
- require('./useParams/index.js');
5
+ require('./useBlock/index.js');
15
6
  require('./useBody/index.js');
16
- require('./useSearch/index.js');
17
- require('./useParam/index.js');
7
+ require('./useBodyFile/index.js');
8
+ require('./useClientIp/index.js');
9
+ require('./useComponentName/index.js');
10
+ require('./useCookies/index.js');
11
+ require('./useEffect/index.js');
18
12
  require('./useEndpoint/index.js');
19
- require('./useBlock/index.js');
20
13
  require('./useHeaders/index.js');
21
- require('./useCookies/index.js');
22
- require('./useAction/index.js');
23
- require('./useThrow/index.js');
24
- require('./useRule/index.js');
14
+ require('./useHost/index.js');
15
+ require('./useIsServerHttps/index.js');
16
+ require('./useNewSchema/index.js');
25
17
  require('./useObjectRule/index.js');
26
- require('./useBodyFile/index.js');
18
+ require('./useObjectSchemaContext/index.js');
19
+ require('./useOneElementError/index.js');
20
+ require('./useParam/index.js');
21
+ require('./useParams/index.js');
27
22
  require('./usePath/index.js');
23
+ require('./useRequest/index.js');
24
+ require('./useRequestHandler/index.js');
25
+ require('./useResponse/index.js');
26
+ require('./useRule/index.js');
27
+ require('./useSchemaContext/index.js');
28
+ require('./useSchemaType/index.js');
29
+ require('./useSearch/index.js');
30
+ require('./useServer/index.js');
28
31
  require('./useServerPlugin/index.js');
29
- require('./useClientIp/index.js');
30
32
  require('./useServerPlugins/index.js');
31
- require('./useObjectSchemaContext/index.js');
32
33
  require('./useServerPort/index.js');
33
- require('./useIsServerHttps/index.js');
34
- require('./useRequestHandler/index.js');
35
- require('./useEffect/index.js');
34
+ require('./useTag/index.js');
35
+ require('./useThrow/index.js');
36
36
 
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { handler as default } from './handler';
2
- export * from './plugins';
3
2
  export * from './handler';
4
- export * from './utils';
5
3
  export * from './hooks';
4
+ export * from './plugins';
6
5
  export * from './types';
6
+ export * from './utils';