-
Notifications
You must be signed in to change notification settings - Fork 4
Add cmake-file-api
package, implementing a TypeScript wrapper of the CMake file-based API
#257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
{ | ||
"extends": "./tsconfig.node.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"emitDeclarationOnly": true, | ||
"declarationMap": false | ||
}, | ||
"include": ["${configDir}/src/**/*.test.ts"], | ||
"exclude": [] | ||
/* | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.json" | ||
} | ||
] | ||
*/ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a drive-by refactor, I'm creating this tsconfig, which I intent to share from other packages of the repo.
@@ -0,0 +1,77 @@ | |||
# Copilot Instructions for React Native Node-API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created this as part of my use of Copilot.
57a5fbf
to
898559b
Compare
As part of #254 I wanted to use the CMake file API to read target information - this took me and my Copilot agent down a vibe-coding rabbit hole and this PR serves as proof of what was committed to the repo when I woke up the next morning 🫨
To be clear:
What is this madness?
The CMake File API provides an interface for querying CMake's configuration and project information.
The API is based on files, where queries are written by client tools and read by CMake and replies are then written by CMake and read by client tools. The API is versioned, and the current version is v1 and these files are located in a directory named
.cmake/api/v1
in the build directory.This package provides a TypeScript interface to create query files and read replies and is intended to serve the same purpose to the TypeScript community that the
cmake-file-api
crate, serves to the Rust community.Note
Introduce
packages/cmake-file-api
providing TS schemas and helpers to write CMake queries and read replies, plus repo config updates and VS Code task.packages/cmake-file-api
ReplyIndexV1
,CodemodelV2
,TargetV2
(v2.0–2.8),CacheV2
,CmakeFilesV1
(v1.0–1.1),ToolchainsV1
,ConfigureLogV1
insrc/schemas/**/*
.src/query.ts
):createSharedStatelessQuery
,createClientStatelessQuery
,createClientStatefulQuery
.src/reply.ts
):findCurrentReplyIndexPath
,readReplyIndex
,isReplyErrorIndexPath
,readReplyErrorIndex
,readCodemodel
,readCurrentSharedCodemodel
,readCurrentTargets
,readCurrentTargetsDeep
,readTarget
,readCache
,readCmakeFiles
,readToolchains
,readConfigureLog
.src/index.ts
andsrc/schemas.ts
.README.md
, bundled CMake docs (docs/cmake-file-api.7.rst.txt
), extensive tests (src/*.test.ts
), packagetsconfig.json
andtsconfig.tests.json
.cmake-file-api
(rootpackage.json
,tsconfig.json
)..vscode/tasks.json
to runcmake-file-api
tests..github/copilot-instructions.md
,packages/cmake-file-api/copilot-instructions.md
).configs/tsconfig.node-tests.json
; broaden includes/excludes inconfigs/tsconfig.node.json
;packages/cli-utils/tsconfig.json
now extendsconfigs/tsconfig.node.json
.package-lock.json
) aligning dependent package versions.Written by Cursor Bugbot for commit 61303ee. This will update automatically on new commits. Configure here.