profile
viewpoint
Craig Morten asos-craigmorten @asosteam London https://www.linkedin.com/in/craig-morten/ 26 • London • Another JS Guy • @asosteam • JavaScript, TypeScript, Node, Deno, Web, React, Docker, Kubernetes

asos-craigmorten/opine 243

Fast, minimalist web framework for Deno ported from ExpressJS.

asos-craigmorten/deno-react-base-server 17

Minimal React SSR Base Server in Deno.

asos-craigmorten/importw 6

Permission restricted imports for Deno.

asos-craigmorten/grafana-jsx 3

A JSX library for creating JSON for Grafana.

asos-craigmorten/json-jsx 2

A JSX library for creating JSON.

asos-craigmorten/opine-http-proxy 2

Proxy middleware for Deno Opine HTTP servers.

asos-craigmorten/applicationinsights-express-middleware 1

Express Middleware tracking for Microsoft Application Insights SDK for Node.js.

asos-craigmorten/ayup 1

For being lazy with what you test.

asos-craigmorten/net-framework-for-mac 1

Building and running Windows .NET framework applications on a Mac.

asos-craigmorten/never-exit 1

Library to ensure your Node processes never exit by themselves.

issue commentasos-craigmorten/opine

TypeScript Error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.

Hey @KaKi87 can you provide a reproduceable example and the exact errors your are getting on the console? 😄

srepollock

comment created time in a day

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 0d3216c289fc07595a60508259beef7c9662c9da

fix: cater for different OS messaging

view details

push time in 2 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha e31c8a256e8be4f3c878dde8e28c460e6e9de24a

tmp: add a log

view details

push time in 2 days

PR opened asos-craigmorten/opine

[#75] File options support feature

Issue

#75

Details

Adds options support for file related APIs.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [ ] Has been tested (where required) before merge to main.
+3785 -154

0 comment

13 changed files

pr created time in 3 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 5df82b6d8c99fb13b9238ab26e983285ab5c716b

feat: handle closed resources gracefully fix: better handling of directories for sendFile feat: support ranges properly test: coverage on new functionality TODO: serveStatic work

view details

push time in 3 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 8b352f9fa23b45de75a5459bfd2a9520dc1ac8f0

feat: file streaming and range work

view details

push time in 3 days

create barnchasos-craigmorten/opine

branch : feat/issue-75-file-api-options

created branch time in 3 days

created tagasos-craigmorten/opine

tag0.25.0

Fast, minimalist web framework for Deno ported from ExpressJS.

created time in 4 days

release asos-craigmorten/opine

0.25.0

released time in 4 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha ad6396104cc21717ef737f048476a6b6945ffabb

feat: 0.25.0

view details

push time in 4 days

push eventasos-craigmorten/opine

Craig Morten

commit sha dbab25f46eba9582d0f944546daf5ce710b1c34f

[#72] Implement trust proxy setting (#84) * feat: implement trust proxy setting * fix: boyscout correct docs on gzip/deflate

view details

push time in 4 days

delete branch asos-craigmorten/opine

delete branch : feat/issue-72-trust-proxy

delete time in 4 days

PR merged asos-craigmorten/opine

[#72] Implement trust proxy setting feature

Issue

#72

Details

Implements the trust proxy setting for Opine.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+1366 -191

0 comment

20 changed files

asos-craigmorten

pr closed time in 4 days

issue closedasos-craigmorten/opine

[FEAT] Support `trust proxy` application setting

Issue

Setup:

This issue is to support the trust proxy (and trust proxy fn) application setting, allowing users to indicate their Opine app is behind a front-facing proxy.

This issue includes the support of req.ip() and req.ips() APIs.

Details

See:

  • https://expressjs.com/en/api.html#app.settings.table
  • https://github.com/expressjs/express/blob/master/lib/application.js#L79
  • https://github.com/expressjs/express/blob/master/lib/application.js#L91
  • https://github.com/expressjs/express/blob/master/lib/application.js#L371
  • https://github.com/expressjs/express/blob/master/lib/request.js#L306
  • https://github.com/expressjs/express/blob/master/lib/request.js#L349
  • https://github.com/expressjs/express/blob/master/lib/request.js#L366
  • https://github.com/expressjs/express/blob/master/lib/request.js#L427

closed time in 4 days

asos-craigmorten

push eventasos-craigmorten/opine

asos-craigmorten

commit sha a7be13611d2ccbeb915778126c81a3f8912c097f

fix: boyscout correct docs on gzip/deflate

view details

push time in 4 days

PR opened asos-craigmorten/opine

[#72] Implement trust proxy setting

Issue

#72

Details

Implements the trust proxy setting for Opine.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+1348 -179

0 comment

19 changed files

pr created time in 4 days

create barnchasos-craigmorten/opine

branch : feat/issue-72-trust-proxy

created branch time in 4 days

issue commentasos-craigmorten/superoak

AssertionError: Test case is leaking async ops.

Haven't dug too deeply, but from a quick reminder of the code performing:

const request = await superdeno(app);

Will launch an Oak server and resolve with a promise which we are awaiting. Given nothing then stops said Oak sever, my guesses are that it (the server) is effectively the async op that is not cleaned up (or more accurately the async iterator inside the Oak server that processes requests hasn't been escaped).

Hence I'm curious if the issue goes away if you actually complete the usage of superdeno as documented and make an assertion - superdeno has it's own internal logic to close the Oak server using an AbortController, and this will only be fired when the underlying superdeno .end() method is called, either implicitly or explicitly (REF: https://github.com/asos-craigmorten/superdeno/blob/main/src/test.ts#L350)

For instance, updating to the following solves it for me:

import { Application} from "https://deno.land/x/oak@v6.3.1/mod.ts";
import { superoak } from "https://deno.land/x/superoak@2.3.1/mod.ts";

const app = new Application();
app.use((ctx: any) => {
  ctx.response.body = "Hello world!";
});

Deno.test("Example", async () => {
  const request = await superoak(app);

  await request.get("/"); // Need to invoke at least one superdeno method otherwise the underlying server is left runner forever (well... until it gets cleaned up by Deno which will tell you off).
});
antoniogamiz

comment created time in 5 days

issue commentasos-craigmorten/superoak

AssertionError: Test case is leaking async ops.

Hey @antoniogamiz thanks for raising - not ideal at all given that really is the simplest usecase! 😅

Will try to spare some time soon to investigate - if you have time and are keen, please do have a dive into the code to figure out what async/promising thing is being left hanging.

It's odd this hasn't been picked up in the tests but haven't touched this in a month and may be that something in Oak / Deno has moved along since September... or just have been super lucky (or unlucky depending on how see it) with an async op race condition.

antoniogamiz

comment created time in 5 days

created tagasos-craigmorten/snyker

tag3.1.0

An opinionated, heavy-handed wrapper around Snyk.

created time in 6 days

release asos-craigmorten/snyker

3.1.0

released time in 6 days

push eventasos-craigmorten/snyker

asos-craigmorten

commit sha 91ba78556e2571621ff4e1181416aeeed72bf58e

feat: 3.1.0

view details

push time in 6 days

push eventasos-craigmorten/snyker

asos-craigmorten

commit sha 269a2927489c0c524775acf0c642e12042e46028

feat: upgrade snyk

view details

push time in 6 days

delete branch asos-craigmorten/snyker

delete branch : dependabot/npm_and_yarn/bl-4.0.3

delete time in 6 days

push eventasos-craigmorten/snyker

dependabot[bot]

commit sha b4c11723f03b166c4c821c8563a0e8c319fb4565

build(deps): bump bl from 4.0.2 to 4.0.3 (#3) Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 6 days

PR merged asos-craigmorten/snyker

build(deps): bump bl from 4.0.2 to 4.0.3 dependencies

Bumps bl from 4.0.2 to 4.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rvagg/bl/releases">bl's releases</a>.</em></p> <blockquote> <h2>v4.0.3</h2> <p>Fix unintialized memory access</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rvagg/bl/commit/f659836cc84211cad41b73bad89c78f7f874c626"><code>f659836</code></a> Bumped v4.0.3</li> <li><a href="https://github.com/rvagg/bl/commit/7a4ae7f818a4ceba234f3d186a1ffb3f0a34ad0c"><code>7a4ae7f</code></a> Node v14</li> <li><a href="https://github.com/rvagg/bl/commit/d3e240e3b8ba4048d3c76ef5fb9dd1f8872d3190"><code>d3e240e</code></a> Fix unintialized memory access</li> <li><a href="https://github.com/rvagg/bl/commit/1c590ad49e10a158783ada7cc0662d9e0cc6cc11"><code>1c590ad</code></a> add license MIT tag to package.json (<a href="https://github-redirect.dependabot.com/rvagg/bl/issues/83">#83</a>)</li> <li>See full diff in <a href="https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+4 -9

0 comment

1 changed file

dependabot[bot]

pr closed time in 6 days

PullRequestReviewEvent

push eventasos-craigmorten/grafana-jsx

dependabot[bot]

commit sha c9378a1fa88c1320015c95194ba5a9f3060ebe18

build(deps): bump lodash from 4.17.15 to 4.17.19 (#4)

view details

push time in 7 days

delete branch asos-craigmorten/grafana-jsx

delete branch : dependabot/npm_and_yarn/lodash-4.17.19

delete time in 7 days

PR merged asos-craigmorten/grafana-jsx

build(deps): bump lodash from 4.17.15 to 4.17.19 dependencies

⚠️ Dependabot is rebasing this PR ⚠️

If you make any changes to it yourself then they will take precedence over the rebase.


Bumps lodash from 4.17.15 to 4.17.19. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lodash/lodash/releases">lodash's releases</a>.</em></p> <blockquote> <h2>4.17.16</h2> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/d7fbc52ee0466a6d248f047b5d5c3e6d1e099056"><code>d7fbc52</code></a> Bump to v4.17.19</li> <li><a href="https://github.com/lodash/lodash/commit/2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6"><code>2e1c0f2</code></a> Add npm-package</li> <li><a href="https://github.com/lodash/lodash/commit/1b6c282299f4e0271f932b466c67f0f822aa308e"><code>1b6c282</code></a> Bump to v4.17.18</li> <li><a href="https://github.com/lodash/lodash/commit/a370ac81408de2da77a82b3c4b61a01a3b9c2fac"><code>a370ac8</code></a> Bump to v4.17.17</li> <li><a href="https://github.com/lodash/lodash/commit/1144918f3578a84fcc4986da9b806e63a6175cbb"><code>1144918</code></a> Rebuild lodash and docs</li> <li><a href="https://github.com/lodash/lodash/commit/3a3b0fd339c2109563f7e8167dc95265ed82ef3e"><code>3a3b0fd</code></a> Bump to v4.17.16</li> <li><a href="https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12"><code>c84fe82</code></a> fix(zipObjectDeep): prototype pollution (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4759">#4759</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/e7b28ea6cb17b4ca021e7c9d66218c8c89782f32"><code>e7b28ea</code></a> Sanitize sourceURL so it cannot affect evaled code (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4518">#4518</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/0cec225778d4ac26c2bac95031ecc92a94f08bbb"><code>0cec225</code></a> Fix lodash.isEqual for circular references (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4320">#4320</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4515">#4515</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/94c3a8133cb4fcdb50db72b4fd14dd884b195cd5"><code>94c3a81</code></a> Document matches* shorthands for over* methods (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4510">#4510</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4514">#4514</a>)</li> <li>Additional commits viewable in <a href="https://github.com/lodash/lodash/compare/4.17.15...4.17.19">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~mathias">mathias</a>, a new releaser for lodash since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 7 days

PullRequestReviewEvent

delete branch asos-craigmorten/grafana-jsx

delete branch : dependabot/npm_and_yarn/test/storybook/lodash-4.17.19

delete time in 7 days

push eventasos-craigmorten/grafana-jsx

dependabot[bot]

commit sha f523962b45446103a7857520039ca69698cc49b5

build(deps): bump lodash from 4.17.15 to 4.17.19 in /test/storybook (#5)

view details

push time in 7 days

PR merged asos-craigmorten/grafana-jsx

build(deps): bump lodash from 4.17.15 to 4.17.19 in /test/storybook dependencies

Bumps lodash from 4.17.15 to 4.17.19. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lodash/lodash/releases">lodash's releases</a>.</em></p> <blockquote> <h2>4.17.16</h2> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/d7fbc52ee0466a6d248f047b5d5c3e6d1e099056"><code>d7fbc52</code></a> Bump to v4.17.19</li> <li><a href="https://github.com/lodash/lodash/commit/2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6"><code>2e1c0f2</code></a> Add npm-package</li> <li><a href="https://github.com/lodash/lodash/commit/1b6c282299f4e0271f932b466c67f0f822aa308e"><code>1b6c282</code></a> Bump to v4.17.18</li> <li><a href="https://github.com/lodash/lodash/commit/a370ac81408de2da77a82b3c4b61a01a3b9c2fac"><code>a370ac8</code></a> Bump to v4.17.17</li> <li><a href="https://github.com/lodash/lodash/commit/1144918f3578a84fcc4986da9b806e63a6175cbb"><code>1144918</code></a> Rebuild lodash and docs</li> <li><a href="https://github.com/lodash/lodash/commit/3a3b0fd339c2109563f7e8167dc95265ed82ef3e"><code>3a3b0fd</code></a> Bump to v4.17.16</li> <li><a href="https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12"><code>c84fe82</code></a> fix(zipObjectDeep): prototype pollution (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4759">#4759</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/e7b28ea6cb17b4ca021e7c9d66218c8c89782f32"><code>e7b28ea</code></a> Sanitize sourceURL so it cannot affect evaled code (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4518">#4518</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/0cec225778d4ac26c2bac95031ecc92a94f08bbb"><code>0cec225</code></a> Fix lodash.isEqual for circular references (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4320">#4320</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4515">#4515</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/94c3a8133cb4fcdb50db72b4fd14dd884b195cd5"><code>94c3a81</code></a> Document matches* shorthands for over* methods (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4510">#4510</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4514">#4514</a>)</li> <li>Additional commits viewable in <a href="https://github.com/lodash/lodash/compare/4.17.15...4.17.19">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~mathias">mathias</a>, a new releaser for lodash since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 7 days

PullRequestReviewEvent

startedmsrkp/PPScan

started time in 9 days

created tagasos-craigmorten/opine

tag0.24.0

Fast, minimalist web framework for Deno ported from ExpressJS.

created time in 11 days

release asos-craigmorten/opine

0.24.0

released time in 11 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 7a7d56d28125dcf463655d96ec0bb82787699ed9

feat: 0.24.0

view details

push time in 11 days

push eventasos-craigmorten/opine

Craig Morten

commit sha 5e161c608dd884e4eb17dcb58c41b571901f34e0

[ISSUE-25] Implement MVC example (#83) * feat: implement MVC example * feat: implement extended urlencoded body

view details

push time in 11 days

delete branch asos-craigmorten/opine

delete branch : feat/issue-25-implement-mvc

delete time in 11 days

PR merged asos-craigmorten/opine

[ISSUE-25] Implement MVC example examples feature

Issue

#25

Details

  • MVC example
  • Implement extended urlencoded body parser

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+510 -8

0 comment

19 changed files

asos-craigmorten

pr closed time in 11 days

issue closedasos-craigmorten/opine

[DOCS] Add MVC example

Issue

Add a code example for an MVC application using Opine.

Details

See https://github.com/expressjs/express/tree/master/examples/mvc for a guideline.

closed time in 11 days

asos-craigmorten

PR opened asos-craigmorten/opine

[ISSUE-25] Implement MVC example

Issue

[#]](https://github.com/asos-craigmorten/opine/issues/])

Details

  • MVC example
  • Implement extended urlencoded body parser

CheckList

  • [ ] PR starts with [#ISSUE_ID].
  • [ ] Has been tested (where required) before merge to main.
+510 -8

0 comment

19 changed files

pr created time in 11 days

create barnchasos-craigmorten/opine

branch : feat/issue-25-implement-mvc

created branch time in 11 days

push eventasos-craigmorten/opine

Craig Morten

commit sha b0bd1b5db73866699397e3a896828a188bbf682d

[ISSUE-56] Add cors example (#82) * docs: add cors example

view details

push time in 11 days

delete branch asos-craigmorten/opine

delete branch : docs/issue-56-add-cors-example

delete time in 11 days

PR merged asos-craigmorten/opine

[ISSUE-56] Add cors example documentation examples

Issue

#56

Details

Adds a CORS example.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+45 -3

0 comment

5 changed files

asos-craigmorten

pr closed time in 11 days

issue closedasos-craigmorten/opine

[DOCS] Cors Enablements

First of all: Thank you for this module.

As I could not find a simple & quick solution for cors enablement so far, I created a corresponding PR on https://deno.land/x/cors.

If you know any better approaches, please let me know.

closed time in 11 days

michael-spengler

push eventasos-craigmorten/opine

Craig Morten

commit sha 7ce2fe605e5e0df8170ecb5ff04832d935a2c5c7

[ISSUE-52] Support gzip and deflate content-encoding (#81)

view details

push time in 11 days

delete branch asos-craigmorten/opine

delete branch : feat/issue-52-gzip-and-deflate-support

delete time in 11 days

PR merged asos-craigmorten/opine

[ISSUE-52] Support gzip and deflate content-encoding feature

Issue

#52

Details

Adds support for gzip and deflate content-encoding.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+144 -87

1 comment

16 changed files

asos-craigmorten

pr closed time in 11 days

issue closedasos-craigmorten/opine

[FEAT] Support GZIP and Deflate Compression

Issue

Setup:

Add support for deflate and gzip encoding in body-parsers.

Details

Currently gzip and deflate are not supported in Opine and throw a 415 error. This issue is to add support to Opine for these two standard options which is now possible due to modules being made available in the Deno userland.

Relevant file: ./src/middleware/bodyParser/read.ts Line 117.

Modules to explore:

  • https://deno.land/x/wasm_gzip@v1.0.0
  • https://deno.land/x/jszip@0.7.0
  • https://deno.land/x/denoflate

closed time in 11 days

asos-craigmorten

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 33f85f90da628897e4b1ba59d4a64d3e4aa5d76e

fix: lockfile

view details

push time in 11 days

PR opened asos-craigmorten/opine

[ISSUE-56] Add cors example

Issue

#56

Details

Adds a CORS example.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+42 -3

0 comment

4 changed files

pr created time in 11 days

create barnchasos-craigmorten/opine

branch : docs/issue-56-add-cors-example

created branch time in 11 days

PR opened asos-craigmorten/opine

[ISSUE-52] Support gzip and deflate content-encoding

Issue

#52

Details

Adds support for gzip and deflate content-encoding.

CheckList

  • [ ] PR starts with [#ISSUE_ID].
  • [ ] Has been tested (where required) before merge to main.
+144 -87

0 comment

16 changed files

pr created time in 11 days

create barnchasos-craigmorten/opine

branch : feat/issue-52-gzip-and-deflate-support

created branch time in 11 days

push eventasos-craigmorten/awesome-deno

Ben Gubler

commit sha d3686f5da044c8e6414a3b8f2cc2d68113002ca6

Add Eta to the Modules section (#221)

view details

Aman Agrawal

commit sha e9c8f3653ec3029df004f6f106fce3b76530a905

Added article for using JWT token in Deno (#222) In this article, there is a step by step guide for creating and validating JWT in Deno

view details

Szalay Kristóf

commit sha a8a4fb450b81e8e1a477a4db6137fb15a3af189d

Add prettyBenching to modules (#223) * Add prettyBenching to modules * Change lib to library

view details

Yoshiya Hinosawa

commit sha a963845492ce935598d815a3c4ad0e6ff2c6b2e7

Update README.md (#224)

view details

ryo-ma

commit sha 3c4210f8a63fccf4912fdbd92d81dbfeaedf70a8

Update README.md (#225)

view details

Craig Morten

commit sha 0fdca7bb5a253688e45831b944ac65a0076a08a8

Merge branch 'master' into feat/add-superoak

view details

push time in 23 days

push eventasos-craigmorten/awesome-deno

asos-craigmorten

commit sha 5e582435a4ead23f2db351b5d13708577421380e

fix: alphabetically order in "s" section

view details

push time in 23 days

created tagasos-craigmorten/opine

tag0.23.1

Fast, minimalist web framework for Deno ported from ExpressJS.

created time in 24 days

release asos-craigmorten/opine

0.23.1

released time in 24 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 81b850c40622746b2be49720c42b9fd78fe977a5

revert(ci): downgrade to eggs@0.2.2 in CI

view details

push time in 24 days

created tagasos-craigmorten/opine

tag0.23.0

Fast, minimalist web framework for Deno ported from ExpressJS.

created time in 24 days

release asos-craigmorten/opine

0.23.0

released time in 24 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha ad89e2944981e7138cd6c8e8ce479df0cc14b3af

feat: 0.23.0

view details

push time in 24 days

push eventasos-craigmorten/opine

asos-craigmorten

commit sha 13e5356def5f2b75631177f30e6b839c427ed79b

feat(deps): upgrade to Deno 1.4.4, std 0.73.0 and few other dep upgrades

view details

push time in 24 days

issue closedasos-craigmorten/opine

Consider using Pagic to build the website?

Pagic is a static site generator powered by Deno + React

Here are some demos:

If it is possible to use pagic to build the website, I would like to create the pull-request

closed time in 25 days

xcatliu

push eventasos-craigmorten/opine

Fabrizio Vitale

commit sha 198cd8033babf62cd11b38522fd7f7bc5cdee180

[#74] res.cookie & res.clearCookie express style overloads (#80) * [#74] res.cookie & res.clearCookie express style overloads * fix(cookie): import path and improve clearCookie docs * fix(ci): pipeline failing & set deno version to 1.4.3

view details

push time in 25 days

PR merged asos-craigmorten/opine

[#74] res.cookie & res.clearCookie express style overloads feature

[FEAT] Support Express style signature for cookie APIs

#74

Details

Implements express styles cookie api and closes #74

CheckList

  • [x] PR starts with [#74].
  • [x] Has been tested (where required) before merge to main.
+324 -144

3 comments

55 changed files

FaberVitale

pr closed time in 25 days

issue closedasos-craigmorten/opine

[FEAT] Support Express style signature for cookie APIs

Issue

Support the Express signature for the cookie() and clearCookie() APIs.

These APIs already exist in Opine, but the signature is different - expecting a full Cookie object vs the Express name, value and options signature.

Details

See:

  • https://expressjs.com/en/api.html#res.cookie
  • https://expressjs.com/en/api.html#res.clearCookie

closed time in 25 days

asos-craigmorten
PullRequestReviewEvent

pull request commentasos-craigmorten/opine

[#74] res.cookie & res.clearCookie express style overloads

One fix r.e. types in the test (import type becoming a thing in Deno 1.4.0), otherwise this looks fab @FaberVitale! Nice One! 💯

FaberVitale

comment created time in a month

Pull request review commentasos-craigmorten/opine

[#74] res.cookie & res.clearCookie express style overloads

 import { opine } from "../../mod.ts";-import { superdeno } from "../deps.ts";+import { superdeno, SuperDenoResponse, expect } from "../deps.ts";

If SuperDenoResponse is indeed required (would hope that we get the types for free - shout it not and can investigate in the SuperDeno repo!) we should import using the import type syntax:

import { superdeno, expect } from "../deps.ts";
import { SuperDenoResponse } from "../deps.ts";
FaberVitale

comment created time in a month

PullRequestReviewEvent

Pull request review commentasos-craigmorten/opine

[#74] res.cookie & res.clearCookie express style overloads

 describe("res", function () {         .expect(200, done);     }); +    it("should raise an exception if no arg is provided", function (done) {+      const app = opine();++      app.use(function (req, res) {+        (res as any).cookie().end();+      });++      superdeno(app)+        .get("/")+        .expect(500, done);+    });++    it("should raise an expection if args provided are not valid", function (+      done,+    ) {+      const app = opine();++      app.use(function (req, res) {+        (res as any).cookie({}).end();
        res.cookie({}).end();
FaberVitale

comment created time in a month

PullRequestReviewEvent

Pull request review commentasos-craigmorten/opine

[#74] res.cookie & res.clearCookie express style overloads

 describe("res", function () {         .expect(200, done);     }); +    it("should raise an exception if no arg is provided", function (done) {+      const app = opine();++      app.use(function (req, res) {+        (res as any).cookie().end();

Assuming the typing is working correctly I would hope this any casting shoudn't be required (as per previous tests).

        res.cookie().end();
FaberVitale

comment created time in a month

PullRequestReviewEvent

issue commentsnyk/snyk

[🐛] Snyk fails to install with yarn on Node 8 despite Node Engine support

Hi @orsagie, this appears that we still face the same error installing the latest snyk while using Node 8:

$ nvm use
Found '~/test-snyk/.nvmrc' with version <8>
Now using node v8.17.0 (npm v6.13.4)

$ yarn add snyk
yarn add v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error chalk@4.1.0: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.17.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This time the error coming from the chalk@4.1.0 package (unsure of the dependency chain) which requires Node >=10 and therefore makes latest Snyk incompatible with Node 8.

It is possible to install latest snyk with the --ignore-engines flag and then we can run the CLI on Node 8 and can see the various warning messages about EOL, but generally it is ill-advised to ignore the engines settings as they are put there to ensure full compatibility, and ignore them can result in unexpected behaviour.

asos-craigmorten

comment created time in a month

issue commentsnyk/snyk

[🐛] Snyk fails to install with yarn on Node 8 despite Node Engine support

@orsagie apologies for the slow reply! Will check it out now for you and confirm 😄

asos-craigmorten

comment created time in a month

push eventasos-craigmorten/opine

Craig Morten

commit sha 572c9caa17f6348136a0bebc97098a9e9778907c

[#71] Query parser setting support (#79)

view details

push time in a month

delete branch asos-craigmorten/opine

delete branch : feat/issue-71-query-parser

delete time in a month

PR merged asos-craigmorten/opine

[#71] Query parser setting support feature

Issue

#71

Details

Support query parser setting support.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+175 -23

0 comment

7 changed files

asos-craigmorten

pr closed time in a month

issue closedasos-craigmorten/opine

[FEAT] Support `query parser` application setting

Issue

Setup:

This issue is to support the query parser (and query parser fn) application setting, allowing users to support custom querystring parsers in Opine.

Details

See:

  • https://expressjs.com/en/api.html#app.settings.table
  • https://github.com/expressjs/express/blob/master/lib/application.js#L77
  • https://github.com/expressjs/express/blob/master/lib/application.js#L144
  • https://github.com/expressjs/express/blob/master/lib/application.js#L368
  • https://github.com/expressjs/express/blob/master/lib/middleware/query.js#L29

There isn't currently a qs library Deno equivalent, but we can look to implement the application setting allowing us to pass a custom parser function as well as investigating PIKA/SkyPack/JSPM to see if using qs is an option.

closed time in a month

asos-craigmorten

PR opened asos-craigmorten/opine

[#71] Query parser setting support

Issue

#71

Details

Support query parser setting support.

CheckList

  • [ ] PR starts with [#ISSUE_ID].
  • [ ] Has been tested (where required) before merge to main.
+175 -23

0 comment

7 changed files

pr created time in a month

create barnchasos-craigmorten/opine

branch : feat/issue-71-query-parser

created branch time in a month

push eventasos-craigmorten/opine

Craig Morten

commit sha 807a0bf47cad7b457268bd657b22abbf4dbc972c

[#73] Implement req.range() API (#78)

view details

push time in a month

delete branch asos-craigmorten/opine

delete branch : feat/issue-73-range-api

delete time in a month

PR merged asos-craigmorten/opine

[#73] Implement req.range() API feature

Issue

#73

Details

Implement the req.range() API.

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required) before merge to main.
+2770 -52

1 comment

7 changed files

asos-craigmorten

pr closed time in a month

issue closedasos-craigmorten/opine

[FEAT] Support req.range() API

Issue

Add the req.range() API.

Details

See:

  • https://expressjs.com/en/api.html#req.range
  • https://github.com/expressjs/express/blob/master/lib/request.js#L212

Express uses the range-parser package - see https://github.com/jshttp/range-parser/. This doesn't look to have any deps and therefore may be usable via Pika/Skypack/JSPM which would make this task reasonably simple! If it cannot be used via a CDN then we can look to port it and add to the utils directory, including appropriate copyright notices etc.

closed time in a month

asos-craigmorten

startedlitmuschaos/litmus

started time in a month

PR opened asos-craigmorten/opine

feat: implement req.range() API

Issue

#73

Details

Implement the req.range() API.

CheckList

  • [ ] PR starts with [#ISSUE_ID].
  • [ ] Has been tested (where required) before merge to main.
+2770 -52

0 comment

7 changed files

pr created time in a month

create barnchasos-craigmorten/opine

branch : feat/issue-73-range-api

created branch time in a month

pull request commentasos-craigmorten/opine

#56 cors example + proposal for more typesafety

I think the example would be best added to the examples directory like all the others (see https://github.com/asos-craigmorten/opine/tree/main/examples).

As for the types, they are implicit in the class definitions so being explicit is more of a coding style than a must-have. Because Deno can import from any file it was a conscious decision not to pollute the mod.ts exports with the types as they can easily imported via:

import type { Application, Request, Response } from "https://deno.land/x/opine@0.22.2/src/types.ts"
michael-spengler

comment created time in a month

issue commentdenoland/deno

Deno Permissions API unable to grant "scoped" permissions

Can confirm that read and write are not impacted.

Read

console.log(await Deno.permissions.query({ name: "read", path: "./" }));
console.log(await Deno.permissions.revoke({ name: "read" }));
console.log(await Deno.permissions.request({ name: "read", path: "./" }));
console.log(await Deno.permissions.query({ name: "read", path: "./" }));
console.log(await Deno.stat("./"));
$ deno run --unstable --allow-read=./ ./example.ts

PermissionStatus { state: "granted" }
PermissionStatus { state: "prompt" }
️⚠️  Deno requests read access to "./". Grant? [g/d (g = grant, d = deny)] g
PermissionStatus { state: "granted" }
PermissionStatus { state: "granted" }
{
  ...
}

Write

console.log(await Deno.permissions.query({ name: "write", path: "./" }));
console.log(await Deno.permissions.revoke({ name: "write" }));
console.log(await Deno.permissions.request({ name: "write", path: "./" }));
console.log(await Deno.permissions.query({ name: "write", path: "./" }));
console.log(await Deno.writeTextFile("./test.txt", "test"));
$ deno run --unstable --allow-write=./ ./example.ts

PermissionStatus { state: "granted" }
PermissionStatus { state: "prompt" }
️⚠️  Deno requests write access to "./". Grant? [g/d (g = grant, d = deny)] g
PermissionStatus { state: "granted" }
PermissionStatus { state: "granted" }
undefined
asos-craigmorten

comment created time in a month

issue commentdenoland/deno

Deno Permissions API unable to grant "scoped" permissions

@nayeemrmn I’ll quickly dbl check read/write and update if it is just net 😊

asos-craigmorten

comment created time in a month

created tagasos-craigmorten/permission-guard

tag2.2.0

A zero-dependency, minimal permission guard for Deno.

created time in a month

release asos-craigmorten/permission-guard

2.2.0

released time in a month

push eventasos-craigmorten/permission-guard

asos-craigmorten

commit sha 733b12b4a9745f2ca56be6c8d032d7d6562cb869

feat: 2.2.0

view details

push time in a month

more