@localazy/cdn-client 1.2.1 → 1.3.0
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/browser/localazy-cdn-client.umd.js +49 -1864
- package/dist/browser/localazy-cdn-client.umd.js.map +1 -1
- package/dist/browser/localazy-cdn-client.umd.min.js +3 -3
- package/dist/browser/localazy-cdn-client.umd.min.js.map +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/localazy-cdn-client.js +48 -1863
- package/dist/localazy-cdn-client.js.map +1 -1
- package/dist/localazy-cdn-client.min.js +3 -3
- package/dist/localazy-cdn-client.min.js.map +1 -1
- package/dist/node/localazy-cdn-client.cjs +47 -1862
- package/dist/node/localazy-cdn-client.cjs.map +1 -1
- package/dist/node/localazy-cdn-client.min.cjs +3 -3
- package/dist/node/localazy-cdn-client.min.cjs.map +1 -1
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -168,24 +168,15 @@ export declare type CdnLocalesOptions = {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
export declare class CdnMetafile extends CdnBase {
|
|
171
|
-
files: CdnMetafileFiles;
|
|
172
|
-
constructor(context: Context);
|
|
173
171
|
get projectUrl(): string;
|
|
174
172
|
get baseLocale(): CdnLocale;
|
|
175
173
|
get url(): string;
|
|
174
|
+
get files(): CdnFile[];
|
|
176
175
|
locales: (options?: CdnLocalesOptions) => CdnLocale[];
|
|
177
176
|
refresh: () => Promise<void>;
|
|
178
177
|
switch: (options: CdnClientOptions) => Promise<void>;
|
|
179
178
|
}
|
|
180
179
|
|
|
181
|
-
export declare class CdnMetafileFiles extends CdnBase {
|
|
182
|
-
list: () => CdnFile[];
|
|
183
|
-
filter: (options: CdnFilesSearchOptions) => CdnFile[];
|
|
184
|
-
find: (options: CdnFilesSearchOptions) => CdnFile | undefined;
|
|
185
|
-
first: () => CdnFile;
|
|
186
|
-
protected static transformFiles: (files: MetafileFile[]) => CdnFile[];
|
|
187
|
-
}
|
|
188
|
-
|
|
189
180
|
export declare type CdnResponse =
|
|
190
181
|
/**
|
|
191
182
|
* Map of file IDs with locales map as value.
|
|
@@ -309,6 +300,14 @@ export declare interface IRequestBuilder {
|
|
|
309
300
|
getCdnRequest(): Request_2;
|
|
310
301
|
}
|
|
311
302
|
|
|
303
|
+
export declare const isArray: <T>(value: unknown) => value is T[];
|
|
304
|
+
|
|
305
|
+
export declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
|
|
306
|
+
|
|
307
|
+
export declare const isString: (value: unknown) => value is string;
|
|
308
|
+
|
|
309
|
+
export declare const isUndefined: (value: unknown) => value is undefined;
|
|
310
|
+
|
|
312
311
|
export declare type JsonResponse = {
|
|
313
312
|
[key: string]: Record<string, object>;
|
|
314
313
|
};
|
|
@@ -460,4 +459,8 @@ export declare type ResponseFactoryOptions = {
|
|
|
460
459
|
hasSingleLocaleResponse: boolean;
|
|
461
460
|
};
|
|
462
461
|
|
|
462
|
+
export declare const uniq: <T>(array: T[]) => T[];
|
|
463
|
+
|
|
464
|
+
export declare const uniqBy: <T>(array: T[], predicate: (item: T) => string) => T[];
|
|
465
|
+
|
|
463
466
|
export { }
|