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/index.js CHANGED
@@ -1662,6 +1662,18 @@ var fieldBridgeIdentitySchema = z17.object({
1662
1662
  fieldContractHash: canonicalFieldContractHashSchema,
1663
1663
  deploymentRevision: z17.string().trim().min(1).max(256)
1664
1664
  }).strict();
1665
+ var setupPreviewAccessSchema = z17.object({
1666
+ capability: z17.string().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{43}$/u).max(4096),
1667
+ expiresAt: z17.string().datetime()
1668
+ }).strict();
1669
+ var setupPreviewReadSchema = fieldBridgeIdentitySchema.extend({
1670
+ scope: z17.literal("setup_preview"),
1671
+ siteId: z17.string().uuid(),
1672
+ runId: z17.string().uuid(),
1673
+ bridgeSessionId: z17.string().min(1),
1674
+ expiresAt: z17.string().datetime(),
1675
+ contract: siteFieldContractV1Schema
1676
+ }).strict();
1665
1677
  var fieldBridgeBaseSchema = z17.object({
1666
1678
  version: z17.literal(BRIDGE_PROTOCOL_VERSION),
1667
1679
  type: z17.enum(FIELD_BRIDGE_MESSAGE_TYPES),
@@ -1689,7 +1701,8 @@ var fieldBridgeInitMessageSchema = fieldBridgeBaseSchema.extend({
1689
1701
  payload: z17.object({
1690
1702
  adminOrigin: z17.string().url(),
1691
1703
  customerOrigin: z17.string().url(),
1692
- renderedPath: realRenderedPathSchema
1704
+ renderedPath: realRenderedPathSchema,
1705
+ setupPreview: setupPreviewAccessSchema.optional()
1693
1706
  }).strict()
1694
1707
  });
1695
1708
  var fieldBridgeReadyMessageSchema = fieldBridgeBaseSchema.extend({
@@ -1702,7 +1715,7 @@ var fieldBridgeReadyMessageSchema = fieldBridgeBaseSchema.extend({
1702
1715
  z17.literal("preview_values"),
1703
1716
  z17.literal("field_evidence"),
1704
1717
  z17.literal("visual_field_control")
1705
- ]).rest(z17.literal("analytics_preview_readiness")).refine((capabilities) => capabilities.length <= 5)
1718
+ ]).rest(z17.enum(["analytics_preview_readiness", "setup_preview"])).refine((capabilities) => capabilities.length <= 6)
1706
1719
  }).strict()
1707
1720
  });
1708
1721
  var fieldBridgeFieldsMessageSchema = fieldBridgeBaseSchema.extend({
@@ -2045,6 +2058,47 @@ var setupInstallationRequestSchema = z26.object({
2045
2058
  }).strict()
2046
2059
  }).strict();
2047
2060
 
2061
+ // ../shared/dist/setup-claim.js
2062
+ import { z as z27 } from "zod";
2063
+ var setupClaimCodeSchema = z27.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/u);
2064
+ var setupClaimBindingSchema = z27.object({
2065
+ siteId: z27.string().uuid(),
2066
+ runId: z27.string().uuid()
2067
+ });
2068
+ var setupClaimReceiptSchema = setupClaimBindingSchema.extend({
2069
+ status: z27.literal("claimed"),
2070
+ requestId: z27.string().uuid(),
2071
+ workspaceId: z27.string().uuid(),
2072
+ userId: z27.string().uuid(),
2073
+ claimedAt: z27.string().datetime({ offset: true })
2074
+ }).strict();
2075
+ var setupClaimInspectionSchema = setupClaimBindingSchema.extend({
2076
+ status: z27.literal("pending"),
2077
+ requestId: z27.string().uuid(),
2078
+ siteName: z27.string(),
2079
+ userId: z27.string().uuid(),
2080
+ accountEmail: z27.string().email(),
2081
+ workspaceId: z27.string().uuid(),
2082
+ workspaceName: z27.string(),
2083
+ expiresAt: z27.string().datetime({ offset: true })
2084
+ }).strict();
2085
+ var setupClaimDenialSchema = z27.object({
2086
+ status: z27.enum([
2087
+ "invalid_claim_request",
2088
+ "invalid_installation",
2089
+ "already_claimed",
2090
+ "project_expired",
2091
+ "invalid_guest_session",
2092
+ "stale_setup_review",
2093
+ "verified_account_required",
2094
+ "workspace_access_denied",
2095
+ "workspace_entitlement_required",
2096
+ "site_limit_reached",
2097
+ "provisional_relationship_conflict",
2098
+ "rate_limited"
2099
+ ])
2100
+ }).strict();
2101
+
2048
2102
  // ../cli/dist/analytics/static-scan.js
2049
2103
  import ts from "typescript";
2050
2104
 
@@ -2250,16 +2304,16 @@ function createAnalyticsCliRequestHeaders(config) {
2250
2304
  }
2251
2305
 
2252
2306
  // ../cli/dist/commands/analytics/public-key.js
2253
- import { z as z27 } from "zod";
2254
- var responseSchema = z27.object({
2255
- ok: z27.literal(true),
2256
- data: z27.object({
2257
- rawPublicKey: z27.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/)
2307
+ import { z as z28 } from "zod";
2308
+ var responseSchema = z28.object({
2309
+ ok: z28.literal(true),
2310
+ data: z28.object({
2311
+ rawPublicKey: z28.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/)
2258
2312
  })
2259
2313
  });
2260
- var errorResponseSchema = z27.object({
2261
- error: z27.object({
2262
- code: z27.string().regex(/^[a-z][a-z0-9_.-]+$/u)
2314
+ var errorResponseSchema = z28.object({
2315
+ error: z28.object({
2316
+ code: z28.string().regex(/^[a-z][a-z0-9_.-]+$/u)
2263
2317
  })
2264
2318
  });
2265
2319
  async function analyticsPublicKeyCommand(input) {
@@ -2281,13 +2335,13 @@ async function analyticsPublicKeyCommand(input) {
2281
2335
  }
2282
2336
 
2283
2337
  // ../cli/dist/commands/analytics/prepare.js
2284
- import { z as z28 } from "zod";
2285
- var resultSchema = z28.object({
2286
- ok: z28.literal(true),
2287
- data: z28.object({
2288
- rawPublicKey: z28.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/u),
2289
- generation: z28.number().int().positive(),
2290
- status: z28.enum([
2338
+ import { z as z29 } from "zod";
2339
+ var resultSchema = z29.object({
2340
+ ok: z29.literal(true),
2341
+ data: z29.object({
2342
+ rawPublicKey: z29.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/u),
2343
+ generation: z29.number().int().positive(),
2344
+ status: z29.enum([
2291
2345
  "setup_started",
2292
2346
  "test_mode",
2293
2347
  "active",
@@ -2297,8 +2351,8 @@ var resultSchema = z28.object({
2297
2351
  ])
2298
2352
  }).strict()
2299
2353
  }).strict();
2300
- var errorSchema = z28.object({
2301
- error: z28.object({ code: z28.string().regex(/^[a-z][a-z0-9_.-]+$/u) })
2354
+ var errorSchema = z29.object({
2355
+ error: z29.object({ code: z29.string().regex(/^[a-z][a-z0-9_.-]+$/u) })
2302
2356
  });
2303
2357
 
2304
2358
  // ../cli/dist/commands/analytics/test.js
@@ -2493,19 +2547,19 @@ function requireContentExportScope(scopes) {
2493
2547
  import { access, chmod, open, readFile as readFile5, rename, rm } from "fs/promises";
2494
2548
  import { randomUUID as randomUUID2 } from "crypto";
2495
2549
  import { join as join3 } from "path";
2496
- import { z as z29 } from "zod";
2497
- var siteplaneProjectConfigSchema = z29.object({
2498
- version: z29.literal(2),
2499
- apiBaseUrl: z29.string().url(),
2500
- siteId: z29.string().uuid(),
2501
- publicSiteKeyId: z29.string().uuid(),
2502
- publicSiteKey: z29.string().trim().min(1),
2503
- runId: z29.string().uuid(),
2504
- appDirectory: z29.string().min(1),
2505
- taskContractVersion: z29.literal("siteplane.setup-task.v2"),
2506
- adminProtocolVersion: z29.literal(2),
2550
+ import { z as z30 } from "zod";
2551
+ var siteplaneProjectConfigSchema = z30.object({
2552
+ version: z30.literal(2),
2553
+ apiBaseUrl: z30.string().url(),
2554
+ siteId: z30.string().uuid(),
2555
+ publicSiteKeyId: z30.string().uuid(),
2556
+ publicSiteKey: z30.string().trim().min(1),
2557
+ runId: z30.string().uuid(),
2558
+ appDirectory: z30.string().min(1),
2559
+ taskContractVersion: z30.literal("siteplane.setup-task.v2"),
2560
+ adminProtocolVersion: z30.literal(2),
2507
2561
  packages: siteSetupPackagesSchema,
2508
- fieldContractHash: z29.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2562
+ fieldContractHash: z30.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2509
2563
  }).strict();
2510
2564
  async function readProjectPackageJson(projectDir) {
2511
2565
  return JSON.parse(await readFile5(join3(projectDir, "package.json"), "utf8"));
@@ -2565,26 +2619,27 @@ import { randomUUID as randomUUID3 } from "crypto";
2565
2619
  import { chmod as chmod2, lstat, mkdir as mkdir5, open as open2, readFile as readFile6, rename as rename2, rm as rm2 } from "fs/promises";
2566
2620
  import { dirname as dirname5, join as join4, relative } from "path";
2567
2621
  import { promisify } from "util";
2568
- import { z as z30 } from "zod";
2569
- var localSetupInstallationSchema = z30.object({
2570
- key: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2571
- idempotencyKey: z30.string().uuid(),
2572
- apiBaseUrl: z30.string().url(),
2622
+ import { z as z31 } from "zod";
2623
+ var localSetupInstallationSchema = z31.object({
2624
+ key: z31.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2625
+ idempotencyKey: z31.string().uuid(),
2626
+ apiBaseUrl: z31.string().url(),
2573
2627
  request: setupInstallationRequestSchema,
2574
- bootstrapAcknowledged: z30.boolean()
2628
+ bootstrapAcknowledged: z31.boolean()
2575
2629
  }).strict();
2576
- var siteplaneCredentialsSchema = z30.object({
2577
- accessToken: z30.string().trim().min(1),
2578
- siteRevalidationSecret: z30.string().trim().min(1),
2630
+ var siteplaneCredentialsSchema = z31.object({
2631
+ accessToken: z31.string().trim().min(1),
2632
+ siteRevalidationSecret: z31.string().trim().min(1),
2579
2633
  installation: localSetupInstallationSchema.optional(),
2580
- adminSession: z30.object({
2581
- secret: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2582
- generation: z30.string().uuid()
2634
+ claimReceipt: setupClaimReceiptSchema.optional(),
2635
+ adminSession: z31.object({
2636
+ secret: z31.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2637
+ generation: z31.string().uuid()
2583
2638
  }).strict().optional()
2584
2639
  }).strict();
2585
- var localSetupCredentialsSchema = z30.union([
2640
+ var localSetupCredentialsSchema = z31.union([
2586
2641
  siteplaneCredentialsSchema,
2587
- z30.object({ installation: localSetupInstallationSchema }).strict()
2642
+ z31.object({ installation: localSetupInstallationSchema }).strict()
2588
2643
  ]);
2589
2644
  async function assertLocalCredentialsPathSafe(projectDir, options = {}) {
2590
2645
  const path = join4(projectDir, ".siteplane/credentials.json");
@@ -2657,6 +2712,12 @@ async function writeCredentialsAtomically(path, credentials) {
2657
2712
  try {
2658
2713
  await rename2(temporaryPath, path);
2659
2714
  await chmod2(path, 384);
2715
+ const directory = await open2(dirname5(path), "r");
2716
+ try {
2717
+ await directory.sync();
2718
+ } finally {
2719
+ await directory.close();
2720
+ }
2660
2721
  } catch (error) {
2661
2722
  await rm2(temporaryPath, { force: true });
2662
2723
  throw error;
@@ -2676,7 +2737,7 @@ async function gitPathMatches(projectDir, path, command) {
2676
2737
  // ../cli/dist/commands/init.js
2677
2738
  import { access as access3 } from "fs/promises";
2678
2739
  import { join as join7, relative as relative3 } from "path";
2679
- import { z as z33 } from "zod";
2740
+ import { z as z34 } from "zod";
2680
2741
 
2681
2742
  // ../cli/dist/commands/setup-preflight.js
2682
2743
  import { createHash as createHash2 } from "crypto";
@@ -2688,11 +2749,11 @@ import { parse as parseYaml } from "yaml";
2688
2749
  import { createRequire } from "module";
2689
2750
  import { readFile as readFile7 } from "fs/promises";
2690
2751
  import { join as join5 } from "path";
2691
- import { z as z31 } from "zod";
2692
- var packageSchema = z31.object({
2693
- name: z31.string().optional(),
2694
- version: z31.string(),
2695
- peerDependencies: z31.record(z31.string(), z31.string()).optional()
2752
+ import { z as z32 } from "zod";
2753
+ var packageSchema = z32.object({
2754
+ name: z32.string().optional(),
2755
+ version: z32.string(),
2756
+ peerDependencies: z32.record(z32.string(), z32.string()).optional()
2696
2757
  });
2697
2758
  async function readInstalledPackage(projectDir, name2) {
2698
2759
  const require2 = createRequire(join5(projectDir, "package.json"));
@@ -2710,7 +2771,7 @@ async function readInstalledPackage(projectDir, name2) {
2710
2771
  // ../cli/dist/commands/setup-preflight.js
2711
2772
  import { access as access2, readFile as readFile8, realpath, readdir, readlink } from "fs/promises";
2712
2773
  import { dirname as dirname6, join as join6, relative as relative2, resolve, sep } from "path";
2713
- import { z as z32 } from "zod";
2774
+ import { z as z33 } from "zod";
2714
2775
 
2715
2776
  // ../cli/dist/commands/setup-process.js
2716
2777
  import { spawn } from "child_process";
@@ -2811,29 +2872,29 @@ async function setupVercelApi(cwd, endpoint, body, method, options) {
2811
2872
  }
2812
2873
 
2813
2874
  // ../cli/dist/commands/setup-preflight.js
2814
- var manifestSchema = z32.object({
2815
- packageManager: z32.string().optional(),
2816
- engines: z32.object({ node: z32.string().optional() }).optional(),
2817
- dependencies: z32.record(z32.string(), z32.string()).optional(),
2818
- devDependencies: z32.record(z32.string(), z32.string()).optional(),
2819
- scripts: z32.record(z32.string(), z32.string()).optional(),
2820
- workspaces: z32.unknown().optional()
2821
- });
2822
- var vercelProjectSchema = z32.object({
2823
- id: z32.string(),
2824
- accountId: z32.string(),
2825
- name: z32.string(),
2826
- nodeVersion: z32.string().nullable().optional(),
2827
- rootDirectory: z32.string().nullable().optional(),
2828
- framework: z32.string().nullable().optional(),
2829
- installCommand: z32.string().nullable().optional(),
2830
- buildCommand: z32.string().nullable().optional(),
2831
- link: z32.object({
2832
- type: z32.string(),
2833
- repo: z32.string().optional(),
2834
- repoId: z32.union([z32.string(), z32.number()]).optional(),
2835
- org: z32.string().optional(),
2836
- productionBranch: z32.string().optional()
2875
+ var manifestSchema = z33.object({
2876
+ packageManager: z33.string().optional(),
2877
+ engines: z33.object({ node: z33.string().optional() }).optional(),
2878
+ dependencies: z33.record(z33.string(), z33.string()).optional(),
2879
+ devDependencies: z33.record(z33.string(), z33.string()).optional(),
2880
+ scripts: z33.record(z33.string(), z33.string()).optional(),
2881
+ workspaces: z33.unknown().optional()
2882
+ });
2883
+ var vercelProjectSchema = z33.object({
2884
+ id: z33.string(),
2885
+ accountId: z33.string(),
2886
+ name: z33.string(),
2887
+ nodeVersion: z33.string().nullable().optional(),
2888
+ rootDirectory: z33.string().nullable().optional(),
2889
+ framework: z33.string().nullable().optional(),
2890
+ installCommand: z33.string().nullable().optional(),
2891
+ buildCommand: z33.string().nullable().optional(),
2892
+ link: z33.object({
2893
+ type: z33.string(),
2894
+ repo: z33.string().optional(),
2895
+ repoId: z33.union([z33.string(), z33.number()]).optional(),
2896
+ org: z33.string().optional(),
2897
+ productionBranch: z33.string().optional()
2837
2898
  }).nullable().optional()
2838
2899
  });
2839
2900
  var exists = async (path) => access2(path).then(() => true, () => false);
@@ -2890,9 +2951,9 @@ async function inspectSetupLocalProject(projectDir) {
2890
2951
  const rootManifest = manifestSchema.parse(JSON.parse(await readFile8(join6(lockfileRoot, "package.json"), "utf8")));
2891
2952
  if (lockfileRoot !== projectDirectory) {
2892
2953
  const workspaceFile = join6(lockfileRoot, "pnpm-workspace.yaml");
2893
- 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([
2894
- z32.array(z32.string()),
2895
- z32.object({ packages: z32.array(z32.string()) }).transform((value) => value.packages)
2954
+ 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([
2955
+ z33.array(z33.string()),
2956
+ z33.object({ packages: z33.array(z33.string()) }).transform((value) => value.packages)
2896
2957
  ]).parse(rootManifest.workspaces);
2897
2958
  const selected = relative2(lockfileRoot, projectDirectory).split(sep).join("/");
2898
2959
  if (!workspace.some((pattern) => !pattern.startsWith("!") && minimatch(selected, pattern)) || workspace.some((pattern) => pattern.startsWith("!") && minimatch(selected, pattern.slice(1))))
@@ -2906,11 +2967,11 @@ async function inspectSetupLocalProject(projectDir) {
2906
2967
  break;
2907
2968
  }
2908
2969
  const lockText = await readFile8(join6(lockfileRoot, lockName), "utf8");
2909
- const npmLock = lockName === "package-lock.json" ? z32.object({
2910
- lockfileVersion: z32.number(),
2911
- packages: z32.record(z32.string(), z32.object({
2912
- version: z32.string().optional(),
2913
- peerDependencies: z32.record(z32.string(), z32.string()).optional()
2970
+ const npmLock = lockName === "package-lock.json" ? z33.object({
2971
+ lockfileVersion: z33.number(),
2972
+ packages: z33.record(z33.string(), z33.object({
2973
+ version: z33.string().optional(),
2974
+ peerDependencies: z33.record(z33.string(), z33.string()).optional()
2914
2975
  })).optional()
2915
2976
  }).parse(JSON.parse(lockText)) : null;
2916
2977
  async function version2(name3) {
@@ -3050,9 +3111,9 @@ async function setupPreflightCommand(input) {
3050
3111
  linkDirectory = dirname6(linkDirectory);
3051
3112
  if (!await exists(join6(linkDirectory, ".vercel/project.json")))
3052
3113
  fail("vercel_project_not_linked", "Link this application to its intended Vercel project before setup; Siteplane will not guess a target.");
3053
- const linked = z32.object({
3054
- projectId: z32.string().regex(/^prj_[A-Za-z0-9]+$/u),
3055
- orgId: z32.string().regex(/^(?:team|user)_[A-Za-z0-9]+$/u)
3114
+ const linked = z33.object({
3115
+ projectId: z33.string().regex(/^prj_[A-Za-z0-9]+$/u),
3116
+ orgId: z33.string().regex(/^(?:team|user)_[A-Za-z0-9]+$/u)
3056
3117
  }).parse(JSON.parse(await readFile8(join6(linkDirectory, ".vercel/project.json"), "utf8")));
3057
3118
  const project = vercelProjectSchema.parse(await setupVercelApi(linkDirectory, `/v9/projects/${linked.projectId}?teamId=${linked.orgId}`));
3058
3119
  if (project.id !== linked.projectId || project.accountId !== linked.orgId)
@@ -3066,11 +3127,11 @@ async function setupPreflightCommand(input) {
3066
3127
  fail("vercel_production_branch_conflict", "The local branch differs from the bound Vercel Production branch.");
3067
3128
  if (project.link?.repo && project.link.org && !local.git.remote?.replace(/\.git$/u, "").endsWith(`${project.link.org}/${project.link.repo}`))
3068
3129
  fail("vercel_git_conflict", "The local origin repository differs from the Vercel Git connection.");
3069
- const env = z32.object({
3070
- envs: z32.array(z32.object({
3071
- key: z32.string(),
3072
- value: z32.string().optional(),
3073
- target: z32.array(z32.string()).optional()
3130
+ const env = z33.object({
3131
+ envs: z33.array(z33.object({
3132
+ key: z33.string(),
3133
+ value: z33.string().optional(),
3134
+ target: z33.array(z33.string()).optional()
3074
3135
  }))
3075
3136
  }).parse(await setupVercelApi(linkDirectory, `/v10/projects/${linked.projectId}/env?teamId=${linked.orgId}`));
3076
3137
  const corepack = env.envs.some((item) => item.key === "ENABLE_EXPERIMENTAL_COREPACK" && item.value === "1" && item.target?.includes("production"));
@@ -3160,26 +3221,26 @@ async function initCommand(input) {
3160
3221
  ]
3161
3222
  };
3162
3223
  }
3163
- var siteSetupBootstrapDataSchema = z33.object({
3164
- credentialPurpose: z33.literal("site_setup"),
3165
- apiBaseUrl: z33.string().url(),
3166
- siteId: z33.string().uuid(),
3167
- publicSiteKeyId: z33.string().uuid(),
3168
- publicSiteKey: z33.string().trim().min(1),
3169
- accessToken: z33.string().trim().min(1),
3170
- siteRevalidationSecret: z33.string().regex(/^[A-Za-z0-9_-]{43}$/u),
3171
- runId: z33.string().uuid(),
3224
+ var siteSetupBootstrapDataSchema = z34.object({
3225
+ credentialPurpose: z34.literal("site_setup"),
3226
+ apiBaseUrl: z34.string().url(),
3227
+ siteId: z34.string().uuid(),
3228
+ publicSiteKeyId: z34.string().uuid(),
3229
+ publicSiteKey: z34.string().trim().min(1),
3230
+ accessToken: z34.string().trim().min(1),
3231
+ siteRevalidationSecret: z34.string().regex(/^[A-Za-z0-9_-]{43}$/u),
3232
+ runId: z34.string().uuid(),
3172
3233
  packages: siteSetupPackagesSchema
3173
3234
  }).strict();
3174
- var featureBootstrapDataSchema = z33.object({
3175
- credentialPurpose: z33.enum(["analytics", "booking"]),
3176
- apiBaseUrl: z33.string().url(),
3177
- siteId: z33.string().uuid(),
3178
- accessToken: z33.string().trim().min(1)
3235
+ var featureBootstrapDataSchema = z34.object({
3236
+ credentialPurpose: z34.enum(["analytics", "booking"]),
3237
+ apiBaseUrl: z34.string().url(),
3238
+ siteId: z34.string().uuid(),
3239
+ accessToken: z34.string().trim().min(1)
3179
3240
  }).strict();
3180
- var bootstrapResponseSchema = z33.object({
3181
- ok: z33.literal(true),
3182
- data: z33.discriminatedUnion("credentialPurpose", [
3241
+ var bootstrapResponseSchema = z34.object({
3242
+ ok: z34.literal(true),
3243
+ data: z34.discriminatedUnion("credentialPurpose", [
3183
3244
  siteSetupBootstrapDataSchema,
3184
3245
  featureBootstrapDataSchema
3185
3246
  ])
@@ -3223,6 +3284,7 @@ async function persistSiteSetupBootstrap(input, bootstrap, appDirectory, install
3223
3284
  const previousCredentials = previous ? await access3(join7(input.projectDir, ".siteplane/credentials.json")).then(() => readLocalSetupCredentials(input.projectDir), () => null) : null;
3224
3285
  const credentialsPath = await writeLocalCredentials(input.projectDir, {
3225
3286
  ...previousCredentials && "adminSession" in previousCredentials && previousCredentials.adminSession ? { adminSession: previousCredentials.adminSession } : {},
3287
+ ...previousCredentials && "claimReceipt" in previousCredentials && previousCredentials.claimReceipt ? { claimReceipt: previousCredentials.claimReceipt } : {},
3226
3288
  accessToken: bootstrap.accessToken,
3227
3289
  siteRevalidationSecret: bootstrap.siteRevalidationSecret,
3228
3290
  ...installation ?? previousCredentials?.installation ? { installation: installation ?? previousCredentials?.installation } : {}
@@ -3338,7 +3400,7 @@ async function collectSourceFiles(directory) {
3338
3400
  import { execFile as execFile2 } from "child_process";
3339
3401
  import { readFile as readFile9 } from "fs/promises";
3340
3402
  import { promisify as promisify2 } from "util";
3341
- import { z as z34 } from "zod";
3403
+ import { z as z35 } from "zod";
3342
3404
 
3343
3405
  // ../cli/dist/scan/next-source-scan.js
3344
3406
  import ts2 from "typescript";
@@ -3348,32 +3410,32 @@ var editableComponentNames = new Set(["Image", "Text", "LongText", "Link"].map((
3348
3410
 
3349
3411
  // ../cli/dist/commands/site-setup.js
3350
3412
  var execFileAsync2 = promisify2(execFile2);
3351
- var safeErrorSchema = z34.object({
3352
- code: z34.string().trim().min(1),
3353
- message: z34.string().trim().min(1)
3413
+ var safeErrorSchema = z35.object({
3414
+ code: z35.string().trim().min(1),
3415
+ message: z35.string().trim().min(1)
3354
3416
  }).passthrough();
3355
- var errorResponseSchema2 = z34.object({ ok: z34.literal(false), error: safeErrorSchema }).passthrough();
3356
- var contextDataSchema = z34.object({
3417
+ var errorResponseSchema2 = z35.object({ ok: z35.literal(false), error: safeErrorSchema }).passthrough();
3418
+ var contextDataSchema = z35.object({
3357
3419
  task: siteSetupTaskSchema.refine((task) => task.run !== null)
3358
3420
  }).strict();
3359
- var contextResponseSchema = z34.object({ ok: z34.literal(true), data: contextDataSchema }).strict();
3360
- var applyDataSchema = z34.object({
3361
- status: z34.enum(["applied", "ready_for_review"]),
3362
- runId: z34.string().uuid().optional(),
3363
- contractVersionId: z34.string().uuid().optional(),
3364
- fieldContractHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u),
3365
- editorDefinitionHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
3366
- fieldCount: z34.number().int().nonnegative().optional(),
3367
- routeCount: z34.number().int().nonnegative().optional()
3421
+ var contextResponseSchema = z35.object({ ok: z35.literal(true), data: contextDataSchema }).strict();
3422
+ var applyDataSchema = z35.object({
3423
+ status: z35.enum(["applied", "ready_for_review"]),
3424
+ runId: z35.string().uuid().optional(),
3425
+ contractVersionId: z35.string().uuid().optional(),
3426
+ fieldContractHash: z35.string().regex(/^sha256:[0-9a-f]{64}$/u),
3427
+ editorDefinitionHash: z35.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
3428
+ fieldCount: z35.number().int().nonnegative().optional(),
3429
+ routeCount: z35.number().int().nonnegative().optional()
3368
3430
  }).strict();
3369
- var applyResponseSchema = z34.object({ ok: z34.literal(true), data: applyDataSchema }).strict();
3370
- var verifyDataSchema = z34.object({
3371
- status: z34.literal("ready_for_review"),
3372
- runId: z34.string().uuid().optional(),
3373
- deploymentOrigin: z34.string().url().optional(),
3374
- deploymentRevision: z34.string().optional()
3431
+ var applyResponseSchema = z35.object({ ok: z35.literal(true), data: applyDataSchema }).strict();
3432
+ var verifyDataSchema = z35.object({
3433
+ status: z35.literal("ready_for_review"),
3434
+ runId: z35.string().uuid().optional(),
3435
+ deploymentOrigin: z35.string().url().optional(),
3436
+ deploymentRevision: z35.string().optional()
3375
3437
  }).strict();
3376
- var verifyResponseSchema = z34.object({ ok: z34.literal(true), data: verifyDataSchema }).strict();
3438
+ var verifyResponseSchema = z35.object({ ok: z35.literal(true), data: verifyDataSchema }).strict();
3377
3439
  async function siteSetupContextCommand(input) {
3378
3440
  const response = await postSiteSetup(input, "context", {});
3379
3441
  const parsed = contextResponseSchema.safeParse(response.payload);
@@ -3470,12 +3532,22 @@ async function readGitRevision(projectDir) {
3470
3532
  import { randomBytes, randomUUID as randomUUID4 } from "crypto";
3471
3533
  import { access as access4 } from "fs/promises";
3472
3534
  import { join as join9, relative as relative5 } from "path";
3473
- import { z as z35 } from "zod";
3474
- var bootstrapResponseSchema2 = z35.object({
3475
- ok: z35.literal(true),
3535
+ import { z as z36 } from "zod";
3536
+ var bootstrapResponseSchema2 = z36.object({
3537
+ ok: z36.literal(true),
3476
3538
  data: siteSetupBootstrapDataSchema
3477
3539
  }).strict();
3478
3540
 
3541
+ // ../cli/dist/commands/setup-review.js
3542
+ import { z as z37 } from "zod";
3543
+ var responseSchema2 = z37.object({
3544
+ ok: z37.literal(true),
3545
+ data: z37.object({
3546
+ reviewUrl: z37.string().url(),
3547
+ expiresAt: z37.string().datetime({ offset: true })
3548
+ }).strict()
3549
+ }).strict();
3550
+
3479
3551
  // ../cli/dist/commands/setup-prepare.js
3480
3552
  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";
3481
3553
  import { randomUUID as randomUUID5 } from "crypto";
@@ -3486,8 +3558,8 @@ import ts3 from "typescript";
3486
3558
  import { randomUUID as randomUUID6 } from "crypto";
3487
3559
  import { lstat as lstat3, mkdir as mkdir7, open as open4, readFile as readFile11, rm as rm4, rmdir } from "fs/promises";
3488
3560
  import { resolve as resolve2 } from "path";
3489
- import { z as z36 } from "zod";
3490
- var ownerSchema = z36.object({ pid: z36.number().int().positive(), nonce: z36.string().uuid() }).strict();
3561
+ import { z as z38 } from "zod";
3562
+ var ownerSchema = z38.object({ pid: z38.number().int().positive(), nonce: z38.string().uuid() }).strict();
3491
3563
 
3492
3564
  // ../cli/dist/config/build-provenance.js
3493
3565
  import { createHash as createHash3 } from "crypto";
@@ -3495,23 +3567,23 @@ import { execFile as execFile3 } from "child_process";
3495
3567
  import { lstat as lstat4, readFile as readFile12, writeFile as writeFile5, mkdir as mkdir8 } from "fs/promises";
3496
3568
  import { dirname as dirname8, isAbsolute as isAbsolute2, join as join11, relative as relative7, resolve as resolve3, sep as sep3 } from "path";
3497
3569
  import { isDeepStrictEqual, promisify as promisify3 } from "util";
3498
- import { z as z37 } from "zod";
3570
+ import { z as z39 } from "zod";
3499
3571
  var execute = promisify3(execFile3);
3500
3572
  var name = ".siteplane/build-source.json";
3501
- var oid = z37.string().regex(/^[0-9a-f]{40}$/u);
3502
- var entrySchema = z37.object({
3503
- path: z37.string().min(1).max(4096),
3504
- mode: z37.enum(["100644", "100755", "120000"]),
3573
+ var oid = z39.string().regex(/^[0-9a-f]{40}$/u);
3574
+ var entrySchema = z39.object({
3575
+ path: z39.string().min(1).max(4096),
3576
+ mode: z39.enum(["100644", "100755", "120000"]),
3505
3577
  oid
3506
3578
  }).strict();
3507
- var schema = z37.object({
3508
- version: z37.literal(2),
3579
+ var schema = z39.object({
3580
+ version: z39.literal(2),
3509
3581
  revision: oid,
3510
- commit: z37.string().min(1).max(1048576),
3511
- entries: z37.array(entrySchema).min(1).max(1e5),
3512
- providerConfigurations: z37.array(z37.object({
3513
- path: z37.string().max(4096).regex(/(?:^|\/)vercel\.json$/u),
3514
- source: z37.string().max(1048576)
3582
+ commit: z39.string().min(1).max(1048576),
3583
+ entries: z39.array(entrySchema).min(1).max(1e5),
3584
+ providerConfigurations: z39.array(z39.object({
3585
+ path: z39.string().max(4096).regex(/(?:^|\/)vercel\.json$/u),
3586
+ source: z39.string().max(1048576)
3515
3587
  }).strict()).max(1e3)
3516
3588
  }).strict();
3517
3589
  async function writeBuildProvenance(checkout, revision) {
@@ -3560,38 +3632,38 @@ import { createHash as createHash4, randomBytes as randomBytes2, randomUUID as r
3560
3632
  import { access as access6, mkdir as mkdir9, mkdtemp, rm as rm5, writeFile as writeFile6 } from "fs/promises";
3561
3633
  import { tmpdir } from "os";
3562
3634
  import { join as join12 } from "path";
3563
- import { z as z38 } from "zod";
3564
- var envSchema = z38.object({
3565
- id: z38.string(),
3566
- key: z38.string(),
3567
- target: z38.array(z38.string()),
3568
- type: z38.string(),
3569
- comment: z38.string().optional(),
3570
- updatedAt: z38.number().optional()
3571
- });
3572
- var deploymentSchema = z38.object({
3573
- id: z38.string(),
3574
- projectId: z38.string(),
3575
- ownerId: z38.string().optional(),
3576
- target: z38.string().nullable(),
3577
- readyState: z38.string(),
3578
- createdAt: z38.number(),
3579
- url: z38.string(),
3580
- meta: z38.record(z38.string(), z38.unknown()).optional(),
3581
- gitSource: z38.object({ sha: z38.string().optional() }).nullable().optional()
3582
- });
3583
- var buildProofSchema = z38.object({
3584
- node: z38.string(),
3585
- packageManager: z38.enum(["npm", "pnpm"]),
3586
- packageManagerVersion: z38.string(),
3587
- lockfileHash: z38.string(),
3588
- revision: z38.string(),
3589
- fieldContractHash: z38.string(),
3590
- siteplane: z38.string(),
3591
- runtimeNext: z38.string(),
3592
- analytics: z38.string().optional(),
3593
- next: z38.string(),
3594
- react: z38.string()
3635
+ import { z as z40 } from "zod";
3636
+ var envSchema = z40.object({
3637
+ id: z40.string(),
3638
+ key: z40.string(),
3639
+ target: z40.array(z40.string()),
3640
+ type: z40.string(),
3641
+ comment: z40.string().optional(),
3642
+ updatedAt: z40.number().optional()
3643
+ });
3644
+ var deploymentSchema = z40.object({
3645
+ id: z40.string(),
3646
+ projectId: z40.string(),
3647
+ ownerId: z40.string().optional(),
3648
+ target: z40.string().nullable(),
3649
+ readyState: z40.string(),
3650
+ createdAt: z40.number(),
3651
+ url: z40.string(),
3652
+ meta: z40.record(z40.string(), z40.unknown()).optional(),
3653
+ gitSource: z40.object({ sha: z40.string().optional() }).nullable().optional()
3654
+ });
3655
+ var buildProofSchema = z40.object({
3656
+ node: z40.string(),
3657
+ packageManager: z40.enum(["npm", "pnpm"]),
3658
+ packageManagerVersion: z40.string(),
3659
+ lockfileHash: z40.string(),
3660
+ revision: z40.string(),
3661
+ fieldContractHash: z40.string(),
3662
+ siteplane: z40.string(),
3663
+ runtimeNext: z40.string(),
3664
+ analytics: z40.string().optional(),
3665
+ next: z40.string(),
3666
+ react: z40.string()
3595
3667
  }).strict();
3596
3668
  var defaults = {
3597
3669
  preflight: setupPreflightCommand,
@@ -3605,6 +3677,9 @@ var defaults = {
3605
3677
  now: Date.now,
3606
3678
  pause: (milliseconds) => new Promise((resolve4) => setTimeout(resolve4, milliseconds))
3607
3679
  };
3680
+
3681
+ // ../cli/dist/commands/setup-claim.js
3682
+ import { z as z41 } from "zod";
3608
3683
  export {
3609
3684
  bookingCheckCommand,
3610
3685
  bookingInitCommand,