@websolutespa/bom-mixer-store 1.7.1 → 1.7.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
- package/src/remote/remote.api.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -152,6 +152,7 @@ declare class RemotePageService<T extends ICategorized = ICategorized> extends R
|
|
|
152
152
|
protected decorateMany_<B extends T = T>(items: B[], params?: QueryParams): Promise<B[]>;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
declare function getRemoteApiUrl(pathname: string): string;
|
|
155
156
|
declare function remoteApiFetch<T = unknown>(pathname: string, options?: ApiRequestOptions): Promise<T>;
|
|
156
157
|
declare function remoteApiGet<T = unknown>(url: string, options?: ApiRequestOptions): Promise<T>;
|
|
157
158
|
declare function remoteApiPost<T = unknown>(url: string, payload: unknown, options?: ApiRequestOptions): Promise<T>;
|
|
@@ -235,4 +236,4 @@ declare function findRoute(store: IStore, pathname: string, href: string, hrefBe
|
|
|
235
236
|
|
|
236
237
|
declare function getStore<T extends IStore>(): Promise<T>;
|
|
237
238
|
|
|
238
|
-
export { ApiRequestOptions, BuildStrategy, COLLECTIONS, IApiHandler, ICrudMethod, IField, IHandler, IPageResolvedRelation, KNOWN_COLLECTIONS, MAX_INT, MOCK_COLLECTIONS, MapTo, MockMenuService, MockPageService, MockService, NextPhase, RemoteMenuService, RemotePageService, RemoteService, RemoteServiceStrategy, SERVICE_DEFAULT_DEPTH, STATIC_COLLECTIONS, StaticService, StaticServiceConfig, StaticServiceSrc, StoreStrategy, apiHandler, buildStrategy, collectionDelete, collectionGet, collectionPatch, collectionPost, decorateCategories_, decorateCategory_, decorateHref_, decorateHrefs_, decorateLocalizable_, decorateLocalizables_, decorateMenu_, decorateMenus_, decorateNav_, decorateNavs_, decorateRelation_, decorateRelations_, decorateSchema_, decorateSchemas_, decorateStaticRelation_, decorateStaticRelations_, defaultApiRequestOptions, errorHandler, findRoute, fromCache, getDefaultApiRequestOptions, getLocalApiUrl, getMockStore, getMockStoreFromData_, getRemoteStore, getStore, isApiRequest, isNextRequest, isStaticRequest, localApiDelete, localApiFetch, localApiGet, localApiPatch, localApiPost, localApiPut, mockApiDelete, mockApiFetch, mockApiGet, mockApiPatch, mockApiPost, mockApiPut, mockHandler, nextPhase, optimizeMany_, optimizeOne_, remoteApiDelete, remoteApiFetch, remoteApiGet, remoteApiPatch, remoteApiPost, remoteApiPut, routePost, staticCollections, storeApiDelete, storeApiGet, storeApiPatch, storeApiPost, storeApiPut, storeCacheDuration, storeHandler, storeIndexHandler, storeStrategy };
|
|
239
|
+
export { ApiRequestOptions, BuildStrategy, COLLECTIONS, IApiHandler, ICrudMethod, IField, IHandler, IPageResolvedRelation, KNOWN_COLLECTIONS, MAX_INT, MOCK_COLLECTIONS, MapTo, MockMenuService, MockPageService, MockService, NextPhase, RemoteMenuService, RemotePageService, RemoteService, RemoteServiceStrategy, SERVICE_DEFAULT_DEPTH, STATIC_COLLECTIONS, StaticService, StaticServiceConfig, StaticServiceSrc, StoreStrategy, apiHandler, buildStrategy, collectionDelete, collectionGet, collectionPatch, collectionPost, decorateCategories_, decorateCategory_, decorateHref_, decorateHrefs_, decorateLocalizable_, decorateLocalizables_, decorateMenu_, decorateMenus_, decorateNav_, decorateNavs_, decorateRelation_, decorateRelations_, decorateSchema_, decorateSchemas_, decorateStaticRelation_, decorateStaticRelations_, defaultApiRequestOptions, errorHandler, findRoute, fromCache, getDefaultApiRequestOptions, getLocalApiUrl, getMockStore, getMockStoreFromData_, getRemoteApiUrl, getRemoteStore, getStore, isApiRequest, isNextRequest, isStaticRequest, localApiDelete, localApiFetch, localApiGet, localApiPatch, localApiPost, localApiPut, mockApiDelete, mockApiFetch, mockApiGet, mockApiPatch, mockApiPost, mockApiPut, mockHandler, nextPhase, optimizeMany_, optimizeOne_, remoteApiDelete, remoteApiFetch, remoteApiGet, remoteApiPatch, remoteApiPost, remoteApiPut, routePost, staticCollections, storeApiDelete, storeApiGet, storeApiPatch, storeApiPost, storeApiPut, storeCacheDuration, storeHandler, storeIndexHandler, storeStrategy };
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ __export(src_exports, {
|
|
|
77
77
|
getLocalApiUrl: () => getLocalApiUrl,
|
|
78
78
|
getMockStore: () => getMockStore,
|
|
79
79
|
getMockStoreFromData_: () => getMockStoreFromData_,
|
|
80
|
+
getRemoteApiUrl: () => getRemoteApiUrl,
|
|
80
81
|
getRemoteStore: () => getRemoteStore,
|
|
81
82
|
getStore: () => getStore,
|
|
82
83
|
isApiRequest: () => isApiRequest,
|
|
@@ -2076,6 +2077,7 @@ async function storeApiDelete(url, options = {}) {
|
|
|
2076
2077
|
getLocalApiUrl,
|
|
2077
2078
|
getMockStore,
|
|
2078
2079
|
getMockStoreFromData_,
|
|
2080
|
+
getRemoteApiUrl,
|
|
2079
2081
|
getRemoteStore,
|
|
2080
2082
|
getStore,
|
|
2081
2083
|
isApiRequest,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
package/src/remote/remote.api.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { ApiRequestOptions, getDefaultApiRequestOptions } from '../api/api';
|
|
|
8
8
|
const API_URL = process.env.STORE_URL;
|
|
9
9
|
const API_BASE = process.env.STORE_API || '/api';
|
|
10
10
|
|
|
11
|
-
function getRemoteApiUrl(pathname: string): string {
|
|
11
|
+
export function getRemoteApiUrl(pathname: string): string {
|
|
12
12
|
let url = `${API_URL}${API_BASE}${pathname}`;
|
|
13
13
|
// !!! node 18 issue -> require('dns').setDefaultResultOrder('ipv4first');
|
|
14
14
|
url = isBrowser ? url : url.replace('://localhost', '://127.0.0.1');
|