@koine/next 1.0.37 → 1.0.40
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/app/css/auth/index.js +2 -3
- package/app/css/index.js +2 -3
- package/app/em/auth/index.js +2 -3
- package/app/em/index.js +2 -3
- package/app/sc/auth/index.js +2 -3
- package/app/sc/index.js +2 -3
- package/config/index.d.ts +4 -4
- package/config/index.js +14 -6
- package/node/app/css/auth/index.js +2 -3
- package/node/app/css/index.js +1 -2
- package/node/app/em/auth/index.js +2 -3
- package/node/app/em/index.js +1 -2
- package/node/app/sc/auth/index.js +2 -3
- package/node/app/sc/index.js +1 -2
- package/node/config/index.js +14 -6
- package/package.json +14 -3
package/app/css/auth/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { SessionProvider } from "next-auth/react";
|
|
5
4
|
import { AppHead } from "../../AppHead";
|
|
6
5
|
import { AppTheme } from "../AppTheme";
|
|
@@ -9,6 +8,6 @@ import { AppMain } from "../AppMain";
|
|
|
9
8
|
* App with authentication provided by `next-auth`
|
|
10
9
|
*/
|
|
11
10
|
export var NextApp = function (props) {
|
|
12
|
-
return (_jsxs(
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, __assign({ session: props.pageProps.session }, { children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) }))] }));
|
|
13
12
|
};
|
|
14
13
|
export default NextApp;
|
package/app/css/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { AppHead } from "../AppHead";
|
|
5
4
|
import { AppTheme } from "./AppTheme";
|
|
6
5
|
import { AppMain } from "./AppMain";
|
|
@@ -53,6 +52,6 @@ import { AppMain } from "./AppMain";
|
|
|
53
52
|
* ```
|
|
54
53
|
*/
|
|
55
54
|
export var NextApp = function (props) {
|
|
56
|
-
return (_jsxs(
|
|
55
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
57
56
|
};
|
|
58
57
|
export default NextApp;
|
package/app/em/auth/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { SessionProvider } from "next-auth/react";
|
|
5
4
|
import { AppHead } from "../../AppHead";
|
|
6
5
|
import { AppTheme } from "../AppTheme";
|
|
@@ -9,6 +8,6 @@ import { AppMain } from "../AppMain";
|
|
|
9
8
|
* App with authentication provided by `next-auth`
|
|
10
9
|
*/
|
|
11
10
|
export var NextApp = function (props) {
|
|
12
|
-
return (_jsxs(
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, __assign({ session: props.pageProps.session }, { children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) }))] }));
|
|
13
12
|
};
|
|
14
13
|
export default NextApp;
|
package/app/em/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { AppHead } from "../AppHead";
|
|
5
4
|
import { AppTheme } from "./AppTheme";
|
|
6
5
|
import { AppMain } from "./AppMain";
|
|
@@ -8,6 +7,6 @@ import { AppMain } from "./AppMain";
|
|
|
8
7
|
* App
|
|
9
8
|
*/
|
|
10
9
|
export var NextApp = function (props) {
|
|
11
|
-
return (_jsxs(
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
12
11
|
};
|
|
13
12
|
export default NextApp;
|
package/app/sc/auth/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { SessionProvider } from "next-auth/react";
|
|
5
4
|
import { AppHead } from "../../AppHead";
|
|
6
5
|
import { AppTheme } from "../AppTheme";
|
|
@@ -9,6 +8,6 @@ import { AppMain } from "../AppMain";
|
|
|
9
8
|
* App with authentication provided by `next-auth`
|
|
10
9
|
*/
|
|
11
10
|
export var NextApp = function (props) {
|
|
12
|
-
return (_jsxs(
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, __assign({ session: props.pageProps.session }, { children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) }))] }));
|
|
13
12
|
};
|
|
14
13
|
export default NextApp;
|
package/app/sc/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { AppHead } from "../AppHead";
|
|
5
4
|
import { AppTheme } from "./AppTheme";
|
|
6
5
|
import { AppMain } from "./AppMain";
|
|
@@ -55,6 +54,6 @@ import { AppMain } from "./AppMain";
|
|
|
55
54
|
* ```
|
|
56
55
|
*/
|
|
57
56
|
export var NextApp = function (props) {
|
|
58
|
-
return (_jsxs(
|
|
57
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
59
58
|
};
|
|
60
59
|
export default NextApp;
|
package/config/index.d.ts
CHANGED
|
@@ -21,16 +21,16 @@ export declare function toPath(urlOrPathname?: string): string;
|
|
|
21
21
|
* - Removes subsequent slashes
|
|
22
22
|
* - Removing initial and ending slashes
|
|
23
23
|
*/
|
|
24
|
-
export declare function normaliseUrlPathname(pathname
|
|
24
|
+
export declare function normaliseUrlPathname(pathname?: string): string;
|
|
25
25
|
/**
|
|
26
26
|
* Clean a pathname and encode each part
|
|
27
27
|
*
|
|
28
28
|
* @see {@link normaliseUrlPathname}
|
|
29
29
|
*/
|
|
30
|
-
export declare function encodePathname(pathname
|
|
30
|
+
export declare function encodePathname(pathname?: string): string;
|
|
31
31
|
/**
|
|
32
32
|
*/
|
|
33
|
-
export declare function getPathRedirect(locale: string,
|
|
33
|
+
export declare function getPathRedirect(locale: string, pathname: string, template: string, dynamic?: boolean, permanent?: boolean): {
|
|
34
34
|
source: string;
|
|
35
35
|
destination: string;
|
|
36
36
|
permanent: boolean;
|
|
@@ -38,7 +38,7 @@ export declare function getPathRedirect(locale: string, localisedPathname: strin
|
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
40
|
*/
|
|
41
|
-
export declare function getPathRewrite(
|
|
41
|
+
export declare function getPathRewrite(pathname: string, template: string, dynamic?: boolean): {
|
|
42
42
|
source: string;
|
|
43
43
|
destination: string;
|
|
44
44
|
};
|
package/config/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export function toPath(urlOrPathname) {
|
|
|
32
32
|
* - Removing initial and ending slashes
|
|
33
33
|
*/
|
|
34
34
|
export function normaliseUrlPathname(pathname) {
|
|
35
|
+
if (pathname === void 0) { pathname = ""; }
|
|
35
36
|
return pathname.replace(/\/+\//g, "/").replace(/^\/+(.*?)\/+$/, "$1");
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
@@ -40,6 +41,7 @@ export function normaliseUrlPathname(pathname) {
|
|
|
40
41
|
* @see {@link normaliseUrlPathname}
|
|
41
42
|
*/
|
|
42
43
|
export function encodePathname(pathname) {
|
|
44
|
+
if (pathname === void 0) { pathname = ""; }
|
|
43
45
|
var parts = normaliseUrlPathname(pathname).split("/");
|
|
44
46
|
return parts
|
|
45
47
|
.filter(function (part) { return !!part; })
|
|
@@ -48,22 +50,28 @@ export function encodePathname(pathname) {
|
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
*/
|
|
51
|
-
export function getPathRedirect(locale,
|
|
53
|
+
export function getPathRedirect(locale, pathname, template, dynamic, permanent) {
|
|
52
54
|
var suffix = dynamic ? "/:slug*" : "";
|
|
55
|
+
var source = "/".concat(locale ? locale + "/" : "").concat(encodePathname(pathname)).concat(suffix);
|
|
56
|
+
var destination = "/".concat(encodePathname(template)).concat(suffix);
|
|
57
|
+
// console.log(`redirect pathname "${source}" to template "${destination}"`);
|
|
53
58
|
return {
|
|
54
|
-
source:
|
|
55
|
-
destination:
|
|
59
|
+
source: source,
|
|
60
|
+
destination: destination,
|
|
56
61
|
permanent: Boolean(permanent),
|
|
57
62
|
locale: false,
|
|
58
63
|
};
|
|
59
64
|
}
|
|
60
65
|
/**
|
|
61
66
|
*/
|
|
62
|
-
export function getPathRewrite(
|
|
67
|
+
export function getPathRewrite(pathname, template, dynamic) {
|
|
63
68
|
var suffix = dynamic ? "/:path*" : "";
|
|
69
|
+
var source = "/".concat(encodePathname(pathname)).concat(suffix);
|
|
70
|
+
var destination = "/".concat(encodePathname(template)).concat(suffix);
|
|
71
|
+
// console.log(`rewriting pathname "${source}" to template "${destination}"`);
|
|
64
72
|
return {
|
|
65
|
-
source:
|
|
66
|
-
destination:
|
|
73
|
+
source: source,
|
|
74
|
+
destination: destination,
|
|
67
75
|
};
|
|
68
76
|
}
|
|
69
77
|
/**
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 =
|
|
7
|
-
var react_2 = require("next-auth/react");
|
|
6
|
+
var react_1 = require("next-auth/react");
|
|
8
7
|
var AppHead_1 = require("../../AppHead");
|
|
9
8
|
var AppTheme_1 = require("../AppTheme");
|
|
10
9
|
var AppMain_1 = require("../AppMain");
|
|
@@ -12,7 +11,7 @@ var AppMain_1 = require("../AppMain");
|
|
|
12
11
|
* App with authentication provided by `next-auth`
|
|
13
12
|
*/
|
|
14
13
|
var NextApp = function (props) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider, tslib_1.__assign({ session: props.pageProps.session }, { children: (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) })) }))] }));
|
|
16
15
|
};
|
|
17
16
|
exports.NextApp = NextApp;
|
|
18
17
|
exports.default = exports.NextApp;
|
package/node/app/css/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
6
|
var AppHead_1 = require("../AppHead");
|
|
8
7
|
var AppTheme_1 = require("./AppTheme");
|
|
9
8
|
var AppMain_1 = require("./AppMain");
|
|
@@ -56,7 +55,7 @@ var AppMain_1 = require("./AppMain");
|
|
|
56
55
|
* ```
|
|
57
56
|
*/
|
|
58
57
|
var NextApp = function (props) {
|
|
59
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
58
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) }))] }));
|
|
60
59
|
};
|
|
61
60
|
exports.NextApp = NextApp;
|
|
62
61
|
exports.default = exports.NextApp;
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 =
|
|
7
|
-
var react_2 = require("next-auth/react");
|
|
6
|
+
var react_1 = require("next-auth/react");
|
|
8
7
|
var AppHead_1 = require("../../AppHead");
|
|
9
8
|
var AppTheme_1 = require("../AppTheme");
|
|
10
9
|
var AppMain_1 = require("../AppMain");
|
|
@@ -12,7 +11,7 @@ var AppMain_1 = require("../AppMain");
|
|
|
12
11
|
* App with authentication provided by `next-auth`
|
|
13
12
|
*/
|
|
14
13
|
var NextApp = function (props) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider, tslib_1.__assign({ session: props.pageProps.session }, { children: (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) })) }))] }));
|
|
16
15
|
};
|
|
17
16
|
exports.NextApp = NextApp;
|
|
18
17
|
exports.default = exports.NextApp;
|
package/node/app/em/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
6
|
var AppHead_1 = require("../AppHead");
|
|
8
7
|
var AppTheme_1 = require("./AppTheme");
|
|
9
8
|
var AppMain_1 = require("./AppMain");
|
|
@@ -11,7 +10,7 @@ var AppMain_1 = require("./AppMain");
|
|
|
11
10
|
* App
|
|
12
11
|
*/
|
|
13
12
|
var NextApp = function (props) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) }))] }));
|
|
15
14
|
};
|
|
16
15
|
exports.NextApp = NextApp;
|
|
17
16
|
exports.default = exports.NextApp;
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 =
|
|
7
|
-
var react_2 = require("next-auth/react");
|
|
6
|
+
var react_1 = require("next-auth/react");
|
|
8
7
|
var AppHead_1 = require("../../AppHead");
|
|
9
8
|
var AppTheme_1 = require("../AppTheme");
|
|
10
9
|
var AppMain_1 = require("../AppMain");
|
|
@@ -12,7 +11,7 @@ var AppMain_1 = require("../AppMain");
|
|
|
12
11
|
* App with authentication provided by `next-auth`
|
|
13
12
|
*/
|
|
14
13
|
var NextApp = function (props) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider, tslib_1.__assign({ session: props.pageProps.session }, { children: (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) })) }))] }));
|
|
16
15
|
};
|
|
17
16
|
exports.NextApp = NextApp;
|
|
18
17
|
exports.default = exports.NextApp;
|
package/node/app/sc/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NextApp = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
6
|
var AppHead_1 = require("../AppHead");
|
|
8
7
|
var AppTheme_1 = require("./AppTheme");
|
|
9
8
|
var AppMain_1 = require("./AppMain");
|
|
@@ -58,7 +57,7 @@ var AppMain_1 = require("./AppMain");
|
|
|
58
57
|
* ```
|
|
59
58
|
*/
|
|
60
59
|
var NextApp = function (props) {
|
|
61
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) }))] }));
|
|
62
61
|
};
|
|
63
62
|
exports.NextApp = NextApp;
|
|
64
63
|
exports.default = exports.NextApp;
|
package/node/config/index.js
CHANGED
|
@@ -36,6 +36,7 @@ exports.toPath = toPath;
|
|
|
36
36
|
* - Removing initial and ending slashes
|
|
37
37
|
*/
|
|
38
38
|
function normaliseUrlPathname(pathname) {
|
|
39
|
+
if (pathname === void 0) { pathname = ""; }
|
|
39
40
|
return pathname.replace(/\/+\//g, "/").replace(/^\/+(.*?)\/+$/, "$1");
|
|
40
41
|
}
|
|
41
42
|
exports.normaliseUrlPathname = normaliseUrlPathname;
|
|
@@ -45,6 +46,7 @@ exports.normaliseUrlPathname = normaliseUrlPathname;
|
|
|
45
46
|
* @see {@link normaliseUrlPathname}
|
|
46
47
|
*/
|
|
47
48
|
function encodePathname(pathname) {
|
|
49
|
+
if (pathname === void 0) { pathname = ""; }
|
|
48
50
|
var parts = normaliseUrlPathname(pathname).split("/");
|
|
49
51
|
return parts
|
|
50
52
|
.filter(function (part) { return !!part; })
|
|
@@ -54,11 +56,14 @@ function encodePathname(pathname) {
|
|
|
54
56
|
exports.encodePathname = encodePathname;
|
|
55
57
|
/**
|
|
56
58
|
*/
|
|
57
|
-
function getPathRedirect(locale,
|
|
59
|
+
function getPathRedirect(locale, pathname, template, dynamic, permanent) {
|
|
58
60
|
var suffix = dynamic ? "/:slug*" : "";
|
|
61
|
+
var source = "/".concat(locale ? locale + "/" : "").concat(encodePathname(pathname)).concat(suffix);
|
|
62
|
+
var destination = "/".concat(encodePathname(template)).concat(suffix);
|
|
63
|
+
// console.log(`redirect pathname "${source}" to template "${destination}"`);
|
|
59
64
|
return {
|
|
60
|
-
source:
|
|
61
|
-
destination:
|
|
65
|
+
source: source,
|
|
66
|
+
destination: destination,
|
|
62
67
|
permanent: Boolean(permanent),
|
|
63
68
|
locale: false,
|
|
64
69
|
};
|
|
@@ -66,11 +71,14 @@ function getPathRedirect(locale, localisedPathname, templateName, dynamic, perma
|
|
|
66
71
|
exports.getPathRedirect = getPathRedirect;
|
|
67
72
|
/**
|
|
68
73
|
*/
|
|
69
|
-
function getPathRewrite(
|
|
74
|
+
function getPathRewrite(pathname, template, dynamic) {
|
|
70
75
|
var suffix = dynamic ? "/:path*" : "";
|
|
76
|
+
var source = "/".concat(encodePathname(pathname)).concat(suffix);
|
|
77
|
+
var destination = "/".concat(encodePathname(template)).concat(suffix);
|
|
78
|
+
// console.log(`rewriting pathname "${source}" to template "${destination}"`);
|
|
71
79
|
return {
|
|
72
|
-
source:
|
|
73
|
-
destination:
|
|
80
|
+
source: source,
|
|
81
|
+
destination: destination,
|
|
74
82
|
};
|
|
75
83
|
}
|
|
76
84
|
exports.getPathRewrite = getPathRewrite;
|
package/package.json
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koine/next",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
+
"peerDependenciesMeta": {
|
|
5
|
+
"@mui/material": {
|
|
6
|
+
"optional": true
|
|
7
|
+
},
|
|
8
|
+
"@emotion/react": {
|
|
9
|
+
"optional": true
|
|
10
|
+
},
|
|
11
|
+
"@emotion/server": {
|
|
12
|
+
"optional": true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
4
15
|
"main": "./node/index.js",
|
|
5
16
|
"typings": "./index.d.ts",
|
|
6
17
|
"dependencies": {},
|
|
7
18
|
"peerDependencies": {
|
|
8
19
|
"react": "^16.8 || ^17 || ^18",
|
|
9
20
|
"next": "^12.1.6",
|
|
10
|
-
"@koine/utils": "1.0.
|
|
21
|
+
"@koine/utils": "1.0.40",
|
|
11
22
|
"framer-motion": "^6.3.16",
|
|
12
23
|
"next-auth": "^4.6.1",
|
|
13
24
|
"@mui/material": "^5.8.6",
|
|
14
25
|
"@emotion/react": "^11.9.3",
|
|
15
26
|
"styled-components": "^5.3.5",
|
|
16
27
|
"react-hook-form": "^7.33.0",
|
|
17
|
-
"@koine/react": "1.0.
|
|
28
|
+
"@koine/react": "1.0.40",
|
|
18
29
|
"@mui/base": "^5.0.0-alpha.87",
|
|
19
30
|
"react-icons": "^4.4.0",
|
|
20
31
|
"date-fns": "^2.28.0",
|
|
@@ -30,7 +41,7 @@
|
|
|
30
41
|
"next-translate": "^1.4.0",
|
|
31
42
|
"next-seo": "^5.4.0"
|
|
32
43
|
},
|
|
33
|
-
"version": "1.0.
|
|
44
|
+
"version": "1.0.40",
|
|
34
45
|
"module": "./index.js",
|
|
35
46
|
"types": "./index.d.ts"
|
|
36
47
|
}
|