marko 5.34.2 → 5.34.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -50,9 +50,27 @@ module.exports = function (input, out) {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
function handleAwait(awaitInfo) {
|
53
|
+
let flushedScript = false;
|
54
|
+
let flushedContent = false;
|
55
|
+
let flushedPlaceholder = false;
|
56
|
+
awaitInfo.parent.on("c_", () => {
|
57
|
+
flushedPlaceholder = true;
|
58
|
+
if (!flushedScript && flushedContent) {
|
59
|
+
flushedScript = true;
|
60
|
+
asyncOut.script(
|
61
|
+
`$${reorderFunctionId}(` + (
|
62
|
+
typeof awaitInfo.id === "number" ?
|
63
|
+
awaitInfo.id :
|
64
|
+
'"' + awaitInfo.id + '"') + (
|
65
|
+
awaitInfo.after ? ',"' + awaitInfo.after + '"' : "") +
|
66
|
+
")"
|
67
|
+
);
|
68
|
+
}
|
69
|
+
});
|
53
70
|
awaitInfo.out.
|
54
71
|
on("c_", out.emit.bind(out, "c_")).
|
55
72
|
on("finish", function (result) {
|
73
|
+
flushedContent = true;
|
56
74
|
if (!global._afRuntime) {
|
57
75
|
// Minified version of ./client-reorder-runtime.js
|
58
76
|
asyncOut.script(
|
@@ -86,14 +104,17 @@ module.exports = function (input, out) {
|
|
86
104
|
);
|
87
105
|
}
|
88
106
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
107
|
+
if (!flushedScript && flushedPlaceholder) {
|
108
|
+
flushedScript = true;
|
109
|
+
asyncOut.script(
|
110
|
+
`$${reorderFunctionId}(` + (
|
111
|
+
typeof awaitInfo.id === "number" ?
|
112
|
+
awaitInfo.id :
|
113
|
+
'"' + awaitInfo.id + '"') + (
|
114
|
+
awaitInfo.after ? ',"' + awaitInfo.after + '"' : "") +
|
115
|
+
")"
|
116
|
+
);
|
117
|
+
}
|
97
118
|
|
98
119
|
awaitInfo.out.writer = asyncOut.writer;
|
99
120
|
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -50,9 +50,27 @@ module.exports = function (input, out) {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
function handleAwait(awaitInfo) {
|
53
|
+
let flushedScript = false;
|
54
|
+
let flushedContent = false;
|
55
|
+
let flushedPlaceholder = false;
|
56
|
+
awaitInfo.parent.on("___toString", () => {
|
57
|
+
flushedPlaceholder = true;
|
58
|
+
if (!flushedScript && flushedContent) {
|
59
|
+
flushedScript = true;
|
60
|
+
asyncOut.script(
|
61
|
+
`$${reorderFunctionId}(` +
|
62
|
+
(typeof awaitInfo.id === "number"
|
63
|
+
? awaitInfo.id
|
64
|
+
: '"' + awaitInfo.id + '"') +
|
65
|
+
(awaitInfo.after ? ',"' + awaitInfo.after + '"' : "") +
|
66
|
+
")",
|
67
|
+
);
|
68
|
+
}
|
69
|
+
});
|
53
70
|
awaitInfo.out
|
54
71
|
.on("___toString", out.emit.bind(out, "___toString"))
|
55
72
|
.on("finish", function (result) {
|
73
|
+
flushedContent = true;
|
56
74
|
if (!global._afRuntime) {
|
57
75
|
// Minified version of ./client-reorder-runtime.js
|
58
76
|
asyncOut.script(
|
@@ -86,14 +104,17 @@ module.exports = function (input, out) {
|
|
86
104
|
);
|
87
105
|
}
|
88
106
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
107
|
+
if (!flushedScript && flushedPlaceholder) {
|
108
|
+
flushedScript = true;
|
109
|
+
asyncOut.script(
|
110
|
+
`$${reorderFunctionId}(` +
|
111
|
+
(typeof awaitInfo.id === "number"
|
112
|
+
? awaitInfo.id
|
113
|
+
: '"' + awaitInfo.id + '"') +
|
114
|
+
(awaitInfo.after ? ',"' + awaitInfo.after + '"' : "") +
|
115
|
+
")",
|
116
|
+
);
|
117
|
+
}
|
97
118
|
|
98
119
|
awaitInfo.out.writer = asyncOut.writer;
|
99
120
|
|