Skip to content

Commit a59dc59

Browse files
committed
Update workflow triggers and refactor documentation examples for MSWPlugin integration
1 parent 3e79702 commit a59dc59

3 files changed

Lines changed: 24 additions & 25 deletions

File tree

.github/workflows/check-links.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: Check Links
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# branches:
10+
# - main
1011

1112
jobs:
1213
link-checker:

content/docs/developers/micro-kernel.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ await kernel.bootstrap();
319319
### Integration Tests
320320

321321
```typescript
322-
import { describe, it } from '@objectstack/runtime';
323-
import { ObjectQLPlugin } from '@objectstack/objectql
324-
import { ObjectKernel, ObjectQLPlugin } from '@objectstack/runtime';
322+
import { describe, it, expect } from 'vitest';
323+
import { ObjectKernel } from '@objectstack/runtime';
324+
import { ObjectQLPlugin } from '@objectstack/objectql';
325325

326326
describe('MyPlugin', () => {
327327
it('should register service', async () => {
@@ -347,7 +347,7 @@ Load plugins from a configuration file:
347347
// objectstack.config.ts
348348
export default {
349349
plugins: [
350-
{ name: '@objectstack/runtime#ObjectQLPlugin' },
350+
{ name: '@objectstack/objectql#ObjectQLPlugin' },
351351
{ name: '@objectstack/driver-memory#MemoryDriverPlugin' },
352352
{ name: '@objectstack/plugin-hono-server#HonoServerPlugin', config: { port: 3000 } },
353353
],
@@ -435,10 +435,10 @@ await ql.loadObjects([Account, Contact]);
435435
```
436436

437437
### After (MicroKernel)
438-
DriverPlugin } from '@objectstack/runtime';
439-
import { ObjectQLPlugin } from '@objectstack/objectql
438+
440439
```typescript
441-
import { ObjectKernel, ObjectQLPlugin, DriverPlugin } from '@objectstack/runtime';
440+
import { ObjectKernel, DriverPlugin } from '@objectstack/runtime';
441+
import { ObjectQLPlugin } from '@objectstack/objectql';
442442

443443
const kernel = new ObjectKernel();
444444
kernel.use(new ObjectQLPlugin());

packages/plugins/plugin-msw/README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@ pnpm add @objectstack/plugin-msw msw
2323

2424
```typescript
2525
import { MSWPlugin } from '@objectstack/plugin-msw';
26-
import { ObjectStackRuntime } from '@objectstack/runtime';
27-
28-
const runtime = new ObjectStackRuntime({
29-
plugins: [
30-
new MSWPlugin({
31-
enableBrowser: true,
32-
baseUrl: '/api/v1',
33-
logRequests: true
34-
})
35-
]
36-
});
26+
import { ObjectKernel } from '@objectstack/runtime';
27+
28+
const kernel = new ObjectKernel();
29+
30+
kernel.use(new MSWPlugin({
31+
enableBrowser: true,
32+
baseUrl: '/api/v1',
33+
logRequests: true
34+
}));
3735

38-
await runtime.start();
36+
await kernel.bootstrap();
3937
```
4038

4139
### Standalone Usage (Browser)

0 commit comments

Comments
 (0)