whet 0.0.25 → 0.0.26

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.
@@ -11,5 +11,5 @@ export declare class Register {
11
11
  static extend(superClass: any): void
12
12
  static inherits(resolve: any, defer?: boolean): void
13
13
  protected static fid: number
14
- static bind(o: any, m: any): null | null | any
14
+ static bind(o: any, m: any): null | any
15
15
  }
@@ -84,6 +84,10 @@ export type Var = {
84
84
  */
85
85
  name: string,
86
86
  /**
87
+ The position of the variable name.
88
+ */
89
+ namePos?: any,
90
+ /**
87
91
  The type-hint of the variable, if available.
88
92
  */
89
93
  type?: null | ComplexType
@@ -1,4 +1,4 @@
1
1
 
2
2
  export declare class ArrayBufferCompat {
3
- protected static sliceImpl(begin: null | number, end?: null | null | null | number): ArrayBuffer
3
+ protected static sliceImpl(begin: null | number, end?: null | number): ArrayBuffer
4
4
  }
@@ -11,6 +11,11 @@ export declare class Project {
11
11
  cache: CacheManager
12
12
  stones: AnyStone[]
13
13
  onInit: (config: any) => Promise<any>
14
+
15
+ /**
16
+ The object passed to `onInit`.
17
+ */
18
+ config: any
14
19
  protected options: Option[]
15
20
  addCommand(name: string, stone?: null | AnyStone): Command
16
21
  toString(): string
package/bin/whet/Whet.js CHANGED
@@ -12,7 +12,7 @@ const $global = Register.$global
12
12
  export const Whet_Fields_ = Register.global("$hxClasses")["whet._Whet.Whet_Fields_"] =
13
13
  class Whet_Fields_ {
14
14
  static main() {
15
- Whet_Fields_.program.enablePositionalOptions().passThroughOptions().description("Project tooling.").usage("[options] [command] [+ [command]...]").version("0.0.25", "-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").option("--no-pretty", "disable pretty logging").exitOverride();
15
+ Whet_Fields_.program.enablePositionalOptions().passThroughOptions().description("Project tooling.").usage("[options] [command] [+ [command]...]").version("0.0.26", "-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").option("--no-pretty", "disable pretty logging").exitOverride();
16
16
  try {
17
17
  Whet_Fields_.program.parse();
18
18
  }catch (_g) {
@@ -86,7 +86,8 @@ class Whet_Fields_ {
86
86
  ++_g;
87
87
  if (p.onInit != null) {
88
88
  Log.log(10, ...["Initializing project.", {"project": p.id}]);
89
- var prom = p.onInit(Whet_Fields_.program.opts());
89
+ p.config = Whet_Fields_.program.opts();
90
+ var prom = p.onInit(p.config);
90
91
  if (prom != null) {
91
92
  promises.push(prom);
92
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whet",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "NodeJS based assets management and project tooling library.",
5
5
  "scripts": {
6
6
  "devinit": "npx dts2hx commander pino-pretty --modular --noLibWrap",