Repository navigation
Say in AGENTS.md how to get the data, build and run the examples - #26
Merged
Merged
Conversation
AGENTS.md now opens with "Run the examples", which takes a fresh clone to the output of the on-premise Device Detection and IP Intelligence getting-started examples in order. It covers the prerequisites, the free data files in the layout on rc today and in the data submodule that #22 moves to, the npm install and native module build the on-premise packages need, the commands that run the examples, what their output looks like, the cloud examples' resource keys, and the pitfalls found in the repository. The sections after it are unchanged.
#22 moves the examples, tests and CI to the data repository in cxx/data, and merges before this. The run steps now give only that layout. The steps and pitfalls for the old data submodules and Git LFS are gone, and so is the choice between two layouts. The getting-started examples read their free file from cxx/data by a path relative to exampleUtils.js and run the download script when it is missing, so the steps say so, and the pitfall about the 10 second search is gone, because these examples no longer search. The line endings pitfall is gone, because the data repository keeps its shell script LF.
jwrosewell
marked this pull request as ready for review
November 4, 2026 17:24
Merged
jwrosewell
added a commit
that referenced
this pull request
Nov 4, 2026
Releases what has collected on `rc` since #24: - [#23](#23) Describe the rc approach to releases in AGENTS.md - [#22](#22) Move the examples, tests and CI to the cxx data submodule - [#26](#26) Say in AGENTS.md how to get the data, build and run the examples - [#29](#29) Give each package a homepage and fix the links its README carries - [#25](#25) Check the callback URL before the JavaScript builder writes it - [#28](#28) Stop the data file watcher and update timer keeping pipelines alive The cxx submodule moves from [4.5.102](https://github.com/51Degrees/51degrees-cxx/releases/tag/4.5.102) to [4.5.103](https://github.com/51Degrees/51degrees-cxx/releases/tag/4.5.103). That release adds the [data](https://github.com/51Degrees/data) repository at `cxx/data` and changes nothing under `src/`. No commit asks for a major or minor version change, so the publish moves only patch numbers. The last release into `main` was #24, merged at 09:24 UTC on 4 November 2026.
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.
Merge order
Merge this after #22, which moves the examples, tests and CI to the data
repository in
cxx/data. The run steps here describe only that layout, sothey are wrong on
rcuntil #22 is in.Why
AGENTS.mdheld notes for changing the code, and nothing on running anexample. Someone new to the repository, asked only to get an example running
and show it, had to piece the steps together from the root README, the two
product readmes, the two
run_examples.mdfiles, the CI scripts and theexample sources. The step most likely to be missed is the native module, which
every on-premise example needs before it can load, because the examples use
the packages in this repository rather than the ones published to npm.
What changes
AGENTS.mdopens with a new section, "Run the examples", which gives thesteps in order for the on-premise
gettingstarted-consoleexamples of DeviceDetection and IP Intelligence.
ci/options.jsonandSUPPORTED_NODE_MAJOR_VERSIONSinip-intelligence/ensure-native-module.js,and node-gyp 12's Node.js range from the comment in
ci/build-extension.ps1. The toolchain is the one the product readmes'"Build from Source On-Premise" sections give, with the
apt-getlineci/build-extension.ps1runs on Linux. The data file tools are the onesthe data repository's scripts need,
curl,gzipandmd5sum(md5onmacOS) on Linux and macOS, and Windows PowerShell 5.1 or PowerShell 7 on
Windows.
cxx/data, andcxx/data/get-data-files.shorget-data-files.ps1downloads them, asMove the examples, tests and CI to the cxx data submodule #22's README says. On Windows the step runs the script with
powershell -NoProfile -ExecutionPolicy Bypass -File, asgetDataFilesCommandin eachexampleUtils.jsdoes, because the policyWindows sets by default can refuse a script file. The size checks are the
minimums the data repository's
Download scripts
workflow checks.
npm installis the README's. The Device Detection module isbuilt as
ci/build-extension.ps1builds it, withnpx --yes node-gyp@12 configureandbuild, then copied to the namedeviceDetectionOnPremise.jsloads, which the README describes.For IP Intelligence it uses
ensure-native-module.js, whichip-intelligence/readme.mdgives as the one command that does every step.node gettingStarted.js,as
run_examples.mdsays and asci/run-integration-tests.ps1runs the webexamples. Both examples ask for their Lite file by name, and
findFileineach
exampleUtils.jsreads a linked file fromcxx/data, by a pathrelative to that file, and runs the download script when it is missing.
51DEGREES_DD_PATHor51DEGREES_IPI_PATHis looked at first.gettingStarted.jsfiles, theexampleConstants.jsanddataExtension.jsof each shared package andcheckDataFileandgetLinkedFilein eachexampleUtils.js. The IPIntelligence example runs on the Lite file, because
getValueHelpercatches the error for a property the file lacks and prints
Unknown (...).device-detection/readme.mdandip-intelligence/readme.md. The keynames come from each cloud package's
examples/cloud/exampleUtils.js, andthe Device Detection example reads
51d.jsonfrom the working folder(
fs.readFileSync('51d.json')).moduleDirNotFoundandnativeModuleNotFoundindevice-detection/fiftyone.devicedetection.shared/errorMessages.js, thewarning about
npm installis in both product readmes,win_warn_as_erroris in both
binding.51dfiles, the WSL note isip-intelligence/readme.md's,and the CI links are in
ci/fetch-assets.ps1and the twotests/testHelper.jsfiles.The second commit removes what the first said about the layout
rchadbefore #22, being the steps for the old data submodules and Git LFS, the
choice between two layouts, the Git LFS pointer pitfall, the pitfall about the
10 second search, which these examples no longer make, and the line endings
pitfall. The data repository's
.gitattributeskeeps its shell script and its links LF, so the line endings pitfall no longer
applies. The CI pitfall now says CI reads the Lite IP Intelligence file only
when it has no IP Intelligence licence, because #22's
ci/fetch-assets.ps1downloads the free files that no asset covers.
Every other section is unchanged, and the "Releases" section is kept as it
is. #22 rewrites the "Data files" notes further down, which this pull request
leaves alone.
How it was checked
Move the examples, tests and CI to the cxx data submodule #22's head (266c1b4), being both
exampleUtils.jsfiles, bothgettingStarted.jsfiles,ci/fetch-assets.ps1and the Device Detectiontests/testHelper.js, and against the data repository at the commitcxx 4.5.103 pins (e448dcf) for the scripts and their options.
git merge-treemerges this branch with Move the examples, tests and CI to the cxx data submodule #22's head, and withrc, with noconflict, and the merged run steps name neither old data submodule.
AGENTS.mdalone.Commands that neither CI nor the README gives
node -p "process.platform + '-' + process.arch + '-' + process.versions.node.split('.')[0]",which prints the part of the module name that
deviceDetectionOnPremise.jsbuilds from
os.platform(),process.archand the major version, and thecpto that name, which the README describes in words.node ip-intelligence/ensure-native-module.js.ip-intelligence/readme.mdsays to run
node ensure-native-module.js"from the repository root",which was the root of the repository the folder came from. The script
finds the package from its own folder, so it runs from anywhere.
cdback to the root after each step, and theenv 51DEGREES_IPI_PATH=...form, which follows from the variable names in the example sources.
Still to do
against the Lite files, and the native build has not been run from these
steps. A run from a fresh clone, following only
AGENTS.md, is the check.