@eik/core 1.3.54 → 1.3.55

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 (63) hide show
  1. package/lib/classes/alias.js +48 -48
  2. package/lib/classes/asset.js +99 -92
  3. package/lib/classes/author.js +20 -20
  4. package/lib/classes/http-incoming.js +52 -52
  5. package/lib/classes/http-outgoing.js +84 -83
  6. package/lib/classes/meta.js +20 -23
  7. package/lib/classes/package.js +73 -70
  8. package/lib/classes/versions.js +62 -60
  9. package/lib/handlers/alias.delete.js +125 -120
  10. package/lib/handlers/alias.get.js +92 -87
  11. package/lib/handlers/alias.post.js +196 -203
  12. package/lib/handlers/alias.put.js +196 -202
  13. package/lib/handlers/auth.post.js +95 -93
  14. package/lib/handlers/map.get.js +110 -111
  15. package/lib/handlers/map.put.js +256 -231
  16. package/lib/handlers/pkg.get.js +120 -122
  17. package/lib/handlers/pkg.log.js +112 -110
  18. package/lib/handlers/pkg.put.js +223 -213
  19. package/lib/handlers/versions.get.js +92 -101
  20. package/lib/main.js +47 -47
  21. package/lib/multipart/form-field.js +20 -23
  22. package/lib/multipart/form-file.js +22 -24
  23. package/lib/multipart/parser.js +231 -217
  24. package/lib/sinks/mem-entry.js +26 -31
  25. package/lib/sinks/test.js +287 -273
  26. package/lib/utils/defaults.js +11 -11
  27. package/lib/utils/globals.js +5 -5
  28. package/lib/utils/healthcheck.js +131 -108
  29. package/lib/utils/path-builders-fs.js +61 -29
  30. package/lib/utils/path-builders-uri.js +26 -18
  31. package/lib/utils/utils.js +76 -79
  32. package/package.json +20 -15
  33. package/types/classes/alias.d.ts +28 -0
  34. package/types/classes/asset.d.ts +48 -0
  35. package/types/classes/author.d.ts +17 -0
  36. package/types/classes/http-incoming.d.ts +37 -0
  37. package/types/classes/http-outgoing.d.ts +20 -0
  38. package/types/classes/meta.d.ts +17 -0
  39. package/types/classes/package.d.ts +40 -0
  40. package/types/classes/versions.d.ts +28 -0
  41. package/types/handlers/alias.delete.d.ts +33 -0
  42. package/types/handlers/alias.get.d.ts +48 -0
  43. package/types/handlers/alias.post.d.ts +83 -0
  44. package/types/handlers/alias.put.d.ts +83 -0
  45. package/types/handlers/auth.post.d.ts +82 -0
  46. package/types/handlers/map.get.d.ts +51 -0
  47. package/types/handlers/map.put.d.ts +78 -0
  48. package/types/handlers/pkg.get.d.ts +51 -0
  49. package/types/handlers/pkg.log.d.ts +51 -0
  50. package/types/handlers/pkg.put.d.ts +107 -0
  51. package/types/handlers/versions.get.d.ts +48 -0
  52. package/types/main.d.ts +44 -0
  53. package/types/multipart/form-field.d.ts +17 -0
  54. package/types/multipart/form-file.d.ts +17 -0
  55. package/types/multipart/parser.d.ts +52 -0
  56. package/types/sinks/mem-entry.d.ts +15 -0
  57. package/types/sinks/test.d.ts +32 -0
  58. package/types/utils/defaults.d.ts +9 -0
  59. package/types/utils/globals.d.ts +8 -0
  60. package/types/utils/healthcheck.d.ts +24 -0
  61. package/types/utils/path-builders-fs.d.ts +41 -0
  62. package/types/utils/path-builders-uri.d.ts +26 -0
  63. package/types/utils/utils.d.ts +6 -0
package/lib/main.js CHANGED
@@ -1,35 +1,35 @@
1
- import FS from '@eik/sink-file-system';
2
- import MEM from '@eik/sink-memory';
1
+ import FS from "@eik/sink-file-system";
2
+ import MEM from "@eik/sink-memory";
3
3
 
4
- import VersionsGet from './handlers/versions.get.js';
5
- import AliasPost from './handlers/alias.post.js';
6
- import AliasPut from './handlers/alias.put.js';
7
- import AliasGet from './handlers/alias.get.js';
8
- import AliasDel from './handlers/alias.delete.js';
9
- import AuthPost from './handlers/auth.post.js';
10
- import PkgLog from './handlers/pkg.log.js';
11
- import PkgGet from './handlers/pkg.get.js';
12
- import PkgPut from './handlers/pkg.put.js';
13
- import MapGet from './handlers/map.get.js';
14
- import MapPut from './handlers/map.put.js';
4
+ import VersionsGet from "./handlers/versions.get.js";
5
+ import AliasPost from "./handlers/alias.post.js";
6
+ import AliasPut from "./handlers/alias.put.js";
7
+ import AliasGet from "./handlers/alias.get.js";
8
+ import AliasDel from "./handlers/alias.delete.js";
9
+ import AuthPost from "./handlers/auth.post.js";
10
+ import PkgLog from "./handlers/pkg.log.js";
11
+ import PkgGet from "./handlers/pkg.get.js";
12
+ import PkgPut from "./handlers/pkg.put.js";
13
+ import MapGet from "./handlers/map.get.js";
14
+ import MapPut from "./handlers/map.put.js";
15
15
 
16
- import TEST from './sinks/test.js';
16
+ import TEST from "./sinks/test.js";
17
17
 
18
- import HealthCheck from './utils/healthcheck.js';
19
- import globals from './utils/globals.js';
18
+ import HealthCheck from "./utils/healthcheck.js";
19
+ import globals from "./utils/globals.js";
20
20
 
21
21
  const http = {
22
- VersionsGet,
23
- AliasPost,
24
- AliasPut,
25
- AliasGet,
26
- AliasDel,
27
- AuthPost,
28
- PkgLog,
29
- PkgGet,
30
- PkgPut,
31
- MapGet,
32
- MapPut,
22
+ VersionsGet,
23
+ AliasPost,
24
+ AliasPut,
25
+ AliasGet,
26
+ AliasDel,
27
+ AuthPost,
28
+ PkgLog,
29
+ PkgGet,
30
+ PkgPut,
31
+ MapGet,
32
+ MapPut,
33
33
  };
34
34
 
35
35
  /**
@@ -38,30 +38,30 @@ const http = {
38
38
  * Ex: sink.MEM is replaced by eik/sink-memory. sink.FS is replaced by eik/sink-file-system.
39
39
  */
40
40
  const sink = {
41
- /**
42
- * @deprecated Import eik/sink-memory or implement your own and pass it to the Service instead.
43
- */
44
- TEST,
45
- /**
46
- * @deprecated Import eik/sink-memory and pass it to the Service instead
47
- */
48
- MEM,
49
- /**
50
- * @deprecated Import eik/sink-file-system and pass it to the Service instead
51
- */
52
- FS,
41
+ /**
42
+ * @deprecated Import eik/sink-memory or implement your own and pass it to the Service instead.
43
+ */
44
+ TEST,
45
+ /**
46
+ * @deprecated Import eik/sink-memory and pass it to the Service instead
47
+ */
48
+ MEM,
49
+ /**
50
+ * @deprecated Import eik/sink-file-system and pass it to the Service instead
51
+ */
52
+ FS,
53
53
  };
54
54
 
55
55
  const prop = {
56
- base_auth: globals.BASE_AUTHENTICATION,
57
- base_map: globals.BASE_IMPORT_MAPS,
58
- base_pkg: globals.BASE_PACKAGES,
59
- base_npm: globals.BASE_NPM,
56
+ base_auth: globals.BASE_AUTHENTICATION,
57
+ base_map: globals.BASE_IMPORT_MAPS,
58
+ base_pkg: globals.BASE_PACKAGES,
59
+ base_npm: globals.BASE_NPM,
60
60
  };
61
61
 
62
62
  export default {
63
- HealthCheck,
64
- http,
65
- sink,
66
- prop,
63
+ HealthCheck,
64
+ http,
65
+ sink,
66
+ prop,
67
67
  };
@@ -1,29 +1,26 @@
1
1
  const FormField = class FormField {
2
- constructor({
3
- value = '',
4
- name = '',
5
- } = {}) {
6
- this._value = value;
7
- this._name = name;
8
- }
2
+ constructor({ value = "", name = "" } = {}) {
3
+ this._value = value;
4
+ this._name = name;
5
+ }
9
6
 
10
- get value() {
11
- return this._value;
12
- }
7
+ get value() {
8
+ return this._value;
9
+ }
13
10
 
14
- get name() {
15
- return this._name;
16
- }
11
+ get name() {
12
+ return this._name;
13
+ }
17
14
 
18
- toJSON() {
19
- return {
20
- value: this.value,
21
- name: this.name,
22
- };
23
- }
15
+ toJSON() {
16
+ return {
17
+ value: this.value,
18
+ name: this.name,
19
+ };
20
+ }
24
21
 
25
- get [Symbol.toStringTag]() {
26
- return 'FormField';
27
- }
28
- }
22
+ get [Symbol.toStringTag]() {
23
+ return "FormField";
24
+ }
25
+ };
29
26
  export default FormField;
@@ -1,30 +1,28 @@
1
1
  const FormFile = class FormFile {
2
- constructor({
3
- value = [],
4
- name = '',
5
- } = {}) {
6
- if (!Array.isArray(value)) throw new TypeError('The argument "value" must be of type Array');
7
- this._value = value;
8
- this._name = name;
9
- }
2
+ constructor({ value = [], name = "" } = {}) {
3
+ if (!Array.isArray(value))
4
+ throw new TypeError('The argument "value" must be of type Array');
5
+ this._value = value;
6
+ this._name = name;
7
+ }
10
8
 
11
- get value() {
12
- return this._value;
13
- }
9
+ get value() {
10
+ return this._value;
11
+ }
14
12
 
15
- get name() {
16
- return this._name;
17
- }
13
+ get name() {
14
+ return this._name;
15
+ }
18
16
 
19
- toJSON() {
20
- return {
21
- value: this.value,
22
- name: this.name,
23
- };
24
- }
17
+ toJSON() {
18
+ return {
19
+ value: this.value,
20
+ name: this.name,
21
+ };
22
+ }
25
23
 
26
- get [Symbol.toStringTag]() {
27
- return 'FormFile';
28
- }
29
- }
24
+ get [Symbol.toStringTag]() {
25
+ return "FormFile";
26
+ }
27
+ };
30
28
  export default FormFile;