@ikas/storefront 0.0.162-alpha.13 → 0.0.162-alpha.14
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/index.es.js +7 -2
- package/build/index.js +7 -2
- package/build/utils/settings.d.ts +10 -10
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -38193,7 +38193,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
38193
38193
|
return __generator(this, function (_a) {
|
|
38194
38194
|
switch (_a.label) {
|
|
38195
38195
|
case 0:
|
|
38196
|
-
isLocal = process.env.
|
|
38196
|
+
isLocal = process.env.NEXT_PUBLIC_ENV === "local";
|
|
38197
38197
|
if (!isLocal) return [3 /*break*/, 3];
|
|
38198
38198
|
if (!IkasStorefrontConfig.storefrontId) {
|
|
38199
38199
|
console.error("Missing storefrontId in the config.json file!");
|
|
@@ -38272,9 +38272,14 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
38272
38272
|
return __generator(this, function (_b) {
|
|
38273
38273
|
switch (_b.label) {
|
|
38274
38274
|
case 0:
|
|
38275
|
-
isLocal = process.env.
|
|
38275
|
+
isLocal = process.env.NEXT_PUBLIC_ENV === "local";
|
|
38276
38276
|
isProdEditor = !isLocal && isEditor;
|
|
38277
38277
|
serverRuntimeConfig = getConfig().serverRuntimeConfig;
|
|
38278
|
+
if (isEditor) {
|
|
38279
|
+
return [2 /*return*/, {
|
|
38280
|
+
props: {},
|
|
38281
|
+
}];
|
|
38282
|
+
}
|
|
38278
38283
|
if (!!isProdEditor) return [3 /*break*/, 5];
|
|
38279
38284
|
locale = context.locale;
|
|
38280
38285
|
if (!locale) {
|
package/build/index.js
CHANGED
|
@@ -38171,7 +38171,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
38171
38171
|
return __generator(this, function (_a) {
|
|
38172
38172
|
switch (_a.label) {
|
|
38173
38173
|
case 0:
|
|
38174
|
-
isLocal = process.env.
|
|
38174
|
+
isLocal = process.env.NEXT_PUBLIC_ENV === "local";
|
|
38175
38175
|
if (!isLocal) return [3 /*break*/, 3];
|
|
38176
38176
|
if (!IkasStorefrontConfig.storefrontId) {
|
|
38177
38177
|
console.error("Missing storefrontId in the config.json file!");
|
|
@@ -38250,9 +38250,14 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
38250
38250
|
return __generator(this, function (_b) {
|
|
38251
38251
|
switch (_b.label) {
|
|
38252
38252
|
case 0:
|
|
38253
|
-
isLocal = process.env.
|
|
38253
|
+
isLocal = process.env.NEXT_PUBLIC_ENV === "local";
|
|
38254
38254
|
isProdEditor = !isLocal && isEditor;
|
|
38255
38255
|
serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
|
|
38256
|
+
if (isEditor) {
|
|
38257
|
+
return [2 /*return*/, {
|
|
38258
|
+
props: {},
|
|
38259
|
+
}];
|
|
38260
|
+
}
|
|
38256
38261
|
if (!!isProdEditor) return [3 /*break*/, 5];
|
|
38257
38262
|
locale = context.locale;
|
|
38258
38263
|
if (!locale) {
|
|
@@ -13,6 +13,10 @@ export declare class SettingsHelper {
|
|
|
13
13
|
static readSettingsFile(): Promise<any>;
|
|
14
14
|
static getSettings(locale: string): Promise<SettingsData | null>;
|
|
15
15
|
static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
|
|
16
|
+
props: {};
|
|
17
|
+
notFound?: undefined;
|
|
18
|
+
revalidate?: undefined;
|
|
19
|
+
} | {
|
|
16
20
|
props: {};
|
|
17
21
|
notFound: boolean;
|
|
18
22
|
revalidate?: undefined;
|
|
@@ -66,12 +70,12 @@ export declare class SettingsHelper {
|
|
|
66
70
|
};
|
|
67
71
|
revalidate: number;
|
|
68
72
|
notFound?: undefined;
|
|
69
|
-
}
|
|
73
|
+
}>;
|
|
74
|
+
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
|
|
70
75
|
props: {};
|
|
71
76
|
notFound?: undefined;
|
|
72
77
|
revalidate?: undefined;
|
|
73
|
-
}
|
|
74
|
-
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
|
|
78
|
+
} | {
|
|
75
79
|
props: {};
|
|
76
80
|
notFound: boolean;
|
|
77
81
|
revalidate?: undefined;
|
|
@@ -125,12 +129,12 @@ export declare class SettingsHelper {
|
|
|
125
129
|
};
|
|
126
130
|
revalidate: number;
|
|
127
131
|
notFound?: undefined;
|
|
128
|
-
}
|
|
132
|
+
}>;
|
|
133
|
+
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
129
134
|
props: {};
|
|
130
135
|
notFound?: undefined;
|
|
131
136
|
revalidate?: undefined;
|
|
132
|
-
}
|
|
133
|
-
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
137
|
+
} | {
|
|
134
138
|
props: {};
|
|
135
139
|
notFound: boolean;
|
|
136
140
|
revalidate?: undefined;
|
|
@@ -184,10 +188,6 @@ export declare class SettingsHelper {
|
|
|
184
188
|
};
|
|
185
189
|
revalidate: number;
|
|
186
190
|
notFound?: undefined;
|
|
187
|
-
} | {
|
|
188
|
-
props: {};
|
|
189
|
-
notFound?: undefined;
|
|
190
|
-
revalidate?: undefined;
|
|
191
191
|
}>;
|
|
192
192
|
}
|
|
193
193
|
export declare type SettingsData = {
|