rasengan 1.2.2 → 1.2.4
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/CHANGELOG.md +8 -0
- package/lib/esm/core/plugins/index.js +5 -0
- package/lib/esm/entries/server/entry.server.js +4 -1
- package/lib/types/core/dynamic/index.d.ts +1 -1
- package/lib/types/core/plugins/index.d.ts +1 -0
- package/lib/types/entries/server/index.d.ts +1 -1
- package/lib/types/routing/components/fallback.d.ts +1 -1
- package/lib/types/routing/components/index.d.ts +4 -4
- package/lib/types/routing/components/template.d.ts +4 -4
- package/lib/types/routing/error-overlay/ErrorOverlayProvider.d.ts +1 -1
- package/lib/types/routing/providers/metadata.d.ts +1 -1
- package/lib/types/server/build/manifest.d.ts +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -134,6 +134,7 @@ const fixCPathPlugin = () => {
|
|
|
134
134
|
};
|
|
135
135
|
export const Adapters = {
|
|
136
136
|
VERCEL: 'vercel',
|
|
137
|
+
NETLIFY: 'netlify',
|
|
137
138
|
DEFAULT: '',
|
|
138
139
|
};
|
|
139
140
|
/**
|
|
@@ -254,6 +255,10 @@ const prepareToDeploy = async (adapter) => {
|
|
|
254
255
|
await adapter.prepare();
|
|
255
256
|
break;
|
|
256
257
|
}
|
|
258
|
+
case Adapters.NETLIFY: {
|
|
259
|
+
await adapter.prepare();
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
257
262
|
default:
|
|
258
263
|
break;
|
|
259
264
|
}
|
|
@@ -28,7 +28,10 @@ export const render = async (StaticRouterComponent, res, options, stream = true)
|
|
|
28
28
|
Template = (await loadModuleSSR(`${rootPath}/src/template`)).default;
|
|
29
29
|
}
|
|
30
30
|
if (stream) {
|
|
31
|
-
await renderToStream(_jsx(TemplateLayout, { StaticRouterComponent: StaticRouterComponent, metadata: metadata, assets: assets, App: App, Template: Template }), res, {
|
|
31
|
+
await renderToStream(_jsx(TemplateLayout, { StaticRouterComponent: StaticRouterComponent, metadata: metadata, assets: assets, App: App, Template: Template }), res, {
|
|
32
|
+
statusCode: options.statusCode,
|
|
33
|
+
responseHeaders: options.responseHeaders,
|
|
34
|
+
});
|
|
32
35
|
}
|
|
33
36
|
else {
|
|
34
37
|
const html = renderToString(_jsx(TemplateLayout, { StaticRouterComponent: StaticRouterComponent, metadata: metadata, assets: assets, App: App, Template: Template }));
|
|
@@ -10,7 +10,7 @@ type DynamicComponent<T extends ComponentType<any>> = FunctionComponent<Componen
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function dynamicLoad<T extends ComponentType<any>>(load: () => Promise<{
|
|
12
12
|
default: T;
|
|
13
|
-
}>, fallback?: import("react
|
|
13
|
+
}>, fallback?: import("react").JSX.Element): DynamicComponent<T>;
|
|
14
14
|
/**
|
|
15
15
|
* It allows you to defer loading of page components,
|
|
16
16
|
* and only include them in the client bundle when they're needed
|
|
@@ -4,22 +4,22 @@ import { RasenganPageComponentProps } from '../types.js';
|
|
|
4
4
|
* Error boundary component that will be displayed if an error occurs during a routing
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
export declare function ErrorBoundary(): import("react
|
|
7
|
+
export declare function ErrorBoundary(): import("react").JSX.Element;
|
|
8
8
|
/**
|
|
9
9
|
* Page component that defines title and description to a page
|
|
10
10
|
*/
|
|
11
|
-
export declare const RasenganPageComponent: ({ page: Page, data, }: RasenganPageComponentProps) => import("react
|
|
11
|
+
export declare const RasenganPageComponent: ({ page: Page, data, }: RasenganPageComponentProps) => import("react").JSX.Element;
|
|
12
12
|
/**
|
|
13
13
|
* Component that will be displayed when a page is not found
|
|
14
14
|
* @returns React.ReactNode
|
|
15
15
|
*/
|
|
16
|
-
export declare const NotFoundPageComponent: () => import("react
|
|
16
|
+
export declare const NotFoundPageComponent: () => import("react").JSX.Element;
|
|
17
17
|
/**
|
|
18
18
|
* Custom Link Component
|
|
19
19
|
* @param props
|
|
20
20
|
* @returns React.ReactNode
|
|
21
21
|
*/
|
|
22
|
-
export declare const CustomLink: (props: LinkProps) => import("react
|
|
22
|
+
export declare const CustomLink: (props: LinkProps) => import("react").JSX.Element;
|
|
23
23
|
type Props = {
|
|
24
24
|
alwaysToTop?: boolean;
|
|
25
25
|
target?: React.RefObject<HTMLElement | null>;
|
|
@@ -4,7 +4,7 @@ import { LayoutComponent, Metadata, MetadataWithoutTitleAndDescription } from '.
|
|
|
4
4
|
/**
|
|
5
5
|
* App component that represent the entry point of the application
|
|
6
6
|
*/
|
|
7
|
-
export declare const RootComponent: ({ Router, children, }: RootComponentProps) => string | number | bigint | true |
|
|
7
|
+
export declare const RootComponent: ({ Router, children, }: RootComponentProps) => string | number | bigint | true | JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>>;
|
|
8
8
|
/**
|
|
9
9
|
* Head component
|
|
10
10
|
* @params data - Helmet context
|
|
@@ -19,7 +19,7 @@ export declare const HeadComponent: ({ metadata, assets, children, }: {
|
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
bootstrap?: string;
|
|
21
21
|
styles?: string;
|
|
22
|
-
}) =>
|
|
22
|
+
}) => JSX.Element;
|
|
23
23
|
/**
|
|
24
24
|
* Body component
|
|
25
25
|
*/
|
|
@@ -27,13 +27,13 @@ export declare const BodyComponent: ({ children, asChild, AppContent, }: {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
asChild?: boolean;
|
|
29
29
|
AppContent?: React.ReactNode;
|
|
30
|
-
}) =>
|
|
30
|
+
}) => JSX.Element;
|
|
31
31
|
/**
|
|
32
32
|
* Scripts component
|
|
33
33
|
*/
|
|
34
34
|
export declare const ScriptComponent: ({ children, }: {
|
|
35
35
|
children?: React.ReactNode;
|
|
36
|
-
}) =>
|
|
36
|
+
}) => JSX.Element;
|
|
37
37
|
/**
|
|
38
38
|
* Default layout component
|
|
39
39
|
*/
|
|
@@ -3,5 +3,5 @@ interface Props {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
devMode: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function ErrorOverlayProvider({ children, devMode }: Props): import("react
|
|
6
|
+
export declare function ErrorOverlayProvider({ children, devMode }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -32,7 +32,7 @@ export declare class ManifestManager {
|
|
|
32
32
|
* @param source - The file path of the page to generate meta tags for.
|
|
33
33
|
* @returns HTML string containing script and style tags.
|
|
34
34
|
*/
|
|
35
|
-
generateMetaTags(source: string): import("react
|
|
35
|
+
generateMetaTags(source: string): import("react").JSX.Element[];
|
|
36
36
|
findEntry(source: string): ManifestEntry;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rasengan",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"description": "The modern React Framework",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/esm/index.js",
|
|
@@ -59,15 +59,6 @@
|
|
|
59
59
|
"issues": "https://github.com/rasengan-dev/rasenganjs/issues"
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://rasengan.dev",
|
|
62
|
-
"scripts": {
|
|
63
|
-
"build:compile": "tsc -b ./tsconfig.esm.json ./tsconfig.types.json",
|
|
64
|
-
"build:clean": "rimraf ./lib",
|
|
65
|
-
"build:copy-assets": "mkdir -p lib/esm/routing/error-overlay && cp src/routing/error-overlay/error-overlay.css lib/esm/routing/error-overlay/",
|
|
66
|
-
"build": "pnpm run build:clean & pnpm run build:compile && pnpm run build:copy-assets",
|
|
67
|
-
"deploy": "pnpm publish --access public",
|
|
68
|
-
"deploy:beta": "pnpm run deploy --tag beta",
|
|
69
|
-
"pack": "pnpm pack --pack-destination ./release/"
|
|
70
|
-
},
|
|
71
62
|
"dependencies": {
|
|
72
63
|
"@vitejs/plugin-react": "^5.0.0",
|
|
73
64
|
"chalk": "^5.3.0",
|
|
@@ -78,7 +69,7 @@
|
|
|
78
69
|
"inquirer": "^9.2.12",
|
|
79
70
|
"open": "^10.1.0",
|
|
80
71
|
"ora": "^7.0.1",
|
|
81
|
-
"react-router": "^7.
|
|
72
|
+
"react-router": "^7.15.0"
|
|
82
73
|
},
|
|
83
74
|
"peerDependencies": {
|
|
84
75
|
"@types/node": ">=20.0.0",
|
|
@@ -140,5 +131,14 @@
|
|
|
140
131
|
"ssr",
|
|
141
132
|
"ssg",
|
|
142
133
|
"spa"
|
|
143
|
-
]
|
|
144
|
-
|
|
134
|
+
],
|
|
135
|
+
"scripts": {
|
|
136
|
+
"build:compile": "tsc -b ./tsconfig.esm.json ./tsconfig.types.json",
|
|
137
|
+
"build:clean": "rimraf ./lib",
|
|
138
|
+
"build:copy-assets": "mkdir -p lib/esm/routing/error-overlay && cp src/routing/error-overlay/error-overlay.css lib/esm/routing/error-overlay/",
|
|
139
|
+
"build": "pnpm run build:clean & pnpm run build:compile && pnpm run build:copy-assets",
|
|
140
|
+
"deploy": "pnpm publish --access public",
|
|
141
|
+
"deploy:beta": "pnpm run deploy --tag beta",
|
|
142
|
+
"pack": "pnpm pack --pack-destination ./release/"
|
|
143
|
+
}
|
|
144
|
+
}
|