@liquidcommercedev/rmn-sdk 1.4.1 → 1.4.2-beta.2
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/dist/index.cjs +17144 -0
- package/dist/index.esm.js +17140 -0
- package/dist/types/common/helpers/helpers.interface.d.ts +14 -0
- package/dist/types/common/helpers/index.d.ts +2 -0
- package/dist/types/common/helpers/object.helper.d.ts +95 -0
- package/dist/types/common/helpers/string.helper.d.ts +39 -0
- package/dist/types/common/http/api.constant.d.ts +7 -0
- package/dist/types/common/http/api.interface.d.ts +39 -0
- package/dist/types/common/http/base.api.d.ts +80 -0
- package/dist/types/common/http/encrypted.api.d.ts +66 -0
- package/dist/types/common/http/error.api.d.ts +5 -0
- package/dist/types/common/http/index.d.ts +5 -0
- package/dist/types/common/singleton-manager/index.d.ts +1 -0
- package/dist/types/common/singleton-manager/singleton-manager.d.ts +12 -0
- package/dist/types/enums.d.ts +7 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.umd.d.ts +2 -0
- package/dist/types/modules/auth/auth.constant.d.ts +1 -0
- package/dist/types/modules/auth/auth.interface.d.ts +27 -0
- package/dist/types/modules/auth/auth.service.d.ts +22 -0
- package/dist/types/modules/auth/index.d.ts +3 -0
- package/dist/types/modules/spot/html/index.d.ts +1 -0
- package/dist/types/modules/spot/html/spot.element.service.d.ts +7 -0
- package/dist/types/modules/spot/html/spot.element.shadow-root.d.ts +4 -0
- package/dist/types/modules/spot/html/templates/iab/billboard/billboard-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/billboard/billboard-v2.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/billboard/billboard-v3.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/billboard/index.d.ts +3 -0
- package/dist/types/modules/spot/html/templates/iab/constants/fonts.constant.d.ts +3 -0
- package/dist/types/modules/spot/html/templates/iab/in-text/in-text-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/in-text/index.d.ts +1 -0
- package/dist/types/modules/spot/html/templates/iab/index.d.ts +7 -0
- package/dist/types/modules/spot/html/templates/iab/large-leaderboard/index.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/large-leaderboard/large-leaderboard-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/large-leaderboard/large-leaderboard-v2.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/large-rectangle/index.d.ts +1 -0
- package/dist/types/modules/spot/html/templates/iab/large-rectangle/large-rectangle-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/square/index.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/square/square-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/square/square-v2.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/vertical-rectangle/index.d.ts +1 -0
- package/dist/types/modules/spot/html/templates/iab/vertical-rectangle/vertical-rectangle-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/iab/wide-skyscraper/index.d.ts +1 -0
- package/dist/types/modules/spot/html/templates/iab/wide-skyscraper/wide-skyscraper-v1.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/index.d.ts +1 -0
- package/dist/types/modules/spot/html/templates/reservebar/collection-banner-without-text-block.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/homepage-hero-full-image.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/homepage-hero-three-tile.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/homepage-hero-two-tile.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/index.d.ts +8 -0
- package/dist/types/modules/spot/html/templates/reservebar/large-category-image-tout.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/navigation-banner.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/small-category-image-tout.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/reservebar/small-discover-tout.template.d.ts +2 -0
- package/dist/types/modules/spot/html/templates/spot.template.d.ts +21 -0
- package/dist/types/modules/spot/index.d.ts +6 -0
- package/dist/types/modules/spot/spot.constant.d.ts +3 -0
- package/dist/types/modules/spot/spot.enum.d.ts +57 -0
- package/dist/types/modules/spot/spot.html.service.d.ts +22 -0
- package/dist/types/modules/spot/spot.interface.d.ts +44 -0
- package/dist/types/modules/spot/spot.selection.service.d.ts +16 -0
- package/dist/types/modules/spot/spot.type.d.ts +27 -0
- package/dist/types/rmn-client.d.ts +58 -0
- package/dist/types/types.d.ts +11 -0
- package/package.json +34 -14
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -0
- package/CHANGELOG.md +0 -75
- package/dist/index.d.ts +0 -192
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -19
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare enum RMN_SPOT_TYPE {
|
|
2
|
+
RB_HOMEPAGE_HERO_THREE_TILE = "rbHomepageHeroThreeTile",
|
|
3
|
+
RB_HOMEPAGE_HERO_TWO_TILE = "rbHomepageHeroTwoTile",
|
|
4
|
+
RB_HOMEPAGE_HERO_FULL_IMAGE = "rbHomepageHeroFullImage",
|
|
5
|
+
RB_LARGE_CATEGORY_IMAGE_TOUT = "rbLargeCategoryImageTout",
|
|
6
|
+
RB_SMALL_DISCOVER_TOUT = "rbSmallDiscoverTout",
|
|
7
|
+
RB_SMALL_CATEGORY_IMAGE_TOUT = "rbSmallCategoryImageTout",
|
|
8
|
+
RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK = "rbCollectionBannerWithoutTextBlock",
|
|
9
|
+
RB_PRODUCT_UPCS = "rbProductUpcs",
|
|
10
|
+
RB_NAVIGATION_BANNER = "rbNavigationBanner",
|
|
11
|
+
BILLBOARD = "billboard",
|
|
12
|
+
LARGE_RECTANGLE = "largeRectangle",
|
|
13
|
+
VERTICAL_RECTANGLE = "verticalRectangle",
|
|
14
|
+
SQUARE = "square",
|
|
15
|
+
LARGE_LEADERBOARD = "largeLeaderboard",
|
|
16
|
+
WIDE_SKYSCRAPER = "wideSkyscraper",
|
|
17
|
+
IN_TEXT = "inText",
|
|
18
|
+
SMALL_RECTANGLE = "smallRectangle",
|
|
19
|
+
MEDIUM_RECTANGLE = "mediumRectangle",
|
|
20
|
+
BANNER = "banner",
|
|
21
|
+
LEADERBOARD = "leaderboard",
|
|
22
|
+
SKYSCRAPER = "skyscraper",
|
|
23
|
+
HALF_PAGE = "halfPage",
|
|
24
|
+
SMALL_SQUARE = "smallSquare",
|
|
25
|
+
VERTICAL_BANNER = "verticalBanner",
|
|
26
|
+
BUTTON_2 = "button2",
|
|
27
|
+
MICRO_BAR = "microBar",
|
|
28
|
+
POP_UP = "popUp",
|
|
29
|
+
PORTRAIT = "portrait",
|
|
30
|
+
SMARTPHONE_BANNER_1 = "smartphoneBanner1",
|
|
31
|
+
SMARTPHONE_BANNER_2 = "smartphoneBanner2",
|
|
32
|
+
MOBILE_PHONE_INTERSTITIAL_1 = "mobilePhoneInterstitial1",
|
|
33
|
+
MOBILE_PHONE_INTERSTITIAL_2 = "mobilePhoneInterstitial2",
|
|
34
|
+
MOBILE_PHONE_INTERSTITIAL_3 = "mobilePhoneInterstitial3",
|
|
35
|
+
FEATURE_PHONE_SMALL_BANNER = "featurePhoneSmallBanner",
|
|
36
|
+
FEATURE_PHONE_MEDIUM_BANNER = "featurePhoneMediumBanner",
|
|
37
|
+
FEATURE_PHONE_LARGE_BANNER = "featurePhoneLargeBanner"
|
|
38
|
+
}
|
|
39
|
+
export declare enum RMN_FILTER_PROPERTIES {
|
|
40
|
+
KEYWORDS = "keywords",
|
|
41
|
+
PARENTCO = "parentCo",
|
|
42
|
+
BRAND = "brand",
|
|
43
|
+
CATEGORY = "category",
|
|
44
|
+
TYPE = "type",
|
|
45
|
+
CLASSIFICATION = "classification",
|
|
46
|
+
HOLIDAY = "holiday",
|
|
47
|
+
PUBLISHERS = "publishers",
|
|
48
|
+
SECTION = "section"
|
|
49
|
+
}
|
|
50
|
+
export declare enum RMN_SPOT_EVENT {
|
|
51
|
+
IMPRESSION = "IMPRESSION",
|
|
52
|
+
CLICK = "CLICK",
|
|
53
|
+
PURCHASE = "PURCHASE",
|
|
54
|
+
ADD_TO_CART = "ADD_TO_CART",
|
|
55
|
+
ADD_TO_WISHLIST = "ADD_TO_WISHLIST",
|
|
56
|
+
BUY_NOW = "BUY_NOW"
|
|
57
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ICreateSpotElementConfig, ISpot, ISpotHtmlService } from './spot.interface';
|
|
2
|
+
export declare class SpotHtmlService implements ISpotHtmlService {
|
|
3
|
+
static getInstance(): SpotHtmlService;
|
|
4
|
+
/**
|
|
5
|
+
* Creates the html element based on the provided spot data using shadow dom.
|
|
6
|
+
*
|
|
7
|
+
* This method is only available in browser environments.
|
|
8
|
+
*
|
|
9
|
+
* @param {ISpot} spot - The spot data.
|
|
10
|
+
* @param {ICreateSpotElementConfig} config - The configuration object.
|
|
11
|
+
* @param {ICreateSpotElementConfig.fluid} config.fluid - If the spot should be fluid or not.
|
|
12
|
+
* @param {ICreateSpotElementConfig.customHtmlElement} config.customHtmlElement - Use a custom html element.
|
|
13
|
+
* @param {ICreateSpotElementConfig.redirectOnClick} config.redirectOnClick - If the spot should redirect on click.
|
|
14
|
+
*
|
|
15
|
+
* @return {HTMLElement | null} - The spot html element or null if the browser environment is not available.
|
|
16
|
+
*/
|
|
17
|
+
createSpotHtmlElement(spot: ISpot, config?: ICreateSpotElementConfig): HTMLElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* @returns {boolean} - True if the browser environment is available and the element is defined.
|
|
20
|
+
*/
|
|
21
|
+
private ensureBrowserEnvironmentAndDefineElement;
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RMN_ENV } from './../../enums';
|
|
2
|
+
import type { RMN_SPOT_EVENT, RMN_SPOT_TYPE } from './spot.enum';
|
|
3
|
+
import type { RmnFilterType, RmnSpotType, SpotIdentifierType, SpotVariantType } from './spot.type';
|
|
4
|
+
export interface ISpotSelectionParams {
|
|
5
|
+
spots: RmnSpotType[];
|
|
6
|
+
filter?: Partial<RmnFilterType>;
|
|
7
|
+
}
|
|
8
|
+
export interface ISpotEvent {
|
|
9
|
+
event: RMN_SPOT_EVENT;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ISpot {
|
|
13
|
+
events: ISpotEvent[];
|
|
14
|
+
spot: RMN_SPOT_TYPE;
|
|
15
|
+
variant: SpotVariantType;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
preHeader?: string;
|
|
19
|
+
header?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
ctaText?: string;
|
|
22
|
+
textColor?: string;
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
ctaTextColor?: string;
|
|
25
|
+
ctaBorderColor?: string;
|
|
26
|
+
primaryImage?: string;
|
|
27
|
+
secondaryImage?: string;
|
|
28
|
+
mobilePrimaryImage?: string;
|
|
29
|
+
mobileSecondaryImage?: string;
|
|
30
|
+
productUpcs?: string[];
|
|
31
|
+
env: RMN_ENV;
|
|
32
|
+
}
|
|
33
|
+
export interface ICreateSpotElementConfig {
|
|
34
|
+
fluid?: boolean;
|
|
35
|
+
customHtmlElement?: HTMLElement;
|
|
36
|
+
redirectOnClick?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type ISpots = Record<SpotIdentifierType, ISpot[]>;
|
|
39
|
+
export interface ISpotSelectionService {
|
|
40
|
+
spotSelection(data: ISpotSelectionParams): Promise<ISpots>;
|
|
41
|
+
}
|
|
42
|
+
export interface ISpotHtmlService {
|
|
43
|
+
createSpotHtmlElement(spot: ISpot, config?: ICreateSpotElementConfig): HTMLElement | null;
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseApi } from '../../common/http';
|
|
2
|
+
import type { IAuthCredentials } from '../auth';
|
|
3
|
+
import type { ISpots, ISpotSelectionParams, ISpotSelectionService } from './spot.interface';
|
|
4
|
+
export declare class SpotSelectionService extends BaseApi implements ISpotSelectionService {
|
|
5
|
+
private constructor();
|
|
6
|
+
static getInstance(auth: IAuthCredentials): SpotSelectionService;
|
|
7
|
+
/**
|
|
8
|
+
* Makes a selection request on our server based on the provided data.
|
|
9
|
+
*
|
|
10
|
+
* @param {ISpotSelectionParams} data - Spots selection parameters.
|
|
11
|
+
*
|
|
12
|
+
* @return {Promise<ISpots>} - The spots response object.
|
|
13
|
+
*/
|
|
14
|
+
spotSelection(data: ISpotSelectionParams): Promise<ISpots>;
|
|
15
|
+
private addEnvToSpotData;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RMN_FILTER_PROPERTIES, RMN_SPOT_TYPE } from './spot.enum';
|
|
2
|
+
export type RmnFilterType = {
|
|
3
|
+
[key in RMN_FILTER_PROPERTIES]?: string[];
|
|
4
|
+
};
|
|
5
|
+
export type SpotFilterType = {
|
|
6
|
+
spot: RMN_SPOT_TYPE | string;
|
|
7
|
+
count: number;
|
|
8
|
+
exactMatch?: string;
|
|
9
|
+
} & Omit<RmnFilterType, RMN_FILTER_PROPERTIES.KEYWORDS>;
|
|
10
|
+
export type SpotIdentifierType = RMN_SPOT_TYPE | `${RMN_SPOT_TYPE}${number}`;
|
|
11
|
+
export type RmnSpotType = RMN_SPOT_TYPE | string | SpotFilterType;
|
|
12
|
+
type RBSpotTypeKeys = keyof {
|
|
13
|
+
[K in keyof typeof RMN_SPOT_TYPE as K extends `RB_${string}` ? K : never]: (typeof RMN_SPOT_TYPE)[K];
|
|
14
|
+
};
|
|
15
|
+
type IABSpotTypeKeys = keyof {
|
|
16
|
+
[K in keyof typeof RMN_SPOT_TYPE as K extends `RB_${string}` ? never : K]: (typeof RMN_SPOT_TYPE)[K];
|
|
17
|
+
};
|
|
18
|
+
type RBSpotTypeValues = (typeof RMN_SPOT_TYPE)[RBSpotTypeKeys];
|
|
19
|
+
type IABSpotTypeValues = (typeof RMN_SPOT_TYPE)[IABSpotTypeKeys];
|
|
20
|
+
export type SpotVariantType = RBSpotTypeValues | `${IABSpotTypeValues}V${number}`;
|
|
21
|
+
export type SpotDimensionsType = {
|
|
22
|
+
[key in RMN_SPOT_TYPE]: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IAuthCredentials } from './modules/auth';
|
|
2
|
+
import type { ICreateSpotElementConfig, ISpot, ISpots, ISpotSelectionParams } from './modules/spot';
|
|
3
|
+
import type { IRmnClient, IRmnConfig } from './types';
|
|
4
|
+
export declare class LiquidCommerceRmnClient implements IRmnClient {
|
|
5
|
+
private readonly spotSelectionService;
|
|
6
|
+
private readonly spotHtmlService;
|
|
7
|
+
constructor(auth: IAuthCredentials);
|
|
8
|
+
/**
|
|
9
|
+
* Makes a selection request on our server based on the provided data.
|
|
10
|
+
*
|
|
11
|
+
* To create a spot html element, use the RmnCreateSpotElement function.
|
|
12
|
+
*
|
|
13
|
+
* @param {ISpotSelectionParams} data - Spots selection parameters.
|
|
14
|
+
*
|
|
15
|
+
* @return {Promise<ISpots>} - The spots response object.
|
|
16
|
+
*/
|
|
17
|
+
spotSelection(data: ISpotSelectionParams): Promise<ISpots>;
|
|
18
|
+
/**
|
|
19
|
+
* Creates the spot html element based on the provided data using shadow dom.
|
|
20
|
+
*
|
|
21
|
+
* This method is useful when you are initializing the client in a browser environment, so you can create the spot html element directly from the RmnClient instance.
|
|
22
|
+
*
|
|
23
|
+
* @param {ISpot} spot - The spot data.
|
|
24
|
+
* @param {ICreateSpotElementConfig} config - The configuration object.
|
|
25
|
+
* @param {ICreateSpotElementConfig.fluid} config.fluid - If the spot should be fluid or not.
|
|
26
|
+
* @param {ICreateSpotElementConfig.customHtmlElement} config.customHtmlElement - Use a custom html element.
|
|
27
|
+
* @param {ICreateSpotElementConfig.redirectOnClick} config.redirectOnClick - If the spot should redirect on click.
|
|
28
|
+
*
|
|
29
|
+
* @return {HTMLElement | null} - The spot html element or null if the browser environment is not available.
|
|
30
|
+
*/
|
|
31
|
+
createSpotElement(spot: ISpot, config?: ICreateSpotElementConfig): HTMLElement | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new instance of the RmnClient.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} apiKey - The api key.
|
|
37
|
+
* @param {IRmnConfig} config - The configuration object.
|
|
38
|
+
*
|
|
39
|
+
* @return {Promise<IRmnClient>} - The RmnClient instance.
|
|
40
|
+
*/
|
|
41
|
+
declare function RmnClient(apiKey: string, config: IRmnConfig): Promise<IRmnClient>;
|
|
42
|
+
/**
|
|
43
|
+
* Creates the spot html element based on the provided data using shadow dom.
|
|
44
|
+
*
|
|
45
|
+
* This method is useful when you are initializing the client in a non-browser environment.
|
|
46
|
+
* When you request a spot selection, you will receive the spot data in server-side and return them back to the client.
|
|
47
|
+
* Then you can use this function to create the spot html element based on the provided data without the need of the RmnClient instance.
|
|
48
|
+
*
|
|
49
|
+
* @param {ISpot} spot - The spot data.
|
|
50
|
+
* @param {ICreateSpotElementConfig} config - The configuration object.
|
|
51
|
+
* @param {ICreateSpotElementConfig.fluid} config.fluid - If the spot should be fluid or not.
|
|
52
|
+
* @param {ICreateSpotElementConfig.customHtmlElement} config.customHtmlElement - Use a custom html element.
|
|
53
|
+
* @param {ICreateSpotElementConfig.redirectOnClick} config.redirectOnClick - If the spot should redirect on click.
|
|
54
|
+
*
|
|
55
|
+
* @return {HTMLElement | null} - The spot html element or null if the browser environment is not available.
|
|
56
|
+
*/
|
|
57
|
+
declare function RmnCreateSpotElement(spot: ISpot, config?: ICreateSpotElementConfig): HTMLElement | null;
|
|
58
|
+
export { RmnClient, RmnCreateSpotElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { ICreateSpotElementConfig, ISpotEvent, ISpots, RmnFilterType, RmnSpotType, } from './modules/spot';
|
|
2
|
+
export { ISpot, ISpotSelectionParams } from './modules/spot';
|
|
3
|
+
import type { RMN_ENV } from './enums';
|
|
4
|
+
import type { ICreateSpotElementConfig, ISpot, ISpots, ISpotSelectionParams } from './modules/spot';
|
|
5
|
+
export interface IRmnClient {
|
|
6
|
+
spotSelection(data: ISpotSelectionParams): Promise<ISpots>;
|
|
7
|
+
createSpotElement(spot: ISpot, config?: ICreateSpotElementConfig): HTMLElement | null;
|
|
8
|
+
}
|
|
9
|
+
export interface IRmnConfig {
|
|
10
|
+
env: RMN_ENV;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquidcommercedev/rmn-sdk",
|
|
3
3
|
"description": "LiquidCommerce RMN SDK",
|
|
4
|
-
"author": "
|
|
5
|
-
"version": "1.4.
|
|
4
|
+
"author": "LiquidCommerce Tech",
|
|
5
|
+
"version": "1.4.2-beta.2",
|
|
6
6
|
"homepage": "https://docs.liquidcommerce.co/rmn-sdk",
|
|
7
|
-
"main": "./dist/index.
|
|
8
|
-
"module": "./dist/index.
|
|
9
|
-
"browser": "./
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.esm.js",
|
|
9
|
+
"browser": "./umd/liquidcommerce-rmn-sdk.min.js",
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"packageManager": "pnpm@9.5.0",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/types/index.d.ts",
|
|
16
|
+
"default": "./dist/index.esm.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/types/index.d.ts",
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"browser": {
|
|
23
|
+
"types": "./dist/types/index.d.ts",
|
|
24
|
+
"default": "./umd/liquidcommerce-rmn-sdk.min.js"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
11
28
|
"files": [
|
|
12
29
|
"dist",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
30
|
+
"umd",
|
|
31
|
+
"README.md"
|
|
15
32
|
],
|
|
16
33
|
"publishConfig": {
|
|
17
34
|
"access": "public"
|
|
@@ -19,7 +36,7 @@
|
|
|
19
36
|
"type": "module",
|
|
20
37
|
"sideEffects": false,
|
|
21
38
|
"scripts": {
|
|
22
|
-
"build": "rollup -c",
|
|
39
|
+
"build": "rollup -c --environment NODE_ENV:production",
|
|
23
40
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
24
41
|
"dev": "rollup -c --environment NODE_ENV:development -w",
|
|
25
42
|
"test": "vitest run",
|
|
@@ -28,7 +45,7 @@
|
|
|
28
45
|
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
29
46
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
30
47
|
"docs": "typedoc --out docs src",
|
|
31
|
-
"prepublishOnly": "
|
|
48
|
+
"prepublishOnly": "pnpm run build"
|
|
32
49
|
},
|
|
33
50
|
"keywords": [
|
|
34
51
|
"liquidcommerce",
|
|
@@ -65,14 +82,14 @@
|
|
|
65
82
|
"@types/crypto-js": "^4.2.2",
|
|
66
83
|
"@types/eslint__js": "^8.42.3",
|
|
67
84
|
"@types/jest": "^29.4.0",
|
|
68
|
-
"@types/node": "^20.
|
|
85
|
+
"@types/node": "^20.16.11",
|
|
69
86
|
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
|
70
87
|
"@typescript-eslint/parser": "^8.5.0",
|
|
71
88
|
"@vitest/coverage-v8": "^1.0.0",
|
|
72
89
|
"conventional-changelog-cli": "^5.0.0",
|
|
73
90
|
"crypto-js": "^4.2.0",
|
|
74
91
|
"dotenv": "^16.4.5",
|
|
75
|
-
"eslint": "^
|
|
92
|
+
"eslint": "^9.9.1",
|
|
76
93
|
"eslint-config-prettier": "^9.1.0",
|
|
77
94
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
78
95
|
"eslint-plugin-import": "^2.30.0",
|
|
@@ -82,13 +99,11 @@
|
|
|
82
99
|
"eslint-plugin-sonarjs": "^2.0.1",
|
|
83
100
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
84
101
|
"events": "^3.3.0",
|
|
85
|
-
"husky": "^9.1.5",
|
|
86
102
|
"jest": "^29.7.0",
|
|
87
103
|
"jest-environment-jsdom": "^29.4.3",
|
|
88
104
|
"prettier": "^3.3.3",
|
|
89
105
|
"process": "^0.11.10",
|
|
90
106
|
"rollup": "^4.21.0",
|
|
91
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
92
107
|
"rollup-plugin-livereload": "^2.0.5",
|
|
93
108
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
94
109
|
"rollup-plugin-serve": "^1.1.1",
|
|
@@ -104,5 +119,10 @@
|
|
|
104
119
|
},
|
|
105
120
|
"engines": {
|
|
106
121
|
"node": ">=20"
|
|
122
|
+
},
|
|
123
|
+
"pnpm": {
|
|
124
|
+
"peerDependencyRules": {
|
|
125
|
+
"ignoreMissing": []
|
|
126
|
+
}
|
|
107
127
|
}
|
|
108
128
|
}
|