@adobe/helix-html-pipeline 6.10.0 → 6.10.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [6.10.2](https://github.com/adobe/helix-html-pipeline/compare/v6.10.1...v6.10.2) (2024-04-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove default head in helix 5 ([8014272](https://github.com/adobe/helix-html-pipeline/commit/80142721b13ae35d92efe9ad1d084b8dc4c757e5))
7
+ * test ([3379dfc](https://github.com/adobe/helix-html-pipeline/commit/3379dfc0b3b660bdeb25f4ca7f8910aece2b7ab3))
8
+ * update head fallback to newer helix project structure ([750d2f8](https://github.com/adobe/helix-html-pipeline/commit/750d2f83a541529de708ff6c4ed6807942c3a296))
9
+ * update test ([7562cb7](https://github.com/adobe/helix-html-pipeline/commit/7562cb759aeae98ffd91caa20f860385a2dec467))
10
+
11
+ ## [6.10.1](https://github.com/adobe/helix-html-pipeline/compare/v6.10.0...v6.10.1) (2024-04-25)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * don't fetch robots.txt from code-bus ([#595](https://github.com/adobe/helix-html-pipeline/issues/595)) ([5000a9c](https://github.com/adobe/helix-html-pipeline/commit/5000a9cdc13fbd12cd479740c60a613c9fcd14e8))
17
+
1
18
  # [6.10.0](https://github.com/adobe/helix-html-pipeline/compare/v6.9.0...v6.10.0) (2024-04-24)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.10.0",
3
+ "version": "6.10.2",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -10,10 +10,8 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  import { cleanupHeaderValue, computeSurrogateKey } from '@adobe/helix-shared-utils';
13
- import fetchContent from './steps/fetch-content.js';
14
13
  import renderCode from './steps/render-code.js';
15
14
  import setCustomResponseHeaders from './steps/set-custom-response-headers.js';
16
- import { PipelineStatusError } from './PipelineStatusError.js';
17
15
  import { PipelineResponse } from './PipelineResponse.js';
18
16
  import initConfig from './steps/init-config.js';
19
17
 
@@ -172,27 +170,15 @@ export async function robotsPipe(state, req) {
172
170
  try {
173
171
  await initConfig(state, req, res);
174
172
 
175
- // fetch robots.txt
176
- state.timer?.update('content-fetch');
177
-
178
- state.content.sourceBus = 'code';
179
- await fetchContent(state, req, res);
180
- if (res.status === 404) {
181
- const robots = state.config?.robots?.txt;
182
- if (robots) {
183
- state.content.data = robots;
184
- } else {
185
- const ret = generateRobots(state);
186
- state.content.data = ret.body;
187
- }
188
- res.headers.set('content-type', 'text/plain; charset=utf-8');
189
- res.status = 200;
190
- delete res.error;
191
- }
192
- if (res.error) {
193
- // if content loading produced an error, we're done.
194
- throw new PipelineStatusError(res.status, res.error);
173
+ const robots = state.config?.robots?.txt;
174
+ if (robots) {
175
+ state.content.data = robots;
176
+ } else {
177
+ const ret = generateRobots(state);
178
+ state.content.data = ret.body;
195
179
  }
180
+ res.headers.set('content-type', 'text/plain; charset=utf-8');
181
+ res.status = 200;
196
182
 
197
183
  state.timer?.update('serialize');
198
184
  await renderCode(state, req, res);
@@ -78,10 +78,6 @@ export default async function render(state, req, res) {
78
78
  .use(rehypeParse, { fragment: true })
79
79
  .parse(headHtml);
80
80
  $head.children.push(...$headHtml.children);
81
- } else {
82
- appendElement($head, createElement('meta', 'name', 'viewport', 'content', 'width=device-width, initial-scale=1'));
83
- appendElement($head, createElement('script', 'src', '/scripts.js', 'type', 'module', 'crossorigin', 'use-credentials'));
84
- appendElement($head, createElement('link', 'rel', 'stylesheet', 'href', '/styles.css'));
85
81
  }
86
82
 
87
83
  res.document = {