@imbricate/core 2.1.0 → 2.3.1
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/collection/base.d.ts +1 -0
- package/collection/base.js +3 -0
- package/collection/definition.d.ts +2 -1
- package/collection/definition.js +2 -0
- package/collection/interface.d.ts +1 -0
- package/collection-manager/base.d.ts +2 -0
- package/collection-manager/base.js +14 -0
- package/collection-manager/interface.d.ts +9 -0
- package/executable-manager/base.d.ts +1 -0
- package/executable-manager/base.js +14 -0
- package/executable-manager/interface.d.ts +8 -0
- package/package.json +1 -1
- package/script-manager/base.d.ts +1 -0
- package/script-manager/base.js +3 -0
- package/script-manager/definition.d.ts +2 -1
- package/script-manager/definition.js +2 -0
- package/script-manager/interface.d.ts +1 -0
- package/script-variant/definition.d.ts +5 -0
- package/script-variant/definition.js +6 -1
package/collection/base.d.ts
CHANGED
|
@@ -29,4 +29,5 @@ export declare abstract class ImbricateCollectionBase implements IImbricateColle
|
|
|
29
29
|
listDirectories(_directories: string[]): PromiseOr<string[]>;
|
|
30
30
|
searchPages(_keyword: string, _config: ImbricateSearchPageConfig): PromiseOr<ImbricatePageSearchResult[]>;
|
|
31
31
|
queryPages(_query: ImbricatePageQuery, _config: ImbricatePageQueryConfig): PromiseOr<IImbricatePage[]>;
|
|
32
|
+
listSupportedVariants(): Promise<ImbricatePageVariant[]>;
|
|
32
33
|
}
|
package/collection/base.js
CHANGED
|
@@ -50,5 +50,8 @@ class ImbricateCollectionBase {
|
|
|
50
50
|
queryPages(_query, _config) {
|
|
51
51
|
throw not_implemented_1.ImbricateNotImplemented.create("QueryPages", definition_2.IMBRICATE_COLLECTION_CAPABILITY_KEY.LIST_PAGES);
|
|
52
52
|
}
|
|
53
|
+
listSupportedVariants() {
|
|
54
|
+
throw not_implemented_1.ImbricateNotImplemented.create("ListSupportedVariants", definition_2.IMBRICATE_COLLECTION_CAPABILITY_KEY.LIST_SUPPORTED_VARIANTS);
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
exports.ImbricateCollectionBase = ImbricateCollectionBase;
|
|
@@ -11,6 +11,7 @@ export declare enum IMBRICATE_COLLECTION_CAPABILITY_KEY {
|
|
|
11
11
|
RETITLE_PAGE = "imbricate.collection.page.retitle",
|
|
12
12
|
DELETE_PAGE = "imbricate.collection.page.delete",
|
|
13
13
|
GET_PAGE = "imbricate.collection.page.get",
|
|
14
|
-
LIST_PAGES = "imbricate.collection.page.list"
|
|
14
|
+
LIST_PAGES = "imbricate.collection.page.list",
|
|
15
|
+
LIST_SUPPORTED_VARIANTS = "imbricate.collection.page.list-supported-variants"
|
|
15
16
|
}
|
|
16
17
|
export declare const ImbricateCollectionCapabilityList: IMBRICATE_COLLECTION_CAPABILITY_KEY[];
|
package/collection/definition.js
CHANGED
|
@@ -14,6 +14,7 @@ var IMBRICATE_COLLECTION_CAPABILITY_KEY;
|
|
|
14
14
|
IMBRICATE_COLLECTION_CAPABILITY_KEY["DELETE_PAGE"] = "imbricate.collection.page.delete";
|
|
15
15
|
IMBRICATE_COLLECTION_CAPABILITY_KEY["GET_PAGE"] = "imbricate.collection.page.get";
|
|
16
16
|
IMBRICATE_COLLECTION_CAPABILITY_KEY["LIST_PAGES"] = "imbricate.collection.page.list";
|
|
17
|
+
IMBRICATE_COLLECTION_CAPABILITY_KEY["LIST_SUPPORTED_VARIANTS"] = "imbricate.collection.page.list-supported-variants";
|
|
17
18
|
})(IMBRICATE_COLLECTION_CAPABILITY_KEY || (exports.IMBRICATE_COLLECTION_CAPABILITY_KEY = IMBRICATE_COLLECTION_CAPABILITY_KEY = {}));
|
|
18
19
|
exports.ImbricateCollectionCapabilityList = [
|
|
19
20
|
IMBRICATE_COLLECTION_CAPABILITY_KEY.CREATE_PAGE,
|
|
@@ -22,4 +23,5 @@ exports.ImbricateCollectionCapabilityList = [
|
|
|
22
23
|
IMBRICATE_COLLECTION_CAPABILITY_KEY.DELETE_PAGE,
|
|
23
24
|
IMBRICATE_COLLECTION_CAPABILITY_KEY.GET_PAGE,
|
|
24
25
|
IMBRICATE_COLLECTION_CAPABILITY_KEY.LIST_PAGES,
|
|
26
|
+
IMBRICATE_COLLECTION_CAPABILITY_KEY.LIST_SUPPORTED_VARIANTS,
|
|
25
27
|
];
|
|
@@ -24,4 +24,5 @@ export interface IImbricateCollection {
|
|
|
24
24
|
listDirectories(directories: string[]): PromiseOr<string[]>;
|
|
25
25
|
searchPages(keyword: string, config: ImbricateSearchPageConfig): PromiseOr<ImbricatePageSearchResult[]>;
|
|
26
26
|
queryPages(query: ImbricatePageQuery, config: ImbricatePageQueryConfig): PromiseOr<IImbricatePage[]>;
|
|
27
|
+
listSupportedVariants(): PromiseOr<ImbricatePageVariant[]>;
|
|
27
28
|
}
|
|
@@ -7,6 +7,7 @@ import { ImbricateCapabilityBuilder } from "../capability/builder";
|
|
|
7
7
|
import { ImbricateCapability } from "../capability/definition";
|
|
8
8
|
import { IImbricateCollection } from "../collection/interface";
|
|
9
9
|
import type { PromiseOr } from "../definition/promise";
|
|
10
|
+
import { ImbricatePageVariant } from "../page-variant/definition";
|
|
10
11
|
import { IMBRICATE_COLLECTION_MANAGER_CAPABILITY_KEY, ImbricateCollectionManagerCapability } from "./definition";
|
|
11
12
|
import { IImbricateCollectionManager } from "./interface";
|
|
12
13
|
export declare abstract class ImbricateCollectionManagerBase implements IImbricateCollectionManager {
|
|
@@ -14,6 +15,7 @@ export declare abstract class ImbricateCollectionManagerBase implements IImbrica
|
|
|
14
15
|
static allAllowCapability(): ImbricateCollectionManagerCapability;
|
|
15
16
|
static allDenyCapability(): ImbricateCollectionManagerCapability;
|
|
16
17
|
abstract readonly capabilities: ImbricateCollectionManagerCapability;
|
|
18
|
+
findSupportedVariants(_variant?: Partial<ImbricatePageVariant>): Promise<ImbricatePageVariant[]>;
|
|
17
19
|
createCollection(_collectionName: string, _description?: string): PromiseOr<IImbricateCollection>;
|
|
18
20
|
renameCollection(_collectionUniqueIdentifier: string, _newCollectionName: string): PromiseOr<void>;
|
|
19
21
|
deleteCollection(_collectionUniqueIdentifier: string): PromiseOr<void>;
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* @namespace CollectionManager
|
|
5
5
|
* @description Base
|
|
6
6
|
*/
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
7
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
17
|
exports.ImbricateCollectionManagerBase = void 0;
|
|
9
18
|
const builder_1 = require("../capability/builder");
|
|
@@ -20,6 +29,11 @@ class ImbricateCollectionManagerBase {
|
|
|
20
29
|
static allDenyCapability() {
|
|
21
30
|
return this.buildCapability((0, definition_1.createDenyImbricateCapability)()).build();
|
|
22
31
|
}
|
|
32
|
+
findSupportedVariants(_variant) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return [];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
23
37
|
createCollection(_collectionName, _description) {
|
|
24
38
|
throw not_implemented_1.ImbricateNotImplemented.create("CreateCollection", definition_2.IMBRICATE_COLLECTION_MANAGER_CAPABILITY_KEY.CREATE_COLLECTION);
|
|
25
39
|
}
|
|
@@ -5,12 +5,21 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { IImbricateCollection } from "../collection/interface";
|
|
7
7
|
import { PromiseOr } from "../definition/promise";
|
|
8
|
+
import { ImbricatePageVariant } from "../page-variant/definition";
|
|
8
9
|
import { ImbricateCollectionManagerCapability } from "./definition";
|
|
9
10
|
export interface IImbricateCollectionManager {
|
|
10
11
|
/**
|
|
11
12
|
* Capabilities of the collection manager
|
|
12
13
|
*/
|
|
13
14
|
readonly capabilities: ImbricateCollectionManagerCapability;
|
|
15
|
+
/**
|
|
16
|
+
* Find supported variants
|
|
17
|
+
*
|
|
18
|
+
* @param variant the partial variant to find, if not provided, find all
|
|
19
|
+
*
|
|
20
|
+
* @returns supported variants
|
|
21
|
+
*/
|
|
22
|
+
findSupportedVariants(variant?: Partial<ImbricatePageVariant>): PromiseOr<ImbricatePageVariant[]>;
|
|
14
23
|
/**
|
|
15
24
|
* Create a collection
|
|
16
25
|
*
|
|
@@ -15,6 +15,7 @@ export declare abstract class ImbricateExecutableManagerBase implements IImbrica
|
|
|
15
15
|
static allAllowCapability(): ImbricateExecutableManagerCapability;
|
|
16
16
|
static allDenyCapability(): ImbricateExecutableManagerCapability;
|
|
17
17
|
abstract readonly capabilities: ImbricateExecutableManagerCapability;
|
|
18
|
+
findSupportedVariants(_variant?: Partial<ImbricateScriptVariant>): Promise<ImbricateScriptVariant[]>;
|
|
18
19
|
executeScript(_script: IImbricateScript, _parameters: ImbricateExecuteParameters, _environment: ImbricateExecuteEnvironment): Promise<ImbricateExecuteResult>;
|
|
19
20
|
executeSnippet(_snippet: string, _variant: ImbricateScriptVariant, _parameters: ImbricateExecuteParameters, _environment: ImbricateExecuteEnvironment): Promise<ImbricateExecuteResult>;
|
|
20
21
|
}
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* @namespace ExecutableManager
|
|
5
5
|
* @description Base
|
|
6
6
|
*/
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
7
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
17
|
exports.ImbricateExecutableManagerBase = void 0;
|
|
9
18
|
const builder_1 = require("../capability/builder");
|
|
@@ -20,6 +29,11 @@ class ImbricateExecutableManagerBase {
|
|
|
20
29
|
static allDenyCapability() {
|
|
21
30
|
return this.buildCapability((0, definition_1.createDenyImbricateCapability)()).build();
|
|
22
31
|
}
|
|
32
|
+
findSupportedVariants(_variant) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return [];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
23
37
|
executeScript(_script, _parameters, _environment) {
|
|
24
38
|
throw not_implemented_1.ImbricateNotImplemented.create("ExecuteScript", definition_2.IMBRICATE_EXECUTABLE_MANAGER_CAPABILITY_KEY.EXECUTE_SCRIPT);
|
|
25
39
|
}
|
|
@@ -13,6 +13,14 @@ export interface IImbricateExecutableManager {
|
|
|
13
13
|
* Capabilities of the executable manager
|
|
14
14
|
*/
|
|
15
15
|
readonly capabilities: ImbricateExecutableManagerCapability;
|
|
16
|
+
/**
|
|
17
|
+
* Find supported variants
|
|
18
|
+
*
|
|
19
|
+
* @param variant the partial variant to find, if not provided, find all
|
|
20
|
+
*
|
|
21
|
+
* @returns supported variants
|
|
22
|
+
*/
|
|
23
|
+
findSupportedVariants(variant?: Partial<ImbricateScriptVariant>): PromiseOr<ImbricateScriptVariant[]>;
|
|
16
24
|
/**
|
|
17
25
|
* Execute a script
|
|
18
26
|
*
|
package/package.json
CHANGED
package/script-manager/base.d.ts
CHANGED
|
@@ -26,4 +26,5 @@ export declare abstract class ImbricateScriptManagerBase implements IImbricateSc
|
|
|
26
26
|
listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
|
|
27
27
|
searchScripts(_keyword: string, _config: ImbricateSearchScriptConfig): PromiseOr<ImbricateScriptSearchResult[]>;
|
|
28
28
|
queryScripts(_query: ImbricateScriptQuery, _config: ImbricateScriptQueryConfig): PromiseOr<IImbricateScript[]>;
|
|
29
|
+
listSupportedVariants(): Promise<ImbricateScriptVariant[]>;
|
|
29
30
|
}
|
package/script-manager/base.js
CHANGED
|
@@ -47,5 +47,8 @@ class ImbricateScriptManagerBase {
|
|
|
47
47
|
queryScripts(_query, _config) {
|
|
48
48
|
throw not_implemented_1.ImbricateNotImplemented.create("QueryScripts", definition_2.IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.LIST_SCRIPTS);
|
|
49
49
|
}
|
|
50
|
+
listSupportedVariants() {
|
|
51
|
+
throw not_implemented_1.ImbricateNotImplemented.create("ListSupportedVariants", definition_2.IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.LIST_SUPPORTED_VARIANTS);
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
exports.ImbricateScriptManagerBase = ImbricateScriptManagerBase;
|
|
@@ -12,6 +12,7 @@ export declare enum IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY {
|
|
|
12
12
|
DELETE_SCRIPT = "imbricate.script-manager.delete",
|
|
13
13
|
GET_SCRIPT = "imbricate.script-manager.get",
|
|
14
14
|
LIST_SCRIPTS = "imbricate.script-manager.list",
|
|
15
|
-
EXECUTE_SCRIPT_SNIPPET = "imbricate.script-manager.execute-script-snippet"
|
|
15
|
+
EXECUTE_SCRIPT_SNIPPET = "imbricate.script-manager.execute-script-snippet",
|
|
16
|
+
LIST_SUPPORTED_VARIANTS = "imbricate.script-manager.list-supported-variants"
|
|
16
17
|
}
|
|
17
18
|
export declare const ImbricateScriptManagerCapabilityList: IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY[];
|
|
@@ -15,6 +15,7 @@ var IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY;
|
|
|
15
15
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY["GET_SCRIPT"] = "imbricate.script-manager.get";
|
|
16
16
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY["LIST_SCRIPTS"] = "imbricate.script-manager.list";
|
|
17
17
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY["EXECUTE_SCRIPT_SNIPPET"] = "imbricate.script-manager.execute-script-snippet";
|
|
18
|
+
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY["LIST_SUPPORTED_VARIANTS"] = "imbricate.script-manager.list-supported-variants";
|
|
18
19
|
})(IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY || (exports.IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY = IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY = {}));
|
|
19
20
|
exports.ImbricateScriptManagerCapabilityList = [
|
|
20
21
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.CREATE_SCRIPT,
|
|
@@ -24,4 +25,5 @@ exports.ImbricateScriptManagerCapabilityList = [
|
|
|
24
25
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.GET_SCRIPT,
|
|
25
26
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.LIST_SCRIPTS,
|
|
26
27
|
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.EXECUTE_SCRIPT_SNIPPET,
|
|
28
|
+
IMBRICATE_SCRIPT_MANAGER_CAPABILITY_KEY.LIST_SUPPORTED_VARIANTS,
|
|
27
29
|
];
|
|
@@ -40,4 +40,5 @@ export interface IImbricateScriptManager {
|
|
|
40
40
|
listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
|
|
41
41
|
searchScripts(keyword: string, config: ImbricateSearchScriptConfig): PromiseOr<ImbricateScriptSearchResult[]>;
|
|
42
42
|
queryScripts(query: ImbricateScriptQuery, config: ImbricateScriptQueryConfig): PromiseOr<IImbricateScript[]>;
|
|
43
|
+
listSupportedVariants(): PromiseOr<ImbricateScriptVariant[]>;
|
|
43
44
|
}
|
|
@@ -8,10 +8,15 @@ export declare enum IMBRICATE_SCRIPT_LANGUAGE {
|
|
|
8
8
|
TYPESCRIPT = "typescript"
|
|
9
9
|
}
|
|
10
10
|
export declare const IMBRICATE_SCRIPT_LANGUAGE_LIST: IMBRICATE_SCRIPT_LANGUAGE[];
|
|
11
|
+
export declare enum IMBRICATE_SCRIPT_EXECUTE_LAYER {
|
|
12
|
+
ORIGIN = "ORIGIN",
|
|
13
|
+
INTERFACE = "INTERFACE"
|
|
14
|
+
}
|
|
11
15
|
export declare const isValidImbricateScriptLanguage: (language: unknown) => language is IMBRICATE_SCRIPT_LANGUAGE;
|
|
12
16
|
export type ImbricateScriptVariant = {
|
|
13
17
|
readonly language: IMBRICATE_SCRIPT_LANGUAGE;
|
|
14
18
|
readonly engine: string;
|
|
15
19
|
readonly version: string;
|
|
20
|
+
readonly layer: IMBRICATE_SCRIPT_EXECUTE_LAYER;
|
|
16
21
|
};
|
|
17
22
|
export declare const isImbricateScriptVariant: (variant: unknown) => variant is ImbricateScriptVariant;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @description Definition
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.isImbricateScriptVariant = exports.isValidImbricateScriptLanguage = exports.IMBRICATE_SCRIPT_LANGUAGE_LIST = exports.IMBRICATE_SCRIPT_LANGUAGE = void 0;
|
|
8
|
+
exports.isImbricateScriptVariant = exports.isValidImbricateScriptLanguage = exports.IMBRICATE_SCRIPT_EXECUTE_LAYER = exports.IMBRICATE_SCRIPT_LANGUAGE_LIST = exports.IMBRICATE_SCRIPT_LANGUAGE = void 0;
|
|
9
9
|
var IMBRICATE_SCRIPT_LANGUAGE;
|
|
10
10
|
(function (IMBRICATE_SCRIPT_LANGUAGE) {
|
|
11
11
|
IMBRICATE_SCRIPT_LANGUAGE["JAVASCRIPT"] = "javascript";
|
|
@@ -15,6 +15,11 @@ exports.IMBRICATE_SCRIPT_LANGUAGE_LIST = [
|
|
|
15
15
|
IMBRICATE_SCRIPT_LANGUAGE.JAVASCRIPT,
|
|
16
16
|
IMBRICATE_SCRIPT_LANGUAGE.TYPESCRIPT,
|
|
17
17
|
];
|
|
18
|
+
var IMBRICATE_SCRIPT_EXECUTE_LAYER;
|
|
19
|
+
(function (IMBRICATE_SCRIPT_EXECUTE_LAYER) {
|
|
20
|
+
IMBRICATE_SCRIPT_EXECUTE_LAYER["ORIGIN"] = "ORIGIN";
|
|
21
|
+
IMBRICATE_SCRIPT_EXECUTE_LAYER["INTERFACE"] = "INTERFACE";
|
|
22
|
+
})(IMBRICATE_SCRIPT_EXECUTE_LAYER || (exports.IMBRICATE_SCRIPT_EXECUTE_LAYER = IMBRICATE_SCRIPT_EXECUTE_LAYER = {}));
|
|
18
23
|
const isValidImbricateScriptLanguage = (language) => {
|
|
19
24
|
return exports.IMBRICATE_SCRIPT_LANGUAGE_LIST.includes(language);
|
|
20
25
|
};
|