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
8 changes: 0 additions & 8 deletions web/.changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions web/.changeset/config.json

This file was deleted.

2 changes: 2 additions & 0 deletions web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2025-11-19

### Added

- Enable Beam SDK configs to register all client/server services during initialization.
Expand Down
10 changes: 2 additions & 8 deletions web/CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contributions are welcome! This project is configured with:

- TypeScript for compile-time type safety.

- `tsup` for bundling the code into multiple formats:
- `tsdown` for bundling the code into multiple formats:
- esm
- cjs
- iife (for CDN usage)
Expand All @@ -15,8 +15,6 @@ Contributions are welcome! This project is configured with:

- ESLint/Prettier for maintaining code quality and style.

- Changesets for versioning and changelog management.

- TypeDoc for SDK documentation.

## Getting Started
Expand Down Expand Up @@ -134,11 +132,7 @@ Open the file in your browser and watch the console for output.

## Releasing & Versioning

We use [changesets](https://github.com/changesets/changesets) for versioning. To create a changeset, run:

```bash
pnpm changeset
```
Please ensure that all notable changes are clearly documented in the `CHANGELOG.md` file before releasing.

When we are ready to release, update the version and build:

Expand Down
9 changes: 4 additions & 5 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ console.log(beam.player.id);
<script src="https://unpkg.com/beamable-sdk"></script>
<script>
// global variable exposed as Beamable
const { Beam, BeamEnvironment } = Beamable;
const { Beam } = Beamable;
const beam = await Beam.init({
cid: 'YOUR_CUSTOMER_ID',
pid: 'YOUR_PROJECT_ID',
Expand All @@ -67,7 +67,7 @@ console.log(beam.player.id);

Find detailed API references, usage examples, and integration guides for the Beam Web SDK:

[Beam Web SDK Documentation](https://docs.beamable.com/docs/beamable-overview)
[Beam Web SDK Documentation](https://help.beamable.com/WebSDK-Latest/)

## Token storage and automatic refresh

Expand All @@ -86,13 +86,12 @@ If the SDK fails to refresh the access token (for example, the refresh token has
import { RefreshAccessTokenError } from 'beamable-sdk';

try {
await beam.api.someService.someEndpoint();
await beam.someService.someMethod();
} catch (error) {
if (error instanceof RefreshAccessTokenError) {
// Refresh failed: redirect user to login
redirectToLoginPage();
}
throw error;
}
```

Expand All @@ -104,7 +103,7 @@ If you need a different storage mechanism, implement the `TokenStorage` interfac
import { TokenStorage } from 'beamable-sdk';

class MyTokenStorage implements TokenStorage {
/* implement getAccessToken, setAccessToken, ... */
/* implement getTokenData, setTokenData, ... */
}

const beam = await Beam.init({
Expand Down
35 changes: 17 additions & 18 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "beamable-sdk",
"version": "0.6.0",
"version": "1.0.0",
"description": "Beamable Web SDK",
"main": "dist/node/index.js",
"main": "dist/node/index.cjs",
"module": "dist/node/index.mjs",
"unpkg": "dist/browser/index.global.js",
"unpkg": "dist/browser/index.iife.js",
"types": "dist/types/index.d.ts",
"author": "Beamable",
"license": "MIT",
Expand All @@ -14,31 +14,30 @@
},
"scripts": {
"setup-project": "node setup.mjs",
"build": "tsup",
"dev": "tsup --watch",
"build": "tsdown",
"dev": "tsdown --watch",
"test": "vitest",
"lint": "eslint --ext .ts src tests",
"format": "prettier --write .",
"doc": "node ./generateDocs.mjs",
"changeset": "changeset",
"release": "changeset version && pnpm build",
"release": "node ./update-version.mjs && pnpm build",
"prepublishOnly": "pnpm build"
},
"devDependencies": {
"@changesets/cli": "^2.29.5",
"@eslint/js": "^9.33.0",
"@eslint/js": "^9.39.1",
"@types/node": "^22.15.19",
"@typescript-eslint/eslint-plugin": "^8.39.1",
"@typescript-eslint/parser": "^8.39.1",
"eslint": "^9.33.0",
"@typescript-eslint/eslint-plugin": "^8.47.0",
"@typescript-eslint/parser": "^8.47.0",
"eslint": "^9.39.1",
"globals": "^16.0.0",
"prettier": "^3.5.3",
"tsup": "^8.4.0",
"semver": "^7.7.3",
"tsdown": "^0.16.5",
"typedoc": "^0.28.5",
"typedoc-plugin-markdown": "^4.8.1",
"typescript": "^5.8.3",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.1.1"
"vitest": "^4.0.10"
},
"files": [
"dist"
Expand All @@ -47,21 +46,21 @@
".": {
"browser": {
"types": "./dist/types/index.d.ts",
"require": "./dist/browser/index.global.js",
"require": "./dist/browser/index.iife.js",
"import": "./dist/browser/index.mjs"
},
"types": "./dist/types/index.d.ts",
"require": "./dist/node/index.js",
"require": "./dist/node/index.cjs",
"import": "./dist/node/index.mjs"
},
"./schema": {
"types": "./dist/types/schema.d.ts",
"require": "./dist/schema.js",
"require": "./dist/schema.cjs",
"import": "./dist/schema.mjs"
},
"./api": {
"types": "./dist/types/api.d.ts",
"require": "./dist/api.js",
"require": "./dist/api.cjs",
"import": "./dist/api.mjs"
}
},
Expand Down
Loading
Loading