@imbricate/core 1.0.1 → 1.1.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 +22 -0
- package/index.d.ts +7 -3
- package/index.js +7 -3
- package/origin/interface.d.ts +8 -8
- package/package.json +1 -1
- package/page/definition.d.ts +9 -0
- package/page/definition.js +7 -0
- package/{definition/script.d.ts → script/definition.d.ts} +3 -3
- package/{definition/script.js → script/definition.js} +2 -2
- package/origin/collection/interface.d.ts +0 -22
- /package/{origin/collection → collection}/interface.js +0 -0
- /package/{origin/collection → collection}/least-common-identifier.d.ts +0 -0
- /package/{origin/collection → collection}/least-common-identifier.js +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Origin_Collection
|
|
4
|
+
* @description Interface
|
|
5
|
+
*/
|
|
6
|
+
import { PromiseOr } from "../definition/promise";
|
|
7
|
+
import { ImbricatePageSnapshot } from "../page/definition";
|
|
8
|
+
import { IMBRICATE_SEARCH_SNIPPET_TYPE, ImbricateSearchSnippet } from "../search/snippet";
|
|
9
|
+
type PageSnippet = ImbricateSearchSnippet<IMBRICATE_SEARCH_SNIPPET_TYPE.PAGE>;
|
|
10
|
+
export interface IImbricateOriginCollection {
|
|
11
|
+
readonly collectionName: string;
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
findScripts(...onActivities: string[]): PromiseOr<void>;
|
|
14
|
+
listPages(): PromiseOr<ImbricatePageSnapshot[]>;
|
|
15
|
+
createPage(title: string, initialContent?: string): PromiseOr<ImbricatePageSnapshot>;
|
|
16
|
+
deletePage(identifier: string, title: string): PromiseOr<void>;
|
|
17
|
+
hasPage(title: string): PromiseOr<boolean>;
|
|
18
|
+
readPage(identifier: string): PromiseOr<string | null>;
|
|
19
|
+
writePage(identifier: string, content: string): PromiseOr<void>;
|
|
20
|
+
searchPages(keyword: string): PromiseOr<PageSnippet>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* @author WMXPY
|
|
3
3
|
* @description Index
|
|
4
4
|
*/
|
|
5
|
+
export * from "./collection/interface";
|
|
6
|
+
export * from "./collection/least-common-identifier";
|
|
5
7
|
export * from "./definition/listable";
|
|
6
8
|
export * from "./definition/promise";
|
|
7
|
-
export * from "./definition/script";
|
|
8
|
-
export * from "./origin/collection/interface";
|
|
9
|
-
export * from "./origin/collection/least-common-identifier";
|
|
10
9
|
export * from "./origin/interface";
|
|
10
|
+
export * from "./page/definition";
|
|
11
|
+
export * from "./sandbox/definition/config";
|
|
12
|
+
export * from "./sandbox/definition/environment";
|
|
13
|
+
export * from "./sandbox/definition/implementation";
|
|
11
14
|
export * from "./sandbox/feature/builder";
|
|
12
15
|
export * from "./sandbox/feature/feature";
|
|
13
16
|
export * from "./sandbox/sandbox";
|
|
17
|
+
export * from "./script/definition";
|
|
14
18
|
export * from "./search/prefix";
|
|
15
19
|
export * from "./search/snippet";
|
package/index.js
CHANGED
|
@@ -18,14 +18,18 @@ 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("./collection/interface"), exports);
|
|
22
|
+
__exportStar(require("./collection/least-common-identifier"), exports);
|
|
21
23
|
__exportStar(require("./definition/listable"), exports);
|
|
22
24
|
__exportStar(require("./definition/promise"), exports);
|
|
23
|
-
__exportStar(require("./definition/script"), exports);
|
|
24
|
-
__exportStar(require("./origin/collection/interface"), exports);
|
|
25
|
-
__exportStar(require("./origin/collection/least-common-identifier"), exports);
|
|
26
25
|
__exportStar(require("./origin/interface"), exports);
|
|
26
|
+
__exportStar(require("./page/definition"), exports);
|
|
27
|
+
__exportStar(require("./sandbox/definition/config"), exports);
|
|
28
|
+
__exportStar(require("./sandbox/definition/environment"), exports);
|
|
29
|
+
__exportStar(require("./sandbox/definition/implementation"), exports);
|
|
27
30
|
__exportStar(require("./sandbox/feature/builder"), exports);
|
|
28
31
|
__exportStar(require("./sandbox/feature/feature"), exports);
|
|
29
32
|
__exportStar(require("./sandbox/sandbox"), exports);
|
|
33
|
+
__exportStar(require("./script/definition"), exports);
|
|
30
34
|
__exportStar(require("./search/prefix"), exports);
|
|
31
35
|
__exportStar(require("./search/snippet"), exports);
|
package/origin/interface.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
6
|
import { MarkedResult } from "@sudoo/marked";
|
|
7
|
+
import { IImbricateOriginCollection } from "../collection/interface";
|
|
7
8
|
import { PromiseOr } from "../definition/promise";
|
|
8
|
-
import { ImbricateScriptMetadata } from "../definition/script";
|
|
9
9
|
import { SandboxExecuteConfig } from "../sandbox/definition/config";
|
|
10
|
-
import {
|
|
10
|
+
import { ImbricateScriptSnapshot } from "../script/definition";
|
|
11
11
|
export type ImbricateOriginMetadata = {
|
|
12
12
|
readonly type: string;
|
|
13
13
|
};
|
|
@@ -19,11 +19,11 @@ export interface IImbricateOrigin {
|
|
|
19
19
|
getCollection(collectionName: string): PromiseOr<IImbricateOriginCollection | null>;
|
|
20
20
|
listCollections(): PromiseOr<IImbricateOriginCollection[]>;
|
|
21
21
|
removeCollection(): PromiseOr<void>;
|
|
22
|
-
createScript(scriptName: string, description?: string): PromiseOr<
|
|
22
|
+
createScript(scriptName: string, description?: string): PromiseOr<ImbricateScriptSnapshot>;
|
|
23
|
+
deleteScript(identifier: string, scriptName: string): PromiseOr<void>;
|
|
23
24
|
hasScript(scriptName: string): PromiseOr<boolean>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
listScripts(): PromiseOr<
|
|
27
|
-
|
|
28
|
-
executeScript(scriptIdentifier: string, config: SandboxExecuteConfig): PromiseOr<MarkedResult | null>;
|
|
25
|
+
readScript(identifier: string): PromiseOr<string | null>;
|
|
26
|
+
writeScript(identifier: string, content: string): PromiseOr<string>;
|
|
27
|
+
listScripts(): PromiseOr<ImbricateScriptSnapshot[]>;
|
|
28
|
+
executeScript(identifier: string, config: SandboxExecuteConfig): PromiseOr<MarkedResult | null>;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author WMXPY
|
|
3
|
-
* @namespace
|
|
4
|
-
* @description
|
|
3
|
+
* @namespace Script
|
|
4
|
+
* @description Definition
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type ImbricateScriptSnapshot = {
|
|
7
7
|
readonly scriptName: string;
|
|
8
8
|
readonly identifier: string;
|
|
9
9
|
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author WMXPY
|
|
3
|
-
* @namespace Origin_Collection
|
|
4
|
-
* @description Interface
|
|
5
|
-
*/
|
|
6
|
-
import { IMBRICATE_SEARCH_SNIPPET_TYPE, ImbricateSearchSnippet } from "../../search/snippet";
|
|
7
|
-
export type ImbricateOriginCollectionListPagesResponse = {
|
|
8
|
-
readonly title: string;
|
|
9
|
-
readonly identifier: string;
|
|
10
|
-
};
|
|
11
|
-
export interface IImbricateOriginCollection {
|
|
12
|
-
readonly collectionName: string;
|
|
13
|
-
readonly description?: string;
|
|
14
|
-
findScripts(...onActivities: string[]): Promise<void>;
|
|
15
|
-
listPages(): Promise<ImbricateOriginCollectionListPagesResponse[]>;
|
|
16
|
-
createPage(title: string, initialContent?: string): Promise<ImbricateOriginCollectionListPagesResponse>;
|
|
17
|
-
deletePage(identifier: string, title: string): Promise<void>;
|
|
18
|
-
openPage(title: string): Promise<void>;
|
|
19
|
-
readPage(identifier: string): Promise<string>;
|
|
20
|
-
hasPage(title: string): Promise<boolean>;
|
|
21
|
-
searchPages(keyword: string): Promise<Array<ImbricateSearchSnippet<IMBRICATE_SEARCH_SNIPPET_TYPE.PAGE>>>;
|
|
22
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|