Skip to content

Commit

Permalink
fix: remove accidental console output
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredReisinger committed Sep 11, 2024
1 parent ce5f150 commit b229f73
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/commands/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,17 @@ Examples:
const skus = argv.sku;
items = items.filter((i) => skus.includes(i.sku));
helpers.out(`found ${items.length} ${skus.join(',')} items...`);
helpers.dbg(2, 'filtered items (sku)', items);
helpers.dbg(3, 'filtered items (sku)', items);
}

if (argv.skuPrefix) {
const prefixes = argv.skuPrefix;
items = items.filter((i) => prefixes.some((p) => i.sku.startsWith(p)));
helpers.out(`found ${items.length} ${prefixes.join(',')} items...`);
helpers.dbg(2, 'filtered items (sku prefix)', items);
helpers.dbg(3, 'filtered items (sku prefix)', items);
}

helpers.dbg(1, 'found items...', items);
helpers.dbg(2, 'found items...', items);

if (!items || items.length === 0) {
helpers.out('(no items!)');
Expand Down Expand Up @@ -757,7 +757,7 @@ Examples:
return col;
});

console.log('COLUMNS', fields);
helpers.dbg(2, 'columns', fields);
return fields;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/wc/WooItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class WooItem {
dbg(3, 'metadata', wcItem.meta_data);
this.meta = WooItem.convertMetadata(order.id, wcItem.meta_data);

dbg(1, 'WooItem', this);
dbg(2, 'WooItem', this);
}

static convertMetadata(
Expand All @@ -77,7 +77,7 @@ export default class WooItem {

// v1 keys/labels have price info, but no longer seem to...
if (hasPriceRE.test(key)) {
dbg(1, `key has price: ${key}`);
dbg(2, `key has price: ${key}`);
key = key.replace(hasPriceRE, '');
}

Expand Down
2 changes: 1 addition & 1 deletion src/wc/WooOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class WooOrder {
// this.date_created = moment.utc(wcOrder.date_created_gmt);
this.date = moment.utc(wcOrder.date_created_gmt);

dbg(1, 'WooOrder', this);
dbg(2, 'WooOrder', this);
}

static simplifyBilling(wcBilling: Billing): SimplifiedBilling {
Expand Down
6 changes: 3 additions & 3 deletions src/wc/wcutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ export function normalizePhone(phone: string) {
// we have a couple of 9-digit numbers where they missed 1 in the
// *second* set: '206-12-3456'
p = `(${p.slice(0, 3)}) ${p.slice(3, 5)}?-${p.slice(5)}`;
dbg(1, `short phone: ${phone}, treating as ${p}`);
dbg(2, `short phone: ${phone}, treating as ${p}`);
break;
default:
if (p.length >= 11 && p.length <= 14) {
// we have a couple of 11-digit that look like an extra digit...
p = `(${p.slice(0, 3)}) ${p.slice(3, 6)}-${p.slice(6, 10)} (+${p.slice(
10
)})`;
dbg(1, `long phone: ${phone}, treating as ${p}`);
dbg(2, `long phone: ${phone}, treating as ${p}`);
} else {
dbg(1, `unexpected phone: ${phone}, leaving as-is`);
dbg(2, `unexpected phone: ${phone}, leaving as-is`);
p = phone;
}
break;
Expand Down

0 comments on commit b229f73

Please sign in to comment.