@putkoff/abstract-utilities 0.1.115 → 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/read_utils/src/read_utils.d.ts +1 -9
- package/dist/cjs/index.js +28 -39
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/functions/read_utils/src/read_utils.d.ts +1 -9
- package/dist/esm/index.js +29 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/functions/read_utils/imports.d.ts +0 -3
- package/dist/functions/read_utils/src/read_utils.d.ts +1 -9
- package/dist/index.d.ts +2 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -277,20 +277,12 @@ declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig
|
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
279
|
* Reads a file at `relativeOrAbsolutePath` and returns its contents as a string.
|
|
280
|
+
* In a browser this will reject immediately.
|
|
280
281
|
*/
|
|
281
282
|
declare function readFileContents(relativeOrAbsolutePath: string): Promise<string>;
|
|
282
283
|
/**
|
|
283
284
|
* Reads a JSON file and returns the parsed object.
|
|
284
285
|
*/
|
|
285
286
|
declare function readJsonFile<T = any>(relativeOrAbsolutePath: string): Promise<T>;
|
|
286
|
-
/**
|
|
287
|
-
* Read a file and optionally parse it as JSON (and even pluck a field).
|
|
288
|
-
*
|
|
289
|
-
* @param filePath Path to your file (relative to cwd or absolute)
|
|
290
|
-
* @param asJson If true, JSON.parse the file.
|
|
291
|
-
* If a string, JSON.parse then return parsed[string].
|
|
292
|
-
* @returns The raw string, whole parsed object, or a specific field.
|
|
293
|
-
*/
|
|
294
|
-
declare function reader(filePath: string, asJson?: boolean | string): Promise<any>;
|
|
295
287
|
|
|
296
|
-
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,
|
|
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 };
|