@naanlang/naan 1.0.16 → 1.2.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.
Files changed (45) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +13 -11
  3. package/bin/index.js +4 -4
  4. package/dist/naan.min.js +14 -14
  5. package/frameworks/browser/https_request.nlg +26 -10
  6. package/frameworks/browser/sworker.js +26 -25
  7. package/frameworks/browser/terminals.nlg +118 -55
  8. package/frameworks/browser/ws_client.nlg +124 -0
  9. package/frameworks/client/apiclient.nlg +82 -116
  10. package/frameworks/client/psm_client.nlg +37 -16
  11. package/frameworks/client/relaycon.nlg +308 -0
  12. package/frameworks/common/common.nlg +1 -1
  13. package/frameworks/common/utils.nlg +40 -2
  14. package/frameworks/node/apiserver.nlg +342 -103
  15. package/frameworks/node/https_request.nlg +32 -6
  16. package/frameworks/node/node.nlg +60 -2
  17. package/frameworks/node/psm_server.nlg +11 -7
  18. package/frameworks/node/worker.nlg +22 -9
  19. package/frameworks/node/ws_client.nlg +127 -0
  20. package/frameworks/project/build.nlg +3 -2
  21. package/frameworks/project/projects.nlg +8 -2
  22. package/frameworks/running/debugnub.nlg +2 -2
  23. package/frameworks/running/debugutil.nlg +1 -1
  24. package/frameworks/running/executors.nlg +69 -17
  25. package/frameworks/running/sourcecode.nlg +2 -2
  26. package/frameworks/running/taskexec.nlg +25 -25
  27. package/frameworks/storage/dbt_pouch.nlg +8 -6
  28. package/frameworks/storage/file_manager.nlg +6 -3
  29. package/frameworks/storage/psm.nlg +5 -3
  30. package/frameworks/storage/psm_dbtables.nlg +75 -53
  31. package/frameworks/storage/resources.nlg +4 -2
  32. package/lib/browser/env_web.js +6 -6
  33. package/lib/browser/env_webworker.js +1 -1
  34. package/lib/core/naanlib.js +14 -14
  35. package/lib/env_node.js +97 -8
  36. package/lib/env_nodeworker.js +22 -4
  37. package/package.json +1 -1
  38. package/plugins/serviceAws/aws/lambda_rest_index.js +5 -1
  39. package/plugins/serviceAws/aws_dynamo.nlg +91 -32
  40. package/plugins/serviceAws/dbt_aws.nlg +5 -5
  41. package/plugins/serviceAws/psm_aws.nlg +2 -2
  42. package/test/harness.nlg +1 -1
  43. package/test/test_01_core.nlg +30 -4
  44. package/test/test_02_context.nlg +2 -2
  45. package/test/test_07_lingo.nlg +3 -0
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
- **Naan for NPM** version **1.0.16+1** is released under the MIT License:
1
+ **Naan for NPM** version **1.2.0+1** is released under the MIT License:
2
2
 
3
- Copyright (c) 2017-2023 Zulch Laboratories, Inc.
3
+ Copyright (c) 2017-2024 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.0.16+1**
8
-      Copyright (c) 2017-2023 Zulch Laboratories, Inc.
7
+      **Naan for NPM** version **1.2.0+1**
8
+      Copyright (c) 2017-2024 Zulch Laboratories, Inc.
9
9
 
10
10
  #### Features
11
11
  - **Naan** runs in NodeJS and web browsers using JavaScript
@@ -37,7 +37,7 @@ For use as a library in the current project:
37
37
 
38
38
  naan [options] [source file] [arguments]
39
39
 
40
- With no arguments Naan runs as an interactive REPL using the node.js terminal.
40
+ With no arguments Naan runs as an interactive REPL using the node.js terminal.
41
41
  It can also evaluate an expression or execute a source file.
42
42
 
43
43
  ##### Command line usage
@@ -65,7 +65,7 @@ Define a function, call it, and return the length of the base-10 result. First r
65
65
  Fetch your public IP from a website (NodeJS version 18 or later):
66
66
 
67
67
  ```
68
- % naan -e "new(await(await(js.g.fetch('http://ip.jsontest.com/')).1.json()).1)"
68
+ % naan -e "new(await(await((js.g||js.w).fetch('https://api.ipify.org/?format=json')).1.json()).1)"
69
69
  { ip: "64.205.147.202" }
70
70
  ```
71
71
 
@@ -84,12 +84,14 @@ Now make it executable with chmod:
84
84
 
85
85
  #### For More Information
86
86
 
87
- [NaanIDE](https://www.npmjs.com/package/@naanlang/naanide) -- the Naan IDE -- includes more detailed documentation on Naan.
87
+ [www.naanlang.org](https://www.naanlang.org) has tutorials, explanations, and how-to articles.
88
+ The [NaanIDE](https://www.npmjs.com/package/@naanlang/naanide) installation includes reference documentation.
89
+ Please email [Richard Zulch](mailto:naanlang@zulchlabs.com) with questions and comments.
88
90
 
89
91
  #### Dependencies:
90
- We gratefully acknowledge these software packages used with Naan:
91
- - [jszip.js](http://stuartk.com/jszip) - read and write zip files
92
- - [NodeJS-path](https://nodejs.org/) - NodeJS path utilities
93
- - [PouchDB](https://pouchdb.com/) - synchronizing database
94
- - [SparkMD5](https://github.com/satazor/js-spark-md5) - browser MD5 library
95
- - [UglifyJS](https://github.com/mishoo/UglifyJS) - JavaScript code minifier
92
+ We gratefully acknowledge these software packages used with Naan:
93
+ - [jszip.js](http://stuartk.com/jszip) - read and write zip files
94
+ - [NodeJS-path](https://nodejs.org/) - NodeJS path utilities
95
+ - [PouchDB](https://pouchdb.com/) - synchronizing database
96
+ - [SparkMD5](https://github.com/satazor/js-spark-md5) - browser MD5 library
97
+ - [UglifyJS](https://github.com/mishoo/UglifyJS) - JavaScript code minifier
package/bin/index.js CHANGED
@@ -58,11 +58,11 @@ process.argv.every((val, index) => {
58
58
  return (true);
59
59
  }
60
60
  if (val == "--version") {
61
- console.log("1.0.16");
61
+ console.log("1.2.0");
62
62
  process.exit(0);
63
63
  }
64
64
  if (val == "--buildno") {
65
- console.log("1.0.16+1");
65
+ console.log("1.2.0+1");
66
66
  process.exit(0);
67
67
  }
68
68
  if (val.substring(0,1) == "-") {
@@ -104,7 +104,7 @@ if (eval_text) {
104
104
  " sudo(putproc(`exception, false))\n") +
105
105
 
106
106
  " input = new(textstream, js.expr)\n" +
107
- " Naan.runtimelib.driver.setOptions({prompt:false})\n" +
107
+ " Naan.runtimelib.curdriver().setOptions({prompt:false})\n" +
108
108
  " try {\n" +
109
109
  " loop {\n" +
110
110
  " `(error, expr) = Dialect.parse(input)\n" +
@@ -133,7 +133,7 @@ if (eval_text) {
133
133
  " }\n" +
134
134
  " } finally {\n" +
135
135
 
136
- (do_interactive ? "Naan.runtimelib.driver.setOptions({prompt:true})\n" :
136
+ (do_interactive ? "Naan.runtimelib.curdriver().setOptions({prompt:true})\n" :
137
137
  " sleep(1)\n" +
138
138
  " exec(quote(js.g.process.exit(if error 1 else 0)))\n") +
139
139