@naanlang/naan 1.4.3 → 1.5.0
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 +2 -2
- package/README.md +4 -4
- package/bin/index.js +22 -3
- package/dist/env_web.js +2 -2
- package/dist/naan.min.js +6 -6
- package/frameworks/browser/browser.nlg +2 -2
- package/frameworks/browser/https_request.nlg +39 -10
- package/frameworks/browser/sworker.js +23 -23
- package/frameworks/browser/terminals.nlg +33 -24
- package/frameworks/client/apiclient.nlg +31 -18
- package/frameworks/client/client.nlg +22 -2
- package/frameworks/client/psm_client.nlg +12 -3
- package/frameworks/node/filesystem.nlg +9 -7
- package/frameworks/node/gitter.nlg +9 -7
- package/frameworks/node/http_request.nlg +103 -0
- package/frameworks/node/https_request.nlg +42 -9
- package/frameworks/node/node.nlg +1 -0
- package/frameworks/node/shell.nlg +4 -4
- package/frameworks/node/worker.nlg +1 -0
- package/frameworks/project/projects.nlg +2 -1
- package/frameworks/running/executors.nlg +26 -7
- package/frameworks/running/taskexec.nlg +48 -14
- package/frameworks/storage/dbt_pouch.nlg +26 -13
- package/frameworks/storage/psm.nlg +39 -5
- package/frameworks/storage/psm_dbtables.nlg +10 -2
- package/lib/browser/env_web.js +9 -9
- package/lib/browser/env_webworker.js +1 -2
- package/lib/core/naanlib.js +6 -6
- package/lib/env_node.js +9 -3
- package/lib/node_repl_init.nlg +2 -2
- package/package.json +1 -1
- package/plugins/nodeLib/node_util.nlg +14 -7
- package/plugins/openSearch/os_dynamo.nlg +5 -5
- package/plugins/serviceAws/aws_cloudwatchlogs.nlg +2 -1
- package/plugins/serviceAws/aws_dynamo.nlg +26 -8
- package/plugins/serviceAws/aws_s3.nlg +3 -3
- package/plugins/serviceAws/aws_sqs.nlg +3 -1
- package/plugins/serviceAws/aws_utils.nlg +3 -1
- package/plugins/serviceAws/aws_vm.nlg +198 -0
- package/plugins/serviceAws/dbt_aws.nlg +22 -20
- package/plugins/serviceAws/psm_aws.nlg +2 -1
- package/plugins/serviceGC/gc_api.nlg +1 -0
- package/plugins/serviceNexara/serviceNexara.nlg +32 -0
- package/plugins/serviceNexara/speechrec.nlg +160 -0
- package/plugins/serviceYC/serviceYC.nlg +2 -3
- package/plugins/serviceYC/yc_speechrec.nlg +4 -3
- package/plugins/serviceYC/yc_vm.nlg +44 -54
- package/test/test_01_core.nlg +42 -33
- package/test/test_03_jsinterop.nlg +35 -6
- package/plugins/serviceGC/russian_trusted_root_ca_pem.crt +0 -33
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
**NaaN for NPM** version **1.
|
|
1
|
+
**NaaN for NPM** version **1.5.0+1** is released under the MIT License:
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2025 Zulch Laboratories, Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
NaaN is an async-first software platform for rapid development.
|
|
5
5
|
|
|
6
6
|
#### Release:
|
|
7
|
-
**NaaN for NPM** version **1.
|
|
8
|
-
Copyright (c) 2017-
|
|
7
|
+
**NaaN for NPM** version **1.5.0+1**
|
|
8
|
+
Copyright (c) 2017-2025 Zulch Laboratories, Inc.
|
|
9
9
|
|
|
10
10
|
#### Features
|
|
11
11
|
- **NaaN** runs in NodeJS and web browsers using JavaScript
|
|
@@ -23,7 +23,7 @@ NaaN is an async-first software platform for rapid development.
|
|
|
23
23
|
|
|
24
24
|
#### Installation
|
|
25
25
|
|
|
26
|
-
Please ensure you have a recent version of [node.js](http://nodejs.org/). The minimum is `
|
|
26
|
+
Please ensure you have a recent version of [node.js](http://nodejs.org/). The minimum is `v20.10.0`
|
|
27
27
|
|
|
28
28
|
For use everywhere as a command line app:
|
|
29
29
|
|
|
@@ -62,7 +62,7 @@ Define a function, call it, and return the length of the base-10 result. First r
|
|
|
62
62
|
% naan -e "function factr(x,a){if x>0 factr(x-1,x*a) else a}(10000,1).length"
|
|
63
63
|
35660
|
|
64
64
|
```
|
|
65
|
-
Fetch your public IP from a website
|
|
65
|
+
Fetch your public IP from a website:
|
|
66
66
|
|
|
67
67
|
```
|
|
68
68
|
% naan -e "new(await(await((js.g||js.w).fetch('https://api.ipify.org/?format=json')).1.json()).1)"
|
package/bin/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* column positioning: // // !
|
|
9
9
|
*
|
|
10
|
-
* Copyright (c) 2021-
|
|
10
|
+
* Copyright (c) 2021-2025 by Richard C. Zulch
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
@@ -26,6 +26,7 @@ var naanpath = path.join(__dirname, ".."); // p
|
|
|
26
26
|
var rootpath = naanpath; // path to us, which is naan
|
|
27
27
|
var envpath = jspath.resolve(naanpath, 'lib/env_node.js'); // path to Naan loader
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
/*
|
|
30
31
|
* Process command-line arguments
|
|
31
32
|
*
|
|
@@ -35,6 +36,7 @@ var cmd_file;
|
|
|
35
36
|
var eval_text;
|
|
36
37
|
var do_interactive;
|
|
37
38
|
var cmd_text = ""
|
|
39
|
+
+ "chns('Start');;\n"
|
|
38
40
|
+ `App.naanpath = '${ naanpath.replace(/\\/g, "\\\\") }';;\n` // path/to/our naan library
|
|
39
41
|
+ `App.rootpath = '${ rootpath.replace(/\\/g, "\\\\") }';;\n` // path/to/our package.json
|
|
40
42
|
+ "Naan.module.defineLoc('naanlib', App.naanpath);;\n" // defines "naanlib:" prefix for require
|
|
@@ -67,11 +69,11 @@ process.argv.every((val, index) => {
|
|
|
67
69
|
return (true);
|
|
68
70
|
}
|
|
69
71
|
if (val == "--version") {
|
|
70
|
-
console.log("1.
|
|
72
|
+
console.log("1.5.0");
|
|
71
73
|
process.exit(0);
|
|
72
74
|
}
|
|
73
75
|
if (val == "--buildno") {
|
|
74
|
-
console.log("1.
|
|
76
|
+
console.log("1.5.0+1");
|
|
75
77
|
process.exit(0);
|
|
76
78
|
}
|
|
77
79
|
if (val.substring(0,1) == "-") {
|
|
@@ -155,11 +157,28 @@ if (eval_text) {
|
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
|
|
160
|
+
/*
|
|
161
|
+
* versionCheck
|
|
162
|
+
*
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
function versionCheck(minver) {
|
|
166
|
+
var rxver = /([0-9]+)[.]([0-9]+)[.]([0-9]+)/;
|
|
167
|
+
minver = minver.match(rxver).map(function(x){ return(Number.parseInt(x)) });
|
|
168
|
+
var curver = process.version.match(rxver).map(function(x){ return(Number.parseInt(x)) });
|
|
169
|
+
return (minver[1] < curver[1] || minver[1] == curver[1] && (minver[2] < curver[2] || minver[2] == curver[2] && minver[3] <= curver[3]));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
158
173
|
/*
|
|
159
174
|
* Execute Naan
|
|
160
175
|
*
|
|
161
176
|
*/
|
|
162
177
|
|
|
178
|
+
if (!versionCheck("v20.10.0")) {
|
|
179
|
+
console.log(`naan: nodejs ${ process.version } too old, requires v20.10.0 or newer`);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
163
182
|
var NaanNodeREPL = require(envpath);
|
|
164
183
|
var naanrepl = new NaanNodeREPL(naanOptions);
|
|
165
184
|
naanrepl.setDirectory(rootpath);
|
package/dist/env_web.js
CHANGED
|
@@ -550,7 +550,7 @@ exports.NaanControllerWeb = function() {
|
|
|
550
550
|
localStorage.removeItem("NaanState_Hosted");
|
|
551
551
|
return (false);
|
|
552
552
|
}
|
|
553
|
-
if (
|
|
553
|
+
if ("nosave" in querystrings)
|
|
554
554
|
return (false);
|
|
555
555
|
var statedoc = makeState();
|
|
556
556
|
var statestr = JSON.stringify(statedoc);
|
|
@@ -631,7 +631,7 @@ exports.NaanControllerWeb = function() {
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
/*jshint sub:true */
|
|
634
|
-
if (
|
|
634
|
+
if ("restart" in querystrings || !loadLocal())
|
|
635
635
|
{ // don't load state or can't load state
|
|
636
636
|
naanlib.banner();
|
|
637
637
|
var hostpath = window.location.origin.concat(naanlib.js.r("path").dirname(window.location.pathname));
|