@makano/rew 1.2.89 → 1.2.90

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.
@@ -23,7 +23,7 @@ module.exports.Usage = class Usage {
23
23
  constructor(name, trigger, save){
24
24
  this.name = name;
25
25
  this.trigger = trigger;
26
- this.save = save;
26
+ this.save = name == '' ? false : save;
27
27
  }
28
28
 
29
29
  create(name, trigger, save = true){
@@ -139,7 +139,7 @@ function declareAlias(aliases, token) {
139
139
  straceLog('==> DECLARE', name, 'as', value);
140
140
 
141
141
  let aliasValue = value.startsWith('${')
142
- ? new Function('token', 'tokens', 'code', 'hooks', value.slice(2, -1))
142
+ ? new Function('token', 'tokens', 'code', 'hooks', 'index', 'setIndex', value.slice(2, -1))
143
143
  : value;
144
144
 
145
145
 
@@ -172,7 +172,7 @@ function declareAlias(aliases, token) {
172
172
  let nextToken = gnextToken(index, offset+1, tokens);
173
173
  const args = nextToken.token.value;
174
174
  setIndex(ti + offset);
175
- return `${nextToken2.value} = ${token.value}(${args}, ${params.trim()})`;
175
+ return `${nextToken2.value} = ${token.value} ${args && args !== '(' ? `${args},` : ''} ${params.trim()}, ${args == '(' ? args : ''}`;
176
176
  } else if(nextToken?.value == ' ' && (isDecOnly || nextToken2?.token.value == '=' || nextToken2?.token.value == ':')){
177
177
  nextToken.value = '';
178
178
  if(isDecOnly){
@@ -540,8 +540,6 @@ const compileCivetStuff = (file, options) => {
540
540
  straceLog('OPTION_PREPARE() for CURRENTFILE as', preCompileOptions);
541
541
  const prepared = compileRewStuff(file.content, preCompileOptions);
542
542
 
543
- // console.log(prepared);
544
-
545
543
  const compileOptions = {
546
544
  ...preCompileOptions,
547
545
  bare: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.89",
3
+ "version": "1.2.90",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {