Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
0.2.61
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelrk committed Oct 31, 2023
1 parent 4bb7700 commit e895980
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/cli/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// latest version of netzo/cli (see https://github.com/netzo/netzo/releases)
export const VERSION = "0.2.60";
export const VERSION = "0.2.61";

// minimum version of Deno required to run this CLI
// (see https://github.com/denoland/deployctl/blob/main/src/version.ts)
Expand Down
2 changes: 1 addition & 1 deletion lib/components/imports.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const baseImports = {
"@/": "./",
"netzo/": "https://deno.land/x/netzo@0.2.60/",
"netzo/": "https://deno.land/x/netzo@0.2.61/",
"$fresh/": "https://deno.land/x/fresh@1.5.2/",
"preact": "https://esm.sh/preact@10.18.1",
"preact/": "https://esm.sh/preact@10.18.1/",
Expand Down
11 changes: 2 additions & 9 deletions lib/config/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type { FreshConfig } from "https://deno.land/x/fresh@1.5.2/server.ts";
import { type VisibilityOptions, VisibilityState} from "../visibility/plugin.ts";
import { type AuthOptions, AuthState } from "../auth/plugin.ts";
import { type DatabaseOptions, DatabaseState } from "../database/plugin.ts";
import type { Plugin, FreshConfig } from "$fresh/server.ts";

export type NetzoConfig = FreshConfig & {
project: string;
Expand All @@ -12,17 +9,13 @@ export type NetzoConfig = FreshConfig & {
export type NetzoState = {
config: NetzoConfig;
kv: Deno.Kv;
// modules:
visibility?: VisibilityState;
auth?: AuthState;
database?: DatabaseState;
};

/**
* A fresh plugin that registers middleware to set the
* ctx.state.config property (once) on each request.
*/
export const configPlugin = (config: NetzoConfig) => {
export const configPlugin = (config: NetzoConfig): Plugin => {
return {
name: "netzo",
middlewares: [
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/appLayout/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { JSX } from "preact";
import type { Plugin } from "https://deno.land/x/fresh@1.5.2/server.ts";
import type { Plugin } from "$fresh/server.ts";
import { NetzoConfig } from "../../config.ts";
import AppLayout from "./app-layout.tsx";

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/errorPages/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Plugin } from "https://deno.land/x/fresh@1.5.2/server.ts";
import type { Plugin } from "$fresh/server.ts";
import { ErrorPage404, ErrorPage500 } from "./error-pages.tsx";

export type ErrorPagesOptions = {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/unocss/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
UnoGenerator,
type UserConfig,
} from "https://esm.sh/@unocss/core@0.55.1";
import type { Plugin } from "https://deno.land/x/fresh@1.5.2/server.ts";
import type { Plugin } from "$fresh/server.ts";

// inline reset from https://esm.sh/@unocss/reset@0.54.2/tailwind.css
const unoResetCSS = `/* reset */
Expand Down
2 changes: 1 addition & 1 deletion templates/app/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"imports": {
"@/": "./",
"netzo/": "https://deno.land/x/netzo@0.2.60/",
"netzo/": "https://deno.land/x/netzo@0.2.61/",
"$fresh/": "https://deno.land/x/fresh@1.5.2/",
"preact": "https://esm.sh/preact@10.18.1",
"preact/": "https://esm.sh/preact@10.18.1/",
Expand Down
2 changes: 1 addition & 1 deletion templates/workflow-starter/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"imports": {
"@/": "./",
"netzo/": "https://deno.land/x/netzo@0.2.60/",
"netzo/": "https://deno.land/x/netzo@0.2.61/",
"$fresh/": "https://deno.land/x/fresh@1.5.2/",
"preact": "https://esm.sh/preact@10.18.1",
"preact/": "https://esm.sh/preact@10.18.1/",
Expand Down
2 changes: 1 addition & 1 deletion www/src/docs/examples/starter.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ A `deno.jsonc` or `deno.json` file used to configure the Deno runtime for local
{
"imports": {
"@/": "./",
"netzo/": "https://deno.land/x/netzo@0.2.60/",
"netzo/": "https://deno.land/x/netzo@0.2.61/",
"preact": "https://esm.sh/preact@10.18.1",
"preact/": "https://esm.sh/preact@10.18.1/"
}
Expand Down
4 changes: 2 additions & 2 deletions www/src/docs/guides/interacting-with-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following basic examples show how to work with APIs.
An example of connecting to a custom API, in this case the JSONPlaceholder API.

```jsx
import { rest } from 'https://deno.land/x/netzo@0.2.60/apis/rest/mod.ts'
import { rest } from 'https://deno.land/x/netzo@0.2.61/apis/rest/mod.ts'

const api = rest({
baseURL: 'https://jsonplaceholder.typicode.com',
Expand All @@ -24,7 +24,7 @@ const data = await api.sales.get({ start: Date.now() })
An example of connecting to an existing API, in this case the JSONPlaceholder API.

```jsx
import { jsonplaceholder } from 'https://deno.land/x/netzo@0.2.60/apis/jsonplaceholder/mod.ts'
import { jsonplaceholder } from 'https://deno.land/x/netzo@0.2.61/apis/jsonplaceholder/mod.ts'

const { api } = jsonplaceholder()

Expand Down
5 changes: 4 additions & 1 deletion www/src/docs/platform/inbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const notification = await api.notifications.post({
title: 'Payment successful',
body: `A payment for ${amount} was received from ${payer}.`,
},
// the following are required and MUST be set manually:
// the following are required and MUST be set manually,
// otherwise the request will fail due to invalid body
env: Deno.env.get('NETZO_ENV')!,
projectId: Deno.env.get('NETZO_PROJECT_ID')!,
denoDeploymentId: Deno.env.get('DENO_DEPLOYMENT_ID')!,
denoRegion: Deno.env.get('DENO_REGION')!,
})
Expand Down

0 comments on commit e895980

Please sign in to comment.