diff --git a/package.json b/package.json index 67ab51f6..869868ba 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.2-beta.1", "description": "Adobe I/O CLI plugin to develop and manage API mesh sources", "keywords": [ "oclif-plugin" 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