Improve PermissionsAPI Error Handling and Remove nxCloud Access Token#6
Merged
factman merged 8 commits intoArcStackLab:developmentfrom May 17, 2025
Merged
Conversation
- Added error handling in PermissionsAPI to throw an error if the handler is closed. - Updated type definitions in types.ts to document the new error throwing behavior. - Removed the nxCloudAccessToken from nx.json for security reasons.
- Changed package manager version from pnpm@9.2.0 to pnpm@9 for consistency.
- Added environment variable NX_CLOUD_ACCESS_TOKEN to the verify.yml workflow for improved CI configuration.
…N in job environment - Moved the NX_CLOUD_ACCESS_TOKEN environment variable to the job level in verify.yml for improved clarity and organization.
…_TOKEN usage - Simplified the command in the verify.yml workflow to echo the NX_CLOUD_ACCESS_TOKEN before running the Nx Cloud command, enhancing clarity and maintainability.
- Replaced `pnpm exec` with `pnpx` for running Nx affected commands in the verify.yml workflow, ensuring consistency and improved command execution.
…installation - Changed the pnpm install command in verify.yml from --frozen-lockfile to --no-frozen-lockfile to enable more flexible dependency resolution during CI runs.
…sionsAPI - Added '**/*.html' to the ESLint ignore patterns to exclude HTML files from linting. - Updated type reference in demo/index.js from PermissionsAPI.getPermissionHandler to getPermissionHandler for improved clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
getPermissionfunction in thePermissionsAPIclass could proceed under invalid circumstances when_eventsis undefined or_handleris null, potentially leading to unintended behavior.nxCloudAccessTokenwas present in thenx.jsonfile, which might not be necessary or desired for current operations.Solution
getPermissionfunction to throw an error if_eventsis undefined or_handleris null, ensuring that permission retrieval does not proceed under invalid conditions.nxCloudAccessTokenentry from thenx.jsonfile to potentially enhance security or align with current operational requirements.Test results
Add your screenshots or recording about testing
Other changes
types.tsto indicate that thegetPermissionfunction will throw an error if the handler is closed.Deploy Notes
There are no new dependencies, scripts, or environment variables introduced with this PR.