@replohq/sandbox-runtime 1.4.1 → 1.5.0
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/buildMetadata.js +3 -3
- package/next/config.d.ts +1 -0
- package/next/config.js +17 -4
- package/next/config.js.map +2 -2
- package/package.json +4 -4
package/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-
|
|
5
|
+
"commit": "3596a406ee1c678085915d00db96f52ad3f9ac76",
|
|
6
|
+
"builtAt": "2026-09-01T19:49:34.011Z"
|
|
7
7
|
};
|
package/next/config.d.ts
CHANGED
package/next/config.js
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
|
+
import { existsSync } from "fs";
|
|
2
|
+
import path from "path";
|
|
1
3
|
const DEFAULT_PAGE_EXTENSIONS = ["tsx", "ts", "jsx", "js"];
|
|
4
|
+
const DEVELOPMENT_ONLY_PAGE_EXTENSIONS = ["dev.jsx", "dev.tsx"];
|
|
5
|
+
const BUILD_ONLY_PAGE_EXTENSIONS = ["published.tsx"];
|
|
6
|
+
const PUBLISH_TSCONFIG_FILENAME = "tsconfig.publish.json";
|
|
2
7
|
function getPageExtensions(configuredExtensions) {
|
|
3
|
-
const
|
|
8
|
+
const baseExtensions = (configuredExtensions ?? DEFAULT_PAGE_EXTENSIONS).filter((extension) => {
|
|
9
|
+
return !DEVELOPMENT_ONLY_PAGE_EXTENSIONS.includes(extension) && !BUILD_ONLY_PAGE_EXTENSIONS.includes(extension);
|
|
10
|
+
});
|
|
11
|
+
return process.env.BUILD_ENV === "build" ? [...BUILD_ONLY_PAGE_EXTENSIONS, ...baseExtensions] : [...DEVELOPMENT_ONLY_PAGE_EXTENSIONS, ...baseExtensions];
|
|
12
|
+
}
|
|
13
|
+
function getTypescriptConfig(configured) {
|
|
4
14
|
if (process.env.BUILD_ENV !== "build") {
|
|
5
|
-
return
|
|
15
|
+
return configured;
|
|
6
16
|
}
|
|
7
|
-
|
|
17
|
+
const tsconfigPath = path.join(process.cwd(), PUBLISH_TSCONFIG_FILENAME);
|
|
18
|
+
return existsSync(tsconfigPath) ? { ...configured, tsconfigPath: PUBLISH_TSCONFIG_FILENAME } : configured;
|
|
8
19
|
}
|
|
9
20
|
function withComponentPreviewPageExtension(config) {
|
|
10
21
|
return {
|
|
11
22
|
...config,
|
|
12
|
-
pageExtensions: getPageExtensions(config.pageExtensions)
|
|
23
|
+
pageExtensions: getPageExtensions(config.pageExtensions),
|
|
24
|
+
typescript: getTypescriptConfig(config.typescript)
|
|
13
25
|
};
|
|
14
26
|
}
|
|
15
27
|
export {
|
|
28
|
+
PUBLISH_TSCONFIG_FILENAME,
|
|
16
29
|
withComponentPreviewPageExtension
|
|
17
30
|
};
|
|
18
31
|
//# sourceMappingURL=config.js.map
|
package/next/config.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../next/config.ts"],
|
|
4
|
-
"sourcesContent": ["import type { NextConfig } from \"next\";\n\nconst DEFAULT_PAGE_EXTENSIONS = [\"tsx\", \"ts\", \"jsx\", \"js\"];\n\nfunction getPageExtensions(configuredExtensions: string[] | undefined) {\n const
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { existsSync } from \"fs\";\nimport path from \"path\";\nimport type { NextConfig } from \"next\";\n\nconst DEFAULT_PAGE_EXTENSIONS = [\"tsx\", \"ts\", \"jsx\", \"js\"];\n// Routed only by the sandbox dev server: site-component previews and page drafts.\nconst DEVELOPMENT_ONLY_PAGE_EXTENSIONS = [\"dev.jsx\", \"dev.tsx\"];\n// Routed only by publish builds: the live copy of every page.\nconst BUILD_ONLY_PAGE_EXTENSIONS = [\"published.tsx\"];\nexport const PUBLISH_TSCONFIG_FILENAME = \"tsconfig.publish.json\";\n\nfunction getPageExtensions(configuredExtensions: string[] | undefined) {\n const baseExtensions = (\n configuredExtensions ?? DEFAULT_PAGE_EXTENSIONS\n ).filter((extension) => {\n return (\n !DEVELOPMENT_ONLY_PAGE_EXTENSIONS.includes(extension) &&\n !BUILD_ONLY_PAGE_EXTENSIONS.includes(extension)\n );\n });\n\n return process.env.BUILD_ENV === \"build\"\n ? [...BUILD_ONLY_PAGE_EXTENSIONS, ...baseExtensions]\n : [...DEVELOPMENT_ONLY_PAGE_EXTENSIONS, ...baseExtensions];\n}\n\n// Drafts are excluded from the publish typecheck so unfinished pages never block a publish; live files stay checked.\nfunction getTypescriptConfig(configured: NextConfig[\"typescript\"]) {\n if (process.env.BUILD_ENV !== \"build\") {\n return configured;\n }\n\n const tsconfigPath = path.join(process.cwd(), PUBLISH_TSCONFIG_FILENAME);\n return existsSync(tsconfigPath)\n ? { ...configured, tsconfigPath: PUBLISH_TSCONFIG_FILENAME }\n : configured;\n}\n\nexport function withComponentPreviewPageExtension(\n config: NextConfig,\n): NextConfig {\n return {\n ...config,\n pageExtensions: getPageExtensions(config.pageExtensions),\n typescript: getTypescriptConfig(config.typescript),\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AAGjB,MAAM,0BAA0B,CAAC,OAAO,MAAM,OAAO,IAAI;AAEzD,MAAM,mCAAmC,CAAC,WAAW,SAAS;AAE9D,MAAM,6BAA6B,CAAC,eAAe;AAC5C,MAAM,4BAA4B;AAEzC,SAAS,kBAAkB,sBAA4C;AACrE,QAAM,kBACJ,wBAAwB,yBACxB,OAAO,CAAC,cAAc;AACtB,WACE,CAAC,iCAAiC,SAAS,SAAS,KACpD,CAAC,2BAA2B,SAAS,SAAS;AAAA,EAElD,CAAC;AAED,SAAO,QAAQ,IAAI,cAAc,UAC7B,CAAC,GAAG,4BAA4B,GAAG,cAAc,IACjD,CAAC,GAAG,kCAAkC,GAAG,cAAc;AAC7D;AAGA,SAAS,oBAAoB,YAAsC;AACjE,MAAI,QAAQ,IAAI,cAAc,SAAS;AACrC,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,KAAK,KAAK,QAAQ,IAAI,GAAG,yBAAyB;AACvE,SAAO,WAAW,YAAY,IAC1B,EAAE,GAAG,YAAY,cAAc,0BAA0B,IACzD;AACN;AAEO,SAAS,kCACd,QACY;AACZ,SAAO;AAAA,IACL,GAAG;AAAA,IACH,gBAAgB,kBAAkB,OAAO,cAAc;AAAA,IACvD,YAAY,oBAAoB,OAAO,UAAU;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.5.0",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-
|
|
8
|
+
"commit": "3596a406ee1c678085915d00db96f52ad3f9ac76",
|
|
9
|
+
"builtAt": "2026-09-01T19:49:34.011Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|