@imbricate/core 3.11.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.
- package/author/export.d.ts +6 -0
- package/author/export.js +22 -0
- package/database/base-class/essential-readonly.d.ts +18 -0
- package/database/base-class/essential-readonly.js +29 -0
- package/database/base-class/essential.d.ts +18 -0
- package/database/base-class/essential.js +36 -0
- package/database/base-class/exclude-annotation.d.ts +16 -0
- package/database/base-class/exclude-annotation.js +32 -0
- package/database/base-class/exclude-edit-records.d.ts +15 -0
- package/database/base-class/exclude-edit-records.js +31 -0
- package/database/base-class/full-feature-readonly.d.ts +21 -0
- package/database/base-class/full-feature-readonly.js +39 -0
- package/database/base-class/full-feature.d.ts +29 -0
- package/database/base-class/full-feature.js +24 -0
- package/database/export.d.ts +16 -0
- package/database/export.js +32 -0
- package/database/feature.d.ts +2 -7
- package/database/feature.js +3 -38
- package/database/interface.d.ts +41 -32
- package/database/outcome.d.ts +58 -0
- package/database/outcome.js +28 -0
- package/database-manager/base-class/full-feature.d.ts +17 -0
- package/database-manager/base-class/full-feature.js +19 -0
- package/database-manager/base-class/readonly.d.ts +16 -0
- package/database-manager/base-class/readonly.js +26 -0
- package/database-manager/database-manager.d.ts +52 -0
- package/{static/manager.js → database-manager/database-manager.js} +2 -2
- package/database-manager/export.d.ts +10 -0
- package/database-manager/export.js +26 -0
- package/database-manager/feature.d.ts +11 -0
- package/database-manager/feature.js +18 -0
- package/database-manager/outcome.d.ts +26 -0
- package/database-manager/outcome.js +16 -0
- package/document/base-class/essential-readonly.d.ts +17 -0
- package/document/base-class/essential-readonly.js +25 -0
- package/document/base-class/essential.d.ts +18 -0
- package/document/base-class/essential.js +33 -0
- package/document/base-class/exclude-annotation.d.ts +16 -0
- package/document/base-class/exclude-annotation.js +29 -0
- package/document/base-class/exclude-edit-records.d.ts +15 -0
- package/document/base-class/exclude-edit-records.js +28 -0
- package/document/base-class/full-feature-readonly.d.ts +19 -0
- package/document/base-class/full-feature-readonly.js +35 -0
- package/document/base-class/full-feature.d.ts +23 -0
- package/document/base-class/full-feature.js +21 -0
- package/document/export.d.ts +22 -0
- package/document/export.js +38 -0
- package/document/feature.d.ts +1 -5
- package/document/feature.js +2 -24
- package/document/interface.d.ts +23 -21
- package/document/outcome.d.ts +32 -0
- package/document/outcome.js +19 -0
- package/error/database/database-error.d.ts +9 -0
- package/error/database/database-error.js +16 -0
- package/error/database/feature-not-supported.d.ts +12 -0
- package/error/database/feature-not-supported.js +19 -0
- package/error/database-manager/database-manager-error.d.ts +9 -0
- package/error/database-manager/database-manager-error.js +16 -0
- package/error/database-manager/feature-not-supported.d.ts +12 -0
- package/error/database-manager/feature-not-supported.js +19 -0
- package/error/document/document-error.d.ts +9 -0
- package/error/document/document-error.js +16 -0
- package/error/document/feature-not-supported.d.ts +12 -0
- package/error/document/feature-not-supported.js +20 -0
- package/error/export.d.ts +22 -0
- package/error/export.js +38 -0
- package/error/imbricate-error.d.ts +14 -0
- package/error/imbricate-error.js +27 -0
- package/error/origin/feature-not-supported.d.ts +12 -0
- package/error/origin/feature-not-supported.js +20 -0
- package/error/origin/origin-error.d.ts +9 -0
- package/error/origin/origin-error.js +16 -0
- package/error/static/feature-not-supported.d.ts +12 -0
- package/error/static/feature-not-supported.js +19 -0
- package/error/static/static-error.d.ts +9 -0
- package/error/static/static-error.js +16 -0
- package/error/static-manager/feature-not-supported.d.ts +12 -0
- package/error/static-manager/feature-not-supported.js +19 -0
- package/error/static-manager/static-manager-error.d.ts +9 -0
- package/error/static-manager/static-manager-error.js +16 -0
- package/error/text/feature-not-supported.d.ts +12 -0
- package/error/text/feature-not-supported.js +19 -0
- package/error/text/text-error.d.ts +9 -0
- package/error/text/text-error.js +16 -0
- package/error/text-manager/feature-not-supported.d.ts +12 -0
- package/error/text-manager/feature-not-supported.js +19 -0
- package/error/text-manager/text-manager-error.d.ts +9 -0
- package/error/text-manager/text-manager-error.js +16 -0
- package/index.d.ts +11 -29
- package/index.js +11 -29
- package/loader/export.d.ts +8 -0
- package/loader/export.js +24 -0
- package/origin/base-class/essential.d.ts +15 -0
- package/origin/base-class/essential.js +27 -0
- package/origin/base-class/exclude-static.d.ts +13 -0
- package/origin/base-class/exclude-static.js +25 -0
- package/origin/base-class/full-feature.d.ts +21 -0
- package/origin/base-class/full-feature.js +20 -0
- package/origin/export.d.ts +12 -0
- package/origin/export.js +28 -0
- package/origin/feature.d.ts +12 -0
- package/origin/feature.js +19 -0
- package/origin/interface.d.ts +12 -5
- package/origin/outcome.d.ts +11 -0
- package/origin/outcome.js +10 -0
- package/origin/search.d.ts +0 -3
- package/package.json +1 -1
- package/static/base-class/author-only.d.ts +13 -0
- package/static/base-class/author-only.js +23 -0
- package/static/base-class/content-only.d.ts +12 -0
- package/static/base-class/content-only.js +23 -0
- package/static/base-class/full-feature.d.ts +15 -0
- package/static/base-class/full-feature.js +18 -0
- package/static/export.d.ts +12 -0
- package/static/export.js +28 -0
- package/static/feature.d.ts +10 -0
- package/static/feature.js +17 -0
- package/static/interface.d.ts +9 -2
- package/static/outcome.d.ts +10 -0
- package/static/outcome.js +10 -0
- package/static-manager/base-class/full-feature.d.ts +14 -0
- package/static-manager/base-class/full-feature.js +18 -0
- package/static-manager/base-class/readonly.d.ts +14 -0
- package/static-manager/base-class/readonly.js +23 -0
- package/static-manager/export.d.ts +10 -0
- package/static-manager/export.js +26 -0
- package/static-manager/feature.d.ts +10 -0
- package/static-manager/feature.js +17 -0
- package/static-manager/outcome.d.ts +16 -0
- package/static-manager/outcome.js +12 -0
- package/{static/manager.d.ts → static-manager/static-manager.d.ts} +8 -6
- package/{database/manager.js → static-manager/static-manager.js} +2 -2
- package/text/base-class/author-only.d.ts +13 -0
- package/text/base-class/author-only.js +23 -0
- package/text/base-class/content-only.d.ts +12 -0
- package/text/base-class/content-only.js +23 -0
- package/text/base-class/full-feature.d.ts +15 -0
- package/text/base-class/full-feature.js +18 -0
- package/text/export.d.ts +12 -0
- package/text/export.js +28 -0
- package/text/feature.d.ts +10 -0
- package/text/feature.js +17 -0
- package/text/interface.d.ts +9 -2
- package/text/outcome.d.ts +10 -0
- package/text/outcome.js +10 -0
- package/text-manager/base-class/full-feature.d.ts +14 -0
- package/text-manager/base-class/full-feature.js +18 -0
- package/text-manager/base-class/readonly.d.ts +14 -0
- package/text-manager/base-class/readonly.js +23 -0
- package/text-manager/export.d.ts +10 -0
- package/text-manager/export.js +26 -0
- package/text-manager/feature.d.ts +10 -0
- package/text-manager/feature.js +17 -0
- package/text-manager/outcome.d.ts +16 -0
- package/text-manager/outcome.js +12 -0
- package/{text/manager.d.ts → text-manager/text-manager.d.ts} +8 -6
- package/{text/manager.js → text-manager/text-manager.js} +2 -2
- package/database/manager.d.ts +0 -41
|
@@ -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";
|
package/origin/export.js
ADDED
|
@@ -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;
|
package/origin/interface.d.ts
CHANGED
|
@@ -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 {
|
|
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<
|
|
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");
|
package/origin/search.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Author Only
|
|
5
|
+
*/
|
|
6
|
+
import { IMBRICATE_STATIC_FEATURE } from "../feature";
|
|
7
|
+
import { IImbricateStatic } from "../interface";
|
|
8
|
+
import { ImbricateStaticGetContentOutcome } from "../outcome";
|
|
9
|
+
import { ImbricateStaticFullFeatureBase } from "./full-feature";
|
|
10
|
+
export declare abstract class ImbricateStaticAuthorOnlyBase extends ImbricateStaticFullFeatureBase implements IImbricateStatic {
|
|
11
|
+
readonly features: IMBRICATE_STATIC_FEATURE[];
|
|
12
|
+
getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
5
|
+
* @description Author Only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateStaticAuthorOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/static/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateStaticAuthorOnlyBase extends full_feature_1.ImbricateStaticFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.features = [
|
|
16
|
+
feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
getContentInBase64() {
|
|
20
|
+
throw feature_not_supported_1.ImbricateStaticFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateStaticAuthorOnlyBase = ImbricateStaticAuthorOnlyBase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Content Only
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateAuthor } from "../../author/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateStaticFullFeatureBase } from "./full-feature";
|
|
9
|
+
export declare abstract class ImbricateStaticContentOnlyBase extends ImbricateStaticFullFeatureBase {
|
|
10
|
+
readonly features: IMBRICATE_STATIC_FEATURE[];
|
|
11
|
+
get author(): ImbricateAuthor;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
5
|
+
* @description Content Only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateStaticContentOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/static/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateStaticContentOnlyBase extends full_feature_1.ImbricateStaticFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.features = [
|
|
16
|
+
feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
get author() {
|
|
20
|
+
throw feature_not_supported_1.ImbricateStaticFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateStaticContentOnlyBase = ImbricateStaticContentOnlyBase;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Base Class
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateAuthor } from "../../author/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateStatic } from "../interface";
|
|
9
|
+
import { ImbricateStaticGetContentOutcome } from "../outcome";
|
|
10
|
+
export declare abstract class ImbricateStaticFullFeatureBase implements IImbricateStatic {
|
|
11
|
+
abstract readonly uniqueIdentifier: string;
|
|
12
|
+
readonly features: IMBRICATE_STATIC_FEATURE[];
|
|
13
|
+
abstract readonly author: ImbricateAuthor;
|
|
14
|
+
abstract getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
5
|
+
* @description Base Class
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateStaticFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateStaticFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.features = [
|
|
13
|
+
feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_AUTHOR,
|
|
14
|
+
feature_1.IMBRICATE_STATIC_FEATURE.STATIC_GET_CONTENT,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ImbricateStaticFullFeatureBase = ImbricateStaticFullFeatureBase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Export
|
|
5
|
+
*/
|
|
6
|
+
export * from "./base-class/author-only";
|
|
7
|
+
export * from "./base-class/content-only";
|
|
8
|
+
export * from "./base-class/full-feature";
|
|
9
|
+
export * from "./definition";
|
|
10
|
+
export * from "./feature";
|
|
11
|
+
export * from "./interface";
|
|
12
|
+
export * from "./outcome";
|
package/static/export.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
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/author-only"), exports);
|
|
23
|
+
__exportStar(require("./base-class/content-only"), exports);
|
|
24
|
+
__exportStar(require("./base-class/full-feature"), exports);
|
|
25
|
+
__exportStar(require("./definition"), exports);
|
|
26
|
+
__exportStar(require("./feature"), exports);
|
|
27
|
+
__exportStar(require("./interface"), exports);
|
|
28
|
+
__exportStar(require("./outcome"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_STATIC_FEATURE {
|
|
7
|
+
STATIC_GET_AUTHOR = "STATIC_GET_AUTHOR",
|
|
8
|
+
STATIC_GET_CONTENT = "STATIC_GET_CONTENT"
|
|
9
|
+
}
|
|
10
|
+
export declare const checkImbricateStaticFeatureSupported: (features: IMBRICATE_STATIC_FEATURE[], feature: IMBRICATE_STATIC_FEATURE) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateStaticFeatureSupported = exports.IMBRICATE_STATIC_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_STATIC_FEATURE;
|
|
10
|
+
(function (IMBRICATE_STATIC_FEATURE) {
|
|
11
|
+
IMBRICATE_STATIC_FEATURE["STATIC_GET_AUTHOR"] = "STATIC_GET_AUTHOR";
|
|
12
|
+
IMBRICATE_STATIC_FEATURE["STATIC_GET_CONTENT"] = "STATIC_GET_CONTENT";
|
|
13
|
+
})(IMBRICATE_STATIC_FEATURE || (exports.IMBRICATE_STATIC_FEATURE = IMBRICATE_STATIC_FEATURE = {}));
|
|
14
|
+
const checkImbricateStaticFeatureSupported = (features, feature) => {
|
|
15
|
+
return features.includes(feature);
|
|
16
|
+
};
|
|
17
|
+
exports.checkImbricateStaticFeatureSupported = checkImbricateStaticFeatureSupported;
|
package/static/interface.d.ts
CHANGED
|
@@ -4,19 +4,26 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { ImbricateAuthor } from "../author/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_FEATURE } from "./feature";
|
|
8
|
+
import { ImbricateStaticGetContentOutcome } from "./outcome";
|
|
7
9
|
export interface IImbricateStatic {
|
|
8
10
|
/**
|
|
9
11
|
* Unique identifier of the static object
|
|
10
12
|
*/
|
|
11
13
|
readonly uniqueIdentifier: string;
|
|
14
|
+
/**
|
|
15
|
+
* Features supported by the static object
|
|
16
|
+
*/
|
|
17
|
+
readonly features: IMBRICATE_STATIC_FEATURE[];
|
|
12
18
|
/**
|
|
13
19
|
* Author of the text object
|
|
14
20
|
*/
|
|
15
|
-
readonly author
|
|
21
|
+
readonly author: ImbricateAuthor;
|
|
16
22
|
/**
|
|
17
23
|
* Get the content of the static object
|
|
18
24
|
*
|
|
19
25
|
* @returns a promise of the content of the text, encoded in base64
|
|
26
|
+
* Symbol: S_Static_GetContent_NotFound - if the content is not found
|
|
20
27
|
*/
|
|
21
|
-
getContentInBase64(): PromiseLike<string
|
|
28
|
+
getContentInBase64(): PromiseLike<ImbricateStaticGetContentOutcome<string>>;
|
|
22
29
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Static
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
export declare const S_Static_GetContent_NotFound: unique symbol;
|
|
7
|
+
export type ImbricateStaticGetContentOutcomeSymbol = typeof S_Static_GetContent_NotFound;
|
|
8
|
+
export type ImbricateStaticGetContentOutcome<ContentFormat> = {
|
|
9
|
+
readonly content: ContentFormat;
|
|
10
|
+
} | ImbricateStaticGetContentOutcomeSymbol;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Static
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_Static_GetContent_NotFound = void 0;
|
|
9
|
+
// Get Content
|
|
10
|
+
exports.S_Static_GetContent_NotFound = Symbol("Static_GetContent_NotFound");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace StaticManager
|
|
4
|
+
* @description Full Feature
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateStaticAuditOptions } from "../../static/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateStaticManagerCreateStaticOutcome, ImbricateStaticManagerGetStaticOutcome } from "../outcome";
|
|
9
|
+
import { IImbricateStaticManager } from "../static-manager";
|
|
10
|
+
export declare abstract class ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
|
|
11
|
+
readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
|
|
12
|
+
abstract getStatic(uniqueIdentifier: string): PromiseLike<ImbricateStaticManagerGetStaticOutcome>;
|
|
13
|
+
abstract createInBase64(content: string, auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace StaticManager
|
|
5
|
+
* @description Full Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateStaticManagerFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateStaticManagerFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.supportedFeatures = [
|
|
13
|
+
feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_GET_STATIC,
|
|
14
|
+
feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_CREATE_STATIC,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ImbricateStaticManagerFullFeatureBase = ImbricateStaticManagerFullFeatureBase;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace StaticManager
|
|
4
|
+
* @description Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateStaticAuditOptions } from "../../static/definition";
|
|
7
|
+
import { IMBRICATE_STATIC_MANAGER_FEATURE } from "../feature";
|
|
8
|
+
import { ImbricateStaticManagerCreateStaticOutcome } from "../outcome";
|
|
9
|
+
import { IImbricateStaticManager } from "../static-manager";
|
|
10
|
+
import { ImbricateStaticManagerFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateStaticManagerReadonlyBase extends ImbricateStaticManagerFullFeatureBase implements IImbricateStaticManager {
|
|
12
|
+
readonly supportedFeatures: IMBRICATE_STATIC_MANAGER_FEATURE[];
|
|
13
|
+
createInBase64(_content: string, _auditOptions?: ImbricateStaticAuditOptions): PromiseLike<ImbricateStaticManagerCreateStaticOutcome>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace StaticManager
|
|
5
|
+
* @description Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateStaticManagerReadonlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/static-manager/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateStaticManagerReadonlyBase extends full_feature_1.ImbricateStaticManagerFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_GET_STATIC,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
createInBase64(_content, _auditOptions) {
|
|
20
|
+
throw feature_not_supported_1.ImbricateStaticManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_STATIC_MANAGER_FEATURE.STATIC_MANAGER_CREATE_STATIC);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ImbricateStaticManagerReadonlyBase = ImbricateStaticManagerReadonlyBase;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace StaticManager
|
|
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/full-feature"), exports);
|
|
23
|
+
__exportStar(require("./base-class/readonly"), exports);
|
|
24
|
+
__exportStar(require("./feature"), exports);
|
|
25
|
+
__exportStar(require("./outcome"), exports);
|
|
26
|
+
__exportStar(require("./static-manager"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace StaticManager
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_STATIC_MANAGER_FEATURE {
|
|
7
|
+
STATIC_MANAGER_GET_STATIC = "STATIC_MANAGER_GET_STATIC",
|
|
8
|
+
STATIC_MANAGER_CREATE_STATIC = "STATIC_MANAGER_CREATE_STATIC"
|
|
9
|
+
}
|
|
10
|
+
export declare const checkImbricateStaticManagerFeatureSupported: (features: IMBRICATE_STATIC_MANAGER_FEATURE[], feature: IMBRICATE_STATIC_MANAGER_FEATURE) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace StaticManager
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateStaticManagerFeatureSupported = exports.IMBRICATE_STATIC_MANAGER_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_STATIC_MANAGER_FEATURE;
|
|
10
|
+
(function (IMBRICATE_STATIC_MANAGER_FEATURE) {
|
|
11
|
+
IMBRICATE_STATIC_MANAGER_FEATURE["STATIC_MANAGER_GET_STATIC"] = "STATIC_MANAGER_GET_STATIC";
|
|
12
|
+
IMBRICATE_STATIC_MANAGER_FEATURE["STATIC_MANAGER_CREATE_STATIC"] = "STATIC_MANAGER_CREATE_STATIC";
|
|
13
|
+
})(IMBRICATE_STATIC_MANAGER_FEATURE || (exports.IMBRICATE_STATIC_MANAGER_FEATURE = IMBRICATE_STATIC_MANAGER_FEATURE = {}));
|
|
14
|
+
const checkImbricateStaticManagerFeatureSupported = (features, feature) => {
|
|
15
|
+
return features.includes(feature);
|
|
16
|
+
};
|
|
17
|
+
exports.checkImbricateStaticManagerFeatureSupported = checkImbricateStaticManagerFeatureSupported;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace StaticManager
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
import { IImbricateStatic } from "../static/interface";
|
|
7
|
+
export declare const S_StaticManager_GetStatic_NotFound: unique symbol;
|
|
8
|
+
export type ImbricateStaticManagerGetStaticOutcomeSymbol = typeof S_StaticManager_GetStatic_NotFound;
|
|
9
|
+
export type ImbricateStaticManagerGetStaticOutcome = {
|
|
10
|
+
readonly static: IImbricateStatic;
|
|
11
|
+
} | ImbricateStaticManagerGetStaticOutcomeSymbol;
|
|
12
|
+
export declare const S_StaticManager_CreateStatic_IdentifierDuplicated: unique symbol;
|
|
13
|
+
export type ImbricateStaticManagerCreateStaticOutcomeSymbol = typeof S_StaticManager_CreateStatic_IdentifierDuplicated;
|
|
14
|
+
export type ImbricateStaticManagerCreateStaticOutcome = {
|
|
15
|
+
readonly static: IImbricateStatic;
|
|
16
|
+
} | ImbricateStaticManagerCreateStaticOutcomeSymbol;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace StaticManager
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_StaticManager_CreateStatic_IdentifierDuplicated = exports.S_StaticManager_GetStatic_NotFound = void 0;
|
|
9
|
+
// Manager Get Static
|
|
10
|
+
exports.S_StaticManager_GetStatic_NotFound = Symbol("StaticManager_GetStatic_NotFound");
|
|
11
|
+
// Manager Create Static
|
|
12
|
+
exports.S_StaticManager_CreateStatic_IdentifierDuplicated = Symbol("StaticManager_CreateStatic_IdentifierDuplicated");
|