@objectstack/plugin-msw 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @objectstack/plugin-msw
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Patch release for maintenance and stability improvements
8
+ - Updated dependencies
9
+ - @objectstack/spec@0.6.1
10
+ - @objectstack/objectql@0.6.1
11
+ - @objectstack/runtime@0.6.1
12
+ - @objectstack/types@0.6.1
13
+
3
14
  ## 0.6.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -23,19 +23,17 @@ pnpm add @objectstack/plugin-msw msw
23
23
 
24
24
  ```typescript
25
25
  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
+ }));
37
35
 
38
- await runtime.start();
36
+ await kernel.bootstrap();
39
37
  ```
40
38
 
41
39
  ### Standalone Usage (Browser)
@@ -1,6 +1,6 @@
1
1
  import { http, HttpResponse } from 'msw';
2
2
  import { setupWorker } from 'msw/browser';
3
- import { ObjectStackProtocolImplementation } from '@objectstack/runtime';
3
+ import { ObjectStackProtocolImplementation } from '@objectstack/objectql';
4
4
  /**
5
5
  * ObjectStack Server Mock - Provides mock database functionality
6
6
  */
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@objectstack/plugin-msw",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "MSW (Mock Service Worker) Plugin for ObjectStack Runtime",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "dependencies": {
8
8
  "msw": "^2.0.0",
9
- "@objectstack/spec": "0.6.0",
10
- "@objectstack/types": "0.6.0"
9
+ "@objectstack/spec": "0.6.1",
10
+ "@objectstack/types": "0.6.1",
11
+ "@objectstack/objectql": "0.6.1"
11
12
  },
12
13
  "devDependencies": {
13
14
  "@types/node": "^20.0.0",
14
15
  "typescript": "^5.0.0",
15
- "@objectstack/runtime": "0.6.0"
16
+ "@objectstack/runtime": "0.6.1"
16
17
  },
17
18
  "peerDependencies": {
18
- "@objectstack/runtime": "^0.6.0"
19
+ "@objectstack/runtime": "^0.6.1"
19
20
  },
20
21
  "scripts": {
21
22
  "build": "tsc"
package/src/msw-plugin.ts CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  Plugin,
5
5
  PluginContext,
6
6
  ObjectKernel,
7
- ObjectStackProtocolImplementation,
8
7
  IDataEngine
9
8
  } from '@objectstack/runtime';
9
+ import { ObjectStackProtocolImplementation } from '@objectstack/objectql';
10
10
  import { IObjectStackProtocol } from '@objectstack/spec/api';
11
11
  // import { IDataEngine } from '@objectstack/core';
12
12