@replanejs/next 1.0.1 → 1.0.2
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/index.cjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const __replanejs_react = __toESM(require("@replanejs/react"));
|
|
|
26
26
|
const react_jsx_runtime = __toESM(require("react/jsx-runtime"));
|
|
27
27
|
|
|
28
28
|
//#region src/version.ts
|
|
29
|
-
const VERSION = "1.0.
|
|
29
|
+
const VERSION = "1.0.2";
|
|
30
30
|
const DEFAULT_AGENT = `replane-js-next/${VERSION}`;
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
@@ -77,10 +77,10 @@ async function ReplaneRoot({ children,...options }) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
//#endregion
|
|
80
|
-
Object.defineProperty(exports, '
|
|
80
|
+
Object.defineProperty(exports, 'InMemoryReplane', {
|
|
81
81
|
enumerable: true,
|
|
82
82
|
get: function () {
|
|
83
|
-
return __replanejs_react.
|
|
83
|
+
return __replanejs_react.InMemoryReplane;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, 'Replane', {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { GetReplaneSnapshotOptions as GetReplaneSnapshotOptions$1 } from "@replanejs/sdk";
|
|
4
|
-
import { Condition, ConnectOptions, GetConfigOptions, GetReplaneSnapshotOptions,
|
|
4
|
+
import { Condition, ConnectOptions, GetConfigOptions, GetReplaneSnapshotOptions, InMemoryReplane, InMemoryReplaneOptions, Override, Replane, ReplaneContext, ReplaneError, ReplaneErrorCode, ReplaneLogger, ReplaneOptions, ReplaneProvider, ReplaneProviderProps, ReplaneProviderWithClientProps, ReplaneProviderWithOptionsProps, ReplaneSnapshot, SetConfigOptions, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane } from "@replanejs/react";
|
|
5
5
|
|
|
6
6
|
//#region src/root.d.ts
|
|
7
7
|
|
|
@@ -47,5 +47,5 @@ declare function ReplaneRoot<T extends object>({
|
|
|
47
47
|
}: ReplaneRootProps<T>): Promise<react_jsx_runtime0.JSX.Element>;
|
|
48
48
|
//# sourceMappingURL=root.d.ts.map
|
|
49
49
|
//#endregion
|
|
50
|
-
export { type Condition, type ConnectOptions, type GetConfigOptions, type GetReplaneSnapshotOptions,
|
|
50
|
+
export { type Condition, type ConnectOptions, type GetConfigOptions, type GetReplaneSnapshotOptions, InMemoryReplane, type InMemoryReplaneOptions, type Override, Replane, type ReplaneContext, ReplaneError, ReplaneErrorCode, type ReplaneLogger, type ReplaneOptions, ReplaneProvider, type ReplaneProviderProps, type ReplaneProviderWithClientProps, type ReplaneProviderWithOptionsProps, ReplaneRoot, type ReplaneRootProps, type ReplaneSnapshot, type SetConfigOptions, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane };
|
|
51
51
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GetReplaneSnapshotOptions as GetReplaneSnapshotOptions$1 } from "@replanejs/sdk";
|
|
2
|
-
import { Condition, ConnectOptions, GetConfigOptions, GetReplaneSnapshotOptions,
|
|
2
|
+
import { Condition, ConnectOptions, GetConfigOptions, GetReplaneSnapshotOptions, InMemoryReplane, InMemoryReplaneOptions, Override, Replane, ReplaneContext, ReplaneError, ReplaneErrorCode, ReplaneLogger, ReplaneOptions, ReplaneProvider, ReplaneProviderProps, ReplaneProviderWithClientProps, ReplaneProviderWithOptionsProps, ReplaneSnapshot, SetConfigOptions, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane } from "@replanejs/react";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
|
|
@@ -47,5 +47,5 @@ declare function ReplaneRoot<T extends object>({
|
|
|
47
47
|
}: ReplaneRootProps<T>): Promise<react_jsx_runtime0.JSX.Element>;
|
|
48
48
|
//# sourceMappingURL=root.d.ts.map
|
|
49
49
|
//#endregion
|
|
50
|
-
export { type Condition, type ConnectOptions, type GetConfigOptions, type GetReplaneSnapshotOptions,
|
|
50
|
+
export { type Condition, type ConnectOptions, type GetConfigOptions, type GetReplaneSnapshotOptions, InMemoryReplane, type InMemoryReplaneOptions, type Override, Replane, type ReplaneContext, ReplaneError, ReplaneErrorCode, type ReplaneLogger, type ReplaneOptions, ReplaneProvider, type ReplaneProviderProps, type ReplaneProviderWithClientProps, type ReplaneProviderWithOptionsProps, ReplaneRoot, type ReplaneRootProps, type ReplaneSnapshot, type SetConfigOptions, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane };
|
|
51
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getReplaneSnapshot as getReplaneSnapshot$1 } from "@replanejs/sdk";
|
|
2
|
-
import {
|
|
2
|
+
import { InMemoryReplane, Replane, ReplaneError, ReplaneErrorCode, ReplaneProvider, ReplaneProvider as ReplaneProvider$1, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane } from "@replanejs/react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/version.ts
|
|
6
|
-
const VERSION = "1.0.
|
|
6
|
+
const VERSION = "1.0.2";
|
|
7
7
|
const DEFAULT_AGENT = `replane-js-next/${VERSION}`;
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -54,5 +54,5 @@ async function ReplaneRoot({ children,...options }) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
//#endregion
|
|
57
|
-
export {
|
|
57
|
+
export { InMemoryReplane, Replane, ReplaneError, ReplaneErrorCode, ReplaneProvider, ReplaneRoot, clearSuspenseCache, createConfigHook, createReplaneHook, getReplaneSnapshot, useConfig, useReplane };
|
|
58
58
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReplaneProvider"],"sources":["../src/version.ts","../src/root.tsx"],"sourcesContent":["// Auto-generated - do not edit manually\nexport const VERSION = \"1.0.
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReplaneProvider"],"sources":["../src/version.ts","../src/root.tsx"],"sourcesContent":["// Auto-generated - do not edit manually\nexport const VERSION = \"1.0.2\";\nexport const DEFAULT_AGENT = `replane-js-next/${VERSION}`;\n","/**\n * Server-side utilities for Next.js\n * Use this module in Server Components, getServerSideProps, or getStaticProps\n */\n\nimport type { ReactNode } from \"react\";\nimport { getReplaneSnapshot, type GetReplaneSnapshotOptions } from \"@replanejs/sdk\";\nimport { ReplaneProvider } from \"@replanejs/react\";\nimport { DEFAULT_AGENT } from \"./version\";\n\n/**\n * Props for ReplaneRoot server component\n */\nexport interface ReplaneRootProps<T extends object> extends GetReplaneSnapshotOptions<T> {\n /**\n * React children to render inside the provider\n */\n children: ReactNode;\n}\n\n/**\n * Server component that fetches Replane configs and provides them to the app.\n * This is the simplest way to set up Replane in Next.js App Router.\n *\n * @example Basic usage in layout.tsx\n * ```tsx\n * // app/layout.tsx\n * import { ReplaneRoot } from \"@replanejs/next\";\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * <ReplaneRoot\n * connection={{\n * baseUrl: process.env.NEXT_PUBLIC_REPLANE_BASE_URL!,\n * sdkKey: process.env.NEXT_PUBLIC_REPLANE_SDK_KEY!,\n * }}\n * >\n * {children}\n * </ReplaneRoot>\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport async function ReplaneRoot<T extends object>({ children, ...options }: ReplaneRootProps<T>) {\n const { connection: originalConnection, ...replaneOptions } = options;\n const connectionWithAgent = originalConnection\n ? {\n ...originalConnection,\n agent: originalConnection.agent ?? DEFAULT_AGENT,\n }\n : null;\n const snapshot = await getReplaneSnapshot({\n ...replaneOptions,\n connection: connectionWithAgent,\n });\n\n return (\n <ReplaneProvider connection={connectionWithAgent} snapshot={snapshot} {...replaneOptions}>\n {children}\n </ReplaneProvider>\n );\n}\n"],"mappings":";;;;;AACA,MAAa,UAAU;AACvB,MAAa,iBAAiB,kBAAkB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC6CxD,eAAsB,YAA8B,EAAE,SAAU,GAAG,SAA8B,EAAE;CACjG,MAAM,EAAE,YAAY,mBAAoB,GAAG,gBAAgB,GAAG;CAC9D,MAAM,sBAAsB,qBACxB;EACE,GAAG;EACH,OAAO,mBAAmB,SAAS;CACpC,IACD;CACJ,MAAM,WAAW,MAAM,qBAAmB;EACxC,GAAG;EACH,YAAY;CACb,EAAC;AAEF,wBACE,IAACA;EAAgB,YAAY;EAA+B;EAAU,GAAI;EACvE;GACe;AAErB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replanejs/next",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Next.js SDK for Replane - feature flags and remote configuration with SSR support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"react": ">=18.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@replanejs/react": "^1.0.
|
|
49
|
-
"@replanejs/sdk": "^1.0.
|
|
48
|
+
"@replanejs/react": "^1.0.2",
|
|
49
|
+
"@replanejs/sdk": "^1.0.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.19.3",
|