@salesforce/lds-runtime-webruntime 0.1.0-dev1

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="jest" />
2
+ declare const executeGlobalControllerRawResponse: jest.Mock<any, any, any>;
3
+ export { executeGlobalControllerRawResponse };
@@ -0,0 +1,12 @@
1
+ declare function stop(_userSchemaOrText?: any | string, _userData?: any): void;
2
+ declare function error(_error: Error, _userSchemaOrText?: any | string, _userData?: any): void;
3
+ declare function discard(): void;
4
+ declare function terminate(): void;
5
+ export declare const activity: {
6
+ stop: typeof stop;
7
+ error: typeof error;
8
+ discard: typeof discard;
9
+ terminate: typeof terminate;
10
+ getId: () => string;
11
+ };
12
+ export {};
@@ -0,0 +1,11 @@
1
+ export { activity } from './activity';
2
+ export { instrumentation } from './instrumentation';
3
+ export { idleDetector } from './idleDetector';
4
+ export declare function getInstrumentation(_name: string): {
5
+ log: (_schema: any, _data?: any) => void;
6
+ error: (_error: unknown, _userSchemaOrText?: any, _userData?: any) => void;
7
+ startActivity: (_name: string) => any;
8
+ incrementCounter: (_operation: string, _increment?: number | undefined, _hasError?: boolean | undefined, _tags?: any) => void;
9
+ trackValue: (_operation: string, _value: number, _hasError?: boolean | undefined, _tags?: any) => void;
10
+ bucketValue: (_operation: string, _value: number, _buckets: number[]) => void;
11
+ };
@@ -0,0 +1,18 @@
1
+ declare function requestIdleDetectedCallback(_callback: any): void;
2
+ declare function declareNotifierTaskSingle(_name: string): {
3
+ isBusy: boolean;
4
+ done: () => void;
5
+ };
6
+ declare function declareNotifierTaskMulti(_name: string, _existingBusyCount?: number): {
7
+ isBusy: boolean;
8
+ add: () => void;
9
+ done: () => void;
10
+ };
11
+ declare function declarePollableTaskMulti(_name: string, _isBusyChecker: any): void;
12
+ export declare const idleDetector: {
13
+ requestIdleDetectedCallback: typeof requestIdleDetectedCallback;
14
+ declareNotifierTaskSingle: typeof declareNotifierTaskSingle;
15
+ declareNotifierTaskMulti: typeof declareNotifierTaskMulti;
16
+ declarePollableTaskMulti: typeof declarePollableTaskMulti;
17
+ };
18
+ export {};
@@ -0,0 +1,15 @@
1
+ declare function log(_schema: any, _data?: any): void;
2
+ declare function error(_error: unknown, _userSchemaOrText?: any | string, _userData?: any): void;
3
+ declare function startActivity(_name: string): any;
4
+ declare function incrementCounter(_operation: string, _increment?: number, _hasError?: boolean, _tags?: any): void;
5
+ declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: any): void;
6
+ declare function bucketValue(_operation: string, _value: number, _buckets: number[]): void;
7
+ export declare const instrumentation: {
8
+ log: typeof log;
9
+ error: typeof error;
10
+ startActivity: typeof startActivity;
11
+ incrementCounter: typeof incrementCounter;
12
+ trackValue: typeof trackValue;
13
+ bucketValue: typeof bucketValue;
14
+ };
15
+ export {};
@@ -0,0 +1 @@
1
+ export declare const adapterUnfulfilledErrorSchema: {};
@@ -0,0 +1,22 @@
1
+ import { type FetchParameters } from '@luvio/service-fetch-network/v1';
2
+ /**
3
+ * Webruntime request interceptor that modifies outgoing HTTP requests with standard
4
+ * query parameters and security headers. This ensures the api calls for onestore adapters
5
+ * follow the same pattern as the equivalent luvio api calls for all CLWR endpoints.
6
+ *
7
+ * This interceptor:
8
+ * - Adds language query parameter from i18n settings
9
+ * - Adds asGuest parameter based on design/preview mode and SID cookie presence
10
+ * - Adds htmlEncode=false query parameter (since this is an api call by definition)
11
+ * - For POST/PATCH/PUT/DELETE requests, adds CSRF token to headers
12
+ *
13
+ * @param {FetchParameters} args - The fetch parameters array containing [url, requestInit]
14
+ * @returns Promise-like resolved with the modified fetch parameters
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const modifiedArgs = await webruntimeRequestInterceptor(['/api/data', { method: 'GET' }]);
19
+ * // URL will have ?language=en_US&asGuest=false&htmlEncode=false appended
20
+ * ```
21
+ */
22
+ export declare function webruntimeRequestInterceptor(args: FetchParameters): Promise<[input: RequestInfo | URL, init?: RequestInit | undefined]>;
@@ -0,0 +1,10 @@
1
+ import { type FetchServiceDescriptor } from '@luvio/service-fetch-network/v1';
2
+ import { type LoggerService } from '@luvio/utils';
3
+ export declare function buildJwtAuthorizedSfapFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
4
+ /**
5
+ * Returns a service descriptor for a fetch service that includes one-off copilot
6
+ * hacks. This fetch service is not intended for use by anything other than
7
+ * copilot commands.
8
+ */
9
+ export declare function buildCopilotFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
10
+ export declare function buildDefaultFetchServiceDescriptor(): FetchServiceDescriptor;
@@ -0,0 +1,2 @@
1
+ import getServices, { resolve, setServices } from '@luvio/service-provisioner/v1';
2
+ export { getServices as default, resolve, setServices };
@@ -0,0 +1,9 @@
1
+ import type { JwtResolver } from '@luvio/jwt-manager';
2
+ export type ExtraInfo = {
3
+ baseUri: string;
4
+ };
5
+ /**
6
+ * Resolves Jwt token for SFAP by calling Aura action
7
+ * {@link JwtResolver} for platform SFAP
8
+ */
9
+ export declare const platformSfapJwtResolver: JwtResolver<ExtraInfo>;
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@salesforce/lds-runtime-webruntime",
3
+ "version": "0.1.0-dev1",
4
+ "license": "SEE LICENSE IN LICENSE.txt",
5
+ "description": "LDS engine for Webruntime runtime",
6
+ "main": "dist/ldsWebruntimeOneStoreInit.js",
7
+ "module": "dist/ldsWebruntimeOneStoreInit.js",
8
+ "types": "dist/types/main.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/types/main.d.ts",
15
+ "import": "./dist/ldsWebruntimeOneStoreInit.js",
16
+ "default": "./dist/ldsWebruntimeOneStoreInit.js"
17
+ }
18
+ },
19
+ "sfdc": {
20
+ "path": "forcelds/ldsWebruntimeOneStoreInit/",
21
+ "publishedFileName": "ldsWebruntimeOneStoreInit.js",
22
+ "overrides": {
23
+ "artifactDirectory": "dist",
24
+ "outputModuleName": "ldsWebruntimeOneStoreInit"
25
+ }
26
+ },
27
+ "scripts": {
28
+ "prepare": "yarn build",
29
+ "build": "rollup --bundleConfigAsCjs --config rollup.config.js",
30
+ "clean": "rm -rf dist",
31
+ "test:unit": "jest",
32
+ "test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
33
+ "test:size": "luvioBundlesize",
34
+ "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-webruntime",
35
+ "ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
36
+ },
37
+ "devDependencies": {
38
+ "@luvio/service-provisioner": "5.61.0",
39
+ "@luvio/tools-core": "5.61.0",
40
+ "jwt-encode": "1.0.1"
41
+ },
42
+ "dependencies": {
43
+ "@luvio/command-aura-network": "5.61.0",
44
+ "@luvio/command-aura-normalized-cache-control": "5.61.0",
45
+ "@luvio/command-aura-resource-cache-control": "5.61.0",
46
+ "@luvio/command-fetch-network": "5.61.0",
47
+ "@luvio/command-http-normalized-cache-control": "5.61.0",
48
+ "@luvio/command-ndjson": "5.61.0",
49
+ "@luvio/command-network": "5.61.0",
50
+ "@luvio/command-sse": "5.61.0",
51
+ "@luvio/command-streaming": "5.61.0",
52
+ "@luvio/jwt-manager": "5.61.0",
53
+ "@luvio/network-adapter-composable": "0.158.7",
54
+ "@luvio/network-adapter-fetch": "0.158.7",
55
+ "@luvio/service-aura-network": "5.61.0",
56
+ "@luvio/service-cache": "5.61.0",
57
+ "@luvio/service-cache-control": "5.61.0",
58
+ "@luvio/service-cache-inclusion-policy": "5.61.0",
59
+ "@luvio/service-fetch-network": "5.61.0",
60
+ "@luvio/service-instrument-command": "5.61.0",
61
+ "@luvio/service-pubsub": "5.61.0",
62
+ "@luvio/service-store": "5.61.0",
63
+ "@luvio/utils": "5.61.0",
64
+ "@salesforce/lds-adapters-uiapi-lex": "^0.1.0-dev1",
65
+ "@salesforce/lds-luvio-service": "^0.1.0-dev1",
66
+ "@salesforce/lds-luvio-uiapi-records-service": "^0.1.0-dev1"
67
+ },
68
+ "luvioBundlesize": [
69
+ {
70
+ "path": "./dist/ldsWebruntimeOneStoreInit.js",
71
+ "maxSize": {
72
+ "none": "150 kB",
73
+ "min": "80 kB",
74
+ "compressed": "30 kB"
75
+ }
76
+ }
77
+ ],
78
+ "volta": {
79
+ "extends": "../../package.json"
80
+ }
81
+ }