@imbricate/core 3.12.0 → 3.14.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.
Files changed (114) hide show
  1. package/author/export.d.ts +6 -0
  2. package/author/export.js +22 -0
  3. package/database/export.d.ts +16 -0
  4. package/database/export.js +32 -0
  5. package/database-manager/base-class/full-feature.d.ts +17 -0
  6. package/database-manager/base-class/full-feature.js +19 -0
  7. package/database-manager/base-class/readonly.d.ts +16 -0
  8. package/database-manager/base-class/readonly.js +26 -0
  9. package/database-manager/database-manager.d.ts +52 -0
  10. package/{static/manager.js → database-manager/database-manager.js} +2 -2
  11. package/database-manager/export.d.ts +10 -0
  12. package/database-manager/export.js +26 -0
  13. package/database-manager/feature.d.ts +11 -0
  14. package/database-manager/feature.js +18 -0
  15. package/database-manager/outcome.d.ts +26 -0
  16. package/database-manager/outcome.js +16 -0
  17. package/document/export.d.ts +22 -0
  18. package/document/export.js +38 -0
  19. package/error/database-manager/database-manager-error.d.ts +9 -0
  20. package/error/database-manager/database-manager-error.js +16 -0
  21. package/error/database-manager/feature-not-supported.d.ts +12 -0
  22. package/error/database-manager/feature-not-supported.js +19 -0
  23. package/error/export.d.ts +22 -0
  24. package/error/export.js +38 -0
  25. package/error/origin/feature-not-supported.d.ts +12 -0
  26. package/error/origin/feature-not-supported.js +20 -0
  27. package/error/origin/origin-error.d.ts +9 -0
  28. package/error/origin/origin-error.js +16 -0
  29. package/error/static/feature-not-supported.d.ts +12 -0
  30. package/error/static/feature-not-supported.js +19 -0
  31. package/error/static/static-error.d.ts +9 -0
  32. package/error/static/static-error.js +16 -0
  33. package/error/static-manager/feature-not-supported.d.ts +12 -0
  34. package/error/static-manager/feature-not-supported.js +19 -0
  35. package/error/static-manager/static-manager-error.d.ts +9 -0
  36. package/error/static-manager/static-manager-error.js +16 -0
  37. package/error/text/feature-not-supported.d.ts +12 -0
  38. package/error/text/feature-not-supported.js +19 -0
  39. package/error/text/text-error.d.ts +9 -0
  40. package/error/text/text-error.js +16 -0
  41. package/error/text-manager/feature-not-supported.d.ts +12 -0
  42. package/error/text-manager/feature-not-supported.js +19 -0
  43. package/error/text-manager/text-manager-error.d.ts +9 -0
  44. package/error/text-manager/text-manager-error.js +16 -0
  45. package/index.d.ts +11 -42
  46. package/index.js +11 -42
  47. package/loader/export.d.ts +8 -0
  48. package/loader/export.js +24 -0
  49. package/origin/base-class/essential.d.ts +15 -0
  50. package/origin/base-class/essential.js +27 -0
  51. package/origin/base-class/exclude-static.d.ts +13 -0
  52. package/origin/base-class/exclude-static.js +25 -0
  53. package/origin/base-class/full-feature.d.ts +21 -0
  54. package/origin/base-class/full-feature.js +20 -0
  55. package/origin/export.d.ts +12 -0
  56. package/origin/export.js +28 -0
  57. package/origin/feature.d.ts +12 -0
  58. package/origin/feature.js +19 -0
  59. package/origin/interface.d.ts +12 -5
  60. package/origin/outcome.d.ts +11 -0
  61. package/origin/outcome.js +10 -0
  62. package/origin/search.d.ts +0 -3
  63. package/package.json +1 -1
  64. package/static/base-class/author-only.d.ts +13 -0
  65. package/static/base-class/author-only.js +23 -0
  66. package/static/base-class/content-only.d.ts +12 -0
  67. package/static/base-class/content-only.js +23 -0
  68. package/static/base-class/full-feature.d.ts +15 -0
  69. package/static/base-class/full-feature.js +18 -0
  70. package/static/export.d.ts +12 -0
  71. package/static/export.js +28 -0
  72. package/static/feature.d.ts +10 -0
  73. package/static/feature.js +17 -0
  74. package/static/interface.d.ts +9 -2
  75. package/static/outcome.d.ts +10 -0
  76. package/static/outcome.js +10 -0
  77. package/static-manager/base-class/full-feature.d.ts +14 -0
  78. package/static-manager/base-class/full-feature.js +18 -0
  79. package/static-manager/base-class/readonly.d.ts +14 -0
  80. package/static-manager/base-class/readonly.js +23 -0
  81. package/static-manager/export.d.ts +10 -0
  82. package/static-manager/export.js +26 -0
  83. package/static-manager/feature.d.ts +10 -0
  84. package/static-manager/feature.js +17 -0
  85. package/static-manager/outcome.d.ts +16 -0
  86. package/static-manager/outcome.js +12 -0
  87. package/{static/manager.d.ts → static-manager/static-manager.d.ts} +8 -6
  88. package/{database/manager.js → static-manager/static-manager.js} +2 -2
  89. package/text/base-class/author-only.d.ts +13 -0
  90. package/text/base-class/author-only.js +23 -0
  91. package/text/base-class/content-only.d.ts +12 -0
  92. package/text/base-class/content-only.js +23 -0
  93. package/text/base-class/full-feature.d.ts +15 -0
  94. package/text/base-class/full-feature.js +18 -0
  95. package/text/export.d.ts +12 -0
  96. package/text/export.js +28 -0
  97. package/text/feature.d.ts +10 -0
  98. package/text/feature.js +17 -0
  99. package/text/interface.d.ts +9 -2
  100. package/text/outcome.d.ts +10 -0
  101. package/text/outcome.js +10 -0
  102. package/text-manager/base-class/full-feature.d.ts +14 -0
  103. package/text-manager/base-class/full-feature.js +18 -0
  104. package/text-manager/base-class/readonly.d.ts +14 -0
  105. package/text-manager/base-class/readonly.js +23 -0
  106. package/text-manager/export.d.ts +10 -0
  107. package/text-manager/export.js +26 -0
  108. package/text-manager/feature.d.ts +10 -0
  109. package/text-manager/feature.js +17 -0
  110. package/text-manager/outcome.d.ts +16 -0
  111. package/text-manager/outcome.js +12 -0
  112. package/{text/manager.d.ts → text-manager/text-manager.d.ts} +8 -6
  113. package/{text/manager.js → text-manager/text-manager.js} +2 -2
  114. package/database/manager.d.ts +0 -41
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Static Error
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticError = void 0;
9
+ const imbricate_error_1 = require("../imbricate-error");
10
+ class ImbricateStaticError extends imbricate_error_1.ImbricateError {
11
+ constructor(message, type, reason) {
12
+ super(message, type, reason);
13
+ Object.setPrototypeOf(this, ImbricateStaticError.prototype);
14
+ }
15
+ }
16
+ exports.ImbricateStaticError = ImbricateStaticError;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Feature Not Supported
5
+ */
6
+ import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../../static-manager/feature";
7
+ import { ImbricateStaticManagerError } from "./static-manager-error";
8
+ export declare class ImbricateStaticManagerFeatureNotSupportedError extends ImbricateStaticManagerError {
9
+ static withFeature(feature: IMBRICATE_STATIC_MANAGER_FEATURE): ImbricateStaticManagerFeatureNotSupportedError;
10
+ static readonly TYPE: string;
11
+ protected constructor(message: string, reason?: any);
12
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Feature Not Supported
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticManagerFeatureNotSupportedError = void 0;
9
+ const static_manager_error_1 = require("./static-manager-error");
10
+ class ImbricateStaticManagerFeatureNotSupportedError extends static_manager_error_1.ImbricateStaticManagerError {
11
+ static withFeature(feature) {
12
+ return new ImbricateStaticManagerFeatureNotSupportedError(`Feature ${feature} is not supported`, feature);
13
+ }
14
+ constructor(message, reason) {
15
+ super(message, ImbricateStaticManagerFeatureNotSupportedError.TYPE, reason);
16
+ }
17
+ }
18
+ exports.ImbricateStaticManagerFeatureNotSupportedError = ImbricateStaticManagerFeatureNotSupportedError;
19
+ ImbricateStaticManagerFeatureNotSupportedError.TYPE = "IMBRICATE_STATIC_MANAGER_FEATURE_NOT_SUPPORTED";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Static Manager Error
5
+ */
6
+ import { ImbricateError } from "../imbricate-error";
7
+ export declare class ImbricateStaticManagerError extends ImbricateError {
8
+ protected constructor(message: string, type: string, reason?: any);
9
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Static Manager Error
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateStaticManagerError = void 0;
9
+ const imbricate_error_1 = require("../imbricate-error");
10
+ class ImbricateStaticManagerError extends imbricate_error_1.ImbricateError {
11
+ constructor(message, type, reason) {
12
+ super(message, type, reason);
13
+ Object.setPrototypeOf(this, ImbricateStaticManagerError.prototype);
14
+ }
15
+ }
16
+ exports.ImbricateStaticManagerError = ImbricateStaticManagerError;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Text Feature Not Supported
5
+ */
6
+ import { IMBRICATE_TEXT_FEATURE } from "../../text/feature";
7
+ import { ImbricateTextError } from "./text-error";
8
+ export declare class ImbricateTextFeatureNotSupportedError extends ImbricateTextError {
9
+ static withFeature(feature: IMBRICATE_TEXT_FEATURE): ImbricateTextFeatureNotSupportedError;
10
+ static readonly TYPE: string;
11
+ protected constructor(message: string, reason?: any);
12
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Text Feature Not Supported
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateTextFeatureNotSupportedError = void 0;
9
+ const text_error_1 = require("./text-error");
10
+ class ImbricateTextFeatureNotSupportedError extends text_error_1.ImbricateTextError {
11
+ static withFeature(feature) {
12
+ return new ImbricateTextFeatureNotSupportedError(`Feature ${feature} is not supported`, feature);
13
+ }
14
+ constructor(message, reason) {
15
+ super(message, ImbricateTextFeatureNotSupportedError.TYPE, reason);
16
+ }
17
+ }
18
+ exports.ImbricateTextFeatureNotSupportedError = ImbricateTextFeatureNotSupportedError;
19
+ ImbricateTextFeatureNotSupportedError.TYPE = "IMBRICATE_TEXT_FEATURE_NOT_SUPPORTED";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Text Error
5
+ */
6
+ import { ImbricateError } from "../imbricate-error";
7
+ export declare class ImbricateTextError extends ImbricateError {
8
+ protected constructor(message: string, type: string, reason?: any);
9
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Text Error
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateTextError = void 0;
9
+ const imbricate_error_1 = require("../imbricate-error");
10
+ class ImbricateTextError extends imbricate_error_1.ImbricateError {
11
+ constructor(message, type, reason) {
12
+ super(message, type, reason);
13
+ Object.setPrototypeOf(this, ImbricateTextError.prototype);
14
+ }
15
+ }
16
+ exports.ImbricateTextError = ImbricateTextError;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Feature Not Supported
5
+ */
6
+ import { IMBRICATE_TEXT_MANAGER_FEATURE } from "../../text-manager/feature";
7
+ import { ImbricateTextManagerError } from "./text-manager-error";
8
+ export declare class ImbricateTextManagerFeatureNotSupportedError extends ImbricateTextManagerError {
9
+ static withFeature(feature: IMBRICATE_TEXT_MANAGER_FEATURE): ImbricateTextManagerFeatureNotSupportedError;
10
+ static readonly TYPE: string;
11
+ protected constructor(message: string, reason?: any);
12
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Feature Not Supported
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateTextManagerFeatureNotSupportedError = void 0;
9
+ const text_manager_error_1 = require("./text-manager-error");
10
+ class ImbricateTextManagerFeatureNotSupportedError extends text_manager_error_1.ImbricateTextManagerError {
11
+ static withFeature(feature) {
12
+ return new ImbricateTextManagerFeatureNotSupportedError(`Feature ${feature} is not supported`, feature);
13
+ }
14
+ constructor(message, reason) {
15
+ super(message, ImbricateTextManagerFeatureNotSupportedError.TYPE, reason);
16
+ }
17
+ }
18
+ exports.ImbricateTextManagerFeatureNotSupportedError = ImbricateTextManagerFeatureNotSupportedError;
19
+ ImbricateTextManagerFeatureNotSupportedError.TYPE = "IMBRICATE_TEXT_MANAGER_FEATURE_NOT_SUPPORTED";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Error
4
+ * @description Text Manager Error
5
+ */
6
+ import { ImbricateError } from "../imbricate-error";
7
+ export declare class ImbricateTextManagerError extends ImbricateError {
8
+ protected constructor(message: string, type: string, reason?: any);
9
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Error
5
+ * @description Text Manager Error
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateTextManagerError = void 0;
9
+ const imbricate_error_1 = require("../imbricate-error");
10
+ class ImbricateTextManagerError extends imbricate_error_1.ImbricateError {
11
+ constructor(message, type, reason) {
12
+ super(message, type, reason);
13
+ Object.setPrototypeOf(this, ImbricateTextManagerError.prototype);
14
+ }
15
+ }
16
+ exports.ImbricateTextManagerError = ImbricateTextManagerError;
package/index.d.ts CHANGED
@@ -2,45 +2,14 @@
2
2
  * @author WMXPY
3
3
  * @description Index
4
4
  */
5
- export * from "./author/definition";
6
- export * from "./database/base-class/essential";
7
- export * from "./database/base-class/essential-readonly";
8
- export * from "./database/base-class/exclude-annotation";
9
- export * from "./database/base-class/full-feature";
10
- export * from "./database/base-class/full-feature-readonly";
11
- export * from "./database/definition";
12
- export * from "./database/feature";
13
- export * from "./database/interface";
14
- export * from "./database/manager";
15
- export * from "./database/outcome";
16
- export * from "./database/schema";
17
- export * from "./database/validate";
18
- export * from "./document/base-class/essential";
19
- export * from "./document/base-class/essential-readonly";
20
- export * from "./document/base-class/exclude-annotation";
21
- export * from "./document/base-class/exclude-edit-records";
22
- export * from "./document/base-class/full-feature";
23
- export * from "./document/base-class/full-feature-readonly";
24
- export * from "./document/definition";
25
- export * from "./document/feature";
26
- export * from "./document/interface";
27
- export * from "./document/outcome";
28
- export * from "./document/property";
29
- export * from "./document/property/default-value";
30
- export * from "./document/property/definition";
31
- export * from "./document/property/primary";
32
- export * from "./document/property/triage";
33
- export * from "./document/property/triage-manager";
34
- export * from "./document/validate";
35
- export * from "./loader/definition";
36
- export * from "./loader/origin-loader";
37
- export * from "./loader/persistence";
38
- export * from "./origin/definition";
39
- export * from "./origin/interface";
40
- export * from "./origin/search";
41
- export * from "./static/definition";
42
- export * from "./static/interface";
43
- export * from "./static/manager";
44
- export * from "./text/definition";
45
- export * from "./text/interface";
46
- export * from "./text/manager";
5
+ export * from "./author/export";
6
+ export * from "./database-manager/export";
7
+ export * from "./database/export";
8
+ export * from "./document/export";
9
+ export * from "./error/export";
10
+ export * from "./loader/export";
11
+ export * from "./origin/export";
12
+ export * from "./static-manager/export";
13
+ export * from "./static/export";
14
+ export * from "./text-manager/export";
15
+ export * from "./text/export";
package/index.js CHANGED
@@ -18,45 +18,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- __exportStar(require("./author/definition"), exports);
22
- __exportStar(require("./database/base-class/essential"), exports);
23
- __exportStar(require("./database/base-class/essential-readonly"), exports);
24
- __exportStar(require("./database/base-class/exclude-annotation"), exports);
25
- __exportStar(require("./database/base-class/full-feature"), exports);
26
- __exportStar(require("./database/base-class/full-feature-readonly"), exports);
27
- __exportStar(require("./database/definition"), exports);
28
- __exportStar(require("./database/feature"), exports);
29
- __exportStar(require("./database/interface"), exports);
30
- __exportStar(require("./database/manager"), exports);
31
- __exportStar(require("./database/outcome"), exports);
32
- __exportStar(require("./database/schema"), exports);
33
- __exportStar(require("./database/validate"), exports);
34
- __exportStar(require("./document/base-class/essential"), exports);
35
- __exportStar(require("./document/base-class/essential-readonly"), exports);
36
- __exportStar(require("./document/base-class/exclude-annotation"), exports);
37
- __exportStar(require("./document/base-class/exclude-edit-records"), exports);
38
- __exportStar(require("./document/base-class/full-feature"), exports);
39
- __exportStar(require("./document/base-class/full-feature-readonly"), exports);
40
- __exportStar(require("./document/definition"), exports);
41
- __exportStar(require("./document/feature"), exports);
42
- __exportStar(require("./document/interface"), exports);
43
- __exportStar(require("./document/outcome"), exports);
44
- __exportStar(require("./document/property"), exports);
45
- __exportStar(require("./document/property/default-value"), exports);
46
- __exportStar(require("./document/property/definition"), exports);
47
- __exportStar(require("./document/property/primary"), exports);
48
- __exportStar(require("./document/property/triage"), exports);
49
- __exportStar(require("./document/property/triage-manager"), exports);
50
- __exportStar(require("./document/validate"), exports);
51
- __exportStar(require("./loader/definition"), exports);
52
- __exportStar(require("./loader/origin-loader"), exports);
53
- __exportStar(require("./loader/persistence"), exports);
54
- __exportStar(require("./origin/definition"), exports);
55
- __exportStar(require("./origin/interface"), exports);
56
- __exportStar(require("./origin/search"), exports);
57
- __exportStar(require("./static/definition"), exports);
58
- __exportStar(require("./static/interface"), exports);
59
- __exportStar(require("./static/manager"), exports);
60
- __exportStar(require("./text/definition"), exports);
61
- __exportStar(require("./text/interface"), exports);
62
- __exportStar(require("./text/manager"), exports);
21
+ __exportStar(require("./author/export"), exports);
22
+ __exportStar(require("./database-manager/export"), exports);
23
+ __exportStar(require("./database/export"), exports);
24
+ __exportStar(require("./document/export"), exports);
25
+ __exportStar(require("./error/export"), exports);
26
+ __exportStar(require("./loader/export"), exports);
27
+ __exportStar(require("./origin/export"), exports);
28
+ __exportStar(require("./static-manager/export"), exports);
29
+ __exportStar(require("./static/export"), exports);
30
+ __exportStar(require("./text-manager/export"), exports);
31
+ __exportStar(require("./text/export"), exports);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Loader
4
+ * @description Export
5
+ */
6
+ export * from "./definition";
7
+ export * from "./origin-loader";
8
+ export * from "./persistence";
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Loader
5
+ * @description Export
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ __exportStar(require("./definition"), exports);
23
+ __exportStar(require("./origin-loader"), exports);
24
+ __exportStar(require("./persistence"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Essential
5
+ */
6
+ import { IImbricateStaticManager } from "../../static-manager/static-manager";
7
+ import { IMBRICATE_ORIGIN_FEATURE } from "../feature";
8
+ import { IImbricateOrigin } from "../interface";
9
+ import { ImbricateOriginSearchOutcome } from "../outcome";
10
+ import { ImbricateOriginFullFeatureBase } from "./full-feature";
11
+ export declare abstract class ImbricateOriginEssentialBase extends ImbricateOriginFullFeatureBase implements IImbricateOrigin {
12
+ readonly supportedFeatures: IMBRICATE_ORIGIN_FEATURE[];
13
+ getStaticManager(): IImbricateStaticManager;
14
+ search(_keyword: string): PromiseLike<ImbricateOriginSearchOutcome>;
15
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Essential
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateOriginEssentialBase = void 0;
9
+ const feature_not_supported_1 = require("../../error/origin/feature-not-supported");
10
+ const feature_1 = require("../feature");
11
+ const full_feature_1 = require("./full-feature");
12
+ class ImbricateOriginEssentialBase extends full_feature_1.ImbricateOriginFullFeatureBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.supportedFeatures = [
16
+ feature_1.IMBRICATE_ORIGIN_FEATURE.DATABASE_MANAGER,
17
+ feature_1.IMBRICATE_ORIGIN_FEATURE.TEXT_MANAGER,
18
+ ];
19
+ }
20
+ getStaticManager() {
21
+ throw feature_not_supported_1.ImbricateOriginFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_ORIGIN_FEATURE.STATIC_MANAGER);
22
+ }
23
+ search(_keyword) {
24
+ throw feature_not_supported_1.ImbricateOriginFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_ORIGIN_FEATURE.ORIGIN_SEARCH);
25
+ }
26
+ }
27
+ exports.ImbricateOriginEssentialBase = ImbricateOriginEssentialBase;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Exclude Static
5
+ */
6
+ import { IImbricateStaticManager } from "../../static-manager/static-manager";
7
+ import { IMBRICATE_ORIGIN_FEATURE } from "../feature";
8
+ import { IImbricateOrigin } from "../interface";
9
+ import { ImbricateOriginFullFeatureBase } from "./full-feature";
10
+ export declare abstract class ImbricateOriginExcludeStaticBase extends ImbricateOriginFullFeatureBase implements IImbricateOrigin {
11
+ readonly supportedFeatures: IMBRICATE_ORIGIN_FEATURE[];
12
+ getStaticManager(): IImbricateStaticManager;
13
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Exclude Static
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateOriginExcludeStaticBase = void 0;
9
+ const feature_not_supported_1 = require("../../error/origin/feature-not-supported");
10
+ const feature_1 = require("../feature");
11
+ const full_feature_1 = require("./full-feature");
12
+ class ImbricateOriginExcludeStaticBase extends full_feature_1.ImbricateOriginFullFeatureBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.supportedFeatures = [
16
+ feature_1.IMBRICATE_ORIGIN_FEATURE.DATABASE_MANAGER,
17
+ feature_1.IMBRICATE_ORIGIN_FEATURE.TEXT_MANAGER,
18
+ feature_1.IMBRICATE_ORIGIN_FEATURE.ORIGIN_SEARCH,
19
+ ];
20
+ }
21
+ getStaticManager() {
22
+ throw feature_not_supported_1.ImbricateOriginFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_ORIGIN_FEATURE.STATIC_MANAGER);
23
+ }
24
+ }
25
+ exports.ImbricateOriginExcludeStaticBase = ImbricateOriginExcludeStaticBase;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Full Feature
5
+ */
6
+ import { IImbricateDatabaseManager } from "../../database-manager/database-manager";
7
+ import { IImbricateStaticManager } from "../../static-manager/static-manager";
8
+ import { IImbricateTextManager } from "../../text-manager/text-manager";
9
+ import { OriginPayload } from "../definition";
10
+ import { IMBRICATE_ORIGIN_FEATURE } from "../feature";
11
+ import { IImbricateOrigin } from "../interface";
12
+ import { ImbricateOriginSearchOutcome } from "../outcome";
13
+ export declare abstract class ImbricateOriginFullFeatureBase implements IImbricateOrigin {
14
+ abstract readonly uniqueIdentifier: string;
15
+ abstract readonly payloads: OriginPayload;
16
+ readonly supportedFeatures: IMBRICATE_ORIGIN_FEATURE[];
17
+ abstract getDatabaseManager(): IImbricateDatabaseManager;
18
+ abstract getTextManager(): IImbricateTextManager;
19
+ abstract getStaticManager(): IImbricateStaticManager;
20
+ abstract search(keyword: string): PromiseLike<ImbricateOriginSearchOutcome>;
21
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Full Feature
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ImbricateOriginFullFeatureBase = void 0;
9
+ const feature_1 = require("../feature");
10
+ class ImbricateOriginFullFeatureBase {
11
+ constructor() {
12
+ this.supportedFeatures = [
13
+ feature_1.IMBRICATE_ORIGIN_FEATURE.DATABASE_MANAGER,
14
+ feature_1.IMBRICATE_ORIGIN_FEATURE.TEXT_MANAGER,
15
+ feature_1.IMBRICATE_ORIGIN_FEATURE.STATIC_MANAGER,
16
+ feature_1.IMBRICATE_ORIGIN_FEATURE.ORIGIN_SEARCH,
17
+ ];
18
+ }
19
+ }
20
+ exports.ImbricateOriginFullFeatureBase = ImbricateOriginFullFeatureBase;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Export
5
+ */
6
+ export * from "./base-class/essential";
7
+ export * from "./base-class/exclude-static";
8
+ export * from "./base-class/full-feature";
9
+ export * from "./definition";
10
+ export * from "./interface";
11
+ export * from "./outcome";
12
+ export * from "./search";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Export
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ __exportStar(require("./base-class/essential"), exports);
23
+ __exportStar(require("./base-class/exclude-static"), exports);
24
+ __exportStar(require("./base-class/full-feature"), exports);
25
+ __exportStar(require("./definition"), exports);
26
+ __exportStar(require("./interface"), exports);
27
+ __exportStar(require("./outcome"), exports);
28
+ __exportStar(require("./search"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Feature
5
+ */
6
+ export declare enum IMBRICATE_ORIGIN_FEATURE {
7
+ DATABASE_MANAGER = "DATABASE_MANAGER",
8
+ TEXT_MANAGER = "TEXT_MANAGER",
9
+ STATIC_MANAGER = "STATIC_MANAGER",
10
+ ORIGIN_SEARCH = "ORIGIN_SEARCH"
11
+ }
12
+ export declare const checkImbricateOriginFeatureSupported: (features: IMBRICATE_ORIGIN_FEATURE[], feature: IMBRICATE_ORIGIN_FEATURE) => boolean;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Feature
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.checkImbricateOriginFeatureSupported = exports.IMBRICATE_ORIGIN_FEATURE = void 0;
9
+ var IMBRICATE_ORIGIN_FEATURE;
10
+ (function (IMBRICATE_ORIGIN_FEATURE) {
11
+ IMBRICATE_ORIGIN_FEATURE["DATABASE_MANAGER"] = "DATABASE_MANAGER";
12
+ IMBRICATE_ORIGIN_FEATURE["TEXT_MANAGER"] = "TEXT_MANAGER";
13
+ IMBRICATE_ORIGIN_FEATURE["STATIC_MANAGER"] = "STATIC_MANAGER";
14
+ IMBRICATE_ORIGIN_FEATURE["ORIGIN_SEARCH"] = "ORIGIN_SEARCH";
15
+ })(IMBRICATE_ORIGIN_FEATURE || (exports.IMBRICATE_ORIGIN_FEATURE = IMBRICATE_ORIGIN_FEATURE = {}));
16
+ const checkImbricateOriginFeatureSupported = (features, feature) => {
17
+ return features.includes(feature);
18
+ };
19
+ exports.checkImbricateOriginFeatureSupported = checkImbricateOriginFeatureSupported;
@@ -3,11 +3,12 @@
3
3
  * @namespace Origin
4
4
  * @description Interface
5
5
  */
6
- import { IImbricateDatabaseManager } from "../database/manager";
7
- import { IImbricateStaticManager } from "../static/manager";
8
- import { IImbricateTextManager } from "../text/manager";
6
+ import { IImbricateDatabaseManager } from "../database-manager/database-manager";
7
+ import { IImbricateStaticManager } from "../static-manager/static-manager";
8
+ import { IImbricateTextManager } from "../text-manager/text-manager";
9
9
  import { OriginPayload } from "./definition";
10
- import { ImbricateSearchResult } from "./search";
10
+ import { IMBRICATE_ORIGIN_FEATURE } from "./feature";
11
+ import { ImbricateOriginSearchOutcome } from "./outcome";
11
12
  export interface IImbricateOrigin {
12
13
  /**
13
14
  * Unique identifier of the origin
@@ -17,6 +18,10 @@ export interface IImbricateOrigin {
17
18
  * Payloads to initialize the origin
18
19
  */
19
20
  readonly payloads: OriginPayload;
21
+ /**
22
+ * Supported features of the origin
23
+ */
24
+ readonly supportedFeatures: IMBRICATE_ORIGIN_FEATURE[];
20
25
  /**
21
26
  * Get the database manager of the origin
22
27
  *
@@ -51,7 +56,9 @@ export interface IImbricateOrigin {
51
56
  * Search for items in the origin
52
57
  *
53
58
  * @param keyword the keyword to search
59
+ *
54
60
  * @returns the search
61
+ * Symbol: S_Origin_Search_InvalidKeyword - if the keyword is invalid
55
62
  */
56
- search(keyword: string): PromiseLike<ImbricateSearchResult>;
63
+ search(keyword: string): PromiseLike<ImbricateOriginSearchOutcome>;
57
64
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @namespace Origin
4
+ * @description Outcome
5
+ */
6
+ import { ImbricateSearchItem } from "./search";
7
+ export declare const S_Origin_Search_InvalidKeyword: unique symbol;
8
+ export type ImbricateOriginSearchOutcomeSymbol = typeof S_Origin_Search_InvalidKeyword;
9
+ export type ImbricateOriginSearchOutcome = {
10
+ readonly items: ImbricateSearchItem[];
11
+ } | ImbricateOriginSearchOutcomeSymbol;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * @author WMXPY
4
+ * @namespace Origin
5
+ * @description Outcome
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.S_Origin_Search_InvalidKeyword = void 0;
9
+ // Search
10
+ exports.S_Origin_Search_InvalidKeyword = Symbol("Origin_Search_InvalidKeyword");
@@ -44,6 +44,3 @@ export type ImbricateSearchItem = {
44
44
  */
45
45
  readonly secondaryNext?: string[];
46
46
  };
47
- export type ImbricateSearchResult = {
48
- readonly items: ImbricateSearchItem[];
49
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imbricate/core",
3
3
  "main": "index.js",
4
- "version": "3.12.0",
4
+ "version": "3.14.0",
5
5
  "description": "Imbricate Core, Notebook for Engineers",
6
6
  "repository": {
7
7
  "type": "git",