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
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Repository instructions

When adding or updating template dependencies, use constraints that allow compatible patch and minor updates while excluding the next breaking version. Prefer caret ranges where the package manager supports them, avoid unbounded or wildcard constraints, and keep committed lockfiles in sync with their manifests.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Security and privacy are extremely important to Appwrite, developers, and users

## Dependencies

Usage of dependencies is welcomed for purpose of simplifying template code. Please only use libraries that are well-known, and popular.
Usage of dependencies is welcomed for purpose of simplifying template code. Please only use libraries that are well-known and popular. Dependency constraints must allow compatible patch and minor updates while excluding the next breaking version (for example, use caret ranges where the package manager supports them). Keep any committed lockfile in sync with its manifest.

## Introducing New Templates

Expand Down
2 changes: 1 addition & 1 deletion dart/starter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: ^2.17.0

dependencies:
dart_appwrite: 19.2.1
dart_appwrite: ^19.2.1

dev_dependencies:
lints: ^2.0.0
4 changes: 2 additions & 2 deletions deno/starter/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default async ({ req, res, log, error }: any) => {
// Log messages and errors to the Appwrite Console
// These logs won't be seen by your end users
log(`Total users: ${response.total}`);
} catch(err) {
error("Could not list users: " + err.message);
} catch (err) {
error("Could not list users: " + String(err));
}

// The req object contains the request data
Expand Down
4 changes: 2 additions & 2 deletions deno/whatsapp-with-vonage/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async ({ req, res, log, error }: Context) => {
try {
throwIfMissing(payload, ["payload_hash"]);
} catch (err) {
return res.json({ ok: false, error: err.message }, 400);
return res.json({ ok: false, error: String(err) }, 400);
}

const hash = crypto.subtle.digestSync(
Expand All @@ -50,7 +50,7 @@ export default async ({ req, res, log, error }: Context) => {
try {
throwIfMissing(req.bodyJson, ["from", "text"]);
} catch (err) {
return res.json({ ok: false, error: err.message }, 400);
return res.json({ ok: false, error: String(err) }, 400);
}

const basicAuthToken: string = btoa(
Expand Down
4 changes: 2 additions & 2 deletions dotnet/starter/StarterTemplate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appwrite" Version="0.21.2" />
<PackageReference Include="Appwrite" Version="[0.21.2,0.22.0)" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion kotlin/sync-with-meilisearch/src/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Main {
val client = AppwriteClient().apply {
setEndpoint(System.getenv("APPWRITE_FUNCTION_API_ENDPOINT"))
setProject(System.getenv("APPWRITE_FUNCTION_PROJECT_ID"))
setKey(context.res.headers["x-appwrite-key"])
setKey(context.req.headers["x-appwrite-key"] ?: "")
}

val databases = Databases(client)
Expand Down
2 changes: 1 addition & 1 deletion node-typescript/discord-command-bot/src/commands/hello.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InteractionResponseType } from 'discord-interactions';

export default function HelloCommand(res) {
export default function HelloCommand(res: any) {
return res.json(
{
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
Expand Down
9 changes: 8 additions & 1 deletion node-typescript/discord-command-bot/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import {
import { throwIfMissing } from './utils.js';
import commands from './commands/index.js';

export default async ({ req, res, error, log }) => {
type Context = {
req: any;
res: any;
log: (message: string) => void;
error: (message: string) => void;
};

export default async ({ req, res, error, log }: Context) => {
throwIfMissing(process.env, [
'DISCORD_PUBLIC_KEY',
'DISCORD_APPLICATION_ID',
Expand Down
14 changes: 14 additions & 0 deletions node-typescript/discord-command-bot/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"rootDir": "src",
"resolveJsonModule": true,
"outDir": "dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"skipLibCheck": true
}
}
2 changes: 1 addition & 1 deletion node-typescript/sync-with-meilisearch/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 node-typescript/sync-with-meilisearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"meilisearch": "^0.40.0",
"node-appwrite": "^14.1.0",
"typescript": "5.4.5"
"typescript": "^5.4.5"
},
"devDependencies": {
"prettier": "^3.2.5",
Expand Down
2 changes: 1 addition & 1 deletion node-typescript/sync-with-qdrant/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 node-typescript/sync-with-qdrant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@qdrant/js-client-rest": "^1.9.0",
"node-appwrite": "^14.1.0",
"openai": "^4.47.1",
"typescript": "5.4.5"
"typescript": "^5.4.5"
},
"devDependencies": {
"@types/node": "^20.12.10",
Expand Down
2 changes: 1 addition & 1 deletion node-typescript/sync-with-qdrant/src/appwrite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Client, Databases, Query } from 'node-appwrite';
class AppwriteService {
databases: Databases;

constructor(apiKey) {
constructor(apiKey: string) {
const client = new Client();
client
.setEndpoint(process.env.APPWRITE_FUNCTION_API_ENDPOINT)
Expand Down
4 changes: 2 additions & 2 deletions python-ml/generate_with_tensorflow/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
tensorflow
numpy
tensorflow>=2.15.0,<3.0.0
numpy>=2.0.0,<3.0.0
4 changes: 2 additions & 2 deletions python-ml/starter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
appwrite==23.0.0
numpy
appwrite>=23.0.0,<24.0.0
numpy>=2.0.0,<3.0.0
2 changes: 1 addition & 1 deletion python/censor_with_redact/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests
requests>=2.31.0,<3.0.0
4 changes: 2 additions & 2 deletions python/discord_command_bot/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests
discord-interactions
requests>=2.31.0,<3.0.0
discord-interactions>=0.4.0,<0.5.0
1 change: 1 addition & 0 deletions python/email_contact_form/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No third-party dependencies.
2 changes: 1 addition & 1 deletion python/mcp-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mcp==2.0.0
mcp>=2.0.0,<3.0.0
2 changes: 1 addition & 1 deletion python/prompt_chatgpt/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
openai
openai>=0.27.8,<0.28.0
2 changes: 1 addition & 1 deletion python/starter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
appwrite==23.0.0
appwrite>=23.0.0,<24.0.0
2 changes: 1 addition & 1 deletion python/storage-cleaner/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
appwrite==23.0.0
appwrite>=23.0.0,<24.0.0
4 changes: 2 additions & 2 deletions python/sync_with_algolia/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
appwrite==23.0.0
algoliasearch
appwrite>=23.0.0,<24.0.0
algoliasearch>=3.0.0,<4.0.0
4 changes: 2 additions & 2 deletions python/sync_with_meilisearch/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
appwrite==23.0.0
meilisearch
appwrite>=23.0.0,<24.0.0
meilisearch>=0.30.0,<0.31.0
6 changes: 3 additions & 3 deletions python/sync_with_qdrant/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
appwrite==23.0.0
qdrant-client
openai
appwrite>=23.0.0,<24.0.0
qdrant-client>=1.9.0,<2.0.0
openai>=1.30.0,<2.0.0
4 changes: 2 additions & 2 deletions python/whatsapp_with_vonage/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests
pyjwt
requests>=2.31.0,<3.0.0
pyjwt>=2.8.0,<3.0.0
2 changes: 1 addition & 1 deletion ruby/starter/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source "https://rubygems.org"

gem 'appwrite'
gem 'appwrite', '>= 27.0.0', '< 28.0.0'
4 changes: 2 additions & 2 deletions ruby/sync_with_meilisearch/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"

gem 'appwrite'
gem 'meilisearch'
gem 'appwrite', '>= 27.0.0', '< 28.0.0'
gem 'meilisearch', '>= 0.33.0', '< 0.34.0'
10 changes: 5 additions & 5 deletions ruby/whatsapp-with-vonage/Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

gem 'json'
gem 'dotenv'
gem 'digest'
gem 'jwt'
gem 'httparty'
gem 'json', '>= 2.7.6', '< 3.0.0'
gem 'dotenv', '>= 2.8.1', '< 3.0.0'
gem 'digest', '>= 3.2.1', '< 4.0.0'
gem 'jwt', '>= 3.2.0', '< 4.0.0'
gem 'httparty', '>= 0.24.0', '< 0.25.0'
2 changes: 1 addition & 1 deletion swift/starter/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5
// swift-tools-version:6.2
import PackageDescription

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion swift/starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Sample `200` Response:

| Setting | Value |
| ----------------- | --------------------- |
| Runtime | Swift (5.5) |
| Runtime | Swift (6.2) |
| Entrypoint | `Sources/index.swift` |
| Permissions | `any` |
| Timeout (Seconds) | 15 |
Expand Down
Loading