Skip to content

Conversation

@sohail2721
Copy link
Contributor

No description provided.

}

if (!filePath.endsWith(".json")) {
const cleanedPath = this.removeQuotes(filePath.trim() ?? "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a chance that filePath might be null or undefined here? If that's the case then it is not safe to call trim() on it.

@sonarqubecloud
Copy link

@sohail2721 sohail2721 merged commit cefc268 into dev Jul 31, 2025
2 checks passed
aliasghar98 added a commit that referenced this pull request Aug 1, 2025
…ogin flow (#134)

* ehnancement(apimatic-cli): Internal Team CLI Testing Feedback (#111)

Co-authored-by: saeedjamshaid <saeed.jamshaid@outlook.com>

* fix: improves portal serve structure and resolves watcher issues on regeneration (#113)

* feat: add folder structure for generate command (#116)

* feat: add api error handling in new portal generation code (#117)

* feat: adds build directory structure to recipe and toc commands (#119)

Covers the following changes:

Adds the build directory structure to the recipe and toc commands.
Improves messaging across the portal commands.
Removed --build-config flag from portal:recipe:new command.
Minor bug fixes in portal generate, serve and quickstart commands

* chore: update readme (#124)

* feat: adds telemetry to cli (#125)

* feat: enable copilot config (#126)

* feat(sdk:generate): update flags and working directory behavior (#130)

* fix(apimatic-cli): Resolved issue where paths with quotes caused error (#129)

* fix(apimatic-cli): Resolved issue where paths with quotes caused error

* Fixed recipe:new path issue

* Removed nullable cleaned path

* fix: add debounce delay to portal watcher for serve (#127)

---------

Co-authored-by: saeedjamshaid <saeed.jamshaid@outlook.com>

* feat: add device login flow (#131)

* feat: updated folder and build flag names to input and src (#133)

* fix(sdk): fix issue with sdk response handling (#132)

---------

Co-authored-by: Muhammad Sohail <62895181+sohail2721@users.noreply.github.com>
Co-authored-by: Ali Asghar <75574550+aliasghar98@users.noreply.github.com>
Co-authored-by: Mujahid Daud Khan <37825767+Shield-Jaguar@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Aug 1, 2025
# [1.1.0-alpha.15](v1.1.0-alpha.14...v1.1.0-alpha.15) (2025-08-01)

### Features

* update input directory structure for most commands and device login flow ([#134](#134)) ([e172aa8](e172aa8)), closes [#111](#111) [#113](#113) [#116](#116) [#117](#117) [#119](#119) [#124](#124) [#125](#125) [#126](#126) [#130](#130) [#129](#129) [#127](#127)
@sohail2721 sohail2721 deleted the sohail/path-fix-dev branch August 18, 2025 10:53
github-actions bot pushed a commit that referenced this pull request Sep 8, 2025
# 1.0.0-beta.1 (2025-09-08)

### Bug Fixes

* add missing content header to telemetry api call ([#139](#139)) ([f2b0e64](f2b0e64))
* **documentation:** improve messages for each command ([a2c0bfb](a2c0bfb))
* **feature:** add force flag and change sdk version and package ([38db116](38db116))
* **help inconsistent:** fix help being inconsistent with actual platforms supported in sdk generate ([23b6e6d](23b6e6d))
* **package:** change version in package file ([903c619](903c619))
* **path:** resolve paths to absolute ([f68bdde](f68bdde))
* **portal:** override authkey not working if user is never logged in ever ([fb5d188](fb5d188))
* quickstart fails for zipped specs ([#107](#107)) ([49b403c](49b403c))
* **readme & bug fix:** update readme, fix bugs ([141f1a9](141f1a9))
* **refactor:** move print validation logic to utils file as common function and pretty the code ([05dbe41](05dbe41))
* **refactor:** refactor code ([d7cb486](d7cb486))
* **release:** add lock file to gitignore restore check_build workflow ([2eb959a](2eb959a))
* remove ignore flag from portal serve ([#140](#140)) ([336f5b7](336f5b7))
* remove simple-git dependency ([#151](#151)) ([04d4669](04d4669))
* removed existing spec in quickstart when providing spec explicitly ([#147](#147)) ([126318f](126318f))
* resolve bug in unarchive method ([#144](#144)) ([e70b7d2](e70b7d2))
* resolve multiple visual issues and minor fixes  ([#136](#136)) ([4589a6e](4589a6e))
* resolved import for filetype to conform with esm ([#106](#106)) ([234d00f](234d00f))
* **sdk & transform:** Fix bugs related to content and corner cases in transform and sdk generate ([e08ba51](e08ba51))
* **sdk package:** get sdk package from npm ([4c8e178](4c8e178))
* **types:** Add graphql type in destination format of schema ([019aed3](019aed3))
* update user-agent format in api calls ([#135](#135)) ([b16e374](b16e374))
* updated dependency version of apimatic/sdk ([#90](#90)) ([8efd8f8](8efd8f8))
* **version:** update sdk and cli versions ([75cc181](75cc181))

### Features

* add better error messaging for sdk generation failures ([bac2b62](bac2b62))
* add new prompt framework ([#189](#189)) ([1181f9e](1181f9e))
* add responses for generate-via-file ([#143](#143)) ([386be66](386be66))
* add tracking events and improve messaging ([#171](#171)) ([20c45de](20c45de))
* adds user-agent and various other improvements for serve, quickstart and recipe commands ([#110](#110)) ([5eecf75](5eecf75))
* **auth-key in authorization flow:** add authorization in auth flow ([7522c43](7522c43))
* **environment:** now cli will use production environment, make subscription messages more readable ([7868f76](7868f76))
* improve copilot prompts and messages ([#137](#137)) ([a0906a6](a0906a6))
* **login command:** implement login command ([47a9fca](47a9fca))
* **portal:** adds portal quickstart and serve commands ([#33](#33)) ([ab2da9a](ab2da9a)), closes [#10](#10)
* **portal:** adds portal:new:toc command and other various improvements ([#93](#93)) ([cfae452](cfae452)), closes [#55](#55) [#56](#56) [#72](#72) [#73](#73)
* **portal:** adds portal:recipe:new command for api recipes and migrates codebase to esm from commonjs ([#103](#103)) ([adb6d0d](adb6d0d)), closes [#62](#62)
* rename portal:new:toc command to portal:toc:new ([#99](#99)) ([1a6b1c4](1a6b1c4))
* restructure working directory usage across all portal commands ([#123](#123)) ([a842d8f](a842d8f))
* update apimatic.io base url with new subdomain base url ([a8796cd](a8796cd))
* update apimatic.io sdk ([1c4c576](1c4c576))
* update input directory structure for most commands and device login flow ([#134](#134)) ([e172aa8](e172aa8)), closes [#111](#111) [#113](#113) [#116](#116) [#117](#117) [#119](#119) [#124](#124) [#125](#125) [#126](#126) [#130](#130) [#129](#129) [#127](#127)
* update tslib dependency version to match apimatic sdk ([be06f73](be06f73))
* **usage tracking:** update sdk to send cli user agent for tracking ([768c60b](768c60b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants