@replohq/sandbox-runtime 1.21.0 → 1.22.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/_vendor/schemas/comments.d.ts +12 -4
- package/_vendor/schemas/commentsOverlayRpc.mjs +1 -1
- package/_vendor/schemas/selectMode.mjs +1 -1
- package/_vendor/schemas/selectModeIframeRpc.mjs +1 -1
- package/buildMetadata.js +3 -3
- package/{chunk-NVOBD46N.mjs → chunk-CGRTGQO5.mjs} +4 -1
- package/next/config.js +37 -1
- package/package.json +4 -4
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export declare function isUuid(value: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The thread id in a bare id or either D-23 permalink form
|
|
5
|
+
* (`…/comments/<id>`, `…/<folderId>?thread=<id>`); null when there is none.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseCommentThreadReference(reference: string): string | null;
|
|
8
|
+
/** A comment body an agent or API caller writes: something besides whitespace. */
|
|
9
|
+
export declare const commentBodyTextSchema: z.ZodString;
|
|
2
10
|
export declare const commentSourceSchema: z.ZodEnum<{
|
|
3
11
|
ui: "ui";
|
|
4
12
|
agent: "agent";
|
|
@@ -126,7 +134,7 @@ export declare const commentTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
126
134
|
routePatternHint: z.ZodOptional<z.ZodString>;
|
|
127
135
|
via: z.ZodOptional<z.ZodObject<{
|
|
128
136
|
fileId: z.ZodUUID;
|
|
129
|
-
shareId: z.
|
|
137
|
+
shareId: z.ZodUUID;
|
|
130
138
|
}, z.core.$strip>>;
|
|
131
139
|
}, z.core.$strip>, z.ZodObject<{
|
|
132
140
|
kind: z.ZodLiteral<"order">;
|
|
@@ -386,7 +394,7 @@ export declare const createCommentThreadBodySchema: z.ZodObject<{
|
|
|
386
394
|
routePatternHint: z.ZodOptional<z.ZodString>;
|
|
387
395
|
via: z.ZodOptional<z.ZodObject<{
|
|
388
396
|
fileId: z.ZodUUID;
|
|
389
|
-
shareId: z.
|
|
397
|
+
shareId: z.ZodUUID;
|
|
390
398
|
}, z.core.$strip>>;
|
|
391
399
|
}, z.core.$strip>, z.ZodObject<{
|
|
392
400
|
kind: z.ZodLiteral<"order">;
|
|
@@ -556,7 +564,7 @@ export declare const presignCommentAttachmentBodySchema: z.ZodObject<{
|
|
|
556
564
|
routePatternHint: z.ZodOptional<z.ZodString>;
|
|
557
565
|
via: z.ZodOptional<z.ZodObject<{
|
|
558
566
|
fileId: z.ZodUUID;
|
|
559
|
-
shareId: z.
|
|
567
|
+
shareId: z.ZodUUID;
|
|
560
568
|
}, z.core.$strip>>;
|
|
561
569
|
}, z.core.$strip>, z.ZodObject<{
|
|
562
570
|
kind: z.ZodLiteral<"order">;
|
|
@@ -586,7 +594,7 @@ export declare const commitCommentAttachmentBodySchema: z.ZodObject<{
|
|
|
586
594
|
routePatternHint: z.ZodOptional<z.ZodString>;
|
|
587
595
|
via: z.ZodOptional<z.ZodObject<{
|
|
588
596
|
fileId: z.ZodUUID;
|
|
589
|
-
shareId: z.
|
|
597
|
+
shareId: z.ZodUUID;
|
|
590
598
|
}, z.core.$strip>>;
|
|
591
599
|
}, z.core.$strip>, z.ZodObject<{
|
|
592
600
|
kind: z.ZodLiteral<"order">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commentAnchorSchema, displayModeSchema, commentAnchorElementSchema } from '../../chunk-
|
|
1
|
+
import { commentAnchorSchema, displayModeSchema, commentAnchorElementSchema } from '../../chunk-CGRTGQO5.mjs';
|
|
2
2
|
import '../../chunk-THOBCJJA.mjs';
|
|
3
3
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, isSelectedSection, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeHoverRectSchema, selectModeImageSchema, selectModeImageScopeSchema, selectModeImageSourceSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectModeVideoSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-
|
|
1
|
+
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, isSelectedSection, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeHoverRectSchema, selectModeImageSchema, selectModeImageScopeSchema, selectModeImageSourceSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectModeVideoSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-CGRTGQO5.mjs';
|
|
2
2
|
import '../../chunk-THOBCJJA.mjs';
|
|
3
3
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-
|
|
1
|
+
import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-CGRTGQO5.mjs';
|
|
2
2
|
import '../../chunk-THOBCJJA.mjs';
|
|
3
3
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
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.22.0",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-10-
|
|
5
|
+
"commit": "06e25b3341d1e79f6171365410c49bee41b1f3e0",
|
|
6
|
+
"builtAt": "2026-10-30T20:22:33.673Z"
|
|
7
7
|
};
|
|
@@ -13,6 +13,9 @@ function parseSchemaOrNull(value, schema) {
|
|
|
13
13
|
const parseResult = schema.safeParse(value);
|
|
14
14
|
return parseResult.success ? parseResult.data : null;
|
|
15
15
|
}
|
|
16
|
+
z.string().min(1).refine((body) => body.trim().length > 0, {
|
|
17
|
+
message: "Write something before posting."
|
|
18
|
+
});
|
|
16
19
|
var commentSourceSchema = z.enum(["ui", "agent", "mcp", "api"]).describe("CommentSource");
|
|
17
20
|
var unitIntervalSchema = z.number().min(0).max(1);
|
|
18
21
|
var anchorUrlSchema = z.string().max(2048);
|
|
@@ -82,7 +85,7 @@ var commentTargetSchema = z.discriminatedUnion("kind", [
|
|
|
82
85
|
url: anchorUrlSchema,
|
|
83
86
|
locale: anchorLocaleSchema.nullish(),
|
|
84
87
|
routePatternHint: anchorUrlSchema.optional(),
|
|
85
|
-
via: z.object({ fileId: z.uuid(), shareId: z.
|
|
88
|
+
via: z.object({ fileId: z.uuid(), shareId: z.uuid() }).optional().describe(
|
|
86
89
|
"Set when the site preview is embedded in an artifact or canvas."
|
|
87
90
|
)
|
|
88
91
|
}),
|
package/next/config.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createHash } from "crypto";
|
|
2
|
+
import { existsSync, readFileSync } from "fs";
|
|
3
|
+
import { createRequire } from "module";
|
|
2
4
|
import path from "path";
|
|
3
5
|
const DEFAULT_PAGE_EXTENSIONS = ["tsx", "ts", "jsx", "js"];
|
|
4
6
|
const DEVELOPMENT_ONLY_PAGE_EXTENSIONS = ["dev.jsx", "dev.tsx"];
|
|
@@ -6,6 +8,33 @@ const BUILD_ONLY_PAGE_EXTENSIONS = ["published.tsx"];
|
|
|
6
8
|
const PUBLISH_TSCONFIG_FILENAME = "tsconfig.publish.json";
|
|
7
9
|
const PLATFORM_DEVICE_SIZES = [640, 828, 1080, 1200, 1920, 2048, 3840];
|
|
8
10
|
const PLATFORM_IMAGE_SIZES = [32, 48, 96, 128, 256, 384];
|
|
11
|
+
const VETTED_NEXT_POLYFILL_MODULE_SHA256 = "94c8008b70e41ac5b0360fd6f35ea7a59c20c6927aca7731ef8c6a3c26b9cddf";
|
|
12
|
+
function getPolyfillAlias() {
|
|
13
|
+
try {
|
|
14
|
+
const requireFromSite = createRequire(
|
|
15
|
+
path.join(process.cwd(), "package.json")
|
|
16
|
+
);
|
|
17
|
+
const source = readFileSync(
|
|
18
|
+
path.join(
|
|
19
|
+
path.dirname(requireFromSite.resolve("next/package.json")),
|
|
20
|
+
"dist/build/polyfills/polyfill-module.js"
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
requireFromSite.resolve("@replohq/sdk/next/polyfill-module");
|
|
24
|
+
if (createHash("sha256").update(source).digest("hex") === VETTED_NEXT_POLYFILL_MODULE_SHA256) {
|
|
25
|
+
return {
|
|
26
|
+
"../build/polyfills/polyfill-module": {
|
|
27
|
+
browser: "@replohq/sdk/next/polyfill-module"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
console.warn(
|
|
34
|
+
"[@replohq/sandbox-runtime] Skipped the Next.js polyfill alias, so Next's own polyfills ship. Either the installed @replohq/sdk has no next/polyfill-module (upgrade it), or next/dist/build/polyfills/polyfill-module.js is missing or differs from the vetted version (re-vet the polyfill list and update VETTED_NEXT_POLYFILL_MODULE_SHA256 in @replohq/sandbox-runtime/next/config)."
|
|
35
|
+
);
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
9
38
|
function getPageExtensions(configuredExtensions) {
|
|
10
39
|
const baseExtensions = (configuredExtensions ?? DEFAULT_PAGE_EXTENSIONS).filter((extension) => {
|
|
11
40
|
return !DEVELOPMENT_ONLY_PAGE_EXTENSIONS.includes(extension) && !BUILD_ONLY_PAGE_EXTENSIONS.includes(extension);
|
|
@@ -24,6 +53,13 @@ function withComponentPreviewPageExtension(config) {
|
|
|
24
53
|
...config,
|
|
25
54
|
pageExtensions: getPageExtensions(config.pageExtensions),
|
|
26
55
|
typescript: getTypescriptConfig(config.typescript),
|
|
56
|
+
turbopack: {
|
|
57
|
+
...config.turbopack,
|
|
58
|
+
resolveAlias: {
|
|
59
|
+
...getPolyfillAlias(),
|
|
60
|
+
...config.turbopack?.resolveAlias
|
|
61
|
+
}
|
|
62
|
+
},
|
|
27
63
|
images: {
|
|
28
64
|
...config.images,
|
|
29
65
|
deviceSizes: config.images?.deviceSizes ?? PLATFORM_DEVICE_SIZES,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.22.0",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-10-
|
|
8
|
+
"commit": "06e25b3341d1e79f6171365410c49bee41b1f3e0",
|
|
9
|
+
"builtAt": "2026-10-30T20:22:33.673Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|