contentful-import 10.2.1 → 10.2.3

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 CHANGED
@@ -133,6 +133,14 @@ Path to JSON file that contains data to be import to your space
133
133
 
134
134
  Content to import. Needs to match the expected structure (See below)
135
135
 
136
+ #### `timeout` [number]
137
+
138
+ Time between retries
139
+
140
+ #### `retryLimit` [number]
141
+
142
+ Maximum number of retries
143
+
136
144
  ### Filtering
137
145
 
138
146
  #### `contentModelOnly` [boolean] [default: false]
@@ -169,14 +177,6 @@ Skip updating existing assets
169
177
 
170
178
  Path to a directory with an asset export made using the [downloadAssets](https://github.com/contentful/contentful-export#downloadassets-boolean) option of the export. Requires `uploadAssets`
171
179
 
172
- #### `timeout` [number] [default: 3000]
173
-
174
- Time between retries on asset processing
175
-
176
- #### `retryLimit` [number] [default: 10]
177
-
178
- Maximum number of retries for asset processing
179
-
180
180
  ### Connection
181
181
 
182
182
  #### `host` [string] [default: 'api.contentful.com']
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  const runContentfulImport = require('../dist/index')
3
- const usageParams = require('../dist/usageParams').default
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
- runContentfulImport(usageParams)
6
- .then(() => {
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
@@ -26,4 +26,4 @@ type RunContentfulImportParams = {
26
26
  };
27
27
  declare function runContentfulImport(params: RunContentfulImportParams): Promise<any>;
28
28
 
29
- export { runContentfulImport as default };
29
+ export = runContentfulImport;