contentful-import 10.2.0 → 10.2.2
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/README.md +2 -2
- package/bin/contentful-import +10 -6
- package/dist/chunk-BWBJ5DCQ.mjs +53 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4985 -90
- package/dist/index.mjs +5070 -182
- package/dist/usageParams.d.ts +1 -1
- package/dist/usageParams.js +6 -0
- package/dist/usageParams.mjs +2 -1
- package/package.json +4 -4
- package/dist/chunk-GA5GJRGP.mjs +0 -20
package/README.md
CHANGED
|
@@ -235,7 +235,7 @@ contentfulImport({
|
|
|
235
235
|
|
|
236
236
|
### Embargoed Assets
|
|
237
237
|
|
|
238
|
-
If a space is configured to use the [embargoed assets feature](https://www.contentful.com/help/media/embargoed-assets/),
|
|
238
|
+
If a space is configured to use the [embargoed assets feature](https://www.contentful.com/help/media/embargoed-assets/), export with `downloadAssets: true` and import with `uploadAssets: true` and `assetsDirectory` pointing to the directory generated by the export. Embargoed asset URLs cannot be processed directly during import; the importer now fails before making API calls and prints the required options when the local upload options are missing.
|
|
239
239
|
|
|
240
240
|
```javascript
|
|
241
241
|
const contentfulImport = require('contentful-import')
|
|
@@ -245,7 +245,7 @@ const options = {
|
|
|
245
245
|
spaceId: '<space_id>',
|
|
246
246
|
managementToken: '<content_management_api_key>',
|
|
247
247
|
uploadAssets: true,
|
|
248
|
-
assetsDirectory: '/path/to/exported
|
|
248
|
+
assetsDirectory: '/path/to/exported-assets'
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
contentfulImport(options)
|
package/bin/contentful-import
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const runContentfulImport = require('../dist/index')
|
|
3
|
-
const usageParams = require('../dist/usageParams')
|
|
3
|
+
const usageParams = require('../dist/usageParams')
|
|
4
4
|
console.log('We moved the CLI version of this tool into our Contentful CLI.\nThis allows our users to use and install only one single CLI tool to get the full Contentful experience.\nFor more info please visit https://github.com/contentful/contentful-cli/tree/master/docs/space/import')
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
async function main () {
|
|
7
|
+
try {
|
|
8
|
+
await runContentfulImport(usageParams)
|
|
7
9
|
process.exit(0)
|
|
8
|
-
})
|
|
9
|
-
.catch(function (err) {
|
|
10
|
+
} catch (err) {
|
|
10
11
|
if (err.name !== 'ContentfulMultiError') {
|
|
11
12
|
console.error(err)
|
|
12
13
|
}
|
|
13
14
|
process.exit(1)
|
|
14
|
-
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
main()
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
33
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
38
|
+
mod
|
|
39
|
+
));
|
|
40
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
|
+
|
|
42
|
+
// package.json
|
|
43
|
+
var version = "0.0.0-determined-by-semantic-release";
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
__require,
|
|
47
|
+
__esm,
|
|
48
|
+
__commonJS,
|
|
49
|
+
__export,
|
|
50
|
+
__toESM,
|
|
51
|
+
__toCommonJS,
|
|
52
|
+
version
|
|
53
|
+
};
|
package/dist/index.d.ts
CHANGED