@contentful/create-contentful-app 2.0.0 → 2.1.0

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.
Files changed (2) hide show
  1. package/lib/utils/file.js +1 -12
  2. package/package.json +3 -3
package/lib/utils/file.js CHANGED
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.exists = exports.mergeJsonIntoFile = exports.getJsonData = void 0;
7
- const merge_options_1 = __importDefault(require("merge-options"));
3
+ exports.exists = exports.getJsonData = void 0;
8
4
  const promises_1 = require("fs/promises");
9
5
  const path_1 = require("path");
10
6
  async function getJsonData(path) {
@@ -18,13 +14,6 @@ async function getJsonData(path) {
18
14
  return JSON.parse(await (0, promises_1.readFile)(normalizedPath, { encoding: 'utf-8' }));
19
15
  }
20
16
  exports.getJsonData = getJsonData;
21
- async function mergeJsonIntoFile({ source, destination, mergeFn = merge_options_1.default.bind({ concatArrays: false }), }) {
22
- const sourceJson = await getJsonData(source);
23
- const destinationJson = await getJsonData(destination);
24
- const mergedJson = mergeFn(destinationJson, sourceJson);
25
- await (0, promises_1.writeFile)((0, path_1.resolve)(destination), JSON.stringify(mergedJson, null, ' '));
26
- }
27
- exports.mergeJsonIntoFile = mergeJsonIntoFile;
28
17
  function exists(path) {
29
18
  return (0, promises_1.access)(path)
30
19
  .then(() => true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -36,7 +36,7 @@
36
36
  "test": "mocha 'test/**/*.spec.{js,ts}'"
37
37
  },
38
38
  "dependencies": {
39
- "@contentful/app-scripts": "2.1.4",
39
+ "@contentful/app-scripts": "2.2.0",
40
40
  "@segment/analytics-node": "^2.2.0",
41
41
  "chalk": "4.1.2",
42
42
  "commander": "12.1.0",
@@ -80,5 +80,5 @@
80
80
  "sinon-chai": "^3.7.0",
81
81
  "ts-node": "^10.9.2"
82
82
  },
83
- "gitHead": "d58b78ba56df989e585aae54cb297e186c8e713b"
83
+ "gitHead": "f74bc713b10f3b7eafc95193327bebc91ec64d74"
84
84
  }