contentful-migration 4.5.7 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/built/bin/lib/config.js +13 -1
- package/built/bin/lib/config.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
## [4.
|
|
1
|
+
## [4.6.1](https://github.com/contentful/contentful-migration/compare/v4.6.0...v4.6.1) (2022-01-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **config:** Fix missing uuid dependency when using the built package ([#984](https://github.com/contentful/contentful-migration/issues/984)) ([a46a6d2](https://github.com/contentful/contentful-migration/commit/a46a6d2325a8c7610cd2a2db7fcead51f30c37c7))
|
|
2
7
|
|
|
3
8
|
# Change Log
|
|
4
9
|
|
package/built/bin/lib/config.js
CHANGED
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.getConfig = void 0;
|
|
23
23
|
const path = __importStar(require("path"));
|
|
24
24
|
const os = __importStar(require("os"));
|
|
25
|
+
const uuid_1 = require("uuid");
|
|
25
26
|
// TODO: I'm ugly, maybe change me
|
|
26
27
|
const homedir = process.env.NODE_ENV === 'test' ? '/tmp' : os.homedir();
|
|
27
28
|
const configPath = path.resolve(homedir, '.contentfulrc.json');
|
|
@@ -50,7 +51,7 @@ function getArgvConfig({ spaceId, environmentId = 'master', accessToken, proxy,
|
|
|
50
51
|
proxy,
|
|
51
52
|
rawProxy,
|
|
52
53
|
requestBatchSize,
|
|
53
|
-
headers
|
|
54
|
+
headers: addSequenceHeader(headers)
|
|
54
55
|
};
|
|
55
56
|
if (!config.accessToken) {
|
|
56
57
|
delete config.accessToken;
|
|
@@ -93,5 +94,16 @@ function getConfig(argv) {
|
|
|
93
94
|
return Object.assign(fileConfig, envConfig, argvConfig);
|
|
94
95
|
}
|
|
95
96
|
exports.getConfig = getConfig;
|
|
97
|
+
/**
|
|
98
|
+
* Adds a sequence header to a header object
|
|
99
|
+
* @param {object} headers
|
|
100
|
+
*/
|
|
101
|
+
function addSequenceHeader(headers) {
|
|
102
|
+
if (typeof headers !== 'object')
|
|
103
|
+
throw new Error('addSequence function expects an object as input');
|
|
104
|
+
return Object.assign(Object.assign({}, headers), {
|
|
105
|
+
// Unique sequence header
|
|
106
|
+
'CF-Sequence': uuid_1.v4() });
|
|
107
|
+
}
|
|
96
108
|
exports.default = getConfig;
|
|
97
109
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/bin/lib/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,uCAAwB;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/bin/lib/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,uCAAwB;AACxB,+BAAmC;AAEnC,kCAAkC;AAClC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAA;AACvE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;AAY9D,SAAS,aAAa;IACpB,IAAI;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;QAClC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtB,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClC,EAAE,CAAA;KACL;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAA;KACV;AACH,CAAC;AAED,SAAS,YAAY;IACnB,MAAM,MAA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KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAE1D,uCACK,OAAO,KACV,CAAC,SAAS,CAAC,EAAE,WAAW,IACzB;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC;AAED,SAAS,SAAS,CAAE,IAAI;IACtB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,UAAU,GAAG,aAAa,iCAC3B,IAAI,KACP,OAAO,EAAE,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,KAAI,gBAAgB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAC,IACxD,CAAA;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AACzD,CAAC;AAmBC,8BAAS;AAjBX;;;GAGG;AACH,SAAS,iBAAiB,CAAE,OAAO;IACjC,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;IAEnG,uCACK,OAAO;QACT,yBAAyB;QAC1B,aAAa,EAAE,SAAM,EAAE,IACxB;AACH,CAAC;AAED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-migration",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.1",
|
|
4
4
|
"description": "Migration tooling for contentful",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"build": "npm run clean && tsc -p tsconfig.json",
|
|
27
27
|
"build-dev": "npm run clean && tsc -p tsconfig-dev.json",
|
|
28
28
|
"prepare": "npm run build",
|
|
29
|
-
"test": "NOCK_RECORD=0 npm run build && npm run test
|
|
30
|
-
"test
|
|
31
|
-
"test
|
|
32
|
-
"test
|
|
33
|
-
"test
|
|
34
|
-
"test
|
|
29
|
+
"test": "NOCK_RECORD=0 npm run build && npm run test:unit && npm run test:integration && npm run test:e2e && npm run lint && npm run test:typescript-declaration",
|
|
30
|
+
"test:watch": "npm run test:unit -- --watch",
|
|
31
|
+
"test:unit": "NODE_ENV=test mocha --require test/setup-unit.js --recursive 'test/unit/**/**/*.spec.{js,ts}'",
|
|
32
|
+
"test:integration": "NODE_ENV=test mocha --require test/integration/setup.js 'test/integration/**/*.spec.js'",
|
|
33
|
+
"test:e2e": "NODE_ENV=test mocha 'test/end-to-end/**/*.spec.js'",
|
|
34
|
+
"test:typescript-declaration": "tsc --strict --noEmit index.d.ts",
|
|
35
35
|
"lint": "eslint 'examples/**/*.js' 'test/**/*.js' 'src/**/*.js' && tslint --project tsconfig-dev.json --config tslint.json -e '**/*.js'",
|
|
36
36
|
"semantic-release": "semantic-release",
|
|
37
37
|
"travis-deploy-once": "travis-deploy-once",
|
|
38
|
-
"test
|
|
39
|
-
"test
|
|
40
|
-
"test
|
|
38
|
+
"test:unit:debug": "NODE_ENV=test mocha debug --require test/setup-unit.js --recursive 'test/unit/**/**/*.spec.{js,ts}'",
|
|
39
|
+
"test:integration:debug": "NODE_ENV=test mocha debug --require test/integration/setup.js 'test/integration/**/*.spec.js'",
|
|
40
|
+
"test:e2e:debug": "NODE_ENV=test mocha debug 'test/end-to-end/**/*.spec.js'",
|
|
41
41
|
"cm": "git-cz"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
@@ -63,11 +63,12 @@
|
|
|
63
63
|
"kind-of": "^6.0.3",
|
|
64
64
|
"listr": "^0.14.3",
|
|
65
65
|
"lodash": "^4.17.15",
|
|
66
|
+
"uuid": "^8.3.2",
|
|
66
67
|
"yargs": "^15.3.1"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
|
-
"@contentful/eslint-config-backend": "^
|
|
70
|
-
"@semantic-release/changelog": "^
|
|
70
|
+
"@contentful/eslint-config-backend": "^9.0.0",
|
|
71
|
+
"@semantic-release/changelog": "^6.0.0",
|
|
71
72
|
"@types/bluebird": "^3.5.30",
|
|
72
73
|
"@types/chai": "^4.2.11",
|
|
73
74
|
"@types/chai-as-promised": "^7.1.2",
|
|
@@ -86,15 +87,15 @@
|
|
|
86
87
|
"eslint-plugin-import": "^2.20.2",
|
|
87
88
|
"eslint-plugin-mocha": "^9.0.0",
|
|
88
89
|
"eslint-plugin-node": "^11.1.0",
|
|
89
|
-
"eslint-plugin-promise": "^
|
|
90
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
90
91
|
"eslint-plugin-standard": "^5.0.0",
|
|
91
92
|
"mocha": "^7.1.1",
|
|
92
93
|
"nixt": "^0.5.1",
|
|
93
94
|
"nock": "^13.0.0",
|
|
94
95
|
"rewire": "^5.0.0",
|
|
95
96
|
"rimraf": "^3.0.2",
|
|
96
|
-
"semantic-release": "^
|
|
97
|
-
"sinon": "^
|
|
97
|
+
"semantic-release": "^18.0.0",
|
|
98
|
+
"sinon": "^12.0.0",
|
|
98
99
|
"sinon-chai": "^3.5.0",
|
|
99
100
|
"source-map-support": "^0.5.16",
|
|
100
101
|
"strip-ansi": "^6.0.0",
|
|
@@ -103,7 +104,6 @@
|
|
|
103
104
|
"tslint": "^6.1.1",
|
|
104
105
|
"tslint-config-standard": "^9.0.0",
|
|
105
106
|
"typescript": "^3.8.3",
|
|
106
|
-
"uuid": "^8.0.0",
|
|
107
107
|
"zlib": "^1.0.5"
|
|
108
108
|
},
|
|
109
109
|
"bin": {
|