@hpcc-js/observablehq-compiler 1.1.1 → 1.1.3
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/LICENSE +43 -0
- package/README.md +105 -105
- package/bin/ojscc.mjs +74 -74
- package/dist/index.esm.js +586 -562
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +2 -2
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.js +6716 -6688
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/package.json +5 -4
- package/src/__package__.ts +3 -3
- package/src/__tests__/File Attachments.ts +894 -894
- package/src/__tests__/Introduction to Imports.ts +748 -748
- package/src/__tests__/Observable TimeChart.ts +771 -771
- package/src/__tests__/index.ts +13 -13
- package/src/__tests__/node.ts +177 -177
- package/src/compiler.md +234 -234
- package/src/compiler.ts +279 -264
- package/src/cst.ts +172 -172
- package/src/index.css +459 -459
- package/src/index.ts +6 -7
- package/src/util.md +113 -113
- package/src/util.ts +163 -153
- package/src/writer.ts +80 -80
- package/types/__package__.d.ts +3 -3
- package/types/__tests__/File Attachments.d.ts +109 -109
- package/types/__tests__/Introduction to Imports.d.ts +119 -119
- package/types/__tests__/Observable TimeChart.d.ts +110 -110
- package/types/__tests__/index.d.ts +1 -1
- package/types/__tests__/node.d.ts +1 -1
- package/types/compiler.d.ts +90 -87
- package/types/compiler.d.ts.map +1 -1
- package/types/cst.d.ts +41 -41
- package/types/index.d.ts +4 -5
- package/types/index.d.ts.map +1 -1
- package/types/util.d.ts +28 -25
- package/types/util.d.ts.map +1 -1
- package/types/writer.d.ts +18 -18
- package/types-3.4/__package__.d.ts +4 -0
- package/types-3.4/__tests__/File Attachments.d.ts +110 -0
- package/types-3.4/__tests__/Introduction to Imports.d.ts +120 -0
- package/types-3.4/__tests__/Observable TimeChart.d.ts +111 -0
- package/types-3.4/__tests__/index.d.ts +2 -0
- package/types-3.4/__tests__/node.d.ts +2 -0
- package/types-3.4/compiler.d.ts +94 -0
- package/types-3.4/cst.d.ts +42 -0
- package/types-3.4/index.d.ts +5 -0
- package/types-3.4/util.d.ts +29 -0
- package/types-3.4/writer.d.ts +19 -0
- package/src/__tests__/tsconfig.json +0 -21
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
export declare const timechart: {
|
|
2
|
-
id: string;
|
|
3
|
-
slug: string;
|
|
4
|
-
trashed: boolean;
|
|
5
|
-
description: string;
|
|
6
|
-
likes: number;
|
|
7
|
-
publish_level: string;
|
|
8
|
-
forks: number;
|
|
9
|
-
fork_of: any;
|
|
10
|
-
update_time: string;
|
|
11
|
-
publish_time: string;
|
|
12
|
-
publish_version: number;
|
|
13
|
-
latest_version: number;
|
|
14
|
-
thumbnail: string;
|
|
15
|
-
default_thumbnail: string;
|
|
16
|
-
roles: any[];
|
|
17
|
-
sharing: any;
|
|
18
|
-
owner: {
|
|
19
|
-
id: string;
|
|
20
|
-
avatar_url: string;
|
|
21
|
-
login: string;
|
|
22
|
-
name: string;
|
|
23
|
-
bio: string;
|
|
24
|
-
home_url: string;
|
|
25
|
-
type: string;
|
|
26
|
-
tier: string;
|
|
27
|
-
};
|
|
28
|
-
creator: {
|
|
29
|
-
id: string;
|
|
30
|
-
github_login: string;
|
|
31
|
-
avatar_url: string;
|
|
32
|
-
login: string;
|
|
33
|
-
name: string;
|
|
34
|
-
bio: string;
|
|
35
|
-
home_url: string;
|
|
36
|
-
tier: string;
|
|
37
|
-
};
|
|
38
|
-
authors: {
|
|
39
|
-
id: string;
|
|
40
|
-
avatar_url: string;
|
|
41
|
-
name: string;
|
|
42
|
-
login: string;
|
|
43
|
-
bio: string;
|
|
44
|
-
home_url: string;
|
|
45
|
-
github_login: string;
|
|
46
|
-
tier: string;
|
|
47
|
-
approved: boolean;
|
|
48
|
-
description: string;
|
|
49
|
-
}[];
|
|
50
|
-
collections: {
|
|
51
|
-
id: string;
|
|
52
|
-
type: string;
|
|
53
|
-
slug: string;
|
|
54
|
-
title: string;
|
|
55
|
-
description: string;
|
|
56
|
-
update_time: string;
|
|
57
|
-
pinned: boolean;
|
|
58
|
-
ordered: boolean;
|
|
59
|
-
custom_thumbnail: string;
|
|
60
|
-
default_thumbnail: string;
|
|
61
|
-
thumbnail: string;
|
|
62
|
-
listing_count: number;
|
|
63
|
-
parent_collection_count: number;
|
|
64
|
-
owner: {
|
|
65
|
-
id: string;
|
|
66
|
-
avatar_url: string;
|
|
67
|
-
login: string;
|
|
68
|
-
name: string;
|
|
69
|
-
bio: string;
|
|
70
|
-
home_url: string;
|
|
71
|
-
type: string;
|
|
72
|
-
tier: string;
|
|
73
|
-
};
|
|
74
|
-
}[];
|
|
75
|
-
files: any[];
|
|
76
|
-
comments: {
|
|
77
|
-
id: string;
|
|
78
|
-
content: string;
|
|
79
|
-
node_id: number;
|
|
80
|
-
create_time: string;
|
|
81
|
-
update_time: any;
|
|
82
|
-
resolved: boolean;
|
|
83
|
-
user: {
|
|
84
|
-
id: string;
|
|
85
|
-
github_login: string;
|
|
86
|
-
avatar_url: string;
|
|
87
|
-
login: string;
|
|
88
|
-
name: string;
|
|
89
|
-
bio: string;
|
|
90
|
-
home_url: string;
|
|
91
|
-
tier: string;
|
|
92
|
-
};
|
|
93
|
-
}[];
|
|
94
|
-
commenting_lock: any;
|
|
95
|
-
suggestion_from: any;
|
|
96
|
-
suggestions_to: any[];
|
|
97
|
-
version: number;
|
|
98
|
-
title: string;
|
|
99
|
-
license: string;
|
|
100
|
-
copyright: string;
|
|
101
|
-
nodes: {
|
|
102
|
-
id: number;
|
|
103
|
-
value: string;
|
|
104
|
-
pinned: boolean;
|
|
105
|
-
mode: string;
|
|
106
|
-
data: any;
|
|
107
|
-
name: any;
|
|
108
|
-
}[];
|
|
109
|
-
resolutions: any[];
|
|
110
|
-
};
|
|
1
|
+
export declare const timechart: {
|
|
2
|
+
id: string;
|
|
3
|
+
slug: string;
|
|
4
|
+
trashed: boolean;
|
|
5
|
+
description: string;
|
|
6
|
+
likes: number;
|
|
7
|
+
publish_level: string;
|
|
8
|
+
forks: number;
|
|
9
|
+
fork_of: any;
|
|
10
|
+
update_time: string;
|
|
11
|
+
publish_time: string;
|
|
12
|
+
publish_version: number;
|
|
13
|
+
latest_version: number;
|
|
14
|
+
thumbnail: string;
|
|
15
|
+
default_thumbnail: string;
|
|
16
|
+
roles: any[];
|
|
17
|
+
sharing: any;
|
|
18
|
+
owner: {
|
|
19
|
+
id: string;
|
|
20
|
+
avatar_url: string;
|
|
21
|
+
login: string;
|
|
22
|
+
name: string;
|
|
23
|
+
bio: string;
|
|
24
|
+
home_url: string;
|
|
25
|
+
type: string;
|
|
26
|
+
tier: string;
|
|
27
|
+
};
|
|
28
|
+
creator: {
|
|
29
|
+
id: string;
|
|
30
|
+
github_login: string;
|
|
31
|
+
avatar_url: string;
|
|
32
|
+
login: string;
|
|
33
|
+
name: string;
|
|
34
|
+
bio: string;
|
|
35
|
+
home_url: string;
|
|
36
|
+
tier: string;
|
|
37
|
+
};
|
|
38
|
+
authors: {
|
|
39
|
+
id: string;
|
|
40
|
+
avatar_url: string;
|
|
41
|
+
name: string;
|
|
42
|
+
login: string;
|
|
43
|
+
bio: string;
|
|
44
|
+
home_url: string;
|
|
45
|
+
github_login: string;
|
|
46
|
+
tier: string;
|
|
47
|
+
approved: boolean;
|
|
48
|
+
description: string;
|
|
49
|
+
}[];
|
|
50
|
+
collections: {
|
|
51
|
+
id: string;
|
|
52
|
+
type: string;
|
|
53
|
+
slug: string;
|
|
54
|
+
title: string;
|
|
55
|
+
description: string;
|
|
56
|
+
update_time: string;
|
|
57
|
+
pinned: boolean;
|
|
58
|
+
ordered: boolean;
|
|
59
|
+
custom_thumbnail: string;
|
|
60
|
+
default_thumbnail: string;
|
|
61
|
+
thumbnail: string;
|
|
62
|
+
listing_count: number;
|
|
63
|
+
parent_collection_count: number;
|
|
64
|
+
owner: {
|
|
65
|
+
id: string;
|
|
66
|
+
avatar_url: string;
|
|
67
|
+
login: string;
|
|
68
|
+
name: string;
|
|
69
|
+
bio: string;
|
|
70
|
+
home_url: string;
|
|
71
|
+
type: string;
|
|
72
|
+
tier: string;
|
|
73
|
+
};
|
|
74
|
+
}[];
|
|
75
|
+
files: any[];
|
|
76
|
+
comments: {
|
|
77
|
+
id: string;
|
|
78
|
+
content: string;
|
|
79
|
+
node_id: number;
|
|
80
|
+
create_time: string;
|
|
81
|
+
update_time: any;
|
|
82
|
+
resolved: boolean;
|
|
83
|
+
user: {
|
|
84
|
+
id: string;
|
|
85
|
+
github_login: string;
|
|
86
|
+
avatar_url: string;
|
|
87
|
+
login: string;
|
|
88
|
+
name: string;
|
|
89
|
+
bio: string;
|
|
90
|
+
home_url: string;
|
|
91
|
+
tier: string;
|
|
92
|
+
};
|
|
93
|
+
}[];
|
|
94
|
+
commenting_lock: any;
|
|
95
|
+
suggestion_from: any;
|
|
96
|
+
suggestions_to: any[];
|
|
97
|
+
version: number;
|
|
98
|
+
title: string;
|
|
99
|
+
license: string;
|
|
100
|
+
copyright: string;
|
|
101
|
+
nodes: {
|
|
102
|
+
id: number;
|
|
103
|
+
value: string;
|
|
104
|
+
pinned: boolean;
|
|
105
|
+
mode: string;
|
|
106
|
+
data: any;
|
|
107
|
+
name: any;
|
|
108
|
+
}[];
|
|
109
|
+
resolutions: any[];
|
|
110
|
+
};
|
|
111
111
|
//# sourceMappingURL=Observable%20TimeChart.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./node";
|
|
1
|
+
export * from "./node";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=node.d.ts.map
|
package/types/compiler.d.ts
CHANGED
|
@@ -1,88 +1,91 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Writer } from "./writer";
|
|
3
|
-
declare function createCell(node: ohq.Node, baseUrl: string): Promise<{
|
|
4
|
-
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): void;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
declare
|
|
29
|
-
|
|
30
|
-
export declare
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
import { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
+
import { Writer } from "./writer";
|
|
3
|
+
declare function createCell(node: ohq.Node, baseUrl: string): Promise<{
|
|
4
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): void;
|
|
5
|
+
id: string;
|
|
6
|
+
modules: {
|
|
7
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Module;
|
|
8
|
+
importVariables: {
|
|
9
|
+
(main: ohq.Module, otherModule: ohq.Module): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}[];
|
|
12
|
+
variables: {
|
|
13
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
write(w: Writer): void;
|
|
16
|
+
}[];
|
|
17
|
+
dispose(): void;
|
|
18
|
+
write(w: Writer): void;
|
|
19
|
+
}[];
|
|
20
|
+
variables: {
|
|
21
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
22
|
+
dispose(): void;
|
|
23
|
+
write(w: Writer): void;
|
|
24
|
+
}[];
|
|
25
|
+
dispose(): void;
|
|
26
|
+
write(w: Writer): void;
|
|
27
|
+
}>;
|
|
28
|
+
export declare type CellFunc = Awaited<ReturnType<typeof createCell>>;
|
|
29
|
+
declare function createFile(file: ohq.File, baseUrl: string): [string, any];
|
|
30
|
+
export declare type FileFunc = ReturnType<typeof createFile>;
|
|
31
|
+
export declare function compile(notebook: ohq.Notebook, baseUrl?: string): Promise<{
|
|
32
|
+
(runtime: ohq.Runtime, inspector?: ohq.InspectorFactory): ohq.Module;
|
|
33
|
+
fileAttachments: Map<string, any>;
|
|
34
|
+
cells: Map<string, {
|
|
35
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): void;
|
|
36
|
+
id: string;
|
|
37
|
+
modules: {
|
|
38
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Module;
|
|
39
|
+
importVariables: {
|
|
40
|
+
(main: ohq.Module, otherModule: ohq.Module): void;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
}[];
|
|
43
|
+
variables: {
|
|
44
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
45
|
+
dispose(): void;
|
|
46
|
+
write(w: Writer): void;
|
|
47
|
+
}[];
|
|
48
|
+
dispose(): void;
|
|
49
|
+
write(w: Writer): void;
|
|
50
|
+
}[];
|
|
51
|
+
variables: {
|
|
52
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
write(w: Writer): void;
|
|
55
|
+
}[];
|
|
56
|
+
dispose(): void;
|
|
57
|
+
write(w: Writer): void;
|
|
58
|
+
}>;
|
|
59
|
+
appendCell(n: ohq.Node, baseUrl: any): Promise<{
|
|
60
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): void;
|
|
61
|
+
id: string;
|
|
62
|
+
modules: {
|
|
63
|
+
(runtime: ohq.Runtime, main: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Module;
|
|
64
|
+
importVariables: {
|
|
65
|
+
(main: ohq.Module, otherModule: ohq.Module): void;
|
|
66
|
+
dispose(): void;
|
|
67
|
+
}[];
|
|
68
|
+
variables: {
|
|
69
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
70
|
+
dispose(): void;
|
|
71
|
+
write(w: Writer): void;
|
|
72
|
+
}[];
|
|
73
|
+
dispose(): void;
|
|
74
|
+
write(w: Writer): void;
|
|
75
|
+
}[];
|
|
76
|
+
variables: {
|
|
77
|
+
(module: ohq.Module, inspector?: ohq.InspectorFactory): ohq.Variable;
|
|
78
|
+
dispose(): void;
|
|
79
|
+
write(w: Writer): void;
|
|
80
|
+
}[];
|
|
81
|
+
dispose(): void;
|
|
82
|
+
write(w: Writer): void;
|
|
83
|
+
}>;
|
|
84
|
+
disposeCell(id: string): Promise<void>;
|
|
85
|
+
dispose(): void;
|
|
86
|
+
write(w: Writer): void;
|
|
87
|
+
toString(w?: Writer): string;
|
|
88
|
+
}>;
|
|
89
|
+
export declare type compileFunc = Awaited<ReturnType<typeof compile>>;
|
|
90
|
+
export {};
|
|
88
91
|
//# sourceMappingURL=compiler.d.ts.map
|
package/types/compiler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA2KlC,iBAAe,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM;cA8B5B,IAAI,OAAO,QAAQ,IAAI,MAAM,cAAc,IAAI,gBAAgB;;;;;;;;;;;;;;;;;;;;;;aAWrE,MAAM;GAK5B;AACD,oBAAY,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;AAE9D,iBAAS,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAGlE;AACD,oBAAY,QAAQ,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAErD,wBAAsB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAE,MAAY;cAO9C,IAAI,OAAO,cAAc,IAAI,gBAAgB,GAAG,IAAI,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAcrD,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;oBAMN,MAAM;;aAWnB,MAAM;;GAS5B;AACD,oBAAY,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC"}
|
package/types/cst.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export interface ParsedCell {
|
|
2
|
-
type: "import" | "viewof" | "mutable" | "variable" | "identifier";
|
|
3
|
-
}
|
|
4
|
-
export interface ParsedImportCell extends ParsedCell {
|
|
5
|
-
type: "import";
|
|
6
|
-
src: string;
|
|
7
|
-
specifiers: {
|
|
8
|
-
view: boolean;
|
|
9
|
-
name: string;
|
|
10
|
-
alias?: string;
|
|
11
|
-
}[];
|
|
12
|
-
injections: {
|
|
13
|
-
name: string;
|
|
14
|
-
alias: string;
|
|
15
|
-
}[];
|
|
16
|
-
}
|
|
17
|
-
export interface ParsedVariable extends ParsedCell {
|
|
18
|
-
type: "variable";
|
|
19
|
-
id?: string;
|
|
20
|
-
inputs: string[];
|
|
21
|
-
func: any;
|
|
22
|
-
}
|
|
23
|
-
export interface ParsedViewCell extends ParsedCell {
|
|
24
|
-
type: "viewof";
|
|
25
|
-
variable: ParsedVariable;
|
|
26
|
-
variableValue: ParsedVariable;
|
|
27
|
-
}
|
|
28
|
-
interface ParsedMutableCell extends ParsedCell {
|
|
29
|
-
type: "mutable";
|
|
30
|
-
initial: ParsedVariable;
|
|
31
|
-
variable: ParsedVariable;
|
|
32
|
-
variableValue: ParsedVariable;
|
|
33
|
-
}
|
|
34
|
-
interface ParsedVariableCell extends ParsedCell {
|
|
35
|
-
type: "variable";
|
|
36
|
-
id: string;
|
|
37
|
-
inputs: string[];
|
|
38
|
-
func: any;
|
|
39
|
-
}
|
|
40
|
-
export declare function parseCell(cellStr: string): ParsedImportCell | ParsedViewCell | ParsedMutableCell | ParsedVariableCell;
|
|
41
|
-
export {};
|
|
1
|
+
export interface ParsedCell {
|
|
2
|
+
type: "import" | "viewof" | "mutable" | "variable" | "identifier";
|
|
3
|
+
}
|
|
4
|
+
export interface ParsedImportCell extends ParsedCell {
|
|
5
|
+
type: "import";
|
|
6
|
+
src: string;
|
|
7
|
+
specifiers: {
|
|
8
|
+
view: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
alias?: string;
|
|
11
|
+
}[];
|
|
12
|
+
injections: {
|
|
13
|
+
name: string;
|
|
14
|
+
alias: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export interface ParsedVariable extends ParsedCell {
|
|
18
|
+
type: "variable";
|
|
19
|
+
id?: string;
|
|
20
|
+
inputs: string[];
|
|
21
|
+
func: any;
|
|
22
|
+
}
|
|
23
|
+
export interface ParsedViewCell extends ParsedCell {
|
|
24
|
+
type: "viewof";
|
|
25
|
+
variable: ParsedVariable;
|
|
26
|
+
variableValue: ParsedVariable;
|
|
27
|
+
}
|
|
28
|
+
interface ParsedMutableCell extends ParsedCell {
|
|
29
|
+
type: "mutable";
|
|
30
|
+
initial: ParsedVariable;
|
|
31
|
+
variable: ParsedVariable;
|
|
32
|
+
variableValue: ParsedVariable;
|
|
33
|
+
}
|
|
34
|
+
interface ParsedVariableCell extends ParsedCell {
|
|
35
|
+
type: "variable";
|
|
36
|
+
id: string;
|
|
37
|
+
inputs: string[];
|
|
38
|
+
func: any;
|
|
39
|
+
}
|
|
40
|
+
export declare function parseCell(cellStr: string): ParsedImportCell | ParsedViewCell | ParsedMutableCell | ParsedVariableCell;
|
|
41
|
+
export {};
|
|
42
42
|
//# sourceMappingURL=cst.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export type { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
-
export * from "./compiler";
|
|
3
|
-
export { ojs2notebook, omd2notebook, download } from "./util";
|
|
4
|
-
|
|
5
|
-
import "../src/index.css";
|
|
1
|
+
export type { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
+
export * from "./compiler";
|
|
3
|
+
export { ojs2notebook, omd2notebook, parseOmd, download } from "./util";
|
|
4
|
+
import "../src/index.css";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAEpD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAEpD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExE,OAAO,kBAAkB,CAAC"}
|
package/types/util.d.ts
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import type { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
-
interface Ref {
|
|
3
|
-
start: number;
|
|
4
|
-
end: number;
|
|
5
|
-
newText: string;
|
|
6
|
-
}
|
|
7
|
-
export interface Refs {
|
|
8
|
-
inputs: string[];
|
|
9
|
-
args: string[];
|
|
10
|
-
patches: Ref[];
|
|
11
|
-
}
|
|
12
|
-
export declare function createFunction(refs: Refs, async?: boolean, generator?: boolean, blockStatement?: boolean, body?: string): any;
|
|
13
|
-
export declare function obfuscatedImport(url: string): Promise<any>;
|
|
14
|
-
interface ParsedOJS {
|
|
15
|
-
ojs: string;
|
|
16
|
-
offset: number;
|
|
17
|
-
inlineMD: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export
|
|
1
|
+
import type { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
+
interface Ref {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
newText: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Refs {
|
|
8
|
+
inputs: string[];
|
|
9
|
+
args: string[];
|
|
10
|
+
patches: Ref[];
|
|
11
|
+
}
|
|
12
|
+
export declare function createFunction(refs: Refs, async?: boolean, generator?: boolean, blockStatement?: boolean, body?: string): any;
|
|
13
|
+
export declare function obfuscatedImport(url: string): Promise<any>;
|
|
14
|
+
interface ParsedOJS {
|
|
15
|
+
ojs: string;
|
|
16
|
+
offset: number;
|
|
17
|
+
inlineMD: boolean;
|
|
18
|
+
cell: any;
|
|
19
|
+
error: any;
|
|
20
|
+
}
|
|
21
|
+
export declare function encodeBacktick(str: string): string;
|
|
22
|
+
export declare function parseOmd(_: string): ParsedOJS[];
|
|
23
|
+
export declare function notebook2ojs(_: string): ParsedOJS[];
|
|
24
|
+
export declare function ojs2notebook(ojs: string): ohq.Notebook;
|
|
25
|
+
export declare function omd2notebook(omd: string): ohq.Notebook;
|
|
26
|
+
export declare function fetchEx(url: string, proxyPrefix?: string, proxyPostfix?: string): Promise<Response>;
|
|
27
|
+
export declare function download(impUrl: string): Promise<ohq.Notebook>;
|
|
28
|
+
export {};
|
|
26
29
|
//# sourceMappingURL=util.d.ts.map
|
package/types/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAiBpD,UAAU,GAAG;IACT,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,IAAI;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,UAAQ,EAAE,SAAS,UAAQ,EAAE,cAAc,UAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,OAYjH;AAGD,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,gBAEjD;AAED,UAAU,SAAS;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAiBpD,UAAU,GAAG;IACT,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,IAAI;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,UAAQ,EAAE,SAAS,UAAQ,EAAE,cAAc,UAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,OAYjH;AAGD,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,gBAEjD;AAED,UAAU,SAAS;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,GAAG,CAAC;CACd;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,UAIzC;AAmBD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CA2B/C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAGnD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,QAAQ,CAYtD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,QAAQ,CAYtD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,SAAuC,EAAE,YAAY,SAAK,qBAezG;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAK9D"}
|
package/types/writer.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
-
import { ParsedImportCell, ParsedVariable } from "./cst";
|
|
3
|
-
export declare class Writer {
|
|
4
|
-
protected _files: ohq.File[];
|
|
5
|
-
protected _imports: string[];
|
|
6
|
-
protected _functions: string[];
|
|
7
|
-
protected _defines: string[];
|
|
8
|
-
protected _defineUid: number;
|
|
9
|
-
protected _functionUid: number;
|
|
10
|
-
constructor();
|
|
11
|
-
toString(): string;
|
|
12
|
-
files(files: ohq.File[]): void;
|
|
13
|
-
import(url: string): void;
|
|
14
|
-
importDefine(imp: Partial<ParsedImportCell>): void;
|
|
15
|
-
function(variable: Partial<ParsedVariable>): string;
|
|
16
|
-
define(variable: Partial<ParsedVariable>, observable?: boolean, inlineFunc?: boolean, funcId?: string): void;
|
|
17
|
-
error(msg: string): void;
|
|
18
|
-
}
|
|
1
|
+
import { ohq } from "@hpcc-js/observable-shim";
|
|
2
|
+
import { ParsedImportCell, ParsedVariable } from "./cst";
|
|
3
|
+
export declare class Writer {
|
|
4
|
+
protected _files: ohq.File[];
|
|
5
|
+
protected _imports: string[];
|
|
6
|
+
protected _functions: string[];
|
|
7
|
+
protected _defines: string[];
|
|
8
|
+
protected _defineUid: number;
|
|
9
|
+
protected _functionUid: number;
|
|
10
|
+
constructor();
|
|
11
|
+
toString(): string;
|
|
12
|
+
files(files: ohq.File[]): void;
|
|
13
|
+
import(url: string): void;
|
|
14
|
+
importDefine(imp: Partial<ParsedImportCell>): void;
|
|
15
|
+
function(variable: Partial<ParsedVariable>): string;
|
|
16
|
+
define(variable: Partial<ParsedVariable>, observable?: boolean, inlineFunc?: boolean, funcId?: string): void;
|
|
17
|
+
error(msg: string): void;
|
|
18
|
+
}
|
|
19
19
|
//# sourceMappingURL=writer.d.ts.map
|