apostrophe 3.26.0 → 3.26.1
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/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.26.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
Hotfix: always waits for the DOM to be ready before initializing the Apostrophe Admin UI. `setTimeout` alone might not guarantee that every time. This issue has apparently become more frequent in the latest versions of Chrome.
|
|
8
|
+
|
|
3
9
|
## 3.26.0
|
|
4
10
|
|
|
5
11
|
### Adds
|
|
6
12
|
|
|
7
13
|
* Tasks can now be registered with the `afterModuleReady` flag, which is more useful than `afterModuleInit` because it waits for the module to be more fully initialized, including all "improvements" loaded via npm. The original `afterModuleInit` flag is still supported in case someone was counting on its behavior.
|
|
8
14
|
* Add `/grid` `POST` route in permission module, in addition to the existing `GET` one, to improve extensibility.
|
|
15
|
+
* `@apostrophecms/express:list-routes` command line task added, to facilitate debugging.
|
|
9
16
|
|
|
10
17
|
### Changes
|
|
11
18
|
|
|
@@ -460,9 +460,14 @@ module.exports = {
|
|
|
460
460
|
${(tiptap && tiptap.registerCode) || ''}
|
|
461
461
|
` +
|
|
462
462
|
(app ? stripIndent`
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
if (document.readyState !== 'loading') {
|
|
464
|
+
setTimeout(invoke, 0);
|
|
465
|
+
} else {
|
|
466
|
+
window.addEventListener('DOMContentLoaded', invoke);
|
|
467
|
+
}
|
|
468
|
+
function invoke() {
|
|
469
|
+
${app.invokeCode}
|
|
470
|
+
}
|
|
466
471
|
` : '') +
|
|
467
472
|
// No delay on these, they expect to run early like ui/public code
|
|
468
473
|
// and the first ones invoked set up expected stuff like apos.http
|
|
@@ -168,6 +168,20 @@ module.exports = {
|
|
|
168
168
|
self.apos.util.error('When you do so other modules will also pick up on it and make URLs absolute.');
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
+
tasks(self) {
|
|
172
|
+
return {
|
|
173
|
+
'list-routes': {
|
|
174
|
+
help: 'List all Express routes registered via routes(), apiRoutes(), etc. (not directly via apos.app)',
|
|
175
|
+
async task(argv) {
|
|
176
|
+
for (const info of self.finalModuleMiddlewareAndRoutes) {
|
|
177
|
+
if (info.route) {
|
|
178
|
+
console.log(`${info.method.toUpperCase()} ${info.url}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
},
|
|
171
185
|
handlers(self) {
|
|
172
186
|
return {
|
|
173
187
|
'apostrophe:run': {
|