Skip to content

Conversation

@factman
Copy link
Contributor

@factman factman commented May 17, 2025

Status Type Env Vars Change
Ready Refactor Yes

⚠️ NOTE: This pull request removes the nxCloudAccessToken from the nx.json configuration file, which may affect access or authentication with nxCloud.

Problem

  • The getPermission function in the PermissionsAPI class could proceed under invalid circumstances when _events is undefined or _handler is null, potentially leading to unintended behavior.
  • The nxCloudAccessToken was present in the nx.json file, which might not be necessary or desired for current operations.

Solution

  • Added a check in the getPermission function to throw an error if _events is undefined or _handler is null, ensuring that permission retrieval does not proceed under invalid conditions.
  • Removed the nxCloudAccessToken entry from the nx.json file to potentially enhance security or align with current operational requirements.

Test results

Add your screenshots or recording about testing

Other changes

  • Updated JSDoc comment in types.ts to indicate that the getPermission function will throw an error if the handler is closed.

Deploy Notes

There are no new dependencies, scripts, or environment variables introduced with this PR.

- 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.
@factman factman self-assigned this May 17, 2025
factman added 7 commits May 17, 2025 08:55
- 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.
@factman factman merged commit 3c47407 into ArcStackLab:development May 17, 2025
1 check passed
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.

1 participant