@stackbit/cms-core 0.5.0-staging.1 → 0.5.0-staging.2

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.
@@ -82,12 +82,12 @@ async function deleteDocumentHooked(options) {
82
82
  exports.deleteDocumentHooked = deleteDocumentHooked;
83
83
  async function publishDocumentHooked(options) {
84
84
  var _a;
85
- // If no onPublishDocuments defined in the config, call the original content
85
+ // If no onDocumentsPublish defined in the config, call the original content
86
86
  // source publishDocuments method with the provided actionOptions.
87
- if (!((_a = options.stackbitConfig) === null || _a === void 0 ? void 0 : _a.onPublishDocuments)) {
87
+ if (!((_a = options.stackbitConfig) === null || _a === void 0 ? void 0 : _a.onDocumentsPublish)) {
88
88
  return options.contentSourceData.instance.publishDocuments(options.actionOptions);
89
89
  }
90
- return options.stackbitConfig.onPublishDocuments({
90
+ return options.stackbitConfig.onDocumentsPublish({
91
91
  // Spread actionOptions to clone them shallowly to prevent accidental
92
92
  // property overrides within user methods.
93
93
  publishDocumentsOptions: { ...options.actionOptions },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbit/cms-core",
3
- "version": "0.5.0-staging.1",
3
+ "version": "0.5.0-staging.2",
4
4
  "description": "stackbit-dev",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,8 +31,8 @@
31
31
  "@babel/parser": "^7.11.5",
32
32
  "@babel/traverse": "^7.11.5",
33
33
  "@iarna/toml": "^2.2.3",
34
- "@stackbit/sdk": "0.5.0-staging.1",
35
- "@stackbit/types": "0.6.0-staging.1",
34
+ "@stackbit/sdk": "0.5.0-staging.2",
35
+ "@stackbit/types": "0.6.0-staging.2",
36
36
  "@stackbit/utils": "0.2.27-staging.1",
37
37
  "chalk": "^4.0.1",
38
38
  "esm": "^3.2.25",
@@ -48,5 +48,5 @@
48
48
  "slugify": "^1.6.5",
49
49
  "uuid": "^9.0.0"
50
50
  },
51
- "gitHead": "59a544065749135aa992d5f9d39c88b14c3383dd"
51
+ "gitHead": "60e6e0a615fae760d13ff21ec59616eb5bed0430"
52
52
  }
@@ -96,13 +96,13 @@ export async function deleteDocumentHooked(options: DocumentHookOptions<'deleteD
96
96
  }
97
97
 
98
98
  export async function publishDocumentHooked(options: DocumentHookOptions<'publishDocuments'>): ReturnTypeOfCSIMethod<'publishDocuments'> {
99
- // If no onPublishDocuments defined in the config, call the original content
99
+ // If no onDocumentsPublish defined in the config, call the original content
100
100
  // source publishDocuments method with the provided actionOptions.
101
- if (!options.stackbitConfig?.onPublishDocuments) {
101
+ if (!options.stackbitConfig?.onDocumentsPublish) {
102
102
  return options.contentSourceData.instance.publishDocuments(options.actionOptions);
103
103
  }
104
104
 
105
- return options.stackbitConfig.onPublishDocuments({
105
+ return options.stackbitConfig.onDocumentsPublish({
106
106
  // Spread actionOptions to clone them shallowly to prevent accidental
107
107
  // property overrides within user methods.
108
108
  publishDocumentsOptions: { ...options.actionOptions },