@stacksjs/stx 0.2.163 → 0.2.165

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/render.js CHANGED
@@ -120,6 +120,10 @@ export async function renderTemplateString(content, filePath, renderOptions = {}
120
120
  if (Number.isInteger(status) && status >= 100 && status <= 599)
121
121
  recordOn(renderOptions.context, "__stxResponseStatus", status);
122
122
  },
123
+ notFound: (status = 404) => {
124
+ const code = Number.isInteger(status) && status >= 400 && status <= 599 ? status : 404;
125
+ recordOn(renderOptions.context, "__stxResponseStatus", code);
126
+ },
123
127
  setResponseHeader: (name, value) => {
124
128
  if (!name)
125
129
  return;