siteplane 0.1.52 → 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
@@ -2058,6 +2058,47 @@ var setupInstallationRequestSchema = z26.object({
2058
2058
  }).strict()
2059
2059
  }).strict();
2060
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
+
2061
2102
  // ../cli/dist/analytics/static-scan.js
2062
2103
  import ts from "typescript";
2063
2104
 
@@ -2263,16 +2304,16 @@ function createAnalyticsCliRequestHeaders(config) {
2263
2304
  }
2264
2305
 
2265
2306
  // ../cli/dist/commands/analytics/public-key.js
2266
- import { z as z27 } from "zod";
2267
- var responseSchema = z27.object({
2268
- ok: z27.literal(true),
2269
- data: z27.object({
2270
- 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}$/)
2271
2312
  })
2272
2313
  });
2273
- var errorResponseSchema = z27.object({
2274
- error: z27.object({
2275
- 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)
2276
2317
  })
2277
2318
  });
2278
2319
  async function analyticsPublicKeyCommand(input) {
@@ -2294,13 +2335,13 @@ async function analyticsPublicKeyCommand(input) {
2294
2335
  }
2295
2336
 
2296
2337
  // ../cli/dist/commands/analytics/prepare.js
2297
- import { z as z28 } from "zod";
2298
- var resultSchema = z28.object({
2299
- ok: z28.literal(true),
2300
- data: z28.object({
2301
- rawPublicKey: z28.string().regex(/^pk_siteplane_[A-Za-z0-9_-]{16}_[A-Za-z0-9_-]{43}$/u),
2302
- generation: z28.number().int().positive(),
2303
- 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([
2304
2345
  "setup_started",
2305
2346
  "test_mode",
2306
2347
  "active",
@@ -2310,8 +2351,8 @@ var resultSchema = z28.object({
2310
2351
  ])
2311
2352
  }).strict()
2312
2353
  }).strict();
2313
- var errorSchema = z28.object({
2314
- 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) })
2315
2356
  });
2316
2357
 
2317
2358
  // ../cli/dist/commands/analytics/test.js
@@ -2506,19 +2547,19 @@ function requireContentExportScope(scopes) {
2506
2547
  import { access, chmod, open, readFile as readFile5, rename, rm } from "fs/promises";
2507
2548
  import { randomUUID as randomUUID2 } from "crypto";
2508
2549
  import { join as join3 } from "path";
2509
- import { z as z29 } from "zod";
2510
- var siteplaneProjectConfigSchema = z29.object({
2511
- version: z29.literal(2),
2512
- apiBaseUrl: z29.string().url(),
2513
- siteId: z29.string().uuid(),
2514
- publicSiteKeyId: z29.string().uuid(),
2515
- publicSiteKey: z29.string().trim().min(1),
2516
- runId: z29.string().uuid(),
2517
- appDirectory: z29.string().min(1),
2518
- taskContractVersion: z29.literal("siteplane.setup-task.v2"),
2519
- 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),
2520
2561
  packages: siteSetupPackagesSchema,
2521
- fieldContractHash: z29.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2562
+ fieldContractHash: z30.string().regex(/^sha256:[0-9a-f]{64}$/iu).optional()
2522
2563
  }).strict();
2523
2564
  async function readProjectPackageJson(projectDir) {
2524
2565
  return JSON.parse(await readFile5(join3(projectDir, "package.json"), "utf8"));
@@ -2578,26 +2619,27 @@ import { randomUUID as randomUUID3 } from "crypto";
2578
2619
  import { chmod as chmod2, lstat, mkdir as mkdir5, open as open2, readFile as readFile6, rename as rename2, rm as rm2 } from "fs/promises";
2579
2620
  import { dirname as dirname5, join as join4, relative } from "path";
2580
2621
  import { promisify } from "util";
2581
- import { z as z30 } from "zod";
2582
- var localSetupInstallationSchema = z30.object({
2583
- key: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2584
- idempotencyKey: z30.string().uuid(),
2585
- 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(),
2586
2627
  request: setupInstallationRequestSchema,
2587
- bootstrapAcknowledged: z30.boolean()
2628
+ bootstrapAcknowledged: z31.boolean()
2588
2629
  }).strict();
2589
- var siteplaneCredentialsSchema = z30.object({
2590
- accessToken: z30.string().trim().min(1),
2591
- 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),
2592
2633
  installation: localSetupInstallationSchema.optional(),
2593
- adminSession: z30.object({
2594
- secret: z30.string().regex(/^[A-Za-z0-9_-]{43}$/u),
2595
- 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()
2596
2638
  }).strict().optional()
2597
2639
  }).strict();
2598
- var localSetupCredentialsSchema = z30.union([
2640
+ var localSetupCredentialsSchema = z31.union([
2599
2641
  siteplaneCredentialsSchema,
2600
- z30.object({ installation: localSetupInstallationSchema }).strict()
2642
+ z31.object({ installation: localSetupInstallationSchema }).strict()
2601
2643
  ]);
2602
2644
  async function assertLocalCredentialsPathSafe(projectDir, options = {}) {
2603
2645
  const path = join4(projectDir, ".siteplane/credentials.json");
@@ -2670,6 +2712,12 @@ async function writeCredentialsAtomically(path, credentials) {
2670
2712
  try {
2671
2713
  await rename2(temporaryPath, path);
2672
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
+ }
2673
2721
  } catch (error) {
2674
2722
  await rm2(temporaryPath, { force: true });
2675
2723
  throw error;
@@ -2689,7 +2737,7 @@ async function gitPathMatches(projectDir, path, command) {
2689
2737
  // ../cli/dist/commands/init.js
2690
2738
  import { access as access3 } from "fs/promises";
2691
2739
  import { join as join7, relative as relative3 } from "path";
2692
- import { z as z33 } from "zod";
2740
+ import { z as z34 } from "zod";
2693
2741
 
2694
2742
  // ../cli/dist/commands/setup-preflight.js
2695
2743
  import { createHash as createHash2 } from "crypto";
@@ -2701,11 +2749,11 @@ import { parse as parseYaml } from "yaml";
2701
2749
  import { createRequire } from "module";
2702
2750
  import { readFile as readFile7 } from "fs/promises";
2703
2751
  import { join as join5 } from "path";
2704
- import { z as z31 } from "zod";
2705
- var packageSchema = z31.object({
2706
- name: z31.string().optional(),
2707
- version: z31.string(),
2708
- 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()
2709
2757
  });
2710
2758
  async function readInstalledPackage(projectDir, name2) {
2711
2759
  const require2 = createRequire(join5(projectDir, "package.json"));
@@ -2723,7 +2771,7 @@ async function readInstalledPackage(projectDir, name2) {
2723
2771
  // ../cli/dist/commands/setup-preflight.js
2724
2772
  import { access as access2, readFile as readFile8, realpath, readdir, readlink } from "fs/promises";
2725
2773
  import { dirname as dirname6, join as join6, relative as relative2, resolve, sep } from "path";
2726
- import { z as z32 } from "zod";
2774
+ import { z as z33 } from "zod";
2727
2775
 
2728
2776
  // ../cli/dist/commands/setup-process.js
2729
2777
  import { spawn } from "child_process";
@@ -2824,29 +2872,29 @@ async function setupVercelApi(cwd, endpoint, body, method, options) {
2824
2872
  }
2825
2873
 
2826
2874
  // ../cli/dist/commands/setup-preflight.js
2827
- var manifestSchema = z32.object({
2828
- packageManager: z32.string().optional(),
2829
- engines: z32.object({ node: z32.string().optional() }).optional(),
2830
- dependencies: z32.record(z32.string(), z32.string()).optional(),
2831
- devDependencies: z32.record(z32.string(), z32.string()).optional(),
2832
- scripts: z32.record(z32.string(), z32.string()).optional(),
2833
- workspaces: z32.unknown().optional()
2834
- });
2835
- var vercelProjectSchema = z32.object({
2836
- id: z32.string(),
2837
- accountId: z32.string(),
2838
- name: z32.string(),
2839
- nodeVersion: z32.string().nullable().optional(),
2840
- rootDirectory: z32.string().nullable().optional(),
2841
- framework: z32.string().nullable().optional(),
2842
- installCommand: z32.string().nullable().optional(),
2843
- buildCommand: z32.string().nullable().optional(),
2844
- link: z32.object({
2845
- type: z32.string(),
2846
- repo: z32.string().optional(),
2847
- repoId: z32.union([z32.string(), z32.number()]).optional(),
2848
- org: z32.string().optional(),
2849
- 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()
2850
2898
  }).nullable().optional()
2851
2899
  });
2852
2900
  var exists = async (path) => access2(path).then(() => true, () => false);
@@ -2903,9 +2951,9 @@ async function inspectSetupLocalProject(projectDir) {
2903
2951
  const rootManifest = manifestSchema.parse(JSON.parse(await readFile8(join6(lockfileRoot, "package.json"), "utf8")));
2904
2952
  if (lockfileRoot !== projectDirectory) {
2905
2953
  const workspaceFile = join6(lockfileRoot, "pnpm-workspace.yaml");
2906
- 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([
2907
- z32.array(z32.string()),
2908
- 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)
2909
2957
  ]).parse(rootManifest.workspaces);
2910
2958
  const selected = relative2(lockfileRoot, projectDirectory).split(sep).join("/");
2911
2959
  if (!workspace.some((pattern) => !pattern.startsWith("!") && minimatch(selected, pattern)) || workspace.some((pattern) => pattern.startsWith("!") && minimatch(selected, pattern.slice(1))))
@@ -2919,11 +2967,11 @@ async function inspectSetupLocalProject(projectDir) {
2919
2967
  break;
2920
2968
  }
2921
2969
  const lockText = await readFile8(join6(lockfileRoot, lockName), "utf8");
2922
- const npmLock = lockName === "package-lock.json" ? z32.object({
2923
- lockfileVersion: z32.number(),
2924
- packages: z32.record(z32.string(), z32.object({
2925
- version: z32.string().optional(),
2926
- 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()
2927
2975
  })).optional()
2928
2976
  }).parse(JSON.parse(lockText)) : null;
2929
2977
  async function version2(name3) {
@@ -3063,9 +3111,9 @@ async function setupPreflightCommand(input) {
3063
3111
  linkDirectory = dirname6(linkDirectory);
3064
3112
  if (!await exists(join6(linkDirectory, ".vercel/project.json")))
3065
3113
  fail("vercel_project_not_linked", "Link this application to its intended Vercel project before setup; Siteplane will not guess a target.");
3066
- const linked = z32.object({
3067
- projectId: z32.string().regex(/^prj_[A-Za-z0-9]+$/u),
3068
- 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)
3069
3117
  }).parse(JSON.parse(await readFile8(join6(linkDirectory, ".vercel/project.json"), "utf8")));
3070
3118
  const project = vercelProjectSchema.parse(await setupVercelApi(linkDirectory, `/v9/projects/${linked.projectId}?teamId=${linked.orgId}`));
3071
3119
  if (project.id !== linked.projectId || project.accountId !== linked.orgId)
@@ -3079,11 +3127,11 @@ async function setupPreflightCommand(input) {
3079
3127
  fail("vercel_production_branch_conflict", "The local branch differs from the bound Vercel Production branch.");
3080
3128
  if (project.link?.repo && project.link.org && !local.git.remote?.replace(/\.git$/u, "").endsWith(`${project.link.org}/${project.link.repo}`))
3081
3129
  fail("vercel_git_conflict", "The local origin repository differs from the Vercel Git connection.");
3082
- const env = z32.object({
3083
- envs: z32.array(z32.object({
3084
- key: z32.string(),
3085
- value: z32.string().optional(),
3086
- 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()
3087
3135
  }))
3088
3136
  }).parse(await setupVercelApi(linkDirectory, `/v10/projects/${linked.projectId}/env?teamId=${linked.orgId}`));
3089
3137
  const corepack = env.envs.some((item) => item.key === "ENABLE_EXPERIMENTAL_COREPACK" && item.value === "1" && item.target?.includes("production"));
@@ -3173,26 +3221,26 @@ async function initCommand(input) {
3173
3221
  ]
3174
3222
  };
3175
3223
  }
3176
- var siteSetupBootstrapDataSchema = z33.object({
3177
- credentialPurpose: z33.literal("site_setup"),
3178
- apiBaseUrl: z33.string().url(),
3179
- siteId: z33.string().uuid(),
3180
- publicSiteKeyId: z33.string().uuid(),
3181
- publicSiteKey: z33.string().trim().min(1),
3182
- accessToken: z33.string().trim().min(1),
3183
- siteRevalidationSecret: z33.string().regex(/^[A-Za-z0-9_-]{43}$/u),
3184
- 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(),
3185
3233
  packages: siteSetupPackagesSchema
3186
3234
  }).strict();
3187
- var featureBootstrapDataSchema = z33.object({
3188
- credentialPurpose: z33.enum(["analytics", "booking"]),
3189
- apiBaseUrl: z33.string().url(),
3190
- siteId: z33.string().uuid(),
3191
- 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)
3192
3240
  }).strict();
3193
- var bootstrapResponseSchema = z33.object({
3194
- ok: z33.literal(true),
3195
- data: z33.discriminatedUnion("credentialPurpose", [
3241
+ var bootstrapResponseSchema = z34.object({
3242
+ ok: z34.literal(true),
3243
+ data: z34.discriminatedUnion("credentialPurpose", [
3196
3244
  siteSetupBootstrapDataSchema,
3197
3245
  featureBootstrapDataSchema
3198
3246
  ])
@@ -3236,6 +3284,7 @@ async function persistSiteSetupBootstrap(input, bootstrap, appDirectory, install
3236
3284
  const previousCredentials = previous ? await access3(join7(input.projectDir, ".siteplane/credentials.json")).then(() => readLocalSetupCredentials(input.projectDir), () => null) : null;
3237
3285
  const credentialsPath = await writeLocalCredentials(input.projectDir, {
3238
3286
  ...previousCredentials && "adminSession" in previousCredentials && previousCredentials.adminSession ? { adminSession: previousCredentials.adminSession } : {},
3287
+ ...previousCredentials && "claimReceipt" in previousCredentials && previousCredentials.claimReceipt ? { claimReceipt: previousCredentials.claimReceipt } : {},
3239
3288
  accessToken: bootstrap.accessToken,
3240
3289
  siteRevalidationSecret: bootstrap.siteRevalidationSecret,
3241
3290
  ...installation ?? previousCredentials?.installation ? { installation: installation ?? previousCredentials?.installation } : {}
@@ -3351,7 +3400,7 @@ async function collectSourceFiles(directory) {
3351
3400
  import { execFile as execFile2 } from "child_process";
3352
3401
  import { readFile as readFile9 } from "fs/promises";
3353
3402
  import { promisify as promisify2 } from "util";
3354
- import { z as z34 } from "zod";
3403
+ import { z as z35 } from "zod";
3355
3404
 
3356
3405
  // ../cli/dist/scan/next-source-scan.js
3357
3406
  import ts2 from "typescript";
@@ -3361,32 +3410,32 @@ var editableComponentNames = new Set(["Image", "Text", "LongText", "Link"].map((
3361
3410
 
3362
3411
  // ../cli/dist/commands/site-setup.js
3363
3412
  var execFileAsync2 = promisify2(execFile2);
3364
- var safeErrorSchema = z34.object({
3365
- code: z34.string().trim().min(1),
3366
- 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)
3367
3416
  }).passthrough();
3368
- var errorResponseSchema2 = z34.object({ ok: z34.literal(false), error: safeErrorSchema }).passthrough();
3369
- var contextDataSchema = z34.object({
3417
+ var errorResponseSchema2 = z35.object({ ok: z35.literal(false), error: safeErrorSchema }).passthrough();
3418
+ var contextDataSchema = z35.object({
3370
3419
  task: siteSetupTaskSchema.refine((task) => task.run !== null)
3371
3420
  }).strict();
3372
- var contextResponseSchema = z34.object({ ok: z34.literal(true), data: contextDataSchema }).strict();
3373
- var applyDataSchema = z34.object({
3374
- status: z34.enum(["applied", "ready_for_review"]),
3375
- runId: z34.string().uuid().optional(),
3376
- contractVersionId: z34.string().uuid().optional(),
3377
- fieldContractHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u),
3378
- editorDefinitionHash: z34.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
3379
- fieldCount: z34.number().int().nonnegative().optional(),
3380
- 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()
3381
3430
  }).strict();
3382
- var applyResponseSchema = z34.object({ ok: z34.literal(true), data: applyDataSchema }).strict();
3383
- var verifyDataSchema = z34.object({
3384
- status: z34.literal("ready_for_review"),
3385
- runId: z34.string().uuid().optional(),
3386
- deploymentOrigin: z34.string().url().optional(),
3387
- 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()
3388
3437
  }).strict();
3389
- var verifyResponseSchema = z34.object({ ok: z34.literal(true), data: verifyDataSchema }).strict();
3438
+ var verifyResponseSchema = z35.object({ ok: z35.literal(true), data: verifyDataSchema }).strict();
3390
3439
  async function siteSetupContextCommand(input) {
3391
3440
  const response = await postSiteSetup(input, "context", {});
3392
3441
  const parsed = contextResponseSchema.safeParse(response.payload);
@@ -3483,19 +3532,19 @@ async function readGitRevision(projectDir) {
3483
3532
  import { randomBytes, randomUUID as randomUUID4 } from "crypto";
3484
3533
  import { access as access4 } from "fs/promises";
3485
3534
  import { join as join9, relative as relative5 } from "path";
3486
- import { z as z35 } from "zod";
3487
- var bootstrapResponseSchema2 = z35.object({
3488
- ok: z35.literal(true),
3535
+ import { z as z36 } from "zod";
3536
+ var bootstrapResponseSchema2 = z36.object({
3537
+ ok: z36.literal(true),
3489
3538
  data: siteSetupBootstrapDataSchema
3490
3539
  }).strict();
3491
3540
 
3492
3541
  // ../cli/dist/commands/setup-review.js
3493
- import { z as z36 } from "zod";
3494
- var responseSchema2 = z36.object({
3495
- ok: z36.literal(true),
3496
- data: z36.object({
3497
- reviewUrl: z36.string().url(),
3498
- expiresAt: z36.string().datetime({ offset: true })
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 })
3499
3548
  }).strict()
3500
3549
  }).strict();
3501
3550
 
@@ -3509,8 +3558,8 @@ import ts3 from "typescript";
3509
3558
  import { randomUUID as randomUUID6 } from "crypto";
3510
3559
  import { lstat as lstat3, mkdir as mkdir7, open as open4, readFile as readFile11, rm as rm4, rmdir } from "fs/promises";
3511
3560
  import { resolve as resolve2 } from "path";
3512
- import { z as z37 } from "zod";
3513
- var ownerSchema = z37.object({ pid: z37.number().int().positive(), nonce: z37.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();
3514
3563
 
3515
3564
  // ../cli/dist/config/build-provenance.js
3516
3565
  import { createHash as createHash3 } from "crypto";
@@ -3518,23 +3567,23 @@ import { execFile as execFile3 } from "child_process";
3518
3567
  import { lstat as lstat4, readFile as readFile12, writeFile as writeFile5, mkdir as mkdir8 } from "fs/promises";
3519
3568
  import { dirname as dirname8, isAbsolute as isAbsolute2, join as join11, relative as relative7, resolve as resolve3, sep as sep3 } from "path";
3520
3569
  import { isDeepStrictEqual, promisify as promisify3 } from "util";
3521
- import { z as z38 } from "zod";
3570
+ import { z as z39 } from "zod";
3522
3571
  var execute = promisify3(execFile3);
3523
3572
  var name = ".siteplane/build-source.json";
3524
- var oid = z38.string().regex(/^[0-9a-f]{40}$/u);
3525
- var entrySchema = z38.object({
3526
- path: z38.string().min(1).max(4096),
3527
- mode: z38.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"]),
3528
3577
  oid
3529
3578
  }).strict();
3530
- var schema = z38.object({
3531
- version: z38.literal(2),
3579
+ var schema = z39.object({
3580
+ version: z39.literal(2),
3532
3581
  revision: oid,
3533
- commit: z38.string().min(1).max(1048576),
3534
- entries: z38.array(entrySchema).min(1).max(1e5),
3535
- providerConfigurations: z38.array(z38.object({
3536
- path: z38.string().max(4096).regex(/(?:^|\/)vercel\.json$/u),
3537
- source: z38.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)
3538
3587
  }).strict()).max(1e3)
3539
3588
  }).strict();
3540
3589
  async function writeBuildProvenance(checkout, revision) {
@@ -3583,38 +3632,38 @@ import { createHash as createHash4, randomBytes as randomBytes2, randomUUID as r
3583
3632
  import { access as access6, mkdir as mkdir9, mkdtemp, rm as rm5, writeFile as writeFile6 } from "fs/promises";
3584
3633
  import { tmpdir } from "os";
3585
3634
  import { join as join12 } from "path";
3586
- import { z as z39 } from "zod";
3587
- var envSchema = z39.object({
3588
- id: z39.string(),
3589
- key: z39.string(),
3590
- target: z39.array(z39.string()),
3591
- type: z39.string(),
3592
- comment: z39.string().optional(),
3593
- updatedAt: z39.number().optional()
3594
- });
3595
- var deploymentSchema = z39.object({
3596
- id: z39.string(),
3597
- projectId: z39.string(),
3598
- ownerId: z39.string().optional(),
3599
- target: z39.string().nullable(),
3600
- readyState: z39.string(),
3601
- createdAt: z39.number(),
3602
- url: z39.string(),
3603
- meta: z39.record(z39.string(), z39.unknown()).optional(),
3604
- gitSource: z39.object({ sha: z39.string().optional() }).nullable().optional()
3605
- });
3606
- var buildProofSchema = z39.object({
3607
- node: z39.string(),
3608
- packageManager: z39.enum(["npm", "pnpm"]),
3609
- packageManagerVersion: z39.string(),
3610
- lockfileHash: z39.string(),
3611
- revision: z39.string(),
3612
- fieldContractHash: z39.string(),
3613
- siteplane: z39.string(),
3614
- runtimeNext: z39.string(),
3615
- analytics: z39.string().optional(),
3616
- next: z39.string(),
3617
- react: z39.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()
3618
3667
  }).strict();
3619
3668
  var defaults = {
3620
3669
  preflight: setupPreflightCommand,
@@ -3628,6 +3677,9 @@ var defaults = {
3628
3677
  now: Date.now,
3629
3678
  pause: (milliseconds) => new Promise((resolve4) => setTimeout(resolve4, milliseconds))
3630
3679
  };
3680
+
3681
+ // ../cli/dist/commands/setup-claim.js
3682
+ import { z as z41 } from "zod";
3631
3683
  export {
3632
3684
  bookingCheckCommand,
3633
3685
  bookingInitCommand,