@travetto/web-rpc 7.0.0-rc.4 → 7.0.0-rc.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/web-rpc",
3
- "version": "7.0.0-rc.4",
3
+ "version": "7.0.0-rc.5",
4
4
  "description": "RPC support for a Web Application",
5
5
  "keywords": [
6
6
  "web",
@@ -26,9 +26,9 @@
26
26
  "directory": "module/web-rpc"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^7.0.0-rc.2",
30
- "@travetto/schema": "^7.0.0-rc.2",
31
- "@travetto/web": "^7.0.0-rc.3"
29
+ "@travetto/config": "^7.0.0-rc.3",
30
+ "@travetto/schema": "^7.0.0-rc.3",
31
+ "@travetto/web": "^7.0.0-rc.4"
32
32
  },
33
33
  "travetto": {
34
34
  "displayName": "Web RPC Support"
package/src/controller.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Inject } from '@travetto/di';
2
- import { Any, AppError, Util } from '@travetto/runtime';
2
+ import { Any, AppError, JSONUtil } from '@travetto/runtime';
3
3
  import { IsPrivate } from '@travetto/schema';
4
4
  import {
5
5
  HeaderParam, Controller, ExcludeInterceptors, ControllerRegistryIndex,
@@ -45,7 +45,7 @@ export class WebRpcController {
45
45
 
46
46
  // Allow request to read inputs from header
47
47
  if (paramInput) {
48
- params = Util.decodeSafeJSON(paramInput)!;
48
+ params = JSONUtil.parseBase64(paramInput)!;
49
49
  } else if (Array.isArray(body)) { // Params passed via body
50
50
  params = body;
51
51
 
package/src/service.ts CHANGED
@@ -5,7 +5,6 @@ import { Inject, Injectable } from '@travetto/di';
5
5
  import { ControllerRegistryIndex } from '@travetto/web';
6
6
  import { Runtime, RuntimeIndex } from '@travetto/runtime';
7
7
  import { ManifestModuleUtil } from '@travetto/manifest';
8
- import { Registry } from '@travetto/registry';
9
8
  import { SchemaRegistryIndex } from '@travetto/schema';
10
9
 
11
10
  import { clientFactory } from '../support/client/rpc.ts';
@@ -19,15 +18,6 @@ export class WebRpcClientGeneratorService {
19
18
 
20
19
  async postConstruct(): Promise<void> {
21
20
  this.render();
22
-
23
- if (!this.config.clients.length || !Runtime.dynamic) {
24
- return;
25
- }
26
- Registry.onClassChange((event) => {
27
- if (event.type !== 'changed') { // Capture only add and remove
28
- this.render();
29
- }
30
- }, ControllerRegistryIndex);
31
21
  }
32
22
 
33
23
  async #getClasses(relativeTo: string): Promise<{ name: string, import: string }[]> {
@@ -20,7 +20,6 @@ export class CliWebRpcCommand implements CliCommandShape {
20
20
 
21
21
  preMain(): void {
22
22
  Env.DEBUG.set(false);
23
- Env.TRV_DYNAMIC.set(false);
24
23
  }
25
24
 
26
25
  get #service(): Promise<WebRpcClientGeneratorService> {