@contentful/create-contentful-app 1.9.2 → 1.10.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/lib/constants.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTENTFUL_APP_MANIFEST = exports.EXAMPLES_PATH = exports.TEMPLATES = exports.EXAMPLES_REPO_URL = exports.CREATE_APP_DEFINITION_GUIDE_URL = void 0;
|
|
3
|
+
exports.IGNORED_CLONED_FILES = exports.CONTENTFUL_APP_MANIFEST = exports.EXAMPLES_PATH = exports.TEMPLATES = exports.EXAMPLES_REPO_URL = exports.CREATE_APP_DEFINITION_GUIDE_URL = void 0;
|
|
4
4
|
exports.CREATE_APP_DEFINITION_GUIDE_URL = 'https://ctfl.io/app-tutorial#embed-your-app-in-the-contentful-web-app';
|
|
5
5
|
exports.EXAMPLES_REPO_URL = 'https://github.com/contentful/apps/tree/master/examples';
|
|
6
6
|
exports.TEMPLATES = ['javascript', 'typescript', 'vue', 'vite-react', 'nextjs'];
|
|
7
7
|
exports.EXAMPLES_PATH = 'contentful/apps/examples/';
|
|
8
8
|
exports.CONTENTFUL_APP_MANIFEST = 'contentful-app-manifest.json';
|
|
9
|
+
exports.IGNORED_CLONED_FILES = [
|
|
10
|
+
exports.CONTENTFUL_APP_MANIFEST,
|
|
11
|
+
`package.json`
|
|
12
|
+
];
|
package/lib/includeAppAction.js
CHANGED
|
@@ -54,6 +54,7 @@ function cloneAppAction(destination, templateIsTypescript) {
|
|
|
54
54
|
mergeFn: addBuildCommand,
|
|
55
55
|
});
|
|
56
56
|
yield Promise.all([writeAppManifest, copyBuildFile, writeBuildCommand]);
|
|
57
|
+
yield d.remove(appActionDirectoryPath, destination, { action: 'remove', files: constants_1.IGNORED_CLONED_FILES.map(fileName => `${appActionDirectoryPath}/${fileName}`) });
|
|
57
58
|
}
|
|
58
59
|
catch (e) {
|
|
59
60
|
console.log(e);
|
|
@@ -31,7 +31,7 @@ function cloneDeliveryFunction(destination, templateIsTypescript) {
|
|
|
31
31
|
// Clone the delivery function template to the created directory under the folder 'actions'
|
|
32
32
|
const templateSource = (0, path_1.join)('contentful/apps/examples/hosted-delivery-function-templates', templateIsTypescript ? 'typescript' : 'javascript');
|
|
33
33
|
const deliveryFunctionDirectoryPath = (0, path_1.resolve)(`${destination}/delivery-functions`);
|
|
34
|
-
const d =
|
|
34
|
+
const d = (0, degit_1.default)(templateSource, { mode: 'tar', cache: false });
|
|
35
35
|
yield d.clone(deliveryFunctionDirectoryPath);
|
|
36
36
|
// merge the manifest from the template folder to the root folder
|
|
37
37
|
const writeAppManifest = (0, file_1.mergeJsonIntoFile)({
|
|
@@ -53,6 +53,7 @@ function cloneDeliveryFunction(destination, templateIsTypescript) {
|
|
|
53
53
|
mergeFn: addBuildCommand,
|
|
54
54
|
});
|
|
55
55
|
yield Promise.all([writeAppManifest, copyBuildFile, writeBuildCommand]);
|
|
56
|
+
yield d.remove(deliveryFunctionDirectoryPath, destination, { action: "remove", files: constants_1.IGNORED_CLONED_FILES.map(fileName => `${deliveryFunctionDirectoryPath}/${fileName}`) });
|
|
56
57
|
}
|
|
57
58
|
catch (e) {
|
|
58
59
|
console.error(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/create-contentful-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "A template for building Contentful Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contentful",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"inquirer": "8.2.6",
|
|
45
45
|
"merge-options": "^3.0.4",
|
|
46
46
|
"node-fetch": "2.6.7",
|
|
47
|
-
"rimraf": "5.0.
|
|
47
|
+
"rimraf": "5.0.4",
|
|
48
48
|
"tildify": "2.0.0",
|
|
49
49
|
"validate-npm-package-name": "5.0.0"
|
|
50
50
|
},
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@types/analytics-node": "^3.1.9",
|
|
64
64
|
"@types/chai-as-promised": "^7.1.5",
|
|
65
65
|
"@types/chalk": "2.2.0",
|
|
66
|
-
"@types/degit": "2.8.
|
|
66
|
+
"@types/degit": "2.8.4",
|
|
67
67
|
"@types/inquirer": "8.2.1",
|
|
68
68
|
"@types/mocha": "^10.0.1",
|
|
69
|
-
"@types/node": "14.18.
|
|
69
|
+
"@types/node": "14.18.63",
|
|
70
70
|
"@types/node-fetch": "^2.6.2",
|
|
71
71
|
"@types/rimraf": "3.0.2",
|
|
72
72
|
"@types/sinon": "^10.0.16",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"@types/validate-npm-package-name": "4.0.0",
|
|
76
76
|
"chai": "^4.3.7",
|
|
77
77
|
"chai-as-promised": "^7.1.1",
|
|
78
|
-
"contentful-management": "10.
|
|
78
|
+
"contentful-management": "10.46.3",
|
|
79
79
|
"mocha": "^10.2.0",
|
|
80
|
-
"sinon": "^
|
|
80
|
+
"sinon": "^16.0.0",
|
|
81
81
|
"sinon-chai": "^3.7.0",
|
|
82
82
|
"ts-node": "^10.9.1"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "1002ef96784e0f6e3b4b33bfcd3545f1cd3152e9"
|
|
85
85
|
}
|