@punks/backend-core 0.0.64 → 0.0.66
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/cjs/index.js +62 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/types/index.d.ts +1 -0
- package/dist/cjs/types/utils/index.d.ts +1 -0
- package/dist/cjs/types/utils/threading.d.ts +1 -0
- package/dist/cjs/types/utils/urls.d.ts +13 -0
- package/dist/esm/index.js +57 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/types/index.d.ts +1 -0
- package/dist/esm/types/utils/index.d.ts +1 -0
- package/dist/esm/types/utils/threading.d.ts +1 -0
- package/dist/esm/types/utils/urls.d.ts +13 -0
- package/dist/index.d.ts +17 -1
- package/package.json +1 -1
|
@@ -10,4 +10,5 @@ export * from "./threading";
|
|
|
10
10
|
export { buildTree, TreeNodeBuilder } from "./trees";
|
|
11
11
|
export * from "./mappings";
|
|
12
12
|
export * from "./uid";
|
|
13
|
+
export { serializeQueryString, buildUrl, deserializeQueryString, getQueryParameter, updateQueryParameters, } from "./urls";
|
|
13
14
|
export { ExcelSheetDefinition, ExcelKeyTransform, ExcelColumnDefinition as ExcelRowBuilder, ExcelParseOptions, excelBuild, excelParse, } from "./xls";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function serializeQueryString(obj: {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}): string;
|
|
4
|
+
export declare const buildUrl: (path: string, query: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}) => string;
|
|
7
|
+
export declare function deserializeQueryString(queryString: string): {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const getQueryParameter: (name: string, location?: Location) => any;
|
|
11
|
+
export declare const updateQueryParameters: (queryString: string, params: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ interface ITree<TKey, TValue> {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
type RichText = PortableTextBlock[];
|
|
150
|
+
type Optional<T> = T | undefined;
|
|
150
151
|
|
|
151
152
|
declare const range: (start: number, end: number) => number[];
|
|
152
153
|
declare const indexes: (startIndex: number, count: number) => number[];
|
|
@@ -235,6 +236,7 @@ declare const jsonSerialize: (obj: any, options?: {
|
|
|
235
236
|
declare const pluralize: (word: string) => string;
|
|
236
237
|
|
|
237
238
|
declare function sleep(ms: number): Promise<unknown>;
|
|
239
|
+
declare const mapAsync: <T, R>(array: T[], callback: (value: T, index: number, array: T[]) => Promise<R>) => Promise<R[]>;
|
|
238
240
|
|
|
239
241
|
type TreeNodeBuilder<TKey, TRecord, TTreeNode extends ITreeNode<TKey, TRecord>> = {
|
|
240
242
|
idSelector: (record: TRecord) => TKey;
|
|
@@ -250,6 +252,20 @@ declare const mapOrThrow: <T>({ mapper, throw: throwFn, }: {
|
|
|
250
252
|
|
|
251
253
|
declare const newUuid: () => string;
|
|
252
254
|
|
|
255
|
+
declare function serializeQueryString(obj: {
|
|
256
|
+
[key: string]: any;
|
|
257
|
+
}): string;
|
|
258
|
+
declare const buildUrl: (path: string, query: {
|
|
259
|
+
[key: string]: any;
|
|
260
|
+
}) => string;
|
|
261
|
+
declare function deserializeQueryString(queryString: string): {
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
};
|
|
264
|
+
declare const getQueryParameter: (name: string, location?: Location) => any;
|
|
265
|
+
declare const updateQueryParameters: (queryString: string, params: {
|
|
266
|
+
[key: string]: any;
|
|
267
|
+
}) => string;
|
|
268
|
+
|
|
253
269
|
interface ExcelColumnDefinition<T> {
|
|
254
270
|
value: (row: T) => any;
|
|
255
271
|
header: string;
|
|
@@ -271,4 +287,4 @@ type ExcelParseOptions = {
|
|
|
271
287
|
};
|
|
272
288
|
declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any[];
|
|
273
289
|
|
|
274
|
-
export { AppServiceReference, CsvColumnDefinition as ColumnDefinition, ConsoleLogger, CsvBuildOptions, DatadogLogger, Dict, ExcelKeyTransform, ExcelParseOptions, ExcelColumnDefinition as ExcelRowBuilder, ExcelSheetDefinition, FileLogger, ILogger, ILoggerProvider, IResolveServiceOptions, IServiceLocator, ITree, ITreeNode, LocalizedField, Log, LogLevel, MetaSerializationType, RichText, TimeUnit, TreeNodeBuilder, addTime, buildObject, buildTree, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim, trimEnd, trimStart };
|
|
290
|
+
export { AppServiceReference, CsvColumnDefinition as ColumnDefinition, ConsoleLogger, CsvBuildOptions, DatadogLogger, Dict, ExcelKeyTransform, ExcelParseOptions, ExcelColumnDefinition as ExcelRowBuilder, ExcelSheetDefinition, FileLogger, ILogger, ILoggerProvider, IResolveServiceOptions, IServiceLocator, ITree, ITreeNode, LocalizedField, Log, LogLevel, MetaSerializationType, Optional, RichText, TimeUnit, TreeNodeBuilder, addTime, buildObject, buildTree, buildUrl, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, deserializeQueryString, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapAsync, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, serializeQueryString, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim, trimEnd, trimStart, updateQueryParameters };
|