@putkoff/abstract-utilities 0.1.200 → 0.1.202

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/index.d.ts CHANGED
@@ -343,13 +343,10 @@ declare function Input({ label, trailing, ...rest }: React$1.InputHTMLAttributes
343
343
 
344
344
  declare function Spinner(): react_jsx_runtime.JSX.Element;
345
345
 
346
- declare function loadConfig(filePath?: string | null): Promise<AppConfig>;
347
346
  /**
348
- * getConfig(): Promise<AppConfig>
349
- * getConfig(key): Promise<AppConfig[K]>
347
+ * Attempt to load config.json if present, otherwise return empty object.
350
348
  */
351
- declare function getConfig(): Promise<AppConfig>;
352
- declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
349
+ declare function getConfigJson(): Promise<Record<string, any>>;
353
350
 
354
351
  /**
355
352
  * Processes keywords by checking if keywords is a string and splitting it.
@@ -367,5 +364,5 @@ declare function processKeywords(keywords: string | string[]): string[];
367
364
  */
368
365
  declare function get_keyword_string(keywords: any): string;
369
366
 
370
- export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, assureArray, assureString, callStorage, callWindowMethod, checkResponse, cleanArray, cleanText, create_list_string, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getCleanArray, getComponentsUtilsDirectory, getConfig, getConfigContent, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMethod, getPublicDir, getResult, getSafeDocument, getSafeLocalStorage, getSafeWindow, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, getWindowHost, getWindowProp, get_basename, get_dirname, get_extname, get_filename, get_key_value, get_keyword_string, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isTokenExpired, loadConfig, make_path, make_sanitized_path, normalizeUrl, parseResult, processKeywords, readJsonFile, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
367
+ export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, assureArray, assureString, callStorage, callWindowMethod, checkResponse, cleanArray, cleanText, create_list_string, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getCleanArray, getComponentsUtilsDirectory, getConfigContent, getConfigJson, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMethod, getPublicDir, getResult, getSafeDocument, getSafeLocalStorage, getSafeWindow, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, getWindowHost, getWindowProp, get_basename, get_dirname, get_extname, get_filename, get_key_value, get_keyword_string, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isTokenExpired, make_path, make_sanitized_path, normalizeUrl, parseResult, processKeywords, readJsonFile, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
371
368
  export type { ApiRow, AppConfig, ChangePasswordFormProps, ChangePasswordProps, FetchVariables, FileItem, FileListResponse, InputProps, JwtPayload, LoginFormProps, LoginProps, LogoutButtonProps, Promise$1 as Promise, UrlKey };
@@ -1,8 +1,4 @@
1
- import type { AppConfig } from "./../imports";
2
- export declare function loadConfig(filePath?: string | null): Promise<AppConfig>;
3
1
  /**
4
- * getConfig(): Promise<AppConfig>
5
- * getConfig(key): Promise<AppConfig[K]>
2
+ * Attempt to load config.json if present, otherwise return empty object.
6
3
  */
7
- export declare function getConfig(): Promise<AppConfig>;
8
- export declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
4
+ export declare function getConfigJson(): Promise<Record<string, any>>;
package/package.json CHANGED
@@ -1,17 +1,10 @@
1
1
  {
2
2
  "name": "@putkoff/abstract-utilities",
3
- "version": "0.1.200",
3
+ "version": "0.1.202",
4
4
  "description": "A reusable React Login component with JWT authentication",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/index.d.ts",
8
- "keywords": [
9
- "react",
10
- "login",
11
- "component",
12
- "jwt",
13
- "authentication"
14
- ],
15
8
  "peerDependencies": {
16
9
  "react": "^17.0.0 || ^18.0.0",
17
10
  "react-dom": "^17.0.0 || ^18.0.0"
@@ -43,13 +36,6 @@
43
36
  "tsx": "^4.20.3",
44
37
  "typescript": "^5.3.3"
45
38
  },
46
- "include": [
47
- "src/**/*"
48
- ],
49
- "exclude": [
50
- "node_modules",
51
- "dist"
52
- ],
53
39
  "exports": {
54
40
  ".": {
55
41
  "import": "./dist/esm/index.js",
@@ -62,9 +48,6 @@
62
48
  "src/components/Login/login_style.css",
63
49
  "src/components/ChangePassword/change_password.css"
64
50
  ],
65
- "ts-node": {
66
- "esm": true
67
- },
68
51
  "scripts": {
69
52
  "build": "tsc --emitDeclarationOnly && rollup -c",
70
53
  "test": "jest",