Skip to content

Commit

Permalink
Project update. [p][robotic]
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswrks committed Apr 5, 2024
1 parent ccc931a commit 3afff5a
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

[production]
node >= 20.9.0
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Locals

Expand Down
8 changes: 4 additions & 4 deletions .env.vault
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ DOTENV_VAULT_MAIN="3rfi+ClkONvfHPiU9FTBcC1+Um/L8QeM9dRw1jFzEqzZXw=="
DOTENV_VAULT_MAIN_VERSION=1

# dev
DOTENV_VAULT_DEV="NiW0LCsWtjzVN2pov11Wl9ZH67lKxZVNmgyoTW2VjbwJJ8Hg4irgsAADBJKqRpQz3Zp5n9ze0wAeClaomqo6EIysqtYxYeZkhvWa6g6TlFga0QrNZlr+eNX4zedU0eCJ+JxFIMgExvdNZCpdTQMCftl3C+wFz2g10DBoPT4cE5qHvWZ3H/HBJ6WgDCm/p6u/onaFcnH2BlWXoOGoVSn1+1wLwksPKpDRj6nwijbZsP0JSYNE54ayeyh81sFcRseNR/II/9J63F4tH2982xbSP8NOeltE7iOwT6L/YWPmN4/1MG2qa8rDnQVesK6NJkksyizS2KNjFTI7+AOTh2Nd81xgo8VLCmkHTcQA7Vmw8xG8EK3hLsKQNzvWtUM12el4/aTIbzHd1vA8VsKzGzxtPQ0y/jknFDDo81mdpazFwRWXSBSqK7sxyzbFoNb2xLGF283UnxvkEDLTfa98VH2aapD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# stage
DOTENV_VAULT_STAGE="bfqZYD8oVLWMZ0JR5LICV+sB/btaXavszxZLxTfwSH8U5fg="
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Default

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Packages

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review `./settings.mjs`.
*
* Last generated using `./settings.mjs` Apr 4, 2024 11:57 PM UTC.
* Last generated using `./settings.mjs` Apr 5, 2024 12:10 AM UTC.
*/
{
"editor.formatOnType": false,
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Apr 4, 2024 11:57 PM UTC.
# Last generated Apr 5, 2024 12:10 AM UTC.

# Locals

Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "1.0.307",
"version": "1.0.308",
"license": "GPL-3.0-or-later",
"name": "@clevercanyon/utilities.cfw",
"description": "Utilities for JavaScript apps running in a Cloudflare Worker environment.",
Expand Down
14 changes: 5 additions & 9 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ export type JSONResponsePayload<Type extends object = object> = $type.ReadonlyDe
data?: Type;
}>;
export type CatchThrownOptions = {
thrown: unknown;
responseType: 'none' | 'json';
responseConfig: $http.ResponseConfig;

thrown: unknown;
expectedCauses: string[];
};

Expand All @@ -29,12 +28,12 @@ export type CatchThrownOptions = {
* @param thrown Thrown; e.g., error, response.
* @param options {@see CatchThrownOptions}.
*/
export const catchThrown = async (rcData: $type.$cfw.RequestContextData, thrown: unknown, options: CatchThrownOptions): Promise<void> => {
if ($is.response(thrown)) throw thrown;

export const catchThrown = async (rcData: $type.$cfw.RequestContextData, options: CatchThrownOptions): Promise<void> => {
const { auditLogger } = rcData,
opts = $obj.defaults({}, options) as Required<CatchThrownOptions>,
{ responseType, responseConfig, expectedCauses } = opts;
{ thrown, responseType, responseConfig, expectedCauses } = opts;

if ($is.response(thrown)) throw thrown;

const message = $error.safeMessageFrom(thrown, {
expectedCauses,
Expand All @@ -49,9 +48,6 @@ export const catchThrown = async (rcData: $type.$cfw.RequestContextData, thrown:
responseConfig.sMaxAge = 0;
responseConfig.staleAge = 0;

responseConfig.cacheVersion = 'none';
responseConfig.varyOn = [];

responseConfig.headers = {};
responseConfig.appendHeaders = {};

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review `./tsconfig.mjs`.
*
* Last generated using `./tsconfig.mjs` Apr 4, 2024 11:57 PM UTC.
* Last generated using `./tsconfig.mjs` Apr 5, 2024 12:10 AM UTC.
*/
{
"include": ["./src/**/*", "./dev-types.d.ts"],
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# @note This entire file will be updated automatically.
# @note Instead of editing here, please review `./wrangler.mjs`.
#
# Last generated using `./wrangler.mjs` Apr 4, 2024 11:57 PM UTC.
# Last generated using `./wrangler.mjs` Apr 5, 2024 12:10 AM UTC.
##

send_metrics = false
Expand Down

0 comments on commit 3afff5a

Please sign in to comment.