Skip to content

Commit d6368f8

Browse files
Benedikt Rötschaxe312ger
authored andcommitted
feat(SDK): upgrade to latest CMA SDK version
1 parent 026fe13 commit d6368f8

File tree

3 files changed

+26
-19
lines changed

3 files changed

+26
-19
lines changed

lib/parseOptions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default function parseOptions (params) {
8686
options.skipWebhooks = true
8787
}
8888

89-
options.application = options.application || `contentful.export/${version}`
89+
options.application = options.managementApplication || `contentful.export/${version}`
90+
options.feature = options.managementFeature || `library-export`
9091
return options
9192
}

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "contentful-export",
3-
"version": "7.0.0-beta0",
3+
"version": "0.0.0-determined-by-semantic-release",
44
"description": "this tool allows you to export a space to a JSON dump",
55
"main": "dist/index.js",
66
"engines": {
@@ -44,48 +44,48 @@
4444
"dependencies": {
4545
"bfj": "^6.1.1",
4646
"bluebird": "^3.3.3",
47-
"cli-table3": "^0.5.0",
47+
"cli-table3": "^0.5.1",
4848
"contentful-batch-libs": "^9.0.0",
49-
"contentful-management": "^5.0.0",
49+
"contentful-management": "^5.3.0",
5050
"echo-cli": "^1.0.8",
5151
"figures": "^2.0.0",
52-
"fs-extra": "^5.0.0",
52+
"fs-extra": "^7.0.0",
5353
"listr": "^0.14.1",
5454
"listr-update-renderer": "^0.4.0",
5555
"listr-verbose-renderer": "^0.4.0",
56-
"lodash": "^4.17.4",
56+
"lodash": "^4.17.10",
5757
"mkdirp": "^0.5.1",
5858
"moment": "^2.22.2",
59-
"request": "^2.83.0",
60-
"yargs": "^11.0.0"
59+
"request": "^2.87.0",
60+
"yargs": "^12.0.1"
6161
},
6262
"devDependencies": {
6363
"babel-cli": "^6.24.0",
64-
"babel-core": "^6.26.0",
64+
"babel-core": "^6.26.3",
6565
"babel-eslint": "^8.2.3",
66-
"babel-jest": "^22.4.1",
66+
"babel-jest": "^23.4.2",
6767
"babel-plugin-add-module-exports": "^0.2.1",
6868
"babel-plugin-transform-object-rest-spread": "^6.23.0",
6969
"babel-preset-env": "^1.7.0",
7070
"babel-template": "^6.23.0",
7171
"babel-types": "^6.23.0",
7272
"codecov": "^3.0.2",
7373
"cz-conventional-changelog": "^2.0.0",
74-
"eslint": "^4.19.1",
74+
"eslint": "^5.2.0",
7575
"eslint-config-standard": "^11.0.0",
7676
"eslint-plugin-import": "^2.12.0",
7777
"eslint-plugin-jest": "^21.17.0",
78-
"eslint-plugin-node": "^6.0.1",
78+
"eslint-plugin-node": "^7.0.1",
7979
"eslint-plugin-promise": "^3.8.0",
8080
"eslint-plugin-standard": "^3.1.0",
8181
"https-proxy-agent": "^2.2.1",
8282
"husky": "^0.14.3",
83-
"jest": "^22.4.2",
83+
"jest": "^23.4.2",
8484
"nixt": "^0.5.0",
85-
"nock": "^9.2.3",
85+
"nock": "^9.4.3",
8686
"opener": "^1.4.1",
8787
"rimraf": "^2.5.0",
88-
"semantic-release": "^12.4.1",
88+
"semantic-release": "^15.9.1",
8989
"travis-deploy-once": "^5.0.0"
9090
},
9191
"files": [

test/unit/parseOptions.test.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test('parseOptions sets correct default options', () => {
4040
expect(options.includeDrafts).toBe(false)
4141
expect(options.logFilePath).toMatch(new RegExp(`^${resolve(basePath, contentFileNamePattern)}$`))
4242
expect(options.application).toBe(`contentful.export/${version}`)
43+
expect(options.feature).toBe(`library-export`)
4344
expect(options.accessToken).toBe(managementToken)
4445
expect(options.maxAllowedLimit).toBe(1000)
4546
expect(options.saveFile).toBe(true)
@@ -154,12 +155,17 @@ test('parseOptions sets correct options given contentOnly', () => {
154155
expect(options.skipWebhooks).toBe(true)
155156
})
156157

157-
test('parseOptions sets custom managementApplication', () => {
158-
const managementApplication = 'customApplicationId'
158+
test('parseOptions accepts custom application & feature', () => {
159+
const managementApplication = 'managementApplicationMock'
160+
const managementFeature = 'managementFeatureMock'
161+
159162
const options = parseOptions({
160163
spaceId,
161164
managementToken,
162-
managementApplication
165+
managementApplication,
166+
managementFeature
163167
})
164-
expect(options.managementApplication).toBe(managementApplication)
168+
169+
expect(options.application).toBe(managementApplication)
170+
expect(options.feature).toBe(managementFeature)
165171
})

0 commit comments

Comments
 (0)