@koine/next 2.0.0-beta.51 → 2.0.0-beta.53

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.
Files changed (3) hide show
  1. package/config.d.ts +1 -103
  2. package/package.json +5 -5
  3. package/typings.d.ts +48 -0
package/config.d.ts CHANGED
@@ -4,106 +4,4 @@ export type WithKoineOptions = NextConfig & {
4
4
  nx?: boolean;
5
5
  svg?: boolean;
6
6
  } & Partial<WithI18nLegacyOptions> & WithI18nAsyncOptions;
7
- export declare let withKoine: (options?: WithKoineOptions) => NextConfig | {
8
- redirects(): Promise<(Omit<import("next/dist/lib/load-custom-routes").Redirect, "locale"> & {
9
- locale?: boolean | undefined;
10
- })[]>;
11
- rewrites(): Promise<{
12
- beforeFiles: (Omit<import("next/dist/lib/load-custom-routes").Rewrite, "locale"> & {
13
- locale?: boolean | undefined;
14
- })[];
15
- afterFiles: import("next/dist/lib/load-custom-routes").Rewrite[];
16
- fallback: import("next/dist/lib/load-custom-routes").Rewrite[];
17
- }>;
18
- exportPathMap?: ((defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
19
- dev: boolean;
20
- dir: string;
21
- outDir: string | null;
22
- distDir: string;
23
- buildId: string;
24
- }) => import("next/dist/server/config-shared").ExportPathMap | Promise<import("next/dist/server/config-shared").ExportPathMap>) | undefined;
25
- i18n?: import("next/dist/server/config-shared").I18NConfig | null | undefined;
26
- eslint?: import("next/dist/server/config-shared").ESLintConfig | undefined;
27
- typescript?: import("next/dist/server/config-shared").TypeScriptConfig | undefined;
28
- headers?: (() => Promise<import("next/dist/lib/load-custom-routes").Header[]>) | undefined;
29
- excludeDefaultMomentLocales?: boolean | undefined;
30
- webpack?: import("next/dist/server/config-shared").NextJsWebpackConfig | null | undefined;
31
- trailingSlash?: boolean | undefined;
32
- env?: Record<string, string | undefined> | undefined;
33
- distDir?: string | undefined;
34
- cleanDistDir?: boolean | undefined;
35
- assetPrefix?: string | undefined;
36
- cacheHandler?: string | undefined;
37
- cacheMaxMemorySize?: number | undefined;
38
- useFileSystemPublicRoutes?: boolean | undefined;
39
- generateBuildId?: (() => string | Promise<string | null> | null) | undefined;
40
- generateEtags?: boolean | undefined;
41
- pageExtensions?: string[] | undefined;
42
- compress?: boolean | undefined;
43
- analyticsId?: string | undefined;
44
- poweredByHeader?: boolean | undefined;
45
- images?: Partial<import("next/dist/shared/lib/image-config").ImageConfigComplete> | undefined;
46
- devIndicators?: {
47
- buildActivity?: boolean | undefined;
48
- buildActivityPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
49
- } | undefined;
50
- onDemandEntries?: {
51
- maxInactiveAge?: number | undefined;
52
- pagesBufferLength?: number | undefined;
53
- } | undefined;
54
- amp?: {
55
- canonicalBase?: string | undefined;
56
- } | undefined;
57
- basePath?: string | undefined;
58
- sassOptions?: {
59
- [key: string]: any;
60
- } | undefined;
61
- productionBrowserSourceMaps?: boolean | undefined;
62
- optimizeFonts?: boolean | undefined;
63
- reactProductionProfiling?: boolean | undefined;
64
- reactStrictMode?: boolean | null | undefined;
65
- publicRuntimeConfig?: {
66
- [key: string]: any;
67
- } | undefined;
68
- serverRuntimeConfig?: {
69
- [key: string]: any;
70
- } | undefined;
71
- httpAgentOptions?: {
72
- keepAlive?: boolean | undefined;
73
- } | undefined;
74
- outputFileTracing?: boolean | undefined;
75
- staticPageGenerationTimeout?: number | undefined;
76
- crossOrigin?: false | "anonymous" | "use-credentials" | undefined;
77
- swcMinify?: boolean | undefined;
78
- compiler?: {
79
- reactRemoveProperties?: boolean | {
80
- properties?: string[] | undefined;
81
- } | undefined;
82
- relay?: {
83
- src: string;
84
- artifactDirectory?: string | undefined;
85
- language?: "typescript" | "javascript" | "flow" | undefined;
86
- eagerEsModules?: boolean | undefined;
87
- } | undefined;
88
- removeConsole?: boolean | {
89
- exclude?: string[] | undefined;
90
- } | undefined;
91
- styledComponents?: boolean | import("next/dist/server/config-shared").StyledComponentsConfig | undefined;
92
- emotion?: boolean | import("next/dist/server/config-shared").EmotionConfig | undefined;
93
- } | undefined;
94
- output?: "standalone" | "export" | undefined;
95
- transpilePackages?: string[] | undefined;
96
- skipMiddlewareUrlNormalize?: boolean | undefined;
97
- skipTrailingSlashRedirect?: boolean | undefined;
98
- modularizeImports?: Record<string, {
99
- transform: string | Record<string, string>;
100
- preventFullImport?: boolean | undefined;
101
- skipDefaultConversion?: boolean | undefined;
102
- }> | undefined;
103
- logging?: {
104
- fetches?: {
105
- fullUrl?: boolean | undefined;
106
- } | undefined;
107
- } | undefined;
108
- experimental?: import("next/dist/server/config-shared").ExperimentalConfig | undefined;
109
- };
7
+ export declare let withKoine: (options?: WithKoineOptions) => NextConfig;
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
4
  "dependencies": {
5
- "@koine/browser": "2.0.0-beta.51",
6
- "@koine/react": "2.0.0-beta.51",
7
- "@koine/utils": "2.0.0-beta.51",
8
- "@koine/i18n": "2.0.0-beta.51"
5
+ "@koine/browser": "2.0.0-beta.53",
6
+ "@koine/react": "2.0.0-beta.53",
7
+ "@koine/utils": "2.0.0-beta.53",
8
+ "@koine/i18n": "2.0.0-beta.53"
9
9
  },
10
10
  "peerDependencies": {
11
11
  "next": "^14.0.4",
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "module": "./index.esm.js",
48
48
  "main": "./index.cjs.js",
49
- "version": "2.0.0-beta.51"
49
+ "version": "2.0.0-beta.53"
50
50
  }
package/typings.d.ts ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
3
+ */
4
+ type NextGetStaticPathsResult<Params extends { [key: string]: any }> = Omit<
5
+ import("next").GetStaticPathsResult,
6
+ "paths"
7
+ > & {
8
+ paths: Array<string | { params: Params; locale?: string }>;
9
+ };
10
+
11
+ /**
12
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
13
+ */
14
+ declare type PageDataStaticPaths<Params extends { [key: string]: any }> = (
15
+ context: import("next").GetStaticPathsContext,
16
+ ) =>
17
+ | Promise<NextGetStaticPathsResult<Params>>
18
+ | NextGetStaticPathsResult<Params>;
19
+
20
+ /**
21
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
22
+ */
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ declare type PageDataStatic<P extends { [key: string]: any }> =
25
+ import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
26
+
27
+ /**
28
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
29
+ */
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ declare type PageDataServer<P extends { [key: string]: any }> =
32
+ import("next").GetServerSideProps<P, import("querystring").ParsedUrlQuery>;
33
+
34
+ /**
35
+ * Workaround to re-create the type `RouteProperties` that is not exported by
36
+ * `next.js`
37
+ */
38
+ declare type NextRouteProperties = Parameters<
39
+ import("next/router").Router["getRouteInfo"]
40
+ >[0]["routeProps"];
41
+
42
+ /**
43
+ * Extend NodeJS `process.env` with variables used by @koine
44
+ */
45
+ // declare namespace NodeJS {
46
+ // interface ProcessEnv {
47
+ // }
48
+ // }