0.3.18 • Published 2 months ago

@written/mkctx v0.3.18

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Written Logo

@written/mkctx

Generate Appwrite Context Objects. Useful for testing & making non-appwrite-runner calls to appwrite functions.

See also: @written/httpcompat

Codeberg License

Installation

pnpm i @written/mkctx

Usage

The ctx constructor takes the same args as fetch(). Example:

import Ctx from '@written/mkctx';
const ctx = new Ctx('https://example.com/test', {
  method: 'POST',
});

// ...

(async () => {
  const response = await import('./someAppwriteFunc').default(ctx);
  // todo: handle response
})();

Obtaining Logs

You can use Ctx.getLogs(ctx)/Ctx.getErrors(ctx) to get the logs from the context object.

0.3.18

2 months ago

0.3.17

2 months ago

0.3.16

2 months ago

0.3.15

2 months ago

0.3.14

2 months ago

0.3.13

3 months ago

0.3.12

3 months ago

0.3.11

3 months ago

0.3.10

4 months ago

0.3.9

4 months ago

0.3.6

4 months ago

0.3.8

4 months ago

0.3.7

4 months ago

0.3.5

4 months ago

0.3.4

5 months ago

0.3.3

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago