refactor(recipes): rename openHelpers to commonRpcFunctions and harden openInEditor - #141
Merged
Merged
Conversation
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Move the open-in-editor/open-in-finder RPC recipe bundle from devframe/recipes/open-helpers to devframe/recipes/common-rpc-functions, renaming the exported openHelpers array to commonRpcFunctions. devframe/recipes/open-helpers remains as a deprecated compatibility shim (openHelpers aliased to commonRpcFunctions) so existing imports keep working.
Load devframe/utils/launch-editor and devframe/utils/open lazily via dynamic import in the openInEditor/openInFinder handlers instead of a top-level import. openInEditor gains an optional second argument to pick the editor command explicitly. It's validated against a new KNOWN_EDITORS constant (and KnownEditor type) via v.picklist, so the RPC surface can't be used to spawn an arbitrary command.
antfubot
force-pushed
the
chore/rename-open-helpers-to-common-rpc-functions
branch
2 times, most recently
from
July 28, 2026 09:30
9a8ec1a to
e153305
Compare
Write KnownEditor directly as a union of editor-command literals instead of deriving it via (typeof KNOWN_EDITORS)[number] — the tsnapi snapshot now prints the actual union instead of the indexed access expression. KNOWN_EDITORS is now typed against KnownEditor (as const satisfies readonly KnownEditor[]) to keep the two in sync.
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.
Summary
Renames the
openHelpersRPC recipe export tocommonRpcFunctions, moving it to a new canonical moduledevframe/recipes/common-rpc-functions, and hardens theopenInEditorrecipe.devframe/recipes/common-rpc-functionsnow exportsopenInEditor,openInFinder, andcommonRpcFunctions(the bundled array, previouslyopenHelpers).devframe/recipes/open-helpersremains as a deprecated compatibility shim —openHelpersis kept as a deprecated alias ofcommonRpcFunctions— so existing imports keep working.@devframes/plugin-messages), package exports/build config, path aliases, docs, and the devframe skill reference to point at the new module.openInEditorandopenInFindernow lazilyimport()devframe/utils/launch-editor/devframe/utils/openinside their handlers instead of a top-level import.openInEditorgains an optional second argument to pick the editor command explicitly, validated against a newKNOWN_EDITORSconstant (andKnownEditortype) viav.picklist— the RPC surface can't be used to spawn an arbitrary command.tsnapiAPI snapshots for the new and deprecated subpaths.Verification
pnpm buildpnpm lintpnpm typecheckpnpm test(879 tests passing)This PR was created with the help of an agent.