MCPcopy Create free account
hub / github.com/formkit/formkit / waitForInvalidations

Function waitForInvalidations

scripts/deploy.mjs:109–128  ·  view source on GitHub ↗
(Id)

Source from the content-addressed store, hash-verified

107}
108
109async function waitForInvalidations(Id) {
110 await new Promise((r) => setTimeout(r, 3000))
111 const {
112 Invalidation: { Status },
113 } = await cloudfront.send(
114 new GetInvalidationCommand({
115 DistributionId: distributionId,
116 Id,
117 })
118 )
119 if (Status === 'Completed') {
120 return true
121 }
122 msg.loader.start(
123 `Invalidating stale assets... (${
124 Status === 'InProgress' ? 'in progress' : Status
125 })`
126 )
127 return await waitForInvalidations(Id)
128}
129
130/**
131 * Upload an individual file to s3.

Callers 1

deployESMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected