bdy 1.18.9-stage → 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.9-stage",
4
+ "version": "1.18.11-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -127,8 +127,8 @@ const interactive = async (client, workspace, prompt, tlds, onOwnerBehalf) => {
127
127
  added[domain] = true;
128
128
  }
129
129
  });
130
- if (items.length > 10)
131
- items = items.filter((_, i) => i < 10);
130
+ if (items.length > 20)
131
+ items = items.filter((_, i) => i < 20);
132
132
  items.unshift(output_1.default.createMenuSeparator('Matched'));
133
133
  }
134
134
  }
@@ -26,7 +26,7 @@ const browsersListSchema = zod_1.z
26
26
  : 'WEBKIT'))));
27
27
  const optionsSchema = zod_1.z.object({
28
28
  follow: zod_1.z.boolean(),
29
- respectRobots: zod_1.z.boolean(),
29
+ respectRobots: zod_1.z.boolean().optional(),
30
30
  outputType: zod_1.z.enum(['jpeg', 'png', 'md', 'html']).optional(),
31
31
  outputTypes: zod_1.z.string().optional(),
32
32
  quality: zod_1.z.coerce.number().min(1).max(100).optional(),
@@ -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,
@@ -15,7 +15,7 @@ const promises_2 = require("node:fs/promises");
15
15
  const commandScrape = (0, utils_1.newCommand)('scrape', texts_1.DESC_COMMAND_VT_SCRAPE);
16
16
  commandScrape.argument('[url]', texts_1.OPTION_SCRAPE_URL);
17
17
  commandScrape.option('--follow', texts_1.OPTION_SCRAPE_FOLLOW, false);
18
- commandScrape.option('--respectRobots', texts_1.OPTION_COMPARE_RESPECT_ROBOTS, false);
18
+ commandScrape.option('--respectRobots', texts_1.OPTION_COMPARE_RESPECT_ROBOTS);
19
19
  commandScrape.addOption(new commander_1.Option('--outputType <type>', texts_1.OPTION_SCRAPE_OUTPUT_TYPE).choices([
20
20
  'jpeg',
21
21
  'png',
@@ -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}`);
@@ -303,13 +303,13 @@ class Output {
303
303
  const sign = price.currency === 'USD' ? '$' : '€';
304
304
  const value = price.price * price.min_duration;
305
305
  const duration = price.min_duration === 1 ? '1yr' : `${price.min_duration}yrs`;
306
- return `${sign}${value.toFixed(2)} (${duration})`;
306
+ return `${sign}${value.toFixed(2)}/${duration}`;
307
307
  }
308
308
  static formatDomain(domain) {
309
309
  if (!domain.available || domain.premium) {
310
310
  return this.getDimColor(`${domain.name} (Unavailable)`);
311
311
  }
312
- return `${this.getGreenColor(domain.name)} ${this.formatDomainPrice(domain.prices.create)} / ${this.formatDomainPrice(domain.prices.renew)}`;
312
+ return `${this.getGreenColor(domain.name)} ${this.formatDomainPrice(domain.prices.create)} (renew: ${this.formatDomainPrice(domain.prices.renew)})`;
313
313
  }
314
314
  static formatDomainClaim(domain, available) {
315
315
  if (available) {
@@ -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.9-stage",
4
+ "version": "1.18.11-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {