@koine/next 2.0.0-beta.39 → 2.0.0-beta.41
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/config.cjs.js +2 -2
- package/config.d.ts +19 -27
- package/config.esm.js +2 -2
- package/package.json +4 -4
- package/config-i18n.d.ts +0 -29
package/config.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var nextConfig = require('@koine/i18n/next-config');
|
|
6
6
|
|
|
7
|
-
let withKoine=({nx:
|
|
7
|
+
let withKoine=(r={})=>o=>{let{nx:t=!0,svg:i=!0,i18n:n}=r,s={eslint:{ignoreDuringBuilds:!0},typescript:{ignoreBuildErrors:!0},poweredByHeader:!1,experimental:{scrollRestoration:!0,...o.experimental||{}},...o};return (i&&(t?s.nx={svgr:!0}:(delete s.nx,s.webpack=(e,r)=>{let o="function"==typeof s.webpack?s.webpack(e,r):e;return o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o})),n)?nextConfig.withI18nNext({...r,i18n:n})(s):s};
|
|
8
8
|
|
|
9
9
|
exports.withKoine = withKoine;
|
package/config.d.ts
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
import type { NextConfig } from "next";
|
|
2
|
-
import { type
|
|
3
|
-
|
|
2
|
+
import { type WithI18nNextConfig } from "@koine/i18n/next-config";
|
|
3
|
+
type WithKoineConfig = {
|
|
4
4
|
nx?: boolean;
|
|
5
5
|
svg?: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
i18n: ConfigI18nOptions & {
|
|
10
|
-
loader?: any;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
interface MergedConfig extends KoineNextConfig, Omit<NextConfig, "i18n"> {
|
|
14
|
-
}
|
|
15
|
-
export declare let withKoine: ({ nx, svg, page, routes, permanent, debug, ...custom }?: MergedConfig) => NextConfig | {
|
|
16
|
-
redirects(): Promise<import("./config-i18n.js").Redirect[]>;
|
|
6
|
+
} & Partial<WithI18nNextConfig>;
|
|
7
|
+
export declare let withKoine: (config?: WithKoineConfig) => (customNextConfig: NextConfig) => NextConfig | {
|
|
8
|
+
redirects(): Promise<import("@koine/i18n/client/adapter-next/config").Redirect[]>;
|
|
17
9
|
rewrites(): Promise<{
|
|
18
|
-
beforeFiles: import("
|
|
19
|
-
afterFiles: import("next/dist/lib/load-custom-routes
|
|
20
|
-
fallback: import("next/dist/lib/load-custom-routes
|
|
10
|
+
beforeFiles: import("@koine/i18n/client/adapter-next/config").Rewrite[];
|
|
11
|
+
afterFiles: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
12
|
+
fallback: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
21
13
|
}>;
|
|
22
|
-
exportPathMap?: ((defaultMap: import("next/dist/server/config-shared
|
|
14
|
+
exportPathMap?: ((defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
|
|
23
15
|
dev: boolean;
|
|
24
16
|
dir: string;
|
|
25
17
|
outDir: string | null;
|
|
26
18
|
distDir: string;
|
|
27
19
|
buildId: string;
|
|
28
|
-
}) => import("next/dist/server/config-shared
|
|
29
|
-
i18n?: import("next/dist/server/config-shared
|
|
30
|
-
eslint?: import("next/dist/server/config-shared
|
|
31
|
-
typescript?: import("next/dist/server/config-shared
|
|
32
|
-
headers?: (() => Promise<import("next/dist/lib/load-custom-routes
|
|
20
|
+
}) => import("next/dist/server/config-shared").ExportPathMap | Promise<import("next/dist/server/config-shared").ExportPathMap>) | undefined;
|
|
21
|
+
i18n?: import("next/dist/server/config-shared").I18NConfig | null | undefined;
|
|
22
|
+
eslint?: import("next/dist/server/config-shared").ESLintConfig | undefined;
|
|
23
|
+
typescript?: import("next/dist/server/config-shared").TypeScriptConfig | undefined;
|
|
24
|
+
headers?: (() => Promise<import("next/dist/lib/load-custom-routes").Header[]>) | undefined;
|
|
33
25
|
excludeDefaultMomentLocales?: boolean | undefined;
|
|
34
|
-
webpack?: import("next/dist/server/config-shared
|
|
26
|
+
webpack?: import("next/dist/server/config-shared").NextJsWebpackConfig | null | undefined;
|
|
35
27
|
trailingSlash?: boolean | undefined;
|
|
36
28
|
env?: Record<string, string | undefined> | undefined;
|
|
37
29
|
distDir?: string | undefined;
|
|
@@ -46,7 +38,7 @@ export declare let withKoine: ({ nx, svg, page, routes, permanent, debug, ...cus
|
|
|
46
38
|
compress?: boolean | undefined;
|
|
47
39
|
analyticsId?: string | undefined;
|
|
48
40
|
poweredByHeader?: boolean | undefined;
|
|
49
|
-
images?: Partial<import("next/dist/shared/lib/image-config
|
|
41
|
+
images?: Partial<import("next/dist/shared/lib/image-config").ImageConfigComplete> | undefined;
|
|
50
42
|
devIndicators?: {
|
|
51
43
|
buildActivity?: boolean | undefined;
|
|
52
44
|
buildActivityPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
|
|
@@ -92,8 +84,8 @@ export declare let withKoine: ({ nx, svg, page, routes, permanent, debug, ...cus
|
|
|
92
84
|
removeConsole?: boolean | {
|
|
93
85
|
exclude?: string[] | undefined;
|
|
94
86
|
} | undefined;
|
|
95
|
-
styledComponents?: boolean | import("next/dist/server/config-shared
|
|
96
|
-
emotion?: boolean | import("next/dist/server/config-shared
|
|
87
|
+
styledComponents?: boolean | import("next/dist/server/config-shared").StyledComponentsConfig | undefined;
|
|
88
|
+
emotion?: boolean | import("next/dist/server/config-shared").EmotionConfig | undefined;
|
|
97
89
|
} | undefined;
|
|
98
90
|
output?: "standalone" | "export" | undefined;
|
|
99
91
|
transpilePackages?: string[] | undefined;
|
|
@@ -109,6 +101,6 @@ export declare let withKoine: ({ nx, svg, page, routes, permanent, debug, ...cus
|
|
|
109
101
|
fullUrl?: boolean | undefined;
|
|
110
102
|
} | undefined;
|
|
111
103
|
} | undefined;
|
|
112
|
-
experimental?: import("next/dist/server/config-shared
|
|
104
|
+
experimental?: import("next/dist/server/config-shared").ExperimentalConfig | undefined;
|
|
113
105
|
};
|
|
114
106
|
export {};
|
package/config.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { withI18nNext } from '@koine/i18n/next-config';
|
|
2
2
|
|
|
3
|
-
let withKoine=({nx:
|
|
3
|
+
let withKoine=(r={})=>o=>{let{nx:t=!0,svg:i=!0,i18n:n}=r,s={eslint:{ignoreDuringBuilds:!0},typescript:{ignoreBuildErrors:!0},poweredByHeader:!1,experimental:{scrollRestoration:!0,...o.experimental||{}},...o};return (i&&(t?s.nx={svgr:!0}:(delete s.nx,s.webpack=(e,r)=>{let o="function"==typeof s.webpack?s.webpack(e,r):e;return o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o})),n)?withI18nNext({...r,i18n:n})(s):s};
|
|
4
4
|
|
|
5
5
|
export { withKoine };
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@koine/next",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@koine/browser": "2.0.0-beta.
|
|
6
|
-
"@koine/react": "2.0.0-beta.
|
|
7
|
-
"@koine/utils": "2.0.0-beta.
|
|
5
|
+
"@koine/browser": "2.0.0-beta.41",
|
|
6
|
+
"@koine/react": "2.0.0-beta.41",
|
|
7
|
+
"@koine/utils": "2.0.0-beta.41"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"next": "^14.0.4",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
},
|
|
46
46
|
"module": "./index.esm.js",
|
|
47
47
|
"main": "./index.cjs.js",
|
|
48
|
-
"version": "2.0.0-beta.
|
|
48
|
+
"version": "2.0.0-beta.41"
|
|
49
49
|
}
|
package/config-i18n.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Redirect as _Redirect, Rewrite as _Rewrite } from "next/dist/lib/load-custom-routes";
|
|
2
|
-
export type Redirect = Omit<_Redirect, "locale"> & {
|
|
3
|
-
locale?: boolean;
|
|
4
|
-
};
|
|
5
|
-
export type Rewrite = Omit<_Rewrite, "locale"> & {
|
|
6
|
-
locale?: boolean;
|
|
7
|
-
};
|
|
8
|
-
type Route = string | {
|
|
9
|
-
[key: string]: Route | string;
|
|
10
|
-
};
|
|
11
|
-
type RoutesByLocale = Record<string, Route>;
|
|
12
|
-
export type Locale = string;
|
|
13
|
-
export type Routes = Record<Locale, RoutesByLocale>;
|
|
14
|
-
export type ConfigI18nOptions = {
|
|
15
|
-
locales: Locale[];
|
|
16
|
-
defaultLocale: Locale;
|
|
17
|
-
hideDefaultLocaleInUrl?: boolean;
|
|
18
|
-
localeParam?: string;
|
|
19
|
-
};
|
|
20
|
-
type Options = ConfigI18nOptions & {
|
|
21
|
-
routes: Routes;
|
|
22
|
-
debug?: boolean;
|
|
23
|
-
permanent?: boolean;
|
|
24
|
-
};
|
|
25
|
-
type GetRedirectsOptions = Options;
|
|
26
|
-
export declare function getRedirects(arg: GetRedirectsOptions): Redirect[];
|
|
27
|
-
type GetRewritesOptions = Options;
|
|
28
|
-
export declare function getRewrites(arg: GetRewritesOptions): Rewrite[];
|
|
29
|
-
export {};
|