@eik/core 1.3.53 → 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 (64) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/classes/alias.js +48 -48
  3. package/lib/classes/asset.js +99 -92
  4. package/lib/classes/author.js +20 -20
  5. package/lib/classes/http-incoming.js +52 -52
  6. package/lib/classes/http-outgoing.js +84 -83
  7. package/lib/classes/meta.js +20 -23
  8. package/lib/classes/package.js +73 -70
  9. package/lib/classes/versions.js +62 -60
  10. package/lib/handlers/alias.delete.js +125 -120
  11. package/lib/handlers/alias.get.js +92 -87
  12. package/lib/handlers/alias.post.js +196 -203
  13. package/lib/handlers/alias.put.js +196 -202
  14. package/lib/handlers/auth.post.js +95 -93
  15. package/lib/handlers/map.get.js +110 -111
  16. package/lib/handlers/map.put.js +256 -231
  17. package/lib/handlers/pkg.get.js +120 -122
  18. package/lib/handlers/pkg.log.js +112 -110
  19. package/lib/handlers/pkg.put.js +223 -213
  20. package/lib/handlers/versions.get.js +92 -101
  21. package/lib/main.js +47 -47
  22. package/lib/multipart/form-field.js +20 -23
  23. package/lib/multipart/form-file.js +22 -24
  24. package/lib/multipart/parser.js +231 -217
  25. package/lib/sinks/mem-entry.js +26 -31
  26. package/lib/sinks/test.js +287 -273
  27. package/lib/utils/defaults.js +11 -11
  28. package/lib/utils/globals.js +5 -5
  29. package/lib/utils/healthcheck.js +131 -108
  30. package/lib/utils/path-builders-fs.js +61 -29
  31. package/lib/utils/path-builders-uri.js +26 -18
  32. package/lib/utils/utils.js +76 -79
  33. package/package.json +22 -17
  34. package/types/classes/alias.d.ts +28 -0
  35. package/types/classes/asset.d.ts +48 -0
  36. package/types/classes/author.d.ts +17 -0
  37. package/types/classes/http-incoming.d.ts +37 -0
  38. package/types/classes/http-outgoing.d.ts +20 -0
  39. package/types/classes/meta.d.ts +17 -0
  40. package/types/classes/package.d.ts +40 -0
  41. package/types/classes/versions.d.ts +28 -0
  42. package/types/handlers/alias.delete.d.ts +33 -0
  43. package/types/handlers/alias.get.d.ts +48 -0
  44. package/types/handlers/alias.post.d.ts +83 -0
  45. package/types/handlers/alias.put.d.ts +83 -0
  46. package/types/handlers/auth.post.d.ts +82 -0
  47. package/types/handlers/map.get.d.ts +51 -0
  48. package/types/handlers/map.put.d.ts +78 -0
  49. package/types/handlers/pkg.get.d.ts +51 -0
  50. package/types/handlers/pkg.log.d.ts +51 -0
  51. package/types/handlers/pkg.put.d.ts +107 -0
  52. package/types/handlers/versions.get.d.ts +48 -0
  53. package/types/main.d.ts +44 -0
  54. package/types/multipart/form-field.d.ts +17 -0
  55. package/types/multipart/form-file.d.ts +17 -0
  56. package/types/multipart/parser.d.ts +52 -0
  57. package/types/sinks/mem-entry.d.ts +15 -0
  58. package/types/sinks/test.d.ts +32 -0
  59. package/types/utils/defaults.d.ts +9 -0
  60. package/types/utils/globals.d.ts +8 -0
  61. package/types/utils/healthcheck.d.ts +24 -0
  62. package/types/utils/path-builders-fs.d.ts +41 -0
  63. package/types/utils/path-builders-uri.d.ts +26 -0
  64. 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;