
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@leisurelink/lla-sync
Advanced tools
This module is meant to provide much of the groundwork for synchronization of ARI data between a third party supplier and the LeisureLink Public API. Simply put, once the module is initialized and configured, the user can provide the module with an array
This module is meant to provide much of the groundwork for synchronization of ARI data between a third party supplier and the LeisureLink Public API. Simply put, once the module is initialized and configured, the user can provide the module with an array of user-defined 'unit' objects along with the sync operations to perform and the module will return the user-defined 'unit' data with details regarding the operations that were performed and whether they were successful.
Implementing the lla-sync module into a project can be broken into two pieces: configuration and synchronization.
The configuration portion of using the lla-sync module is the most complicated part of using the module.
This function will instantiate the module.
mapper - The instantiated mapper object (assumes the lla-mapper function contract)apiClient - The instantiated LeisureLink client object (assumes the dreamcatcher-client function contract)options - Optional configuration for fine-tuning
apiRetries - Number of attempts to retry a LeisureLink API call upon "recoverable" failuresapiRetryDelay - Seconds to wait after a "recoverable" failureconcurrencyLimit - Max number of concurrent operations to perform for a single call to syncdebugMode - Not implementedThis function will define how to lookup a mapping incase specific mapping details aren't provided for an operation.
mappingType - Name of the mapping used by mappermappingKeyFnc - Fcn that takes a user-defined 'unit' object and outputs the external key for lla-mapperThis function will configure a single sync operation that can be triggered later.
syncOperation - Name of the sync operationtransformFnc - Fnc that takes an object and outputs the body of the API callmappingType - Optional name of the non-default mapping used by lla-mappermappingKeyFnc - Optional non-default fnc that takes an object and outputs an external keyvar lla_sync = require('lla-sync');
// initialize the module
var syncModule = lla_sync({
mapper: lla_mapper,
apiClient: dreamcatcherClient,
options: {
apiRetries: 5,
apiRetryDelay: 10,
concurrencyLimit: 50,
debugMode: false
}
});
// configure a default mapping settings to be used if specific settings aren't defined for an operation
syncModule.configureDefaultMappingSettings({
mappingType: 'rentalUnit',
mappingKeyFnc: getExternalKeyFnc
});
// configure an operation that can be run later
syncModule.configureSyncOperation({
syncOperation: 'specialAvailability',
transformFnc: transformSpecialFnc,
mappingType: 'special',
mappingKeyFnc: getSpecialExternalKeyFnc
});
// configure an operation that uses the default mapping settings
// requires running configureDefaultMappingSettings first
syncModule.configureSyncOperation({
syncOperation: 'availability',
transformFnc: transformAvailabilityFnc
});
Once the module has been appropriately configured, the operations to run and the user-defined 'unit' data can be provided to the sync function.
syncOperations - Array of sync operation names to performsyncData
startDate - Date string representing the first day to syncendDate - Date string representing the last day to syncdata - Array of user-defined 'unit' objectscallback - Fnc to handle the error/resultsIf no critical error occurs during synchronization, the callback will receive an array of units with information regarding the result of its sync operations. Each unit will contain the following data:
supplierUnit - The user-defined object that was provided to the sync functionsyncOperations - Dictionary of the sync operations that were run for the unitEach sync operation object will contain the following data:
mapping - The mapping that was retrieved for the unitsuccessful - Boolean representing whether the operation completed successfullyerror - Standard error object if synchronization failedtimestamp - Timestamp when successful was set// prepare the data
var syncData = {
startDate: '2015-10-16',
endDate: '2016-10-16',
data: [ {}, {} ] // should contain real data
};
// synchronize!
syncModule.sync(
['availability','specialAvailability'],
syncData,
function(error, results) {
// handle error/result data
});
FAQs
This module is meant to provide much of the groundwork for synchronization of ARI data between a third party supplier and the LeisureLink Public API. Simply put, once the module is initialized and configured, the user can provide the module with an array
The npm package @leisurelink/lla-sync receives a total of 0 weekly downloads. As such, @leisurelink/lla-sync popularity was classified as not popular.
We found that @leisurelink/lla-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.