@naanlang/naan 1.3.2 → 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.
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/bin/index.js +25 -15
- package/dist/naan.min.js +5 -5
- package/frameworks/browser/sworker.js +23 -23
- package/frameworks/browser/terminals.nlg +26 -11
- package/frameworks/browser/ws_client.nlg +1 -1
- package/frameworks/client/psm_client.nlg +3 -1
- package/frameworks/client/relaycon.nlg +3 -2
- package/frameworks/common/common.nlg +5 -2
- package/frameworks/common/preferences.nlg +1 -1
- package/frameworks/node/apiserver.nlg +3 -3
- package/frameworks/node/filesystem.nlg +5 -4
- package/frameworks/node/psm_server.nlg +1 -1
- package/frameworks/node/shell.nlg +134 -0
- package/frameworks/node/worker.nlg +104 -46
- package/frameworks/project/build.nlg +1 -2
- package/frameworks/project/jszip.js +0 -0
- package/frameworks/project/projects.nlg +1 -1
- package/frameworks/running/debugnub.nlg +102 -12
- package/frameworks/running/debugutil.nlg +30 -13
- package/frameworks/running/executors.nlg +64 -28
- package/frameworks/running/running.nlg +85 -3
- package/frameworks/running/sourcecode.nlg +3 -1
- package/frameworks/running/taskexec.nlg +24 -4
- package/frameworks/storage/dbt_pouch.nlg +30 -17
- package/frameworks/storage/file_manager.nlg +1 -1
- package/frameworks/storage/psm.nlg +11 -1
- package/frameworks/storage/psm_dbtables.nlg +21 -22
- package/frameworks/storage/resources.nlg +12 -4
- package/frameworks/storage/storage.nlg +2 -2
- package/lib/browser/env_web.js +6 -6
- package/lib/browser/env_webworker.js +2 -0
- package/lib/core/naanlib.js +5 -5
- package/lib/env_nodeworker.js +2 -0
- package/package.json +1 -1
- package/plugins/gitClient/gitClient.nlg +3 -3
- package/plugins/gitClient/gitutils.nlg +2 -2
- package/plugins/nodeLib/node_https.nlg +2 -2
- package/plugins/openSearch/openSearch.nlg +2 -2
- package/plugins/serviceAws/lambda_naan_control.nlg +3 -3
- package/plugins/serviceAws/psm_aws.nlg +4 -2
- package/plugins/serviceAws/serviceAws.nlg +1 -1
- package/plugins/serviceGC/gc_api.nlg +5 -5
- package/plugins/serviceGitHub/gitops.nlg +4 -3
- package/plugins/serviceGitHub/psm_github.nlg +1 -1
- package/plugins/serviceGitHub/serviceGitHub.nlg +1 -1
- package/plugins/serviceGitLab/gitops.nlg +2 -1
- package/plugins/serviceGitLab/psm_gitlab.nlg +2 -2
- package/plugins/serviceGitLab/serviceGitLab.nlg +1 -1
- package/plugins/serviceYC/yc_vm.nlg +1 -1
- package/test/harness.nlg +9 -9
- package/test/test_01_core.nlg +24 -2
- package/test/test_02_context.nlg +2 -2
- package/test/test_07_lingo.nlg +3 -3
- package/plugins/serviceGC/russian_trusted_root_ca_pem.crt +0 -33
package/LICENSE.md
CHANGED
package/README.md
CHANGED
package/bin/index.js
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* column positioning: // // !
|
|
9
9
|
*
|
|
10
|
-
* Copyright (c) 2021-
|
|
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 = "
|
|
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.
|
|
70
|
+
console.log("1.4.1");
|
|
62
71
|
process.exit(0);
|
|
63
72
|
}
|
|
64
73
|
if (val == "--buildno") {
|
|
65
|
-
console.log("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
|
-
"
|
|
126
|
+
" $(evalactive(expr))\n" :
|
|
118
127
|
|
|
119
128
|
" {\n" +
|
|
120
|
-
"
|
|
121
|
-
"
|
|
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(
|
|
133
|
+
" printline($)\n" +
|
|
124
134
|
" else\n" +
|
|
125
|
-
" printline(Dialect.print(
|
|
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(
|
|
163
|
+
var NaanNodeREPL = require(envpath);
|
|
154
164
|
var naanrepl = new NaanNodeREPL(naanOptions);
|
|
155
|
-
naanrepl.setDirectory(
|
|
165
|
+
naanrepl.setDirectory(rootpath);
|
|
156
166
|
if (eval_text)
|
|
157
167
|
naanrepl.setGlobal("expr", eval_text + "\n");
|
|
158
168
|
naanrepl.textCommand(cmd_text);
|