Skip to content

Commit e124060

Browse files
author
Marco Franceschi
committed
chore: Updated sdk version
1 parent 6d290f0 commit e124060

4 files changed

Lines changed: 27 additions & 15 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"bugs": "https://github.com/cloudgraphdev/cli/issues",
1717
"dependencies": {
18-
"@cloudgraph/sdk": "^0.12.0",
18+
"@cloudgraph/sdk": "^0.13.0",
1919
"@graphql-tools/load-files": "^6.3.2",
2020
"@graphql-tools/merge": "^8.2.0",
2121
"@oclif/command": "^1",

src/commands/init.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { StorageEngineConnectionConfig } from '@cloudgraph/sdk'
1+
import {
2+
ConfiguredPlugin,
3+
StorageEngineConnectionConfig,
4+
} from '@cloudgraph/sdk'
25
import { flags as CommandFlags } from '@oclif/command'
36
import fs from 'fs'
47
import path from 'path'
@@ -65,6 +68,15 @@ export default class Init extends Command {
6568
return client.configure()
6669
}
6770

71+
getPluginConfig(): {
72+
plugins: { [pluginType: string]: ConfiguredPlugin[] }
73+
} {
74+
const plugins = this.getCGConfigKey('plugins')
75+
return {
76+
plugins: plugins ?? {},
77+
}
78+
}
79+
6880
async askForDGraphConfig(overwrite = false): Promise<{
6981
versionLimit: string
7082
storageConfig: StorageEngineConnectionConfig
@@ -121,6 +133,7 @@ export default class Init extends Command {
121133

122134
async getCloudGraphConfig(overwrite = false): Promise<CloudGraphConfig> {
123135
return {
136+
...this.getPluginConfig(),
124137
...(await this.askForDGraphConfig(overwrite)),
125138
...(await this.askForQueryEngineConfig(overwrite)),
126139
}
@@ -197,7 +210,6 @@ export default class Init extends Command {
197210
if (cloudGraphConfig) {
198211
configResult.cloudGraph = cloudGraphConfig
199212
}
200-
configResult.cloudGraph.plugins = {}
201213
this.saveCloudGraphConfigFile(configResult)
202214
this.logger.success(
203215
`Your config has been successfully stored at ${chalk.italic.green(

src/commands/scan.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@ export default class Scan extends Command {
290290
await storageEngine.run()
291291

292292
this.logger.successSpinner('Data insertion into Dgraph complete')
293-
}
294293

295-
await this.plugins({
296-
flags: flags as { [flag: string]: any },
297-
storage: {
298-
isRunning: storageRunning,
299-
engine: storageEngine,
300-
},
301-
})
294+
await this.plugins({
295+
flags: flags as { [flag: string]: any },
296+
storage: {
297+
isRunning: storageRunning,
298+
engine: storageEngine,
299+
},
300+
})
301+
}
302302

303303
scanReport.print()
304304

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@
379379
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
380380
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
381381

382-
"@cloudgraph/sdk@^0.12.0":
383-
version "0.12.0"
384-
resolved "https://registry.yarnpkg.com/@cloudgraph/sdk/-/sdk-0.12.0.tgz#c95b87bed8883bde072c5e4cf171b4ef50d606dc"
385-
integrity sha512-RD1HYwHlWKuyekdaLLOhfAATRaKmkHpWjU5vM6kEtiUGhGzR2ywujmIza7vbYCi6o23gLA38nAfaGi9VA239zg==
382+
"@cloudgraph/sdk@^0.13.0":
383+
version "0.13.0"
384+
resolved "https://registry.yarnpkg.com/@cloudgraph/sdk/-/sdk-0.13.0.tgz#1c093621d71cb8c10e6e638f094e8ddc01dee315"
385+
integrity sha512-rqCcBuobib8cyKThxJQf4Wo0l6Thio2sNeP/AtR+EtSd4dxBTTBbTxQnuFkDLk4EJdgge2095nBvXTNeZH4Dtg==
386386
dependencies:
387387
"@graphql-tools/load-files" "^6.5.3"
388388
"@graphql-tools/merge" "^8.2.1"

0 commit comments

Comments
 (0)