wovn-nextjs 0.0.22 → 0.0.23
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 +7 -2
- package/dist/cjs/index.js +1 -4
- package/dist/esm/index.js +1 -4
- package/package.json +1 -1
package/bin/wovn-nextjs
CHANGED
|
@@ -38,15 +38,20 @@ async function main() {
|
|
|
38
38
|
if (process.env.WOVN_DEBUG) {
|
|
39
39
|
console.dir(context, {depth: null})
|
|
40
40
|
}
|
|
41
|
-
} else if (command === '
|
|
41
|
+
} else if (command === 'enable' && context.projectToken && context.hostname) {
|
|
42
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
43
|
await walkTsxAndJsx(context, transform)
|
|
44
|
-
await reportToWovn(context)
|
|
45
44
|
await overwriteInitializationProcess(context)
|
|
46
45
|
await createMiddlewareFile(context)
|
|
47
46
|
if (process.env.WOVN_DEBUG) {
|
|
48
47
|
console.dir(context, {depth: null})
|
|
49
48
|
}
|
|
49
|
+
} else if (command === 'report' && context.projectToken && context.hostname) {
|
|
50
|
+
await walkTsxAndJsx(context, transform)
|
|
51
|
+
await reportToWovn(context)
|
|
52
|
+
if (process.env.WOVN_DEBUG) {
|
|
53
|
+
console.dir(context, {depth: null})
|
|
54
|
+
}
|
|
50
55
|
} else if (command === 'undo') {
|
|
51
56
|
await overwriteTsxAndJsxFiles(context, undo)
|
|
52
57
|
await undoIndexJavaScriptFiles()
|
package/dist/cjs/index.js
CHANGED
|
@@ -97,10 +97,7 @@ function usePageRouter() {
|
|
|
97
97
|
case 'replace':
|
|
98
98
|
return (url, as, options) => target.replace(link(url), as ? link(as) : as, options);
|
|
99
99
|
case 'prefetch':
|
|
100
|
-
return (url, asPath, options) =>
|
|
101
|
-
console.log(url, asPath, target);
|
|
102
|
-
return target.prefetch(link(url), asPath ? link(asPath) : asPath, options);
|
|
103
|
-
};
|
|
100
|
+
return (url, asPath, options) => target.prefetch(link(url), asPath ? link(asPath) : asPath, options);
|
|
104
101
|
default:
|
|
105
102
|
return Reflect.get(target, prop, receiver);
|
|
106
103
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -86,10 +86,7 @@ export function usePageRouter() {
|
|
|
86
86
|
case 'replace':
|
|
87
87
|
return (url, as, options) => target.replace(link(url), as ? link(as) : as, options);
|
|
88
88
|
case 'prefetch':
|
|
89
|
-
return (url, asPath, options) =>
|
|
90
|
-
console.log(url, asPath, target);
|
|
91
|
-
return target.prefetch(link(url), asPath ? link(asPath) : asPath, options);
|
|
92
|
-
};
|
|
89
|
+
return (url, asPath, options) => target.prefetch(link(url), asPath ? link(asPath) : asPath, options);
|
|
93
90
|
default:
|
|
94
91
|
return Reflect.get(target, prop, receiver);
|
|
95
92
|
}
|