@putkoff/abstract-utilities 0.1.174 → 0.1.175
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/esm/index.js
CHANGED
|
@@ -1336,12 +1336,19 @@ function stripHost(str) {
|
|
|
1336
1336
|
function get_app_config_url(endpoint) {
|
|
1337
1337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1338
1338
|
// 1) normalize your input
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1339
|
+
try {
|
|
1340
|
+
endpoint = endpoint || '';
|
|
1341
|
+
const clean = stripHost(endpoint.trim().toLowerCase());
|
|
1342
|
+
const cfg = yield loadConfig();
|
|
1343
|
+
// 2) pick the key you expect in your JSON
|
|
1344
|
+
const appKey = (`BASE_API_URL`);
|
|
1345
|
+
const base = yield fetchIt('https://abstractendeavors.com/api/secure_env', { "key": 'BASE_API_URL', 'path': '/var/www/abstractendeavors/secure-files/public/config.json' }, 'POST', null, false, true);
|
|
1346
|
+
endpoint = stripPrefixes(endpoint, ['/', 'https://', 'abstractendeavors.com', 'api']);
|
|
1347
|
+
return make_path(base, endpoint);
|
|
1348
|
+
}
|
|
1349
|
+
catch (_a) {
|
|
1350
|
+
return endpoint;
|
|
1351
|
+
}
|
|
1345
1352
|
});
|
|
1346
1353
|
}
|
|
1347
1354
|
function fetchIt(endpoint, body, method, headers, blob, noApi, withCredentials, returnJson, returnReult) {
|
|
@@ -1504,5 +1511,5 @@ function readJsonFile(relativeOrAbsolutePath) {
|
|
|
1504
1511
|
});
|
|
1505
1512
|
}
|
|
1506
1513
|
|
|
1507
|
-
export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, api, callStorage, callWindowMethod, checkResponse, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensureAbstractUrl, ensure_list, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, fetchSharePatch, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getComponentsUtilsDirectory, getConfig, 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_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, parseResult, readFileContents, readJsonFile, requestPatch, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, secureFetchIt, stripPrefixes, truncateString };
|
|
1514
|
+
export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, api, callStorage, callWindowMethod, checkResponse, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensureAbstractUrl, ensure_list, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, fetchSharePatch, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getComponentsUtilsDirectory, getConfig, 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_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, parseResult, readFileContents, readJsonFile, requestPatch, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, secureFetchIt, stripHost, stripPrefixes, truncateString };
|
|
1508
1515
|
//# sourceMappingURL=index.js.map
|