@makano/rew 1.2.51 → 1.2.53

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.
@@ -43,8 +43,6 @@ module.exports.imp = function (runPath, context) {
43
43
  let filepath = path.resolve(path.dirname(context.module.filepath), filename);
44
44
  if(path.extname(filepath) == '.qrew') options.qrew = true;
45
45
 
46
- // console.log(typeof runPath);
47
-
48
46
  const lookUp = () => {
49
47
  const otherPath = lookUpInOtherApps(filename);
50
48
  if (!otherPath) throw new Error('Module "' + filename + '" not found');
@@ -134,7 +132,7 @@ module.exports.imp = function (runPath, context) {
134
132
 
135
133
  //** Mock imports section
136
134
  /**/ if(!exports) exports = options.mock;
137
- /**/ if(options.mock == null) return null;
135
+ /**/ if(options.mock === null) return null;
138
136
  /**/ if(!exports) throw new Error('Import '+filename+' does not export anything. Use the "mock" option to mock a value.');
139
137
  //**
140
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.51",
3
+ "version": "1.2.53",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {
package/runtime.d.ts CHANGED
@@ -38,6 +38,7 @@ interface ModuleConfOptionCenter {
38
38
  * @returns
39
39
  */
40
40
  getAll: (() => string) | ((str?: false) => Record<string, any>)
41
+ root: string;
41
42
  }
42
43
 
43
44
  interface ModuleConf extends ModuleConfOptionCenter {
@@ -63,7 +64,7 @@ interface ModuleConf extends ModuleConfOptionCenter {
63
64
  read: (to?: string | object) => string | object | Buffer,
64
65
  fileRoot: string,
65
66
  exists: boolean
66
- }
67
+ };
67
68
  }
68
69
 
69
70
  interface ModuleEnv {
@@ -350,6 +351,7 @@ declare namespace print {
350
351
 
351
352
  declare function input(prompt: string): string;
352
353
 
354
+ declare function genID(len: number = 15, charachters?: string): string;
353
355
 
354
356
  declare const basename: (path: string) => string;
355
357
  declare const dirname: (path: string) => string;