@naanlang/naan 1.0.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 +21 -0
- package/README.md +46 -0
- package/dist/env_web.js +431 -0
- package/dist/naan.min.js +73 -0
- package/frameworks/browser/browser.nlg +30 -0
- package/frameworks/browser/pouchdb/pouchdb.min.js +7 -0
- package/frameworks/browser/spark-md5/spark-md5.min.js +1 -0
- package/frameworks/browser/sworker.js +192 -0
- package/frameworks/browser/terminals.nlg +787 -0
- package/frameworks/browser/workers.nlg +386 -0
- package/frameworks/client/apiclient.nlg +183 -0
- package/frameworks/client/client.nlg +29 -0
- package/frameworks/client/psm_client.nlg +572 -0
- package/frameworks/common/common.nlg +464 -0
- package/frameworks/common/preferences.nlg +131 -0
- package/frameworks/common/repltools.nlg +100 -0
- package/frameworks/common/watching.nlg +97 -0
- package/frameworks/node/apiserver.nlg +399 -0
- package/frameworks/node/filesystem.nlg +1012 -0
- package/frameworks/node/gitter.nlg +234 -0
- package/frameworks/node/node.nlg +81 -0
- package/frameworks/node/psm_server.nlg +465 -0
- package/frameworks/node/worker.nlg +560 -0
- package/frameworks/project/build.nlg +1229 -0
- package/frameworks/project/jszip.js +30 -0
- package/frameworks/project/jszip.nlg +87 -0
- package/frameworks/project/proj_cliser.nlg +139 -0
- package/frameworks/project/proj_console.nlg +137 -0
- package/frameworks/project/proj_folder.nlg +143 -0
- package/frameworks/project/proj_lambda.nlg +137 -0
- package/frameworks/project/proj_static.nlg +138 -0
- package/frameworks/project/project.nlg +29 -0
- package/frameworks/project/projects.nlg +587 -0
- package/frameworks/project/uglifyjs.js +1 -0
- package/frameworks/project/uglifyjs.nlg +79 -0
- package/frameworks/running/debugcom.nlg +163 -0
- package/frameworks/running/debugnub.nlg +565 -0
- package/frameworks/running/debugutil.nlg +510 -0
- package/frameworks/running/executors.nlg +767 -0
- package/frameworks/running/running.nlg +151 -0
- package/frameworks/running/sourcecode.nlg +346 -0
- package/frameworks/running/taskexec.nlg +196 -0
- package/frameworks/storage/dbt_pouch.nlg +773 -0
- package/frameworks/storage/file_manager.nlg +772 -0
- package/frameworks/storage/psm.nlg +326 -0
- package/frameworks/storage/psm_dbtables.nlg +814 -0
- package/frameworks/storage/resources.nlg +445 -0
- package/frameworks/storage/storage.nlg +52 -0
- package/lib/browser/env_web.js +431 -0
- package/lib/browser/env_webworker.js +146 -0
- package/lib/browser/require.js +1653 -0
- package/lib/core/naanlib.js +73 -0
- package/lib/env_node.js +282 -0
- package/lib/env_nodeworker.js +165 -0
- package/lib/node_repl.js +25 -0
- package/lib/node_repl_init.nlg +52 -0
- package/package.json +13 -0
- package/plugins/gitClient/clientops.nlg +317 -0
- package/plugins/gitClient/gitClient.nlg +63 -0
- package/plugins/gitClient/gitutils.nlg +1331 -0
- package/plugins/gitClient/minimatch.js +945 -0
- package/plugins/gitClient/minimatch_license.txt +15 -0
- package/plugins/gitClient/minimatch_readme.md +208 -0
- package/plugins/nodeLib/nodeLib.nlg +26 -0
- package/plugins/nodeLib/node_cp.nlg +65 -0
- package/plugins/nodeLib/node_fs.nlg +137 -0
- package/plugins/nodeLib/node_https.nlg +172 -0
- package/plugins/nodeLib/node_util.nlg +180 -0
- package/plugins/serviceAws/aws/aws-sdk.min.js +88 -0
- package/plugins/serviceAws/aws/lambda_rest_index.js +122 -0
- package/plugins/serviceAws/aws/lambda_rest_init.nlg +58 -0
- package/plugins/serviceAws/aws/lambda_ws_index.js +498 -0
- package/plugins/serviceAws/aws/lambda_ws_init.nlg +49 -0
- package/plugins/serviceAws/aws_cloudwatchlogs.nlg +122 -0
- package/plugins/serviceAws/aws_cognito.nlg +76 -0
- package/plugins/serviceAws/aws_dynamo.nlg +509 -0
- package/plugins/serviceAws/aws_lambda.nlg +95 -0
- package/plugins/serviceAws/aws_s3.nlg +134 -0
- package/plugins/serviceAws/aws_utils.nlg +86 -0
- package/plugins/serviceAws/dbt_aws.nlg +769 -0
- package/plugins/serviceAws/lambda_naan_control.nlg +175 -0
- package/plugins/serviceAws/psm_aws.nlg +258 -0
- package/plugins/serviceAws/serviceAws.nlg +38 -0
- package/plugins/serviceGitHub/gitops.nlg +522 -0
- package/plugins/serviceGitHub/psm_github.nlg +205 -0
- package/plugins/serviceGitHub/serviceGitHub.nlg +65 -0
- package/plugins/serviceGitLab/gitops.nlg +528 -0
- package/plugins/serviceGitLab/psm_gitlab.nlg +205 -0
- package/plugins/serviceGitLab/serviceGitLab.nlg +65 -0
- package/test/harness.nlg +312 -0
- package/test/node_test.js +33 -0
- package/test/test_01_core.nlg +768 -0
- package/test/test_02_context.nlg +269 -0
- package/test/test_03_jsinterop.nlg +137 -0
- package/test/test_04_numerics.nlg +450 -0
- package/test/test_05_strings.nlg +63 -0
- package/test/test_06_lingoparse.nlg +500 -0
- package/test/test_07_lingo.nlg +623 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* uglifyjs.nlg
|
|
3
|
+
* Naanlib/frameworks/project/
|
|
4
|
+
*
|
|
5
|
+
* Naan wrapper for the UglifyJS library.
|
|
6
|
+
*
|
|
7
|
+
* Origin:
|
|
8
|
+
* https://github.com/mishoo/UglifyJS
|
|
9
|
+
*
|
|
10
|
+
* License:
|
|
11
|
+
* BSD
|
|
12
|
+
*
|
|
13
|
+
* Installation:
|
|
14
|
+
* npm install uglify-js -g
|
|
15
|
+
* uglifyjs --self -c -m -o uglifyjs.js
|
|
16
|
+
*
|
|
17
|
+
* column positioning: // // !
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2021 by Richard C. Zulch
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* UglifyJS
|
|
26
|
+
*
|
|
27
|
+
* Construct a UglifyJS wrapper object.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
closure UglifyJS(local uglify) {
|
|
32
|
+
uglify = new(object, this)
|
|
33
|
+
|
|
34
|
+
// reload
|
|
35
|
+
// Load the library if needed, and throw an exception if unavailable.
|
|
36
|
+
|
|
37
|
+
function reload() {
|
|
38
|
+
if !uglify.jslib {
|
|
39
|
+
uglify.jslib = JsLoadScript("frameworks/project/uglifyjs.js", "UglifyJS")
|
|
40
|
+
if !uglify.jslib
|
|
41
|
+
return (list(Error("UglifyJS not accessible")))
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// minify
|
|
46
|
+
// Minify some code.
|
|
47
|
+
uglify.minify = function minify(code, options, local result) {
|
|
48
|
+
reload()
|
|
49
|
+
result = uglify.jslib.minify(code, options)
|
|
50
|
+
if result.error
|
|
51
|
+
list(Error("UglifyJS error:", result.error.message, "file:", result.error.filename, "line:", result.error.line, "col:", result.error.col))
|
|
52
|
+
else
|
|
53
|
+
list(false, result.code)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// finis
|
|
57
|
+
|
|
58
|
+
reload()
|
|
59
|
+
if uglify.jslib
|
|
60
|
+
uglify
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* uglifyInit
|
|
66
|
+
*
|
|
67
|
+
* Initialize the module.
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
function uglifyInit(local manifest) {
|
|
72
|
+
manifest = `(UglifyJS, uglifyInit)
|
|
73
|
+
|
|
74
|
+
Naan.module.build(module.id, "uglifyjs", function(modobj, compobj) {
|
|
75
|
+
require("./project.nlg")
|
|
76
|
+
compobj.manifest = manifest
|
|
77
|
+
module.exports.UglifyJS = UglifyJS
|
|
78
|
+
})
|
|
79
|
+
} ();
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* debugcom.nlg
|
|
3
|
+
*
|
|
4
|
+
* Debug commander interface to remote debugging.
|
|
5
|
+
*
|
|
6
|
+
* column positioning: // // !
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2021 by Richard C. Zulch
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* DebugCommand
|
|
15
|
+
*
|
|
16
|
+
* Create a debug commander for local debugger access to the remote executor.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
closure DebugCommand(executor, notify, local decom, excon) {
|
|
21
|
+
decom = new(object, this)
|
|
22
|
+
executor.DebugCmd({
|
|
23
|
+
op: "attach"
|
|
24
|
+
})
|
|
25
|
+
decom.executor = executor
|
|
26
|
+
|
|
27
|
+
// debugData
|
|
28
|
+
// Debug data has arrived from the remote debugger.
|
|
29
|
+
//
|
|
30
|
+
decom.debugData = function debugData(msg) {
|
|
31
|
+
// ### debuglog("DebugCommand data:", totuple(msg))
|
|
32
|
+
if msg.error
|
|
33
|
+
debuglog(" ", ErrorString(msg.error))
|
|
34
|
+
if msg.op == "pauser" {
|
|
35
|
+
decom.entryReason = msg.entry
|
|
36
|
+
decom.running = msg.depth <= 1 && !msg.entry
|
|
37
|
+
decom.bpenable = msg.bpenable
|
|
38
|
+
decom.exenable = msg.exenable
|
|
39
|
+
notify.runState(debugStatus())
|
|
40
|
+
} else if msg.op == "status" {
|
|
41
|
+
decom.running = msg.depth == 0
|
|
42
|
+
decom.bpenable = msg.bpenable
|
|
43
|
+
decom.exenable = msg.exenable
|
|
44
|
+
notify.runState(debugStatus())
|
|
45
|
+
} else if msg.op == "exception" {
|
|
46
|
+
decom.running = false
|
|
47
|
+
if array(msg.exceptstr)
|
|
48
|
+
msg.exceptstr = totuple(msg.exceptstr)
|
|
49
|
+
if array(msg.exception)
|
|
50
|
+
msg.exception = totuple(msg.exception)
|
|
51
|
+
notify.hitException(msg)
|
|
52
|
+
} else if msg.op == "breakpoint" {
|
|
53
|
+
decom.running = false
|
|
54
|
+
notify.hitBreakpoint(msg)
|
|
55
|
+
} else if msg.op == "stepped" {
|
|
56
|
+
decom.running = false
|
|
57
|
+
notify.hitStep(msg)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// detach
|
|
62
|
+
// Detach from the remote debugger, rendering this commander obsolete.
|
|
63
|
+
//
|
|
64
|
+
decom.detach = function detach() {
|
|
65
|
+
decom.executor.DebugCmd({
|
|
66
|
+
op: "detach"
|
|
67
|
+
})
|
|
68
|
+
decom.executor = false
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// context
|
|
72
|
+
// Obtain a remote execution context object. This returns a standard `(error, context) tuple.
|
|
73
|
+
//
|
|
74
|
+
decom.context = function context() {
|
|
75
|
+
if excon
|
|
76
|
+
excon
|
|
77
|
+
else
|
|
78
|
+
excon = executor.context()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// remote
|
|
82
|
+
// Obtain a remote debug utilities object. This returns just the new object.
|
|
83
|
+
//
|
|
84
|
+
decom.remote = function remote() {
|
|
85
|
+
DebugRemote(decom)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// debugStatus
|
|
89
|
+
// Report the debug status in a dictionary.
|
|
90
|
+
//
|
|
91
|
+
decom.debugStatus = function debugStatus(local status) {
|
|
92
|
+
status = { }
|
|
93
|
+
status.running = decom.running
|
|
94
|
+
status.bpenable = decom.bpenable
|
|
95
|
+
status.exenable = decom.exenable
|
|
96
|
+
status
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//
|
|
100
|
+
// Run control.
|
|
101
|
+
//
|
|
102
|
+
|
|
103
|
+
decom.pause = function pause() {
|
|
104
|
+
decom.executor.DebugCmd({
|
|
105
|
+
op: "pause"
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
decom.resume = function resume() {
|
|
110
|
+
decom.executor.DebugCmd({
|
|
111
|
+
op: "resume"
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
decom.stepOver = function stepOver() {
|
|
116
|
+
decom.executor.DebugCmd({
|
|
117
|
+
op: "stepover"
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
decom.stepInto = function stepInto() {
|
|
122
|
+
decom.executor.DebugCmd({
|
|
123
|
+
op: "stepinto"
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
decom.stepOut = function stepOut() {
|
|
128
|
+
decom.executor.DebugCmd({
|
|
129
|
+
op: "stepout"
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
decom.stop = function stop() {
|
|
134
|
+
decom.executor.DebugCmd({
|
|
135
|
+
op: "stop"
|
|
136
|
+
})
|
|
137
|
+
decom.running = true
|
|
138
|
+
notify.runState(debugStatus())
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// finis
|
|
142
|
+
|
|
143
|
+
decom
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* dcomInit
|
|
149
|
+
*
|
|
150
|
+
* Initialize the component.
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
function dcomInit(local manifest) {
|
|
155
|
+
manifest = `(DebugCommand, dcomInit)
|
|
156
|
+
|
|
157
|
+
Naan.module.build(module.id, "debugcom", function(modobj, compobj) {
|
|
158
|
+
require("./running.nlg")
|
|
159
|
+
compobj.manifest = manifest
|
|
160
|
+
modobj.exports.DebugCommand = DebugCommand
|
|
161
|
+
require("./debugutil.nlg")
|
|
162
|
+
})
|
|
163
|
+
} ();
|