MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / runSitesCreate

Function runSitesCreate

packages/cli/src/commands/lambda/sites.ts:33–64  ·  view source on GitHub ↗
(args: SitesCreateArgs)

Source from the content-addressed store, hash-verified

31}
32
33export async function runSitesCreate(args: SitesCreateArgs): Promise<void> {
34 const stack = requireStack(args.stackName);
35 const projectDir = resolvePath(args.projectDir);
36
37 const { deploySite } = await loadSDK();
38 const handle = await deploySite({
39 projectDir,
40 bucketName: stack.bucketName,
41 region: stack.region,
42 siteId: args.siteId,
43 });
44
45 if (args.json) {
46 console.log(JSON.stringify(handle, null, 2));
47 return;
48 }
49
50 console.log(
51 c.success(handle.uploaded ? "Site uploaded." : "Site already up to date (skipped upload)."),
52 );
53 console.log(` ${c.dim("Site ID:")} ${handle.siteId}`);
54 console.log(` ${c.dim("S3 URI:")} ${handle.projectS3Uri}`);
55 console.log(` ${c.dim("Bytes:")} ${handle.bytes}`);
56 console.log(` ${c.dim("Uploaded at:")} ${handle.uploadedAt}`);
57 console.log();
58 console.log(
59 c.dim(
60 `Render with: hyperframes lambda render ${args.projectDir} --site-id=${handle.siteId}` +
61 (args.stackName === DEFAULT_STACK_NAME ? "" : ` --stack-name=${args.stackName}`),
62 ),
63 );
64}

Callers 1

runFunction · 0.85

Calls 3

requireStackFunction · 0.85
loadSDKFunction · 0.70
deploySiteFunction · 0.50

Tested by

no test coverage detected