bdy 1.22.49 → 1.22.50-beta

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.22.49",
4
+ "version": "1.22.50-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -76,7 +76,7 @@ const claimNonInteractive = async (client, workspace, domain, onOwnerBehalf) =>
76
76
  const buyNonInteractive = async (client, workspace, domain, onOwnerBehalf) => {
77
77
  output_1.default.arrowSign();
78
78
  output_1.default.normal(`Matched: ${output_1.default.formatDomain(domain)}`);
79
- if (domain.available && !domain.premium) {
79
+ if (domain.available) {
80
80
  await client.domainBuy(workspace, domain.name, onOwnerBehalf, true);
81
81
  outputBought(domain.name);
82
82
  }
@@ -113,14 +113,12 @@ const interactive = async (client, workspace, prompt, tlds, onOwnerBehalf, onlyA
113
113
  const search = await client.domainSearch(workspace, [prompt]);
114
114
  const buyable = search.domains.find((d) => d.name === prompt);
115
115
  if (buyable &&
116
- (!onlyAvailable || (buyable.available && !buyable.premium))) {
116
+ (!onlyAvailable || buyable.available)) {
117
117
  toSort.push({
118
118
  formatted: output_1.default.formatDomain(buyable),
119
- value: createValue('domain', prompt, buyable.available && !buyable.premium),
119
+ value: createValue('domain', prompt, buyable.available),
120
120
  name: prompt,
121
- price: buyable.available && !buyable.premium
122
- ? buyable.prices.create.price
123
- : Infinity,
121
+ price: buyable.available ? buyable.prices.create.price : Infinity,
124
122
  });
125
123
  added[prompt] = true;
126
124
  }
@@ -145,8 +143,8 @@ const interactive = async (client, workspace, prompt, tlds, onOwnerBehalf, onlyA
145
143
  const bIdx = popularTlds.indexOf(bTld);
146
144
  return aIdx < bIdx ? -1 : 1;
147
145
  });
148
- const domainsAvailable = search.domains.filter((d) => d.available && !d.premium);
149
- const domainsUnavailable = search.domains.filter((d) => !d.available || d.premium);
146
+ const domainsAvailable = search.domains.filter((d) => d.available);
147
+ const domainsUnavailable = search.domains.filter((d) => !d.available);
150
148
  domainsAvailable.forEach((d) => {
151
149
  if (!added[d.name]) {
152
150
  toSort.push({
@@ -235,7 +233,7 @@ const interactive = async (client, workspace, prompt, tlds, onOwnerBehalf, onlyA
235
233
  formatted: output_1.default.formatDomain(d),
236
234
  value: createValue('domain', d.name, true),
237
235
  name: d.name,
238
- price: d.available && !d.premium ? d.prices.create.price : Infinity,
236
+ price: d.available ? d.prices.create.price : Infinity,
239
237
  });
240
238
  added[d.name] = true;
241
239
  i += 1;
@@ -56,12 +56,10 @@ commandDomainSearch.action(async (text, options) => {
56
56
  const search = await client.domainSearch(workspace, [prompt]);
57
57
  const buyable = search.domains.find((d) => d.name === prompt);
58
58
  if (buyable &&
59
- (!onlyAvailable || (buyable.available && !buyable.premium))) {
59
+ (!onlyAvailable || buyable.available)) {
60
60
  matched.push({
61
61
  formatted: output_1.default.formatDomain(buyable),
62
- price: !buyable.available || buyable.premium
63
- ? Infinity
64
- : buyable.prices.create.price,
62
+ price: !buyable.available ? Infinity : buyable.prices.create.price,
65
63
  name: buyable.name,
66
64
  });
67
65
  }
@@ -94,10 +92,10 @@ commandDomainSearch.action(async (text, options) => {
94
92
  }
95
93
  });
96
94
  search.domains.forEach((d) => {
97
- if (!onlyAvailable || (d.available && !d.premium)) {
95
+ if (!onlyAvailable || d.available) {
98
96
  matched.push({
99
97
  formatted: output_1.default.formatDomain(d),
100
- price: !d.available || d.premium ? Infinity : d.prices.create.price,
98
+ price: !d.available ? Infinity : d.prices.create.price,
101
99
  name: d.name,
102
100
  });
103
101
  }
@@ -125,10 +123,10 @@ commandDomainSearch.action(async (text, options) => {
125
123
  });
126
124
  });
127
125
  result.domains.forEach((d) => {
128
- if (!onlyAvailable || (d.available && !d.premium)) {
126
+ if (!onlyAvailable || (d.available)) {
129
127
  suggestions.push({
130
128
  formatted: output_1.default.formatDomain(d),
131
- price: !d.available || d.premium ? Infinity : d.prices.create.price,
129
+ price: !d.available ? Infinity : d.prices.create.price,
132
130
  name: d.name,
133
131
  });
134
132
  }
@@ -374,10 +374,10 @@ class Output {
374
374
  return `${sign}${value.toFixed(2)}/${duration}`;
375
375
  }
376
376
  static formatDomain(domain) {
377
- if (!domain.available || domain.premium) {
377
+ if (!domain.available) {
378
378
  return this.getDimColor(`${domain.name} (Unavailable)`);
379
379
  }
380
- return `${this.getGreenColor(domain.name)} ${this.formatDomainPrice(domain.prices.create)} (renew: ${this.formatDomainPrice(domain.prices.renew)})`;
380
+ return `${this.getGreenColor(domain.name)} ${this.formatDomainPrice(domain.prices.create)}`;
381
381
  }
382
382
  static formatDomainClaim(domain, available) {
383
383
  if (available) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.49",
4
+ "version": "1.22.50-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {