whet 0.0.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/LICENSE +21 -0
- package/README.md +47 -0
- package/bin/HxOverrides.d.ts +8 -0
- package/bin/HxOverrides.js +54 -0
- package/bin/Lambda.d.ts +86 -0
- package/bin/Lambda.js +141 -0
- package/bin/Map.d.ts +5 -0
- package/bin/Reflect.d.ts +19 -0
- package/bin/Reflect.js +41 -0
- package/bin/Std.d.ts +49 -0
- package/bin/Std.js +96 -0
- package/bin/StdTypes.d.ts +57 -0
- package/bin/StringTools.d.ts +23 -0
- package/bin/StringTools.js +36 -0
- package/bin/commander/AddHelpTextContext.d.ts +6 -0
- package/bin/commander/AddHelpTextPosition.d.ts +2 -0
- package/bin/commander/CommandOptions.d.ts +6 -0
- package/bin/commander/ErrorOptions.d.ts +11 -0
- package/bin/commander/ExecutableCommandOptions.d.ts +7 -0
- package/bin/commander/HelpContext.d.ts +4 -0
- package/bin/commander/HookEvent.d.ts +2 -0
- package/bin/commander/OptionValueSource.d.ts +2 -0
- package/bin/commander/OutputConfiguration.d.ts +8 -0
- package/bin/commander/ParseOptions.d.ts +4 -0
- package/bin/commander/ParseOptionsResult.d.ts +5 -0
- package/bin/genes/Register.d.ts +15 -0
- package/bin/genes/Register.js +107 -0
- package/bin/genes/util/EsMap.d.ts +12 -0
- package/bin/genes/util/EsMap.js +51 -0
- package/bin/haxe/Constraints.d.ts +8 -0
- package/bin/haxe/Constraints.js +5 -0
- package/bin/haxe/Exception.d.ts +66 -0
- package/bin/haxe/Exception.js +88 -0
- package/bin/haxe/NativeStackTrace.d.ts +7 -0
- package/bin/haxe/PosInfos.d.ts +19 -0
- package/bin/haxe/Rest.d.ts +2 -0
- package/bin/haxe/ValueException.d.ts +24 -0
- package/bin/haxe/ValueException.js +36 -0
- package/bin/haxe/crypto/Crc32.d.ts +12 -0
- package/bin/haxe/crypto/Crc32.js +40 -0
- package/bin/haxe/ds/List.d.ts +31 -0
- package/bin/haxe/ds/List.js +55 -0
- package/bin/haxe/ds/ObjectMap.d.ts +7 -0
- package/bin/haxe/ds/ObjectMap.js +25 -0
- package/bin/haxe/ds/StringMap.d.ts +6 -0
- package/bin/haxe/ds/StringMap.js +25 -0
- package/bin/haxe/exceptions/NotImplementedException.d.ts +10 -0
- package/bin/haxe/exceptions/NotImplementedException.js +27 -0
- package/bin/haxe/exceptions/PosException.d.ts +19 -0
- package/bin/haxe/exceptions/PosException.js +36 -0
- package/bin/haxe/extern/Rest.d.ts +11 -0
- package/bin/haxe/io/ArrayBufferView.d.ts +2 -0
- package/bin/haxe/io/Bytes.d.ts +19 -0
- package/bin/haxe/io/Bytes.js +78 -0
- package/bin/haxe/io/BytesBuffer.d.ts +19 -0
- package/bin/haxe/io/BytesBuffer.js +67 -0
- package/bin/haxe/io/BytesData.d.ts +2 -0
- package/bin/haxe/io/BytesOutput.d.ts +18 -0
- package/bin/haxe/io/BytesOutput.js +39 -0
- package/bin/haxe/io/Encoding.d.ts +20 -0
- package/bin/haxe/io/Encoding.js +20 -0
- package/bin/haxe/io/Error.d.ts +35 -0
- package/bin/haxe/io/Error.js +31 -0
- package/bin/haxe/io/Output.d.ts +63 -0
- package/bin/haxe/io/Output.js +126 -0
- package/bin/haxe/io/Path.d.ts +109 -0
- package/bin/haxe/io/Path.js +217 -0
- package/bin/haxe/io/UInt8Array.d.ts +2 -0
- package/bin/haxe/iterators/ArrayIterator.d.ts +19 -0
- package/bin/haxe/iterators/ArrayIterator.js +35 -0
- package/bin/haxe/macro/Expr.d.ts +331 -0
- package/bin/haxe/macro/Type.d.ts +609 -0
- package/bin/haxe/zip/Compress.d.ts +5 -0
- package/bin/haxe/zip/Compress.js +21 -0
- package/bin/haxe/zip/Entry.d.ts +27 -0
- package/bin/haxe/zip/Entry.js +15 -0
- package/bin/haxe/zip/Tools.d.ts +5 -0
- package/bin/haxe/zip/Tools.js +24 -0
- package/bin/haxe/zip/Writer.d.ts +22 -0
- package/bin/haxe/zip/Writer.js +149 -0
- package/bin/js/Boot.d.ts +18 -0
- package/bin/js/Boot.js +225 -0
- package/bin/js/Node.d.ts +6 -0
- package/bin/js/lib/ArrayBuffer.d.ts +4 -0
- package/bin/js/lib/ArrayBuffer.js +24 -0
- package/bin/js/lib/Iterator.d.ts +23 -0
- package/bin/js/lib/Map.d.ts +2 -0
- package/bin/js/lib/Object.d.ts +82 -0
- package/bin/js/lib/Promise.d.ts +10 -0
- package/bin/js/lib/intl/NumberFormat.d.ts +114 -0
- package/bin/js/node/Buffer.d.ts +3 -0
- package/bin/js/node/ChildProcess.d.ts +424 -0
- package/bin/js/node/Crypto.d.ts +21 -0
- package/bin/js/node/Dns.d.ts +57 -0
- package/bin/js/node/Fs.d.ts +308 -0
- package/bin/js/node/Http.d.ts +114 -0
- package/bin/js/node/Https.d.ts +330 -0
- package/bin/js/node/Iterator.d.ts +5 -0
- package/bin/js/node/Path.d.ts +44 -0
- package/bin/js/node/Process.d.ts +6 -0
- package/bin/js/node/Tls.d.ts +304 -0
- package/bin/js/node/Url.d.ts +126 -0
- package/bin/js/node/Util.d.ts +115 -0
- package/bin/js/node/Zlib.d.ts +29 -0
- package/bin/js/node/buffer/Buffer.d.ts +23 -0
- package/bin/js/node/buffer/Buffer.js +24 -0
- package/bin/js/node/child_process/ChildProcess.d.ts +11 -0
- package/bin/js/node/console/Console.d.ts +26 -0
- package/bin/js/node/http/Agent.d.ts +40 -0
- package/bin/js/node/http/ClientRequest.d.ts +10 -0
- package/bin/js/node/https/Agent.d.ts +50 -0
- package/bin/js/node/net/Server.d.ts +22 -0
- package/bin/js/node/net/Socket.d.ts +101 -0
- package/bin/js/node/stream/Duplex.d.ts +86 -0
- package/bin/js/node/stream/Readable.d.ts +41 -0
- package/bin/js/node/stream/Transform.d.ts +92 -0
- package/bin/js/node/stream/Writable.d.ts +57 -0
- package/bin/js/node/tls/SecureContext.d.ts +74 -0
- package/bin/js/node/tls/TLSSocket.d.ts +47 -0
- package/bin/ts/Undefined.d.ts +5 -0
- package/bin/whet/Log.d.ts +16 -0
- package/bin/whet/Log.js +106 -0
- package/bin/whet/Project.d.ts +33 -0
- package/bin/whet/Project.js +71 -0
- package/bin/whet/Source.d.ts +51 -0
- package/bin/whet/Source.js +136 -0
- package/bin/whet/SourceHash.d.ts +15 -0
- package/bin/whet/SourceHash.js +68 -0
- package/bin/whet/SourceId.d.ts +10 -0
- package/bin/whet/SourceId.js +74 -0
- package/bin/whet/Stone.d.ts +88 -0
- package/bin/whet/Stone.js +157 -0
- package/bin/whet/Utils.d.ts +16 -0
- package/bin/whet/Utils.js +72 -0
- package/bin/whet/Whet.d.ts +4 -0
- package/bin/whet/Whet.js +117 -0
- package/bin/whet/cache/BaseCache.d.ts +27 -0
- package/bin/whet/cache/BaseCache.js +210 -0
- package/bin/whet/cache/Cache.d.ts +72 -0
- package/bin/whet/cache/Cache.js +57 -0
- package/bin/whet/cache/CacheManager.d.ts +23 -0
- package/bin/whet/cache/CacheManager.js +103 -0
- package/bin/whet/cache/FileCache.d.ts +35 -0
- package/bin/whet/cache/FileCache.js +295 -0
- package/bin/whet/cache/MemoryCache.d.ts +12 -0
- package/bin/whet/cache/MemoryCache.js +58 -0
- package/bin/whet/magic/MaybeArray.d.ts +4 -0
- package/bin/whet/magic/MaybeArray.js +25 -0
- package/bin/whet/magic/RoutePathType.d.ts +9 -0
- package/bin/whet/magic/RoutePathType.js +48 -0
- package/bin/whet/magic/RouteType.d.ts +12 -0
- package/bin/whet/magic/RouteType.js +70 -0
- package/bin/whet/magic/StoneId.d.ts +5 -0
- package/bin/whet/magic/StoneId.js +32 -0
- package/bin/whet/route/Route.d.ts +15 -0
- package/bin/whet/route/Route.js +81 -0
- package/bin/whet/route/RouteResult.d.ts +22 -0
- package/bin/whet/route/RouteResult.js +25 -0
- package/bin/whet/route/Router.d.ts +33 -0
- package/bin/whet/route/Router.js +224 -0
- package/bin/whet/stones/Files.d.ts +28 -0
- package/bin/whet/stones/Files.js +86 -0
- package/bin/whet/stones/JsonStone.d.ts +33 -0
- package/bin/whet/stones/JsonStone.js +117 -0
- package/bin/whet/stones/RemoteFile.d.ts +28 -0
- package/bin/whet/stones/RemoteFile.js +71 -0
- package/bin/whet/stones/Server.d.ts +42 -0
- package/bin/whet/stones/Server.js +113 -0
- package/bin/whet/stones/Zip.d.ts +30 -0
- package/bin/whet/stones/Zip.js +111 -0
- package/bin/whet/stones/haxe/HaxeBuild.d.ts +34 -0
- package/bin/whet/stones/haxe/HaxeBuild.js +89 -0
- package/bin/whet/stones/haxe/Hxml.d.ts +102 -0
- package/bin/whet/stones/haxe/Hxml.js +348 -0
- package/bin/whet.d.ts +20 -0
- package/bin/whet.js +18 -0
- package/package.json +32 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import {HaxeBuild} from "./HaxeBuild.js"
|
|
2
|
+
import {StoneId_Fields_} from "../../magic/StoneId.js"
|
|
3
|
+
import {MaybeArray_Fields_} from "../../magic/MaybeArray.js"
|
|
4
|
+
import {CacheStrategy, CacheDurability} from "../../cache/Cache.js"
|
|
5
|
+
import {Stone} from "../../Stone.js"
|
|
6
|
+
import {SourceId} from "../../SourceId.js"
|
|
7
|
+
import {SourceHash} from "../../SourceHash.js"
|
|
8
|
+
import {SourceData} from "../../Source.js"
|
|
9
|
+
import {Log} from "../../Log.js"
|
|
10
|
+
import {Path} from "../../../haxe/io/Path.js"
|
|
11
|
+
import {Register} from "../../../genes/Register.js"
|
|
12
|
+
import {HxOverrides} from "../../../HxOverrides.js"
|
|
13
|
+
|
|
14
|
+
const $global = Register.$global
|
|
15
|
+
|
|
16
|
+
export const Hxml = Register.global("$hxClasses")["whet.stones.haxe.Hxml"] =
|
|
17
|
+
class Hxml extends Register.inherits(Stone) {
|
|
18
|
+
new(config) {
|
|
19
|
+
super.new(config);
|
|
20
|
+
}
|
|
21
|
+
initConfig() {
|
|
22
|
+
if (this.config.cacheStrategy == null) {
|
|
23
|
+
this.config.cacheStrategy = CacheStrategy.InFile(CacheDurability.LimitCountByLastUse(1));
|
|
24
|
+
};
|
|
25
|
+
this.build = new HaxeBuild({"hxml": this, "id": "build", "project": this.config.project});
|
|
26
|
+
}
|
|
27
|
+
clone(id) {
|
|
28
|
+
var configClone = this.cloneConfig(this.config);
|
|
29
|
+
configClone.id = StoneId_Fields_.makeStoneId(id);
|
|
30
|
+
return new Hxml(configClone);
|
|
31
|
+
}
|
|
32
|
+
mergeConfig(additionalConfig) {
|
|
33
|
+
var merge = function (from, to) {
|
|
34
|
+
if (from != null) {
|
|
35
|
+
var _g = 0;
|
|
36
|
+
while (_g < from.length) {
|
|
37
|
+
var item = from[_g];
|
|
38
|
+
++_g;
|
|
39
|
+
if (to.indexOf(item) == -1) {
|
|
40
|
+
to.push(item);
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
merge(additionalConfig.libs, this.config.libs);
|
|
46
|
+
merge(additionalConfig.paths, this.config.paths);
|
|
47
|
+
merge(additionalConfig.defines, this.config.defines);
|
|
48
|
+
merge(additionalConfig.flags, this.config.flags);
|
|
49
|
+
if (additionalConfig.dce != null) {
|
|
50
|
+
this.config.dce = additionalConfig.dce;
|
|
51
|
+
};
|
|
52
|
+
if (additionalConfig.main != null) {
|
|
53
|
+
this.config.main = additionalConfig.main;
|
|
54
|
+
};
|
|
55
|
+
if (additionalConfig.debug != null) {
|
|
56
|
+
this.config.debug = additionalConfig.debug;
|
|
57
|
+
};
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
getBuildArgs() {
|
|
61
|
+
return this.getBaseArgs().concat([this.getPlatform()]);
|
|
62
|
+
}
|
|
63
|
+
getBaseArgs() {
|
|
64
|
+
var _this = MaybeArray_Fields_.makeArray(this.config.libs);
|
|
65
|
+
var result = new Array(_this.length);
|
|
66
|
+
var _g = 0;
|
|
67
|
+
var _g1 = _this.length;
|
|
68
|
+
while (_g < _g1) {
|
|
69
|
+
var i = _g++;
|
|
70
|
+
result[i] = ["-lib", _this[i]];
|
|
71
|
+
};
|
|
72
|
+
var _this = MaybeArray_Fields_.makeArray(this.config.paths);
|
|
73
|
+
var result1 = new Array(_this.length);
|
|
74
|
+
var _g = 0;
|
|
75
|
+
var _g1 = _this.length;
|
|
76
|
+
while (_g < _g1) {
|
|
77
|
+
var i = _g++;
|
|
78
|
+
result1[i] = ["-cp", _this[i]];
|
|
79
|
+
};
|
|
80
|
+
var args = result.concat(result1);
|
|
81
|
+
var _this = MaybeArray_Fields_.makeArray(this.config.defines);
|
|
82
|
+
var result = new Array(_this.length);
|
|
83
|
+
var _g = 0;
|
|
84
|
+
var _g1 = _this.length;
|
|
85
|
+
while (_g < _g1) {
|
|
86
|
+
var i = _g++;
|
|
87
|
+
result[i] = ["-D", _this[i]];
|
|
88
|
+
};
|
|
89
|
+
var args1 = args.concat(result);
|
|
90
|
+
if (this.config.dce != null) {
|
|
91
|
+
var tmp;
|
|
92
|
+
switch (this.config.dce._hx_index) {
|
|
93
|
+
case 0:
|
|
94
|
+
tmp = "std";
|
|
95
|
+
break
|
|
96
|
+
case 1:
|
|
97
|
+
tmp = "full";
|
|
98
|
+
break
|
|
99
|
+
case 2:
|
|
100
|
+
tmp = "no";
|
|
101
|
+
break
|
|
102
|
+
|
|
103
|
+
};
|
|
104
|
+
args1.push(["-dce", tmp]);
|
|
105
|
+
};
|
|
106
|
+
if (this.config.main != null) {
|
|
107
|
+
args1.push(["-main", this.config.main]);
|
|
108
|
+
};
|
|
109
|
+
if (this.config.debug == true) {
|
|
110
|
+
args1.push(["-debug"]);
|
|
111
|
+
};
|
|
112
|
+
var _this = MaybeArray_Fields_.makeArray(this.config.flags);
|
|
113
|
+
var result = new Array(_this.length);
|
|
114
|
+
var _g = 0;
|
|
115
|
+
var _g1 = _this.length;
|
|
116
|
+
while (_g < _g1) {
|
|
117
|
+
var i = _g++;
|
|
118
|
+
result[i] = MaybeArray_Fields_.makeArray(_this[i]);
|
|
119
|
+
};
|
|
120
|
+
return args1.concat(result);
|
|
121
|
+
}
|
|
122
|
+
getFileContent() {
|
|
123
|
+
var _this = this.getBuildArgs();
|
|
124
|
+
var result = new Array(_this.length);
|
|
125
|
+
var _g = 0;
|
|
126
|
+
var _g1 = _this.length;
|
|
127
|
+
while (_g < _g1) {
|
|
128
|
+
var i = _g++;
|
|
129
|
+
result[i] = _this[i].join(" ");
|
|
130
|
+
};
|
|
131
|
+
return "# Generated from Whet library. Do not edit manually.\n" + result.join("\n");
|
|
132
|
+
}
|
|
133
|
+
getBuildExportPath() {
|
|
134
|
+
var dir = this.project.cache.getDir(this.build, this.generateHashSync());
|
|
135
|
+
if (this.isSingleFile()) {
|
|
136
|
+
return SourceId.getPutInDir(this.getBuildFilename(), dir);
|
|
137
|
+
} else {
|
|
138
|
+
return dir;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
getBuildFilename() {
|
|
142
|
+
if (this.isSingleFile()) {
|
|
143
|
+
var filename;
|
|
144
|
+
if (this.build.config.filename != null) {
|
|
145
|
+
filename = this.build.config.filename;
|
|
146
|
+
} else {
|
|
147
|
+
var norm = "/" + Path.normalize(("build".charAt(0) == "/") ? HxOverrides.substr("build", 1, null) : "build");
|
|
148
|
+
filename = ("build".lastIndexOf("/") == "build".length - 1) ? Path.addTrailingSlash(norm) : norm;
|
|
149
|
+
};
|
|
150
|
+
if (Path.extension(filename) == "") {
|
|
151
|
+
var v = this.getBuildExtension();
|
|
152
|
+
var p = new Path(filename);
|
|
153
|
+
p.ext = v;
|
|
154
|
+
var s = p.toString();
|
|
155
|
+
var norm = "/" + Path.normalize((s.charAt(0) == "/") ? HxOverrides.substr(s, 1, null) : s);
|
|
156
|
+
filename = (s.lastIndexOf("/") == s.length - 1) ? Path.addTrailingSlash(norm) : norm;
|
|
157
|
+
};
|
|
158
|
+
return filename;
|
|
159
|
+
} else {
|
|
160
|
+
throw new Error("Not a single file.");
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
getPlatform() {
|
|
164
|
+
var this1 = this.getBuildExportPath();
|
|
165
|
+
var norm = "/" + Path.normalize(("/".charAt(0) == "/") ? HxOverrides.substr("/", 1, null) : "/");
|
|
166
|
+
var root = ("/".lastIndexOf("/") == "/".length - 1) ? Path.addTrailingSlash(norm) : norm;
|
|
167
|
+
var path = (root.length == 1) ? this1.substring(1) : root.substring(1, root.length - 1) + this1;
|
|
168
|
+
var _g = this.config.platform;
|
|
169
|
+
if (_g == null) {
|
|
170
|
+
return [];
|
|
171
|
+
} else {
|
|
172
|
+
switch (_g._hx_index) {
|
|
173
|
+
case 0:
|
|
174
|
+
return ["-js", path];
|
|
175
|
+
break
|
|
176
|
+
case 1:
|
|
177
|
+
return ["-swf", path];
|
|
178
|
+
break
|
|
179
|
+
case 2:
|
|
180
|
+
return ["-neko", path];
|
|
181
|
+
break
|
|
182
|
+
case 3:
|
|
183
|
+
return ["-php", path];
|
|
184
|
+
break
|
|
185
|
+
case 4:
|
|
186
|
+
return ["-cpp", path];
|
|
187
|
+
break
|
|
188
|
+
case 5:
|
|
189
|
+
return ["-cs", path];
|
|
190
|
+
break
|
|
191
|
+
case 6:
|
|
192
|
+
return ["-java", path];
|
|
193
|
+
break
|
|
194
|
+
case 7:
|
|
195
|
+
return ["-python", path];
|
|
196
|
+
break
|
|
197
|
+
case 8:
|
|
198
|
+
return ["-lua", path];
|
|
199
|
+
break
|
|
200
|
+
case 9:
|
|
201
|
+
return ["-hl", path];
|
|
202
|
+
break
|
|
203
|
+
case 10:
|
|
204
|
+
return ["-cppia", path];
|
|
205
|
+
break
|
|
206
|
+
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
isSingleFile() {
|
|
211
|
+
var _g = this.config.platform;
|
|
212
|
+
if (_g == null) {
|
|
213
|
+
return false;
|
|
214
|
+
} else {
|
|
215
|
+
switch (_g._hx_index) {
|
|
216
|
+
case 0:case 1:case 2:case 7:case 8:case 9:case 10:
|
|
217
|
+
return true;
|
|
218
|
+
break
|
|
219
|
+
default:
|
|
220
|
+
return false;
|
|
221
|
+
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
getBuildExtension() {
|
|
226
|
+
var _g = this.config.platform;
|
|
227
|
+
if (_g == null) {
|
|
228
|
+
return "";
|
|
229
|
+
} else {
|
|
230
|
+
switch (_g._hx_index) {
|
|
231
|
+
case 0:
|
|
232
|
+
return "js";
|
|
233
|
+
break
|
|
234
|
+
case 1:
|
|
235
|
+
return "swf";
|
|
236
|
+
break
|
|
237
|
+
case 2:
|
|
238
|
+
return "n";
|
|
239
|
+
break
|
|
240
|
+
case 7:
|
|
241
|
+
return "py";
|
|
242
|
+
break
|
|
243
|
+
case 8:
|
|
244
|
+
return "lua";
|
|
245
|
+
break
|
|
246
|
+
case 9:
|
|
247
|
+
return "hl";
|
|
248
|
+
break
|
|
249
|
+
case 10:
|
|
250
|
+
return "cppia";
|
|
251
|
+
break
|
|
252
|
+
default:
|
|
253
|
+
return "";
|
|
254
|
+
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
generate(hash) {
|
|
259
|
+
Log.log(30, ...["Generating hxml file."]);
|
|
260
|
+
return Promise.resolve([SourceData.fromString(this.filename(), this.getFileContent())]);
|
|
261
|
+
}
|
|
262
|
+
list() {
|
|
263
|
+
return Promise.resolve([this.filename()]);
|
|
264
|
+
}
|
|
265
|
+
filename() {
|
|
266
|
+
var s = this.id;
|
|
267
|
+
var norm = "/" + Path.normalize((s.charAt(0) == "/") ? HxOverrides.substr(s, 1, null) : s);
|
|
268
|
+
var fn = (s.lastIndexOf("/") == s.length - 1) ? Path.addTrailingSlash(norm) : norm;
|
|
269
|
+
if (Path.extension(fn) == "") {
|
|
270
|
+
var p = new Path(fn);
|
|
271
|
+
p.ext = "hxml";
|
|
272
|
+
var s = p.toString();
|
|
273
|
+
var norm = "/" + Path.normalize((s.charAt(0) == "/") ? HxOverrides.substr(s, 1, null) : s);
|
|
274
|
+
fn = (s.lastIndexOf("/") == s.length - 1) ? Path.addTrailingSlash(norm) : norm;
|
|
275
|
+
};
|
|
276
|
+
return fn;
|
|
277
|
+
}
|
|
278
|
+
generateHash() {
|
|
279
|
+
return Promise.resolve(this.generateHashSync());
|
|
280
|
+
}
|
|
281
|
+
generateHashSync() {
|
|
282
|
+
var _this = this.getBaseArgs();
|
|
283
|
+
var result = new Array(_this.length);
|
|
284
|
+
var _g = 0;
|
|
285
|
+
var _g1 = _this.length;
|
|
286
|
+
while (_g < _g1) {
|
|
287
|
+
var i = _g++;
|
|
288
|
+
result[i] = _this[i].join(" ");
|
|
289
|
+
};
|
|
290
|
+
return SourceHash.fromString(result.join("\n"));
|
|
291
|
+
}
|
|
292
|
+
cloneConfig(config) {
|
|
293
|
+
var config1 = config.project;
|
|
294
|
+
var tmp = MaybeArray_Fields_.makeArray(config.libs).slice();
|
|
295
|
+
var tmp1 = MaybeArray_Fields_.makeArray(config.paths).slice();
|
|
296
|
+
var tmp2 = MaybeArray_Fields_.makeArray(config.defines).slice();
|
|
297
|
+
var config2 = config.dce;
|
|
298
|
+
var config3 = config.main;
|
|
299
|
+
var config4 = config.debug;
|
|
300
|
+
var _g = [];
|
|
301
|
+
var _g1 = 0;
|
|
302
|
+
var _g2 = MaybeArray_Fields_.makeArray(config.flags);
|
|
303
|
+
while (_g1 < _g2.length) _g.push(MaybeArray_Fields_.makeArray(_g2[_g1++]).slice());
|
|
304
|
+
return {"project": config1, "libs": tmp, "paths": tmp1, "defines": tmp2, "dce": config2, "main": config3, "debug": config4, "flags": _g, "platform": config.platform};
|
|
305
|
+
}
|
|
306
|
+
static get __name__() {
|
|
307
|
+
return "whet.stones.haxe.Hxml"
|
|
308
|
+
}
|
|
309
|
+
static get __super__() {
|
|
310
|
+
return Stone
|
|
311
|
+
}
|
|
312
|
+
get __class__() {
|
|
313
|
+
return Hxml
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
export const DCE =
|
|
319
|
+
Register.global("$hxEnums")["whet.stones.haxe.DCE"] =
|
|
320
|
+
{
|
|
321
|
+
__ename__: "whet.stones.haxe.DCE",
|
|
322
|
+
|
|
323
|
+
STD: {_hx_name: "STD", _hx_index: 0, __enum__: "whet.stones.haxe.DCE"},
|
|
324
|
+
FULL: {_hx_name: "FULL", _hx_index: 1, __enum__: "whet.stones.haxe.DCE"},
|
|
325
|
+
NO: {_hx_name: "NO", _hx_index: 2, __enum__: "whet.stones.haxe.DCE"}
|
|
326
|
+
}
|
|
327
|
+
DCE.__constructs__ = [DCE.STD, DCE.FULL, DCE.NO]
|
|
328
|
+
DCE.__empty_constructs__ = [DCE.STD, DCE.FULL, DCE.NO]
|
|
329
|
+
|
|
330
|
+
export const BuildPlatform =
|
|
331
|
+
Register.global("$hxEnums")["whet.stones.haxe.BuildPlatform"] =
|
|
332
|
+
{
|
|
333
|
+
__ename__: "whet.stones.haxe.BuildPlatform",
|
|
334
|
+
|
|
335
|
+
JS: {_hx_name: "JS", _hx_index: 0, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
336
|
+
SWF: {_hx_name: "SWF", _hx_index: 1, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
337
|
+
NEKO: {_hx_name: "NEKO", _hx_index: 2, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
338
|
+
PHP: {_hx_name: "PHP", _hx_index: 3, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
339
|
+
CPP: {_hx_name: "CPP", _hx_index: 4, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
340
|
+
CS: {_hx_name: "CS", _hx_index: 5, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
341
|
+
JAVA: {_hx_name: "JAVA", _hx_index: 6, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
342
|
+
PYTHON: {_hx_name: "PYTHON", _hx_index: 7, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
343
|
+
LUA: {_hx_name: "LUA", _hx_index: 8, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
344
|
+
HL: {_hx_name: "HL", _hx_index: 9, __enum__: "whet.stones.haxe.BuildPlatform"},
|
|
345
|
+
CPPIA: {_hx_name: "CPPIA", _hx_index: 10, __enum__: "whet.stones.haxe.BuildPlatform"}
|
|
346
|
+
}
|
|
347
|
+
BuildPlatform.__constructs__ = [BuildPlatform.JS, BuildPlatform.SWF, BuildPlatform.NEKO, BuildPlatform.PHP, BuildPlatform.CPP, BuildPlatform.CS, BuildPlatform.JAVA, BuildPlatform.PYTHON, BuildPlatform.LUA, BuildPlatform.HL, BuildPlatform.CPPIA]
|
|
348
|
+
BuildPlatform.__empty_constructs__ = [BuildPlatform.JS, BuildPlatform.SWF, BuildPlatform.NEKO, BuildPlatform.PHP, BuildPlatform.CPP, BuildPlatform.CS, BuildPlatform.JAVA, BuildPlatform.PYTHON, BuildPlatform.LUA, BuildPlatform.HL, BuildPlatform.CPPIA]
|
package/bin/whet.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
export {ZipStone} from "./whet/stones/Zip"
|
|
3
|
+
export {ZipConfig} from "./whet/stones/Zip"
|
|
4
|
+
export {ServerConfig} from "./whet/stones/Server"
|
|
5
|
+
export {Server} from "./whet/stones/Server"
|
|
6
|
+
export {Router} from "./whet/route/Router"
|
|
7
|
+
export {RemoteFileConfig} from "./whet/stones/RemoteFile"
|
|
8
|
+
export {RemoteFile} from "./whet/stones/RemoteFile"
|
|
9
|
+
export {Project} from "./whet/Project"
|
|
10
|
+
export {Log} from "./whet/Log"
|
|
11
|
+
export {JsonStoneConfig} from "./whet/stones/JsonStone"
|
|
12
|
+
export {JsonStone} from "./whet/stones/JsonStone"
|
|
13
|
+
export {HxmlConfig} from "./whet/stones/haxe/Hxml"
|
|
14
|
+
export {Hxml} from "./whet/stones/haxe/Hxml"
|
|
15
|
+
export {HaxeBuild} from "./whet/stones/haxe/HaxeBuild"
|
|
16
|
+
export {FilesConfig} from "./whet/stones/Files"
|
|
17
|
+
export {Files} from "./whet/stones/Files"
|
|
18
|
+
export {DCE} from "./whet/stones/haxe/Hxml"
|
|
19
|
+
export {BuildPlatform} from "./whet/stones/haxe/Hxml"
|
|
20
|
+
export {BuildConfig} from "./whet/stones/haxe/HaxeBuild"
|
package/bin/whet.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {Whet_Fields_} from "./whet/Whet.js"
|
|
2
|
+
import {Register} from "./genes/Register.js"
|
|
3
|
+
|
|
4
|
+
const $global = Register.$global
|
|
5
|
+
|
|
6
|
+
Whet_Fields_.main()
|
|
7
|
+
export {ZipStone} from "./whet/stones/Zip.js"
|
|
8
|
+
export {Server} from "./whet/stones/Server.js"
|
|
9
|
+
export {Router} from "./whet/route/Router.js"
|
|
10
|
+
export {RemoteFile} from "./whet/stones/RemoteFile.js"
|
|
11
|
+
export {Project} from "./whet/Project.js"
|
|
12
|
+
export {Log} from "./whet/Log.js"
|
|
13
|
+
export {JsonStone} from "./whet/stones/JsonStone.js"
|
|
14
|
+
export {Hxml} from "./whet/stones/haxe/Hxml.js"
|
|
15
|
+
export {HaxeBuild} from "./whet/stones/haxe/HaxeBuild.js"
|
|
16
|
+
export {Files} from "./whet/stones/Files.js"
|
|
17
|
+
export {DCE} from "./whet/stones/haxe/Hxml.js"
|
|
18
|
+
export {BuildPlatform} from "./whet/stones/haxe/Hxml.js"
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "whet",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "NodeJS based assets management and project tooling library.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"devinit": "npx dts commander --modular --noLibWrap",
|
|
7
|
+
"build": "npx haxe build.hxml"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Antriel/whet.git"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin"
|
|
15
|
+
],
|
|
16
|
+
"bin": "bin/whet.js",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"author": "Peter Achberger",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/Antriel/whet/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/Antriel/whet#readme",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"commander": "^9.0.0",
|
|
26
|
+
"mime": "^3.0.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"dts2hx": "^0.18.1",
|
|
30
|
+
"lix": "^15.11.6"
|
|
31
|
+
}
|
|
32
|
+
}
|