Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
- name: "Setup Node"
uses: "actions/setup-node@v2"
uses: "actions/setup-node@v3"
with:
node-version: 16
node-version: 20
- name: Update NPM
run: npm install -g npm
- name: Install
run: npm install
- name: Deploy
uses: cloudflare/wrangler-action@1.3.0
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy
accountId: ${{ secrets.CF_ACCOUNT_ID }}
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
dist
node_modules
transpiled
worker
variables.toml
dist
.env
.npmrc
coverage/
.wrangler
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"orta.vscode-jest",
"vitest.explorer",
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker"
]
Expand Down
37 changes: 26 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,68 @@
{
"files.exclude": {
".*": true,
"*.sh": true,
"*.json": true,
"CODEOWNERS": true,
"dist": true,
"README.md": true,
"LICENSE": true,
"CODEOWNERS": true,
"tsconfig.*": true,
"node_modules": true,
"*.code-workspace": true,
"*.config.ts": true,
"*.config.js": true,
"*.toml": true
},// Make it possible to open excluded files with Ctrl + P
"coverage": true,
"*.toml": false
},
"search.exclude": {
".*": false,
"*.sh": false,
"*.json": false,
"CODEOWNERS": false,
"dist": false,
"README.md": false,
"LICENSE": false,
"CODEOWNERS": false,
"tsconfig.*": false,
"node_modules": false,
"*.code-workspace": false,
"*.config.js": false,
"*.toml": false,
"*.config.ts": false,
"coverage": false
},
"files.insertFinalNewline": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"eslint.autoFixOnSave": true,
"source.fixAll.eslint": "explicit",
"eslint.autoFixOnSave": "explicit"
},
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"files.insertFinalNewline": true,
"javascript.format.enable": false,
"typescript.format.enable": false,
"cSpell.words": [
"authly",
"cloudly",
"cryptly",
"flagly",
"gracely",
"isly",
"isoly",
"langly",
"paramly",
"persistly",
"selectivly",
"servly",
"uply"
]
"servly-azure",
"smoothly",
"tidily",
"transactly",
"typedly",
"uply",
"Renamer",
],
"typescript.tsdk": "node_modules/typescript/lib"
}
2 changes: 1 addition & 1 deletion Context/Environment.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface Environment extends Record<string, undefined | string> {
export interface Environment extends Record<string, undefined | string | KVNamespace | DurableObjectNamespace> {
adminSecret?: string
}
4 changes: 2 additions & 2 deletions item/change.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function change(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
4 changes: 2 additions & 2 deletions item/create.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function create(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
4 changes: 2 additions & 2 deletions item/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function fetch(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
4 changes: 2 additions & 2 deletions item/list.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function list(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
4 changes: 2 additions & 2 deletions item/remove.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function remove(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
4 changes: 2 additions & 2 deletions item/replace.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as gracely from "gracely"
import { gracely } from "gracely"
import { http } from "cloudly-http"
import { Context } from "../Context"
import * as model from "../model"
import { model } from "../model"
import { router } from "../router"

export async function replace(request: http.Request, context: Context): Promise<http.Response.Like | any> {
Expand Down
1 change: 0 additions & 1 deletion model/Item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export interface Item {
id: string
number: number
}

export namespace Item {
export function is(value: any | Item): value is Item {
return typeof value == "object" && typeof value.id == "string" && typeof value.number == "number"
Expand Down
6 changes: 5 additions & 1 deletion model/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { Item } from "./Item"
import { Item as modelItem } from "./Item"

export namespace model {
export import Item = modelItem
}
Loading
Loading