@lwrjs/diagnostics 0.17.2-alpha.2 → 0.17.2-alpha.4

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.
@@ -11,12 +11,7 @@ __export(exports, {
11
11
  application: () => application
12
12
  });
13
13
  var application = {
14
- INVALID_JSON: () => "400: Accept header and json query parameter are incompatible",
15
- INVALID_API_VERSION: (apiVersion, expectedVersion) => `400: API Version "${escape(apiVersion)}" is not supported. Expected "${expectedVersion}"`,
16
- INVALID_ENVIRONMENT: (environment) => `400: Environment "${escape(environment)}" is not supported`,
17
- INVALID_SPECIFIER: (specifier) => `400: Unable to resolve specifier "${escape(specifier)}" because it contains path traversal`,
18
- PRELOAD_MODULE: (specifier) => `Invalid preload module: ${escape(specifier)}`,
19
- INVALID_MODE: (mode) => `No configuration found for server mode - ${escape(mode)}`,
14
+ PRELOAD_DATA_ERROR: (id, error) => `Preloading data for "${id}" failed: ${error}`,
20
15
  SSR_ERROR: (specifier, error) => `Server-side rendering for "${specifier}" failed: ${error}`,
21
16
  SSR_TIMEOUT: (specifier, time) => `Server side rendering or data prefetching for '${escape(specifier)}' timed out after ${time}ms`,
22
17
  ROUTE_HANDLER_ERROR: (route, error) => `An error occurred executing route handler for "${route}": "${error}"`
@@ -30,9 +30,11 @@ var import_config = __toModule(require("./config.cjs"));
30
30
  var import_unresolvable = __toModule(require("./unresolvable.cjs"));
31
31
  var import_server = __toModule(require("./server.cjs"));
32
32
  var import_application = __toModule(require("./application.cjs"));
33
+ var import_invalid = __toModule(require("./invalid.cjs"));
33
34
  var descriptions = {
34
35
  CONFIG: import_config.config,
35
36
  UNRESOLVABLE: import_unresolvable.unresolvable,
36
37
  SERVER: import_server.server,
37
- APPLICATION: import_application.application
38
+ APPLICATION: import_application.application,
39
+ INVALID: import_invalid.invalid
38
40
  };
@@ -0,0 +1,20 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, {get: all[name], enumerable: true});
6
+ };
7
+
8
+ // packages/@lwrjs/diagnostics/src/descriptions/invalid.ts
9
+ __markAsModule(exports);
10
+ __export(exports, {
11
+ invalid: () => invalid
12
+ });
13
+ var invalid = {
14
+ INVALID_JSON: () => "400: Accept header and json query parameter are incompatible",
15
+ INVALID_API_VERSION: (apiVersion, expectedVersion) => `400: API Version "${escape(apiVersion)}" is not supported. Expected "${expectedVersion}"`,
16
+ INVALID_ENVIRONMENT: (environment) => `400: Environment "${escape(environment)}" is not supported`,
17
+ INVALID_SPECIFIER: (specifier) => `400: Unable to resolve specifier "${escape(specifier)}" because it contains path traversal`,
18
+ PRELOAD_MODULE: (specifier) => `Invalid preload module: ${escape(specifier)}`,
19
+ INVALID_MODE: (mode) => `No configuration found for server mode - ${escape(mode)}`
20
+ };
@@ -12,6 +12,7 @@ __export(exports, {
12
12
  LwrApplicationError: () => LwrApplicationError,
13
13
  LwrConfigError: () => LwrConfigError,
14
14
  LwrError: () => LwrError,
15
+ LwrInvalidError: () => LwrInvalidError,
15
16
  LwrServerError: () => LwrServerError,
16
17
  LwrStatusError: () => LwrStatusError,
17
18
  LwrUnresolvableError: () => LwrUnresolvableError,
@@ -38,6 +39,12 @@ var LwrApplicationError = class extends LwrError {
38
39
  this.name = "LwrApplicationError";
39
40
  }
40
41
  };
42
+ var LwrInvalidError = class extends LwrError {
43
+ constructor() {
44
+ super(...arguments);
45
+ this.name = "LwrInvalidError";
46
+ }
47
+ };
41
48
  var LwrUnresolvableError = class extends LwrError {
42
49
  constructor(message, type) {
43
50
  super(message);
@@ -1,10 +1,5 @@
1
1
  export declare const application: {
2
- INVALID_JSON: () => string;
3
- INVALID_API_VERSION: (apiVersion: string, expectedVersion: any) => string;
4
- INVALID_ENVIRONMENT: (environment: string) => string;
5
- INVALID_SPECIFIER: (specifier: string) => string;
6
- PRELOAD_MODULE: (specifier: string) => string;
7
- INVALID_MODE: (mode: string) => string;
2
+ PRELOAD_DATA_ERROR: (id: string, error: string) => string;
8
3
  SSR_ERROR: (specifier: string, error: string) => string;
9
4
  SSR_TIMEOUT: (specifier: string, time: number) => string;
10
5
  ROUTE_HANDLER_ERROR: (route: string, error: string) => string;
@@ -1,10 +1,5 @@
1
1
  export const application = {
2
- INVALID_JSON: () => '400: Accept header and json query parameter are incompatible',
3
- INVALID_API_VERSION: (apiVersion, expectedVersion) => `400: API Version "${escape(apiVersion)}" is not supported. Expected "${expectedVersion}"`,
4
- INVALID_ENVIRONMENT: (environment) => `400: Environment "${escape(environment)}" is not supported`,
5
- INVALID_SPECIFIER: (specifier) => `400: Unable to resolve specifier "${escape(specifier)}" because it contains path traversal`,
6
- PRELOAD_MODULE: (specifier) => `Invalid preload module: ${escape(specifier)}`,
7
- INVALID_MODE: (mode) => `No configuration found for server mode - ${escape(mode)}`,
2
+ PRELOAD_DATA_ERROR: (id, error) => `Preloading data for "${id}" failed: ${error}`,
8
3
  SSR_ERROR: (specifier, error) => `Server-side rendering for "${specifier}" failed: ${error}`,
9
4
  SSR_TIMEOUT: (specifier, time) => `Server side rendering or data prefetching for '${escape(specifier)}' timed out after ${time}ms`,
10
5
  ROUTE_HANDLER_ERROR: (route, error) => `An error occurred executing route handler for "${route}": "${error}"`,
@@ -49,15 +49,18 @@ export declare const descriptions: {
49
49
  SERVER_ERROR: (name: string) => string;
50
50
  };
51
51
  APPLICATION: {
52
+ PRELOAD_DATA_ERROR: (id: string, error: string) => string;
53
+ SSR_ERROR: (specifier: string, error: string) => string;
54
+ SSR_TIMEOUT: (specifier: string, time: number) => string;
55
+ ROUTE_HANDLER_ERROR: (route: string, error: string) => string;
56
+ };
57
+ INVALID: {
52
58
  INVALID_JSON: () => string;
53
59
  INVALID_API_VERSION: (apiVersion: string, expectedVersion: any) => string;
54
60
  INVALID_ENVIRONMENT: (environment: string) => string;
55
61
  INVALID_SPECIFIER: (specifier: string) => string;
56
62
  PRELOAD_MODULE: (specifier: string) => string;
57
63
  INVALID_MODE: (mode: string) => string;
58
- SSR_ERROR: (specifier: string, error: string) => string;
59
- SSR_TIMEOUT: (specifier: string, time: number) => string;
60
- ROUTE_HANDLER_ERROR: (route: string, error: string) => string;
61
64
  };
62
65
  };
63
66
  //# sourceMappingURL=index.d.ts.map
@@ -2,10 +2,12 @@ import { config } from './config.js';
2
2
  import { unresolvable } from './unresolvable.js';
3
3
  import { server } from './server.js';
4
4
  import { application } from './application.js';
5
+ import { invalid } from './invalid.js';
5
6
  export const descriptions = {
6
7
  CONFIG: config,
7
8
  UNRESOLVABLE: unresolvable,
8
9
  SERVER: server,
9
10
  APPLICATION: application,
11
+ INVALID: invalid,
10
12
  };
11
13
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ export declare const invalid: {
2
+ INVALID_JSON: () => string;
3
+ INVALID_API_VERSION: (apiVersion: string, expectedVersion: any) => string;
4
+ INVALID_ENVIRONMENT: (environment: string) => string;
5
+ INVALID_SPECIFIER: (specifier: string) => string;
6
+ PRELOAD_MODULE: (specifier: string) => string;
7
+ INVALID_MODE: (mode: string) => string;
8
+ };
9
+ //# sourceMappingURL=invalid.d.ts.map
@@ -0,0 +1,9 @@
1
+ export const invalid = {
2
+ INVALID_JSON: () => '400: Accept header and json query parameter are incompatible',
3
+ INVALID_API_VERSION: (apiVersion, expectedVersion) => `400: API Version "${escape(apiVersion)}" is not supported. Expected "${expectedVersion}"`,
4
+ INVALID_ENVIRONMENT: (environment) => `400: Environment "${escape(environment)}" is not supported`,
5
+ INVALID_SPECIFIER: (specifier) => `400: Unable to resolve specifier "${escape(specifier)}" because it contains path traversal`,
6
+ PRELOAD_MODULE: (specifier) => `Invalid preload module: ${escape(specifier)}`,
7
+ INVALID_MODE: (mode) => `No configuration found for server mode - ${escape(mode)}`,
8
+ };
9
+ //# sourceMappingURL=invalid.js.map
@@ -9,6 +9,9 @@ export declare class LwrServerError extends LwrError {
9
9
  export declare class LwrApplicationError extends LwrError {
10
10
  name: string;
11
11
  }
12
+ export declare class LwrInvalidError extends LwrError {
13
+ name: string;
14
+ }
12
15
  export declare class LwrUnresolvableError extends LwrError {
13
16
  name: string;
14
17
  type: string;
@@ -16,13 +16,20 @@ export class LwrServerError extends LwrError {
16
16
  this.name = 'LwrServerError';
17
17
  }
18
18
  }
19
- // 400
19
+ // 500 - app layer does not affect availability
20
20
  export class LwrApplicationError extends LwrError {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.name = 'LwrApplicationError';
24
24
  }
25
25
  }
26
+ // 400
27
+ export class LwrInvalidError extends LwrError {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.name = 'LwrInvalidError';
31
+ }
32
+ }
26
33
  // 404
27
34
  export class LwrUnresolvableError extends LwrError {
28
35
  constructor(message, type) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.17.2-alpha.2",
7
+ "version": "0.17.2-alpha.4",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "test": "jest"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.17.2-alpha.2",
38
+ "@lwrjs/types": "0.17.2-alpha.4",
39
39
  "jest": "^26.6.3",
40
40
  "ts-jest": "^26.5.6",
41
41
  "typescript": "^4.9.5"
@@ -46,5 +46,5 @@
46
46
  "volta": {
47
47
  "extends": "../../../package.json"
48
48
  },
49
- "gitHead": "739b237f5d7f2c1989142cb505a56cc763f21976"
49
+ "gitHead": "d7fb1605cec0bf9fef18e3daeb17dc28b35a80d3"
50
50
  }