contentful-import 9.4.99 → 9.4.100

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
@@ -27,7 +27,7 @@ This library helps you to import files generated by [contentful-export](https://
27
27
  npm install contentful-import
28
28
  ```
29
29
 
30
- ## :hand: Usage
30
+ ## :hand: Usage as a module
31
31
 
32
32
  ```javascript
33
33
  const contentfulImport = require('contentful-import')
@@ -51,7 +51,7 @@ contentfulImport(options)
51
51
  Using ESM:
52
52
 
53
53
  ```javascript
54
- import spaceImport from 'contentful-import';
54
+ import spaceImport from "contentful-import";
55
55
  ```
56
56
 
57
57
  or
@@ -75,6 +75,23 @@ contentfulImport(options)
75
75
  })
76
76
  ```
77
77
 
78
+ ## 💾 Usage as a CLI executable
79
+
80
+ 1. Build the package:
81
+
82
+ ```bash
83
+ $ npm run build
84
+ ```
85
+
86
+ 2. Execute the CLI tool by running the binary and passing the required parameters
87
+
88
+ ```bash
89
+ $ ./bin/contentful-cli \
90
+ --space-id <space-id> \
91
+ --management-token <management-token> \
92
+ --content-file <content-file>
93
+ ```
94
+
78
95
  #### Import an environment
79
96
 
80
97
  ```javascript
@@ -1,6 +1,6 @@
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').default
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
5
  runContentfulImport(usageParams)
6
6
  .then(() => {
@@ -16,8 +16,8 @@ declare const _default: {
16
16
  skipLocales: boolean;
17
17
  "skip-content-publishing": boolean;
18
18
  skipContentPublishing: boolean;
19
- "upload-assets": boolean;
20
- uploadAssets: boolean;
19
+ "upload-assets": boolean | undefined;
20
+ uploadAssets: boolean | undefined;
21
21
  "assets-directory": string | undefined;
22
22
  assetsDirectory: string | undefined;
23
23
  "error-log-file": string | undefined;
@@ -49,8 +49,8 @@ declare const _default: {
49
49
  skipLocales: boolean;
50
50
  "skip-content-publishing": boolean;
51
51
  skipContentPublishing: boolean;
52
- "upload-assets": boolean;
53
- uploadAssets: boolean;
52
+ "upload-assets": boolean | undefined;
53
+ uploadAssets: boolean | undefined;
54
54
  "assets-directory": string | undefined;
55
55
  assetsDirectory: string | undefined;
56
56
  "error-log-file": string | undefined;
@@ -16,8 +16,8 @@ declare const _default: {
16
16
  skipLocales: boolean;
17
17
  "skip-content-publishing": boolean;
18
18
  skipContentPublishing: boolean;
19
- "upload-assets": boolean;
20
- uploadAssets: boolean;
19
+ "upload-assets": boolean | undefined;
20
+ uploadAssets: boolean | undefined;
21
21
  "assets-directory": string | undefined;
22
22
  assetsDirectory: string | undefined;
23
23
  "error-log-file": string | undefined;
@@ -49,8 +49,8 @@ declare const _default: {
49
49
  skipLocales: boolean;
50
50
  "skip-content-publishing": boolean;
51
51
  skipContentPublishing: boolean;
52
- "upload-assets": boolean;
53
- uploadAssets: boolean;
52
+ "upload-assets": boolean | undefined;
53
+ uploadAssets: boolean | undefined;
54
54
  "assets-directory": string | undefined;
55
55
  assetsDirectory: string | undefined;
56
56
  "error-log-file": string | undefined;
@@ -73,8 +73,7 @@ var usageParams_default = import_yargs.default.version(version || "Version only
73
73
  default: false
74
74
  }).option("upload-assets", {
75
75
  describe: "Uses local asset files and uploads them instead of pointing to the URLs of previously uploaded assets. Requires assets-directory",
76
- type: "boolean",
77
- default: false
76
+ type: "boolean"
78
77
  }).implies("upload-assets", "assets-directory").option("assets-directory", {
79
78
  describe: "Path to a directory with an asset export made using the downloadAssets option to upload those files instead of pointing to the URLs of previously uploaded assets. Requires upload-assets",
80
79
  type: "string"
@@ -39,8 +39,7 @@ var usageParams_default = yargs.version(version || "Version only available on in
39
39
  default: false
40
40
  }).option("upload-assets", {
41
41
  describe: "Uses local asset files and uploads them instead of pointing to the URLs of previously uploaded assets. Requires assets-directory",
42
- type: "boolean",
43
- default: false
42
+ type: "boolean"
44
43
  }).implies("upload-assets", "assets-directory").option("assets-directory", {
45
44
  describe: "Path to a directory with an asset export made using the downloadAssets option to upload those files instead of pointing to the URLs of previously uploaded assets. Requires upload-assets",
46
45
  type: "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-import",
3
- "version": "9.4.99",
3
+ "version": "9.4.100",
4
4
  "description": "this tool allows you to import JSON dump exported by contentful-export",
5
5
  "main": "dist/index.mjs",
6
6
  "typings": "dist/index.d.ts",
@@ -91,9 +91,10 @@
91
91
  "jest": "^29.7.0",
92
92
  "rimraf": "^5.0.7",
93
93
  "semantic-release": "^24.2.3",
94
- "ts-jest": "^29.3.1",
94
+ "ts-jest": "^29.3.2",
95
95
  "tsup": "^8.4.0",
96
- "typescript": "^5.8.3"
96
+ "typescript": "^5.8.3",
97
+ "nixt": "^0.5.1"
97
98
  },
98
99
  "files": [
99
100
  "bin",