@jungvonmatt/contentful-ssg 4.0.3 → 4.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.
package/dist/server/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type Express } from 'express';
|
|
1
2
|
declare module 'http' {
|
|
2
3
|
interface IncomingHttpHeaders {
|
|
3
4
|
'x-contentful-topic': 'ContentManagement.ContentType.create' | 'ContentManagement.ContentType.save' | 'ContentManagement.ContentType.publish' | 'ContentManagement.ContentType.unpublish' | 'ContentManagement.ContentType.delete' | 'ContentManagement.Entry.create' | 'ContentManagement.Entry.save' | 'ContentManagement.Entry.auto_save' | 'ContentManagement.Entry.archive' | 'ContentManagement.Entry.unarchive' | 'ContentManagement.Entry.publish' | 'ContentManagement.Entry.unpublish' | 'ContentManagement.Entry.delete' | 'ContentManagement.Asset.create' | 'ContentManagement.Asset.save' | 'ContentManagement.Asset.auto_save' | 'ContentManagement.Asset.archive' | 'ContentManagement.Asset.unarchive' | 'ContentManagement.Asset.publish' | 'ContentManagement.Asset.unpublish' | 'ContentManagement.Asset.delete';
|
|
4
5
|
'X-Contentful-Webhook-Name': string;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
7
|
-
export declare const getApp: (callback: () => Promise<void>) =>
|
|
8
|
+
export declare const getApp: (callback: () => Promise<void>) => Express;
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAwC,MAAM,SAAS,CAAC;AAG/D,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;AACtB,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AAC5B,GAAG,CAAC,GAAG,CAAC,OAAO,C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version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"clean": "rimraf ./dist",
|
|
58
58
|
"lint": "eslint --color src --fix --ext .ts",
|
|
59
59
|
"test": "jest",
|
|
60
|
-
"precompile": "
|
|
60
|
+
"precompile": "pnpm run clean",
|
|
61
61
|
"compile": "tsc --build",
|
|
62
62
|
"postcompile": "chmod +x ./dist/cli.js",
|
|
63
63
|
"watch": "tsc --build --watch"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@contentful/rich-text-html-renderer": "^16.3.0",
|
|
73
73
|
"@contentful/rich-text-types": "^16.3.0",
|
|
74
74
|
"@iarna/toml": "^2.2.5",
|
|
75
|
-
"@jungvonmatt/contentful-config": "^4.0
|
|
75
|
+
"@jungvonmatt/contentful-config": "^4.1.0",
|
|
76
76
|
"@swc/core": "^1.3.104",
|
|
77
77
|
"chalk": "^5.3.0",
|
|
78
78
|
"change-case": "^5.4.2",
|
|
@@ -141,5 +141,5 @@
|
|
|
141
141
|
"module": "es2020"
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
-
"gitHead": "
|
|
144
|
+
"gitHead": "ad36885939a63334f5900a7bbc6cef168f72f8c7"
|
|
145
145
|
}
|
package/src/server/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Asset, type ContentType, type Entry, type EntrySkeletonType } from 'contentful';
|
|
2
|
-
import express, { type Response } from 'express';
|
|
2
|
+
import express, { type Express, type Response } from 'express';
|
|
3
3
|
import { type IncomingHttpHeaders } from 'http';
|
|
4
4
|
|
|
5
5
|
const app = express();
|
|
@@ -52,7 +52,7 @@ type ContentfulWebhookRequest = {
|
|
|
52
52
|
body: Entry<EntrySkeletonType, undefined> | Asset | ContentType;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
export const getApp = (callback: () => Promise<void>) => {
|
|
55
|
+
export const getApp = (callback: () => Promise<void>): Express => {
|
|
56
56
|
app.get('/status', (_req, res: Response) => res.status(200).send('ok'));
|
|
57
57
|
|
|
58
58
|
app.get('/', async (_req, res: Response) => {
|