fiftyone.geolocation
Advanced tools
Comparing version 4.3.1 to 4.3.3
@@ -5,2 +5,31 @@ # Continuous Integration Tips | ||
1. Always verify that the result of the script is as expected. Such as checking error code or checking if a certain conditions have been met. This can be done at a number of places in the script where a certain change could impact the final outcome. | ||
2. Where a required condition was not met, log a message and exit with an appropriate non zero code. This will make sure the exit code will always be caught by the script task. | ||
2. Where a required condition was not met, log a message and exit with an appropriate non zero code. This will make sure the exit code will always be caught by the script task. | ||
## Using variables from other jobs | ||
When a variable in a separate job, in a separate template is required you may need to output it manually depending on the task that sets the variable. | ||
For example the GitVersion task does not output variables it produces to the pipeline, you must create a separate script task to echo the variable like so: | ||
```yml | ||
- job: Tagging | ||
steps: | ||
# GitVersion task here. | ||
# Output the GitVersion.SemVer variable so it can be used in other jobs. | ||
- script: echo "##vso[task.setvariable variable=GitVersionSemVer;isOutput=true]$(GitVersion.SemVer)" | ||
name: setvarStep | ||
``` | ||
Then you can access the variable in a separate job like: | ||
```yml | ||
- job: Build | ||
dependsOn: Tagging | ||
variables: | ||
# map the output variable from A into this job | ||
varFromTagJob: $[ dependencies.Tagging.outputs['setvarStep.GitVersionSemVer'] ] | ||
steps: | ||
- script: echo $(varFromTagJob) # this step uses the mapped-in variable | ||
``` |
@@ -8,2 +8,16 @@ # Java Specific CI/CD Approach | ||
2. The process requires the `.asc` file to be imported using `gpg`. | ||
3. Then the result package will be signed as part of Maven `install` process using `maven-gpg-plugin`. | ||
3. Then the result package will be signed as part of Maven `install` process using `maven-gpg-plugin`. | ||
## Deploy External | ||
The deployment to external of Java Maven packages must be done in the following order: | ||
1. `pipeline-java` | ||
2. `device-detection-java` | ||
3. `location-java` | ||
Steps for each java repo: | ||
1. Deploy packages to Nexus staging area - automatic. | ||
2. Deploy from Nexus staging to Maven Central - requires approval. | ||
3. Deploy to GitHub - requires approval. | ||
All Java APIs share a staging area, so occasionally repositories are left in the staging area as a results of a possible cancellation or an unwanted pipeline termination, etc. This sometimes causes the deployment to staging to fail. In this case, it is the best to login to the Nexus staging area and manually drop all unwanted repositories and rerun the deployment process. |
# Common-CI | ||
Common-CI project contains a guideline for creation of continuous integration scripts and describes a general approach to continuous integration within 51Degrees. This readme should provide a comprehensive overview of rules and conventions to be expected from existing jobs and which should be followed when new jobs are created. | ||
**NOTE**: A Release Engineer following this guide should first check the `internal-ci` readme to understand the 51Degrees release process. | ||
# Table of content | ||
@@ -29,2 +31,6 @@ - [Common-CI](#common-ci) | ||
- [Automation](#automation) | ||
- [Fully automated release process](#fully-automated-release-process) | ||
- [Additional pipelines:](#additional-pipelines) | ||
- [Updating the Release Configuration](#updating-the-release-configuration) | ||
- [Fully automated deployment trigger procedure:](#fully-automated-deployment-trigger-procedure) | ||
- [Automated Release Scripts](#automated-release-scripts) | ||
@@ -216,2 +222,5 @@ - [Flow Chart](#flow-chart) | ||
## Release process | ||
Refer to the `internal-ci` readme for instruction on 51Degrees release process. | ||
### Packages release | ||
@@ -229,2 +238,3 @@ Packages release process in 51Degrees is handled through Azure DevOps and the deployment to the public repositories is performed manually using packages generated by [Create packages](#create-packages) continuous integration job. As explained in “[Create packages](#create-packages)” section, process of creating the packages is automatically triggered by completion of pull request to the `main` branch of the repository. Created packages are stored as artifacts in Azure DevOps Artifacts and are used in internal release pipelines in order to upload them to the public package managers/repositories. | ||
51Degrees provides APIs for a selection of programming languages and packages are available on the following public package managers: | ||
- [NuGet](https://www.nuget.org/profiles/51Degrees) | ||
@@ -238,16 +248,24 @@ - [Maven](https://mvnrepository.com/artifact/com.51degrees) | ||
## Automation | ||
Fully automated release process use the following flow: | ||
### Fully automated release process | ||
The release process uses the following flow: | ||
1. Changes are prepared in `release|hotfix` branches. | ||
2. `Trigger release` job starts; or all `leaf submodules` are manually or automatically merged to `main|master`. | ||
3. All `leaf submodules` `release|hotfix` branches are merged to `main`. | ||
2. Switch `AutomatedRelease` variable in `CIAutomation` variable group to `On`. | ||
3. `Trigger release` job starts; or all `leaf submodules` are manually or automatically merged to `main|master`. | ||
1. Since `common-ci` is a submodule of all APIs, this is normally done by having `common-ci` `release|hotfix` branch merged to `main`. | ||
2. To merge `common-ci` `release|hotfix` branch to `main`, creating a pull request to `main` is enough since the pull request will be automatically completed at the end of the pull request `build-and-test` check. This is done by a task that calls a set of APIs in `Release` modules. | ||
4. All `leaf submodules` `release|hotfix` branches are merged to `main`. | ||
1. NOTE: `leaf submodules` are modules which do not have any dependencies. | ||
4. Completion of submodule merging triggers tag and packages deployment of the submodules. If module does not generate packages, then it will be the tag creation step. | ||
5. Tag and package deployment (or creation) completion triggers merging of the `release|hotfix` branches of the modules which depend on these submodules. | ||
6. Completion of merging `release|hotfix` branches to `main` will also trigger `deployment` of packages both internally and externally in the same way that the submodules were done. | ||
7. At the end of the `release` process, packages are available to be collected internally; and `deployment` to external reposition are left to be approved by `release engineer`. | ||
5. Completion of submodule merging triggers tag and packages deployment of the submodules. If module does not generate packages, then it will be the tag creation step. | ||
6. Tag and package deployment (or creation) completion triggers `submodule_trigger` pipelines of the parent APIs, which will then update submodule references, package dependencies versions and create a pull request to `main` if one does not exist. | ||
7. The pull request of parent APIs will then again be completed once the `build_and_test` check passes. | ||
8. Completion of merging `release|hotfix` branches to `main` will also trigger `deployment` of packages both internally and externally in the same way that the submodules were done. | ||
9. At the end of the `release` process, packages are available to be collected internally; and `deployment` to external repositories are left to be approved by `release engineer`. | ||
10. Switch `AutomatedRelease` variable in `CIAutomation` variable group to `Off` to prevent any accidental references update or pull request completion after this stage. | ||
The fully automated release process is controlled by a `release-config.json` file, located in the `common-ci` repository. The automated release process can also be enabled or disabled by a global variable `AutomatedRelease` as part of the Azure Devops variable group `CIAutomation`. To support automating the deployment process, powershell scripts and additional pipelines are required. These scripts are located under `common-ci` repository, and are grouped into modules. The additional pipelines are required per API, but shared templated can be reused from `common-ci`. | ||
The fully automated release process is controlled by a `release-config.json` file, located in the `common-ci` repository. There also exists a `release-config-template.json` which contains all settings and APIs that can be included in a `release-config.json`. The automated release process can also be enabled or disabled by a global variable `AutomatedRelease` as part of the Azure Devops variable group `CIAutomation`. To support automating the deployment process, powershell scripts and additional pipelines are required. These scripts are located under `common-ci` repository, and are grouped into modules. The additional pipelines are required per API, but shared templated can be reused from `common-ci`. | ||
Additional pipelines: | ||
- The `submodule trigger` pipeline is required for each API to pick up the package deployment from each of its submodules. Since a module can have multiple submodules, multiple triggers might happen at the same time. Thus, this pipeline should cancel all previous builds and only one at a single time. | ||
### Additional pipelines: | ||
- The `submodule trigger` pipeline is required for each API to pick up the package deployment from each of its submodules. Since a module can have multiple submodules, multiple triggers might happen at the same time. Thus, this pipeline should cancel all previous builds and only run one at a single time. | ||
- This must be triggered only by a submodule deployment that happened on the 'main' branch. | ||
@@ -260,4 +278,47 @@ - This pipeline, will then perform update of all submodule references and package dependencies, using the versions specified in the `release-config.json`. | ||
- The pull request has been approved and comments have been left unresolved; or approval is not required. | ||
- Both of the above pipelines will not proceed if a tag already exists for a release version. | ||
Fully automated deployment trigger procedure: | ||
### Updating the Release Configuration | ||
The release configuration files must be updated to configure which repositories will be released. Each repository can be configured with the following fields: | ||
**Files to update:** | ||
- `release-config.json` | ||
- `cloud-release-config.json` | ||
Property|Type|Description | ||
-|-|- | ||
version|string|The target version of this repository, e.g. the version to release or the current version if a release version does not exist. Should be a valid Semantic Version e.g. `4.3.1` | ||
packageName|string|The name of the package that this repository contains code for. E.g. FiftyOne.Pipeline | ||
versionVariableName|string|The variable name used in pipelines to update dependencies. | ||
isLeaf|boolean|Is this a leaf of the dependency tree, i.e. does this repository have no dependencies? | ||
dependencies|string[]|A list of dependencies, these are the names of the repositories that this one is dependent on or contains dependencies of the contained projects. | ||
While the cloud release **is not** triggered by the automated API release, the `cloud-release-config.json` file will also need to be updated in preparation for the cloud release the following week. Only the version numbers must be updated in this file. | ||
A `release-config-template.json` file is provided which contains configurations for all the repos with a release pipeline, this should be used as a reference to modify the release config files. Only edit this file if adding a new repo configuration and updating dependencies. | ||
**Rules** | ||
There are some **rules** that a release engineer will need to pay attention to when updating the file: | ||
1. `packageName`: This name is used to search for matching package reference in a package file of a target language. This is used as part of a regular expression search so regex syntax can also be used. Most of the time, the value will just be a prefix of the package name since an API usually uses unique prefix such as `FiftyOne.DeviceDetection`. However, there are APIs which use more than one prefixes such as `license-dotnet`, where `FiftyOne.License` and `FiftyOne.Resource` are used. In this specific case, the value of a `packageName` can be `FiftyOne.(License|Resource)`. Currently `DotNet` is only one which tests and supports regex `packageName`. Others language APIs have unique package `prefix` so regex is not required. | ||
2. `dependencies`: When specify dependencies, make sure the definition of the dependencies are also specified, so that the release process can detect what tag to update to for submodule reference or what version to be updated for package dependencies. Failing to include the dependency definition will result in submodule references and package dependencies not being updated. | ||
1. A `dependency` can be either a submodule or a package dependency. | ||
**Validation** | ||
Once the files have been updated, they can be validated by running the following PowerShell commands: | ||
- `Get-Content release-config.json | Out-String | ConvertFrom-Json` - Test JSON is valid | ||
- `Test-Json -Json "$(Get-Content .\release-config.json)" -SchemaFile .\release-config-schema.json` - Test the file matches the release-config schema. | ||
Steps to make changes and update the release config in common-ci repo: | ||
1. create new hotfix / release branch in common-ci and push to the remote - | ||
1. When determining the branch name for the common-ci hotfix or release branch, typically the version should be the same MAJOR and MINOR version of the API releases however the PATCH version does not need to match and should simply be incremented from the previous version in common-ci. See [validating branch names](#validate-the-release--hotfix-branch-names). | ||
2. create new feature branch for release config in common-ci and push to the remote | ||
3. update release config with repos, deps and versions for both | ||
4. commit modified release config to feature branch and create a pr from the feature branch into the release / hotfix branch. | ||
### Fully automated deployment trigger procedure: | ||
1. At the start, `release engineer` will need to update the `release-config.json` to specify all release packages and their target release version. Any additional details should also be specified. | ||
@@ -268,3 +329,3 @@ 1. NOTE: There is a `release-config-template.json` available for references. | ||
1. This pull request can be completed manually or automatically by the `build-and-test.yml` auto completion pull request task. The automatic completion is only enabled if the global variable `AutomatedRelease` specified in the variables group `CIAutomation` is set to `On`. | ||
2. Trigger the `trigger-release` pipeline of the `common-ci`. | ||
2. Trigger the `trigger-release` pipeline of the `common-ci` against the hotfix or release branch. | ||
@@ -271,0 +332,0 @@ ### Automated Release Scripts |
@@ -7,2 +7,6 @@ { | ||
}, | ||
"device-detection-data": { | ||
"version": "4.3.1", | ||
"isLeaf": false | ||
}, | ||
"common-cxx": { | ||
@@ -20,3 +24,4 @@ "version": "4.3.1", | ||
"common-ci", | ||
"common-cxx" | ||
"common-cxx", | ||
"device-detection-data" | ||
] | ||
@@ -126,2 +131,3 @@ }, | ||
"device-detection-cxx", | ||
"caching-dotnet", | ||
"common-dotnet", | ||
@@ -131,2 +137,20 @@ "pipeline-dotnet" | ||
}, | ||
"license-dotnet": { | ||
"version": "4.3.0", | ||
"packageName": "FiftyOne.(License|Resource)", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"entitlement-dotnet": { | ||
"version": "4.1.9", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-dotnet", | ||
"license-dotnet", | ||
"pipeline-dotnet" | ||
] | ||
}, | ||
"internal-engines-dotnet": { | ||
@@ -262,2 +286,27 @@ "version": "4.3.0", | ||
] | ||
}, | ||
"pipeline-wordpress": { | ||
"version": "0.9.0", | ||
"packageName": "fiftyonedegrees.wordpress", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-php-cloudrequestengine" | ||
] | ||
}, | ||
"device-detection-go": { | ||
"version": "4.3.1", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx" | ||
] | ||
}, | ||
"device-detection-examples-go": { | ||
"version": "4.3.0", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-go" | ||
] | ||
} | ||
@@ -264,0 +313,0 @@ }, |
{ | ||
"repositories": { | ||
"common-ci": { | ||
"version": "4.3.2", | ||
"version": "4.3.18", | ||
"isLeaf": true | ||
}, | ||
"device-detection-data": { | ||
"version": "4.3.1", | ||
"isLeaf": false | ||
}, | ||
"common-cxx": { | ||
@@ -15,60 +19,53 @@ "version": "4.3.1", | ||
"device-detection-cxx": { | ||
"version": "4.3.2", | ||
"version": "4.3.8", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-cxx" | ||
"common-cxx", | ||
"device-detection-data" | ||
] | ||
}, | ||
"device-detection-varnish": { | ||
"version": "4.3.0", | ||
"pipeline-php-core": { | ||
"version": "4.3.4", | ||
"packageName": "fiftyone.pipeline.core", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx" | ||
"common-ci" | ||
] | ||
}, | ||
"device-detection-nginx": { | ||
"version": "4.3.1", | ||
"pipeline-php-engines": { | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.pipeline.engines", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx" | ||
"pipeline-php-core" | ||
] | ||
}, | ||
"pipeline-java": { | ||
"version": "4.3.0", | ||
"packageName": "pipeline", | ||
"versionVariableName": "pipeline.version", | ||
"pipeline-php-cloudrequestengine": { | ||
"version": "4.3.4", | ||
"packageName": "fiftyone.pipeline.cloudrequestengine", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"location-java": { | ||
"version": "4.3.0", | ||
"packageName": "pipeline.geo-location", | ||
"versionVariableName": "geolocation.version", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-java", | ||
"device-detection-java" | ||
"pipeline-php-core", | ||
"pipeline-php-engines" | ||
] | ||
}, | ||
"location-onpremise-java": { | ||
"version": "4.3.0", | ||
"packageName": "geo-location.digitalelement", | ||
"versionVariableName": "geolocation.digitalelement.version", | ||
"location-php": { | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.geolocation", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-java", | ||
"location-java" | ||
"pipeline-php-core", | ||
"pipeline-php-engines", | ||
"pipeline-php-cloudrequestengine", | ||
"device-detection-php" | ||
] | ||
}, | ||
"device-detection-java": { | ||
"version": "4.3.0", | ||
"packageName": "pipeline.device-detection", | ||
"versionVariableName": "devicedetection.version", | ||
"device-detection-php-onpremise": { | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.devicedetection", | ||
"isLeaf": false, | ||
@@ -78,76 +75,28 @@ "dependencies": [ | ||
"device-detection-cxx", | ||
"pipeline-java" | ||
"pipeline-php-core", | ||
"pipeline-php-engines" | ||
] | ||
}, | ||
"common-dotnet": { | ||
"version": "4.3.1", | ||
"packageName": "FiftyOne.Common", | ||
"device-detection-php": { | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.devicedetection", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"caching-dotnet": { | ||
"version": "4.3.1", | ||
"packageName": "FiftyOne.Caching", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"pipeline-dotnet": { | ||
"version": "4.3.1", | ||
"packageName": "FiftyOne.Pipeline", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-dotnet", | ||
"caching-dotnet" | ||
"pipeline-php-core", | ||
"pipeline-php-engines", | ||
"pipeline-php-cloudrequestengine" | ||
] | ||
}, | ||
"location-dotnet": { | ||
"version": "4.3.2", | ||
"packageName": "FiftyOne.Geolocation", | ||
"pipeline-wordpress": { | ||
"version": "1.0.1", | ||
"packageName": "fiftyonedegrees.wordpress", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-dotnet", | ||
"pipeline-dotnet", | ||
"device-detection-dotnet" | ||
"pipeline-php-cloudrequestengine" | ||
] | ||
}, | ||
"device-detection-dotnet": { | ||
"version": "4.3.1", | ||
"packageName": "FiftyOne.DeviceDetection", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx", | ||
"common-dotnet", | ||
"pipeline-dotnet" | ||
] | ||
}, | ||
"entitlement-dotnet": { | ||
"version": "4.1.9", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-dotnet", | ||
"pipeline-dotnet" | ||
] | ||
}, | ||
"internal-engines-dotnet": { | ||
"version": "4.3.0", | ||
"packageName": "FiftyOne.GeoLocation.OnPremise", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"common-dotnet", | ||
"pipeline-dotnet", | ||
"device-detection-dotnet", | ||
"location-dotnet" | ||
] | ||
}, | ||
"pipeline-node": { | ||
"version": "4.3.1", | ||
"version": "4.3.5", | ||
"packageName": "fiftyone.pipeline", | ||
@@ -160,3 +109,3 @@ "isLeaf": false, | ||
"location-node": { | ||
"version": "4.3.1", | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.geolocation", | ||
@@ -171,3 +120,3 @@ "isLeaf": false, | ||
"device-detection-node": { | ||
"version": "4.3.1", | ||
"version": "4.3.3", | ||
"packageName": "fiftyone.devicedetection", | ||
@@ -180,93 +129,2 @@ "isLeaf": false, | ||
] | ||
}, | ||
"pipeline-python": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone_pipeline", | ||
"versionVariableName": "pipelineVersion", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"location-python": { | ||
"version": "4.3.0", | ||
"packageName": "fiftyone_location", | ||
"versionVariableName": "locationVersion", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-python" | ||
] | ||
}, | ||
"device-detection-python": { | ||
"version": "4.3.0", | ||
"packageName": "fiftyone_devicedetection", | ||
"versionVariableName": "deviceDetectionVersion", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx", | ||
"pipeline-python" | ||
] | ||
}, | ||
"pipeline-php-core": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.pipeline.core", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci" | ||
] | ||
}, | ||
"pipeline-php-engines": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.pipeline.engines", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-php-core" | ||
] | ||
}, | ||
"pipeline-php-cloudrequestengine": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.pipeline.cloudrequestengine", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-php-core", | ||
"pipeline-php-engines" | ||
] | ||
}, | ||
"location-php": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.geolocation", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-php-core", | ||
"pipeline-php-engines", | ||
"pipeline-php-cloudrequestengine", | ||
"device-detection-php" | ||
] | ||
}, | ||
"device-detection-php-onpremise": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.devicedetection", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"device-detection-cxx", | ||
"pipeline-php-core", | ||
"pipeline-php-engines" | ||
] | ||
}, | ||
"device-detection-php": { | ||
"version": "4.3.1", | ||
"packageName": "fiftyone.devicedetection", | ||
"isLeaf": false, | ||
"dependencies": [ | ||
"common-ci", | ||
"pipeline-php-core", | ||
"pipeline-php-engines", | ||
"pipeline-php-cloudrequestengine" | ||
] | ||
} | ||
@@ -273,0 +131,0 @@ }, |
@@ -64,3 +64,3 @@ /* ********************************************************************* | ||
if (isAsync) { | ||
test('cloud getting started', (done) => { | ||
test('cloud getting started', async (done) => { | ||
setTimeout(done, 1000); | ||
@@ -70,3 +70,3 @@ | ||
}); | ||
test('combining services', (done) => { | ||
test('combining services', async (done) => { | ||
setTimeout(done, 1000); | ||
@@ -76,3 +76,3 @@ | ||
}); | ||
test('configure from file', (done) => { | ||
test('configure from file', async (done) => { | ||
setTimeout(done, 1000); | ||
@@ -79,0 +79,0 @@ |
@@ -23,10 +23,2 @@ /* ********************************************************************* | ||
const require51 = (requestedPackage) => { | ||
try { | ||
return require(__dirname + '/../' + requestedPackage); | ||
} catch (e) { | ||
return require(requestedPackage); | ||
} | ||
}; | ||
const GeoLocationCloud = require('./geoLocationCloud'); | ||
@@ -44,12 +36,13 @@ const CloudRequestEngine = require('fiftyone.pipeline.cloudrequestengine').CloudRequestEngine; | ||
* @param {String} options.locationProvider // the provider to request data from. Either "fiftyonedegrees" or "digitalelement". | ||
* @param {string} options.cloudRequestOrigin The value to set the | ||
* @param {string} options.cloudRequestOrigin The value to set the | ||
* Origin header to when making requests to the cloud service | ||
* | ||
*/ | ||
constructor ({ | ||
shareUsage = true, | ||
resourceKey = null, | ||
locationProvider = 'fiftyonedegrees', | ||
constructor ({ | ||
shareUsage = true, | ||
resourceKey = null, | ||
locationProvider = 'fiftyonedegrees', | ||
baseURL = null, | ||
cloudRequestOrigin = null }) { | ||
cloudRequestOrigin = null | ||
}) { | ||
super(...arguments); | ||
@@ -65,5 +58,5 @@ | ||
const cloudRequestEngineOptions = { | ||
const cloudRequestEngineOptions = { | ||
resourceKey: resourceKey, | ||
cloudRequestOrigin: cloudRequestOrigin | ||
cloudRequestOrigin: cloudRequestOrigin | ||
}; | ||
@@ -70,0 +63,0 @@ if (baseURL !== null) { |
{ | ||
"name": "fiftyone.geolocation", | ||
"version": "4.3.1", | ||
"version": "4.3.3", | ||
"description": "Geo-location services for the 51Degrees Pipeline API", | ||
@@ -20,6 +20,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"fiftyone.pipeline.cloudrequestengine": "^4.3.1", | ||
"fiftyone.pipeline.core": "^4.3.1", | ||
"fiftyone.pipeline.engines": "^4.3.1", | ||
"fiftyone.pipeline.engines.fiftyone": "^4.3.1" | ||
"fiftyone.pipeline.cloudrequestengine": "^4.3.5", | ||
"fiftyone.pipeline.core": "^4.3.5", | ||
"fiftyone.pipeline.engines": "^4.3.5", | ||
"fiftyone.pipeline.engines.fiftyone": "^4.3.5" | ||
}, | ||
@@ -34,3 +34,3 @@ "devDependencies": { | ||
"eslint-plugin-standard": "^4.0.1", | ||
"jest": "^24.9.0", | ||
"jest": "^27.0.6", | ||
"jest-expect-message": "^1.0.2", | ||
@@ -47,3 +47,7 @@ "jest-junit": "^9.0.0" | ||
"jest": { | ||
"setupTestFrameworkScriptFile": "jest-expect-message", | ||
"testRunner": "jest-jasmine2", | ||
"setupFilesAfterEnv": [ | ||
"./setup.js", | ||
"jest-expect-message" | ||
], | ||
"globals": { | ||
@@ -50,0 +54,0 @@ "resourceKey": "!!YOUR_RESOURCE_KEY!!" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
880251
125
6905
19
4