wovn-nextjs 0.0.25 → 0.0.26
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/bin/wovn-nextjs +9 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/bin/wovn-nextjs
CHANGED
|
@@ -38,6 +38,15 @@ async function main() {
|
|
|
38
38
|
if (process.env.WOVN_DEBUG) {
|
|
39
39
|
console.dir(context, {depth: null})
|
|
40
40
|
}
|
|
41
|
+
} else if (command === 'update' && context.projectToken && context.hostname) {
|
|
42
|
+
context.wovnJsData = await httpsRequest(`https://data.wovn.io/js_data/json/1/${context.projectToken}/?u=http%3A%2F%2F${context.hostname}`).then(body => JSON.parse(body.toString()))
|
|
43
|
+
await walkTsxAndJsx(context, transform)
|
|
44
|
+
await reportToWovn(context)
|
|
45
|
+
await overwriteInitializationProcess(context)
|
|
46
|
+
await createMiddlewareFile(context)
|
|
47
|
+
if (process.env.WOVN_DEBUG) {
|
|
48
|
+
console.dir(context, {depth: null})
|
|
49
|
+
}
|
|
41
50
|
} else if (command === 'enable' && context.projectToken && context.hostname) {
|
|
42
51
|
context.wovnJsData = await httpsRequest(`https://data.wovn.io/js_data/json/1/${context.projectToken}/?u=http%3A%2F%2F${context.hostname}`).then(body => JSON.parse(body.toString()))
|
|
43
52
|
await walkTsxAndJsx(context, transform)
|
package/dist/cjs/index.js
CHANGED
|
@@ -172,7 +172,7 @@ function fetchJsonDataIfNeeded() {
|
|
|
172
172
|
if (res.status === 200) {
|
|
173
173
|
res.json().then(setTranslations);
|
|
174
174
|
}
|
|
175
|
-
});
|
|
175
|
+
}).catch(e => { }); // Ignore error because most translations are already embedded by deploy
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
function translate(source) {
|
package/dist/esm/index.js
CHANGED
|
@@ -161,7 +161,7 @@ function fetchJsonDataIfNeeded() {
|
|
|
161
161
|
if (res.status === 200) {
|
|
162
162
|
res.json().then(setTranslations);
|
|
163
163
|
}
|
|
164
|
-
});
|
|
164
|
+
}).catch(e => { }); // Ignore error because most translations are already embedded by deploy
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function translate(source) {
|