-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1844 from rudderlabs/release/v1.100.0
chore(release): pull release/v1.100.0 into main
- Loading branch information
Showing
33 changed files
with
399 additions
and
197 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* eslint-disable no-console */ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const destinationsDir = path.join(__dirname, '../src/configurations/destinations'); | ||
|
||
function findJsonMapperDestinations() { | ||
try { | ||
if (!fs.existsSync(destinationsDir)) { | ||
throw new Error(`Destinations directory not found: ${destinationsDir}`); | ||
} | ||
return fs | ||
.readdirSync(destinationsDir) | ||
.map((destination) => { | ||
try { | ||
const destinationsFilePath = path.join(destinationsDir, destination, 'db-config.json'); | ||
if (!fs.existsSync(destinationsFilePath)) { | ||
console.warn(`Skipping ${destination}: Missing configuration file`); | ||
return null; | ||
} | ||
const destinationsContent = fs.readFileSync(destinationsFilePath, 'utf8'); | ||
const destinationDefinition = JSON.parse(destinationsContent); | ||
if (!destinationDefinition.name) { | ||
console.warn(`Skipping ${destination}: Missing name`); | ||
return null; | ||
} | ||
return { | ||
name: destinationDefinition.name, | ||
config: destinationDefinition.config, | ||
}; | ||
} catch (err) { | ||
console.error(`Error processing ${destination}:`, err.message); | ||
return null; | ||
} | ||
}) | ||
.filter(Boolean) | ||
.filter( | ||
(destination) => | ||
!destination.config?.disableJsonMapper && !destination.config?.supportsVisualMapper, | ||
) | ||
.map((destination) => destination.name); | ||
} catch (err) { | ||
console.error('Failed to process destinations:', err.message); | ||
return []; | ||
} | ||
} | ||
|
||
console.log(findJsonMapperDestinations().join('\n')); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.