primate 0.31.5 → 0.31.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/package.json +1 -1
- package/src/app.js +4 -3
- package/src/hooks/handle.js +1 -1
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -106,14 +106,15 @@ export default async (log, root, config) => {
|
|
|
106
106
|
const regexs = paths.map(file => globify(file));
|
|
107
107
|
const target_base = this.runpath(directory);
|
|
108
108
|
|
|
109
|
+
await source.copy(target_base);
|
|
110
|
+
|
|
109
111
|
await Promise.all((await source.collect(filter)).map(async path => {
|
|
110
112
|
const debased = path.debase(this.root).path.slice(1);
|
|
111
113
|
const filename = FS.File.join(directory, path.debase(source));
|
|
112
114
|
const target = await target_base.join(filename.debase(directory));
|
|
113
115
|
await target.directory.create();
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
: path.copy(target));
|
|
116
|
+
regexs.some(regex => regex.test(debased))
|
|
117
|
+
?? target.write(mapper(await path.text()));
|
|
117
118
|
}));
|
|
118
119
|
},
|
|
119
120
|
async compile(component) {
|
package/src/hooks/handle.js
CHANGED
|
@@ -20,7 +20,7 @@ const guard = (app, guards) => async (request, next) => {
|
|
|
20
20
|
return next(request);
|
|
21
21
|
} catch (error) {
|
|
22
22
|
if (error.type === guard_error) {
|
|
23
|
-
return { response: respond(error.result)(app) };
|
|
23
|
+
return { request, response: respond(error.result)(app) };
|
|
24
24
|
}
|
|
25
25
|
// rethrow if not guard error
|
|
26
26
|
throw error;
|