siteplane 0.1.51 → 0.1.53

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/next.js CHANGED
@@ -1865,6 +1865,18 @@ var fieldBridgeIdentitySchema = z17.object({
1865
1865
  fieldContractHash: canonicalFieldContractHashSchema,
1866
1866
  deploymentRevision: z17.string().trim().min(1).max(256)
1867
1867
  }).strict();
1868
+ var setupPreviewAccessSchema = z17.object({
1869
+ capability: z17.string().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{43}$/u).max(4096),
1870
+ expiresAt: z17.string().datetime()
1871
+ }).strict();
1872
+ var setupPreviewReadSchema = fieldBridgeIdentitySchema.extend({
1873
+ scope: z17.literal("setup_preview"),
1874
+ siteId: z17.string().uuid(),
1875
+ runId: z17.string().uuid(),
1876
+ bridgeSessionId: z17.string().min(1),
1877
+ expiresAt: z17.string().datetime(),
1878
+ contract: siteFieldContractV1Schema
1879
+ }).strict();
1868
1880
  var fieldBridgeBaseSchema = z17.object({
1869
1881
  version: z17.literal(BRIDGE_PROTOCOL_VERSION),
1870
1882
  type: z17.enum(FIELD_BRIDGE_MESSAGE_TYPES),
@@ -1892,7 +1904,8 @@ var fieldBridgeInitMessageSchema = fieldBridgeBaseSchema.extend({
1892
1904
  payload: z17.object({
1893
1905
  adminOrigin: z17.string().url(),
1894
1906
  customerOrigin: z17.string().url(),
1895
- renderedPath: realRenderedPathSchema
1907
+ renderedPath: realRenderedPathSchema,
1908
+ setupPreview: setupPreviewAccessSchema.optional()
1896
1909
  }).strict()
1897
1910
  });
1898
1911
  var fieldBridgeReadyMessageSchema = fieldBridgeBaseSchema.extend({
@@ -1905,7 +1918,7 @@ var fieldBridgeReadyMessageSchema = fieldBridgeBaseSchema.extend({
1905
1918
  z17.literal("preview_values"),
1906
1919
  z17.literal("field_evidence"),
1907
1920
  z17.literal("visual_field_control")
1908
- ]).rest(z17.literal("analytics_preview_readiness")).refine((capabilities) => capabilities.length <= 5)
1921
+ ]).rest(z17.enum(["analytics_preview_readiness", "setup_preview"])).refine((capabilities) => capabilities.length <= 6)
1909
1922
  }).strict()
1910
1923
  });
1911
1924
  var fieldBridgeFieldsMessageSchema = fieldBridgeBaseSchema.extend({
@@ -2248,6 +2261,47 @@ var setupInstallationRequestSchema = z26.object({
2248
2261
  }).strict()
2249
2262
  }).strict();
2250
2263
 
2264
+ // ../shared/dist/setup-claim.js
2265
+ import { z as z27 } from "zod";
2266
+ var setupClaimCodeSchema = z27.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/u);
2267
+ var setupClaimBindingSchema = z27.object({
2268
+ siteId: z27.string().uuid(),
2269
+ runId: z27.string().uuid()
2270
+ });
2271
+ var setupClaimReceiptSchema = setupClaimBindingSchema.extend({
2272
+ status: z27.literal("claimed"),
2273
+ requestId: z27.string().uuid(),
2274
+ workspaceId: z27.string().uuid(),
2275
+ userId: z27.string().uuid(),
2276
+ claimedAt: z27.string().datetime({ offset: true })
2277
+ }).strict();
2278
+ var setupClaimInspectionSchema = setupClaimBindingSchema.extend({
2279
+ status: z27.literal("pending"),
2280
+ requestId: z27.string().uuid(),
2281
+ siteName: z27.string(),
2282
+ userId: z27.string().uuid(),
2283
+ accountEmail: z27.string().email(),
2284
+ workspaceId: z27.string().uuid(),
2285
+ workspaceName: z27.string(),
2286
+ expiresAt: z27.string().datetime({ offset: true })
2287
+ }).strict();
2288
+ var setupClaimDenialSchema = z27.object({
2289
+ status: z27.enum([
2290
+ "invalid_claim_request",
2291
+ "invalid_installation",
2292
+ "already_claimed",
2293
+ "project_expired",
2294
+ "invalid_guest_session",
2295
+ "stale_setup_review",
2296
+ "verified_account_required",
2297
+ "workspace_access_denied",
2298
+ "workspace_entitlement_required",
2299
+ "site_limit_reached",
2300
+ "provisional_relationship_conflict",
2301
+ "rate_limited"
2302
+ ])
2303
+ }).strict();
2304
+
2251
2305
  // ../cli/dist/analytics/static-scan.js
2252
2306
  import ts from "typescript";
2253
2307
 
@@ -2300,16 +2354,16 @@ function createAnalyticsCliRequestHeaders(config) {
2300
2354
  }
2301
2355
 
2302
2356
  // ../cli/dist/commands/analytics/public-key.js
2303
- import { z as z27 } from "zod";
2304
- var responseSchema = z27.object({
2305
- ok: z27.literal(true),
2306
- data: z27.object({
2307
- rawPublicKey: z27.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/)
2357
+ import { z as z28 } from "zod";
2358
+ var responseSchema = z28.object({
2359
+ ok: z28.literal(true),
2360
+ data: z28.object({
2361
+ rawPublicKey: z28.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/)
2308
2362
  })
2309
2363
  });
2310
- var errorResponseSchema = z27.object({
2311
- error: z27.object({
2312
- code: z27.string().regex(/^[a-z][a-z0-9_.-]+$/u)
2364
+ var errorResponseSchema = z28.object({
2365
+ error: z28.object({
2366
+ code: z28.string().regex(/^[a-z][a-z0-9_.-]+$/u)
2313
2367
  })
2314
2368
  });
2315
2369
  async function analyticsPublicKeyCommand(input) {
@@ -2331,13 +2385,13 @@ async function analyticsPublicKeyCommand(input) {
2331
2385
  }
2332
2386
 
2333
2387
  // ../cli/dist/commands/analytics/prepare.js
2334
- import { z as z28 } from "zod";
2335
- var resultSchema = z28.object({
2336
- ok: z28.literal(true),
2337
- data: z28.object({
2338
- rawPublicKey: z28.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/u),
2339
- generation: z28.number().int().positive(),
2340
- status: z28.enum([
2388
+ import { z as z29 } from "zod";
2389
+ var resultSchema = z29.object({
2390
+ ok: z29.literal(true),
2391
+ data: z29.object({
2392
+ rawPublicKey: z29.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/u),
2393
+ generation: z29.number().int().positive(),
2394
+ status: z29.enum([
2341
2395
  "setup_started",
2342
2396
  "test_mode",
2343
2397
  "active",
@@ -2347,8 +2401,8 @@ var resultSchema = z28.object({
2347
2401
  ])
2348
2402
  }).strict()
2349
2403
  }).strict();
2350
- var errorSchema = z28.object({
2351
- error: z28.object({ code: z28.string().regex(/^[a-z][a-z0-9_.-]+$/u) })
2404
+ var errorSchema = z29.object({
2405
+ error: z29.object({ code: z29.string().regex(/^[a-z][a-z0-9_.-]+$/u) })
2352
2406
  });
2353
2407
 
2354
2408
  // ../cli/dist/commands/analytics/test.js
@@ -2381,19 +2435,19 @@ ${bookingRulesTemplate}`;
2381
2435
  import { access, chmod, open, readFile as readFile5, rename, rm } from "fs/promises";
2382
2436
  import { randomUUID as randomUUID2 } from "crypto";
2383
2437
  import { join as join3 } from "path";
2384
- import { z as z29 } from "zod";
2385
- var siteplaneProjectConfigSchema = z29.object({
2386
- version: z29.literal(2),
2387
- apiBaseUrl: z29.string().url(),
2388
- siteId: z29.string().uuid(),
2389
- publicSiteKeyId: z29.string().uuid(),
2390
- publicSiteKey: z29.string().trim().min(1),
2391
- runId: z29.string().uuid(),
2392
- appDirectory: z29.string().min(1),
2393
- taskContractVersion: z29.literal("siteplane.setup-task.v2"),
2394
- adminProtocolVersion: z29.literal(2),
2438
+ import { z as z30 } from "zod";
2439
+ var siteplaneProjectConfigSchema = z30.object({
2440
+ version: z30.literal(2),
2441
+ apiBaseUrl: z30.string().url(),
2442
+ siteId: z30.string().uuid(),
2443
+ publicSiteKeyId: z30.string().uuid(),
2444
+ publicSiteKey: z30.string().trim().min(1),
2445
+ runId: z30.string().uuid(),
2446
+ appDirectory: z30.string().min(1),
2447
+ taskContractVersion: z30.literal("siteplane.setup-task.v2"),
2448
+ adminProtocolVersion: z30.literal(2),
2395
2449
  packages: siteSetupPackagesSchema,
2396
- fieldContractHash: z29.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2450
+ fieldContractHash: z30.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2397
2451
  }).strict();
2398
2452
  async function readProjectConfig(projectDir) {
2399
2453
  return siteplaneProjectConfigSchema.parse(JSON.parse(await readFile5(join3(projectDir, "siteplane.config.json"), "utf8")));
@@ -2405,26 +2459,27 @@ import { randomUUID as randomUUID3 } from "crypto";
2405
2459
  import { chmod as chmod2, lstat, mkdir as mkdir5, open as open2, readFile as readFile6, rename as rename2, rm as rm2 } from "fs/promises";
2406
2460
  import { dirname as dirname5, join as join4, relative } from "path";
2407
2461
  import { promisify } from "util";
2408
- import { z as z30 } from "zod";
2409
- var localSetupInstallationSchema = z30.object({
2410
- key: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2411
- idempotencyKey: z30.string().uuid(),
2412
- apiBaseUrl: z30.string().url(),
2462
+ import { z as z31 } from "zod";
2463
+ var localSetupInstallationSchema = z31.object({
2464
+ key: z31.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2465
+ idempotencyKey: z31.string().uuid(),
2466
+ apiBaseUrl: z31.string().url(),
2413
2467
  request: setupInstallationRequestSchema,
2414
- bootstrapAcknowledged: z30.boolean()
2468
+ bootstrapAcknowledged: z31.boolean()
2415
2469
  }).strict();
2416
- var siteplaneCredentialsSchema = z30.object({
2417
- accessToken: z30.string().trim().min(1),
2418
- siteRevalidationSecret: z30.string().trim().min(1),
2470
+ var siteplaneCredentialsSchema = z31.object({
2471
+ accessToken: z31.string().trim().min(1),
2472
+ siteRevalidationSecret: z31.string().trim().min(1),
2419
2473
  installation: localSetupInstallationSchema.optional(),
2420
- adminSession: z30.object({
2421
- secret: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2422
- generation: z30.string().uuid()
2474
+ claimReceipt: setupClaimReceiptSchema.optional(),
2475
+ adminSession: z31.object({
2476
+ secret: z31.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2477
+ generation: z31.string().uuid()
2423
2478
  }).strict().optional()
2424
2479
  }).strict();
2425
- var localSetupCredentialsSchema = z30.union([
2480
+ var localSetupCredentialsSchema = z31.union([
2426
2481
  siteplaneCredentialsSchema,
2427
- z30.object({ installation: localSetupInstallationSchema }).strict()
2482
+ z31.object({ installation: localSetupInstallationSchema }).strict()
2428
2483
  ]);
2429
2484
  async function assertLocalCredentialsPathSafe(projectDir, options = {}) {
2430
2485
  const path = join4(projectDir, ".siteplane/credentials.json");
@@ -2485,7 +2540,7 @@ async function gitPathMatches(projectDir, path, command) {
2485
2540
  // ../cli/dist/commands/init.js
2486
2541
  import { access as access3 } from "fs/promises";
2487
2542
  import { join as join7, relative as relative3 } from "path";
2488
- import { z as z33 } from "zod";
2543
+ import { z as z34 } from "zod";
2489
2544
 
2490
2545
  // ../cli/dist/commands/setup-preflight.js
2491
2546
  import { createHash as createHash2 } from "crypto";
@@ -2497,11 +2552,11 @@ import { parse as parseYaml } from "yaml";
2497
2552
  import { createRequire } from "module";
2498
2553
  import { readFile as readFile7 } from "fs/promises";
2499
2554
  import { join as join5 } from "path";
2500
- import { z as z31 } from "zod";
2501
- var packageSchema = z31.object({
2502
- name: z31.string().optional(),
2503
- version: z31.string(),
2504
- peerDependencies: z31.record(z31.string(), z31.string()).optional()
2555
+ import { z as z32 } from "zod";
2556
+ var packageSchema = z32.object({
2557
+ name: z32.string().optional(),
2558
+ version: z32.string(),
2559
+ peerDependencies: z32.record(z32.string(), z32.string()).optional()
2505
2560
  });
2506
2561
  async function readInstalledPackage(projectDir, name2) {
2507
2562
  const require2 = createRequire(join5(projectDir, "package.json"));
@@ -2519,7 +2574,7 @@ async function readInstalledPackage(projectDir, name2) {
2519
2574
  // ../cli/dist/commands/setup-preflight.js
2520
2575
  import { access as access2, readFile as readFile8, realpath, readdir, readlink } from "fs/promises";
2521
2576
  import { dirname as dirname6, join as join6, relative as relative2, resolve, sep } from "path";
2522
- import { z as z32 } from "zod";
2577
+ import { z as z33 } from "zod";
2523
2578
 
2524
2579
  // ../cli/dist/commands/setup-process.js
2525
2580
  import { spawn } from "child_process";
@@ -2620,29 +2675,29 @@ async function setupVercelApi(cwd, endpoint, body, method, options) {
2620
2675
  }
2621
2676
 
2622
2677
  // ../cli/dist/commands/setup-preflight.js
2623
- var manifestSchema = z32.object({
2624
- packageManager: z32.string().optional(),
2625
- engines: z32.object({ node: z32.string().optional() }).optional(),
2626
- dependencies: z32.record(z32.string(), z32.string()).optional(),
2627
- devDependencies: z32.record(z32.string(), z32.string()).optional(),
2628
- scripts: z32.record(z32.string(), z32.string()).optional(),
2629
- workspaces: z32.unknown().optional()
2678
+ var manifestSchema = z33.object({
2679
+ packageManager: z33.string().optional(),
2680
+ engines: z33.object({ node: z33.string().optional() }).optional(),
2681
+ dependencies: z33.record(z33.string(), z33.string()).optional(),
2682
+ devDependencies: z33.record(z33.string(), z33.string()).optional(),
2683
+ scripts: z33.record(z33.string(), z33.string()).optional(),
2684
+ workspaces: z33.unknown().optional()
2630
2685
  });
2631
- var vercelProjectSchema = z32.object({
2632
- id: z32.string(),
2633
- accountId: z32.string(),
2634
- name: z32.string(),
2635
- nodeVersion: z32.string().nullable().optional(),
2636
- rootDirectory: z32.string().nullable().optional(),
2637
- framework: z32.string().nullable().optional(),
2638
- installCommand: z32.string().nullable().optional(),
2639
- buildCommand: z32.string().nullable().optional(),
2640
- link: z32.object({
2641
- type: z32.string(),
2642
- repo: z32.string().optional(),
2643
- repoId: z32.union([z32.string(), z32.number()]).optional(),
2644
- org: z32.string().optional(),
2645
- productionBranch: z32.string().optional()
2686
+ var vercelProjectSchema = z33.object({
2687
+ id: z33.string(),
2688
+ accountId: z33.string(),
2689
+ name: z33.string(),
2690
+ nodeVersion: z33.string().nullable().optional(),
2691
+ rootDirectory: z33.string().nullable().optional(),
2692
+ framework: z33.string().nullable().optional(),
2693
+ installCommand: z33.string().nullable().optional(),
2694
+ buildCommand: z33.string().nullable().optional(),
2695
+ link: z33.object({
2696
+ type: z33.string(),
2697
+ repo: z33.string().optional(),
2698
+ repoId: z33.union([z33.string(), z33.number()]).optional(),
2699
+ org: z33.string().optional(),
2700
+ productionBranch: z33.string().optional()
2646
2701
  }).nullable().optional()
2647
2702
  });
2648
2703
  var exists = async (path) => access2(path).then(() => true, () => false);
@@ -2699,9 +2754,9 @@ async function inspectSetupLocalProject(projectDir) {
2699
2754
  const rootManifest = manifestSchema.parse(JSON.parse(await readFile8(join6(lockfileRoot, "package.json"), "utf8")));
2700
2755
  if (lockfileRoot !== projectDirectory) {
2701
2756
  const workspaceFile = join6(lockfileRoot, "pnpm-workspace.yaml");
2702
- const workspace = lockName === "pnpm-lock.yaml" && await exists(workspaceFile) ? z32.object({ packages: z32.array(z32.string()) }).parse(parseYaml(await readFile8(workspaceFile, "utf8"))).packages : z32.union([
2703
- z32.array(z32.string()),
2704
- z32.object({ packages: z32.array(z32.string()) }).transform((value) => value.packages)
2757
+ const workspace = lockName === "pnpm-lock.yaml" && await exists(workspaceFile) ? z33.object({ packages: z33.array(z33.string()) }).parse(parseYaml(await readFile8(workspaceFile, "utf8"))).packages : z33.union([
2758
+ z33.array(z33.string()),
2759
+ z33.object({ packages: z33.array(z33.string()) }).transform((value) => value.packages)
2705
2760
  ]).parse(rootManifest.workspaces);
2706
2761
  const selected = relative2(lockfileRoot, projectDirectory).split(sep).join("/");
2707
2762
  if (!workspace.some((pattern) => !pattern.startsWith("!") && minimatch(selected, pattern)) || workspace.some((pattern) => pattern.startsWith("!") && minimatch(selected, pattern.slice(1))))
@@ -2715,11 +2770,11 @@ async function inspectSetupLocalProject(projectDir) {
2715
2770
  break;
2716
2771
  }
2717
2772
  const lockText = await readFile8(join6(lockfileRoot, lockName), "utf8");
2718
- const npmLock = lockName === "package-lock.json" ? z32.object({
2719
- lockfileVersion: z32.number(),
2720
- packages: z32.record(z32.string(), z32.object({
2721
- version: z32.string().optional(),
2722
- peerDependencies: z32.record(z32.string(), z32.string()).optional()
2773
+ const npmLock = lockName === "package-lock.json" ? z33.object({
2774
+ lockfileVersion: z33.number(),
2775
+ packages: z33.record(z33.string(), z33.object({
2776
+ version: z33.string().optional(),
2777
+ peerDependencies: z33.record(z33.string(), z33.string()).optional()
2723
2778
  })).optional()
2724
2779
  }).parse(JSON.parse(lockText)) : null;
2725
2780
  async function version2(name3) {
@@ -2859,9 +2914,9 @@ async function setupPreflightCommand(input) {
2859
2914
  linkDirectory = dirname6(linkDirectory);
2860
2915
  if (!await exists(join6(linkDirectory, ".vercel/project.json")))
2861
2916
  fail("vercel_project_not_linked", "Link this application to its intended Vercel project before setup; Siteplane will not guess a target.");
2862
- const linked = z32.object({
2863
- projectId: z32.string().regex(/^prj_[A-Za-z0-9]+$/u),
2864
- orgId: z32.string().regex(/^(?:team|user)_[A-Za-z0-9]+$/u)
2917
+ const linked = z33.object({
2918
+ projectId: z33.string().regex(/^prj_[A-Za-z0-9]+$/u),
2919
+ orgId: z33.string().regex(/^(?:team|user)_[A-Za-z0-9]+$/u)
2865
2920
  }).parse(JSON.parse(await readFile8(join6(linkDirectory, ".vercel/project.json"), "utf8")));
2866
2921
  const project = vercelProjectSchema.parse(await setupVercelApi(linkDirectory, `/v9/projects/${linked.projectId}?teamId=${linked.orgId}`));
2867
2922
  if (project.id !== linked.projectId || project.accountId !== linked.orgId)
@@ -2875,11 +2930,11 @@ async function setupPreflightCommand(input) {
2875
2930
  fail("vercel_production_branch_conflict", "The local branch differs from the bound Vercel Production branch.");
2876
2931
  if (project.link?.repo && project.link.org && !local.git.remote?.replace(/\.git$/u, "").endsWith(`${project.link.org}/${project.link.repo}`))
2877
2932
  fail("vercel_git_conflict", "The local origin repository differs from the Vercel Git connection.");
2878
- const env = z32.object({
2879
- envs: z32.array(z32.object({
2880
- key: z32.string(),
2881
- value: z32.string().optional(),
2882
- target: z32.array(z32.string()).optional()
2933
+ const env = z33.object({
2934
+ envs: z33.array(z33.object({
2935
+ key: z33.string(),
2936
+ value: z33.string().optional(),
2937
+ target: z33.array(z33.string()).optional()
2883
2938
  }))
2884
2939
  }).parse(await setupVercelApi(linkDirectory, `/v10/projects/${linked.projectId}/env?teamId=${linked.orgId}`));
2885
2940
  const corepack = env.envs.some((item) => item.key === "ENABLE_EXPERIMENTAL_COREPACK" && item.value === "1" && item.target?.includes("production"));
@@ -2941,26 +2996,26 @@ function safeGitRemote(value) {
2941
2996
  }
2942
2997
 
2943
2998
  // ../cli/dist/commands/init.js
2944
- var siteSetupBootstrapDataSchema = z33.object({
2945
- credentialPurpose: z33.literal("site_setup"),
2946
- apiBaseUrl: z33.string().url(),
2947
- siteId: z33.string().uuid(),
2948
- publicSiteKeyId: z33.string().uuid(),
2949
- publicSiteKey: z33.string().trim().min(1),
2950
- accessToken: z33.string().trim().min(1),
2951
- siteRevalidationSecret: z33.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2952
- runId: z33.string().uuid(),
2999
+ var siteSetupBootstrapDataSchema = z34.object({
3000
+ credentialPurpose: z34.literal("site_setup"),
3001
+ apiBaseUrl: z34.string().url(),
3002
+ siteId: z34.string().uuid(),
3003
+ publicSiteKeyId: z34.string().uuid(),
3004
+ publicSiteKey: z34.string().trim().min(1),
3005
+ accessToken: z34.string().trim().min(1),
3006
+ siteRevalidationSecret: z34.string().regex(/^[A-Za-z0-9_-]{43}$/u),
3007
+ runId: z34.string().uuid(),
2953
3008
  packages: siteSetupPackagesSchema
2954
3009
  }).strict();
2955
- var featureBootstrapDataSchema = z33.object({
2956
- credentialPurpose: z33.enum(["analytics", "booking"]),
2957
- apiBaseUrl: z33.string().url(),
2958
- siteId: z33.string().uuid(),
2959
- accessToken: z33.string().trim().min(1)
3010
+ var featureBootstrapDataSchema = z34.object({
3011
+ credentialPurpose: z34.enum(["analytics", "booking"]),
3012
+ apiBaseUrl: z34.string().url(),
3013
+ siteId: z34.string().uuid(),
3014
+ accessToken: z34.string().trim().min(1)
2960
3015
  }).strict();
2961
- var bootstrapResponseSchema = z33.object({
2962
- ok: z33.literal(true),
2963
- data: z33.discriminatedUnion("credentialPurpose", [
3016
+ var bootstrapResponseSchema = z34.object({
3017
+ ok: z34.literal(true),
3018
+ data: z34.discriminatedUnion("credentialPurpose", [
2964
3019
  siteSetupBootstrapDataSchema,
2965
3020
  featureBootstrapDataSchema
2966
3021
  ])
@@ -3011,7 +3066,7 @@ async function collectSourceFiles(directory) {
3011
3066
  import { execFile as execFile2 } from "child_process";
3012
3067
  import { readFile as readFile9 } from "fs/promises";
3013
3068
  import { promisify as promisify2 } from "util";
3014
- import { z as z34 } from "zod";
3069
+ import { z as z35 } from "zod";
3015
3070
 
3016
3071
  // ../cli/dist/scan/next-source-scan.js
3017
3072
  import ts2 from "typescript";
@@ -3708,32 +3763,32 @@ function isPositionalFieldReference(value) {
3708
3763
 
3709
3764
  // ../cli/dist/commands/site-setup.js
3710
3765
  var execFileAsync2 = promisify2(execFile2);
3711
- var safeErrorSchema = z34.object({
3712
- code: z34.string().trim().min(1),
3713
- message: z34.string().trim().min(1)
3766
+ var safeErrorSchema = z35.object({
3767
+ code: z35.string().trim().min(1),
3768
+ message: z35.string().trim().min(1)
3714
3769
  }).passthrough();
3715
- var errorResponseSchema2 = z34.object({ ok: z34.literal(false), error: safeErrorSchema }).passthrough();
3716
- var contextDataSchema = z34.object({
3770
+ var errorResponseSchema2 = z35.object({ ok: z35.literal(false), error: safeErrorSchema }).passthrough();
3771
+ var contextDataSchema = z35.object({
3717
3772
  task: siteSetupTaskSchema.refine((task) => task.run !== null)
3718
3773
  }).strict();
3719
- var contextResponseSchema = z34.object({ ok: z34.literal(true), data: contextDataSchema }).strict();
3720
- var applyDataSchema = z34.object({
3721
- status: z34.enum(["applied", "ready_for_review"]),
3722
- runId: z34.string().uuid().optional(),
3723
- contractVersionId: z34.string().uuid().optional(),
3724
- fieldContractHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u),
3725
- editorDefinitionHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
3726
- fieldCount: z34.number().int().nonnegative().optional(),
3727
- routeCount: z34.number().int().nonnegative().optional()
3774
+ var contextResponseSchema = z35.object({ ok: z35.literal(true), data: contextDataSchema }).strict();
3775
+ var applyDataSchema = z35.object({
3776
+ status: z35.enum(["applied", "ready_for_review"]),
3777
+ runId: z35.string().uuid().optional(),
3778
+ contractVersionId: z35.string().uuid().optional(),
3779
+ fieldContractHash: z35.string().regex(/^sha256:[0-9a-f]{64}$/u),
3780
+ editorDefinitionHash: z35.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
3781
+ fieldCount: z35.number().int().nonnegative().optional(),
3782
+ routeCount: z35.number().int().nonnegative().optional()
3728
3783
  }).strict();
3729
- var applyResponseSchema = z34.object({ ok: z34.literal(true), data: applyDataSchema }).strict();
3730
- var verifyDataSchema = z34.object({
3731
- status: z34.literal("ready_for_review"),
3732
- runId: z34.string().uuid().optional(),
3733
- deploymentOrigin: z34.string().url().optional(),
3734
- deploymentRevision: z34.string().optional()
3784
+ var applyResponseSchema = z35.object({ ok: z35.literal(true), data: applyDataSchema }).strict();
3785
+ var verifyDataSchema = z35.object({
3786
+ status: z35.literal("ready_for_review"),
3787
+ runId: z35.string().uuid().optional(),
3788
+ deploymentOrigin: z35.string().url().optional(),
3789
+ deploymentRevision: z35.string().optional()
3735
3790
  }).strict();
3736
- var verifyResponseSchema = z34.object({ ok: z34.literal(true), data: verifyDataSchema }).strict();
3791
+ var verifyResponseSchema = z35.object({ ok: z35.literal(true), data: verifyDataSchema }).strict();
3737
3792
  async function siteSetupContextCommand(input) {
3738
3793
  const response = await postSiteSetup(input, "context", {});
3739
3794
  const parsed = contextResponseSchema.safeParse(response.payload);
@@ -3830,12 +3885,22 @@ async function readGitRevision(projectDir) {
3830
3885
  import { randomBytes, randomUUID as randomUUID4 } from "crypto";
3831
3886
  import { access as access4 } from "fs/promises";
3832
3887
  import { join as join9, relative as relative5 } from "path";
3833
- import { z as z35 } from "zod";
3834
- var bootstrapResponseSchema2 = z35.object({
3835
- ok: z35.literal(true),
3888
+ import { z as z36 } from "zod";
3889
+ var bootstrapResponseSchema2 = z36.object({
3890
+ ok: z36.literal(true),
3836
3891
  data: siteSetupBootstrapDataSchema
3837
3892
  }).strict();
3838
3893
 
3894
+ // ../cli/dist/commands/setup-review.js
3895
+ import { z as z37 } from "zod";
3896
+ var responseSchema2 = z37.object({
3897
+ ok: z37.literal(true),
3898
+ data: z37.object({
3899
+ reviewUrl: z37.string().url(),
3900
+ expiresAt: z37.string().datetime({ offset: true })
3901
+ }).strict()
3902
+ }).strict();
3903
+
3839
3904
  // ../cli/dist/commands/setup-prepare.js
3840
3905
  import { access as access5, lstat as lstat2, mkdir as mkdir6, open as open3, readFile as readFile10, rename as rename3, rm as rm3 } from "fs/promises";
3841
3906
  import { randomUUID as randomUUID5 } from "crypto";
@@ -3846,8 +3911,8 @@ import ts3 from "typescript";
3846
3911
  import { randomUUID as randomUUID6 } from "crypto";
3847
3912
  import { lstat as lstat3, mkdir as mkdir7, open as open4, readFile as readFile11, rm as rm4, rmdir } from "fs/promises";
3848
3913
  import { resolve as resolve2 } from "path";
3849
- import { z as z36 } from "zod";
3850
- var ownerSchema = z36.object({ pid: z36.number().int().positive(), nonce: z36.string().uuid() }).strict();
3914
+ import { z as z38 } from "zod";
3915
+ var ownerSchema = z38.object({ pid: z38.number().int().positive(), nonce: z38.string().uuid() }).strict();
3851
3916
 
3852
3917
  // ../cli/dist/config/build-provenance.js
3853
3918
  import { createHash as createHash3 } from "crypto";
@@ -3855,23 +3920,23 @@ import { execFile as execFile3 } from "child_process";
3855
3920
  import { lstat as lstat4, readFile as readFile12, writeFile as writeFile5, mkdir as mkdir8 } from "fs/promises";
3856
3921
  import { dirname as dirname8, isAbsolute as isAbsolute2, join as join11, relative as relative7, resolve as resolve3, sep as sep3 } from "path";
3857
3922
  import { isDeepStrictEqual, promisify as promisify3 } from "util";
3858
- import { z as z37 } from "zod";
3923
+ import { z as z39 } from "zod";
3859
3924
  var execute = promisify3(execFile3);
3860
3925
  var name = ".siteplane/build-source.json";
3861
- var oid = z37.string().regex(/^[0-9a-f]{40}$/u);
3862
- var entrySchema = z37.object({
3863
- path: z37.string().min(1).max(4096),
3864
- mode: z37.enum(["100644", "100755", "120000"]),
3926
+ var oid = z39.string().regex(/^[0-9a-f]{40}$/u);
3927
+ var entrySchema = z39.object({
3928
+ path: z39.string().min(1).max(4096),
3929
+ mode: z39.enum(["100644", "100755", "120000"]),
3865
3930
  oid
3866
3931
  }).strict();
3867
- var schema = z37.object({
3868
- version: z37.literal(2),
3932
+ var schema = z39.object({
3933
+ version: z39.literal(2),
3869
3934
  revision: oid,
3870
- commit: z37.string().min(1).max(1048576),
3871
- entries: z37.array(entrySchema).min(1).max(1e5),
3872
- providerConfigurations: z37.array(z37.object({
3873
- path: z37.string().max(4096).regex(/(?:^|\/)vercel\.json$/u),
3874
- source: z37.string().max(1048576)
3935
+ commit: z39.string().min(1).max(1048576),
3936
+ entries: z39.array(entrySchema).min(1).max(1e5),
3937
+ providerConfigurations: z39.array(z39.object({
3938
+ path: z39.string().max(4096).regex(/(?:^|\/)vercel\.json$/u),
3939
+ source: z39.string().max(1048576)
3875
3940
  }).strict()).max(1e3)
3876
3941
  }).strict();
3877
3942
  var gitHash = (type, content) => createHash3("sha1").update(`${type} ${content.length}\0`).update(content).digest("hex");
@@ -3971,7 +4036,7 @@ async function readBuildProvenance(projectDirectory) {
3971
4036
  const original = configurations.get(entry.path);
3972
4037
  if (contents && original && entry.mode !== "120000") {
3973
4038
  try {
3974
- const object = z37.record(z37.string(), z37.unknown());
4039
+ const object = z39.record(z39.string(), z39.unknown());
3975
4040
  const actual = object.parse(JSON.parse(contents.toString("utf8")));
3976
4041
  const expected = object.parse(JSON.parse(original));
3977
4042
  if (!Object.hasOwn(expected, "version") && actual.version === 2)
@@ -4025,38 +4090,38 @@ import { createHash as createHash4, randomBytes as randomBytes2, randomUUID as r
4025
4090
  import { access as access6, mkdir as mkdir9, mkdtemp, rm as rm5, writeFile as writeFile6 } from "fs/promises";
4026
4091
  import { tmpdir } from "os";
4027
4092
  import { join as join12 } from "path";
4028
- import { z as z38 } from "zod";
4029
- var envSchema = z38.object({
4030
- id: z38.string(),
4031
- key: z38.string(),
4032
- target: z38.array(z38.string()),
4033
- type: z38.string(),
4034
- comment: z38.string().optional(),
4035
- updatedAt: z38.number().optional()
4093
+ import { z as z40 } from "zod";
4094
+ var envSchema = z40.object({
4095
+ id: z40.string(),
4096
+ key: z40.string(),
4097
+ target: z40.array(z40.string()),
4098
+ type: z40.string(),
4099
+ comment: z40.string().optional(),
4100
+ updatedAt: z40.number().optional()
4036
4101
  });
4037
- var deploymentSchema = z38.object({
4038
- id: z38.string(),
4039
- projectId: z38.string(),
4040
- ownerId: z38.string().optional(),
4041
- target: z38.string().nullable(),
4042
- readyState: z38.string(),
4043
- createdAt: z38.number(),
4044
- url: z38.string(),
4045
- meta: z38.record(z38.string(), z38.unknown()).optional(),
4046
- gitSource: z38.object({ sha: z38.string().optional() }).nullable().optional()
4102
+ var deploymentSchema = z40.object({
4103
+ id: z40.string(),
4104
+ projectId: z40.string(),
4105
+ ownerId: z40.string().optional(),
4106
+ target: z40.string().nullable(),
4107
+ readyState: z40.string(),
4108
+ createdAt: z40.number(),
4109
+ url: z40.string(),
4110
+ meta: z40.record(z40.string(), z40.unknown()).optional(),
4111
+ gitSource: z40.object({ sha: z40.string().optional() }).nullable().optional()
4047
4112
  });
4048
- var buildProofSchema = z38.object({
4049
- node: z38.string(),
4050
- packageManager: z38.enum(["npm", "pnpm"]),
4051
- packageManagerVersion: z38.string(),
4052
- lockfileHash: z38.string(),
4053
- revision: z38.string(),
4054
- fieldContractHash: z38.string(),
4055
- siteplane: z38.string(),
4056
- runtimeNext: z38.string(),
4057
- analytics: z38.string().optional(),
4058
- next: z38.string(),
4059
- react: z38.string()
4113
+ var buildProofSchema = z40.object({
4114
+ node: z40.string(),
4115
+ packageManager: z40.enum(["npm", "pnpm"]),
4116
+ packageManagerVersion: z40.string(),
4117
+ lockfileHash: z40.string(),
4118
+ revision: z40.string(),
4119
+ fieldContractHash: z40.string(),
4120
+ siteplane: z40.string(),
4121
+ runtimeNext: z40.string(),
4122
+ analytics: z40.string().optional(),
4123
+ next: z40.string(),
4124
+ react: z40.string()
4060
4125
  }).strict();
4061
4126
  var defaults = {
4062
4127
  preflight: setupPreflightCommand,
@@ -4071,6 +4136,9 @@ var defaults = {
4071
4136
  pause: (milliseconds) => new Promise((resolve5) => setTimeout(resolve5, milliseconds))
4072
4137
  };
4073
4138
 
4139
+ // ../cli/dist/commands/setup-claim.js
4140
+ import { z as z41 } from "zod";
4141
+
4074
4142
  // src/next.ts
4075
4143
  var SiteplaneNextContractError = class extends Error {
4076
4144
  constructor(code, message) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "siteplane",
3
3
  "private": false,
4
- "version": "0.1.51",
4
+ "version": "0.1.53",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "publishConfig": {