rari 0.5.0 → 0.5.1
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/dist/app-routes-CUB8L75K.mjs +3 -0
- package/dist/{cli.js → cli.mjs} +96 -4
- package/dist/{client.d.ts → client.d.mts} +1 -1
- package/dist/{client.js → client.mjs} +1 -1
- package/dist/{index.d.ts → index.d.mts} +2 -2
- package/dist/{index.js → index.mjs} +5 -5
- package/dist/{loading-component-map-ncdZsTHR.js → loading-component-map-Dda5WP1L.mjs} +1 -1
- package/dist/platform-Bv9HDvl_.mjs +3 -0
- package/dist/server-build-BGFb0d6Z.mjs +3 -0
- package/dist/{vite-luD19yom.js → vite-2nVNlWc7.mjs} +9 -8
- package/dist/{vite-BuiVvcHW.d.ts → vite-CEX_9o-t.d.mts} +1 -1
- package/dist/{vite.d.ts → vite.d.mts} +2 -2
- package/dist/{vite.js → vite.mjs} +5 -5
- package/package.json +17 -17
- package/dist/app-routes--nEB7s8Y.js +0 -3
- package/dist/platform-BQYJmcjj.js +0 -96
- package/dist/platform-BxRrDBpt.js +0 -3
- package/dist/server-build-BaDLsou9.js +0 -3
- /package/dist/{app-routes-BGtA0jnj.js → app-routes-DpO5Hf-o.mjs} +0 -0
- /package/dist/{chunk-B1JASekH.js → chunk-DFPPfDFE.mjs} +0 -0
- /package/dist/{cli.d.ts → cli.d.mts} +0 -0
- /package/dist/hooks/{useActionState.d.ts → useActionState.d.mts} +0 -0
- /package/dist/hooks/{useActionState.js → useActionState.mjs} +0 -0
- /package/dist/{loading-component-map-BXjJzjSo.js → loading-component-map-DR9_TT5T.mjs} +0 -0
- /package/dist/{railway-CRtNl_gX.js → railway-B8SUWVNF.mjs} +0 -0
- /package/dist/{render-DzSb9sic.js → render-CnuI67F1.mjs} +0 -0
- /package/dist/runtime/{actions.d.ts → actions.d.mts} +0 -0
- /package/dist/runtime/{actions.js → actions.mjs} +0 -0
- /package/dist/{runtime-client-DGh6p4eG.js → runtime-client-BWSSyzPt.mjs} +0 -0
- /package/dist/{runtime-client-ooA7mT-3.d.ts → runtime-client-DrRcA8ca.d.mts} +0 -0
- /package/dist/{server-build-CqjgVo85.js → server-build-DXITrV8k.mjs} +0 -0
package/dist/{cli.js → cli.mjs}
RENAMED
|
@@ -1,9 +1,101 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { t as __require } from "./chunk-DFPPfDFE.mjs";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
3
5
|
import process from "node:process";
|
|
4
6
|
import { spawn } from "node:child_process";
|
|
5
7
|
import colors from "picocolors";
|
|
6
8
|
|
|
9
|
+
//#region src/platform.ts
|
|
10
|
+
const SUPPORTED_PLATFORMS = {
|
|
11
|
+
"linux-x64": "rari-linux-x64",
|
|
12
|
+
"linux-arm64": "rari-linux-arm64",
|
|
13
|
+
"darwin-x64": "rari-darwin-x64",
|
|
14
|
+
"darwin-arm64": "rari-darwin-arm64",
|
|
15
|
+
"win32-x64": "rari-win32-x64"
|
|
16
|
+
};
|
|
17
|
+
function getPlatformInfo() {
|
|
18
|
+
const platform = process.platform;
|
|
19
|
+
const arch = process.arch;
|
|
20
|
+
let normalizedPlatform;
|
|
21
|
+
switch (platform) {
|
|
22
|
+
case "darwin":
|
|
23
|
+
normalizedPlatform = "darwin";
|
|
24
|
+
break;
|
|
25
|
+
case "linux":
|
|
26
|
+
normalizedPlatform = "linux";
|
|
27
|
+
break;
|
|
28
|
+
case "win32":
|
|
29
|
+
normalizedPlatform = "win32";
|
|
30
|
+
break;
|
|
31
|
+
default: throw new Error(`Unsupported platform: ${platform}. Rari supports Linux, macOS, and Windows.`);
|
|
32
|
+
}
|
|
33
|
+
let normalizedArch;
|
|
34
|
+
switch (arch) {
|
|
35
|
+
case "x64":
|
|
36
|
+
normalizedArch = "x64";
|
|
37
|
+
break;
|
|
38
|
+
case "arm64":
|
|
39
|
+
normalizedArch = "arm64";
|
|
40
|
+
break;
|
|
41
|
+
default: throw new Error(`Unsupported architecture: ${arch}. Rari supports x64 and ARM64.`);
|
|
42
|
+
}
|
|
43
|
+
const packageName = SUPPORTED_PLATFORMS[`${normalizedPlatform}-${normalizedArch}`];
|
|
44
|
+
if (!packageName) throw new Error(`Unsupported platform combination: ${normalizedPlatform}-${normalizedArch}. Supported platforms: ${Object.keys(SUPPORTED_PLATFORMS).join(", ")}`);
|
|
45
|
+
return {
|
|
46
|
+
platform: normalizedPlatform,
|
|
47
|
+
arch: normalizedArch,
|
|
48
|
+
packageName,
|
|
49
|
+
binaryName: normalizedPlatform === "win32" ? "rari.exe" : "rari"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function getBinaryPath() {
|
|
53
|
+
const { packageName, binaryName } = getPlatformInfo();
|
|
54
|
+
try {
|
|
55
|
+
let currentDir = process.cwd();
|
|
56
|
+
let workspaceRoot = null;
|
|
57
|
+
while (currentDir !== "/" && currentDir !== "") {
|
|
58
|
+
if (existsSync(join(currentDir, "packages"))) {
|
|
59
|
+
workspaceRoot = currentDir;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
currentDir = join(currentDir, "..");
|
|
63
|
+
}
|
|
64
|
+
if (workspaceRoot) {
|
|
65
|
+
const binaryPath = join(join(workspaceRoot, "packages", packageName), "bin", binaryName);
|
|
66
|
+
if (existsSync(binaryPath)) return binaryPath;
|
|
67
|
+
}
|
|
68
|
+
} catch {}
|
|
69
|
+
try {
|
|
70
|
+
const binaryPath = join(__require.resolve(`${packageName}/package.json`).replace("/package.json", ""), "bin", binaryName);
|
|
71
|
+
if (existsSync(binaryPath)) return binaryPath;
|
|
72
|
+
throw new Error(`Binary not found at ${binaryPath}`);
|
|
73
|
+
} catch {
|
|
74
|
+
throw new Error(`Failed to locate Rari binary for ${packageName}. Please ensure the platform package is installed: npm install ${packageName}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function getInstallationInstructions() {
|
|
78
|
+
const { packageName } = getPlatformInfo();
|
|
79
|
+
return `
|
|
80
|
+
To install Rari for your platform, run:
|
|
81
|
+
|
|
82
|
+
npm install ${packageName}
|
|
83
|
+
|
|
84
|
+
Or if you're using pnpm:
|
|
85
|
+
|
|
86
|
+
pnpm add ${packageName}
|
|
87
|
+
|
|
88
|
+
Or if you're using yarn:
|
|
89
|
+
|
|
90
|
+
yarn add ${packageName}
|
|
91
|
+
|
|
92
|
+
If you continue to have issues, you can also install from source:
|
|
93
|
+
|
|
94
|
+
cargo install --git https://github.com/rari-build/rari
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
7
99
|
//#region src/cli.ts
|
|
8
100
|
const [, , command, ...args] = process.argv;
|
|
9
101
|
function logInfo(message) {
|
|
@@ -95,7 +187,7 @@ async function deployToRailway() {
|
|
|
95
187
|
logError(`Already running in ${getPlatformName()} environment. Use "rari start" instead.`);
|
|
96
188
|
process.exit(1);
|
|
97
189
|
}
|
|
98
|
-
const { createRailwayDeployment } = await import("./railway-
|
|
190
|
+
const { createRailwayDeployment } = await import("./railway-B8SUWVNF.mjs");
|
|
99
191
|
await createRailwayDeployment();
|
|
100
192
|
}
|
|
101
193
|
async function deployToRender() {
|
|
@@ -104,7 +196,7 @@ async function deployToRender() {
|
|
|
104
196
|
logError(`Already running in ${getPlatformName()} environment. Use "rari start" instead.`);
|
|
105
197
|
process.exit(1);
|
|
106
198
|
}
|
|
107
|
-
const { createRenderDeployment } = await import("./render-
|
|
199
|
+
const { createRenderDeployment } = await import("./render-CnuI67F1.mjs");
|
|
108
200
|
await createRenderDeployment();
|
|
109
201
|
}
|
|
110
202
|
async function main() {
|
|
@@ -187,4 +279,4 @@ main().catch((error) => {
|
|
|
187
279
|
});
|
|
188
280
|
|
|
189
281
|
//#endregion
|
|
190
|
-
export {
|
|
282
|
+
export { getInstallationInstructions as n, getBinaryPath as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as RouteSegment, A as NavigationErrorType, B as AppRouteManifest, C as extractStaticParams, D as NavigationError, E as NavigationErrorOverlayProps, F as LayoutManager, G as GenerateStaticParams, H as ErrorEntry, I as LayoutErrorBoundary, J as LoadingEntry, K as LayoutEntry, L as ClientRouter, M as fetchWithTimeout, N as LayoutDiff, O as NavigationErrorHandler, P as LayoutInstance, Q as PageProps, R as ClientRouterProps, S as extractServerPropsWithCache, T as NavigationErrorOverlay, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, a as LoadingSpinner, b as extractMetadata, c as createErrorBoundary, d as PreservedState, et as RouteSegmentType, f as ScrollPosition, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, j as createNavigationError, k as NavigationErrorHandlerOptions, l as createHttpRuntimeClient, m as StatePreserverConfig, n as DefaultLoading, o as NotFound, p as StatePreserver, q as LayoutProps, r as ErrorBoundary, s as RuntimeClient, t as DefaultError, u as createLoadingBoundary, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-
|
|
1
|
+
import { $ as RouteSegment, A as NavigationErrorType, B as AppRouteManifest, C as extractStaticParams, D as NavigationError, E as NavigationErrorOverlayProps, F as LayoutManager, G as GenerateStaticParams, H as ErrorEntry, I as LayoutErrorBoundary, J as LoadingEntry, K as LayoutEntry, L as ClientRouter, M as fetchWithTimeout, N as LayoutDiff, O as NavigationErrorHandler, P as LayoutInstance, Q as PageProps, R as ClientRouterProps, S as extractServerPropsWithCache, T as NavigationErrorOverlay, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, a as LoadingSpinner, b as extractMetadata, c as createErrorBoundary, d as PreservedState, et as RouteSegmentType, f as ScrollPosition, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, j as createNavigationError, k as NavigationErrorHandlerOptions, l as createHttpRuntimeClient, m as StatePreserverConfig, n as DefaultLoading, o as NotFound, p as StatePreserver, q as LayoutProps, r as ErrorBoundary, s as RuntimeClient, t as DefaultError, u as createLoadingBoundary, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-DrRcA8ca.mjs";
|
|
2
2
|
export { type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, ClientRouter, type ClientRouterProps, DefaultError, DefaultLoading, ErrorBoundary, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, HttpRuntimeClient, type LayoutDiff, type LayoutEntry, LayoutErrorBoundary, type LayoutInstance, LayoutManager, type LayoutProps, type LoadingEntry, type LoadingProps, LoadingSpinner, type MetadataResult, type NavigationError, NavigationErrorHandler, type NavigationErrorHandlerOptions, NavigationErrorOverlay, type NavigationErrorOverlayProps, type NavigationErrorType, NotFound, type NotFoundEntry, type NotFoundProps, type PageProps, type PreservedState, type RouteSegment, type RouteSegmentType, type RuntimeClient, type ScrollPosition, type ServerPropsResult, StatePreserver, type StatePreserverConfig, type StaticParamsResult, clearPropsCache, clearPropsCacheForComponent, createErrorBoundary, createHttpRuntimeClient, createLoadingBoundary, createNavigationError, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, fetchWithTimeout, hasServerSideDataFetching };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as fetchWithTimeout, S as createNavigationError, _ as LayoutErrorBoundary, a as LoadingSpinner, b as NavigationErrorOverlay, c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, l as createLoadingBoundary, m as extractServerPropsWithCache, n as DefaultLoading, o as NotFound, p as extractServerProps, r as ErrorBoundary, s as createErrorBoundary, t as DefaultError, u as clearPropsCache, v as ClientRouter, w as LayoutManager, x as NavigationErrorHandler, y as StatePreserver } from "./runtime-client-
|
|
1
|
+
import { C as fetchWithTimeout, S as createNavigationError, _ as LayoutErrorBoundary, a as LoadingSpinner, b as NavigationErrorOverlay, c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, l as createLoadingBoundary, m as extractServerPropsWithCache, n as DefaultLoading, o as NotFound, p as extractServerProps, r as ErrorBoundary, s as createErrorBoundary, t as DefaultError, u as clearPropsCache, v as ClientRouter, w as LayoutManager, x as NavigationErrorHandler, y as StatePreserver } from "./runtime-client-BWSSyzPt.mjs";
|
|
2
2
|
|
|
3
3
|
export { ClientRouter, DefaultError, DefaultLoading, ErrorBoundary, HttpRuntimeClient, LayoutErrorBoundary, LayoutManager, LoadingSpinner, NavigationErrorHandler, NavigationErrorOverlay, NotFound, StatePreserver, clearPropsCache, clearPropsCacheForComponent, createErrorBoundary, createHttpRuntimeClient, createLoadingBoundary, createNavigationError, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, fetchWithTimeout, hasServerSideDataFetching };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as RouteSegment, B as AppRouteManifest, C as extractStaticParams, G as GenerateStaticParams, H as ErrorEntry, J as LoadingEntry, K as LayoutEntry, Q as PageProps, S as extractServerPropsWithCache, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, b as extractMetadata, et as RouteSegmentType, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, l as createHttpRuntimeClient, q as LayoutProps, s as RuntimeClient, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-
|
|
2
|
-
import { a as rari, c as generateAppRouteManifest, d as headers, f as ApiRouteHandlers, h as RouteHandler, i as defineRariOptions, l as loadManifest, m as RouteContext, n as Response, o as rariRouter, p as RariResponse, r as defineRariConfig, s as AppRouteGenerator, t as Request, u as writeManifest } from "./vite-
|
|
1
|
+
import { $ as RouteSegment, B as AppRouteManifest, C as extractStaticParams, G as GenerateStaticParams, H as ErrorEntry, J as LoadingEntry, K as LayoutEntry, Q as PageProps, S as extractServerPropsWithCache, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, b as extractMetadata, et as RouteSegmentType, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, l as createHttpRuntimeClient, q as LayoutProps, s as RuntimeClient, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-DrRcA8ca.mjs";
|
|
2
|
+
import { a as rari, c as generateAppRouteManifest, d as headers, f as ApiRouteHandlers, h as RouteHandler, i as defineRariOptions, l as loadManifest, m as RouteContext, n as Response, o as rariRouter, p as RariResponse, r as defineRariConfig, s as AppRouteGenerator, t as Request, u as writeManifest } from "./vite-CEX_9o-t.mjs";
|
|
3
3
|
export { ApiRouteHandlers, AppRouteEntry, AppRouteGenerator, AppRouteManifest, AppRouteMatch, ErrorEntry, ErrorProps, GenerateMetadata, GenerateStaticParams, HttpRuntimeClient, LayoutEntry, LayoutProps, LoadingEntry, LoadingProps, MetadataResult, NotFoundEntry, NotFoundProps, PageProps, RariResponse, Request, Response, RouteContext, RouteHandler, RouteSegment, RouteSegmentType, RuntimeClient, ServerPropsResult, StaticParamsResult, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, headers, loadManifest, rari, rariRouter, writeManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as headers, i as rariRouter, n as defineRariOptions, o as RariResponse, r as rari, t as defineRariConfig } from "./vite-
|
|
2
|
-
import { i as writeManifest, n as generateAppRouteManifest, r as loadManifest, t as AppRouteGenerator } from "./app-routes-
|
|
3
|
-
import { c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, m as extractServerPropsWithCache, p as extractServerProps, u as clearPropsCache } from "./runtime-client-
|
|
4
|
-
import "./loading-component-map-
|
|
5
|
-
import "./server-build-
|
|
1
|
+
import { a as headers, i as rariRouter, n as defineRariOptions, o as RariResponse, r as rari, t as defineRariConfig } from "./vite-2nVNlWc7.mjs";
|
|
2
|
+
import { i as writeManifest, n as generateAppRouteManifest, r as loadManifest, t as AppRouteGenerator } from "./app-routes-DpO5Hf-o.mjs";
|
|
3
|
+
import { c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, m as extractServerPropsWithCache, p as extractServerProps, u as clearPropsCache } from "./runtime-client-BWSSyzPt.mjs";
|
|
4
|
+
import "./loading-component-map-DR9_TT5T.mjs";
|
|
5
|
+
import "./server-build-DXITrV8k.mjs";
|
|
6
6
|
|
|
7
7
|
export { AppRouteGenerator, HttpRuntimeClient, RariResponse, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, headers, loadManifest, rari, rariRouter, writeManifest };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getLoadingComponentMapPath, t as generateLoadingComponentMap } from "./loading-component-map-
|
|
1
|
+
import { n as getLoadingComponentMapPath, t as generateLoadingComponentMap } from "./loading-component-map-DR9_TT5T.mjs";
|
|
2
2
|
|
|
3
3
|
export { generateLoadingComponentMap, getLoadingComponentMapPath };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __require } from "./chunk-
|
|
2
|
-
import { n as createServerBuildPlugin } from "./server-build-
|
|
1
|
+
import { t as __require } from "./chunk-DFPPfDFE.mjs";
|
|
2
|
+
import { n as createServerBuildPlugin } from "./server-build-DXITrV8k.mjs";
|
|
3
3
|
import fs, { promises } from "node:fs";
|
|
4
4
|
import path, { join, relative, resolve, sep } from "node:path";
|
|
5
5
|
import process$1 from "node:process";
|
|
@@ -986,6 +986,7 @@ var NodeFsHandler = class {
|
|
|
986
986
|
|
|
987
987
|
//#endregion
|
|
988
988
|
//#region ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
|
|
989
|
+
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
989
990
|
const SLASH = "/";
|
|
990
991
|
const SLASH_SLASH = "//";
|
|
991
992
|
const ONE_DOT = ".";
|
|
@@ -1744,13 +1745,13 @@ function rariRouter(options = {}) {
|
|
|
1744
1745
|
console.warn("[Manifest] Route structure unchanged, using cached manifest");
|
|
1745
1746
|
return cachedManifestContent;
|
|
1746
1747
|
}
|
|
1747
|
-
const { generateAppRouteManifest: generateAppRouteManifest$1 } = await import("./app-routes
|
|
1748
|
+
const { generateAppRouteManifest: generateAppRouteManifest$1 } = await import("./app-routes-CUB8L75K.mjs");
|
|
1748
1749
|
const manifest = await generateAppRouteManifest$1(appDir, { extensions: opts.extensions });
|
|
1749
1750
|
const manifestContent = JSON.stringify(manifest, null, 2);
|
|
1750
1751
|
const outDir = path.resolve(root, opts.outDir);
|
|
1751
1752
|
await promises.mkdir(outDir, { recursive: true });
|
|
1752
1753
|
await promises.writeFile(path.join(outDir, "app-routes.json"), manifestContent, "utf-8");
|
|
1753
|
-
const { generateLoadingComponentMap, getLoadingComponentMapPath } = await import("./loading-component-map-
|
|
1754
|
+
const { generateLoadingComponentMap, getLoadingComponentMapPath } = await import("./loading-component-map-Dda5WP1L.mjs");
|
|
1754
1755
|
const loadingMapCode = generateLoadingComponentMap({
|
|
1755
1756
|
appDir: opts.appDir,
|
|
1756
1757
|
loadingComponents: manifest.loading
|
|
@@ -1881,7 +1882,7 @@ function rariRouter(options = {}) {
|
|
|
1881
1882
|
});
|
|
1882
1883
|
try {
|
|
1883
1884
|
const manifest = JSON.parse(cachedManifestContent);
|
|
1884
|
-
const { generateLoadingComponentMap } = await import("./loading-component-map-
|
|
1885
|
+
const { generateLoadingComponentMap } = await import("./loading-component-map-Dda5WP1L.mjs");
|
|
1885
1886
|
const loadingMapCode = generateLoadingComponentMap({
|
|
1886
1887
|
appDir: opts.appDir,
|
|
1887
1888
|
loadingComponents: manifest.loading
|
|
@@ -2666,7 +2667,7 @@ const ${componentName$1} = registerClientReference(
|
|
|
2666
2667
|
let serverComponentBuilder = null;
|
|
2667
2668
|
const discoverAndRegisterComponents = async () => {
|
|
2668
2669
|
try {
|
|
2669
|
-
const { ServerComponentBuilder, scanDirectory } = await import("./server-build-
|
|
2670
|
+
const { ServerComponentBuilder, scanDirectory } = await import("./server-build-BGFb0d6Z.mjs");
|
|
2670
2671
|
const builder = new ServerComponentBuilder(projectRoot, {
|
|
2671
2672
|
outDir: "dist",
|
|
2672
2673
|
serverDir: "server",
|
|
@@ -2751,7 +2752,7 @@ const ${componentName$1} = registerClientReference(
|
|
|
2751
2752
|
};
|
|
2752
2753
|
const startRustServer = async () => {
|
|
2753
2754
|
if (rustServerProcess) return;
|
|
2754
|
-
const { getBinaryPath, getInstallationInstructions } = await import("./platform-
|
|
2755
|
+
const { getBinaryPath, getInstallationInstructions } = await import("./platform-Bv9HDvl_.mjs");
|
|
2755
2756
|
let binaryPath;
|
|
2756
2757
|
try {
|
|
2757
2758
|
binaryPath = getBinaryPath();
|
|
@@ -2827,7 +2828,7 @@ const ${componentName$1} = registerClientReference(
|
|
|
2827
2828
|
const handleServerComponentHMR = async (filePath) => {
|
|
2828
2829
|
try {
|
|
2829
2830
|
if (!isServerComponent(filePath)) return;
|
|
2830
|
-
const { ServerComponentBuilder } = await import("./server-build-
|
|
2831
|
+
const { ServerComponentBuilder } = await import("./server-build-BGFb0d6Z.mjs");
|
|
2831
2832
|
const builder = new ServerComponentBuilder(projectRoot, {
|
|
2832
2833
|
outDir: "dist",
|
|
2833
2834
|
serverDir: "server",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as RouteSegment, B as AppRouteManifest, C as extractStaticParams, G as GenerateStaticParams, H as ErrorEntry, J as LoadingEntry, K as LayoutEntry, Q as PageProps, S as extractServerPropsWithCache, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, b as extractMetadata, et as RouteSegmentType, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, l as createHttpRuntimeClient, q as LayoutProps, s as RuntimeClient, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-
|
|
2
|
-
import { a as rari, c as generateAppRouteManifest, d as headers, f as ApiRouteHandlers, h as RouteHandler, i as defineRariOptions, l as loadManifest, m as RouteContext, n as Response, o as rariRouter, p as RariResponse, r as defineRariConfig, s as AppRouteGenerator, t as Request, u as writeManifest } from "./vite-
|
|
1
|
+
import { $ as RouteSegment, B as AppRouteManifest, C as extractStaticParams, G as GenerateStaticParams, H as ErrorEntry, J as LoadingEntry, K as LayoutEntry, Q as PageProps, S as extractServerPropsWithCache, U as ErrorProps, V as AppRouteMatch, W as GenerateMetadata, X as NotFoundEntry, Y as LoadingProps, Z as NotFoundProps, _ as StaticParamsResult, b as extractMetadata, et as RouteSegmentType, g as ServerPropsResult, h as MetadataResult, i as HttpRuntimeClient, l as createHttpRuntimeClient, q as LayoutProps, s as RuntimeClient, v as clearPropsCache, w as hasServerSideDataFetching, x as extractServerProps, y as clearPropsCacheForComponent, z as AppRouteEntry } from "./runtime-client-DrRcA8ca.mjs";
|
|
2
|
+
import { a as rari, c as generateAppRouteManifest, d as headers, f as ApiRouteHandlers, h as RouteHandler, i as defineRariOptions, l as loadManifest, m as RouteContext, n as Response, o as rariRouter, p as RariResponse, r as defineRariConfig, s as AppRouteGenerator, t as Request, u as writeManifest } from "./vite-CEX_9o-t.mjs";
|
|
3
3
|
export { ApiRouteHandlers, AppRouteEntry, AppRouteGenerator, AppRouteManifest, AppRouteMatch, ErrorEntry, ErrorProps, GenerateMetadata, GenerateStaticParams, HttpRuntimeClient, LayoutEntry, LayoutProps, LoadingEntry, LoadingProps, MetadataResult, NotFoundEntry, NotFoundProps, PageProps, RariResponse, Request, Response, RouteContext, RouteHandler, RouteSegment, RouteSegmentType, RuntimeClient, ServerPropsResult, StaticParamsResult, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, headers, loadManifest, rari, rariRouter, writeManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as headers, i as rariRouter, n as defineRariOptions, o as RariResponse, r as rari, t as defineRariConfig } from "./vite-
|
|
2
|
-
import { i as writeManifest, n as generateAppRouteManifest, r as loadManifest, t as AppRouteGenerator } from "./app-routes-
|
|
3
|
-
import { c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, m as extractServerPropsWithCache, p as extractServerProps, u as clearPropsCache } from "./runtime-client-
|
|
4
|
-
import "./loading-component-map-
|
|
5
|
-
import "./server-build-
|
|
1
|
+
import { a as headers, i as rariRouter, n as defineRariOptions, o as RariResponse, r as rari, t as defineRariConfig } from "./vite-2nVNlWc7.mjs";
|
|
2
|
+
import { i as writeManifest, n as generateAppRouteManifest, r as loadManifest, t as AppRouteGenerator } from "./app-routes-DpO5Hf-o.mjs";
|
|
3
|
+
import { c as createHttpRuntimeClient, d as clearPropsCacheForComponent, f as extractMetadata, g as hasServerSideDataFetching, h as extractStaticParams, i as HttpRuntimeClient, m as extractServerPropsWithCache, p as extractServerProps, u as clearPropsCache } from "./runtime-client-BWSSyzPt.mjs";
|
|
4
|
+
import "./loading-component-map-DR9_TT5T.mjs";
|
|
5
|
+
import "./server-build-DXITrV8k.mjs";
|
|
6
6
|
|
|
7
7
|
export { AppRouteGenerator, HttpRuntimeClient, RariResponse, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, headers, loadManifest, rari, rariRouter, writeManifest };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rari",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"description": "Runtime Accelerated Rendering Infrastructure (Rari)",
|
|
6
6
|
"author": "Ryan Skinner",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,36 +34,36 @@
|
|
|
34
34
|
],
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
-
"types": "./dist/vite.d.
|
|
38
|
-
"browser": "./dist/client.
|
|
39
|
-
"node": "./dist/vite.
|
|
40
|
-
"default": "./dist/vite.
|
|
37
|
+
"types": "./dist/vite.d.ts",
|
|
38
|
+
"browser": "./dist/client.js",
|
|
39
|
+
"node": "./dist/vite.js",
|
|
40
|
+
"default": "./dist/vite.js"
|
|
41
41
|
},
|
|
42
42
|
"./client": {
|
|
43
|
-
"types": "./dist/client.d.
|
|
44
|
-
"default": "./dist/client.
|
|
43
|
+
"types": "./dist/client.d.ts",
|
|
44
|
+
"default": "./dist/client.js"
|
|
45
45
|
},
|
|
46
46
|
"./vite": {
|
|
47
|
-
"types": "./dist/vite.d.
|
|
48
|
-
"default": "./dist/vite.
|
|
47
|
+
"types": "./dist/vite.d.ts",
|
|
48
|
+
"default": "./dist/vite.js"
|
|
49
49
|
},
|
|
50
50
|
"./runtime/actions": {
|
|
51
|
-
"types": "./dist/runtime/actions.d.
|
|
52
|
-
"default": "./dist/runtime/actions.
|
|
51
|
+
"types": "./dist/runtime/actions.d.ts",
|
|
52
|
+
"default": "./dist/runtime/actions.js"
|
|
53
53
|
},
|
|
54
54
|
"./runtime/AppRouterProvider": {
|
|
55
|
-
"types": "./dist/runtime/AppRouterProvider.d.
|
|
56
|
-
"default": "./dist/runtime/AppRouterProvider.
|
|
55
|
+
"types": "./dist/runtime/AppRouterProvider.d.ts",
|
|
56
|
+
"default": "./dist/runtime/AppRouterProvider.js"
|
|
57
57
|
},
|
|
58
58
|
"./hooks/useActionState": {
|
|
59
|
-
"types": "./dist/hooks/useActionState.d.
|
|
60
|
-
"default": "./dist/hooks/useActionState.
|
|
59
|
+
"types": "./dist/hooks/useActionState.d.ts",
|
|
60
|
+
"default": "./dist/hooks/useActionState.js"
|
|
61
61
|
},
|
|
62
62
|
"./package.json": "./package.json"
|
|
63
63
|
},
|
|
64
|
-
"types": "dist/index.d.
|
|
64
|
+
"types": "dist/index.d.ts",
|
|
65
65
|
"bin": {
|
|
66
|
-
"rari": "./dist/cli.
|
|
66
|
+
"rari": "./dist/cli.js"
|
|
67
67
|
},
|
|
68
68
|
"files": [
|
|
69
69
|
"dist",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { t as __require } from "./chunk-B1JASekH.js";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import process from "node:process";
|
|
5
|
-
|
|
6
|
-
//#region src/platform.ts
|
|
7
|
-
const SUPPORTED_PLATFORMS = {
|
|
8
|
-
"linux-x64": "rari-linux-x64",
|
|
9
|
-
"linux-arm64": "rari-linux-arm64",
|
|
10
|
-
"darwin-x64": "rari-darwin-x64",
|
|
11
|
-
"darwin-arm64": "rari-darwin-arm64",
|
|
12
|
-
"win32-x64": "rari-win32-x64"
|
|
13
|
-
};
|
|
14
|
-
function getPlatformInfo() {
|
|
15
|
-
const platform = process.platform;
|
|
16
|
-
const arch = process.arch;
|
|
17
|
-
let normalizedPlatform;
|
|
18
|
-
switch (platform) {
|
|
19
|
-
case "darwin":
|
|
20
|
-
normalizedPlatform = "darwin";
|
|
21
|
-
break;
|
|
22
|
-
case "linux":
|
|
23
|
-
normalizedPlatform = "linux";
|
|
24
|
-
break;
|
|
25
|
-
case "win32":
|
|
26
|
-
normalizedPlatform = "win32";
|
|
27
|
-
break;
|
|
28
|
-
default: throw new Error(`Unsupported platform: ${platform}. Rari supports Linux, macOS, and Windows.`);
|
|
29
|
-
}
|
|
30
|
-
let normalizedArch;
|
|
31
|
-
switch (arch) {
|
|
32
|
-
case "x64":
|
|
33
|
-
normalizedArch = "x64";
|
|
34
|
-
break;
|
|
35
|
-
case "arm64":
|
|
36
|
-
normalizedArch = "arm64";
|
|
37
|
-
break;
|
|
38
|
-
default: throw new Error(`Unsupported architecture: ${arch}. Rari supports x64 and ARM64.`);
|
|
39
|
-
}
|
|
40
|
-
const packageName = SUPPORTED_PLATFORMS[`${normalizedPlatform}-${normalizedArch}`];
|
|
41
|
-
if (!packageName) throw new Error(`Unsupported platform combination: ${normalizedPlatform}-${normalizedArch}. Supported platforms: ${Object.keys(SUPPORTED_PLATFORMS).join(", ")}`);
|
|
42
|
-
return {
|
|
43
|
-
platform: normalizedPlatform,
|
|
44
|
-
arch: normalizedArch,
|
|
45
|
-
packageName,
|
|
46
|
-
binaryName: normalizedPlatform === "win32" ? "rari.exe" : "rari"
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function getBinaryPath() {
|
|
50
|
-
const { packageName, binaryName } = getPlatformInfo();
|
|
51
|
-
try {
|
|
52
|
-
let currentDir = process.cwd();
|
|
53
|
-
let workspaceRoot = null;
|
|
54
|
-
while (currentDir !== "/" && currentDir !== "") {
|
|
55
|
-
if (existsSync(join(currentDir, "packages"))) {
|
|
56
|
-
workspaceRoot = currentDir;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
currentDir = join(currentDir, "..");
|
|
60
|
-
}
|
|
61
|
-
if (workspaceRoot) {
|
|
62
|
-
const binaryPath = join(join(workspaceRoot, "packages", packageName), "bin", binaryName);
|
|
63
|
-
if (existsSync(binaryPath)) return binaryPath;
|
|
64
|
-
}
|
|
65
|
-
} catch {}
|
|
66
|
-
try {
|
|
67
|
-
const binaryPath = join(__require.resolve(`${packageName}/package.json`).replace("/package.json", ""), "bin", binaryName);
|
|
68
|
-
if (existsSync(binaryPath)) return binaryPath;
|
|
69
|
-
throw new Error(`Binary not found at ${binaryPath}`);
|
|
70
|
-
} catch {
|
|
71
|
-
throw new Error(`Failed to locate Rari binary for ${packageName}. Please ensure the platform package is installed: npm install ${packageName}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function getInstallationInstructions() {
|
|
75
|
-
const { packageName } = getPlatformInfo();
|
|
76
|
-
return `
|
|
77
|
-
To install Rari for your platform, run:
|
|
78
|
-
|
|
79
|
-
npm install ${packageName}
|
|
80
|
-
|
|
81
|
-
Or if you're using pnpm:
|
|
82
|
-
|
|
83
|
-
pnpm add ${packageName}
|
|
84
|
-
|
|
85
|
-
Or if you're using yarn:
|
|
86
|
-
|
|
87
|
-
yarn add ${packageName}
|
|
88
|
-
|
|
89
|
-
If you continue to have issues, you can also install from source:
|
|
90
|
-
|
|
91
|
-
cargo install --git https://github.com/rari-build/rari
|
|
92
|
-
`;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
//#endregion
|
|
96
|
-
export { getInstallationInstructions as n, getBinaryPath as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|