@naanlang/naan 1.0.0 → 1.0.3

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 (37) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +37 -8
  3. package/bin/index.js +148 -0
  4. package/dist/env_web.js +145 -16
  5. package/dist/naan.min.js +5 -5
  6. package/frameworks/browser/sworker.js +309 -91
  7. package/frameworks/browser/terminals.nlg +22 -9
  8. package/frameworks/browser/workers.nlg +19 -11
  9. package/frameworks/client/apiclient.nlg +17 -4
  10. package/frameworks/client/psm_client.nlg +116 -53
  11. package/frameworks/common/common.nlg +12 -2
  12. package/frameworks/node/apiserver.nlg +25 -13
  13. package/frameworks/node/filesystem.nlg +173 -30
  14. package/frameworks/node/psm_server.nlg +95 -32
  15. package/frameworks/project/build.nlg +40 -23
  16. package/frameworks/project/projects.nlg +47 -26
  17. package/frameworks/running/debugnub.nlg +2 -5
  18. package/frameworks/storage/csv.nlg +120 -0
  19. package/frameworks/storage/dbt_pouch.nlg +41 -25
  20. package/frameworks/storage/psm.nlg +108 -28
  21. package/frameworks/storage/psm_dbtables.nlg +7 -3
  22. package/frameworks/storage/resources.nlg +30 -2
  23. package/lib/browser/env_web.js +147 -18
  24. package/lib/browser/env_webworker.js +1 -1
  25. package/lib/browser/require.js +1 -1
  26. package/lib/core/naanlib.js +5 -5
  27. package/lib/env_node.js +14 -2
  28. package/lib/node_repl.js +2 -2
  29. package/package.json +4 -1
  30. package/plugins/serviceAws/aws_cloudwatchlogs.nlg +1 -1
  31. package/plugins/serviceAws/aws_dynamo.nlg +625 -141
  32. package/plugins/serviceAws/aws_dynextra.nlg +294 -0
  33. package/plugins/serviceAws/dbt_aws.nlg +31 -11
  34. package/plugins/serviceAws/psm_aws.nlg +42 -26
  35. package/plugins/serviceAws/serviceAws.nlg +1 -0
  36. package/plugins/serviceGitHub/psm_github.nlg +41 -25
  37. package/plugins/serviceGitLab/psm_gitlab.nlg +41 -25
package/lib/env_node.js CHANGED
@@ -44,6 +44,9 @@ exports.NaanNodeREPL = function NaanNodeREPL(options) {
44
44
  naanlib.js.t = this; // allow us to be accessed from Naan
45
45
  var termops;
46
46
  var outEnable = !options.replDisable;
47
+ var useConsoleOut = false;
48
+ if (outEnable && process.env["RUNKIT_ENDPOINT_URL"])
49
+ useConsoleOut = true; // use console.log for output in RunKit
47
50
 
48
51
 
49
52
  //==========================================================================
@@ -57,7 +60,11 @@ exports.NaanNodeREPL = function NaanNodeREPL(options) {
57
60
  this.setDirectory = function setDirectory(path) { // override base directory
58
61
  naanlib.js.d = path;
59
62
  };
60
-
63
+
64
+ this.setGlobal = function setGlobal(key, value) { // set a global value
65
+ naanlib.js[key] = value;
66
+ };
67
+
61
68
  this.textCommand = function textCommand(cmd) { // send a command without echo
62
69
  outEnable = true;
63
70
  naanlib.textLine(cmd);
@@ -127,7 +134,12 @@ exports.NaanNodeREPL = function NaanNodeREPL(options) {
127
134
  }, 1);
128
135
  }
129
136
  } else if (outEnable) {
130
- process.stdout.write(text);
137
+ if (useConsoleOut) { // stdout doesn't work
138
+ text = text.replace(/\r?\n$/, ""); // console.log already does a newline
139
+ console.log(text);
140
+ }
141
+ else
142
+ process.stdout.write(text);
131
143
  textToRemoteTerm(text);
132
144
  }
133
145
  });
package/lib/node_repl.js CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * column positioning: // // !
8
8
  *
9
- * Copyright (c) 2021 by Richard C. Zulch
9
+ * Copyright (c) 2021-2022 by Richard C. Zulch
10
10
  *
11
11
  */
12
12
 
@@ -22,4 +22,4 @@ var NaanNodeREPL = require('./env_node.js');
22
22
 
23
23
  var naanrepl = new NaanNodeREPL();
24
24
  naanrepl.setDirectory(__dirname);
25
- naanrepl.textCommand("nodeparse('node_repl_init.nlg');;");
25
+ naanrepl.textCommand("nodeparse('node_repl_init.nlg');;\n");
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@naanlang/naan",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "author": "Richard C. Zulch",
5
5
  "description": "Naan™ software platform",
6
6
  "main": "./lib/core/naanlib.js",
7
7
  "browser": "./dist/naanlib.min.js",
8
8
  "license" : "MIT",
9
+ "bin": {
10
+ "naan": "./bin/index.js"
11
+ },
9
12
  "scripts": {
10
13
  "start": "node lib/node_repl.js",
11
14
  "test": "node test/node_test.js"
@@ -114,7 +114,7 @@ function cwlogsInit(local manifest) {
114
114
  manifest = `(CloudWatchLogs, cwlogsInit)
115
115
 
116
116
  Naan.module.build(module.id, "aws_cloudwatchlogs", function(modobj, compobj) {
117
- require("./aws_utils.nlg")
117
+ require("./serviceAws.nlg")
118
118
  compobj.manifest = manifest
119
119
  modobj.exports.CloudWatchLogs = CloudWatchLogs
120
120
  })