@slicemachine/manager 0.15.3-dev-next-release.1 → 0.15.3-dev-next-release.3
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/auth/PrismicAuthManager.cjs +8 -3
- package/dist/auth/PrismicAuthManager.cjs.map +1 -1
- package/dist/auth/PrismicAuthManager.js +8 -3
- package/dist/auth/PrismicAuthManager.js.map +1 -1
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs +4 -1
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs.map +1 -1
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js +4 -1
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js.map +1 -1
- package/dist/lib/installDependencies.cjs +6 -1
- package/dist/lib/installDependencies.cjs.map +1 -1
- package/dist/lib/installDependencies.js +6 -1
- package/dist/lib/installDependencies.js.map +1 -1
- package/dist/managers/createSliceMachineManagerMiddleware.cjs +1 -2
- package/dist/managers/createSliceMachineManagerMiddleware.cjs.map +1 -1
- package/dist/managers/createSliceMachineManagerMiddleware.js +1 -2
- package/dist/managers/createSliceMachineManagerMiddleware.js.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.cjs +3 -1
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.js +3 -1
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs +6 -3
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs.map +1 -1
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js +6 -3
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js.map +1 -1
- package/dist/managers/project/ProjectManager.cjs +3 -1
- package/dist/managers/project/ProjectManager.cjs.map +1 -1
- package/dist/managers/project/ProjectManager.js +3 -1
- package/dist/managers/project/ProjectManager.js.map +1 -1
- package/dist/managers/screenshots/ScreenshotsManager.cjs +17 -71
- package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -1
- package/dist/managers/screenshots/ScreenshotsManager.d.ts +0 -14
- package/dist/managers/screenshots/ScreenshotsManager.js +17 -71
- package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -1
- package/dist/managers/telemetry/types.cjs.map +1 -1
- package/dist/managers/telemetry/types.d.ts +2 -2
- package/dist/managers/telemetry/types.js.map +1 -1
- package/package.json +3 -3
- package/src/auth/PrismicAuthManager.ts +8 -2
- package/src/lib/fetchGitHubReleaseBodyForRelease.ts +4 -1
- package/src/lib/installDependencies.ts +6 -0
- package/src/managers/createSliceMachineManagerMiddleware.ts +0 -1
- package/src/managers/customTypes/CustomTypesManager.ts +3 -0
- package/src/managers/prismicRepository/PrismicRepositoryManager.ts +6 -3
- package/src/managers/project/ProjectManager.ts +3 -1
- package/src/managers/screenshots/ScreenshotsManager.ts +17 -165
- package/src/managers/telemetry/types.ts +2 -2
- package/dist/lib/checkIsURLAccessible.cjs +0 -9
- package/dist/lib/checkIsURLAccessible.cjs.map +0 -1
- package/dist/lib/checkIsURLAccessible.js +0 -9
- package/dist/lib/checkIsURLAccessible.js.map +0 -1
|
@@ -45,7 +45,10 @@ const fetchAllGitHubReleases = async (
|
|
|
45
45
|
|
|
46
46
|
return value;
|
|
47
47
|
} else {
|
|
48
|
-
|
|
48
|
+
const text = await res.text();
|
|
49
|
+
throw new Error(`Invalid GitHub Release response.`, {
|
|
50
|
+
cause: text,
|
|
51
|
+
});
|
|
49
52
|
}
|
|
50
53
|
};
|
|
51
54
|
|
|
@@ -45,6 +45,12 @@ export const installDependencies = async (
|
|
|
45
45
|
if (!command) {
|
|
46
46
|
throw new Error(
|
|
47
47
|
"Failed to begin dependency installation (could not parse command)",
|
|
48
|
+
{
|
|
49
|
+
cause: {
|
|
50
|
+
packageManager: args.packageManager,
|
|
51
|
+
dependencies: args.dependencies,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
48
54
|
);
|
|
49
55
|
}
|
|
50
56
|
|
|
@@ -40,7 +40,6 @@ const omitProcedures = defineOmits<SliceMachineManager>()([
|
|
|
40
40
|
"sliceTemplateLibrary._sliceMachineManager",
|
|
41
41
|
"getSliceMachinePluginRunner",
|
|
42
42
|
"getPrismicAuthManager",
|
|
43
|
-
"screenshots.browserContext",
|
|
44
43
|
]);
|
|
45
44
|
|
|
46
45
|
export type SliceMachineManagerMiddleware = RPCMiddleware<
|
|
@@ -252,6 +252,9 @@ export class CustomTypesManager extends BaseManager {
|
|
|
252
252
|
} else if (error instanceof prismicCustomTypesClient.ForbiddenError) {
|
|
253
253
|
throw new UnauthorizedError(
|
|
254
254
|
"You do not have access to push types to this Prismic repository.",
|
|
255
|
+
{
|
|
256
|
+
cause: error,
|
|
257
|
+
},
|
|
255
258
|
);
|
|
256
259
|
} else {
|
|
257
260
|
throw error;
|
|
@@ -65,9 +65,9 @@ export class PrismicRepositoryManager extends BaseManager {
|
|
|
65
65
|
async readAll(): Promise<PrismicRepository[]> {
|
|
66
66
|
const url = new URL("./repositories", API_ENDPOINTS.PrismicUser);
|
|
67
67
|
const res = await this._fetch({ url });
|
|
68
|
-
const json = await res.json();
|
|
69
68
|
|
|
70
69
|
if (res.ok) {
|
|
70
|
+
const json = await res.json();
|
|
71
71
|
const { value: repositories, error } = decode(
|
|
72
72
|
t.array(PrismicRepository),
|
|
73
73
|
json,
|
|
@@ -81,7 +81,8 @@ export class PrismicRepositoryManager extends BaseManager {
|
|
|
81
81
|
|
|
82
82
|
return repositories;
|
|
83
83
|
} else {
|
|
84
|
-
|
|
84
|
+
const text = await res.text();
|
|
85
|
+
throw new Error(`Failed to read repositories`, { cause: text });
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
|
|
@@ -413,7 +414,9 @@ export class PrismicRepositoryManager extends BaseManager {
|
|
|
413
414
|
const text = await response.text();
|
|
414
415
|
throw new Error(text);
|
|
415
416
|
default:
|
|
416
|
-
throw new Error(`Unexpected status code ${response.status}
|
|
417
|
+
throw new Error(`Unexpected status code ${response.status}`, {
|
|
418
|
+
cause: await response.text(),
|
|
419
|
+
});
|
|
417
420
|
}
|
|
418
421
|
} catch (err) {
|
|
419
422
|
console.error("An error happened while pushing your changes");
|
|
@@ -173,7 +173,9 @@ export class ProjectManager extends BaseManager {
|
|
|
173
173
|
|
|
174
174
|
if (error) {
|
|
175
175
|
// TODO: Write a more friendly and useful message.
|
|
176
|
-
throw new Error(`Invalid config. ${error.errors.join(", ")}
|
|
176
|
+
throw new Error(`Invalid config. ${error.errors.join(", ")}`, {
|
|
177
|
+
cause: { rawConfig },
|
|
178
|
+
});
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
// Allow cached config reading using `SliceMachineManager.prototype.getProjectConfig()`.
|
|
@@ -3,7 +3,6 @@ import { fileTypeFromBuffer } from "file-type";
|
|
|
3
3
|
import pLimit from "p-limit";
|
|
4
4
|
import fetch, { FormData, Blob, Response } from "../../lib/fetch";
|
|
5
5
|
|
|
6
|
-
import { checkIsURLAccessible } from "../../lib/checkIsURLAccessible";
|
|
7
6
|
import { createContentDigest } from "../../lib/createContentDigest";
|
|
8
7
|
import { decode } from "../../lib/decode";
|
|
9
8
|
|
|
@@ -13,21 +12,6 @@ import { API_ENDPOINTS } from "../../constants/API_ENDPOINTS";
|
|
|
13
12
|
|
|
14
13
|
import { BaseManager } from "../BaseManager";
|
|
15
14
|
|
|
16
|
-
const SLICE_SIMULATOR_WAIT_FOR_SELECTOR = "#__iframe-ready";
|
|
17
|
-
const SLICE_SIMULATOR_WAIT_FOR_SELECTOR_TIMEOUT = 10_000; // ms
|
|
18
|
-
const SLICE_SIMULATOR_SCREENSHOT_SELECTOR = "#__iframe-renderer";
|
|
19
|
-
|
|
20
|
-
// TODO(DT-1534): Use Puppeteer types if we want reactive Puppeteer screenshots
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
type Viewport = any;
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
type BrowserContext = any;
|
|
25
|
-
|
|
26
|
-
const DEFAULT_SCREENSHOT_VIEWPORT: Viewport = {
|
|
27
|
-
width: 1200,
|
|
28
|
-
height: 800,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
15
|
function assertS3ACLInitialized(
|
|
32
16
|
s3ACL: S3ACL | undefined,
|
|
33
17
|
): asserts s3ACL is NonNullable<typeof s3ACL> {
|
|
@@ -38,48 +22,8 @@ function assertS3ACLInitialized(
|
|
|
38
22
|
}
|
|
39
23
|
}
|
|
40
24
|
|
|
41
|
-
function assertBrowserContextInitialized(
|
|
42
|
-
browserContext: BrowserContext | undefined,
|
|
43
|
-
): asserts browserContext is NonNullable<typeof browserContext> {
|
|
44
|
-
if (browserContext == undefined) {
|
|
45
|
-
throw new Error(
|
|
46
|
-
"A browser context has not been initialized. Run `SliceMachineManager.screenshots.prototype.initBrowserContext()` before re-calling this method.",
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
25
|
const uploadScreenshotLimit = pLimit(10);
|
|
52
26
|
|
|
53
|
-
/**
|
|
54
|
-
* Encodes a part of a Slice Simulator URL to ensure it can be added to a URL
|
|
55
|
-
* safely.
|
|
56
|
-
*
|
|
57
|
-
* The encoding logic must match Slice Machine UI's URL encoding practices.
|
|
58
|
-
* Today, that requires the following:
|
|
59
|
-
*
|
|
60
|
-
* - Replace "/" with "--" (e.g. a Slice Library ID of "./slices" should turn into
|
|
61
|
-
* ".--slices")
|
|
62
|
-
*
|
|
63
|
-
* @param urlPart - A part of the URL.
|
|
64
|
-
*
|
|
65
|
-
* @returns `urlPart` encoded for use in a URL.
|
|
66
|
-
*/
|
|
67
|
-
const encodeSliceSimulatorURLPart = (urlPart: string): string => {
|
|
68
|
-
return urlPart.replace(/\//g, "--");
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
type ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs = {
|
|
72
|
-
sliceMachineUIOrigin: string;
|
|
73
|
-
libraryID: string;
|
|
74
|
-
sliceID: string;
|
|
75
|
-
variationID: string;
|
|
76
|
-
viewport?: Viewport;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
type ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType = {
|
|
80
|
-
data: Buffer;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
27
|
type ScreenshotsManagerUploadScreenshotArgs = {
|
|
84
28
|
data: Buffer;
|
|
85
29
|
keyPrefix?: string;
|
|
@@ -94,35 +38,8 @@ type ScreenshotsManagerDeleteScreenshotFolderArgs = {
|
|
|
94
38
|
};
|
|
95
39
|
|
|
96
40
|
export class ScreenshotsManager extends BaseManager {
|
|
97
|
-
private _browserContext: BrowserContext | undefined;
|
|
98
41
|
private _s3ACL: S3ACL | undefined;
|
|
99
42
|
|
|
100
|
-
async initBrowserContext(): Promise<void> {
|
|
101
|
-
// TODO(DT-1534): Uncomment to enable Puppeteer screenshots or delete if we decide to remove Puppeteer
|
|
102
|
-
//
|
|
103
|
-
// if (this._browserContext) {
|
|
104
|
-
// return;
|
|
105
|
-
// }
|
|
106
|
-
//
|
|
107
|
-
// let puppeteer: typeof import("puppeteer");
|
|
108
|
-
// try {
|
|
109
|
-
// // Lazy-load Puppeteer only once it is needed.
|
|
110
|
-
// puppeteer = await import("puppeteer");
|
|
111
|
-
// } catch {
|
|
112
|
-
// throw new InternalError(
|
|
113
|
-
// "Screenshots require Puppeteer but Puppeteer was not found. Check that the `puppeteer` package is installed before trying again.",
|
|
114
|
-
// );
|
|
115
|
-
// }
|
|
116
|
-
// try {
|
|
117
|
-
// const browser = await puppeteer.launch({ headless: "new" });
|
|
118
|
-
// this._browserContext = await browser.createIncognitoBrowserContext();
|
|
119
|
-
// } catch (error) {
|
|
120
|
-
// throw new InternalError(
|
|
121
|
-
// "Error launching browser. If you're using an Apple Silicon Mac, check if Rosetta is installed.",
|
|
122
|
-
// );
|
|
123
|
-
// }
|
|
124
|
-
}
|
|
125
|
-
|
|
126
43
|
async initS3ACL(): Promise<void> {
|
|
127
44
|
// TODO: we need to find a way to create a new AWS ACL only when necessary (e.g., when it has expired).
|
|
128
45
|
// if (this._s3ACL) {
|
|
@@ -140,6 +57,9 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
140
57
|
// Response is not JSON
|
|
141
58
|
throw new Error(
|
|
142
59
|
`Invalid AWS ACL response from ${awsACLURL}: ${awsACLText}`,
|
|
60
|
+
{
|
|
61
|
+
cause: error,
|
|
62
|
+
},
|
|
143
63
|
);
|
|
144
64
|
}
|
|
145
65
|
|
|
@@ -162,12 +82,16 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
162
82
|
);
|
|
163
83
|
|
|
164
84
|
if (error) {
|
|
165
|
-
throw new Error(`Invalid AWS ACL response from ${awsACLURL}
|
|
85
|
+
throw new Error(`Invalid AWS ACL response from ${awsACLURL}`, {
|
|
86
|
+
cause: error,
|
|
87
|
+
});
|
|
166
88
|
}
|
|
167
89
|
|
|
168
90
|
const errorMessage = awsACL.error || awsACL.message || awsACL.Message;
|
|
169
91
|
if (errorMessage) {
|
|
170
|
-
throw new Error(`Failed to create an AWS ACL: ${errorMessage}
|
|
92
|
+
throw new Error(`Failed to create an AWS ACL: ${errorMessage}`, {
|
|
93
|
+
cause: error,
|
|
94
|
+
});
|
|
171
95
|
}
|
|
172
96
|
|
|
173
97
|
this._s3ACL = {
|
|
@@ -177,86 +101,6 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
177
101
|
};
|
|
178
102
|
}
|
|
179
103
|
|
|
180
|
-
// TODO: Abstract to a generic `captureScreenshot()` method that is
|
|
181
|
-
// used within a Slice-specific method in SliceManager.
|
|
182
|
-
async captureSliceSimulatorScreenshot(
|
|
183
|
-
args: ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs,
|
|
184
|
-
): Promise<ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType> {
|
|
185
|
-
assertBrowserContextInitialized(this._browserContext);
|
|
186
|
-
|
|
187
|
-
const sliceMachineConfig = await this.project.getSliceMachineConfig();
|
|
188
|
-
|
|
189
|
-
if (!sliceMachineConfig.localSliceSimulatorURL) {
|
|
190
|
-
// TODO: Provide a more helpful error message.
|
|
191
|
-
throw new Error(
|
|
192
|
-
"A local Slice Simulator URL must be configured in your Slice Machine configuration file.",
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const { model } = await this.slices.readSlice({
|
|
197
|
-
libraryID: args.libraryID,
|
|
198
|
-
sliceID: args.sliceID,
|
|
199
|
-
});
|
|
200
|
-
if (!model) {
|
|
201
|
-
throw new Error(
|
|
202
|
-
`Did not find a Slice in library "${args.libraryID}" with ID "${args.sliceID}".`,
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const viewport = args.viewport || DEFAULT_SCREENSHOT_VIEWPORT;
|
|
207
|
-
|
|
208
|
-
// TODO: Change `model.name` to `args.sliceID`?
|
|
209
|
-
// Making that change would require changing the screenshot
|
|
210
|
-
// page path in Slice Machine UI.
|
|
211
|
-
const url = new URL(
|
|
212
|
-
`./${encodeSliceSimulatorURLPart(args.libraryID)}/${model.name}/${
|
|
213
|
-
args.variationID
|
|
214
|
-
}/screenshot`,
|
|
215
|
-
args.sliceMachineUIOrigin,
|
|
216
|
-
);
|
|
217
|
-
url.searchParams.set("screenWidth", viewport.width.toString());
|
|
218
|
-
url.searchParams.set("screenHeight", viewport.height.toString());
|
|
219
|
-
|
|
220
|
-
const isURLAccessible = await checkIsURLAccessible(url.toString());
|
|
221
|
-
|
|
222
|
-
if (!isURLAccessible) {
|
|
223
|
-
throw new Error(
|
|
224
|
-
`Slice Simulator screenshot URL is not accessible: ${url}`,
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const page = await this._browserContext.newPage();
|
|
229
|
-
page.setViewport(viewport);
|
|
230
|
-
|
|
231
|
-
await page.goto(url.toString(), { waitUntil: ["load", "networkidle0"] });
|
|
232
|
-
await page.waitForSelector(SLICE_SIMULATOR_WAIT_FOR_SELECTOR, {
|
|
233
|
-
timeout: SLICE_SIMULATOR_WAIT_FOR_SELECTOR_TIMEOUT,
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
const element = await page.$(SLICE_SIMULATOR_SCREENSHOT_SELECTOR);
|
|
237
|
-
if (!element) {
|
|
238
|
-
const baseURL = new URL(url.pathname, url.origin);
|
|
239
|
-
|
|
240
|
-
throw new Error(
|
|
241
|
-
`Slice Simulator did not find ${SLICE_SIMULATOR_WAIT_FOR_SELECTOR} on the page. Verify the URL is correct: ${baseURL}`,
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
const data = (await element.screenshot({
|
|
246
|
-
encoding: "binary",
|
|
247
|
-
clip: {
|
|
248
|
-
width: viewport.width,
|
|
249
|
-
height: viewport.height,
|
|
250
|
-
x: 0,
|
|
251
|
-
y: 0,
|
|
252
|
-
},
|
|
253
|
-
})) as Buffer;
|
|
254
|
-
|
|
255
|
-
return {
|
|
256
|
-
data,
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
|
|
260
104
|
async uploadScreenshot(
|
|
261
105
|
args: ScreenshotsManagerUploadScreenshotArgs,
|
|
262
106
|
): Promise<ScreenshotsManagerUploadScreenshotReturnType> {
|
|
@@ -302,8 +146,12 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
302
146
|
url: url.toString(),
|
|
303
147
|
};
|
|
304
148
|
} else {
|
|
149
|
+
const text = await res.text();
|
|
305
150
|
throw new Error(
|
|
306
151
|
`Unable to upload screenshot with status code: ${res.status}`,
|
|
152
|
+
{
|
|
153
|
+
cause: text,
|
|
154
|
+
},
|
|
307
155
|
);
|
|
308
156
|
}
|
|
309
157
|
}
|
|
@@ -319,8 +167,12 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
319
167
|
url: new URL("delete-folder", API_ENDPOINTS.AwsAclProvider),
|
|
320
168
|
});
|
|
321
169
|
if (!res.ok) {
|
|
170
|
+
const text = await res.text();
|
|
322
171
|
throw new Error(
|
|
323
172
|
`Unable to delete screenshot folder with status code: ${res.status}`,
|
|
173
|
+
{
|
|
174
|
+
cause: text,
|
|
175
|
+
},
|
|
324
176
|
);
|
|
325
177
|
}
|
|
326
178
|
}
|
|
@@ -206,8 +206,8 @@ type LegacySliceConvertedSegmentEvent = SegmentEvent<
|
|
|
206
206
|
type ScreenshotTakenSegmentEvent = SegmentEvent<
|
|
207
207
|
typeof SegmentEventType.screenshotTaken,
|
|
208
208
|
{
|
|
209
|
-
type: "custom"
|
|
210
|
-
method: "
|
|
209
|
+
type: "custom";
|
|
210
|
+
method: "upload" | "dragAndDrop";
|
|
211
211
|
}
|
|
212
212
|
>;
|
|
213
213
|
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fetch = require("./fetch.cjs");
|
|
4
|
-
const checkIsURLAccessible = async (url) => {
|
|
5
|
-
const res = await fetch.default(url);
|
|
6
|
-
return res.ok;
|
|
7
|
-
};
|
|
8
|
-
exports.checkIsURLAccessible = checkIsURLAccessible;
|
|
9
|
-
//# sourceMappingURL=checkIsURLAccessible.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkIsURLAccessible.cjs","sources":["../../../src/lib/checkIsURLAccessible.ts"],"sourcesContent":["import fetch from \"./fetch\";\n\nexport const checkIsURLAccessible = async (url: string): Promise<boolean> => {\n\tconst res = await fetch(url);\n\n\treturn res.ok;\n};\n"],"names":["fetch"],"mappings":";;;AAEa,MAAA,uBAAuB,OAAO,QAAiC;AACrE,QAAA,MAAM,MAAMA,cAAM,GAAG;AAE3B,SAAO,IAAI;AACZ;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkIsURLAccessible.js","sources":["../../../src/lib/checkIsURLAccessible.ts"],"sourcesContent":["import fetch from \"./fetch\";\n\nexport const checkIsURLAccessible = async (url: string): Promise<boolean> => {\n\tconst res = await fetch(url);\n\n\treturn res.ok;\n};\n"],"names":[],"mappings":";AAEa,MAAA,uBAAuB,OAAO,QAAiC;AACrE,QAAA,MAAM,MAAM,MAAM,GAAG;AAE3B,SAAO,IAAI;AACZ;"}
|