From 7d674daa9365881f663855e91942794076a66ac2 Mon Sep 17 00:00:00 2001 From: ajaz Date: Tue, 29 Apr 2025 14:59:52 +0530 Subject: [PATCH 1/3] refactor: removed Newrelic license 40 char restriction --- .../api-mesh/__tests__/set-log-forwarding.test.js | 9 --------- src/utils.js | 7 +------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/commands/api-mesh/__tests__/set-log-forwarding.test.js b/src/commands/api-mesh/__tests__/set-log-forwarding.test.js index 52973194..e8ac0f61 100644 --- a/src/commands/api-mesh/__tests__/set-log-forwarding.test.js +++ b/src/commands/api-mesh/__tests__/set-log-forwarding.test.js @@ -115,15 +115,6 @@ describe('SetLogForwardingCommand', () => { ); }); - test('throws an error if license key has wrong format', async () => { - promptInputSecret.mockResolvedValueOnce('wrongformat'); // Too short - - const command = new SetLogForwardingCommand([], {}); - await expect(command.run()).rejects.toThrow( - `The license key is in the wrong format. Expected: 40 characters (received: ${11})`, - ); - }); - test('prompts for missing destination', async () => { parseSpy.mockResolvedValueOnce({ flags: { diff --git a/src/utils.js b/src/utils.js index 0946777f..92d462a9 100644 --- a/src/utils.js +++ b/src/utils.js @@ -132,11 +132,6 @@ const destinations = { if (!value) { throw new Error('License key is required'); } - if (value.length !== 40) { - throw new Error( - `The license key is in the wrong format. Expected: 40 characters (received: ${value.length})`, - ); - } }, }, ], @@ -777,7 +772,7 @@ async function localToUTCTime(timeString) { try { //Get the local timezone // takes the timezone where the javascript runtime is running - // reference https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions#browser_compatibility:~:text=The%20value%20provided%20for%20this%20property%20in%20the%20options%20argument%2C%20with%20default%20filled%20in%20as%20needed.%20It%20is%20an%20IANA%20time%20zone%20name.%20The%20default%20is%20the%20runtime%27s%20default%20time%20zone. + // reference https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions#browser_compatibility:~:text=The%20value%20provided%20for%20this%20property%20in%20the%20options%20argument%2C%20with%20default%20filled%20in%20as%20needed.%20It%20is%20an%20IANA%20time%20zone.%20The%20default%20is%20the%20runtime%27s%20default%20time%20zone. const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; // Create a Date object from the formatted time string From d129e504d9b55cae2cde3dec7828f0a3dd228c2e Mon Sep 17 00:00:00 2001 From: ajaz Date: Tue, 29 Apr 2025 15:46:12 +0530 Subject: [PATCH 2/3] bump up package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67ab51f6..1d7ed5c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/aio-cli-plugin-api-mesh", - "version": "5.3.1", + "version": "5.3.1-beta.1", "description": "Adobe I/O CLI plugin to develop and manage API mesh sources", "keywords": [ "oclif-plugin" From 4fdc84828b3e596259260c836cca17ce515e233e Mon Sep 17 00:00:00 2001 From: Sumaiya <108254100+AjazSumaiya@users.noreply.github.com> Date: Wed, 30 Apr 2025 19:44:20 +0530 Subject: [PATCH 3/3] Update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d7ed5c5..869868ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/aio-cli-plugin-api-mesh", - "version": "5.3.1-beta.1", + "version": "5.3.2-beta.1", "description": "Adobe I/O CLI plugin to develop and manage API mesh sources", "keywords": [ "oclif-plugin"