@putkoff/abstract-utilities 0.1.118 → 0.1.122
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/auth_utils/imports.d.ts +0 -0
- package/dist/cjs/functions/auth_utils/index.d.ts +0 -0
- package/dist/cjs/functions/auth_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/auth_utils/src/token_utils.d.ts +0 -0
- package/dist/cjs/functions/config_utils/imports.d.ts +0 -0
- package/dist/cjs/functions/config_utils/index.d.ts +0 -0
- package/dist/cjs/functions/config_utils/src/config_utils.d.ts +0 -0
- package/dist/cjs/functions/config_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/constants_utils/index.d.ts +0 -0
- package/dist/cjs/functions/constants_utils/src/constants.d.ts +0 -0
- package/dist/cjs/functions/constants_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/env_utils/imports.d.ts +0 -0
- package/dist/cjs/functions/env_utils/index.d.ts +0 -0
- package/dist/cjs/functions/env_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/env_utils/src/window_utils.d.ts +0 -0
- package/dist/cjs/functions/fetch_utils/imports.d.ts +1 -1
- package/dist/cjs/functions/fetch_utils/index.d.ts +0 -0
- package/dist/cjs/functions/fetch_utils/src/fetchIt_utils.d.ts +1 -1
- package/dist/cjs/functions/fetch_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/fetch_utils/src/utils.d.ts +0 -0
- package/dist/cjs/functions/index.d.ts +0 -0
- package/dist/cjs/functions/path_utils/imports.d.ts +3 -2
- package/dist/cjs/functions/path_utils/index.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/base_dirs.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/function_dirs.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/misc_dirs.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/path_utils.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/paths.d.ts +0 -0
- package/dist/cjs/functions/path_utils/src/src_dirs.d.ts +0 -0
- package/dist/cjs/functions/read_utils/index.d.ts +0 -0
- package/dist/cjs/functions/read_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/read_utils/src/read_utils.d.ts +0 -0
- package/dist/cjs/functions/rndm_utils/index.d.ts +0 -0
- package/dist/cjs/functions/rndm_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/rndm_utils/src/utils.d.ts +0 -0
- package/dist/cjs/functions/string_utils/index.d.ts +0 -0
- package/dist/cjs/functions/string_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/string_utils/src/string_utils.d.ts +0 -0
- package/dist/cjs/functions/type_utils/index.d.ts +0 -0
- package/dist/cjs/functions/type_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/type_utils/src/type_utils.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/imports.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/index.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/src/button.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/src/checkbox.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/src/index.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/src/input.d.ts +0 -0
- package/dist/cjs/functions/ui_utils/src/spinner.d.ts +0 -0
- package/dist/cjs/index.d.ts +0 -0
- package/dist/cjs/index.js +62 -52
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/index.d.ts +0 -0
- package/dist/cjs/types/src/ChangePassword.d.ts +0 -0
- package/dist/cjs/types/src/Files.d.ts +0 -0
- package/dist/cjs/types/src/index.d.ts +0 -0
- package/dist/cjs/types/src/login.d.ts +0 -0
- package/dist/cjs/types/src/logout.d.ts +0 -0
- package/dist/cjs/types/src/utils.d.ts +0 -0
- package/dist/cjs/utils/imports.d.ts +0 -0
- package/dist/cjs/utils/index.d.ts +0 -0
- package/dist/cjs/utils/src/Input.d.ts +0 -0
- package/dist/cjs/utils/src/config.d.ts +0 -0
- package/dist/cjs/utils/src/index.d.ts +0 -0
- package/dist/esm/functions/auth_utils/imports.d.ts +0 -0
- package/dist/esm/functions/auth_utils/index.d.ts +0 -0
- package/dist/esm/functions/auth_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/auth_utils/src/token_utils.d.ts +0 -0
- package/dist/esm/functions/config_utils/imports.d.ts +0 -0
- package/dist/esm/functions/config_utils/index.d.ts +0 -0
- package/dist/esm/functions/config_utils/src/config_utils.d.ts +0 -0
- package/dist/esm/functions/config_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/constants_utils/index.d.ts +0 -0
- package/dist/esm/functions/constants_utils/src/constants.d.ts +0 -0
- package/dist/esm/functions/constants_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/env_utils/imports.d.ts +0 -0
- package/dist/esm/functions/env_utils/index.d.ts +0 -0
- package/dist/esm/functions/env_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/env_utils/src/window_utils.d.ts +0 -0
- package/dist/esm/functions/fetch_utils/imports.d.ts +1 -1
- package/dist/esm/functions/fetch_utils/index.d.ts +0 -0
- package/dist/esm/functions/fetch_utils/src/fetchIt_utils.d.ts +1 -1
- package/dist/esm/functions/fetch_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/fetch_utils/src/utils.d.ts +0 -0
- package/dist/esm/functions/index.d.ts +0 -0
- package/dist/esm/functions/path_utils/imports.d.ts +3 -2
- package/dist/esm/functions/path_utils/index.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/base_dirs.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/function_dirs.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/misc_dirs.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/path_utils.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/paths.d.ts +0 -0
- package/dist/esm/functions/path_utils/src/src_dirs.d.ts +0 -0
- package/dist/esm/functions/read_utils/index.d.ts +0 -0
- package/dist/esm/functions/read_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/read_utils/src/read_utils.d.ts +0 -0
- package/dist/esm/functions/rndm_utils/index.d.ts +0 -0
- package/dist/esm/functions/rndm_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/rndm_utils/src/utils.d.ts +0 -0
- package/dist/esm/functions/string_utils/index.d.ts +0 -0
- package/dist/esm/functions/string_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/string_utils/src/string_utils.d.ts +0 -0
- package/dist/esm/functions/type_utils/index.d.ts +0 -0
- package/dist/esm/functions/type_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/type_utils/src/type_utils.d.ts +0 -0
- package/dist/esm/functions/ui_utils/imports.d.ts +0 -0
- package/dist/esm/functions/ui_utils/index.d.ts +0 -0
- package/dist/esm/functions/ui_utils/src/button.d.ts +0 -0
- package/dist/esm/functions/ui_utils/src/checkbox.d.ts +0 -0
- package/dist/esm/functions/ui_utils/src/index.d.ts +0 -0
- package/dist/esm/functions/ui_utils/src/input.d.ts +0 -0
- package/dist/esm/functions/ui_utils/src/spinner.d.ts +0 -0
- package/dist/esm/index.d.ts +0 -0
- package/dist/esm/index.js +62 -52
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +0 -0
- package/dist/esm/types/src/ChangePassword.d.ts +0 -0
- package/dist/esm/types/src/Files.d.ts +0 -0
- package/dist/esm/types/src/index.d.ts +0 -0
- package/dist/esm/types/src/login.d.ts +0 -0
- package/dist/esm/types/src/logout.d.ts +0 -0
- package/dist/esm/types/src/utils.d.ts +0 -0
- package/dist/esm/utils/imports.d.ts +0 -0
- package/dist/esm/utils/index.d.ts +0 -0
- package/dist/esm/utils/src/Input.d.ts +0 -0
- package/dist/esm/utils/src/config.d.ts +0 -0
- package/dist/esm/utils/src/index.d.ts +0 -0
- package/dist/functions/auth_utils/imports.d.ts +0 -0
- package/dist/functions/auth_utils/imports.js +1 -0
- package/dist/functions/auth_utils/index.d.ts +0 -0
- package/dist/functions/auth_utils/index.js +1 -0
- package/dist/functions/auth_utils/src/index.d.ts +0 -0
- package/dist/functions/auth_utils/src/index.js +1 -0
- package/dist/functions/auth_utils/src/token_utils.d.ts +0 -0
- package/dist/functions/auth_utils/src/token_utils.js +95 -0
- package/dist/functions/config_utils/imports.d.ts +0 -0
- package/dist/functions/config_utils/imports.js +1 -0
- package/dist/functions/config_utils/index.d.ts +0 -0
- package/dist/functions/config_utils/index.js +1 -0
- package/dist/functions/config_utils/src/config_utils.d.ts +0 -0
- package/dist/functions/config_utils/src/config_utils.js +33 -0
- package/dist/functions/config_utils/src/index.d.ts +0 -0
- package/dist/functions/config_utils/src/index.js +1 -0
- package/dist/functions/constants_utils/index.d.ts +0 -0
- package/dist/functions/constants_utils/index.js +1 -0
- package/dist/functions/constants_utils/src/constants.d.ts +0 -0
- package/dist/functions/constants_utils/src/constants.js +7 -0
- package/dist/functions/constants_utils/src/index.d.ts +0 -0
- package/dist/functions/constants_utils/src/index.js +1 -0
- package/dist/functions/env_utils/imports.d.ts +0 -0
- package/dist/functions/env_utils/imports.js +1 -0
- package/dist/functions/env_utils/index.d.ts +0 -0
- package/dist/functions/env_utils/index.js +1 -0
- package/dist/functions/env_utils/src/index.d.ts +0 -0
- package/dist/functions/env_utils/src/index.js +1 -0
- package/dist/functions/env_utils/src/window_utils.d.ts +0 -0
- package/dist/functions/env_utils/src/window_utils.js +47 -0
- package/dist/functions/fetch_utils/imports.d.ts +1 -1
- package/dist/functions/fetch_utils/imports.js +7 -0
- package/dist/functions/fetch_utils/index.d.ts +0 -0
- package/dist/functions/fetch_utils/index.js +1 -0
- package/dist/functions/fetch_utils/src/fetchIt_utils.d.ts +1 -1
- package/dist/functions/fetch_utils/src/fetchIt_utils.js +116 -0
- package/dist/functions/fetch_utils/src/index.d.ts +0 -0
- package/dist/functions/fetch_utils/src/index.js +1 -0
- package/dist/functions/fetch_utils/src/utils.d.ts +0 -0
- package/dist/functions/fetch_utils/src/utils.js +171 -0
- package/dist/functions/index.d.ts +0 -0
- package/dist/functions/index.js +12 -0
- package/dist/functions/path_utils/imports.d.ts +3 -2
- package/dist/functions/path_utils/imports.js +26 -0
- package/dist/functions/path_utils/index.d.ts +0 -0
- package/dist/functions/path_utils/index.js +1 -0
- package/dist/functions/path_utils/src/base_dirs.d.ts +0 -0
- package/dist/functions/path_utils/src/base_dirs.js +17 -0
- package/dist/functions/path_utils/src/function_dirs.d.ts +0 -0
- package/dist/functions/path_utils/src/function_dirs.js +42 -0
- package/dist/functions/path_utils/src/index.d.ts +0 -0
- package/dist/functions/path_utils/src/index.js +6 -0
- package/dist/functions/path_utils/src/misc_dirs.d.ts +0 -0
- package/dist/functions/path_utils/src/misc_dirs.js +15 -0
- package/dist/functions/path_utils/src/path_utils.d.ts +0 -0
- package/dist/functions/path_utils/src/path_utils.js +75 -0
- package/dist/functions/path_utils/src/paths.d.ts +0 -0
- package/dist/functions/path_utils/src/paths.js +12 -0
- package/dist/functions/path_utils/src/src_dirs.d.ts +0 -0
- package/dist/functions/path_utils/src/src_dirs.js +25 -0
- package/dist/functions/read_utils/imports.d.ts +0 -0
- package/dist/functions/read_utils/imports.js +1 -0
- package/dist/functions/read_utils/index.d.ts +0 -0
- package/dist/functions/read_utils/index.js +1 -0
- package/dist/functions/read_utils/src/index.d.ts +0 -0
- package/dist/functions/read_utils/src/index.js +1 -0
- package/dist/functions/read_utils/src/read_utils.d.ts +0 -0
- package/dist/functions/read_utils/src/read_utils.js +55 -0
- package/dist/functions/rndm_utils/imports.d.ts +0 -0
- package/dist/functions/rndm_utils/imports.js +1 -0
- package/dist/functions/rndm_utils/index.d.ts +0 -0
- package/dist/functions/rndm_utils/index.js +1 -0
- package/dist/functions/rndm_utils/src/index.d.ts +0 -0
- package/dist/functions/rndm_utils/src/index.js +1 -0
- package/dist/functions/rndm_utils/src/utils.d.ts +0 -0
- package/dist/functions/rndm_utils/src/utils.js +12 -0
- package/dist/functions/string_utils/index.d.ts +0 -0
- package/dist/functions/string_utils/index.js +1 -0
- package/dist/functions/string_utils/src/index.d.ts +0 -0
- package/dist/functions/string_utils/src/index.js +1 -0
- package/dist/functions/string_utils/src/string_utils.d.ts +0 -0
- package/dist/functions/string_utils/src/string_utils.js +113 -0
- package/dist/functions/type_utils/imports.d.ts +0 -0
- package/dist/functions/type_utils/imports.js +1 -0
- package/dist/functions/type_utils/index.d.ts +0 -0
- package/dist/functions/type_utils/index.js +1 -0
- package/dist/functions/type_utils/src/index.d.ts +0 -0
- package/dist/functions/type_utils/src/index.js +1 -0
- package/dist/functions/type_utils/src/type_utils.d.ts +0 -0
- package/dist/functions/type_utils/src/type_utils.js +4 -0
- package/dist/functions/ui_utils/imports.d.ts +0 -0
- package/dist/functions/ui_utils/imports.js +5 -0
- package/dist/functions/ui_utils/index.d.ts +0 -0
- package/dist/functions/ui_utils/index.js +1 -0
- package/dist/functions/ui_utils/src/button.d.ts +0 -0
- package/dist/functions/ui_utils/src/button.js +32 -0
- package/dist/functions/ui_utils/src/checkbox.d.ts +0 -0
- package/dist/functions/ui_utils/src/checkbox.js +16 -0
- package/dist/functions/ui_utils/src/index.d.ts +0 -0
- package/dist/functions/ui_utils/src/index.js +4 -0
- package/dist/functions/ui_utils/src/input.d.ts +0 -0
- package/dist/functions/ui_utils/src/input.js +16 -0
- package/dist/functions/ui_utils/src/spinner.d.ts +0 -0
- package/dist/functions/ui_utils/src/spinner.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.js +1 -0
- package/dist/types/src/ChangePassword.d.ts +0 -0
- package/dist/types/src/ChangePassword.js +1 -0
- package/dist/types/src/Files.d.ts +0 -0
- package/dist/types/src/Files.js +1 -0
- package/dist/types/src/index.d.ts +0 -0
- package/dist/types/src/index.js +5 -0
- package/dist/types/src/login.d.ts +0 -0
- package/dist/types/src/login.js +1 -0
- package/dist/types/src/logout.d.ts +0 -0
- package/dist/types/src/logout.js +1 -0
- package/dist/types/src/utils.d.ts +0 -0
- package/dist/types/src/utils.js +1 -0
- package/dist/utils/imports.d.ts +0 -0
- package/dist/utils/imports.js +1 -0
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/src/Input.d.ts +0 -0
- package/dist/utils/src/Input.js +2 -0
- package/dist/utils/src/config.d.ts +0 -0
- package/dist/utils/src/config.js +20 -0
- package/dist/utils/src/index.d.ts +0 -0
- package/dist/utils/src/index.js +2 -0
- package/package.json +8 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,5 +4,5 @@ export { stripPrefixes } from './../string_utils';
|
|
|
4
4
|
export { alertit } from './../rndm_utils';
|
|
5
5
|
export { ensure_list } from './../type_utils';
|
|
6
6
|
export { eatInner } from './../string_utils';
|
|
7
|
-
export type { LogoutButtonProps, FetchVariables } from './../../types';
|
|
7
|
+
export type { LogoutButtonProps, FetchVariables, AppConfig } from './../../types';
|
|
8
8
|
export { getConfig } from './../config_utils';
|
|
File without changes
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
/** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
|
|
10
|
-
export declare function get_app_config_url(endpoint:
|
|
10
|
+
export declare function get_app_config_url(endpoint: string, appKey?: any): Promise<string>;
|
|
11
11
|
export declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
|
|
12
12
|
export declare function secureFetchIt<T>(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<T>;
|
|
13
13
|
export declare function secureFetchIt(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<Blob>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* In the browser we already have a WHATWG URL constructor on window.
|
|
3
3
|
* Here we re-export it as “url” so other modules can import it.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
declare const _url: {
|
|
6
6
|
new (url: string | URL, base?: string | URL): URL;
|
|
7
7
|
prototype: URL;
|
|
8
8
|
canParse(url: string | URL, base?: string | URL): boolean;
|
|
9
9
|
createObjectURL(obj: Blob | MediaSource): string;
|
|
10
10
|
parse(url: string | URL, base?: string | URL): URL | null;
|
|
11
11
|
revokeObjectURL(url: string): void;
|
|
12
|
-
};
|
|
12
|
+
} | undefined;
|
|
13
|
+
export { _url as url };
|
|
13
14
|
/**
|
|
14
15
|
* Minimal fileURLToPath implementation for browser-side code.
|
|
15
16
|
* If you only ever need to strip off “file://” in development, this is enough.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/esm/index.d.ts
CHANGED
|
File without changes
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
export { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
+
/******************************************************************************
|
|
5
|
+
Copyright (c) Microsoft Corporation.
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
***************************************************************************** */
|
|
18
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
function __rest(s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
44
|
+
var e = new Error(message);
|
|
45
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
46
|
+
};
|
|
47
|
+
|
|
4
48
|
/**
|
|
5
49
|
***Changes**:
|
|
6
50
|
*- Updated import path for `InputProps` to `../../types/interfaces`.
|
|
@@ -152,50 +196,6 @@ function get_window_parts() {
|
|
|
152
196
|
return null;
|
|
153
197
|
}
|
|
154
198
|
|
|
155
|
-
/******************************************************************************
|
|
156
|
-
Copyright (c) Microsoft Corporation.
|
|
157
|
-
|
|
158
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
159
|
-
purpose with or without fee is hereby granted.
|
|
160
|
-
|
|
161
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
162
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
163
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
164
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
165
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
166
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
167
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
168
|
-
***************************************************************************** */
|
|
169
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
function __rest(s, e) {
|
|
173
|
-
var t = {};
|
|
174
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
175
|
-
t[p] = s[p];
|
|
176
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
177
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
178
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
179
|
-
t[p[i]] = s[p[i]];
|
|
180
|
-
}
|
|
181
|
-
return t;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
185
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
186
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
187
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
188
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
189
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
190
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
195
|
-
var e = new Error(message);
|
|
196
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
199
|
function assertPath(path) {
|
|
200
200
|
if (typeof path !== 'string') {
|
|
201
201
|
throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
|
|
@@ -1039,7 +1039,7 @@ function getConfig(key) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
1041
|
function ensureAbstractUrl(endpoint, slices = []) {
|
|
1042
|
-
slices = ['https//thedailydialectics.com', 'api'
|
|
1042
|
+
slices = slices || ['https//thedailydialectics.com', 'api'];
|
|
1043
1043
|
// 1) build a prefix string like "api/v1/"
|
|
1044
1044
|
const prefix = slices.map((s) => `${s}/`).join("");
|
|
1045
1045
|
// 2) normalize the list you’ll use for stripping
|
|
@@ -1164,15 +1164,21 @@ function getFetchVars(headers = null, method = null, body = null) {
|
|
|
1164
1164
|
// src/functions/fetch/secureFetchIt.ts
|
|
1165
1165
|
// --- fetch_utils/src/fetch_utils.ts ----------------------------
|
|
1166
1166
|
function get_app_config_url(endpoint_1) {
|
|
1167
|
-
return __awaiter(this, arguments, void 0, function* (endpoint, appKey =
|
|
1168
|
-
const cleanEndpoint = endpoint.replace(/^\/+/,
|
|
1167
|
+
return __awaiter(this, arguments, void 0, function* (endpoint, appKey = 'BASE_API_URL') {
|
|
1168
|
+
const cleanEndpoint = endpoint.replace(/^\/+/, '');
|
|
1169
|
+
//console.log(`cleanEndpoint == ${cleanEndpoint}`)
|
|
1169
1170
|
const config = yield getConfig();
|
|
1170
|
-
|
|
1171
|
+
//console.log(`config == ${config}`)
|
|
1172
|
+
const baseUrl = config;
|
|
1171
1173
|
appKey = appKey || 'BASE_API_URL';
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
|
|
1174
|
+
//console.log(`appKey == ${appKey}`)
|
|
1175
|
+
const base = baseUrl[appKey]; // full AppConfig object
|
|
1176
|
+
//console.log(`base == ${base}`)
|
|
1177
|
+
if (!base)
|
|
1178
|
+
throw new Error(`Missing API URL for key "${appKey}"`);
|
|
1179
|
+
const slices = base.split('/').filter(Boolean);
|
|
1180
|
+
//console.log(`slices == ${slices}`)
|
|
1181
|
+
return ensureAbstractUrl(cleanEndpoint, slices);
|
|
1176
1182
|
});
|
|
1177
1183
|
}
|
|
1178
1184
|
function fetchIt(endpoint_1) {
|
|
@@ -1346,5 +1352,9 @@ function loadConfig() {
|
|
|
1346
1352
|
});
|
|
1347
1353
|
}
|
|
1348
1354
|
|
|
1355
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1356
|
+
console.log(yield get_app_config_url('api'));
|
|
1357
|
+
}))(); // ← note the () here to invoke it
|
|
1358
|
+
|
|
1349
1359
|
export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, 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, loadConfig, make_path, make_sanitized_path, normalizeUrl, readFileContents, readJsonFile, requestPatch, requireToken, sanitizeFilename, secureFetchIt, stripPrefixes, truncateString };
|
|
1350
1360
|
//# sourceMappingURL=index.js.map
|