@timber-js/app 0.1.3 → 0.1.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/dist/_chunks/{interception-DIaZN1bF.js → interception-c-a3uODY.js} +8 -8
- package/dist/_chunks/interception-c-a3uODY.js.map +1 -0
- package/dist/adapters/cloudflare.d.ts +2 -2
- package/dist/adapters/cloudflare.js +4 -4
- package/dist/adapters/cloudflare.js.map +1 -1
- package/dist/adapters/nitro.d.ts +1 -1
- package/dist/adapters/nitro.js +4 -4
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/cache/index.js.map +1 -1
- package/dist/client/form.d.ts +1 -1
- package/dist/client/index.js +3 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/use-link-status.d.ts +1 -1
- package/dist/client/use-navigation-pending.d.ts +1 -1
- package/dist/content/index.d.ts +1 -1
- package/dist/cookies/define-cookie.d.ts +2 -2
- package/dist/cookies/index.d.ts +1 -1
- package/dist/cookies/index.d.ts.map +1 -1
- package/dist/cookies/index.js +2 -2
- package/dist/cookies/index.js.map +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/plugins/dev-logs.d.ts +1 -1
- package/dist/plugins/dynamic-transform.d.ts +1 -1
- package/dist/routing/codegen.d.ts +1 -1
- package/dist/routing/index.js +1 -1
- package/dist/search-params/codecs.d.ts +2 -2
- package/dist/search-params/create.d.ts +1 -1
- package/dist/search-params/index.js +4 -4
- package/dist/search-params/index.js.map +1 -1
- package/dist/server/action-client.d.ts +1 -1
- package/dist/server/dev-fetch-instrumentation.d.ts +22 -0
- package/dist/server/dev-fetch-instrumentation.d.ts.map +1 -0
- package/dist/server/dev-logger.d.ts.map +1 -1
- package/dist/server/form-flash.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/shims/link.d.ts +1 -1
- package/package.json +1 -1
- package/src/adapters/cloudflare.ts +4 -4
- package/src/adapters/nitro.ts +4 -4
- package/src/cache/index.ts +1 -1
- package/src/client/form.tsx +1 -1
- package/src/client/index.ts +1 -1
- package/src/client/use-link-status.ts +1 -1
- package/src/client/use-navigation-pending.ts +1 -1
- package/src/content/index.ts +1 -1
- package/src/cookies/define-cookie.ts +2 -2
- package/src/cookies/index.ts +2 -6
- package/src/plugins/cache-transform.ts +1 -1
- package/src/plugins/dev-logs.ts +2 -2
- package/src/plugins/dynamic-transform.ts +2 -2
- package/src/plugins/shims.ts +10 -10
- package/src/routing/codegen.ts +9 -9
- package/src/search-params/codecs.ts +2 -2
- package/src/search-params/create.ts +3 -3
- package/src/search-params/index.ts +1 -1
- package/src/server/action-client.ts +1 -1
- package/src/server/asset-headers.ts +1 -1
- package/src/server/dev-fetch-instrumentation.ts +96 -0
- package/src/server/dev-logger.ts +49 -0
- package/src/server/form-flash.ts +1 -1
- package/src/server/index.ts +1 -1
- package/src/server/route-element-builder.ts +2 -5
- package/src/server/rsc-entry/index.ts +4 -0
- package/src/shims/link.ts +1 -1
- package/dist/_chunks/interception-DIaZN1bF.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as setViteServer, t as formatSize } from "./_chunks/format-DNt20Kt8.js";
|
|
2
|
-
import { i as scanRoutes, n as generateRouteMap, t as collectInterceptionRewrites } from "./_chunks/interception-
|
|
2
|
+
import { i as scanRoutes, n as generateRouteMap, t as collectInterceptionRewrites } from "./_chunks/interception-c-a3uODY.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, extname, join, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -11273,7 +11273,7 @@ function transformUseCache(code, fileId) {
|
|
|
11273
11273
|
result = result.slice(0, fn.start) + replacement + result.slice(fn.end);
|
|
11274
11274
|
needsImport = true;
|
|
11275
11275
|
}
|
|
11276
|
-
if (needsImport) result = `import { registerCachedFunction } from '@timber/app/cache';\n` + result;
|
|
11276
|
+
if (needsImport) result = `import { registerCachedFunction } from '@timber-js/app/cache';\n` + result;
|
|
11277
11277
|
return {
|
|
11278
11278
|
code: result,
|
|
11279
11279
|
map: null,
|
|
@@ -12321,17 +12321,17 @@ var SHIM_MAP = {
|
|
|
12321
12321
|
*/
|
|
12322
12322
|
var CLIENT_SHIM_OVERRIDES = { "next/navigation": resolve(SHIMS_DIR, "navigation-client.ts") };
|
|
12323
12323
|
/**
|
|
12324
|
-
* Map from @timber/app/* subpath imports to real source files.
|
|
12324
|
+
* Map from @timber-js/app/* subpath imports to real source files.
|
|
12325
12325
|
*
|
|
12326
|
-
* These resolve subpath imports like `@timber/app/server` to the
|
|
12326
|
+
* These resolve subpath imports like `@timber-js/app/server` to the
|
|
12327
12327
|
* real entry files in the package source.
|
|
12328
12328
|
*/
|
|
12329
12329
|
var TIMBER_SUBPATH_MAP = {
|
|
12330
|
-
"@timber/app/server": resolve(__dirname, "..", "server", "index.ts"),
|
|
12331
|
-
"@timber/app/client": resolve(__dirname, "..", "client", "index.ts"),
|
|
12332
|
-
"@timber/app/cache": resolve(__dirname, "..", "cache", "index.ts"),
|
|
12333
|
-
"@timber/app/search-params": resolve(__dirname, "..", "search-params", "index.ts"),
|
|
12334
|
-
"@timber/app/routing": resolve(__dirname, "..", "routing", "index.ts")
|
|
12330
|
+
"@timber-js/app/server": resolve(__dirname, "..", "server", "index.ts"),
|
|
12331
|
+
"@timber-js/app/client": resolve(__dirname, "..", "client", "index.ts"),
|
|
12332
|
+
"@timber-js/app/cache": resolve(__dirname, "..", "cache", "index.ts"),
|
|
12333
|
+
"@timber-js/app/search-params": resolve(__dirname, "..", "search-params", "index.ts"),
|
|
12334
|
+
"@timber-js/app/routing": resolve(__dirname, "..", "routing", "index.ts")
|
|
12335
12335
|
};
|
|
12336
12336
|
/**
|
|
12337
12337
|
* Strip .js extension from an import specifier.
|
|
@@ -13543,7 +13543,7 @@ function containsUseDynamic(code) {
|
|
|
13543
13543
|
*
|
|
13544
13544
|
* Output:
|
|
13545
13545
|
* ```tsx
|
|
13546
|
-
* import { markDynamic as __markDynamic } from '@timber/app/runtime';
|
|
13546
|
+
* import { markDynamic as __markDynamic } from '@timber-js/app/runtime';
|
|
13547
13547
|
* export default async function AddToCartButton({ productId }) {
|
|
13548
13548
|
* __markDynamic();
|
|
13549
13549
|
* const user = await getUser()
|
|
@@ -13564,7 +13564,7 @@ function transformUseDynamic(code) {
|
|
|
13564
13564
|
const cleanBody = fn.bodyContent.replace(/['"]use dynamic['"];?/, "__markDynamic();");
|
|
13565
13565
|
result = result.slice(0, fn.bodyStart) + cleanBody + result.slice(fn.bodyEnd);
|
|
13566
13566
|
}
|
|
13567
|
-
result = `import { markDynamic as __markDynamic } from '@timber/app/runtime';\n` + result;
|
|
13567
|
+
result = `import { markDynamic as __markDynamic } from '@timber-js/app/runtime';\n` + result;
|
|
13568
13568
|
return {
|
|
13569
13569
|
code: result,
|
|
13570
13570
|
map: null
|
|
@@ -13962,7 +13962,7 @@ function extractCallerLocation(projectRoot) {
|
|
|
13962
13962
|
* (render errors, action errors, route handler errors, etc.).
|
|
13963
13963
|
*
|
|
13964
13964
|
* Handles both monorepo paths (timber-app/src/plugins/) and installed
|
|
13965
|
-
* package paths (@timber/app/dist/plugins/).
|
|
13965
|
+
* package paths (@timber-js/app/dist/plugins/).
|
|
13966
13966
|
*/
|
|
13967
13967
|
function isFrameworkInternalCaller() {
|
|
13968
13968
|
const stack = (/* @__PURE__ */ new Error()).stack;
|
|
@@ -13972,7 +13972,7 @@ function isFrameworkInternalCaller() {
|
|
|
13972
13972
|
const line = lines[i].trim();
|
|
13973
13973
|
if (line.includes("dev-logs")) continue;
|
|
13974
13974
|
if (line.includes("node:")) continue;
|
|
13975
|
-
if (!(line.includes("timber-app/") || line.includes("@timber/app/"))) return false;
|
|
13975
|
+
if (!(line.includes("timber-app/") || line.includes("@timber-js/app/"))) return false;
|
|
13976
13976
|
return line.includes("/plugins/") || line.includes("/adapters/");
|
|
13977
13977
|
}
|
|
13978
13978
|
return false;
|