@imbricate/core 1.20.1 → 1.21.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/binary-storage/interface.d.ts +5 -0
- package/function/definition.d.ts +6 -0
- package/function/definition.js +14 -0
- package/function/interface.d.ts +5 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/origin/definition.d.ts +3 -0
- package/origin/definition.js +12 -0
- package/package.json +1 -1
- package/trash/definition.d.ts +25 -0
- package/trash/definition.js +33 -0
- package/trash/interface.d.ts +17 -0
- package/trash/interface.js +7 -0
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { PromiseOr } from "../definition/promise";
|
|
7
|
+
import { ImbricateBinaryStorageCapability } from "./definition";
|
|
7
8
|
export interface IImbricateBinaryStorage {
|
|
9
|
+
/**
|
|
10
|
+
* Capabilities of the binary storage
|
|
11
|
+
*/
|
|
12
|
+
readonly capabilities: ImbricateBinaryStorageCapability;
|
|
8
13
|
/**
|
|
9
14
|
* Store a binary file
|
|
10
15
|
*
|
package/function/definition.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @namespace Function
|
|
4
4
|
* @description Definition
|
|
5
5
|
*/
|
|
6
|
+
import { ImbricateCapability } from "../capability/definition";
|
|
6
7
|
import { PromiseOr } from "../definition/promise";
|
|
7
8
|
export type ImbricateFunction<Target> = {
|
|
8
9
|
readonly title: string;
|
|
@@ -10,3 +11,8 @@ export type ImbricateFunction<Target> = {
|
|
|
10
11
|
readonly execute: ImbricateFunctionExecute<Target>;
|
|
11
12
|
};
|
|
12
13
|
export type ImbricateFunctionExecute<Target> = (target: Target) => PromiseOr<void>;
|
|
14
|
+
export type ImbricateFunctionCapability = Record<IMBRICATE_FUNCTION_CAPABILITY_KEY, ImbricateCapability>;
|
|
15
|
+
export declare enum IMBRICATE_FUNCTION_CAPABILITY_KEY {
|
|
16
|
+
FIND_ORIGIN_FUNCTIONS = "imbricate.function.origin.find"
|
|
17
|
+
}
|
|
18
|
+
export declare const createAllAllowImbricateFunctionCapability: () => ImbricateFunctionCapability;
|
package/function/definition.js
CHANGED
|
@@ -5,3 +5,17 @@
|
|
|
5
5
|
* @description Definition
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createAllAllowImbricateFunctionCapability = exports.IMBRICATE_FUNCTION_CAPABILITY_KEY = void 0;
|
|
9
|
+
const definition_1 = require("../capability/definition");
|
|
10
|
+
var IMBRICATE_FUNCTION_CAPABILITY_KEY;
|
|
11
|
+
(function (IMBRICATE_FUNCTION_CAPABILITY_KEY) {
|
|
12
|
+
IMBRICATE_FUNCTION_CAPABILITY_KEY["FIND_ORIGIN_FUNCTIONS"] = "imbricate.function.origin.find";
|
|
13
|
+
})(IMBRICATE_FUNCTION_CAPABILITY_KEY || (exports.IMBRICATE_FUNCTION_CAPABILITY_KEY = IMBRICATE_FUNCTION_CAPABILITY_KEY = {}));
|
|
14
|
+
const createAllAllowImbricateFunctionCapability = () => {
|
|
15
|
+
return {
|
|
16
|
+
[IMBRICATE_FUNCTION_CAPABILITY_KEY.FIND_ORIGIN_FUNCTIONS]: {
|
|
17
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.createAllAllowImbricateFunctionCapability = createAllAllowImbricateFunctionCapability;
|
package/function/interface.d.ts
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { PromiseOr } from "../definition/promise";
|
|
7
7
|
import { IImbricateOrigin } from "../origin/interface";
|
|
8
|
-
import { ImbricateFunction } from "./definition";
|
|
8
|
+
import { ImbricateFunction, ImbricateFunctionCapability } from "./definition";
|
|
9
9
|
export interface IImbricateFunctionManager {
|
|
10
|
+
/**
|
|
11
|
+
* Capabilities of the function manager
|
|
12
|
+
*/
|
|
13
|
+
readonly capabilities: ImbricateFunctionCapability;
|
|
10
14
|
findSynchronousOriginFunctions(): Array<ImbricateFunction<IImbricateOrigin>>;
|
|
11
15
|
findAllOriginFunctions(): PromiseOr<Array<ImbricateFunction<IImbricateOrigin>>>;
|
|
12
16
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -48,3 +48,5 @@ __exportStar(require("./script/definition"), exports);
|
|
|
48
48
|
__exportStar(require("./script/interface"), exports);
|
|
49
49
|
__exportStar(require("./search/prefix"), exports);
|
|
50
50
|
__exportStar(require("./search/snippet"), exports);
|
|
51
|
+
__exportStar(require("./trash/definition"), exports);
|
|
52
|
+
__exportStar(require("./trash/interface"), exports);
|
package/origin/definition.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export type ImbricateOriginMetadata = {
|
|
|
14
14
|
};
|
|
15
15
|
export type ImbricateOriginCapability = Record<IMBRICATE_ORIGIN_CAPABILITY_KEY, ImbricateCapability>;
|
|
16
16
|
export declare enum IMBRICATE_ORIGIN_CAPABILITY_KEY {
|
|
17
|
+
ORIGIN_FUNCTION = "imbricate.origin.function",
|
|
18
|
+
ORIGIN_BINARY_STORAGE = "imbricate.origin.binary-storage",
|
|
19
|
+
ORIGIN_TRASH_STASH = "imbricate.origin.trash-stash",
|
|
17
20
|
CREATE_COLLECTION = "imbricate.origin.collection.create",
|
|
18
21
|
RENAME_COLLECTION = "imbricate.origin.collection.rename",
|
|
19
22
|
DELETE_COLLECTION = "imbricate.origin.collection.delete",
|
package/origin/definition.js
CHANGED
|
@@ -15,6 +15,9 @@ var IMBRICATE_DIGEST_ALGORITHM;
|
|
|
15
15
|
})(IMBRICATE_DIGEST_ALGORITHM || (exports.IMBRICATE_DIGEST_ALGORITHM = IMBRICATE_DIGEST_ALGORITHM = {}));
|
|
16
16
|
var IMBRICATE_ORIGIN_CAPABILITY_KEY;
|
|
17
17
|
(function (IMBRICATE_ORIGIN_CAPABILITY_KEY) {
|
|
18
|
+
IMBRICATE_ORIGIN_CAPABILITY_KEY["ORIGIN_FUNCTION"] = "imbricate.origin.function";
|
|
19
|
+
IMBRICATE_ORIGIN_CAPABILITY_KEY["ORIGIN_BINARY_STORAGE"] = "imbricate.origin.binary-storage";
|
|
20
|
+
IMBRICATE_ORIGIN_CAPABILITY_KEY["ORIGIN_TRASH_STASH"] = "imbricate.origin.trash-stash";
|
|
18
21
|
IMBRICATE_ORIGIN_CAPABILITY_KEY["CREATE_COLLECTION"] = "imbricate.origin.collection.create";
|
|
19
22
|
IMBRICATE_ORIGIN_CAPABILITY_KEY["RENAME_COLLECTION"] = "imbricate.origin.collection.rename";
|
|
20
23
|
IMBRICATE_ORIGIN_CAPABILITY_KEY["DELETE_COLLECTION"] = "imbricate.origin.collection.delete";
|
|
@@ -29,6 +32,15 @@ var IMBRICATE_ORIGIN_CAPABILITY_KEY;
|
|
|
29
32
|
})(IMBRICATE_ORIGIN_CAPABILITY_KEY || (exports.IMBRICATE_ORIGIN_CAPABILITY_KEY = IMBRICATE_ORIGIN_CAPABILITY_KEY = {}));
|
|
30
33
|
const createAllAllowImbricateOriginCapability = () => {
|
|
31
34
|
return {
|
|
35
|
+
[IMBRICATE_ORIGIN_CAPABILITY_KEY.ORIGIN_FUNCTION]: {
|
|
36
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
37
|
+
},
|
|
38
|
+
[IMBRICATE_ORIGIN_CAPABILITY_KEY.ORIGIN_BINARY_STORAGE]: {
|
|
39
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
40
|
+
},
|
|
41
|
+
[IMBRICATE_ORIGIN_CAPABILITY_KEY.ORIGIN_TRASH_STASH]: {
|
|
42
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
43
|
+
},
|
|
32
44
|
[IMBRICATE_ORIGIN_CAPABILITY_KEY.CREATE_COLLECTION]: {
|
|
33
45
|
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
34
46
|
},
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Trash
|
|
4
|
+
* @description Definition
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateCapability } from "../capability/definition";
|
|
7
|
+
export type ImbricateVacantPage = {
|
|
8
|
+
readonly collectionUniqueIdentifier: string;
|
|
9
|
+
readonly pageIdentifier: string;
|
|
10
|
+
readonly contentDigest: string;
|
|
11
|
+
readonly content: string;
|
|
12
|
+
};
|
|
13
|
+
export type ImbricateVacantScript = {
|
|
14
|
+
readonly scriptIdentifier: string;
|
|
15
|
+
readonly scriptDigest: string;
|
|
16
|
+
readonly script: string;
|
|
17
|
+
};
|
|
18
|
+
export type ImbricateTrashStashCapability = Record<IMBRICATE_TRASH_STASH_CAPABILITY_KEY, ImbricateCapability>;
|
|
19
|
+
export declare enum IMBRICATE_TRASH_STASH_CAPABILITY_KEY {
|
|
20
|
+
TOSS_PAGE = "imbricate.trash-stash.page.toss",
|
|
21
|
+
RETRIEVE_PAGE = "imbricate.trash-stash.page.retrieve",
|
|
22
|
+
TOSS_SCRIPT = "imbricate.trash-stash.script.toss",
|
|
23
|
+
RETRIEVE_SCRIPT = "imbricate.trash-stash.script.retrieve"
|
|
24
|
+
}
|
|
25
|
+
export declare const createAllAllowImbricateTrashStashCapability: () => ImbricateTrashStashCapability;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Trash
|
|
5
|
+
* @description Definition
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createAllAllowImbricateTrashStashCapability = exports.IMBRICATE_TRASH_STASH_CAPABILITY_KEY = void 0;
|
|
9
|
+
const definition_1 = require("../capability/definition");
|
|
10
|
+
var IMBRICATE_TRASH_STASH_CAPABILITY_KEY;
|
|
11
|
+
(function (IMBRICATE_TRASH_STASH_CAPABILITY_KEY) {
|
|
12
|
+
IMBRICATE_TRASH_STASH_CAPABILITY_KEY["TOSS_PAGE"] = "imbricate.trash-stash.page.toss";
|
|
13
|
+
IMBRICATE_TRASH_STASH_CAPABILITY_KEY["RETRIEVE_PAGE"] = "imbricate.trash-stash.page.retrieve";
|
|
14
|
+
IMBRICATE_TRASH_STASH_CAPABILITY_KEY["TOSS_SCRIPT"] = "imbricate.trash-stash.script.toss";
|
|
15
|
+
IMBRICATE_TRASH_STASH_CAPABILITY_KEY["RETRIEVE_SCRIPT"] = "imbricate.trash-stash.script.retrieve";
|
|
16
|
+
})(IMBRICATE_TRASH_STASH_CAPABILITY_KEY || (exports.IMBRICATE_TRASH_STASH_CAPABILITY_KEY = IMBRICATE_TRASH_STASH_CAPABILITY_KEY = {}));
|
|
17
|
+
const createAllAllowImbricateTrashStashCapability = () => {
|
|
18
|
+
return {
|
|
19
|
+
[IMBRICATE_TRASH_STASH_CAPABILITY_KEY.TOSS_PAGE]: {
|
|
20
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
21
|
+
},
|
|
22
|
+
[IMBRICATE_TRASH_STASH_CAPABILITY_KEY.RETRIEVE_PAGE]: {
|
|
23
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
24
|
+
},
|
|
25
|
+
[IMBRICATE_TRASH_STASH_CAPABILITY_KEY.TOSS_SCRIPT]: {
|
|
26
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
27
|
+
},
|
|
28
|
+
[IMBRICATE_TRASH_STASH_CAPABILITY_KEY.RETRIEVE_SCRIPT]: {
|
|
29
|
+
effect: definition_1.IMBRICATE_CAPABILITY_EFFECT.ALLOW,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
exports.createAllAllowImbricateTrashStashCapability = createAllAllowImbricateTrashStashCapability;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Trash
|
|
4
|
+
* @description Interface
|
|
5
|
+
*/
|
|
6
|
+
import { PromiseOr } from "../definition/promise";
|
|
7
|
+
import { ImbricateTrashStashCapability, ImbricateVacantPage, ImbricateVacantScript } from "./definition";
|
|
8
|
+
export interface IImbricateTrashStash {
|
|
9
|
+
/**
|
|
10
|
+
* Capabilities of the trash stash
|
|
11
|
+
*/
|
|
12
|
+
readonly capabilities: ImbricateTrashStashCapability;
|
|
13
|
+
tossPage(page: ImbricateVacantPage): PromiseOr<void>;
|
|
14
|
+
retrievePage(collectionUniqueIdentifier: string, pageIdentifier: string): PromiseOr<ImbricateVacantPage | null>;
|
|
15
|
+
tossScript(script: ImbricateVacantScript): PromiseOr<void>;
|
|
16
|
+
retrieveScript(scriptIdentifier: string): PromiseOr<ImbricateVacantScript | null>;
|
|
17
|
+
}
|