@adobe/helix-html-pipeline 1.5.2 → 1.5.5

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 (3) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/docs/API.md +244 -5
  3. package/package.json +4 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [1.5.5](https://github.com/adobe/helix-html-pipeline/compare/v1.5.4...v1.5.5) (2022-05-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-shared-utils to v2.0.10 ([#58](https://github.com/adobe/helix-html-pipeline/issues/58)) ([2761635](https://github.com/adobe/helix-html-pipeline/commit/2761635b891e76a6f16f0bc817abc7f2b7c28979))
7
+
8
+ ## [1.5.4](https://github.com/adobe/helix-html-pipeline/compare/v1.5.3...v1.5.4) (2022-05-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update dependency @adobe/helix-markdown-support to v3.1.4 ([#55](https://github.com/adobe/helix-html-pipeline/issues/55)) ([29a1a80](https://github.com/adobe/helix-html-pipeline/commit/29a1a808be2f5850cd4a6c5ff3ea2412e94bfc48))
14
+
15
+ ## [1.5.3](https://github.com/adobe/helix-html-pipeline/compare/v1.5.2...v1.5.3) (2022-05-09)
16
+
17
+
18
+ ### Reverts
19
+
20
+ * Revert "ci(release): tag releases in Coralogix (#49)" ([9a47ac1](https://github.com/adobe/helix-html-pipeline/commit/9a47ac19ea86752e1a56bd7d953f8e331cd448a4)), closes [#49](https://github.com/adobe/helix-html-pipeline/issues/49)
21
+
1
22
  ## [1.5.2](https://github.com/adobe/helix-html-pipeline/compare/v1.5.1...v1.5.2) (2022-05-08)
2
23
 
3
24
 
package/docs/API.md CHANGED
@@ -1,12 +1,251 @@
1
- <a name="main"></a>
1
+ ## Classes
2
2
 
3
- ## main(name) ⇒ <code>string</code>
4
- This is the main function
3
+ <dl>
4
+ <dt><a href="#PipelineState">PipelineState</a></dt>
5
+ <dd></dd>
6
+ <dt><a href="#PipelineRequest">PipelineRequest</a></dt>
7
+ <dd></dd>
8
+ <dt><a href="#PipelineResponse">PipelineResponse</a></dt>
9
+ <dd></dd>
10
+ <dt><a href="#PipelineState">PipelineState</a></dt>
11
+ <dd></dd>
12
+ </dl>
13
+
14
+ ## Functions
15
+
16
+ <dl>
17
+ <dt><a href="#searchParamsToObject">searchParamsToObject(searchParams)</a> ⇒ <code>Object</code></dt>
18
+ <dd><p>Converts URLSearchParams to an object</p>
19
+ </dd>
20
+ <dt><a href="#extractBodyData">extractBodyData(request)</a> ⇒ <code>Object</code></dt>
21
+ <dd><p>Extracts and parses the body data from the request</p>
22
+ </dd>
23
+ <dt><a href="#formsPipe">formsPipe(state, request)</a> ⇒ <code><a href="#PipelineResponse">Promise.&lt;PipelineResponse&gt;</a></code></dt>
24
+ <dd><p>Handle a pipeline POST request.
25
+ At this point POST&#39;s only apply to json files that are backed by a workbook.</p>
26
+ </dd>
27
+ <dt><a href="#htmlPipe">htmlPipe(state, req)</a> ⇒ <code><a href="#PipelineResponse">PipelineResponse</a></code></dt>
28
+ <dd><p>Runs the default pipeline and returns the response.</p>
29
+ </dd>
30
+ <dt><a href="#jsonPipe">jsonPipe(state, req)</a> ⇒ <code><a href="#PipelineResponse">PipelineResponse</a></code></dt>
31
+ <dd><p>Runs the default pipeline and returns the response.</p>
32
+ </dd>
33
+ <dt><a href="#optionsPipe">optionsPipe(state, request)</a> ⇒ <code>Response</code></dt>
34
+ <dd><p>Handles options requests</p>
35
+ </dd>
36
+ </dl>
37
+
38
+ <a name="PipelineState"></a>
39
+
40
+ ## PipelineState
41
+ **Kind**: global class
42
+
43
+ * [PipelineState](#PipelineState)
44
+ * [new PipelineState()](#new_PipelineState_new)
45
+ * [new PipelineState()](#new_PipelineState_new)
46
+ * [.PipelineState](#PipelineState+PipelineState)
47
+ * [new exports.PipelineState(opts)](#new_PipelineState+PipelineState_new)
48
+
49
+ <a name="new_PipelineState_new"></a>
50
+
51
+ ### new PipelineState()
52
+ State of the pipeline
53
+
54
+ <a name="new_PipelineState_new"></a>
55
+
56
+ ### new PipelineState()
57
+ State of the pipeline
58
+
59
+ <a name="PipelineState+PipelineState"></a>
60
+
61
+ ### pipelineState.PipelineState
62
+ **Kind**: instance class of [<code>PipelineState</code>](#PipelineState)
63
+ <a name="new_PipelineState+PipelineState_new"></a>
64
+
65
+ #### new exports.PipelineState(opts)
66
+ Creates the pipeline state
67
+
68
+
69
+ | Param | Type |
70
+ | --- | --- |
71
+ | opts | <code>PipelineOptions</code> |
72
+
73
+ <a name="PipelineRequest"></a>
74
+
75
+ ## PipelineRequest
76
+ **Kind**: global class
77
+
78
+ * [PipelineRequest](#PipelineRequest)
79
+ * [new PipelineRequest()](#new_PipelineRequest_new)
80
+ * [.PipelineRequest](#PipelineRequest+PipelineRequest)
81
+ * [new exports.PipelineRequest(url, [init])](#new_PipelineRequest+PipelineRequest_new)
82
+
83
+ <a name="new_PipelineRequest_new"></a>
84
+
85
+ ### new PipelineRequest()
86
+ Request of a pipeline
87
+
88
+ <a name="PipelineRequest+PipelineRequest"></a>
89
+
90
+ ### pipelineRequest.PipelineRequest
91
+ **Kind**: instance class of [<code>PipelineRequest</code>](#PipelineRequest)
92
+ <a name="new_PipelineRequest+PipelineRequest_new"></a>
93
+
94
+ #### new exports.PipelineRequest(url, [init])
95
+ Creates the pipeline request
96
+
97
+
98
+ | Param | Type |
99
+ | --- | --- |
100
+ | url | <code>URL</code> \| <code>string</code> |
101
+ | [init] | <code>PipelineRequestInit</code> |
102
+
103
+ <a name="PipelineResponse"></a>
104
+
105
+ ## PipelineResponse
106
+ **Kind**: global class
107
+
108
+ * [PipelineResponse](#PipelineResponse)
109
+ * [new PipelineResponse()](#new_PipelineResponse_new)
110
+ * [.PipelineResponse](#PipelineResponse+PipelineResponse)
111
+ * [new exports.PipelineResponse()](#new_PipelineResponse+PipelineResponse_new)
112
+ * [.json()](#PipelineResponse+json) ⇒ <code>object</code>
113
+
114
+ <a name="new_PipelineResponse_new"></a>
115
+
116
+ ### new PipelineResponse()
117
+ Response of a pipeline
118
+
119
+ <a name="PipelineResponse+PipelineResponse"></a>
120
+
121
+ ### pipelineResponse.PipelineResponse
122
+ **Kind**: instance class of [<code>PipelineResponse</code>](#PipelineResponse)
123
+ <a name="new_PipelineResponse+PipelineResponse_new"></a>
124
+
125
+ #### new exports.PipelineResponse()
126
+ Creates the pipeline response
127
+
128
+ <a name="PipelineResponse+json"></a>
129
+
130
+ ### pipelineResponse.json() ⇒ <code>object</code>
131
+ Returns the json parsed object of `this.body`.
132
+
133
+ **Kind**: instance method of [<code>PipelineResponse</code>](#PipelineResponse)
134
+ <a name="PipelineState"></a>
135
+
136
+ ## PipelineState
137
+ **Kind**: global class
138
+
139
+ * [PipelineState](#PipelineState)
140
+ * [new PipelineState()](#new_PipelineState_new)
141
+ * [new PipelineState()](#new_PipelineState_new)
142
+ * [.PipelineState](#PipelineState+PipelineState)
143
+ * [new exports.PipelineState(opts)](#new_PipelineState+PipelineState_new)
144
+
145
+ <a name="new_PipelineState_new"></a>
146
+
147
+ ### new PipelineState()
148
+ State of the pipeline
149
+
150
+ <a name="new_PipelineState_new"></a>
151
+
152
+ ### new PipelineState()
153
+ State of the pipeline
154
+
155
+ <a name="PipelineState+PipelineState"></a>
156
+
157
+ ### pipelineState.PipelineState
158
+ **Kind**: instance class of [<code>PipelineState</code>](#PipelineState)
159
+ <a name="new_PipelineState+PipelineState_new"></a>
160
+
161
+ #### new exports.PipelineState(opts)
162
+ Creates the pipeline state
163
+
164
+
165
+ | Param | Type |
166
+ | --- | --- |
167
+ | opts | <code>PipelineOptions</code> |
168
+
169
+ <a name="searchParamsToObject"></a>
170
+
171
+ ## searchParamsToObject(searchParams) ⇒ <code>Object</code>
172
+ Converts URLSearchParams to an object
173
+
174
+ **Kind**: global function
175
+ **Returns**: <code>Object</code> - The converted object
176
+
177
+ | Param | Type | Description |
178
+ | --- | --- | --- |
179
+ | searchParams | <code>URLSearchParams</code> | the search params object |
180
+
181
+ <a name="extractBodyData"></a>
182
+
183
+ ## extractBodyData(request) ⇒ <code>Object</code>
184
+ Extracts and parses the body data from the request
185
+
186
+ **Kind**: global function
187
+ **Returns**: <code>Object</code> - The body data
188
+ **Throws**:
189
+
190
+ - <code>Error</code> If an error occurs parsing the body
191
+
192
+
193
+ | Param | Type | Description |
194
+ | --- | --- | --- |
195
+ | request | [<code>PipelineRequest</code>](#PipelineRequest) | the request object (see fetch api) |
196
+
197
+ <a name="formsPipe"></a>
198
+
199
+ ## formsPipe(state, request) ⇒ [<code>Promise.&lt;PipelineResponse&gt;</code>](#PipelineResponse)
200
+ Handle a pipeline POST request.
201
+ At this point POST's only apply to json files that are backed by a workbook.
202
+
203
+ **Kind**: global function
204
+ **Returns**: [<code>Promise.&lt;PipelineResponse&gt;</code>](#PipelineResponse) - a response
205
+
206
+ | Param | Type | Description |
207
+ | --- | --- | --- |
208
+ | state | [<code>PipelineState</code>](#PipelineState) | pipeline options |
209
+ | request | [<code>PipelineRequest</code>](#PipelineRequest) | |
210
+
211
+ <a name="htmlPipe"></a>
212
+
213
+ ## htmlPipe(state, req) ⇒ [<code>PipelineResponse</code>](#PipelineResponse)
214
+ Runs the default pipeline and returns the response.
215
+
216
+ **Kind**: global function
217
+
218
+ | Param | Type |
219
+ | --- | --- |
220
+ | state | [<code>PipelineState</code>](#PipelineState) |
221
+ | req | [<code>PipelineRequest</code>](#PipelineRequest) |
222
+
223
+ <a name="htmlPipe..res"></a>
224
+
225
+ ### htmlPipe~res : [<code>PipelineResponse</code>](#PipelineResponse)
226
+ **Kind**: inner constant of [<code>htmlPipe</code>](#htmlPipe)
227
+ <a name="jsonPipe"></a>
228
+
229
+ ## jsonPipe(state, req) ⇒ [<code>PipelineResponse</code>](#PipelineResponse)
230
+ Runs the default pipeline and returns the response.
231
+
232
+ **Kind**: global function
233
+
234
+ | Param | Type |
235
+ | --- | --- |
236
+ | state | [<code>PipelineState</code>](#PipelineState) |
237
+ | req | [<code>PipelineRequest</code>](#PipelineRequest) |
238
+
239
+ <a name="optionsPipe"></a>
240
+
241
+ ## optionsPipe(state, request) ⇒ <code>Response</code>
242
+ Handles options requests
5
243
 
6
244
  **Kind**: global function
7
- **Returns**: <code>string</code> - a greeting
245
+ **Returns**: <code>Response</code> - a response
8
246
 
9
247
  | Param | Type | Description |
10
248
  | --- | --- | --- |
11
- | name | <code>string</code> | name of the person to greet |
249
+ | state | [<code>PipelineState</code>](#PipelineState) | pipeline options |
250
+ | request | [<code>PipelineRequest</code>](#PipelineRequest) | |
12
251
 
package/package.json CHANGED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "1.5.2",
3
+ "version": "1.5.5",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "test": " c8 mocha",
10
- "test-ci": "c8 mocha && codecov",
11
10
  "lint": "eslint .",
12
11
  "docs": "npx jsdoc2md -c .jsdoc.json --files 'src/*.js' > docs/API.md",
13
12
  "semantic-release": "semantic-release",
14
- "commit": "git-cz",
15
13
  "prepare": "husky install"
16
14
  },
17
15
  "repository": {
@@ -32,8 +30,8 @@
32
30
  "loader": "esmock"
33
31
  },
34
32
  "dependencies": {
35
- "@adobe/helix-markdown-support": "3.1.2",
36
- "@adobe/helix-shared-utils": "2.0.9",
33
+ "@adobe/helix-markdown-support": "3.1.4",
34
+ "@adobe/helix-shared-utils": "2.0.10",
37
35
  "github-slugger": "1.4.0",
38
36
  "hast-util-raw": "7.2.1",
39
37
  "hast-util-select": "5.0.1",
@@ -67,21 +65,16 @@
67
65
  },
68
66
  "devDependencies": {
69
67
  "@adobe/eslint-config-helix": "1.3.2",
70
- "@adobe/semantic-release-coralogix": "1.1.1",
71
68
  "@markedjs/html-differ": "4.0.2",
72
69
  "@semantic-release/changelog": "6.0.1",
73
70
  "@semantic-release/git": "10.0.1",
74
71
  "@semantic-release/npm": "9.0.1",
75
72
  "c8": "7.11.2",
76
- "chalk-template": "0.4.0",
77
- "codecov": "3.8.3",
78
- "commitizen": "4.2.4",
79
- "cz-conventional-changelog": "3.3.0",
80
73
  "eslint": "8.15.0",
81
74
  "eslint-plugin-header": "3.1.1",
82
75
  "eslint-plugin-import": "2.26.0",
83
76
  "esmock": "1.7.5",
84
- "husky": "7.0.4",
77
+ "husky": "8.0.1",
85
78
  "js-yaml": "4.1.0",
86
79
  "jsdoc-to-markdown": "7.1.1",
87
80
  "jsdom": "19.0.0",
@@ -95,10 +88,5 @@
95
88
  "lint-staged": {
96
89
  "*.js": "eslint",
97
90
  "*.cjs": "eslint"
98
- },
99
- "config": {
100
- "commitizen": {
101
- "path": "node_modules/cz-conventional-changelog"
102
- }
103
91
  }
104
92
  }