@makano/rew 1.1.7 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/bin/ui +0 -0
  3. package/build.sh +3 -1
  4. package/lib/coffeescript/browser.js +144 -139
  5. package/lib/coffeescript/cake.js +132 -133
  6. package/lib/coffeescript/coffeescript.js +437 -381
  7. package/lib/coffeescript/command.js +806 -724
  8. package/lib/coffeescript/grammar.js +1908 -2474
  9. package/lib/coffeescript/helpers.js +509 -473
  10. package/lib/coffeescript/index.js +228 -215
  11. package/lib/coffeescript/lexer.js +2282 -1909
  12. package/lib/coffeescript/nodes.js +9782 -9202
  13. package/lib/coffeescript/optparse.js +255 -227
  14. package/lib/coffeescript/parser.js +20305 -1265
  15. package/lib/coffeescript/register.js +107 -87
  16. package/lib/coffeescript/repl.js +307 -284
  17. package/lib/coffeescript/rewriter.js +1389 -1079
  18. package/lib/coffeescript/scope.js +176 -172
  19. package/lib/coffeescript/sourcemap.js +242 -227
  20. package/lib/rew/cli/cli.js +245 -186
  21. package/lib/rew/cli/log.js +31 -32
  22. package/lib/rew/cli/run.js +10 -12
  23. package/lib/rew/cli/utils.js +248 -175
  24. package/lib/rew/const/config_path.js +4 -0
  25. package/lib/rew/const/default.js +38 -35
  26. package/lib/rew/const/files.js +9 -9
  27. package/lib/rew/const/opt.js +8 -8
  28. package/lib/rew/css/theme.css +2 -2
  29. package/lib/rew/functions/core.js +55 -57
  30. package/lib/rew/functions/curl.js +23 -0
  31. package/lib/rew/functions/emitter.js +52 -55
  32. package/lib/rew/functions/exec.js +25 -21
  33. package/lib/rew/functions/export.js +18 -20
  34. package/lib/rew/functions/fs.js +55 -54
  35. package/lib/rew/functions/future.js +29 -21
  36. package/lib/rew/functions/id.js +8 -9
  37. package/lib/rew/functions/import.js +104 -93
  38. package/lib/rew/functions/map.js +13 -16
  39. package/lib/rew/functions/match.js +35 -26
  40. package/lib/rew/functions/path.js +8 -8
  41. package/lib/rew/functions/require.js +32 -33
  42. package/lib/rew/functions/sleep.js +2 -2
  43. package/lib/rew/functions/stdout.js +20 -20
  44. package/lib/rew/functions/types.js +96 -95
  45. package/lib/rew/html/ui.html +12 -13
  46. package/lib/rew/html/ui.js +205 -168
  47. package/lib/rew/main.js +14 -14
  48. package/lib/rew/misc/findAppInfo.js +16 -0
  49. package/lib/rew/misc/findAppPath.js +21 -0
  50. package/lib/rew/misc/seededid.js +13 -0
  51. package/lib/rew/models/enum.js +12 -12
  52. package/lib/rew/models/struct.js +30 -32
  53. package/lib/rew/modules/compiler.js +228 -177
  54. package/lib/rew/modules/context.js +35 -22
  55. package/lib/rew/modules/fs.js +10 -10
  56. package/lib/rew/modules/runtime.js +17 -21
  57. package/lib/rew/modules/yaml.js +27 -30
  58. package/lib/rew/pkgs/conf.js +82 -75
  59. package/lib/rew/pkgs/data.js +12 -7
  60. package/lib/rew/pkgs/date.js +27 -28
  61. package/lib/rew/pkgs/env.js +6 -8
  62. package/lib/rew/pkgs/modules/data/bintree.js +52 -52
  63. package/lib/rew/pkgs/modules/data/doublylinked.js +85 -85
  64. package/lib/rew/pkgs/modules/data/linkedList.js +73 -73
  65. package/lib/rew/pkgs/modules/data/queue.js +19 -20
  66. package/lib/rew/pkgs/modules/data/stack.js +19 -19
  67. package/lib/rew/pkgs/modules/threads/worker.js +36 -26
  68. package/lib/rew/pkgs/modules/ui/classes.js +182 -178
  69. package/lib/rew/pkgs/pkgs.js +9 -10
  70. package/lib/rew/pkgs/rune.js +422 -0
  71. package/lib/rew/pkgs/threads.js +57 -53
  72. package/lib/rew/pkgs/ui.js +148 -136
  73. package/meson.build +13 -0
  74. package/package.json +9 -2
@@ -1,100 +1,120 @@
1
1
  // Generated by CoffeeScript 2.7.0
2
- (function() {
3
- var CoffeeScript, Module, binary, cacheSourceMaps, child_process, ext, findExtension, fork, getRootModule, helpers, i, len, loadFile, nodeSourceMapsSupportEnabled, patchStackTrace, path, ref, ref1;
2
+ (function () {
3
+ var CoffeeScript,
4
+ Module,
5
+ binary,
6
+ cacheSourceMaps,
7
+ child_process,
8
+ ext,
9
+ findExtension,
10
+ fork,
11
+ getRootModule,
12
+ helpers,
13
+ i,
14
+ len,
15
+ loadFile,
16
+ nodeSourceMapsSupportEnabled,
17
+ patchStackTrace,
18
+ path,
19
+ ref,
20
+ ref1;
4
21
 
5
- CoffeeScript = require('./');
22
+ CoffeeScript = require('./');
6
23
 
7
- child_process = require('child_process');
24
+ child_process = require('child_process');
8
25
 
9
- helpers = require('./helpers');
26
+ helpers = require('./helpers');
10
27
 
11
- path = require('path');
28
+ path = require('path');
12
29
 
13
- ({patchStackTrace} = CoffeeScript);
30
+ ({ patchStackTrace } = CoffeeScript);
14
31
 
15
- // Check if Node's built-in source map stack trace transformations are enabled.
16
- nodeSourceMapsSupportEnabled = (typeof process !== "undefined" && process !== null) && (process.execArgv.includes('--enable-source-maps') || ((ref = process.env.NODE_OPTIONS) != null ? ref.includes('--enable-source-maps') : void 0));
32
+ // Check if Node's built-in source map stack trace transformations are enabled.
33
+ nodeSourceMapsSupportEnabled =
34
+ typeof process !== 'undefined' &&
35
+ process !== null &&
36
+ (process.execArgv.includes('--enable-source-maps') ||
37
+ ((ref = process.env.NODE_OPTIONS) != null ? ref.includes('--enable-source-maps') : void 0));
17
38
 
18
- if (!(Error.prepareStackTrace || nodeSourceMapsSupportEnabled)) {
19
- cacheSourceMaps = true;
20
- patchStackTrace();
21
- }
39
+ if (!(Error.prepareStackTrace || nodeSourceMapsSupportEnabled)) {
40
+ cacheSourceMaps = true;
41
+ patchStackTrace();
42
+ }
22
43
 
23
- // Load and run a CoffeeScript file for Node, stripping any `BOM`s.
24
- loadFile = function(module, filename) {
25
- var js, options;
26
- options = module.options || getRootModule(module).options || {};
27
- // Currently `CoffeeScript.compile` caches all source maps if present. They
28
- // are available in `getSourceMap` retrieved by `filename`.
29
- if (cacheSourceMaps || nodeSourceMapsSupportEnabled) {
30
- options.inlineMap = true;
31
- }
32
- js = CoffeeScript._compileFile(filename, options);
33
- return module._compile(js, filename);
34
- };
44
+ // Load and run a CoffeeScript file for Node, stripping any `BOM`s.
45
+ loadFile = function (module, filename) {
46
+ var js, options;
47
+ options = module.options || getRootModule(module).options || {};
48
+ // Currently `CoffeeScript.compile` caches all source maps if present. They
49
+ // are available in `getSourceMap` retrieved by `filename`.
50
+ if (cacheSourceMaps || nodeSourceMapsSupportEnabled) {
51
+ options.inlineMap = true;
52
+ }
53
+ js = CoffeeScript._compileFile(filename, options);
54
+ return module._compile(js, filename);
55
+ };
35
56
 
36
- // If the installed version of Node supports `require.extensions`, register
37
- // CoffeeScript as an extension.
38
- if (require.extensions) {
39
- ref1 = CoffeeScript.FILE_EXTENSIONS;
40
- for (i = 0, len = ref1.length; i < len; i++) {
41
- ext = ref1[i];
42
- require.extensions[ext] = loadFile;
43
- }
44
- // Patch Node's module loader to be able to handle multi-dot extensions.
45
- // This is a horrible thing that should not be required.
46
- Module = require('module');
47
- findExtension = function(filename) {
48
- var curExtension, extensions;
49
- extensions = path.basename(filename).split('.');
50
- if (extensions[0] === '') {
51
- // Remove the initial dot from dotfiles.
52
- extensions.shift();
53
- }
54
- // Start with the longest possible extension and work our way shortwards.
55
- while (extensions.shift()) {
56
- curExtension = '.' + extensions.join('.');
57
- if (Module._extensions[curExtension]) {
58
- return curExtension;
59
- }
60
- }
61
- return '.js';
62
- };
63
- Module.prototype.load = function(filename) {
64
- var extension;
65
- this.filename = filename;
66
- this.paths = Module._nodeModulePaths(path.dirname(filename));
67
- extension = findExtension(filename);
68
- Module._extensions[extension](this, filename);
69
- return this.loaded = true;
70
- };
71
- }
57
+ // If the installed version of Node supports `require.extensions`, register
58
+ // CoffeeScript as an extension.
59
+ if (require.extensions) {
60
+ ref1 = CoffeeScript.FILE_EXTENSIONS;
61
+ for (i = 0, len = ref1.length; i < len; i++) {
62
+ ext = ref1[i];
63
+ require.extensions[ext] = loadFile;
64
+ }
65
+ // Patch Node's module loader to be able to handle multi-dot extensions.
66
+ // This is a horrible thing that should not be required.
67
+ Module = require('module');
68
+ findExtension = function (filename) {
69
+ var curExtension, extensions;
70
+ extensions = path.basename(filename).split('.');
71
+ if (extensions[0] === '') {
72
+ // Remove the initial dot from dotfiles.
73
+ extensions.shift();
74
+ }
75
+ // Start with the longest possible extension and work our way shortwards.
76
+ while (extensions.shift()) {
77
+ curExtension = '.' + extensions.join('.');
78
+ if (Module._extensions[curExtension]) {
79
+ return curExtension;
80
+ }
81
+ }
82
+ return '.js';
83
+ };
84
+ Module.prototype.load = function (filename) {
85
+ var extension;
86
+ this.filename = filename;
87
+ this.paths = Module._nodeModulePaths(path.dirname(filename));
88
+ extension = findExtension(filename);
89
+ Module._extensions[extension](this, filename);
90
+ return (this.loaded = true);
91
+ };
92
+ }
72
93
 
73
- // If we're on Node, patch `child_process.fork` so that Coffee scripts are able
74
- // to fork both CoffeeScript files, and JavaScript files, directly.
75
- if (child_process) {
76
- ({fork} = child_process);
77
- binary = require.resolve('../../bin/coffee');
78
- child_process.fork = function(path, args, options) {
79
- if (helpers.isCoffee(path)) {
80
- if (!Array.isArray(args)) {
81
- options = args || {};
82
- args = [];
83
- }
84
- args = [path].concat(args);
85
- path = binary;
86
- }
87
- return fork(path, args, options);
88
- };
89
- }
90
-
91
- // Utility function to find the `options` object attached to the topmost module.
92
- getRootModule = function(module) {
93
- if (module.parent) {
94
- return getRootModule(module.parent);
95
- } else {
96
- return module;
97
- }
98
- };
94
+ // If we're on Node, patch `child_process.fork` so that Coffee scripts are able
95
+ // to fork both CoffeeScript files, and JavaScript files, directly.
96
+ if (child_process) {
97
+ ({ fork } = child_process);
98
+ binary = require.resolve('../../bin/coffee');
99
+ child_process.fork = function (path, args, options) {
100
+ if (helpers.isCoffee(path)) {
101
+ if (!Array.isArray(args)) {
102
+ options = args || {};
103
+ args = [];
104
+ }
105
+ args = [path].concat(args);
106
+ path = binary;
107
+ }
108
+ return fork(path, args, options);
109
+ };
110
+ }
99
111
 
112
+ // Utility function to find the `options` object attached to the topmost module.
113
+ getRootModule = function (module) {
114
+ if (module.parent) {
115
+ return getRootModule(module.parent);
116
+ } else {
117
+ return module;
118
+ }
119
+ };
100
120
  }).call(this);