@naanlang/naan 1.0.5 → 1.0.6
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 +2 -2
- package/dist/env_web.js +4 -1
- package/dist/naan.min.js +1 -1
- package/frameworks/browser/sworker.js +16 -16
- package/frameworks/client/apiclient.nlg +1 -1
- package/frameworks/client/psm_client.nlg +12 -4
- package/frameworks/common/common.nlg +10 -2
- package/frameworks/node/apiserver.nlg +2 -2
- package/frameworks/node/filesystem.nlg +32 -15
- package/frameworks/node/psm_server.nlg +11 -2
- package/frameworks/project/build.nlg +13 -7
- package/frameworks/project/projects.nlg +20 -5
- package/frameworks/running/executors.nlg +0 -1
- package/lib/browser/env_web.js +8 -5
- package/lib/core/naanlib.js +1 -1
- package/package.json +1 -1
- package/plugins/serviceAws/aws_dynamo.nlg +1 -1
package/LICENSE.md
CHANGED
package/README.md
CHANGED
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.
|
|
61
|
+
console.log("1.0.6");
|
|
62
62
|
process.exit(0);
|
|
63
63
|
}
|
|
64
64
|
if (val == "--buildno") {
|
|
65
|
-
console.log("1.0.
|
|
65
|
+
console.log("1.0.6-2");
|
|
66
66
|
process.exit(0);
|
|
67
67
|
}
|
|
68
68
|
if (val.substring(0,1) == "-") {
|
package/dist/env_web.js
CHANGED
|
@@ -309,8 +309,11 @@ exports.NaanControllerWeb = function() {
|
|
|
309
309
|
//
|
|
310
310
|
|
|
311
311
|
this.VsiteRefresh = function VsiteRefresh(url_origin) {
|
|
312
|
-
if (window.location.href.startsWith(url_origin))
|
|
312
|
+
if (window.location.href.startsWith(url_origin)) {
|
|
313
313
|
window.location.reload(); // we have changed underneath
|
|
314
|
+
return (true);
|
|
315
|
+
}
|
|
316
|
+
return (false);
|
|
314
317
|
};
|
|
315
318
|
|
|
316
319
|
|
package/dist/naan.min.js
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
var CurrentCacheName = "Naanlang-1.0.
|
|
39
|
+
var CurrentCacheName = "Naanlang-1.0.6-2";
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
//
|
|
@@ -89,11 +89,11 @@ var waitingForInit = []; // initialization functions, or
|
|
|
89
89
|
var pubVersion = event.data.hereIsMyVersion;
|
|
90
90
|
var sourceId = event.source.id; // client id of sender of message
|
|
91
91
|
msgPorts[sourceId] = msgport;
|
|
92
|
-
console.log("[1.0.
|
|
93
|
-
if (pubVersion != "1.0.
|
|
92
|
+
console.log("[1.0.6-2] received new msgport for", sourceId, pubID, "-", pubVersion);
|
|
93
|
+
if (pubVersion != "1.0.6-2")
|
|
94
94
|
msgport.postMessage({ // notify new version available
|
|
95
95
|
id: "upgrade",
|
|
96
|
-
version: "1.0.
|
|
96
|
+
version: "1.0.6-2"
|
|
97
97
|
});
|
|
98
98
|
Reaper(); // clean up obsolete info
|
|
99
99
|
|
|
@@ -107,7 +107,7 @@ var waitingForInit = []; // initialization functions, or
|
|
|
107
107
|
if (msg.id == "response")
|
|
108
108
|
processResponse(msg);
|
|
109
109
|
else if (msg.id == "text")
|
|
110
|
-
console.log("[1.0.
|
|
110
|
+
console.log("[1.0.6-2] msg received:", msg.text);
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
// send text to IDE log
|
|
@@ -118,7 +118,7 @@ var waitingForInit = []; // initialization functions, or
|
|
|
118
118
|
// don't clutter the log
|
|
119
119
|
msgport.postMessage({
|
|
120
120
|
id: "text",
|
|
121
|
-
text: "port received by 1.0.
|
|
121
|
+
text: "port received by 1.0.6-2",
|
|
122
122
|
});
|
|
123
123
|
*/
|
|
124
124
|
if (--pending === 0)
|
|
@@ -135,7 +135,7 @@ var waitingForInit = []; // initialization functions, or
|
|
|
135
135
|
includeUncontrolled: true
|
|
136
136
|
}).then(function(clientList) {
|
|
137
137
|
clientList.every(function(client) {
|
|
138
|
-
console.log("[1.0.
|
|
138
|
+
console.log("[1.0.6-2] requesting new msgport for", client.id);
|
|
139
139
|
++pending;
|
|
140
140
|
client.postMessage({ // tell client(s) we need this fetch source
|
|
141
141
|
msg: "Naan_need_fetch_port",
|
|
@@ -181,12 +181,12 @@ function Reaper() {
|
|
|
181
181
|
clients[clientList[clidex].id] = clientList[clidex];
|
|
182
182
|
for (var sourceId in msgPorts)
|
|
183
183
|
if (!clients[sourceId]) {
|
|
184
|
-
console.log("[1.0.
|
|
184
|
+
console.log("[1.0.6-2] source gone:", sourceId);
|
|
185
185
|
delete msgPorts[sourceId]; // no longer a source
|
|
186
186
|
}
|
|
187
187
|
for (var clientId in fetchPorts)
|
|
188
188
|
if (!clients[clientId]) {
|
|
189
|
-
console.log("[1.0.
|
|
189
|
+
console.log("[1.0.6-2] client gone:", clientId);
|
|
190
190
|
delete fetchPorts[clientId]; // no longer a client
|
|
191
191
|
}
|
|
192
192
|
for (var fqdex = 0; fqdex < fetchQueue.length; ++fqdex) {
|
|
@@ -220,13 +220,13 @@ function ClearCaches() {
|
|
|
220
220
|
return (Promise.all(
|
|
221
221
|
cacheNames.map(function(cacheName) {
|
|
222
222
|
if (cacheName != CurrentCacheName) {
|
|
223
|
-
console.log('[1.0.
|
|
223
|
+
console.log('[1.0.6-2] deleting old cache:', cacheName);
|
|
224
224
|
return (caches.delete(cacheName));
|
|
225
225
|
}
|
|
226
226
|
})
|
|
227
227
|
));
|
|
228
228
|
}).then(function() { // claim all clients
|
|
229
|
-
console.log('[1.0.
|
|
229
|
+
console.log('[1.0.6-2] claiming clients');
|
|
230
230
|
return (self.clients.claim());
|
|
231
231
|
});
|
|
232
232
|
return (promise);
|
|
@@ -269,7 +269,7 @@ function GetClientResponse(event, urlpath) {
|
|
|
269
269
|
msgport.postMessage({
|
|
270
270
|
id: "fetch",
|
|
271
271
|
seq: seqno,
|
|
272
|
-
version: "1.0.
|
|
272
|
+
version: "1.0.6-2",
|
|
273
273
|
request: {
|
|
274
274
|
method: event.request.method,
|
|
275
275
|
url: event.request.url
|
|
@@ -317,7 +317,7 @@ function GetClientResponse(event, urlpath) {
|
|
|
317
317
|
*/
|
|
318
318
|
|
|
319
319
|
self.addEventListener('install', function(event) {
|
|
320
|
-
console.log("[1.0.
|
|
320
|
+
console.log("[1.0.6-2] install");
|
|
321
321
|
self.skipWaiting();
|
|
322
322
|
});
|
|
323
323
|
|
|
@@ -356,7 +356,7 @@ self.addEventListener('fetch', function(event) {
|
|
|
356
356
|
}
|
|
357
357
|
else
|
|
358
358
|
promise = fetch(event.request).catch(function (e) {
|
|
359
|
-
console.log("[1.0.
|
|
359
|
+
console.log("[1.0.6-2] fetch failed", e);
|
|
360
360
|
return (new Response(undefined, {
|
|
361
361
|
status: 404,
|
|
362
362
|
statusText: "Fetch Failed"
|
|
@@ -385,14 +385,14 @@ self.addEventListener('fetch', function(event) {
|
|
|
385
385
|
*/
|
|
386
386
|
|
|
387
387
|
self.addEventListener('activate', function(event) {
|
|
388
|
-
console.log("[1.0.
|
|
388
|
+
console.log("[1.0.6-2] activate");
|
|
389
389
|
self.clients.matchAll({ // for debugging, list controlled clients
|
|
390
390
|
includeUncontrolled: true
|
|
391
391
|
}).then(function(clientList) {
|
|
392
392
|
var urls = clientList.map(function(client) {
|
|
393
393
|
return (client.url);
|
|
394
394
|
});
|
|
395
|
-
console.log('[1.0.
|
|
395
|
+
console.log('[1.0.6-2] matching clients:', urls.join(', '));
|
|
396
396
|
});
|
|
397
397
|
var promise = ClearCaches();
|
|
398
398
|
if (event.waitUntil)
|
|
@@ -37,7 +37,7 @@ closure MakeNideAPIclient(url, guid, local client) {
|
|
|
37
37
|
request.addEventListener("error", function reqFailed(event, local errtext) {
|
|
38
38
|
if request.status == 0
|
|
39
39
|
errtext = "connectivity"
|
|
40
|
-
|
|
40
|
+
else
|
|
41
41
|
errtext = "request failed"
|
|
42
42
|
error = Error(errtext, {
|
|
43
43
|
status: request.status
|
|
@@ -136,10 +136,10 @@ closure psmcFsView(api, rootpath, local view, pathmod) {
|
|
|
136
136
|
// readLines
|
|
137
137
|
//
|
|
138
138
|
// Read a lines of a file at the specified path with options:
|
|
139
|
-
// matchRE:
|
|
140
|
-
// ignoreCase:
|
|
141
|
-
// invert:
|
|
142
|
-
// returnText:
|
|
139
|
+
// matchRE: -- JavaScript regex
|
|
140
|
+
// ignoreCase: -- ignore case during match
|
|
141
|
+
// invert: -- return lines that DO NOT match the regex
|
|
142
|
+
// returnText: -- return text of matched lines
|
|
143
143
|
// When using a matchRE, the return value is an array of [ lineNumber, text ] pairs if
|
|
144
144
|
// returnText is specified, or just an array of one-based line numbers otherwise.
|
|
145
145
|
//
|
|
@@ -288,6 +288,10 @@ closure psmcFsView(api, rootpath, local view, pathmod) {
|
|
|
288
288
|
// Search the specified file or recursive directory.
|
|
289
289
|
|
|
290
290
|
view.dirSearch = function dirSearch(path, options, callback) {
|
|
291
|
+
if options.excludeDirs {
|
|
292
|
+
options = new(options)
|
|
293
|
+
options.excludeDirs = JSONstringify(options.excludeDirs)
|
|
294
|
+
}
|
|
291
295
|
psmRemote(path, "dirSearch", options, false, callback)
|
|
292
296
|
}
|
|
293
297
|
|
|
@@ -357,6 +361,10 @@ closure psmcFsView(api, rootpath, local view, pathmod) {
|
|
|
357
361
|
// Grep the specified file or recursive directory.
|
|
358
362
|
|
|
359
363
|
view.grepLines = function grepLines(path, options, callback) {
|
|
364
|
+
if options.excludeDirs {
|
|
365
|
+
options = new(options)
|
|
366
|
+
options.excludeDirs = JSONstringify(options.excludeDirs)
|
|
367
|
+
}
|
|
360
368
|
psmRemote(path, "grepLines", options, false, callback)
|
|
361
369
|
}
|
|
362
370
|
|
|
@@ -373,10 +373,17 @@ function comrInit(local manifest) {
|
|
|
373
373
|
result
|
|
374
374
|
}
|
|
375
375
|
//
|
|
376
|
-
//
|
|
376
|
+
// EncodeBase64url - decode base64url to original string
|
|
377
377
|
// See https://en.wikipedia.org/wiki/Base64 for details on variants
|
|
378
378
|
//
|
|
379
|
-
|
|
379
|
+
EncodeBase64url = function encodeBase64url(data) {
|
|
380
|
+
data = EncodeBase64(data)
|
|
381
|
+
data.replace(RegExp("[+]", "g"), '-').replace(RegExp("/", "g"), '_')
|
|
382
|
+
}
|
|
383
|
+
//
|
|
384
|
+
// DecodeBase64url - decode base64url to original string
|
|
385
|
+
//
|
|
386
|
+
DecodeBase64url = function decodeBase64url(base64url) {
|
|
380
387
|
base64url = base64url.replace(RegExp("-", "g"), '+').replace(RegExp("_", "g"), '/')
|
|
381
388
|
DecodeBase64(base64url)
|
|
382
389
|
}
|
|
@@ -526,6 +533,7 @@ function comrInit(local manifest) {
|
|
|
526
533
|
modobj.exports.JsonStringify = JsonStringify
|
|
527
534
|
modobj.exports.JsonParse = JsonParse
|
|
528
535
|
modobj.exports.Uint8ArrayFromString = Uint8ArrayFromString
|
|
536
|
+
modobj.exports.EncodeBase64url = EncodeBase64url
|
|
529
537
|
modobj.exports.DecodeBase64url = DecodeBase64url
|
|
530
538
|
modobj.exports.HashMD5 = HashMD5
|
|
531
539
|
modobj.exports.HashMD5_base64 = HashMD5_base64
|
|
@@ -171,8 +171,8 @@ closure MakeAPI(port, options, callback, local chroot, server) {
|
|
|
171
171
|
res.status(403).send("unauthorized")
|
|
172
172
|
timeoutms = toint(req.query.timeout)
|
|
173
173
|
after = toint(req.query.after)
|
|
174
|
-
if not integer(timeoutms) or timeoutms >
|
|
175
|
-
res.status(400).send("timeout is integer milliseconds no greater than
|
|
174
|
+
if not integer(timeoutms) or timeoutms > 7200000
|
|
175
|
+
res.status(400).send("timeout is integer milliseconds no greater than 7200000")
|
|
176
176
|
else if not integer(after)
|
|
177
177
|
res.status(400).send("after must be an integer")
|
|
178
178
|
else {
|
|
@@ -181,11 +181,11 @@ closure Filesystem(rootpath, local files, badCreatePathRegEx) {
|
|
|
181
181
|
// readLines
|
|
182
182
|
//
|
|
183
183
|
// Read the contents of a file into an array of lines with the following options:
|
|
184
|
-
// pattern:
|
|
185
|
-
// fixed
|
|
186
|
-
// ignoreCase:
|
|
187
|
-
// invert:
|
|
188
|
-
// returnText:
|
|
184
|
+
// pattern: -- only return lines matching pattern
|
|
185
|
+
// fixed -- pattern is a fixed string, not a regular expression
|
|
186
|
+
// ignoreCase: -- ignore case during match
|
|
187
|
+
// invert: -- return lines that DO NOT match the regex
|
|
188
|
+
// returnText: -- return text of matched lines
|
|
189
189
|
//
|
|
190
190
|
|
|
191
191
|
files.readLines = closure readLines(path, options, callback,
|
|
@@ -748,21 +748,31 @@ closure Filesystem(rootpath, local files, badCreatePathRegEx) {
|
|
|
748
748
|
// dirSearch
|
|
749
749
|
//
|
|
750
750
|
// Search the files in a directory for a pattern.
|
|
751
|
-
|
|
751
|
+
//
|
|
752
|
+
// Most options are handled by readLines, but the following is done here:
|
|
753
|
+
// excludeDirs: [dirnames] -- exclude the specified directory names
|
|
754
|
+
|
|
752
755
|
files.dirSearch = closure dirSearch(path, options, callback,
|
|
753
|
-
local error, localpaths, output) {
|
|
756
|
+
local error, localpaths, dexmatch, item, output) {
|
|
754
757
|
if !callback
|
|
755
758
|
return (syncAdapter(dirSearch, path, options))
|
|
756
759
|
`(error, localpath) = localPath(path)
|
|
757
760
|
if error
|
|
758
761
|
return (asyncResult(callback, error))
|
|
762
|
+
if options.excludeDirs.0 { // match all provided paths
|
|
763
|
+
dexmatch = []
|
|
764
|
+
for item in options.excludeDirs // escape all special characters
|
|
765
|
+
dexmatch.push(item.replace(RegExp("[^A-Za-z0-9-_\n]","g"), "\\$&"))
|
|
766
|
+
dexmatch = RegExp(dexmatch.join("|"))
|
|
767
|
+
}
|
|
759
768
|
output = []
|
|
760
769
|
debuglog("dirSearch begins", localpath)
|
|
761
770
|
asyncArray(localpaths, 10, closure(localpath, index, elements, local error, direnum, node, lines, line) {
|
|
762
771
|
`(error, direnum) = dirList(localpath, { })
|
|
763
772
|
if direnum.children
|
|
764
773
|
for node in direnum.children
|
|
765
|
-
|
|
774
|
+
if !dexmatch || !node.name.match(dexmatch)
|
|
775
|
+
localpaths.push(JSpath.join(localpath, node.name)) // more files or directories to examine
|
|
766
776
|
else {
|
|
767
777
|
`(error, lines) = readLines(localpath, options)
|
|
768
778
|
if error && localpaths.length == 1 {
|
|
@@ -986,22 +996,29 @@ closure Filesystem(rootpath, local files, badCreatePathRegEx) {
|
|
|
986
996
|
//
|
|
987
997
|
// Return an array of text matches in a file or recursive directory of files with the following
|
|
988
998
|
// options:
|
|
989
|
-
// pattern:
|
|
990
|
-
// ignoreCase:
|
|
991
|
-
// invert:
|
|
992
|
-
// returnText:
|
|
993
|
-
//
|
|
999
|
+
// pattern: -- pattern to find
|
|
1000
|
+
// ignoreCase: -- ignore case during match
|
|
1001
|
+
// invert: -- return lines that DO NOT match the regex
|
|
1002
|
+
// returnText: -- return text of matched lines
|
|
1003
|
+
// excludeDirs: [dirnames] -- exclude the specified directory names
|
|
1004
|
+
// maxCount: -- integer maximum number of results (default 10,000)
|
|
994
1005
|
// grep-specific options:
|
|
995
|
-
// ignoreBinary:
|
|
1006
|
+
// ignoreBinary: -- ignore binary files
|
|
996
1007
|
//
|
|
997
1008
|
files.grepLines = closure grepLines(path, options, callback,
|
|
998
|
-
local error, localpath, cmdargs, execOptions, grep, result, lineRE, maxcount) {
|
|
1009
|
+
local error, localpath, cmdargs, item, execOptions, grep, result, lineRE, maxcount) {
|
|
999
1010
|
if !callback
|
|
1000
1011
|
return (syncAdapter(grepLines, path, options))
|
|
1001
1012
|
`(error, localpath) = localPath(path)
|
|
1002
1013
|
if error
|
|
1003
1014
|
return (asyncResult(callback, error))
|
|
1004
1015
|
cmdargs = ["-rn"] // recursively search directories for files; report line numbers
|
|
1016
|
+
if options.excludeDirs.0 { // exclude a directory
|
|
1017
|
+
for item in options.excludeDirs {
|
|
1018
|
+
cmdargs.push("--exclude-dir")
|
|
1019
|
+
cmdargs.push(item)
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1005
1022
|
if options.ignoreCase
|
|
1006
1023
|
cmdargs.push("-i")
|
|
1007
1024
|
if options.invert
|
|
@@ -204,6 +204,7 @@ closure psmsFsView(rootpath, local view, gitter) {
|
|
|
204
204
|
|
|
205
205
|
// op: dirSearch
|
|
206
206
|
function dirSearchApi() {
|
|
207
|
+
req.query.excludeDirs = JSONparse(req.query.excludeDirs)
|
|
207
208
|
res.send(new(array, view.dirSearch(path, req.query)))
|
|
208
209
|
}
|
|
209
210
|
|
|
@@ -239,6 +240,7 @@ closure psmsFsView(rootpath, local view, gitter) {
|
|
|
239
240
|
|
|
240
241
|
// op: grepLines
|
|
241
242
|
function grepLinesApi() {
|
|
243
|
+
req.query.excludeDirs = JSONparse(req.query.excludeDirs)
|
|
242
244
|
res.send(new(array, view.grepLines(path, req.query)))
|
|
243
245
|
}
|
|
244
246
|
|
|
@@ -289,8 +291,15 @@ closure psmsFsView(rootpath, local view, gitter) {
|
|
|
289
291
|
gitLog: gitLogApi
|
|
290
292
|
gitShowFile: gitShowFileApi
|
|
291
293
|
}[req.query.op]
|
|
292
|
-
if proc
|
|
293
|
-
|
|
294
|
+
if proc {
|
|
295
|
+
try {
|
|
296
|
+
proc()
|
|
297
|
+
} catch {
|
|
298
|
+
if true {
|
|
299
|
+
res.status(400).send("psm op failed: ".concat(req.query.op, ": ", exception))
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
294
303
|
else
|
|
295
304
|
res.status(400).send("invalid psm op: ".concat(req.query.op))
|
|
296
305
|
}
|
|
@@ -1024,13 +1024,14 @@ closure Builder(rules, operation, fs, srcpath, destpath, local build, group, new
|
|
|
1024
1024
|
// } ... ]
|
|
1025
1025
|
// }
|
|
1026
1026
|
//
|
|
1027
|
-
build.make = closure make(
|
|
1027
|
+
build.make = closure make(options, local sink, xchan, entry, outext, error) {
|
|
1028
1028
|
sink = new(textstream, "", `string) // log all output
|
|
1029
1029
|
xchan = textstreams(list(sink, sink))
|
|
1030
1030
|
try {
|
|
1031
1031
|
resetlist()
|
|
1032
|
-
analyze(debugMake)
|
|
1033
|
-
if debugMake {
|
|
1032
|
+
analyze(options.debugMake)
|
|
1033
|
+
if options.debugMake {
|
|
1034
|
+
printline("Debugging make for ", options.buildnum, "-", options.stage)
|
|
1034
1035
|
if build.errorlist.length == 0 {
|
|
1035
1036
|
printline("build operations (", build.filelist.length, ") for ", operation)
|
|
1036
1037
|
for entry in build.filelist
|
|
@@ -1052,6 +1053,8 @@ closure Builder(rules, operation, fs, srcpath, destpath, local build, group, new
|
|
|
1052
1053
|
"\ndate: ", Date(),
|
|
1053
1054
|
"\nfrom: ", JSpath.join(fs.rootpath, build.srcpath),
|
|
1054
1055
|
"\n to: ", build.destpath,
|
|
1056
|
+
"\ntype: ", options.stage,
|
|
1057
|
+
"\nvers: ", options.buildnum,
|
|
1055
1058
|
"\n", sink.taketext())
|
|
1056
1059
|
`(error) = fs.writeFile(JSpath.join(build.destpath, "build_log.txt"), outext)
|
|
1057
1060
|
if error
|
|
@@ -1153,14 +1156,17 @@ closure Builder(rules, operation, fs, srcpath, destpath, local build, group, new
|
|
|
1153
1156
|
//
|
|
1154
1157
|
// build.refresh
|
|
1155
1158
|
//
|
|
1156
|
-
// Refresh after updating the v-site
|
|
1159
|
+
// Refresh after updating the v-site, returning true iff an existing vsite was found.
|
|
1157
1160
|
//
|
|
1158
|
-
build.refresh = function refresh(track local main, url_origin) {
|
|
1161
|
+
build.refresh = function refresh(track local main, url_origin, found) {
|
|
1159
1162
|
if build.runway."v-site" {
|
|
1160
1163
|
url_origin = js.w.location.origin.concat("/run", build.runway."v-site")
|
|
1161
|
-
for target in track.enumlist()
|
|
1162
|
-
target.vsiteRefresh(url_origin)
|
|
1164
|
+
for target in track.enumlist() {
|
|
1165
|
+
if target.vsiteRefresh(url_origin)
|
|
1166
|
+
found = true
|
|
1167
|
+
}
|
|
1163
1168
|
}
|
|
1169
|
+
found
|
|
1164
1170
|
}
|
|
1165
1171
|
|
|
1166
1172
|
//
|
|
@@ -296,7 +296,7 @@ closure projConnector(projman, projtype, local connector, watch) {
|
|
|
296
296
|
*
|
|
297
297
|
* Nide.proj/
|
|
298
298
|
* nide_cliser.cfg - JSON definition of the project (see below)
|
|
299
|
-
* NaanIDE_version.txt - [default] substitution file defining 1.0.
|
|
299
|
+
* NaanIDE_version.txt - [default] substitution file defining 1.0.6-1 etc.
|
|
300
300
|
* NaanIDE_version_builds.txt - [default] contains current build number as decimal string
|
|
301
301
|
* build/ - [optional] default build output location
|
|
302
302
|
* NaanIDE.lic - [optional] defines Zulch Laboratories, Inc. and other license info
|
|
@@ -326,6 +326,7 @@ proj_cliserConfigFile = "nide_cliser.cfg";
|
|
|
326
326
|
closure projConfig(projman, where, projID, local procon, fs, configpath) {
|
|
327
327
|
procon = new(object, this)
|
|
328
328
|
procon.name = where.name
|
|
329
|
+
procon.dirName = proj_configDataFolder.slice(0,-1) // remove terminal "/"
|
|
329
330
|
if projID
|
|
330
331
|
procon.localID = projID.concat("-data")
|
|
331
332
|
|
|
@@ -547,6 +548,17 @@ closure projConfig(projman, where, projID, local procon, fs, configpath) {
|
|
|
547
548
|
stage
|
|
548
549
|
}
|
|
549
550
|
|
|
551
|
+
// setCurrentStage
|
|
552
|
+
//
|
|
553
|
+
// Set the current stage.
|
|
554
|
+
//
|
|
555
|
+
procon.setCurrentStage = function setCurrentStage(stage) {
|
|
556
|
+
if member(stage, stages()) {
|
|
557
|
+
procon.localDict.currentStage = stage
|
|
558
|
+
update() // ### errors here are never reported
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
550
562
|
// buildrules
|
|
551
563
|
//
|
|
552
564
|
// Get the build rules for the named stage.
|
|
@@ -595,11 +607,14 @@ closure projConfig(projman, where, projID, local procon, fs, configpath) {
|
|
|
595
607
|
ErrorDebuglog("build number increment failed", error)
|
|
596
608
|
return (list(error))
|
|
597
609
|
}
|
|
598
|
-
`(error) = builder.make(
|
|
610
|
+
`(error) = builder.make({
|
|
611
|
+
stage: stage
|
|
612
|
+
buildnum: buildnum
|
|
613
|
+
})
|
|
599
614
|
if !error {
|
|
600
|
-
if
|
|
601
|
-
|
|
602
|
-
|
|
615
|
+
if builder.refresh(projman.track)
|
|
616
|
+
buildonly = !buildonly // reverse if refresh
|
|
617
|
+
if !buildonly
|
|
603
618
|
`(error) = builder.run(projman.track)
|
|
604
619
|
}
|
|
605
620
|
builder.destroy()
|
package/lib/browser/env_web.js
CHANGED
|
@@ -309,8 +309,11 @@ exports.NaanControllerWeb = function() {
|
|
|
309
309
|
//
|
|
310
310
|
|
|
311
311
|
this.VsiteRefresh = function VsiteRefresh(url_origin) {
|
|
312
|
-
if (window.location.href.startsWith(url_origin))
|
|
312
|
+
if (window.location.href.startsWith(url_origin)) {
|
|
313
313
|
window.location.reload(); // we have changed underneath
|
|
314
|
+
return (true);
|
|
315
|
+
}
|
|
316
|
+
return (false);
|
|
314
317
|
};
|
|
315
318
|
|
|
316
319
|
|
|
@@ -455,7 +458,7 @@ exports.NaanControllerWeb = function() {
|
|
|
455
458
|
statedoc.curversion = kStateCurrentVersion;
|
|
456
459
|
statedoc.firstver = kStateFirstVersion;
|
|
457
460
|
statedoc.licensee = "MIT-License";
|
|
458
|
-
statedoc.verstring = "1.0.
|
|
461
|
+
statedoc.verstring = "1.0.6-1";
|
|
459
462
|
statedoc.date = new Date().toISOString();
|
|
460
463
|
statedoc.prefs = prefs;
|
|
461
464
|
statedoc.naan = naanlib.saveState(false); // true to optimize, which is a bit slower
|
|
@@ -473,7 +476,7 @@ exports.NaanControllerWeb = function() {
|
|
|
473
476
|
|| statedoc.firstver > kStateCurrentVersion
|
|
474
477
|
|| statedoc.curversion < kStateFirstVersion
|
|
475
478
|
|| statedoc.licensee != "MIT-License"
|
|
476
|
-
|| statedoc.verstring != "1.0.
|
|
479
|
+
|| statedoc.verstring != "1.0.6-1")
|
|
477
480
|
{
|
|
478
481
|
localStorage.removeItem("NaanState_Hosted");
|
|
479
482
|
return (false);
|
|
@@ -531,7 +534,7 @@ exports.NaanControllerWeb = function() {
|
|
|
531
534
|
op: "VsiteOpen",
|
|
532
535
|
name: vsiteName,
|
|
533
536
|
naancont: contSelf,
|
|
534
|
-
title: vsiteName + " 1.0.
|
|
537
|
+
title: vsiteName + " 1.0.6-1"
|
|
535
538
|
});
|
|
536
539
|
}
|
|
537
540
|
|
|
@@ -541,7 +544,7 @@ exports.NaanControllerWeb = function() {
|
|
|
541
544
|
op: "VsiteClose",
|
|
542
545
|
name: vsiteName,
|
|
543
546
|
naancont: contSelf,
|
|
544
|
-
title: vsiteName + " 1.0.
|
|
547
|
+
title: vsiteName + " 1.0.6-1"
|
|
545
548
|
});
|
|
546
549
|
termTextOut("\x1b[90m\x1b[3m".concat("\nwindow closed", "\x1b[0m\n"));
|
|
547
550
|
}
|
package/lib/core/naanlib.js
CHANGED
package/package.json
CHANGED
|
@@ -338,7 +338,7 @@ closure DynaConverter(local conv) {
|
|
|
338
338
|
adef = datumNaanToDyn(expr)
|
|
339
339
|
atype = keys(adef).0
|
|
340
340
|
for `(key, data) in params.ExpressionAttributeValues
|
|
341
|
-
if data[atype] == adef[atype]
|
|
341
|
+
if defined(data, atype) && data[atype] == adef[atype]
|
|
342
342
|
return (key) // found matching attribute
|
|
343
343
|
key = ":v".concat(adex++)
|
|
344
344
|
params.ExpressionAttributeValues[key] = adef
|