@putkoff/abstract-utilities 0.1.114 → 0.1.116
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/functions/config_utils/imports.d.ts +1 -0
- package/dist/cjs/functions/config_utils/index.d.ts +1 -0
- package/dist/cjs/functions/config_utils/src/config_utils.d.ts +7 -0
- package/dist/cjs/functions/config_utils/src/index.d.ts +1 -0
- package/dist/cjs/functions/index.d.ts +2 -0
- package/dist/cjs/functions/read_utils/imports.d.ts +3 -0
- package/dist/cjs/functions/read_utils/index.d.ts +1 -0
- package/dist/cjs/functions/read_utils/src/index.d.ts +1 -0
- package/dist/cjs/functions/read_utils/src/read_utils.d.ts +9 -0
- package/dist/cjs/index.js +77 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/utils.d.ts +6 -0
- package/dist/esm/functions/config_utils/imports.d.ts +1 -0
- package/dist/esm/functions/config_utils/index.d.ts +1 -0
- package/dist/esm/functions/config_utils/src/config_utils.d.ts +7 -0
- package/dist/esm/functions/config_utils/src/index.d.ts +1 -0
- package/dist/esm/functions/index.d.ts +2 -0
- package/dist/esm/functions/read_utils/imports.d.ts +3 -0
- package/dist/esm/functions/read_utils/index.d.ts +1 -0
- package/dist/esm/functions/read_utils/src/index.d.ts +1 -0
- package/dist/esm/functions/read_utils/src/read_utils.d.ts +9 -0
- package/dist/esm/index.js +75 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/utils.d.ts +6 -0
- package/dist/functions/config_utils/imports.d.ts +1 -0
- package/dist/functions/config_utils/index.d.ts +1 -0
- package/dist/functions/config_utils/src/config_utils.d.ts +7 -0
- package/dist/functions/config_utils/src/index.d.ts +1 -0
- package/dist/functions/index.d.ts +2 -0
- package/dist/functions/read_utils/imports.d.ts +0 -0
- package/dist/functions/read_utils/index.d.ts +1 -0
- package/dist/functions/read_utils/src/index.d.ts +1 -0
- package/dist/functions/read_utils/src/read_utils.d.ts +9 -0
- package/dist/index.d.ts +24 -1
- package/dist/types/src/utils.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ interface ChangePasswordFormProps {
|
|
|
47
47
|
onCancel?: () => void;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
interface AppConfig {
|
|
51
|
+
BASE_URL: string;
|
|
52
|
+
BASE_API_URL: string;
|
|
53
|
+
FEATURE_FLAG?: boolean;
|
|
54
|
+
SOME_NUMBER?: number;
|
|
55
|
+
}
|
|
50
56
|
interface InputProps {
|
|
51
57
|
label?: any;
|
|
52
58
|
type?: any;
|
|
@@ -262,4 +268,21 @@ declare function Input({ label, trailing, ...rest }: React$1.InputHTMLAttributes
|
|
|
262
268
|
|
|
263
269
|
declare function Spinner(): react_jsx_runtime.JSX.Element;
|
|
264
270
|
|
|
265
|
-
|
|
271
|
+
/**
|
|
272
|
+
* getConfig(): load the full AppConfig
|
|
273
|
+
* getConfig(key): load just that key
|
|
274
|
+
*/
|
|
275
|
+
declare function getConfig(): Promise<AppConfig>;
|
|
276
|
+
declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Reads a file at `relativeOrAbsolutePath` and returns its contents as a string.
|
|
280
|
+
* In a browser this will reject immediately.
|
|
281
|
+
*/
|
|
282
|
+
declare function readFileContents(relativeOrAbsolutePath: string): Promise<string>;
|
|
283
|
+
/**
|
|
284
|
+
* Reads a JSON file and returns the parsed object.
|
|
285
|
+
*/
|
|
286
|
+
declare function readJsonFile<T = any>(relativeOrAbsolutePath: string): Promise<T>;
|
|
287
|
+
|
|
288
|
+
export { API_PREFIX, type ApiRow, type AppConfig, BASE_URL, Button, type ChangePasswordFormProps, type ChangePasswordProps, Checkbox, DEV_PREFIX, DOMAIN_NAME, type FetchVariables, type FileItem, type FileListResponse, Input, type InputProps, type JwtPayload, type LoginFormProps, type LoginProps, type LogoutButtonProps, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIt, fetchSharePatch, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getComponentsUtilsDirectory, getConfig, getDbConfigsPath, getDistDir, getEnvDir, getEnvPath, getFunctionsDir, getFunctionsUtilsDirectory, getHooksUtilsDirectory, getLibUtilsDirectory, getPublicDir, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, get_app_config_url, get_basename, get_dirname, get_extname, get_filename, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isTokenExpired, make_path, make_sanitized_path, normalizeUrl, readFileContents, readJsonFile, requestPatch, requireToken, sanitizeFilename, secureFetchIt, stripPrefixes, truncateString };
|