@contentful/app-scripts
Advanced tools
Comparing version 1.30.2 to 1.31.0
@@ -20,10 +20,12 @@ "use strict"; | ||
const entry = getEntryFile(files); | ||
if (!entry) { | ||
throw new Error('Make sure your bundle includes a valid index.html file in its root folder.'); | ||
if (!entry && !functions && !actions) { | ||
throw new Error('Ensure your bundle includes a valid index.html file in its root folder, or a valid Contentful Function entrypoint (defined in your contentful-app-manifest.json file).'); | ||
} | ||
const entryFile = fs_1.default.readFileSync(path_1.default.join(buildFolder, entry), { encoding: 'utf8' }); | ||
if (fileContainsAbsolutePath(entryFile)) { | ||
console.log('----------------------------'); | ||
console.warn(`${chalk_1.default.red('Warning:')} This bundle uses absolute paths. Please use relative paths instead for correct rendering. See more details here https://www.contentful.com/developers/docs/extensibility/app-framework/app-bundle/#limitations`); | ||
console.log('----------------------------'); | ||
if (entry) { | ||
const entryFile = fs_1.default.readFileSync(path_1.default.join(buildFolder, entry), { encoding: 'utf8' }); | ||
if (fileContainsAbsolutePath(entryFile)) { | ||
console.log('----------------------------'); | ||
console.warn(`${chalk_1.default.red('Warning:')} This bundle uses absolute paths. Please use relative paths instead for correct rendering. See more details here https://www.contentful.com/developers/docs/extensibility/app-framework/app-bundle/#limitations`); | ||
console.log('----------------------------'); | ||
} | ||
} | ||
@@ -30,0 +32,0 @@ if (functions) { |
@@ -13,2 +13,6 @@ "use strict"; | ||
const functionEvents = { | ||
appActionCall: 'appaction.call', | ||
appEventFilter: 'appevent.filter', | ||
appEventHandler: 'appevent.handler', | ||
appEventTransformation: 'appevent.transformation', | ||
fieldMappingEvent: 'graphql.field.mapping', | ||
@@ -18,7 +22,3 @@ resourceTypeMappingEvent: 'graphql.resourcetype.mapping', | ||
resourceLinksSearchEvent: 'resources.search', | ||
resourceLinksLookupEvent: 'resources.lookup', | ||
appEventFilter: 'appevent.filter', | ||
appEventHandler: 'appevent.handler', | ||
appEventTransformation: 'appevent.transformation', | ||
appActionCall: 'appaction.call', | ||
resourceLinksLookupEvent: 'resources.lookup' | ||
}; | ||
@@ -131,3 +131,3 @@ const throwValidationException = (subject, message, details) => { | ||
if (hasInvalidEvent) { | ||
console.log(`${chalk_1.default.red('Error:')} Invalid events ${hasInvalidEvent} found in the accepts array for ${type} "${item.name}".`); | ||
console.log(`${chalk_1.default.red('Error:')} Invalid events found in the accepts array for ${type} "${item.name}".`); | ||
// eslint-disable-next-line no-process-exit | ||
@@ -134,0 +134,0 @@ process.exit(1); |
{ | ||
"name": "@contentful/app-scripts", | ||
"version": "1.30.2", | ||
"version": "1.31.0", | ||
"description": "A collection of scripts for building Contentful Apps", | ||
@@ -55,3 +55,3 @@ "author": "Contentful GmbH", | ||
"commander": "12.1.0", | ||
"contentful-management": "11.38.0", | ||
"contentful-management": "11.39.1", | ||
"dotenv": "16.4.5", | ||
@@ -64,3 +64,3 @@ "ignore": "6.0.2", | ||
}, | ||
"gitHead": "619c0ca0539ea7d7e315621997de4478552ab682", | ||
"gitHead": "3f63deab2526d7ebe014c7f05db849c05eb6ed02", | ||
"devDependencies": { | ||
@@ -73,3 +73,3 @@ "@tsconfig/node18": "18.2.4", | ||
"@types/lodash": "4.17.13", | ||
"@types/mocha": "10.0.9", | ||
"@types/mocha": "10.0.10", | ||
"@types/proxyquire": "1.3.31", | ||
@@ -76,0 +76,0 @@ "@types/sinon": "17.0.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101057
2074
+ Added@rollup/rollup-linux-x64-gnu@4.27.4(transitive)
+ Addedcontentful-management@11.39.1(transitive)
+ Addedcontentful-sdk-core@9.0.1(transitive)
+ Addedp-throttle@6.2.0(transitive)
+ Addedprocess@0.11.10(transitive)
- Removedcontentful-management@11.38.0(transitive)
- Removedcontentful-sdk-core@8.3.2(transitive)
- Removedfast-copy@2.1.7(transitive)
- Removedlodash.isplainobject@4.0.6(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedp-throttle@4.1.1(transitive)