Skip to content

Commit

Permalink
Merge pull request #22 from fastnai/prerelease-v0.1.3
Browse files Browse the repository at this point in the history
update connector apis, fix compatibilty issue
  • Loading branch information
saqadir authored Sep 11, 2024
2 parents 6539a86 + b9b7155 commit 0e20d74
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 37 deletions.
21 changes: 4 additions & 17 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "fastn-deploy-flow-action",
"description": "Github action for deploying flows between Fastn projects",
"version": "0.1.0",
"author": "",
"version": "0.1.3",
"author": "Fastn, Inc.",
"private": true,
"homepage": "https://github.com/actions/javascript-action#readme",
"repository": {
Expand Down
17 changes: 2 additions & 15 deletions src/apis/connectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ async function importConnectors(
variables: {
input: {
projectId,
connectorId: orgId,
connectors: transformData(connectors)
orgId,
connectors
}
}
})
Expand All @@ -65,19 +65,6 @@ async function importConnectors(
}
}

// for backwards compatibility, TODO deprecate later
function transformData(originalData) {
return originalData.map(obj => {
// Create a new object with the updated key
const newObj = {
...obj,
connectors: obj.dataSources
}

return newObj
})
}

module.exports = {
exportConnectors,
importConnectors
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function run() {
const exportedConnectors = await exportConnectors(
srcAuthToken,
srcConnectorOrgId === 'community' ? 'community' : srcProjectId,
srcConnectorOrgId,
srcConnectorOrgId || srcProjectId,
splitString(srcConnectorIdInput),
splitString(srcConnectorGroupIdInput),
srcDomain
Expand All @@ -106,7 +106,7 @@ async function run() {
await importConnectors(
desAuthToken,
desConnectorOrgId === 'community' ? 'community' : desProjectId,
desConnectorOrgId,
desConnectorOrgId || desProjectId,
exportedConnectors,
desDomain
)
Expand Down

0 comments on commit 0e20d74

Please sign in to comment.