@naanlang/naan 1.4.0 → 1.4.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.
Files changed (39) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/bin/index.js +25 -15
  4. package/dist/naan.min.js +5 -5
  5. package/frameworks/browser/sworker.js +23 -23
  6. package/frameworks/browser/terminals.nlg +1 -1
  7. package/frameworks/client/psm_client.nlg +2 -0
  8. package/frameworks/client/relaycon.nlg +1 -1
  9. package/frameworks/common/common.nlg +5 -2
  10. package/frameworks/node/filesystem.nlg +5 -4
  11. package/frameworks/node/psm_server.nlg +1 -1
  12. package/frameworks/node/shell.nlg +134 -0
  13. package/frameworks/node/worker.nlg +1 -1
  14. package/frameworks/project/build.nlg +1 -1
  15. package/frameworks/project/projects.nlg +1 -1
  16. package/frameworks/running/debugnub.nlg +102 -12
  17. package/frameworks/running/debugutil.nlg +30 -13
  18. package/frameworks/running/running.nlg +2 -2
  19. package/frameworks/running/sourcecode.nlg +3 -1
  20. package/frameworks/storage/dbt_pouch.nlg +29 -16
  21. package/frameworks/storage/file_manager.nlg +1 -1
  22. package/frameworks/storage/psm_dbtables.nlg +21 -22
  23. package/frameworks/storage/resources.nlg +12 -4
  24. package/frameworks/storage/storage.nlg +2 -2
  25. package/lib/browser/env_web.js +6 -6
  26. package/lib/core/naanlib.js +5 -5
  27. package/package.json +1 -1
  28. package/plugins/gitClient/gitClient.nlg +3 -3
  29. package/plugins/openSearch/openSearch.nlg +2 -2
  30. package/plugins/serviceAws/psm_aws.nlg +4 -2
  31. package/plugins/serviceAws/serviceAws.nlg +1 -1
  32. package/plugins/serviceGC/gc_api.nlg +4 -4
  33. package/plugins/serviceGitHub/serviceGitHub.nlg +1 -1
  34. package/plugins/serviceGitLab/psm_gitlab.nlg +1 -1
  35. package/plugins/serviceGitLab/serviceGitLab.nlg +1 -1
  36. package/test/harness.nlg +9 -9
  37. package/test/test_01_core.nlg +24 -2
  38. package/test/test_02_context.nlg +1 -1
  39. package/plugins/serviceGC/russian_trusted_root_ca_pem.crt +0 -33
package/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- **Naan for NPM** version **1.4.0+1** is released under the MIT License:
1
+ **Naan for NPM** version **1.4.1+1** is released under the MIT License:
2
2
 
3
3
  Copyright (c) 2017-2024 Zulch Laboratories, Inc.
4
4
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  Naan is an async-first software platform for rapid development.
5
5
 
6
6
  #### Release:
7
-      **Naan for NPM** version **1.4.0+1**
7
+      **Naan for NPM** version **1.4.1+1**
8
8
       Copyright (c) 2017-2024 Zulch Laboratories, Inc.
9
9
 
10
10
  #### Features
package/bin/index.js CHANGED
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * column positioning: // // !
9
9
  *
10
- * Copyright (c) 2021-2023 by Richard C. Zulch
10
+ * Copyright (c) 2021-2024 by Richard C. Zulch
11
11
  *
12
12
  */
13
13
 
14
14
  "use strict";
15
15
 
16
16
  /*
17
- * imports
17
+ * imports & environment
18
18
  *
19
19
  */
20
20
 
21
21
  var path = require("path");
22
22
  var fs = require("fs");
23
23
  var naanOptions = {};
24
+ var jspath = require("path");
25
+ var naanpath = path.join(__dirname, ".."); // path to naan, which is us
26
+ var rootpath = naanpath; // path to us, which is naan
27
+ var envpath = jspath.resolve(naanpath, 'lib/env_node.js'); // path to Naan loader
24
28
 
25
29
  /*
26
30
  * Process command-line arguments
@@ -30,7 +34,12 @@ var naanOptions = {};
30
34
  var cmd_file;
31
35
  var eval_text;
32
36
  var do_interactive;
33
- var cmd_text = "nodeparse('node_repl_init.nlg');;\n";
37
+ var cmd_text = ""
38
+ + `App.naanpath = '${ naanpath.replace(/\\/g, "\\\\") }';;\n` // path/to/our naan library
39
+ + `App.rootpath = '${ rootpath.replace(/\\/g, "\\\\") }';;\n` // path/to/our package.json
40
+ + "Naan.module.defineLoc('naanlib', App.naanpath);;\n" // defines "naanlib:" prefix for require
41
+ + "nodeparse('lib/node_repl_init.nlg');;\n" // REPL utility functions
42
+ + "App.shell = require('naanlib:frameworks/node/shell.nlg').ShellConnect({ cwd: js.d });;\n";
34
43
 
35
44
  process.argv.every((val, index) => {
36
45
  if (index < 2)
@@ -58,11 +67,11 @@ process.argv.every((val, index) => {
58
67
  return (true);
59
68
  }
60
69
  if (val == "--version") {
61
- console.log("1.4.0");
70
+ console.log("1.4.1");
62
71
  process.exit(0);
63
72
  }
64
73
  if (val == "--buildno") {
65
- console.log("1.4.0+1");
74
+ console.log("1.4.1+1");
66
75
  process.exit(0);
67
76
  }
68
77
  if (val.substring(0,1) == "-") {
@@ -97,10 +106,10 @@ if (eval_text) {
97
106
  naanOptions.noWelcome = true;
98
107
  if (!do_interactive)
99
108
  naanOptions.replDisable = true;
100
- cmd_text =
109
+ cmd_text = cmd_text.concat(
101
110
  "closure NodeREPL(local input, error, expr) {\n" +
102
111
 
103
- (do_interactive ? "" :
112
+ (do_interactive ? "" :
104
113
  " sudo(putproc(`exception, false))\n") +
105
114
 
106
115
  " input = new(textstream, js.expr)\n" +
@@ -114,15 +123,16 @@ if (eval_text) {
114
123
  " } else\n" +
115
124
 
116
125
  (cmd_file && !do_interactive ?
117
- " eval(expr)\n" :
126
+ " $(evalactive(expr))\n" :
118
127
 
119
128
  " {\n" +
120
- " if input.tokenlast().atom == `;;\n" +
121
- " eval(expr)\n" +
129
+ " $(evalactive(expr))\n" +
130
+ " if input.tokenlast().atom == `;; || $ === Naan.local.mu\n" +
131
+ " { }\n" +
122
132
  " else if input.tokenlast().atom == `;>\n" +
123
- " printline(eval(expr))\n" +
133
+ " printline($)\n" +
124
134
  " else\n" +
125
- " printline(Dialect.print(eval(expr)))\n" +
135
+ " printline(Dialect.print($))\n" +
126
136
  " }\n") +
127
137
 
128
138
  " }\n" +
@@ -138,7 +148,7 @@ if (eval_text) {
138
148
  " exec(quote(js.g.process.exit(if error 1 else 0)))\n") +
139
149
 
140
150
  " }\n" +
141
- "}();;\n";
151
+ "}();;\n");
142
152
  } else if (!process.stdin.isTTY) {
143
153
  console.log("naan: nothing specified and no TTY; exiting");
144
154
  process.exit(1);
@@ -150,9 +160,9 @@ if (eval_text) {
150
160
  *
151
161
  */
152
162
 
153
- var NaanNodeREPL = require('../lib/env_node.js');
163
+ var NaanNodeREPL = require(envpath);
154
164
  var naanrepl = new NaanNodeREPL(naanOptions);
155
- naanrepl.setDirectory(path.join(__dirname, "../lib"));
165
+ naanrepl.setDirectory(rootpath);
156
166
  if (eval_text)
157
167
  naanrepl.setGlobal("expr", eval_text + "\n");
158
168
  naanrepl.textCommand(cmd_text);