From 230340ba115dd7eacd5632e590e5ef1cecb18079 Mon Sep 17 00:00:00 2001 From: Camden Phalen Date: Mon, 12 Feb 2024 12:53:56 -0500 Subject: [PATCH 1/4] use local-dev-lib for api/hubdb --- packages/cli/commands/hubdb/clear.js | 2 +- packages/cli/commands/hubdb/delete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/commands/hubdb/clear.js b/packages/cli/commands/hubdb/clear.js index 37fa86b13..969309f80 100644 --- a/packages/cli/commands/hubdb/clear.js +++ b/packages/cli/commands/hubdb/clear.js @@ -1,7 +1,7 @@ const { logger } = require('@hubspot/cli-lib/logger'); const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); const { clearHubDbTableRows } = require('@hubspot/cli-lib/hubdb'); -const { publishTable } = require('@hubspot/cli-lib/api/hubdb'); +const { publishTable } = require('@hubspot/local-dev-lib/api/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); const { trackCommandUsage } = require('../../lib/usageTracking'); diff --git a/packages/cli/commands/hubdb/delete.js b/packages/cli/commands/hubdb/delete.js index a1998bde0..bba582f5d 100644 --- a/packages/cli/commands/hubdb/delete.js +++ b/packages/cli/commands/hubdb/delete.js @@ -1,6 +1,6 @@ const { logger } = require('@hubspot/cli-lib/logger'); const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); -const { deleteTable } = require('@hubspot/cli-lib/api/hubdb'); +const { deleteTable } = require('@hubspot/local-dev-lib/api/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); const { trackCommandUsage } = require('../../lib/usageTracking'); From 2bad8b518296241679df74a80ee60dae01b96548 Mon Sep 17 00:00:00 2001 From: Camden Phalen Date: Mon, 12 Feb 2024 13:04:36 -0500 Subject: [PATCH 2/4] Use local-dev-lib for hubdb module --- packages/cli/commands/hubdb/clear.js | 2 +- packages/cli/commands/hubdb/create.js | 2 +- packages/cli/commands/hubdb/fetch.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/commands/hubdb/clear.js b/packages/cli/commands/hubdb/clear.js index 969309f80..9f242076a 100644 --- a/packages/cli/commands/hubdb/clear.js +++ b/packages/cli/commands/hubdb/clear.js @@ -1,6 +1,6 @@ const { logger } = require('@hubspot/cli-lib/logger'); const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); -const { clearHubDbTableRows } = require('@hubspot/cli-lib/hubdb'); +const { clearHubDbTableRows } = require('@hubspot/local-dev-lib/hubdb'); const { publishTable } = require('@hubspot/local-dev-lib/api/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); diff --git a/packages/cli/commands/hubdb/create.js b/packages/cli/commands/hubdb/create.js index 829c1bb8b..4f83a5f29 100644 --- a/packages/cli/commands/hubdb/create.js +++ b/packages/cli/commands/hubdb/create.js @@ -3,7 +3,7 @@ const path = require('path'); const { logger } = require('@hubspot/cli-lib/logger'); const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); const { getCwd } = require('@hubspot/local-dev-lib/path'); -const { createHubDbTable } = require('@hubspot/cli-lib/hubdb'); +const { createHubDbTable } = require('@hubspot/local-dev-lib/hubdb'); const { checkAndConvertToJson, diff --git a/packages/cli/commands/hubdb/fetch.js b/packages/cli/commands/hubdb/fetch.js index 2874681f4..c63e63455 100644 --- a/packages/cli/commands/hubdb/fetch.js +++ b/packages/cli/commands/hubdb/fetch.js @@ -1,6 +1,6 @@ const { logger } = require('@hubspot/cli-lib/logger'); const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); -const { downloadHubDbTable } = require('@hubspot/cli-lib/hubdb'); +const { downloadHubDbTable } = require('@hubspot/local-dev-lib/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); const { trackCommandUsage } = require('../../lib/usageTracking'); From b3ba0f1926f511442b066a4390c4fcc6112a6ff7 Mon Sep 17 00:00:00 2001 From: Camden Phalen Date: Mon, 12 Feb 2024 16:06:11 -0500 Subject: [PATCH 3/4] Log api errors for hubdb commands --- packages/cli/commands/hubdb/clear.js | 4 ++-- packages/cli/commands/hubdb/create.js | 4 ++-- packages/cli/commands/hubdb/delete.js | 4 ++-- packages/cli/commands/hubdb/fetch.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/cli/commands/hubdb/clear.js b/packages/cli/commands/hubdb/clear.js index 9f242076a..ee99477cd 100644 --- a/packages/cli/commands/hubdb/clear.js +++ b/packages/cli/commands/hubdb/clear.js @@ -1,5 +1,5 @@ const { logger } = require('@hubspot/cli-lib/logger'); -const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); +const { logApiErrorInstance } = require('../../lib/errorHandlers/apiErrors'); const { clearHubDbTableRows } = require('@hubspot/local-dev-lib/hubdb'); const { publishTable } = require('@hubspot/local-dev-lib/api/hubdb'); @@ -52,7 +52,7 @@ exports.handler = async options => { ); } } catch (e) { - logErrorInstance(e); + logApiErrorInstance(e); } }; diff --git a/packages/cli/commands/hubdb/create.js b/packages/cli/commands/hubdb/create.js index 4f83a5f29..187d509d6 100644 --- a/packages/cli/commands/hubdb/create.js +++ b/packages/cli/commands/hubdb/create.js @@ -1,7 +1,7 @@ const path = require('path'); const { logger } = require('@hubspot/cli-lib/logger'); -const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); +const { logApiErrorInstance } = require('../../lib/errorHandlers/apiErrors'); const { getCwd } = require('@hubspot/local-dev-lib/path'); const { createHubDbTable } = require('@hubspot/local-dev-lib/hubdb'); @@ -56,7 +56,7 @@ exports.handler = async options => { src, }) ); - logErrorInstance(e); + logApiErrorInstance(e); } }; diff --git a/packages/cli/commands/hubdb/delete.js b/packages/cli/commands/hubdb/delete.js index bba582f5d..f98e4e84f 100644 --- a/packages/cli/commands/hubdb/delete.js +++ b/packages/cli/commands/hubdb/delete.js @@ -1,5 +1,5 @@ const { logger } = require('@hubspot/cli-lib/logger'); -const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); +const { logApiErrorInstance } = require('../../lib/errorHandlers/apiErrors'); const { deleteTable } = require('@hubspot/local-dev-lib/api/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); const { trackCommandUsage } = require('../../lib/usageTracking'); @@ -40,7 +40,7 @@ exports.handler = async options => { tableId, }) ); - logErrorInstance(e); + logApiErrorInstance(e); } }; diff --git a/packages/cli/commands/hubdb/fetch.js b/packages/cli/commands/hubdb/fetch.js index c63e63455..59b628c3a 100644 --- a/packages/cli/commands/hubdb/fetch.js +++ b/packages/cli/commands/hubdb/fetch.js @@ -1,5 +1,5 @@ const { logger } = require('@hubspot/cli-lib/logger'); -const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors'); +const { logApiErrorInstance } = require('../../lib/errorHandlers/apiErrors'); const { downloadHubDbTable } = require('@hubspot/local-dev-lib/hubdb'); const { loadAndValidateOptions } = require('../../lib/validation'); @@ -37,7 +37,7 @@ exports.handler = async options => { }) ); } catch (e) { - logErrorInstance(e); + logApiErrorInstance(e); } }; From c25ec2fed6ab985e670ec5979204e9505171736e Mon Sep 17 00:00:00 2001 From: Camden Phalen Date: Tue, 13 Feb 2024 11:40:37 -0500 Subject: [PATCH 4/4] Bump LDL dep to 0.3.2 --- packages/cli/package.json | 2 +- packages/serverless-dev-runtime/package.json | 2 +- packages/webpack-cms-plugins/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index d61109601..c18f15f66 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@hubspot/cli-lib": "^9.0.0", - "@hubspot/local-dev-lib": "^0.3.1", + "@hubspot/local-dev-lib": "^0.3.2", "@hubspot/serverless-dev-runtime": "5.1.3", "@hubspot/ui-extensions-dev-server": "0.8.9", "archiver": "^5.3.0", diff --git a/packages/serverless-dev-runtime/package.json b/packages/serverless-dev-runtime/package.json index 20ee03654..7466827a5 100644 --- a/packages/serverless-dev-runtime/package.json +++ b/packages/serverless-dev-runtime/package.json @@ -7,7 +7,7 @@ "license": "Apache-2.0", "dependencies": { "@hubspot/cli-lib": "^9.0.0", - "@hubspot/local-dev-lib": "^0.3.1", + "@hubspot/local-dev-lib": "^0.3.2", "body-parser": "^1.19.0", "chalk": "^4.1.0", "chokidar": "^3.4.3", diff --git a/packages/webpack-cms-plugins/package.json b/packages/webpack-cms-plugins/package.json index 55ad445b6..5bbef00cb 100644 --- a/packages/webpack-cms-plugins/package.json +++ b/packages/webpack-cms-plugins/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@hubspot/cli-lib": "^9.0.0", - "@hubspot/local-dev-lib": "^0.3.1" + "@hubspot/local-dev-lib": "^0.3.2" }, "gitHead": "0659fd19cabc3645af431b177c11d0c1b089e0f8" } diff --git a/yarn.lock b/yarn.lock index 5114c3fa3..4b6eb7988 100644 --- a/yarn.lock +++ b/yarn.lock @@ -537,10 +537,10 @@ table "^6.6.0" unixify "1.0.0" -"@hubspot/local-dev-lib@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@hubspot/local-dev-lib/-/local-dev-lib-0.3.1.tgz#2137d3d41be41c50193346d15b8f6a8a039adf1c" - integrity sha512-w3Wjiadw0sJw2akRYbU4PfDK9eXDmm9iEMPNgMN7NH43U68+l2BgDK+KFk5z9bOftHZg1IdF9JuQmSo45q4Ddg== +"@hubspot/local-dev-lib@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@hubspot/local-dev-lib/-/local-dev-lib-0.3.2.tgz#5479bbf212b01742652cf57314b72bd61bf3d546" + integrity sha512-mH7RZLSjGWVcp3dwuiwbpGOmsL6MT6PBjRKMlXvYWrsaz/8K+gYNiOWh8zMSoTLxQ1F81In+/jBdhXMd3MsMAQ== dependencies: address "^2.0.1" axios "^1.3.5"