@timber-js/app 0.1.12 → 0.1.14
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/client/error-boundary.d.ts +7 -0
- package/dist/client/error-boundary.d.ts.map +1 -1
- package/dist/client/error-boundary.js +4 -7
- package/dist/client/error-boundary.js.map +1 -1
- package/dist/client/index.js +12 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/use-router.d.ts.map +1 -1
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/plugins/shims.d.ts.map +1 -1
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/error-boundary.tsx +21 -20
- package/src/client/use-router.ts +15 -3
- package/src/plugins/shims.ts +31 -4
- package/src/server/slot-resolver.ts +24 -1
package/dist/index.js
CHANGED
|
@@ -12369,11 +12369,34 @@ function timberShims(_ctx) {
|
|
|
12369
12369
|
);`;
|
|
12370
12370
|
return "export {};";
|
|
12371
12371
|
}
|
|
12372
|
-
if (id === "\0timber:server-empty") return `
|
|
12373
|
-
|
|
12372
|
+
if (id === "\0timber:server-empty") return `
|
|
12373
|
+
const msg = "[timber] @timber-js/app/server was imported from client code. " +
|
|
12374
12374
|
"Server modules (headers, cookies, redirect, deny, etc.) cannot be used in client components. " +
|
|
12375
|
-
"If you need these APIs, move the import to a server component or middleware."
|
|
12376
|
-
)
|
|
12375
|
+
"If you need these APIs, move the import to a server component or middleware.";
|
|
12376
|
+
function stub() { throw new Error(msg); }
|
|
12377
|
+
export const headers = stub;
|
|
12378
|
+
export const cookies = stub;
|
|
12379
|
+
export const searchParams = stub;
|
|
12380
|
+
export const deny = stub;
|
|
12381
|
+
export const notFound = stub;
|
|
12382
|
+
export const redirect = stub;
|
|
12383
|
+
export const permanentRedirect = stub;
|
|
12384
|
+
export const redirectExternal = stub;
|
|
12385
|
+
export const waitUntil = stub;
|
|
12386
|
+
export const RenderError = stub;
|
|
12387
|
+
export const RedirectType = {};
|
|
12388
|
+
export const DenySignal = stub;
|
|
12389
|
+
export const RedirectSignal = stub;
|
|
12390
|
+
export const createPipeline = stub;
|
|
12391
|
+
export const revalidatePath = stub;
|
|
12392
|
+
export const revalidateTag = stub;
|
|
12393
|
+
export const createActionClient = stub;
|
|
12394
|
+
export const ActionError = stub;
|
|
12395
|
+
export const validated = stub;
|
|
12396
|
+
export const getFormFlash = stub;
|
|
12397
|
+
export const parseFormData = stub;
|
|
12398
|
+
export const coerce = stub;
|
|
12399
|
+
`;
|
|
12377
12400
|
}
|
|
12378
12401
|
};
|
|
12379
12402
|
}
|