@lwrjs/types 0.6.0-alpha.7 → 0.6.0

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/build/config.d.ts CHANGED
@@ -132,6 +132,7 @@ export declare type ServiceEntry = [string, any?];
132
132
  export declare type ServiceConfig = string | ServiceEntry;
133
133
  export interface BundleConfig {
134
134
  exclude?: string[];
135
+ UNSAFE_lwrDefaultExclude?: string[];
135
136
  external?: Record<string, string>;
136
137
  alias?: Record<string, string>;
137
138
  }
package/build/index.d.ts CHANGED
@@ -6,10 +6,10 @@ import { Readable } from 'stream';
6
6
  import { BundleConfig, EnvironmentConfig, HooksPlugin, LwrLockerConfig, NormalizedLwrErrorRoute, NormalizedLwrGlobalConfig, NormalizedLwrRoute, ResolverModuleRecord, RouteHandlerFunction, RouteHandlerView, View } from './config.js';
7
7
  export * from './config.js';
8
8
  export * from './server.js';
9
- export * from './metrics.js';
10
9
  export * from './serviceAPI/serviceAPI.js';
11
10
  export * from './serviceAPI/loaderPlugins/loaderPlugins.js';
12
11
  export * from './serviceAPI/handleStaleModule/handleStaleModule.js';
12
+ export * from './serviceAPI/appMetadata/appMetadata.js';
13
13
  export declare type Json = undefined | null | boolean | number | string | Json[] | {
14
14
  [prop: string]: Json;
15
15
  };
@@ -613,6 +613,7 @@ export interface CompilerContext {
613
613
  runtimeEnvironment: RuntimeEnvironment;
614
614
  }
615
615
  export interface ClientBootstrapConfig {
616
+ appId?: string;
616
617
  bootstrapModule: string;
617
618
  requiredModules?: string[];
618
619
  autoBoot: boolean;
package/build/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export * from './config.js';
2
2
  export * from './server.js';
3
- export * from './metrics.js';
4
3
  // -- ServiceAPI --------------------------------
5
4
  export * from './serviceAPI/serviceAPI.js';
6
5
  export * from './serviceAPI/loaderPlugins/loaderPlugins.js';
7
6
  export * from './serviceAPI/handleStaleModule/handleStaleModule.js';
7
+ export * from './serviceAPI/appMetadata/appMetadata.js';
8
8
  //# sourceMappingURL=index.js.map
package/build/server.d.ts CHANGED
@@ -36,6 +36,7 @@ export interface InternalAppServer<T extends ServerTypes> {
36
36
  useCompression(): void;
37
37
  getRegexWildcard(): string;
38
38
  }
39
+ export declare type PublicAppServer<T extends ServerTypes> = Pick<InternalAppServer<T>, 'use' | 'all' | 'get' | 'post' | 'getRegexWildcard'>;
39
40
  export interface MiddlewareFunction {
40
41
  (req: MiddlewareRequest, res: MiddlewareResponse, next: Function): void;
41
42
  }
@@ -44,8 +45,13 @@ export interface MiddlewareRequest {
44
45
  originalUrl: string;
45
46
  path: string;
46
47
  query: any;
48
+ body: any;
49
+ method: string;
50
+ protocol: string;
47
51
  locale: string;
48
52
  acceptsLanguages(): string[];
53
+ get(field: string): string | undefined;
54
+ cookie(name: string): string | undefined;
49
55
  hasJsonParam(): boolean;
50
56
  /**
51
57
  * Return JSON if:
@@ -72,5 +78,6 @@ export interface MiddlewareResponse {
72
78
  sendStatus(httpCode: number): void;
73
79
  stream(stream: Readable): void;
74
80
  type(type: string): MiddlewareResponse;
81
+ cookie(name: string, value?: string, options?: any): MiddlewareResponse;
75
82
  }
76
83
  //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1,7 @@
1
+ export declare type AppMetadata = {
2
+ appId?: string;
3
+ bootstrapModule: string;
4
+ rootComponent?: string;
5
+ rootComponents?: string[];
6
+ };
7
+ //# sourceMappingURL=appMetadata.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=appMetadata.js.map
@@ -1,8 +1,10 @@
1
1
  import { RegisterLoaderHooks } from './loaderPlugins/loaderPlugins';
2
2
  import { RegisterHandleStaleModuleHook } from './handleStaleModule/handleStaleModule';
3
+ import { AppMetadata } from './appMetadata/appMetadata';
3
4
  export interface ServiceAPI {
4
5
  addLoaderPlugin: NoOp | RegisterLoaderHooks;
5
6
  handleStaleModule: RegisterHandleStaleModuleHook;
7
+ appMetadata: AppMetadata;
6
8
  }
7
9
  export interface NoOp {
8
10
  (): void;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "build": "tsc -b"
9
9
  },
10
10
  "type": "module",
11
- "version": "0.6.0-alpha.7",
11
+ "version": "0.6.0",
12
12
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
13
13
  "repository": {
14
14
  "type": "git",
@@ -27,5 +27,5 @@
27
27
  "engines": {
28
28
  "node": ">=14.15.4 <17"
29
29
  },
30
- "gitHead": "dc066450384dc1e27064b46ddd5f24543758a414"
30
+ "gitHead": "31769655f0155ad7e54cf37bccdf72d0baaf44ab"
31
31
  }
@@ -1,2 +0,0 @@
1
- export declare type LWRBootstrapMetrics = 'lwr-bootstrap-on-app-load' | 'lwr-bootstrap-on-app-init';
2
- //# sourceMappingURL=metrics.d.ts.map
package/build/metrics.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=metrics.js.map