whet 0.0.2 → 0.0.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/bin/whet/Stone.d.ts +3 -0
- package/bin/whet/Stone.js +6 -0
- package/bin/whet/Whet.js +1 -1
- package/bin/whet.d.ts +1 -0
- package/bin/whet.js +1 -0
- package/package.json +1 -1
package/bin/whet/Stone.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {StoneIdType} from "./magic/StoneId"
|
|
2
|
+
import {CacheManager} from "./cache/CacheManager"
|
|
2
3
|
import {CacheStrategy} from "./cache/Cache"
|
|
3
4
|
import {SourceHash} from "./SourceHash"
|
|
4
5
|
import {Source, SourceData} from "./Source"
|
|
@@ -15,6 +16,7 @@ export declare class Stone<T extends StoneConfig> {
|
|
|
15
16
|
ignoreFileHash: boolean
|
|
16
17
|
id: string
|
|
17
18
|
cacheStrategy: CacheStrategy
|
|
19
|
+
readonly cache: CacheManager
|
|
18
20
|
project: Project
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -70,6 +72,7 @@ export declare class Stone<T extends StoneConfig> {
|
|
|
70
72
|
* If `generate` is true, the source is exported right away.
|
|
71
73
|
*/
|
|
72
74
|
setAbsolutePath(path: string, generate?: boolean): Promise<Source>
|
|
75
|
+
protected get_cache(): CacheManager
|
|
73
76
|
toString(): string
|
|
74
77
|
}
|
|
75
78
|
|
package/bin/whet/Stone.js
CHANGED
|
@@ -32,6 +32,9 @@ class Stone extends Register.inherits() {
|
|
|
32
32
|
var _g1 = this.getCommands();
|
|
33
33
|
while (_g < _g1.length) this.project.addCommand(_g1[_g++], this);
|
|
34
34
|
}
|
|
35
|
+
get cache() {
|
|
36
|
+
return this.get_cache()
|
|
37
|
+
}
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
Override this to set config defaults.
|
|
@@ -143,6 +146,9 @@ class Stone extends Register.inherits() {
|
|
|
143
146
|
return Promise.resolve(null);
|
|
144
147
|
};
|
|
145
148
|
}
|
|
149
|
+
get_cache() {
|
|
150
|
+
return this.project.cache;
|
|
151
|
+
}
|
|
146
152
|
toString() {
|
|
147
153
|
var c = Boot.getClass(this);
|
|
148
154
|
return "" + this.id + ":" + c.__name__;
|
package/bin/whet/Whet.js
CHANGED
|
@@ -10,7 +10,7 @@ const $global = Register.$global
|
|
|
10
10
|
export const Whet_Fields_ = Register.global("$hxClasses")["whet._Whet.Whet_Fields_"] =
|
|
11
11
|
class Whet_Fields_ {
|
|
12
12
|
static main() {
|
|
13
|
-
Whet_Fields_.program.enablePositionalOptions().passThroughOptions().description("Project tooling.").usage("[options] [command] [+ [command]...]").version("0.0.
|
|
13
|
+
Whet_Fields_.program.enablePositionalOptions().passThroughOptions().description("Project tooling.").usage("[options] [command] [+ [command]...]").version("0.0.3", "-v, --version").allowUnknownOption(true).showSuggestionAfterError(true).option("-p, --project <file>", "project to run", "Project.mjs").option("-l, --log-level <level>", "log level, a string/number", "info");
|
|
14
14
|
Whet_Fields_.program.parse();
|
|
15
15
|
var options = Whet_Fields_.program.opts();
|
|
16
16
|
if (options.logLevel != null) {
|
package/bin/whet.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
export {ZipStone} from "./whet/stones/Zip"
|
|
3
3
|
export {ZipConfig} from "./whet/stones/Zip"
|
|
4
|
+
export {Stone} from "./whet/Stone"
|
|
4
5
|
export {ServerConfig} from "./whet/stones/Server"
|
|
5
6
|
export {Server} from "./whet/stones/Server"
|
|
6
7
|
export {Router} from "./whet/route/Router"
|
package/bin/whet.js
CHANGED
|
@@ -6,6 +6,7 @@ const $global = Register.$global
|
|
|
6
6
|
|
|
7
7
|
Whet_Fields_.main()
|
|
8
8
|
export {ZipStone} from "./whet/stones/Zip.js"
|
|
9
|
+
export {Stone} from "./whet/Stone.js"
|
|
9
10
|
export {Server} from "./whet/stones/Server.js"
|
|
10
11
|
export {Router} from "./whet/route/Router.js"
|
|
11
12
|
export {RemoteFile} from "./whet/stones/RemoteFile.js"
|