-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
64 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ The `app` object conventionally denotes the Opine application. Create it by | |
calling the top-level `opine()` function exported by the Opine module: | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -69,7 +69,7 @@ sub-app was mounted. | |
> to a route. | ||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); // the main app | ||
const admin = opine(); // the sub app | ||
|
@@ -487,7 +487,7 @@ starts listening for requests - this is provided for legacy reasons to aid in | |
transitions from Express on Node. | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -523,7 +523,7 @@ This method is supported for legacy reasons to aid in transitions from Express | |
on Node. | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
const PORT = 3000; | ||
|
@@ -542,7 +542,7 @@ starts listening for requests - this is provided for legacy reasons to aid in | |
transitions from Express on Node. | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -560,7 +560,7 @@ starts listening for requests - this is provided for legacy reasons to aid in | |
transitions from Express on Node. | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ reasons. | |
> `toString` may not be a function and instead a string or other user-input. | ||
```ts | ||
import { json, opine } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { json, opine } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -77,7 +77,7 @@ reasons. | |
> recommended. | ||
```ts | ||
import { opine, raw } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine, raw } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -230,7 +230,7 @@ reasons. | |
> recommended. | ||
```ts | ||
import { opine, text } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine, text } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -277,7 +277,7 @@ reasons. | |
> `toString` may not be a function and instead a string or other user-input. | ||
```ts | ||
import { opine, urlencoded } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine, urlencoded } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ Creates an Opine application. The `opine()` function is a top-level function | |
exported by the Opine module: | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
``` | ||
|
||
The `opine()` function is also exported as a named export: | ||
|
||
```ts | ||
import { opine } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ import { | |
json, | ||
opine, | ||
urlencoded, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -118,7 +118,7 @@ The following example shows how to implement your own simple body-parsing | |
middleware to transform `req.body` into a raw string: | ||
|
||
```ts | ||
import opine from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ Opine has a top-level named function export `Router()` that creates a new | |
`router` object. | ||
|
||
```ts | ||
import { Router } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { Router } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const router = Router(options); | ||
``` | ||
|
@@ -260,7 +260,7 @@ function defined and work their way "down" the middleware stack processing for | |
each path they match. | ||
|
||
```ts | ||
import opine, { Router } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import opine, { Router } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
const router = Router(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: denolib/setup-deno@v2 | ||
with: | ||
deno-version: 1.16.3 | ||
deno-version: 1.17.1 | ||
- run: deno install -A -f --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts | ||
- run: | | ||
export PATH="/home/runner/.deno/bin:$PATH" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ Fast, minimalist web framework for <a href="https://deno.land/">Deno</a> ported | |
</p> | ||
<p align="center"> | ||
<a href="https://deno.land/x/opine"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2Fopine%2Fmod.ts" alt="Opine latest /x/ version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-1.16.3-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-1.17.1-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fdep-count%2Fx%2Fopine%2Fmod.ts" alt="Opine dependency count" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fupdates%2Fx%2Fopine%2Fmod.ts" alt="Opine dependency outdatedness" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fcache-size%2Fx%2Fopine%2Fmod.ts" alt="Opine cached size" /></a> | ||
|
@@ -41,7 +41,7 @@ Fast, minimalist web framework for <a href="https://deno.land/">Deno</a> ported | |
## Getting Started | ||
|
||
```ts | ||
import { opine } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
const app = opine(); | ||
|
||
|
@@ -65,14 +65,14 @@ Before importing, [download and install Deno](https://deno.land/#installation). | |
You can then import Opine straight into your project: | ||
|
||
```ts | ||
import { opine } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { opine } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
``` | ||
|
||
Opine is also available on [nest.land](https://nest.land/package/opine), a | ||
package registry for Deno on the Blockchain. | ||
|
||
```ts | ||
import { opine } from "https://x.nest.land/[email protected].0/mod.ts"; | ||
import { opine } from "https://x.nest.land/[email protected].1/mod.ts"; | ||
``` | ||
|
||
## Features | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
export { Server } from "https://deno.land/std@0.116.0/http/server.ts"; | ||
export type { ConnInfo } from "https://deno.land/std@0.116.0/http/server.ts"; | ||
export { Server } from "https://deno.land/std@0.119.0/http/server.ts"; | ||
export type { ConnInfo } from "https://deno.land/std@0.119.0/http/server.ts"; | ||
export { | ||
Status, | ||
STATUS_TEXT, | ||
} from "https://deno.land/std@0.116.0/http/http_status.ts"; | ||
} from "https://deno.land/std@0.119.0/http/http_status.ts"; | ||
export { | ||
deleteCookie, | ||
setCookie, | ||
} from "https://deno.land/std@0.116.0/http/cookie.ts"; | ||
export type { Cookie } from "https://deno.land/std@0.116.0/http/cookie.ts"; | ||
} from "https://deno.land/std@0.119.0/http/cookie.ts"; | ||
export type { Cookie } from "https://deno.land/std@0.119.0/http/cookie.ts"; | ||
export { | ||
basename, | ||
dirname, | ||
|
@@ -19,15 +19,15 @@ export { | |
normalize, | ||
resolve, | ||
sep, | ||
} from "https://deno.land/std@0.116.0/path/mod.ts"; | ||
export { setImmediate } from "https://deno.land/std@0.116.0/node/timers.ts"; | ||
export { parse } from "https://deno.land/std@0.116.0/node/querystring.ts"; | ||
export { default as EventEmitter } from "https://deno.land/std@0.116.0/node/events.ts"; | ||
export { Sha1 } from "https://deno.land/std@0.116.0/hash/sha1.ts"; | ||
} from "https://deno.land/std@0.119.0/path/mod.ts"; | ||
export { setImmediate } from "https://deno.land/std@0.119.0/node/timers.ts"; | ||
export { parse } from "https://deno.land/std@0.119.0/node/querystring.ts"; | ||
export { default as EventEmitter } from "https://deno.land/std@0.119.0/node/events.ts"; | ||
export { Sha1 } from "https://deno.land/std@0.119.0/hash/sha1.ts"; | ||
export { | ||
readableStreamFromReader, | ||
readerFromStreamReader, | ||
} from "https://deno.land/std@0.116.0/streams/conversion.ts"; | ||
} from "https://deno.land/std@0.119.0/streams/conversion.ts"; | ||
|
||
export { | ||
charset, | ||
|
@@ -46,6 +46,6 @@ export { encodeUrl } from "https://deno.land/x/[email protected]/mod.ts"; | |
export { gunzip, inflate } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
export { default as parseRange } from "https://cdn.skypack.dev/[email protected]?dts"; | ||
export { default as qs } from "https://cdn.skypack.dev/[email protected].1?dts"; | ||
export { default as qs } from "https://cdn.skypack.dev/[email protected].2?dts"; | ||
export { default as ipaddr } from "https://cdn.skypack.dev/[email protected]?dts"; | ||
export { default as ms } from "https://cdn.skypack.dev/[email protected]?dts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ <h1 align="center">Opine</h1> | |
</p> | ||
<p align="center"> | ||
<a href="https://deno.land/x/opine"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2Fopine%2Fmod.ts" alt="Opine latest /x/ version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-1.16.3-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-1.17.1-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fdep-count%2Fx%2Fopine%2Fmod.ts" alt="Opine dependency count" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fupdates%2Fx%2Fopine%2Fmod.ts" alt="Opine dependency outdatedness" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opine/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fcache-size%2Fx%2Fopine%2Fmod.ts" alt="Opine cached size" /></a> | ||
|
@@ -105,7 +105,7 @@ <h2>Table of Contents</h2> | |
<a href="#getting-started" id="getting-started" style="color: inherit; text-decoration: none;"> | ||
<h2>Getting Started</h2> | ||
</a> | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://deno.land/x/[email protected].0/mod.ts"</span>; | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://deno.land/x/[email protected].1/mod.ts"</span>; | ||
|
||
<span class="hljs-keyword">const</span> app = opine(); | ||
|
||
|
@@ -125,11 +125,11 @@ <h2>Installation</h2> | |
repo and via the <a href="https://deno.land/x">Deno Registry</a>.</p> | ||
<p>Before importing, <a href="https://deno.land/#installation">download and install Deno</a>.</p> | ||
<p>You can then import Opine straight into your project:</p> | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://deno.land/x/[email protected].0/mod.ts"</span>; | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://deno.land/x/[email protected].1/mod.ts"</span>; | ||
</code></pre> | ||
<p>Opine is also available on <a href="https://nest.land/package/opine">nest.land</a>, a | ||
package registry for Deno on the Blockchain.</p> | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://x.nest.land/[email protected].0/mod.ts"</span>; | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">"https://x.nest.land/[email protected].1/mod.ts"</span>; | ||
</code></pre> | ||
<a href="#features" id="features" style="color: inherit; text-decoration: none;"> | ||
<h2>Features</h2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export { deferred } from "https://deno.land/std@0.116.0/async/deferred.ts"; | ||
export type { Deferred } from "https://deno.land/std@0.116.0/async/deferred.ts"; | ||
export { deferred } from "https://deno.land/std@0.119.0/async/deferred.ts"; | ||
export type { Deferred } from "https://deno.land/std@0.119.0/async/deferred.ts"; | ||
export { expect, mock } from "https://deno.land/x/[email protected]/mod.ts"; | ||
export { superdeno } from "https://deno.land/x/superdeno@4.6.1/mod.ts"; | ||
export { superdeno } from "https://deno.land/x/superdeno@4.7.1/mod.ts"; | ||
export type { | ||
IRequest as SuperDenoRequest, | ||
IResponse as SuperDenoResponse, | ||
} from "https://deno.land/x/superdeno@4.6.1/mod.ts"; | ||
} from "https://deno.land/x/superdeno@4.7.1/mod.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* Version of Opine. | ||
*/ | ||
export const VERSION = "2.0.0"; | ||
export const VERSION = "2.0.1"; | ||
|
||
/** | ||
* Supported version of Deno. | ||
*/ | ||
export const DENO_SUPPORTED_VERSIONS: string[] = ["1.16.3"]; | ||
export const DENO_SUPPORTED_VERSIONS: string[] = ["1.17.1"]; |