Skip to content

Commit

Permalink
Gh #734 update dry run (#771)
Browse files Browse the repository at this point in the history
* [gh-#734] lookup providerConfig by the yaml

* [gh-#734] 0.24.5
  • Loading branch information
khaliqgant authored Jul 13, 2023
1 parent 225af2b commit 1877cd3
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 38 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions packages/cli/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- nango

nango-server:
image: nangohq/nango-server:0.24.4
image: nangohq/nango-server:0.24.5
container_name: nango-server
environment:
- TEMPORAL_ADDRESS=temporal:7233
Expand Down Expand Up @@ -47,7 +47,7 @@ services:
- nango

nango-worker:
image: nangohq/nango-worker:0.24.4
image: nangohq/nango-worker:0.24.5
container_name: nango-worker
restart: always
ports:
Expand Down
13 changes: 8 additions & 5 deletions packages/cli/lib/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import type {
NangoConfig,
Connection as NangoConnection,
NangoIntegration,
NangoIntegrationData
NangoIntegrationData,
SimplifiedNangoIntegration
} from '@nangohq/shared';
import { loadSimplifiedConfig, cloudHost, stagingHost, SyncType, syncRunService, nangoConfigFile, checkForIntegrationFile } from '@nangohq/shared';
import {
Expand All @@ -37,7 +38,6 @@ import {
buildInterfaces,
enrichHeaders,
getNangoRootPath,
getProviderBySyncName,
printDebug
} from './utils.js';
import type { DeployOptions, GlobalOptions } from './types.js';
Expand Down Expand Up @@ -283,7 +283,7 @@ const createModelFile = (notify = false) => {
}
};

const getConfig = async (debug = false) => {
const getConfig = async (debug = false): Promise<SimplifiedNangoIntegration[]> => {
const config = await loadSimplifiedConfig('./');

if (!config) {
Expand Down Expand Up @@ -508,7 +508,8 @@ async function deploySyncs(url: string, body: { syncs: IncomingSyncConfig[]; rec
}

export const dryRun = async (options: RunArgs, environment: string, debug = false) => {
let syncName, connectionId, suppliedLastSyncDate;
let syncName = '';
let connectionId, suppliedLastSyncDate;

await parseSecretKey(environment, debug);

Expand Down Expand Up @@ -537,7 +538,9 @@ export const dryRun = async (options: RunArgs, environment: string, debug = fals
return;
}

const providerConfigKey = await getProviderBySyncName({ syncName }, debug);
const config = await getConfig(debug);

const providerConfigKey = config.find((config) => config.syncs.find((sync) => sync.name === syncName))?.providerConfigKey;

if (!providerConfigKey) {
console.log(chalk.red(`Provider config key not found, please check that the provider exists for this sync name: ${syncName}`));
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nango",
"version": "0.24.4",
"version": "0.24.5",
"description": "Nango's CLI tool.",
"type": "module",
"main": "dist/index.js",
Expand All @@ -23,7 +23,7 @@
"dependencies": {
"@babel/traverse": "^7.22.5",
"@inquirer/prompts": "^2.3.0",
"@nangohq/shared": "0.24.4",
"@nangohq/shared": "0.24.5",
"@vercel/ncc": "^0.36.1",
"axios": "^1.2.0",
"byots": "^5.0.0-dev.20221103.1.34",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nangohq/frontend",
"version": "0.24.4",
"version": "0.24.5",
"description": "Nango's frontend library for OAuth handling.",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/node-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nangohq/node",
"version": "0.24.4",
"version": "0.24.5",
"description": "Nango's Node client.",
"type": "module",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nangohq/nango-server",
"version": "0.24.4",
"version": "0.24.5",
"description": "Nango OAuth's server.",
"type": "module",
"main": "dist/server.js",
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@hapi/boom": "^10.0.1",
"@nangohq/shared": "0.24.4",
"@nangohq/shared": "0.24.5",
"@sentry/node": "^7.37.2",
"@temporalio/client": "^1.7.4",
"axios": "^1.3.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nangohq/shared",
"version": "0.24.4",
"version": "0.24.5",
"description": "Nango's shared components.",
"type": "module",
"main": "dist/lib/index.js",
Expand All @@ -18,7 +18,7 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.348.0",
"@hapi/boom": "^10.0.1",
"@nangohq/node": "0.24.4",
"@nangohq/node": "0.24.5",
"@sentry/node": "^7.37.2",
"@temporalio/client": "^1.5.2",
"@types/fs-extra": "^11.0.1",
Expand Down
18 changes: 9 additions & 9 deletions packages/webapp/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "webapp",
"version": "0.24.4",
"version": "0.24.5",
"private": true,
"dependencies": {
"@geist-ui/core": "^2.3.8",
"@geist-ui/icons": "^1.0.2",
"@headlessui/react": "^1.7.12",
"@heroicons/react": "^2.0.16",
"@mantine/prism": "^5.10.5",
"@nangohq/frontend": "0.24.4",
"@nangohq/frontend": "0.24.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nangohq/nango-worker",
"version": "0.24.4",
"version": "0.24.5",
"type": "module",
"main": "dist/worker.js",
"scripts": {
Expand All @@ -15,7 +15,7 @@
"directory": "packages/worker"
},
"dependencies": {
"@nangohq/shared": "0.24.4",
"@nangohq/shared": "0.24.5",
"@temporalio/activity": "^1.5.2",
"@temporalio/client": "^1.5.2",
"@temporalio/worker": "^1.5.2",
Expand Down

0 comments on commit 1877cd3

Please sign in to comment.