Repository navigation
Run the IP Intelligence mixed API example on the free data files, and name what needs the Enterprise files - #111
Merged
Merged
Conversation
… what needs the Enterprise data files
…nterprise properties they lack
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
The IP Intelligence mixed API example, which runs a local copy of the cloud service's API on both on-premise engines, does not run from a fresh clone as the other examples do (gap DX-node-29, left under "Not changed" in #32 and "What remains" in #95). At 7539a0be:
TAC-HashV41.hash,51Degrees-EnterpriseV4.1.hashand51Degrees-EnterpriseIpiV41.ipibefore the Lite files (gettingStarted.jslines 97 to 107 and the loops at lines 281 and 292). The data repository links none of those three, soExampleUtils.findFilesearches the disk for each for up to 10 seconds (exampleUtils.jslines 42 and 250 to 258) before it takes a Lite file.gettingStarted.test.jsline 57).What the specification says
device-detection-specification/required-examples.mdlines 20 to 23 at c8128ca4:The same page, lines 101 to 113, asks each example to show what only the Enterprise Data File can do, saying of each such Property the data file in use cannot give that it needs the Enterprise Data File, and once giving a link to the contact page to ask for a copy. The IP Intelligence page, lines 80 to 91, applies the same rules and names
Latitude,LongitudeandAreasamong the Properties only the Enterprise data file holds.What changed
51Degrees-LiteV4.1.hashand51Degrees-LiteV41.ipi, which it downloads when they are missing. A paid file can still be given as the first and second command line arguments, or in_51DEGREES_DD_PATHand_51DEGREES_IPI_PATH, whichfindDeviceDataFileandfindDataFileread first.HardwareVendor,HardwareName,DeviceType,Country,Latitude,LongitudeandAreasthat the data file in use does not have, as needing the Enterprise data file, and then gives the tagged contact link once. The Find out more section #103 added still follows.This follows 51degrees-dotnet#175, which made the same change to .NET's mixed API example.
Tests
A new test in
examplesWithoutSettings.test.jsstarts the API in its own process on the free Lite files, with every data file and licence key setting removed, asks it for/accessibleproperties, and checks that the answer holds both engines, that the output namesHardwareVendor,CountryandLatitudeas needing the Enterprise data file, gives the contact link, and ends with the Find out more section.The two commits were first made on #103's branch and then put on
rconce #103 had merged, with no other change.Full build
Run 43576065332 on
tmp/pr-matrix-111, started bytools/pr-matrix.pywithout macOS. All 7Setting 'PullRequestSha'lines give this head, d6edecb, and Configure printed "Left out 2 macOS entries". Each of the six Build and Test jobs, Ubuntu, Ubuntu ARM and Windows on Node.js 22 and 24, passed 1,481 unit tests with 2 skipped and 151 integration tests with 4 skipped, and in each the IP IntelligenceexamplesWithoutSettings.test.js, which holds the new test, passed.macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.
What remains
The API's port, 5225, is fixed, so the test uses it too.