total5 0.0.9-5 → 0.0.9-7
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/bundles.js +15 -15
- package/changelog.txt +3 -0
- package/flow.js +15 -0
- package/htmlparser.js +1 -1
- package/package.json +1 -1
- package/templates.js +4 -0
package/bundles.js
CHANGED
|
@@ -41,12 +41,12 @@ function extract(callback) {
|
|
|
41
41
|
try {
|
|
42
42
|
META.ignore = makeignore(F.Fs.readFileSync(F.Path.join(path, '.bundleignore')).toString('utf8').split('\n'));
|
|
43
43
|
isignore = true;
|
|
44
|
-
} catch
|
|
44
|
+
} catch {}
|
|
45
45
|
|
|
46
46
|
if (!isignore) {
|
|
47
47
|
try {
|
|
48
48
|
META.ignore = makeignore(F.Fs.readFileSync(F.Path.join(path, '.bundlesignore')).toString('utf8').split('\n'));
|
|
49
|
-
} catch
|
|
49
|
+
} catch {}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
ignore['/tmp/'] = 1;
|
|
@@ -116,12 +116,12 @@ function extract(callback) {
|
|
|
116
116
|
var exists = null;
|
|
117
117
|
try {
|
|
118
118
|
exists = F.Fs.statSync(F.Path.join(target, p));
|
|
119
|
-
} catch
|
|
119
|
+
} catch {}
|
|
120
120
|
|
|
121
121
|
if ((dirname === pathupdate || dirname === pathstartup) && !exists) {
|
|
122
122
|
try {
|
|
123
|
-
exists = F.Fs.statSync(F.Path.join(target, p + '_bk'))
|
|
124
|
-
} catch
|
|
123
|
+
exists = F.Fs.statSync(F.Path.join(target, p + '_bk'));
|
|
124
|
+
} catch {}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
// A specific file like DB file or startup file or update script
|
|
@@ -155,7 +155,7 @@ function extract(callback) {
|
|
|
155
155
|
for (var i = 0; i < Merge.length; i++) {
|
|
156
156
|
try {
|
|
157
157
|
F.Fs.unlinkSync(Merge[i].filename);
|
|
158
|
-
} catch
|
|
158
|
+
} catch {}
|
|
159
159
|
}
|
|
160
160
|
next();
|
|
161
161
|
});
|
|
@@ -267,7 +267,7 @@ function cleanFiles(callback) {
|
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
} catch
|
|
270
|
+
} catch {
|
|
271
271
|
meta = {};
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -278,7 +278,7 @@ function cleanFiles(callback) {
|
|
|
278
278
|
if (!ignore[dir]) {
|
|
279
279
|
try {
|
|
280
280
|
F.Fs.unlinkSync(F.Path.join(path, filename));
|
|
281
|
-
} catch
|
|
281
|
+
} catch {}
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -301,7 +301,7 @@ function cleanFiles(callback) {
|
|
|
301
301
|
|
|
302
302
|
try {
|
|
303
303
|
F.Fs.rmdirSync(p);
|
|
304
|
-
} catch
|
|
304
|
+
} catch {
|
|
305
305
|
break;
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -311,7 +311,7 @@ function cleanFiles(callback) {
|
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
} catch
|
|
314
|
+
} catch {}
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
@@ -324,7 +324,7 @@ function createDirectories(dirs, callback) {
|
|
|
324
324
|
|
|
325
325
|
try {
|
|
326
326
|
F.Fs.mkdirSync(path);
|
|
327
|
-
} catch
|
|
327
|
+
} catch {}
|
|
328
328
|
|
|
329
329
|
for (var i = 0, length = dirs.length; i < length; i++) {
|
|
330
330
|
var p = normalize(dirs[i]);
|
|
@@ -332,7 +332,7 @@ function createDirectories(dirs, callback) {
|
|
|
332
332
|
META.directories.push(p);
|
|
333
333
|
try {
|
|
334
334
|
F.Fs.mkdirSync(F.Path.join(path, dirs[i]));
|
|
335
|
-
} catch
|
|
335
|
+
} catch {}
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
callback();
|
|
@@ -352,7 +352,7 @@ function copyFiles(files, callback) {
|
|
|
352
352
|
|
|
353
353
|
try {
|
|
354
354
|
exists = F.Fs.statSync(filename);
|
|
355
|
-
} catch
|
|
355
|
+
} catch {}
|
|
356
356
|
|
|
357
357
|
if (exists && (!exists.isFile() | exists.isSocket())) {
|
|
358
358
|
next();
|
|
@@ -406,7 +406,7 @@ exports.extract = function(callback, skip) {
|
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
} catch
|
|
409
|
+
} catch {}
|
|
410
410
|
|
|
411
411
|
var bundles = F.path.root('/bundles/');
|
|
412
412
|
var extractbundles = function() {
|
|
@@ -441,7 +441,7 @@ exports.extract = function(callback, skip) {
|
|
|
441
441
|
extractbundles();
|
|
442
442
|
else
|
|
443
443
|
callback();
|
|
444
|
-
} catch
|
|
444
|
+
} catch {
|
|
445
445
|
callback();
|
|
446
446
|
}
|
|
447
447
|
};
|
package/changelog.txt
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
- extended `REQUEST()` by adding `opt.writer {function(res)}` option
|
|
18
18
|
- added missing `TotalAPI()` method
|
|
19
19
|
- fixed `CONF.totalapi` key when initializing the framework
|
|
20
|
+
- added support for plugins in `TEMPLATE()` method
|
|
21
|
+
- fixed decoding of encoded HTML entities in the HTML parser
|
|
22
|
+
- fixed loading `empty` flow in `Flow.load()` method
|
|
20
23
|
|
|
21
24
|
========================
|
|
22
25
|
0.0.8
|
package/flow.js
CHANGED
|
@@ -151,6 +151,21 @@ FS.load = function(flow, callback) {
|
|
|
151
151
|
flow.directory = flow.directory || F.path.root('/flowstream/');
|
|
152
152
|
FS.db[id] = flow;
|
|
153
153
|
|
|
154
|
+
if (!flow.name)
|
|
155
|
+
flow.name = id;
|
|
156
|
+
|
|
157
|
+
if (!flow.components)
|
|
158
|
+
flow.components = {};
|
|
159
|
+
|
|
160
|
+
if (!flow.design)
|
|
161
|
+
flow.design = {};
|
|
162
|
+
|
|
163
|
+
if (!flow.sources)
|
|
164
|
+
flow.sources = {};
|
|
165
|
+
|
|
166
|
+
if (!flow.variables)
|
|
167
|
+
flow.variables = {};
|
|
168
|
+
|
|
154
169
|
FS.module.init(flow, flow.worker, function(err, instance) {
|
|
155
170
|
|
|
156
171
|
instance.onerror = FS.onerror;
|
package/htmlparser.js
CHANGED
|
@@ -429,7 +429,7 @@ HTMLElement.prototype.prepend = function(str) {
|
|
|
429
429
|
};
|
|
430
430
|
|
|
431
431
|
HTMLElement.prototype.text = function() {
|
|
432
|
-
return this.html().removeTags();
|
|
432
|
+
return this.html().removeTags().decode();
|
|
433
433
|
};
|
|
434
434
|
|
|
435
435
|
HTMLElement.prototype.toString = HTMLElement.prototype.html = function(formatted) {
|
package/package.json
CHANGED
package/templates.js
CHANGED
|
@@ -62,7 +62,11 @@ exports.render = function(body, model, $) {
|
|
|
62
62
|
} else {
|
|
63
63
|
|
|
64
64
|
if (body[0] === '~') {
|
|
65
|
+
// absolute path
|
|
65
66
|
body = body.substring(1);
|
|
67
|
+
} else if (body[0] === '#') {
|
|
68
|
+
// plugins
|
|
69
|
+
body = PATH.plugins(body.substring(1));
|
|
66
70
|
} else {
|
|
67
71
|
body = F.path.templates(body);
|
|
68
72
|
if (body.indexOf('.html') === -1)
|