@leyyo/common 1.0.1 → 1.0.2

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 (108) hide show
  1. package/dist/assertion/common-assertion-impl.d.ts +3 -4
  2. package/dist/assertion/common-assertion-impl.js +9 -8
  3. package/dist/assertion/index-types.d.ts +6 -22
  4. package/dist/assertion/index.d.ts +0 -1
  5. package/dist/assertion/index.js +0 -1
  6. package/dist/error/common-error-impl.d.ts +6 -4
  7. package/dist/error/common-error-impl.js +8 -4
  8. package/dist/error/index-types.d.ts +5 -52
  9. package/dist/error/index.d.ts +0 -5
  10. package/dist/error/index.js +0 -5
  11. package/dist/{error → exception}/assertion-exception.d.ts +1 -1
  12. package/dist/{error → exception}/caused-exception.d.ts +1 -1
  13. package/dist/{error → exception}/developer-exception.d.ts +1 -1
  14. package/dist/{error → exception}/exception.d.ts +4 -3
  15. package/dist/{error → exception}/exception.js +4 -4
  16. package/dist/exception/index-types.d.ts +30 -0
  17. package/dist/exception/index.d.ts +6 -0
  18. package/dist/exception/index.js +22 -0
  19. package/dist/fqn/common-fqn-impl.d.ts +11 -0
  20. package/dist/fqn/common-fqn-impl.js +47 -0
  21. package/dist/fqn/index-types.d.ts +6 -0
  22. package/dist/fqn/index-types.js +2 -0
  23. package/dist/fqn/index.d.ts +2 -0
  24. package/dist/{callback → fqn}/index.js +1 -1
  25. package/dist/hook/common-hook-impl.d.ts +30 -0
  26. package/dist/hook/common-hook-impl.js +111 -0
  27. package/dist/hook/index-types.d.ts +56 -0
  28. package/dist/hook/index-types.js +2 -0
  29. package/dist/hook/index.d.ts +2 -0
  30. package/dist/hook/index.js +18 -0
  31. package/dist/index.d.ts +11 -5
  32. package/dist/index.js +19 -6
  33. package/dist/is/common-is-impl.js +6 -6
  34. package/dist/is/index-types.d.ts +2 -3
  35. package/dist/leyyo/index-types.d.ts +4 -2
  36. package/dist/leyyo/leyyo-impl.d.ts +4 -2
  37. package/dist/leyyo/leyyo-impl.js +37 -29
  38. package/dist/literal/country-code.d.ts +8 -0
  39. package/dist/literal/country-code.js +17 -0
  40. package/dist/literal/environment.d.ts +8 -0
  41. package/dist/literal/environment.js +7 -0
  42. package/dist/literal/http-method.d.ts +8 -0
  43. package/dist/literal/http-method.js +7 -0
  44. package/dist/literal/http-place.d.ts +8 -0
  45. package/dist/literal/http-place.js +7 -0
  46. package/dist/literal/index-types.d.ts +6 -0
  47. package/dist/literal/index-types.js +2 -0
  48. package/dist/literal/index.d.ts +14 -0
  49. package/dist/literal/index.js +30 -0
  50. package/dist/literal/key-value.d.ts +4 -0
  51. package/dist/literal/key-value.js +7 -0
  52. package/dist/literal/language-code.d.ts +8 -0
  53. package/dist/literal/language-code.js +12 -0
  54. package/dist/literal/locale-code.d.ts +10 -0
  55. package/dist/literal/locale-code.js +17 -0
  56. package/dist/literal/primitive.d.ts +8 -0
  57. package/dist/literal/primitive.js +7 -0
  58. package/dist/literal/real-value.d.ts +8 -0
  59. package/dist/literal/real-value.js +7 -0
  60. package/dist/literal/severity.d.ts +8 -0
  61. package/dist/literal/severity.js +7 -0
  62. package/dist/literal/storage-type.d.ts +8 -0
  63. package/dist/literal/storage-type.js +7 -0
  64. package/dist/literal/weak-false.d.ts +8 -0
  65. package/dist/literal/weak-false.js +7 -0
  66. package/dist/literal/weak-true.d.ts +8 -0
  67. package/dist/literal/weak-true.js +7 -0
  68. package/dist/log/common-log-impl.d.ts +3 -2
  69. package/dist/log/common-log-impl.js +6 -6
  70. package/dist/log/index-types.d.ts +2 -52
  71. package/dist/log/index-types.js +0 -1
  72. package/dist/log/index.d.ts +1 -1
  73. package/dist/log/index.js +1 -1
  74. package/dist/log/logger-impl.d.ts +3 -3
  75. package/dist/log/logger-impl.js +5 -5
  76. package/dist/{assertion → shared}/assert.js +1 -0
  77. package/dist/{aliases.d.ts → shared/index-aliases.d.ts} +1 -1
  78. package/dist/shared/index-types.d.ts +141 -0
  79. package/dist/shared/index-types.js +3 -0
  80. package/dist/shared/index.d.ts +5 -0
  81. package/dist/shared/index.js +21 -0
  82. package/dist/storage/common-storage-impl.d.ts +3 -3
  83. package/dist/storage/common-storage-impl.js +3 -3
  84. package/dist/storage/index-types.d.ts +3 -13
  85. package/dist/storage/index.d.ts +0 -1
  86. package/dist/storage/index.js +0 -1
  87. package/dist/to/common-to-impl.d.ts +3 -3
  88. package/dist/to/common-to-impl.js +11 -11
  89. package/dist/to/index-types.d.ts +1 -30
  90. package/package.json +1 -1
  91. package/dist/callback/common-callback-impl.d.ts +0 -31
  92. package/dist/callback/common-callback-impl.js +0 -134
  93. package/dist/callback/index-types.d.ts +0 -73
  94. package/dist/callback/index.d.ts +0 -2
  95. package/dist/literals.d.ts +0 -106
  96. package/dist/literals.js +0 -81
  97. package/dist/{error → exception}/assertion-exception.js +0 -0
  98. package/dist/{error → exception}/caused-exception.js +0 -0
  99. package/dist/{error → exception}/developer-exception.js +0 -0
  100. package/dist/{callback → exception}/index-types.js +0 -0
  101. package/dist/{error → exception}/multiple-exception.d.ts +1 -1
  102. package/dist/{error → exception}/multiple-exception.js +0 -0
  103. package/dist/{assertion → shared}/assert.d.ts +1 -1
  104. /package/dist/{aliases.js → shared/index-aliases.js} +0 -0
  105. /package/dist/{constants.d.ts → shared/index-constants.d.ts} +0 -0
  106. /package/dist/{constants.js → shared/index-constants.js} +0 -0
  107. /package/dist/{storage → shared}/list.d.ts +0 -0
  108. /package/dist/{storage → shared}/list.js +0 -0
@@ -0,0 +1,56 @@
1
+ import { Arr, HookDefinedProvider, HookDefinedProviderLambda, InitLike, ShiftMain, ShiftSecure } from "../shared";
2
+ /**
3
+ * Hook interface, it collects all jobs and fire them when callback is defined
4
+ * */
5
+ export interface CommonHook extends ShiftSecure<CommonHookSecure> {
6
+ /**
7
+ * Attach a callback
8
+ *
9
+ * @param {string} channel
10
+ * @param {Function} fn
11
+ *
12
+ * Notes:
13
+ * - channel should be regular string
14
+ * - After attached, it should call all waiting calls in the queue
15
+ * */
16
+ attachCallback(channel: string, fn: Function): void;
17
+ /**
18
+ * Add a call into queue, which to be executed by appropriate callback
19
+ *
20
+ * @param {string} channel
21
+ * @param {Array<any>} args
22
+ * @returns {boolean} - channel exists?
23
+ *
24
+ * Notes:
25
+ * - channel should be regular string
26
+ * */
27
+ queueForCallback(channel: string, ...args: Arr): boolean;
28
+ /**
29
+ * Informs when callback is changed
30
+ *
31
+ * @param {string} channel
32
+ * @param {Function} consumer
33
+ * @param {HookDefinedProviderLambda} callback
34
+ *
35
+ * Notes:
36
+ * - channel should be regular string
37
+ * - callback should be regular function
38
+ * - channel should not be already defined
39
+ * */
40
+ whenProviderDefined<T extends HookDefinedProvider = HookDefinedProvider>(channel: string, consumer: Function, callback: HookDefinedProviderLambda<T>): void;
41
+ /**
42
+ * Defines a provider to replace temporary providers
43
+ *
44
+ * @param {string} channel
45
+ * @param {Function} producer
46
+ * @param {Object} instance
47
+ *
48
+ * Notes:
49
+ * - channel should be regular string
50
+ * */
51
+ defineProvider<T extends HookDefinedProvider = HookDefinedProvider>(channel: string, producer: Function, instance: T): void;
52
+ }
53
+ /**
54
+ * Secure hook interface
55
+ * */
56
+ export type CommonHookSecure = ShiftMain<CommonHook> & InitLike;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './index-types';
2
+ export * from './common-hook-impl';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./index-types"), exports);
18
+ __exportStar(require("./common-hook-impl"), exports);
package/dist/index.d.ts CHANGED
@@ -1,7 +1,13 @@
1
+ export * from './exception';
2
+ export * from './literal';
3
+ export * from './shared';
1
4
  import { leyyo } from "./leyyo";
2
- export * from './aliases';
3
- export * from './constants';
4
- export * from './literals';
5
5
  declare const is: import("./is").CommonIs;
6
- declare const callback: import("./callback").CommonCallback;
7
- export { leyyo, is, callback };
6
+ declare const hook: import("./hook").CommonHook;
7
+ declare const assertion: import("./assertion").CommonAssertion;
8
+ declare const storage: import("./storage").CommonStorage;
9
+ declare const to: import("./to").CommonTo;
10
+ declare const commonFqn: import("./fqn").CommonFqn;
11
+ declare const commonLog: import("./log").CommonLog;
12
+ declare const commonError: import("./error").CommonError;
13
+ export { leyyo, is, hook, assertion, storage, to, commonFqn, commonLog, commonError };
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // noinspection JSUnusedGlobalSymbols
2
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
4
  if (k2 === undefined) k2 = k;
4
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -14,13 +15,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
16
  };
16
17
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.callback = exports.is = exports.leyyo = void 0;
18
+ exports.commonError = exports.commonLog = exports.commonFqn = exports.to = exports.storage = exports.assertion = exports.hook = exports.is = exports.leyyo = void 0;
19
+ __exportStar(require("./exception"), exports);
20
+ __exportStar(require("./literal"), exports);
21
+ __exportStar(require("./shared"), exports);
18
22
  const leyyo_1 = require("./leyyo");
19
23
  Object.defineProperty(exports, "leyyo", { enumerable: true, get: function () { return leyyo_1.leyyo; } });
20
- __exportStar(require("./aliases"), exports);
21
- __exportStar(require("./constants"), exports);
22
- __exportStar(require("./literals"), exports);
23
24
  const is = leyyo_1.leyyo.is;
24
25
  exports.is = is;
25
- const callback = leyyo_1.leyyo.callback;
26
- exports.callback = callback;
26
+ const hook = leyyo_1.leyyo.hook;
27
+ exports.hook = hook;
28
+ const assertion = leyyo_1.leyyo.assertion;
29
+ exports.assertion = assertion;
30
+ const storage = leyyo_1.leyyo.storage;
31
+ exports.storage = storage;
32
+ const to = leyyo_1.leyyo.to;
33
+ exports.to = to;
34
+ const commonFqn = leyyo_1.leyyo.fqn;
35
+ exports.commonFqn = commonFqn;
36
+ const commonLog = leyyo_1.leyyo.log;
37
+ exports.commonLog = commonLog;
38
+ const commonError = leyyo_1.leyyo.error;
39
+ exports.commonError = commonError;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CommonIsImpl = void 0;
4
- const literals_1 = require("../literals");
4
+ const literal_1 = require("../literal");
5
5
  // noinspection JSUnusedGlobalSymbols, JSUnusedLocalSymbols
6
6
  /** @inheritDoc */
7
7
  class CommonIsImpl {
@@ -12,15 +12,15 @@ class CommonIsImpl {
12
12
  }
13
13
  /** @inheritDoc */
14
14
  primitive(value) {
15
- return literals_1.PrimitiveItems.includes((typeof value));
15
+ return literal_1.PrimitiveItems.includes((typeof value));
16
16
  }
17
17
  /** @inheritDoc */
18
18
  realValue(value) {
19
- return literals_1.RealValueItems.includes((typeof value));
19
+ return literal_1.RealValueItems.includes((typeof value));
20
20
  }
21
21
  /** @inheritDoc */
22
22
  key(value) {
23
- return literals_1.KeyValueItems.includes((typeof value));
23
+ return literal_1.KeyValueItems.includes((typeof value));
24
24
  }
25
25
  /** @inheritDoc */
26
26
  object(value) {
@@ -65,13 +65,13 @@ class CommonIsImpl {
65
65
  /** @inheritDoc */
66
66
  true(value) {
67
67
  return (value === true) ||
68
- (this.text(value) && literals_1.WeakTrueItems.includes(value.toLowerCase())) ||
68
+ (this.text(value) && literal_1.WeakTrueItems.includes(value.toLowerCase())) ||
69
69
  (this.number(value) && value > 0);
70
70
  }
71
71
  /** @inheritDoc */
72
72
  false(value) {
73
73
  return (value === false) ||
74
- (this.text(value) && literals_1.WeakFalseItems.includes(value.toLowerCase())) ||
74
+ (this.text(value) && literal_1.WeakFalseItems.includes(value.toLowerCase())) ||
75
75
  (this.number(value) && value <= 0);
76
76
  }
77
77
  // endregion is
@@ -1,4 +1,4 @@
1
- import { InitLike, ShiftMain, ShiftSecure } from "../aliases";
1
+ import { InitLike, ShiftMain, ShiftSecure } from "../shared";
2
2
  /**
3
3
  * Basic is commands to easy use
4
4
  * */
@@ -141,5 +141,4 @@ export interface CommonIs extends ShiftSecure<CommonIsSecure> {
141
141
  * */
142
142
  false(value: any): boolean;
143
143
  }
144
- export interface CommonIsSecure extends ShiftMain<CommonIs>, InitLike {
145
- }
144
+ export type CommonIsSecure = ShiftMain<CommonIs> & InitLike;
@@ -1,16 +1,18 @@
1
- import { CommonCallback } from "../callback";
1
+ import { CommonHook } from "../hook";
2
2
  import { CommonIs } from "../is";
3
3
  import { CommonAssertion } from "../assertion";
4
4
  import { CommonError } from "../error";
5
5
  import { CommonLog } from "../log";
6
6
  import { CommonStorage } from "../storage";
7
7
  import { CommonTo } from "../to";
8
+ import { CommonFqn } from "../fqn";
8
9
  export interface Leyyo {
9
10
  readonly is: CommonIs;
10
- readonly callback: CommonCallback;
11
+ readonly hook: CommonHook;
11
12
  readonly assertion: CommonAssertion;
12
13
  readonly error: CommonError;
13
14
  readonly log: CommonLog;
14
15
  readonly storage: CommonStorage;
15
16
  readonly to: CommonTo;
17
+ readonly fqn: CommonFqn;
16
18
  }
@@ -1,4 +1,4 @@
1
- import { CommonCallback } from "../callback";
1
+ import { CommonHook } from "../hook";
2
2
  import { Leyyo } from "./index-types";
3
3
  import { CommonIs } from "../is";
4
4
  import { CommonAssertion } from "../assertion";
@@ -6,14 +6,16 @@ import { CommonError } from "../error";
6
6
  import { CommonLog } from "../log";
7
7
  import { CommonStorage } from "../storage";
8
8
  import { CommonTo } from "../to";
9
+ import { CommonFqn } from "../fqn";
9
10
  export declare class LeyyoImpl implements Leyyo {
10
- readonly callback: CommonCallback;
11
+ readonly hook: CommonHook;
11
12
  readonly is: CommonIs;
12
13
  readonly assertion: CommonAssertion;
13
14
  readonly error: CommonError;
14
15
  readonly log: CommonLog;
15
16
  readonly storage: CommonStorage;
16
17
  readonly to: CommonTo;
18
+ readonly fqn: CommonFqn;
17
19
  constructor();
18
20
  private init;
19
21
  private postInit;
@@ -1,25 +1,32 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.leyyo = exports.LeyyoImpl = void 0;
4
- const callback_1 = require("../callback");
7
+ const hook_1 = require("../hook");
5
8
  const is_1 = require("../is");
6
9
  const assertion_1 = require("../assertion");
7
10
  const error_1 = require("../error");
8
11
  const log_1 = require("../log");
9
12
  const storage_1 = require("../storage");
10
13
  const to_1 = require("../to");
11
- const constants_1 = require("../constants");
14
+ const shared_1 = require("../shared");
12
15
  const internal_1 = require("../internal");
13
- const literals_1 = require("../literals");
16
+ const literal_1 = require("../literal");
17
+ const exception_1 = require("../exception");
18
+ const node_assert_1 = __importDefault(require("node:assert"));
19
+ const fqn_1 = require("../fqn");
14
20
  class LeyyoImpl {
15
21
  constructor() {
16
22
  this.is = new is_1.CommonIsImpl();
17
23
  this.storage = new storage_1.CommonStorageImpl();
18
- this.callback = new callback_1.CommonCallbackImpl(); // storage
19
- this.log = new log_1.CommonLogImpl(); // callback
20
- this.error = new error_1.CommonErrorImpl(); // callback
21
- this.assertion = new assertion_1.CommonAssertionImpl(); // is, callback
22
- this.to = new to_1.CommonToImpl(); // is, callback, assertion
24
+ this.hook = new hook_1.CommonHookImpl(); // storage
25
+ this.log = new log_1.CommonLogImpl(); // hook
26
+ this.error = new error_1.CommonErrorImpl(); // hook
27
+ this.assertion = new assertion_1.CommonAssertionImpl(); // is, hook
28
+ this.to = new to_1.CommonToImpl(); // is, hook, assertion
29
+ this.fqn = new fqn_1.CommonFqnImpl(); // hook
23
30
  this.init();
24
31
  this.postInit();
25
32
  this.initFqnRegister();
@@ -29,41 +36,42 @@ class LeyyoImpl {
29
36
  init() {
30
37
  this.is.$secure.$init(this);
31
38
  this.storage.$secure.$init(this);
32
- this.callback.$secure.$init(this);
39
+ this.hook.$secure.$init(this);
33
40
  this.log.$secure.$init(this);
34
41
  this.error.$secure.$init(this);
35
42
  this.assertion.$secure.$init(this);
36
43
  this.to.$secure.$init(this);
37
44
  }
38
45
  postInit() {
39
- (0, assertion_1.$$setLeyyo)(this);
46
+ (0, shared_1.$$setLeyyo)(this);
40
47
  log_1.LoggerImpl.$setLeyyo(this);
41
- error_1.Exception.$setLeyyo(this);
48
+ exception_1.Exception.$setLeyyo(this);
42
49
  }
43
50
  initFqnRegister() {
44
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, is_1.CommonIsImpl, 'class', internal_1.FQN_PCK);
45
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, storage_1.CommonStorageImpl, 'class', internal_1.FQN_PCK);
46
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, callback_1.CommonCallbackImpl, 'class', internal_1.FQN_PCK);
47
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, log_1.CommonLogImpl, 'class', internal_1.FQN_PCK);
48
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, error_1.CommonErrorImpl, 'class', internal_1.FQN_PCK);
49
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, assertion_1.CommonAssertionImpl, 'class', internal_1.FQN_PCK);
50
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, to_1.CommonToImpl, 'class', internal_1.FQN_PCK);
51
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, storage_1.List, 'class', internal_1.FQN_PCK);
52
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, log_1.LoggerImpl, 'class', internal_1.FQN_PCK);
53
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, assertion_1.assert, 'function', internal_1.FQN_PCK);
51
+ this.fqn.register(is_1.CommonIsImpl, 'class', internal_1.FQN_PCK);
52
+ this.fqn.register(storage_1.CommonStorageImpl, 'class', internal_1.FQN_PCK);
53
+ this.fqn.register(hook_1.CommonHookImpl, 'class', internal_1.FQN_PCK);
54
+ this.fqn.register(fqn_1.CommonFqnImpl, 'class', internal_1.FQN_PCK);
55
+ this.fqn.register(log_1.CommonLogImpl, 'class', internal_1.FQN_PCK);
56
+ this.fqn.register(error_1.CommonErrorImpl, 'class', internal_1.FQN_PCK);
57
+ this.fqn.register(assertion_1.CommonAssertionImpl, 'class', internal_1.FQN_PCK);
58
+ this.fqn.register(to_1.CommonToImpl, 'class', internal_1.FQN_PCK);
59
+ this.fqn.register(shared_1.List, 'class', internal_1.FQN_PCK);
60
+ this.fqn.register(log_1.LoggerImpl, 'class', internal_1.FQN_PCK);
61
+ this.fqn.register(node_assert_1.default, 'function', internal_1.FQN_PCK);
54
62
  }
55
63
  initErrorRegister() {
56
- [error_1.Exception, error_1.AssertionException, error_1.CausedException, error_1.DeveloperException, error_1.MultipleException].forEach(cls => {
57
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, cls, 'class', internal_1.FQN_PCK);
58
- this.callback.queueForCallback(constants_1.LY_PENDING_ERROR_REGISTER, cls);
64
+ [exception_1.Exception, exception_1.AssertionException, exception_1.CausedException, exception_1.DeveloperException, exception_1.MultipleException].forEach(cls => {
65
+ this.fqn.register(cls, 'class', internal_1.FQN_PCK);
66
+ this.error.register(cls);
59
67
  });
60
68
  }
61
69
  initEnumRegister() {
62
- [literals_1.PrimitiveItems, literals_1.StorageTypeItems, literals_1.RealValueItems, literals_1.KeyValueItems, literals_1.WeakTrueItems, literals_1.WeakFalseItems,
63
- literals_1.HttpMethodItems, literals_1.HttpPlaceItems, literals_1.SeverityItems, literals_1.EnvironmentItems,
64
- literals_1.CountryCodeItems, literals_1.LanguageCodeItems, literals_1.LocaleCodeItems].forEach(enm => {
65
- this.callback.queueForCallback(constants_1.LY_PENDING_FQN_REGISTER, enm, 'enum', internal_1.FQN_PCK);
66
- this.callback.queueForCallback(constants_1.LY_PENDING_ENUM_REGISTER, enm);
70
+ [literal_1.PrimitiveItems, literal_1.StorageTypeItems, literal_1.RealValueItems, literal_1.KeyValueItems, literal_1.WeakTrueItems, literal_1.WeakFalseItems,
71
+ literal_1.HttpMethodItems, literal_1.HttpPlaceItems, literal_1.SeverityItems, literal_1.EnvironmentItems,
72
+ literal_1.CountryCodeItems, literal_1.LanguageCodeItems, literal_1.LocaleCodeItems].forEach(enm => {
73
+ this.fqn.register(enm, 'enum', internal_1.FQN_PCK);
74
+ this.hook.queueForCallback(shared_1.LY_PENDING_ENUM_REGISTER, enm);
67
75
  });
68
76
  }
69
77
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Country code items
3
+ * */
4
+ export declare const CountryCodeItems: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CS", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"];
5
+ /**
6
+ * Country code
7
+ * */
8
+ export type CountryCode = typeof CountryCodeItems[number];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryCodeItems = void 0;
4
+ /**
5
+ * Country code items
6
+ * */
7
+ exports.CountryCodeItems = ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX',
8
+ 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BM', 'BN', 'BO', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD',
9
+ 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CS', 'CU', 'CV', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC',
10
+ 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN',
11
+ 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS',
12
+ 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',
13
+ 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX',
14
+ 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM',
15
+ 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM',
16
+ 'SN', 'SO', 'SR', 'ST', 'SV', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ',
17
+ 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Environment items
3
+ * */
4
+ export declare const EnvironmentItems: readonly ["automation", "development", "local", "production", "staging", "test"];
5
+ /**
6
+ * Environment
7
+ * */
8
+ export type Environment = typeof EnvironmentItems[number];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnvironmentItems = void 0;
4
+ /**
5
+ * Environment items
6
+ * */
7
+ exports.EnvironmentItems = ['automation', 'development', 'local', 'production', 'staging', 'test'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Http Method items
3
+ * */
4
+ export declare const HttpMethodItems: readonly ["delete", "get", "head", "link", "options", "patch", "post", "purge", "put", "unlink"];
5
+ /**
6
+ * Http Method
7
+ * */
8
+ export type HttpMethod = typeof HttpMethodItems[number];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpMethodItems = void 0;
4
+ /**
5
+ * Http Method items
6
+ * */
7
+ exports.HttpMethodItems = ['delete', 'get', 'head', 'link', 'options', 'patch', 'post', 'purge', 'put', 'unlink'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Http Place items
3
+ * */
4
+ export declare const HttpPlaceItems: readonly ["query", "body", "header", "path"];
5
+ /**
6
+ * Http Place
7
+ * */
8
+ export type HttpPlace = typeof HttpPlaceItems[number];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpPlaceItems = void 0;
4
+ /**
5
+ * Http Place items
6
+ * */
7
+ exports.HttpPlaceItems = ['query', 'body', 'header', 'path'];
@@ -0,0 +1,6 @@
1
+ import { WeakTrue } from "./weak-true";
2
+ import { WeakFalse } from "./weak-false";
3
+ /**
4
+ * Weak Boolean
5
+ * */
6
+ export type WeakBoolean = WeakTrue & WeakFalse;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export * from './country-code';
2
+ export * from './environment';
3
+ export * from './http-method';
4
+ export * from './http-place';
5
+ export * from './key-value';
6
+ export * from './language-code';
7
+ export * from './locale-code';
8
+ export * from './primitive';
9
+ export * from './real-value';
10
+ export * from './severity';
11
+ export * from './storage-type';
12
+ export * from './weak-false';
13
+ export * from './weak-true';
14
+ export * from './index-types';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./country-code"), exports);
18
+ __exportStar(require("./environment"), exports);
19
+ __exportStar(require("./http-method"), exports);
20
+ __exportStar(require("./http-place"), exports);
21
+ __exportStar(require("./key-value"), exports);
22
+ __exportStar(require("./language-code"), exports);
23
+ __exportStar(require("./locale-code"), exports);
24
+ __exportStar(require("./primitive"), exports);
25
+ __exportStar(require("./real-value"), exports);
26
+ __exportStar(require("./severity"), exports);
27
+ __exportStar(require("./storage-type"), exports);
28
+ __exportStar(require("./weak-false"), exports);
29
+ __exportStar(require("./weak-true"), exports);
30
+ __exportStar(require("./index-types"), exports);
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Key Value items
3
+ * */
4
+ export declare const KeyValueItems: readonly ["string", "number"];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeyValueItems = void 0;
4
+ /**
5
+ * Key Value items
6
+ * */
7
+ exports.KeyValueItems = ['string', 'number'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Language code items
3
+ * */
4
+ export declare const LanguageCodeItems: readonly ["af", "an", "ar", "as", "ast", "az", "be", "bg", "bn", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cv", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fur", "fy", "ga", "gd", "gl", "gu", "he", "hi", "hr", "hsb", "ht", "hu", "hy", "id", "is", "it", "iu", "ja", "ji", "ka", "kk", "km", "kn", "ko", "ks", "ky", "la", "lb", "lt", "lv", "mi", "mk", "ml", "mo", "mr", "ms", "mt", "my", "nb", "ne", "ng", "nl", "nn", "no", "nv", "oc", "om", "or", "pa", "pl", "pt", "qu", "rm", "ro", "ru", "sa", "sb", "sc", "sd", "sg", "si", "sk", "sl", "so", "sq", "sr", "sv", "sw", "sx", "sz", "ta", "te", "th", "tig", "tk", "tlh", "tn", "tr", "ts", "tt", "uk", "ur", "ve", "vi", "vo", "wa", "xh", "zh", "zu"];
5
+ /**
6
+ * Language codes
7
+ * */
8
+ export type LanguageCode = typeof LanguageCodeItems[number];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LanguageCodeItems = void 0;
4
+ /**
5
+ * Language code items
6
+ * */
7
+ exports.LanguageCodeItems = ['af', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg', 'bn', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs',
8
+ 'cv', 'cy', 'da', 'de', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fj', 'fo', 'fr', 'fur', 'fy', 'ga', 'gd', 'gl', 'gu', 'he', 'hi',
9
+ 'hr', 'hsb', 'ht', 'hu', 'hy', 'id', 'is', 'it', 'iu', 'ja', 'ji', 'ka', 'kk', 'km', 'kn', 'ko', 'ks', 'ky', 'la', 'lb', 'lt', 'lv', 'mi',
10
+ 'mk', 'ml', 'mo', 'mr', 'ms', 'mt', 'my', 'nb', 'ne', 'ng', 'nl', 'nn', 'no', 'nv', 'oc', 'om', 'or', 'pa', 'pl', 'pt', 'qu', 'rm', 'ro',
11
+ 'ru', 'sa', 'sb', 'sc', 'sd', 'sg', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'sv', 'sw', 'sx', 'sz', 'ta', 'te', 'th', 'tig', 'tk', 'tlh',
12
+ 'tn', 'tr', 'ts', 'tt', 'uk', 'ur', 've', 'vi', 'vo', 'wa', 'xh', 'zh', 'zu'];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Locale code items
3
+ * */
4
+ export declare const LocaleCodeItems: readonly ["af", "an", "ar", "ar-ae", "ar-bh", "ar-dz", "ar-eg", "ar-iq", "ar-jo", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-om", "ar-qa", "ar-sa", "ar-sy", "ar-tn", "ar-ye", "as", "ast", "az", "be", "bg", "bn", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cv", "cy", "da", "de", "de-at", "de-ch", "de-de", "de-li", "de-lu", "el", "en", "en-au", "en-bz", "en-ca", "en-gb", "en-ie", "en-jm", "en-nz", "en-ph", "en-tt", "en-us", "en-za", "en-zw", "eo", "es", "es-ar", "es-bo", "es-cl", "es-co", "es-cr", "es-do", "es-ec", "es-es", "es-gt", "es-hn", "es-mx", "es-ni", "es-pa", "es-pe", "es-pr", "es-py", "es-sv", "es-uy", "es-ve", "et", "eu", "fa", "fa-ir", "fi", "fj", "fo", "fr", "fr-be", "fr-ca", "fr-ch", "fr-fr", "fr-lu", "fr-mc", "fur", "fy", "ga", "gd", "gd-ie", "gl", "gu", "he", "hi", "hr", "hsb", "ht", "hu", "hy", "id", "is", "it", "it-ch", "iu", "ja", "ji", "ka", "kk", "km", "kn", "ko", "ko-kp", "ko-kr", "ks", "ky", "la", "lb", "lt", "lv", "mi", "mk", "ml", "mo", "mr", "ms", "mt", "my", "nb", "ne", "ng", "nl", "nl-be", "nn", "no", "nv", "oc", "om", "or", "pa", "pa-in", "pa-pk", "pl", "pt", "pt-br", "qu", "rm", "ro", "ro-mo", "ru", "ru-mo", "sa", "sb", "sc", "sd", "sg", "si", "sk", "sl", "so", "sq", "sr", "sv", "sv-fi", "sv-sv", "sw", "sx", "sz", "ta", "te", "th", "tig", "tk", "tlh", "tn", "tr", "ts", "tt", "uk", "ur", "ve", "vi", "vo", "wa", "xh", "zh", "zh-cn", "zh-hk", "zh-sg", "zh-tw", "zu"];
5
+ /**
6
+ * Locale codes
7
+ *
8
+ * Pattern: [Language Code]-[Country Code]
9
+ * */
10
+ export type LocaleCode = typeof LocaleCodeItems[number];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocaleCodeItems = void 0;
4
+ /**
5
+ * Locale code items
6
+ * */
7
+ exports.LocaleCodeItems = ['af', 'an', 'ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg', 'ar-iq', 'ar-jo', 'ar-kw', 'ar-lb', 'ar-ly',
8
+ 'ar-ma', 'ar-om', 'ar-qa', 'ar-sa', 'ar-sy', 'ar-tn', 'ar-ye', 'as', 'ast', 'az', 'be', 'bg', 'bn', 'br', 'bs', 'ca', 'ce', 'ch',
9
+ 'co', 'cr', 'cs', 'cv', 'cy', 'da', 'de', 'de-at', 'de-ch', 'de-de', 'de-li', 'de-lu', 'el', 'en', 'en-au', 'en-bz', 'en-ca',
10
+ 'en-gb', 'en-ie', 'en-jm', 'en-nz', 'en-ph', 'en-tt', 'en-us', 'en-za', 'en-zw', 'eo', 'es', 'es-ar', 'es-bo', 'es-cl', 'es-co',
11
+ 'es-cr', 'es-do', 'es-ec', 'es-es', 'es-gt', 'es-hn', 'es-mx', 'es-ni', 'es-pa', 'es-pe', 'es-pr', 'es-py', 'es-sv', 'es-uy',
12
+ 'es-ve', 'et', 'eu', 'fa', 'fa-ir', 'fi', 'fj', 'fo', 'fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu', 'fr-mc', 'fur', 'fy', 'ga',
13
+ 'gd', 'gd-ie', 'gl', 'gu', 'he', 'hi', 'hr', 'hsb', 'ht', 'hu', 'hy', 'id', 'is', 'it', 'it-ch', 'iu', 'ja', 'ji', 'ka', 'kk', 'km',
14
+ 'kn', 'ko', 'ko-kp', 'ko-kr', 'ks', 'ky', 'la', 'lb', 'lt', 'lv', 'mi', 'mk', 'ml', 'mo', 'mr', 'ms', 'mt', 'my', 'nb', 'ne', 'ng', 'nl',
15
+ 'nl-be', 'nn', 'no', 'nv', 'oc', 'om', 'or', 'pa', 'pa-in', 'pa-pk', 'pl', 'pt', 'pt-br', 'qu', 'rm', 'ro', 'ro-mo', 'ru', 'ru-mo',
16
+ 'sa', 'sb', 'sc', 'sd', 'sg', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'sv', 'sv-fi', 'sv-sv', 'sw', 'sx', 'sz', 'ta', 'te', 'th', 'tig',
17
+ 'tk', 'tlh', 'tn', 'tr', 'ts', 'tt', 'uk', 'ur', 've', 'vi', 'vo', 'wa', 'xh', 'zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw', 'zu'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Primitive items
3
+ * */
4
+ export declare const PrimitiveItems: readonly ["string", "number", "boolean"];
5
+ /**
6
+ * Primitive
7
+ * */
8
+ export type Primitive = typeof PrimitiveItems[number];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrimitiveItems = void 0;
4
+ /**
5
+ * Primitive items
6
+ * */
7
+ exports.PrimitiveItems = ['string', 'number', 'boolean'];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Real Value items
3
+ * */
4
+ export declare const RealValueItems: readonly ["string", "number", "bigint", "boolean", "object", "function"];
5
+ /**
6
+ * Real Value
7
+ * */
8
+ export type RealValue = typeof RealValueItems[number];