@imbricate/core 1.2.0 → 1.3.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/collection/interface.d.ts +2 -3
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/origin/interface.d.ts +2 -5
- package/package.json +1 -1
- package/page/definition.d.ts +1 -1
- package/page/definition.js +1 -1
- package/page/interface.d.ts +15 -0
- package/page/interface.js +7 -0
- package/script/interface.d.ts +18 -0
- package/script/interface.js +7 -0
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { PromiseOr } from "../definition/promise";
|
|
7
7
|
import { ImbricatePageSnapshot } from "../page/definition";
|
|
8
|
+
import { IImbricatePage } from "../page/interface";
|
|
8
9
|
import { IMBRICATE_SEARCH_SNIPPET_TYPE, ImbricateSearchSnippet } from "../search/snippet";
|
|
9
10
|
export type ImbricatePageSearchSnippet = ImbricateSearchSnippet<IMBRICATE_SEARCH_SNIPPET_TYPE.PAGE>;
|
|
10
11
|
export interface IImbricateOriginCollection {
|
|
11
12
|
readonly collectionName: string;
|
|
12
13
|
readonly description?: string;
|
|
13
|
-
findScripts(...onActivities: string[]): PromiseOr<void>;
|
|
14
14
|
listPages(): PromiseOr<ImbricatePageSnapshot[]>;
|
|
15
15
|
createPage(title: string, initialContent?: string): PromiseOr<ImbricatePageSnapshot>;
|
|
16
16
|
deletePage(identifier: string, title: string): PromiseOr<void>;
|
|
17
17
|
hasPage(title: string): PromiseOr<boolean>;
|
|
18
|
-
|
|
19
|
-
writePage(identifier: string, content: string): PromiseOr<void>;
|
|
18
|
+
getPage(identifier: string): PromiseOr<IImbricatePage | null>;
|
|
20
19
|
searchPages(keyword: string): PromiseOr<ImbricatePageSearchSnippet[]>;
|
|
21
20
|
}
|
package/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./definition/listable";
|
|
|
8
8
|
export * from "./definition/promise";
|
|
9
9
|
export * from "./origin/interface";
|
|
10
10
|
export * from "./page/definition";
|
|
11
|
+
export * from "./page/interface";
|
|
11
12
|
export * from "./sandbox/definition/config";
|
|
12
13
|
export * from "./sandbox/definition/environment";
|
|
13
14
|
export * from "./sandbox/definition/implementation";
|
|
@@ -15,5 +16,6 @@ export * from "./sandbox/feature/builder";
|
|
|
15
16
|
export * from "./sandbox/feature/feature";
|
|
16
17
|
export * from "./sandbox/sandbox";
|
|
17
18
|
export * from "./script/definition";
|
|
19
|
+
export * from "./script/interface";
|
|
18
20
|
export * from "./search/prefix";
|
|
19
21
|
export * from "./search/snippet";
|
package/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./definition/listable"), exports);
|
|
|
24
24
|
__exportStar(require("./definition/promise"), exports);
|
|
25
25
|
__exportStar(require("./origin/interface"), exports);
|
|
26
26
|
__exportStar(require("./page/definition"), exports);
|
|
27
|
+
__exportStar(require("./page/interface"), exports);
|
|
27
28
|
__exportStar(require("./sandbox/definition/config"), exports);
|
|
28
29
|
__exportStar(require("./sandbox/definition/environment"), exports);
|
|
29
30
|
__exportStar(require("./sandbox/definition/implementation"), exports);
|
|
@@ -31,5 +32,6 @@ __exportStar(require("./sandbox/feature/builder"), exports);
|
|
|
31
32
|
__exportStar(require("./sandbox/feature/feature"), exports);
|
|
32
33
|
__exportStar(require("./sandbox/sandbox"), exports);
|
|
33
34
|
__exportStar(require("./script/definition"), exports);
|
|
35
|
+
__exportStar(require("./script/interface"), exports);
|
|
34
36
|
__exportStar(require("./search/prefix"), exports);
|
|
35
37
|
__exportStar(require("./search/snippet"), exports);
|
package/origin/interface.d.ts
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
* @namespace Origin
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
|
-
import { MarkedResult } from "@sudoo/marked";
|
|
7
6
|
import { IImbricateOriginCollection } from "../collection/interface";
|
|
8
7
|
import { PromiseOr } from "../definition/promise";
|
|
9
|
-
import { SandboxExecuteConfig } from "../sandbox/definition/config";
|
|
10
8
|
import { ImbricateScriptSnapshot } from "../script/definition";
|
|
9
|
+
import { IImbricateScript } from "../script/interface";
|
|
11
10
|
export type ImbricateOriginMetadata = {
|
|
12
11
|
readonly type: string;
|
|
13
12
|
};
|
|
@@ -22,8 +21,6 @@ export interface IImbricateOrigin {
|
|
|
22
21
|
createScript(scriptName: string, description?: string): PromiseOr<ImbricateScriptSnapshot>;
|
|
23
22
|
deleteScript(identifier: string, scriptName: string): PromiseOr<void>;
|
|
24
23
|
hasScript(scriptName: string): PromiseOr<boolean>;
|
|
25
|
-
|
|
26
|
-
writeScript(identifier: string, content: string): PromiseOr<string>;
|
|
24
|
+
get(identifier: string): PromiseOr<IImbricateScript | null>;
|
|
27
25
|
listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
|
|
28
|
-
executeScript(identifier: string, config: SandboxExecuteConfig): PromiseOr<MarkedResult | null>;
|
|
29
26
|
}
|
package/package.json
CHANGED
package/page/definition.d.ts
CHANGED
package/page/definition.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Page
|
|
4
|
+
* @description Interface
|
|
5
|
+
*/
|
|
6
|
+
import { PromiseOr } from "../definition/promise";
|
|
7
|
+
export interface IImbricatePage {
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly identifier: string;
|
|
10
|
+
readonly createdAt: Date;
|
|
11
|
+
readonly updatedAt: Date;
|
|
12
|
+
readContent(): PromiseOr<string>;
|
|
13
|
+
writeContent(content: string): PromiseOr<void>;
|
|
14
|
+
refreshUpdatedAt(updatedAt: Date): PromiseOr<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Script
|
|
4
|
+
* @description Interface
|
|
5
|
+
*/
|
|
6
|
+
import { MarkedResult } from "@sudoo/marked";
|
|
7
|
+
import { PromiseOr } from "../definition/promise";
|
|
8
|
+
import { SandboxExecuteConfig } from "../sandbox/definition/config";
|
|
9
|
+
export interface IImbricateScript {
|
|
10
|
+
readonly scriptName: string;
|
|
11
|
+
readonly identifier: string;
|
|
12
|
+
readonly createdAt: Date;
|
|
13
|
+
readonly updatedAt: Date;
|
|
14
|
+
readScript(): PromiseOr<string>;
|
|
15
|
+
writeScript(script: string): PromiseOr<void>;
|
|
16
|
+
refreshUpdatedAt(updatedAt: Date): PromiseOr<void>;
|
|
17
|
+
execute(config: SandboxExecuteConfig): PromiseOr<MarkedResult | null>;
|
|
18
|
+
}
|