bdy 1.18.10-dev → 1.18.11-dev

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.18.10-dev",
4
+ "version": "1.18.11-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -68,6 +68,7 @@ function validateInputAndOptions(input, options) {
68
68
  })
69
69
  .optional(),
70
70
  quality: zod_1.z.number().min(1).max(100).optional(),
71
+ fullPage: zod_1.z.boolean().optional(),
71
72
  })
72
73
  .transform((data) => ({
73
74
  ...data,
@@ -98,6 +99,9 @@ function validateInputAndOptions(input, options) {
98
99
  if (typeof quality === 'number') {
99
100
  entry.quality = quality;
100
101
  }
102
+ if (fullPage) {
103
+ entry.fullPage = fullPage;
104
+ }
101
105
  parsedOutputTypes = [entry];
102
106
  }
103
107
  let parsedDevices;
@@ -129,7 +133,6 @@ function validateInputAndOptions(input, options) {
129
133
  respectRobots,
130
134
  outputTypes: parsedOutputTypes,
131
135
  outputDir,
132
- fullPage,
133
136
  colorScheme,
134
137
  browsers: parsedBrowsers,
135
138
  devices: parsedDevices,
@@ -50,11 +50,11 @@ commandScrape.action(async (inputUrl, options) => {
50
50
  if (!checkToken('scrape')) {
51
51
  output_1.default.exitError(texts_1.ERR_MISSING_SCRAPE_TOKEN);
52
52
  }
53
- const { url, follow, respectRobots, outputTypes, outputDir, fullPage, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage, } = validateInputAndOptions(inputUrl, options);
53
+ const { url, follow, respectRobots, outputTypes, outputDir, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage, } = validateInputAndOptions(inputUrl, options);
54
54
  try {
55
55
  const ciAndGitInfo = await getCiAndGitInfo({});
56
56
  setCiAndCommitInfo(ciAndGitInfo);
57
- const { buildId } = await sendScrap(url, follow, respectRobots, outputTypes, fullPage, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage);
57
+ const { buildId } = await sendScrap(url, follow, respectRobots, outputTypes, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage);
58
58
  const status = await watchSessionStatus(buildId);
59
59
  if (!status.ok) {
60
60
  output_1.default.exitError(`Scrape session failed: ${status.error}`);
@@ -414,7 +414,7 @@ exports.OPTION_SCRAPE_DEVICES = 'Devices definition as JSON array (e.g., --devic
414
414
  exports.OPTION_SCRAPE_LOCAL_STORAGE = 'Set localStorage values used when visiting urls (format: [scope::]key=value)';
415
415
  exports.OPTION_SCRAPE_DELAY = 'Delay in milliseconds';
416
416
  exports.OPTION_SCRAPE_OUTPUT_DIR = 'Output directory';
417
- exports.OPTION_SCRAPE_OUTPUT_TYPES = 'Output types as JSON array (e.g., --outputTypes \'[{"type":"png","selector":{"type":"CSS","value":".main"}},{"type":"jpeg","quality":80}]\')';
417
+ exports.OPTION_SCRAPE_OUTPUT_TYPES = 'Output types as JSON array (e.g., --outputTypes \'[{"type":"md","selector":{"type":"CSS","value":".main"}},{"type":"jpeg","quality":80,"fullPage":true}]\')';
418
418
  exports.LOG_REGISTERING_AGENT = 'Registering agent...';
419
419
  exports.LOG_SAVING_AGENT_SYSTEM_CONFIG = 'Saving agent system config...';
420
420
  exports.LOG_SAVING_AGENT_PROC_ID = 'Saving agent process id in lock file...';
@@ -267,13 +267,12 @@ async function sendCompareLinks(urls, validatedOptions, sitemapSource) {
267
267
  }
268
268
  return response;
269
269
  }
270
- async function sendScrap(url, follow, respectRobots, outputTypes, fullPage, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage) {
270
+ async function sendScrap(url, follow, respectRobots, outputTypes, colorScheme, browsers, devices, cookies, requestHeaders, delay, waitForSelectors, localStorage) {
271
271
  const payload = {
272
272
  url,
273
273
  follow,
274
274
  respectRobots,
275
275
  outputTypes,
276
- fullPage,
277
276
  colorScheme,
278
277
  browsers,
279
278
  devices,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.18.10-dev",
4
+ "version": "1.18.11-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {