# @kpk/apps-sdk

This package contains shared utilities for Karpatkey apps.

## Publishing

This package is used by both Deno and Node.js.

**Recommended workflow**

Set the same version in both `package.json` and `jsr.json` and run:

```bash
NPM_TOKEN=<token> DENO_NO_PACKAGE_JSON=1 deno run -A publish.ts
```

This does additional checks to ensure:

- Check that the version is the same in both `package.json` and `jsr.json`
- Check that the version is not already published to npm and JSR
- Ensure dependencies resolve correctly for Deno with a dry-run

**Other options**

To publish to npm, run:

```bash
NPM_TOKEN=<token> sh publish.sh
```

To publish to Deno, run:

```bash
DENO_NO_PACKAGE_JSON=1 deno publish --no-check --allow-dirty
```

To verify before publishing, run:

```bash
DENO_NO_PACKAGE_JSON=1 deno publish --no-check --allow-dirty --dry-run
```

`DENO_NO_PACKAGE_JSON=1` tells Deno to ignore a package.json file
