@intlayer/config 6.1.6 → 7.0.0-canary.0
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/_virtual/rolldown_runtime.cjs +34 -0
- package/dist/cjs/alias.cjs +27 -100
- package/dist/cjs/alias.cjs.map +1 -1
- package/dist/cjs/built.cjs +7 -25
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/bundleJSFile.cjs +30 -51
- package/dist/cjs/bundleJSFile.cjs.map +1 -1
- package/dist/cjs/client.cjs +19 -52
- package/dist/cjs/configFile/buildConfigurationFields.cjs +100 -657
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.cjs +60 -114
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/index.cjs +8 -25
- package/dist/cjs/configFile/loadConfigurationFile.cjs +22 -47
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs +49 -55
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/defaultValues/build.cjs +23 -35
- package/dist/cjs/defaultValues/build.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs +68 -70
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/editor.cjs +29 -41
- package/dist/cjs/defaultValues/editor.cjs.map +1 -1
- package/dist/cjs/defaultValues/index.cjs +62 -0
- package/dist/cjs/defaultValues/index.cjs.map +1 -0
- package/dist/cjs/defaultValues/internationalization.cjs +23 -34
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/log.cjs +17 -29
- package/dist/cjs/defaultValues/log.cjs.map +1 -1
- package/dist/cjs/defaultValues/routing.cjs +38 -0
- package/dist/cjs/defaultValues/routing.cjs.map +1 -0
- package/dist/cjs/extractErrorMessage.cjs +95 -0
- package/dist/cjs/extractErrorMessage.cjs.map +1 -0
- package/dist/cjs/index.cjs +67 -98
- package/dist/cjs/loadEnvFile.cjs +30 -51
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs +74 -0
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +86 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +67 -0
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/transpileTSToMJS.cjs +60 -0
- package/dist/cjs/loadExternalFile/transpileTSToMJS.cjs.map +1 -0
- package/dist/cjs/logger.cjs +124 -152
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/package.cjs +12 -0
- package/dist/cjs/package.cjs.map +1 -0
- package/dist/cjs/retryManager.cjs +42 -49
- package/dist/cjs/retryManager.cjs.map +1 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +24 -33
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/cache.cjs +426 -0
- package/dist/cjs/utils/cache.cjs.map +1 -0
- package/dist/cjs/utils/clearModuleCache.cjs +23 -46
- package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
- package/dist/cjs/utils/extractErrorMessage.cjs +95 -0
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -0
- package/dist/cjs/utils/getExtension.cjs +12 -35
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +37 -0
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -0
- package/dist/cjs/utils/logStack.cjs +16 -0
- package/dist/cjs/utils/logStack.cjs.map +1 -0
- package/dist/cjs/utils/normalizePath.cjs +15 -27
- package/dist/cjs/utils/normalizePath.cjs.map +1 -1
- package/dist/esm/_virtual/rolldown_runtime.mjs +17 -0
- package/dist/esm/alias.mjs +23 -74
- package/dist/esm/alias.mjs.map +1 -1
- package/dist/esm/built.mjs +5 -3
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/bundleJSFile.mjs +26 -25
- package/dist/esm/bundleJSFile.mjs.map +1 -1
- package/dist/esm/client.mjs +4 -31
- package/dist/esm/configFile/buildConfigurationFields.mjs +97 -674
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs +52 -75
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/index.mjs +5 -3
- package/dist/esm/configFile/loadConfigurationFile.mjs +22 -23
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs +45 -30
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/build.mjs +16 -11
- package/dist/esm/defaultValues/build.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +48 -34
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/editor.mjs +17 -11
- package/dist/esm/defaultValues/editor.mjs.map +1 -1
- package/dist/esm/defaultValues/index.mjs +21 -0
- package/dist/esm/defaultValues/index.mjs.map +1 -0
- package/dist/esm/defaultValues/internationalization.mjs +13 -7
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/log.mjs +10 -4
- package/dist/esm/defaultValues/log.mjs.map +1 -1
- package/dist/esm/defaultValues/routing.mjs +25 -0
- package/dist/esm/defaultValues/routing.mjs.map +1 -0
- package/dist/esm/extractErrorMessage.mjs +94 -0
- package/dist/esm/extractErrorMessage.mjs.map +1 -0
- package/dist/esm/index.mjs +18 -61
- package/dist/esm/loadEnvFile.mjs +27 -17
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs +68 -0
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -0
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +81 -0
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -0
- package/dist/esm/loadExternalFile/parseFileContent.mjs +63 -0
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -0
- package/dist/esm/loadExternalFile/transpileTSToMJS.mjs +55 -0
- package/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +1 -0
- package/dist/esm/logger.mjs +110 -115
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/package.mjs +6 -0
- package/dist/esm/package.mjs.map +1 -0
- package/dist/esm/retryManager.mjs +40 -23
- package/dist/esm/retryManager.mjs.map +1 -1
- package/dist/esm/utils/ESMxCJSHelpers.mjs +20 -6
- package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -1
- package/dist/esm/utils/cache.mjs +414 -0
- package/dist/esm/utils/cache.mjs.map +1 -0
- package/dist/esm/utils/clearModuleCache.mjs +22 -21
- package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
- package/dist/esm/utils/extractErrorMessage.mjs +94 -0
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -0
- package/dist/esm/utils/getExtension.mjs +11 -11
- package/dist/esm/utils/getExtension.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs +33 -0
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -0
- package/dist/esm/utils/logStack.mjs +16 -0
- package/dist/esm/utils/logStack.mjs.map +1 -0
- package/dist/esm/utils/normalizePath.mjs +14 -3
- package/dist/esm/utils/normalizePath.mjs.map +1 -1
- package/dist/types/alias.d.ts +20 -12
- package/dist/types/alias.d.ts.map +1 -1
- package/dist/types/built.d.ts +7 -6
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/bundleJSFile.d.ts +97 -93
- package/dist/types/bundleJSFile.d.ts.map +1 -1
- package/dist/types/client.d.ts +3 -5
- package/dist/types/configFile/buildConfigurationFields.d.ts +7 -2
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/getConfiguration.d.ts +19 -15
- package/dist/types/configFile/getConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/index.d.ts +4 -3
- package/dist/types/configFile/loadConfigurationFile.d.ts +8 -3
- package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts +6 -4
- package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -1
- package/dist/types/defaultValues/build.d.ts +10 -4
- package/dist/types/defaultValues/build.d.ts.map +1 -1
- package/dist/types/defaultValues/content.d.ts +23 -16
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/defaultValues/editor.d.ts +14 -9
- package/dist/types/defaultValues/editor.d.ts.map +1 -1
- package/dist/types/defaultValues/index.d.ts +14 -0
- package/dist/types/defaultValues/index.d.ts.map +1 -0
- package/dist/types/defaultValues/internationalization.d.ts +12 -6
- package/dist/types/defaultValues/internationalization.d.ts.map +1 -1
- package/dist/types/defaultValues/log.d.ts +7 -2
- package/dist/types/defaultValues/log.d.ts.map +1 -1
- package/dist/types/defaultValues/routing.d.ts +14 -0
- package/dist/types/defaultValues/routing.d.ts.map +1 -0
- package/dist/types/extractErrorMessage.d.ts +5 -0
- package/dist/types/extractErrorMessage.d.ts.map +1 -0
- package/dist/types/index.d.ts +21 -17
- package/dist/types/loadEnvFile.d.ts +8 -5
- package/dist/types/loadEnvFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleFile.d.ts +10 -0
- package/dist/types/loadExternalFile/bundleFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +25 -0
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts +29 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -0
- package/dist/types/loadExternalFile/transpileTSToMJS.d.ts +9 -0
- package/dist/types/loadExternalFile/transpileTSToMJS.d.ts.map +1 -0
- package/dist/types/logger.d.ts +41 -37
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/retryManager.d.ts +26 -8
- package/dist/types/retryManager.d.ts.map +1 -1
- package/dist/types/utils/ESMxCJSHelpers.d.ts +16 -2
- package/dist/types/utils/ESMxCJSHelpers.d.ts.map +1 -1
- package/dist/types/utils/cache.d.ts +50 -0
- package/dist/types/utils/cache.d.ts.map +1 -0
- package/dist/types/utils/clearModuleCache.d.ts +4 -1
- package/dist/types/utils/clearModuleCache.d.ts.map +1 -1
- package/dist/types/utils/extractErrorMessage.d.ts +5 -0
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -0
- package/dist/types/utils/getExtension.d.ts +6 -2
- package/dist/types/utils/getExtension.d.ts.map +1 -1
- package/dist/types/utils/getPackageJsonPath.d.ts +10 -0
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -0
- package/dist/types/utils/logStack.d.ts +7 -0
- package/dist/types/utils/logStack.d.ts.map +1 -0
- package/dist/types/utils/normalizePath.d.ts +4 -1
- package/dist/types/utils/normalizePath.d.ts.map +1 -1
- package/package.json +40 -35
- package/LICENSE +0 -202
- package/dist/cjs/client.cjs.map +0 -1
- package/dist/cjs/configFile/index.cjs.map +0 -1
- package/dist/cjs/defaultValues/middleware.cjs +0 -47
- package/dist/cjs/defaultValues/middleware.cjs.map +0 -1
- package/dist/cjs/getSandboxContext.cjs +0 -64
- package/dist/cjs/getSandboxContext.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/loadExternalFile.cjs +0 -105
- package/dist/cjs/loadExternalFile.cjs.map +0 -1
- package/dist/cjs/types/config.cjs +0 -17
- package/dist/cjs/types/config.cjs.map +0 -1
- package/dist/cjs/types/locales.cjs +0 -310
- package/dist/cjs/types/locales.cjs.map +0 -1
- package/dist/esm/client.mjs.map +0 -1
- package/dist/esm/configFile/index.mjs.map +0 -1
- package/dist/esm/defaultValues/middleware.mjs +0 -17
- package/dist/esm/defaultValues/middleware.mjs.map +0 -1
- package/dist/esm/getSandboxContext.mjs +0 -40
- package/dist/esm/getSandboxContext.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/loadExternalFile.mjs +0 -81
- package/dist/esm/loadExternalFile.mjs.map +0 -1
- package/dist/esm/types/config.mjs +0 -1
- package/dist/esm/types/config.mjs.map +0 -1
- package/dist/esm/types/locales.mjs +0 -286
- package/dist/esm/types/locales.mjs.map +0 -1
- package/dist/types/client.d.ts.map +0 -1
- package/dist/types/configFile/index.d.ts.map +0 -1
- package/dist/types/defaultValues/middleware.d.ts +0 -8
- package/dist/types/defaultValues/middleware.d.ts.map +0 -1
- package/dist/types/getSandboxContext.d.ts +0 -4
- package/dist/types/getSandboxContext.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/loadExternalFile.d.ts +0 -8
- package/dist/types/loadExternalFile.d.ts.map +0 -1
- package/dist/types/types/config.d.ts +0 -659
- package/dist/types/types/config.d.ts.map +0 -1
- package/dist/types/types/locales.d.ts +0 -564
- package/dist/types/types/locales.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadConfigurationFile.d.ts","
|
|
1
|
+
{"version":3,"file":"loadConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/loadConfigurationFile.ts"],"sourcesContent":[],"mappings":";;;;;;;AAoBA;;;;AAGuB,cAHV,qBAGU,EAAA,CAAA,cAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EADX,IACW,CADN,uBACM,EAAA,eAAA,CAAA,EAAA,GAApB,oBAAoB,GAAA,SAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
//#region src/configFile/searchConfigurationFile.d.ts
|
|
1
2
|
type SearchConfigurationFileResult = {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
configurationFilePath?: string;
|
|
4
|
+
numCustomConfiguration: number;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
6
7
|
* Search for the configuration file in the given path
|
|
@@ -13,6 +14,7 @@ type SearchConfigurationFileResult = {
|
|
|
13
14
|
* - intlayer.config.mjs
|
|
14
15
|
* - .intlayerrc
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
declare const searchConfigurationFile: (startDir: string) => SearchConfigurationFileResult;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { searchConfigurationFile };
|
|
18
20
|
//# sourceMappingURL=searchConfigurationFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchConfigurationFile.d.ts","
|
|
1
|
+
{"version":3,"file":"searchConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/searchConfigurationFile.ts"],"sourcesContent":[],"mappings":";KAeK,6BAAA;EAAA,qBAAA,CAAA,EAAA,MAAA;EAgBQ,sBAAA,EAAA,MA4BZ;;;;;;;;;;;;;cA5BY,+CAEV"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare namespace build_d_exports {
|
|
2
|
+
export { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN };
|
|
3
|
+
}
|
|
4
|
+
declare const OPTIMIZE: boolean;
|
|
5
|
+
declare const IMPORT_MODE = "static";
|
|
6
|
+
declare const TRAVERSE_PATTERN: string[];
|
|
7
|
+
declare const OUTPUT_FORMAT: ('cjs' | 'esm')[];
|
|
8
|
+
declare const CACHE = true;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN, build_d_exports };
|
|
5
11
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","
|
|
1
|
+
{"version":3,"file":"build.d.ts","names":[],"sources":["../../../src/defaultValues/build.ts"],"sourcesContent":[],"mappings":";;;cAAa;cAEA,WAAA;cAEA;cAKA;cAEA,KAAA"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
declare namespace content_d_exports {
|
|
2
|
+
export { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, FILL, I18NEXT_DICTIONARIES_DIR, MAIN_DIR, MASKS_DIR, MODULE_AUGMENTATION_DIR, REACT_INTL_MESSAGES_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH };
|
|
3
|
+
}
|
|
4
|
+
declare const FILE_EXTENSIONS: string[];
|
|
5
|
+
declare const EXCLUDED_PATHS: string[];
|
|
6
|
+
declare const CONTENT_DIR: string[];
|
|
7
|
+
declare const MAIN_DIR = ".intlayer/main";
|
|
8
|
+
declare const DICTIONARIES_DIR = ".intlayer/dictionary";
|
|
9
|
+
declare const MASKS_DIR = ".intlayer/mask";
|
|
10
|
+
declare const REMOTE_DICTIONARIES_DIR = ".intlayer/remote_dictionary";
|
|
11
|
+
declare const UNMERGED_DICTIONARIES_DIR = ".intlayer/unmerged_dictionary";
|
|
12
|
+
declare const DYNAMIC_DICTIONARIES_DIR = ".intlayer/dynamic_dictionary";
|
|
13
|
+
declare const FETCH_DICTIONARIES_DIR = ".intlayer/fetch_dictionary";
|
|
14
|
+
declare const TYPES_DIR = ".intlayer/types";
|
|
15
|
+
declare const MODULE_AUGMENTATION_DIR = ".intlayer/types";
|
|
16
|
+
declare const I18NEXT_DICTIONARIES_DIR = "i18next_resources";
|
|
17
|
+
declare const REACT_INTL_MESSAGES_DIR = "intl_messages";
|
|
18
|
+
declare const CONFIG_DIR = ".intlayer/config";
|
|
19
|
+
declare const CACHE_DIR = ".intlayer/cache";
|
|
20
|
+
declare const WATCH: boolean;
|
|
21
|
+
declare const FILL = true;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, FILL, I18NEXT_DICTIONARIES_DIR, MAIN_DIR, MASKS_DIR, MODULE_AUGMENTATION_DIR, REACT_INTL_MESSAGES_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH, content_d_exports };
|
|
17
24
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","
|
|
1
|
+
{"version":3,"file":"content.d.ts","names":[],"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":[],"mappings":";;;cAAa;cAWA;cAaA;cAEA,QAAA;cAEA,gBAAA;cAEA,SAAA;cAEA,uBAAA;cAEA,yBAAA;cAEA,wBAAA;cAEA,sBAAA;cAEA,SAAA;cAEA,uBAAA;cAEA,wBAAA;cAEA,uBAAA;cAEA,UAAA;cAEA,SAAA;cAEA;cAEA,IAAA"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
declare namespace editor_d_exports {
|
|
2
|
+
export { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT };
|
|
3
|
+
}
|
|
4
|
+
declare const APPLICATION_URL = "";
|
|
5
|
+
declare const EDITOR_URL = "http://localhost:8000";
|
|
6
|
+
declare const CMS_URL = "https://intlayer.org";
|
|
7
|
+
declare const PORT = 8000;
|
|
8
|
+
declare const BACKEND_URL = "https://back.intlayer.org";
|
|
9
|
+
declare const IS_ENABLED = true;
|
|
10
|
+
declare const LIVE_SYNC = true;
|
|
11
|
+
declare const DICTIONARY_PRIORITY_STRATEGY = "local_first";
|
|
12
|
+
declare const LIVE_SYNC_PORT = 4000;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT, editor_d_exports };
|
|
10
15
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","
|
|
1
|
+
{"version":3,"file":"editor.d.ts","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":[],"mappings":";;;cAAa,eAAA;cACA,UAAA;cACA,OAAA;cACA,IAAA;cACA,WAAA;cACA,UAAA;cACA,SAAA;cACA,4BAAA;cACA,cAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { build_d_exports } from "./build.js";
|
|
2
|
+
import { content_d_exports } from "./content.js";
|
|
3
|
+
import { editor_d_exports } from "./editor.js";
|
|
4
|
+
import { internationalization_d_exports } from "./internationalization.js";
|
|
5
|
+
import { log_d_exports } from "./log.js";
|
|
6
|
+
import { routing_d_exports } from "./routing.js";
|
|
7
|
+
|
|
8
|
+
//#region src/defaultValues/index.d.ts
|
|
9
|
+
declare namespace index_d_exports {
|
|
10
|
+
export { build_d_exports as Build, content_d_exports as Content, editor_d_exports as Editor, internationalization_d_exports as Internationalization, log_d_exports as Log, routing_d_exports as Routing };
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { build_d_exports as Build, content_d_exports as Content, editor_d_exports as Editor, internationalization_d_exports as Internationalization, log_d_exports as Log, routing_d_exports as Routing, index_d_exports };
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/defaultValues/index.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
1
|
+
import { Locale, StrictMode } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/internationalization.d.ts
|
|
4
|
+
declare namespace internationalization_d_exports {
|
|
5
|
+
export { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE };
|
|
6
|
+
}
|
|
7
|
+
declare const LOCALES: Locale[];
|
|
8
|
+
declare const REQUIRED_LOCALES: Locale[];
|
|
9
|
+
declare const DEFAULT_LOCALE: Locale;
|
|
10
|
+
declare const STRICT_MODE: StrictMode;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE, internationalization_d_exports };
|
|
7
13
|
//# sourceMappingURL=internationalization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internationalization.d.ts","
|
|
1
|
+
{"version":3,"file":"internationalization.d.ts","names":[],"sources":["../../../src/defaultValues/internationalization.ts"],"sourcesContent":[],"mappings":";;;;;;cAEa,SAAS;cAET,kBAAkB;cAElB,gBAAgB;cAEhB,aAAa"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
declare namespace log_d_exports {
|
|
2
|
+
export { MODE, PREFIX };
|
|
3
|
+
}
|
|
4
|
+
declare const MODE = "default";
|
|
5
|
+
declare const PREFIX = "\u001B[38;5;239m[intlayer] \u001B[0m";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { MODE, PREFIX, log_d_exports };
|
|
3
8
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","
|
|
1
|
+
{"version":3,"file":"log.d.ts","names":[],"sources":["../../../src/defaultValues/log.ts"],"sourcesContent":[],"mappings":";;;cAEa,IAAA;cAEA,MAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace routing_d_exports {
|
|
2
|
+
export { BASE_PATH, COOKIE_NAME, DETECT_LOCALE_ON_PREFETCH_NO_PREFIX, HEADER_NAME, LOCALE_STORAGE_NAME, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE };
|
|
3
|
+
}
|
|
4
|
+
declare const HEADER_NAME = "x-intlayer-locale";
|
|
5
|
+
declare const COOKIE_NAME = "INTLAYER_LOCALE";
|
|
6
|
+
declare const LOCALE_STORAGE_NAME = "INTLAYER_LOCALE";
|
|
7
|
+
declare const BASE_PATH = "";
|
|
8
|
+
declare const SERVER_SET_COOKIE = "always";
|
|
9
|
+
declare const ROUTING_MODE = "prefix-no-default";
|
|
10
|
+
declare const DETECT_LOCALE_ON_PREFETCH_NO_PREFIX = false;
|
|
11
|
+
declare const STORAGE = "cookie";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BASE_PATH, COOKIE_NAME, DETECT_LOCALE_ON_PREFETCH_NO_PREFIX, HEADER_NAME, LOCALE_STORAGE_NAME, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE, routing_d_exports };
|
|
14
|
+
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","names":[],"sources":["../../../src/defaultValues/routing.ts"],"sourcesContent":[],"mappings":";;;cAAa,WAAA;cAEA,WAAA;cACA,mBAAA;cAEA,SAAA;cAEA,iBAAA;cAEA,YAAA;cAEA,mCAAA;cAEA,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractErrorMessage.d.ts","names":[],"sources":["../../src/extractErrorMessage.ts"],"sourcesContent":[],"mappings":";cAAa"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { getAlias } from "./alias.js";
|
|
2
|
+
import { bundleJSFile } from "./bundleJSFile.js";
|
|
3
|
+
import { index_d_exports } from "./defaultValues/index.js";
|
|
4
|
+
import { ANSIColors, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.js";
|
|
5
|
+
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.js";
|
|
6
|
+
import { getEnvFilePath, loadEnvFile } from "./loadEnvFile.js";
|
|
7
|
+
import { parseFileContent } from "./loadExternalFile/parseFileContent.js";
|
|
8
|
+
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.js";
|
|
9
|
+
import { searchConfigurationFile } from "./configFile/searchConfigurationFile.js";
|
|
10
|
+
import { ESBuildPlugin, loadExternalFile, loadExternalFileSync } from "./loadExternalFile/loadExternalFile.js";
|
|
11
|
+
import { bundleFile, bundleFileSync } from "./loadExternalFile/bundleFile.js";
|
|
12
|
+
import { retryManager } from "./retryManager.js";
|
|
13
|
+
import { cache, clearCache, getCache, localCache, setCache } from "./utils/cache.js";
|
|
14
|
+
import { clearModuleCache } from "./utils/clearModuleCache.js";
|
|
15
|
+
import { ESMxCJSRequire, configESMxCJSRequire, isESModule } from "./utils/ESMxCJSHelpers.js";
|
|
16
|
+
import { extractErrorMessage } from "./utils/extractErrorMessage.js";
|
|
17
|
+
import { getExtension } from "./utils/getExtension.js";
|
|
18
|
+
import { getPackageJsonPath } from "./utils/getPackageJsonPath.js";
|
|
19
|
+
import { logStack } from "./utils/logStack.js";
|
|
20
|
+
import { normalizePath } from "./utils/normalizePath.js";
|
|
21
|
+
export { ANSIColors, index_d_exports as DefaultValues, type ESBuildPlugin, ESMxCJSRequire, type GetConfigurationAndFilePathResult, type GetConfigurationOptions, type Logger, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cache, clearCache, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, configESMxCJSRequire, extractErrorMessage, getAlias, getAppLogger, getCache, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, isESModule, loadEnvFile, loadExternalFile, loadExternalFileSync, localCache, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, setCache, spinnerFrames, v, x };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/loadEnvFile.d.ts
|
|
2
|
+
type LoadEnvFileOptions = {
|
|
3
|
+
env?: string;
|
|
4
|
+
envFile?: string;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
declare const getEnvFilePath: (env?: string, envFile?: string) => string | undefined;
|
|
7
|
+
declare const loadEnvFile: (options?: Partial<LoadEnvFileOptions>) => {};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { LoadEnvFileOptions, getEnvFilePath, loadEnvFile };
|
|
7
10
|
//# sourceMappingURL=loadEnvFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.d.ts","
|
|
1
|
+
{"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"sourcesContent":[],"mappings":";KAKY,kBAAA;EAAA,GAAA,CAAA,EAAA,MAAA;EAKC,OAAA,CAAA,EAAA,MAAA;AAWb,CAAA;cAXa;cAWA,wBAAyB,QAAQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuildOptions, Loader, Plugin } from "esbuild";
|
|
2
|
+
|
|
3
|
+
//#region src/loadExternalFile/bundleFile.d.ts
|
|
4
|
+
type ESBuildPlugin = Plugin;
|
|
5
|
+
declare const getLoader: (extension: string) => Loader;
|
|
6
|
+
declare const bundleFileSync: (code: string, filePath: string, options?: BuildOptions) => string | undefined;
|
|
7
|
+
declare const bundleFile: (code: string, filePath: string, options?: BuildOptions) => Promise<string | undefined>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ESBuildPlugin, bundleFile, bundleFileSync, getLoader };
|
|
10
|
+
//# sourceMappingURL=bundleFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundleFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/bundleFile.ts"],"sourcesContent":[],"mappings":";;;KAWY,aAAA,GAAgB;cAEf,kCAAiC;AAFlC,cAmDC,cAnDe,EAAA,CAAA,IAAM,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAsDtB,YAtDsB,EAAA,GAAA,MAAA,GAAA,SAAA;AAErB,cAyEA,UAzEiC,EAAA,CAAA,IAuB7C,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAqDW,YArDX,EAAA,GAsDE,OAtDF,CAAA,MAAA,GAAA,SAAA,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SandBoxContextOptions } from "./parseFileContent.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
+
import { BuildOptions, Plugin } from "esbuild";
|
|
4
|
+
|
|
5
|
+
//#region src/loadExternalFile/loadExternalFile.d.ts
|
|
6
|
+
type ESBuildPlugin = Plugin;
|
|
7
|
+
type LoadExternalFileOptions = {
|
|
8
|
+
configuration?: IntlayerConfig;
|
|
9
|
+
buildOptions?: BuildOptions;
|
|
10
|
+
} & SandBoxContextOptions;
|
|
11
|
+
/**
|
|
12
|
+
* Load the content declaration from the given path
|
|
13
|
+
*
|
|
14
|
+
* Accepts JSON, JS, MJS and TS files as configuration
|
|
15
|
+
*/
|
|
16
|
+
declare const loadExternalFileSync: (filePath: string, options?: LoadExternalFileOptions) => any | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Load the content declaration from the given path
|
|
19
|
+
*
|
|
20
|
+
* Accepts JSON, JS, MJS and TS files as configuration
|
|
21
|
+
*/
|
|
22
|
+
declare const loadExternalFile: (filePath: string, options?: LoadExternalFileOptions) => Promise<any | undefined>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ESBuildPlugin, LoadExternalFileOptions, loadExternalFile, loadExternalFileSync };
|
|
25
|
+
//# sourceMappingURL=loadExternalFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"sourcesContent":[],"mappings":";;;;;KAaY,aAAA,GAAgB;KAEhB,uBAAA;EAFA,aAAA,CAAA,EAGM,cAHU;EAEhB,YAAA,CAAA,EAEK,YAFkB;CACjB,GAEd,qBAFc;;;;AASlB;AA4DA;cA5Da,mDAED;;;;;;cA0DC,+CAED,4BACT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LoadEnvFileOptions } from "../loadEnvFile.js";
|
|
2
|
+
import { Context } from "node:vm";
|
|
3
|
+
|
|
4
|
+
//#region src/loadExternalFile/parseFileContent.d.ts
|
|
5
|
+
type SandBoxContextOptions = {
|
|
6
|
+
envVarOptions?: LoadEnvFileOptions;
|
|
7
|
+
projectRequire?: NodeJS.Require;
|
|
8
|
+
additionalEnvVars?: Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Map of specifier -> mocked export to be returned when code in the VM calls require(specifier).
|
|
11
|
+
* Example:
|
|
12
|
+
* mocks: {
|
|
13
|
+
* '@intlayer/config/built': { getConfig: () => ({}), Locales: {} }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
mocks?: Record<string, any>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional alias map if you want to redirect specifiers.
|
|
19
|
+
* Useful when user code imports a subpath you want to collapse.
|
|
20
|
+
* Example:
|
|
21
|
+
* aliases: { '@intlayer/config/built': '@intlayer/config' }
|
|
22
|
+
*/
|
|
23
|
+
aliases?: Record<string, string>;
|
|
24
|
+
};
|
|
25
|
+
declare const getSandBoxContext: (options?: SandBoxContextOptions) => Context;
|
|
26
|
+
declare const parseFileContent: <T>(fileContentString: string, options?: SandBoxContextOptions) => T | undefined;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { SandBoxContextOptions, getSandBoxContext, parseFileContent };
|
|
29
|
+
//# sourceMappingURL=parseFileContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseFileContent.d.ts","names":[],"sources":["../../../src/loadExternalFile/parseFileContent.ts"],"sourcesContent":[],"mappings":";;;;KAKY,qBAAA;kBACM;EADN,cAAA,CAAA,EAEO,MAAA,CAAO,OAFO;EACf,iBAAA,CAAA,EAEI,MAFJ,CAAA,MAAA,EAAA,MAAA,CAAA;EACC;;;;;AAmBnB;AAkFA;UA5FU;;;;;;;YAOE;;cAGC,8BAA+B,0BAAwB;cAkFvD,2DAED,0BACT"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuildOptions, Plugin } from "esbuild";
|
|
2
|
+
|
|
3
|
+
//#region src/loadExternalFile/transpileTSToMJS.d.ts
|
|
4
|
+
type ESBuildPlugin = Plugin;
|
|
5
|
+
declare const transpileTSToMJSSync: (code: string, filePath: string, options?: BuildOptions) => string | undefined;
|
|
6
|
+
declare const transpileTSToMJS: (code: string, filePath: string, options?: BuildOptions) => Promise<string | undefined>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ESBuildPlugin, transpileTSToMJS, transpileTSToMJSSync };
|
|
9
|
+
//# sourceMappingURL=transpileTSToMJS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transpileTSToMJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToMJS.ts"],"sourcesContent":[],"mappings":";;;KAWY,aAAA,GAAgB;cA0Bf,iEAGD;AA7BA,cAkDC,gBAlDe,EAAM,CAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAqDtB,YArDsB,EAAA,GAsD/B,OAtD+B,CAAA,MAAA,GAAA,SAAA,CAAA"}
|
package/dist/types/logger.d.ts
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { CustomIntlayerConfig, Locale } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/logger.d.ts
|
|
4
|
+
type Details = {
|
|
5
|
+
isVerbose?: boolean;
|
|
6
|
+
level?: 'info' | 'warn' | 'error' | 'debug';
|
|
7
|
+
config?: CustomIntlayerConfig['log'];
|
|
7
8
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
type Logger = (content: any, details?: Details) => void;
|
|
10
|
+
declare const logger: Logger;
|
|
11
|
+
declare enum ANSIColors {
|
|
12
|
+
RESET = "\u001B[0m",
|
|
13
|
+
GREY = "\u001B[90m",
|
|
14
|
+
GREY_DARK = "\u001B[38;5;239m",
|
|
15
|
+
BLUE = "\u001B[34m",
|
|
16
|
+
RED = "\u001B[31m",
|
|
17
|
+
GREEN = "\u001B[32m",
|
|
18
|
+
YELLOW = "\u001B[38;5;226m",
|
|
19
|
+
MAGENTA = "\u001B[35m",
|
|
20
|
+
BEIGE = "\u001B[38;5;3m",
|
|
21
|
+
ORANGE = "\u001B[38;5;208m",
|
|
22
|
+
CYAN = "\u001B[36m",
|
|
23
|
+
WHITE = "\u001B[37m",
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
declare const spinnerFrames: string[];
|
|
24
26
|
/**
|
|
25
27
|
* The appLogger function takes the logger and merges it with the configuration from the intlayer config file.
|
|
26
28
|
* It allows overriding the default configuration by passing a config object in the details parameter.
|
|
27
29
|
* The configuration is merged with the default configuration from the intlayer config file.
|
|
28
30
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
declare const getAppLogger: (configuration?: CustomIntlayerConfig, globalDetails?: Details) => (content: any, details?: Details) => void;
|
|
32
|
+
declare const colorize: (s: string, color?: ANSIColors, reset?: boolean | ANSIColors) => string;
|
|
33
|
+
declare const colorizeLocales: (locales: Locale | Locale[], color?: ANSIColors, reset?: boolean | ANSIColors) => string;
|
|
34
|
+
declare const colorizeKey: (keyPath: string | string[], color?: ANSIColors, reset?: boolean | ANSIColors) => string;
|
|
35
|
+
declare const colorizePath: (path: string | string[], color?: ANSIColors, reset?: boolean | ANSIColors) => string;
|
|
34
36
|
/**
|
|
35
37
|
* Colorize numeric value using Intl.NumberFormat and optional ANSI colors.
|
|
36
38
|
*
|
|
37
39
|
* Examples:
|
|
38
40
|
* colorizeNumber(2, [{ pluralRule: 'one' , color: ANSIColors.GREEN}, { pluralRule: 'other' , color: ANSIColors.RED}]) // "'\x1b[31m2\x1b[0m"
|
|
39
41
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
declare const colorizeNumber: (number: number, options?: Partial<Record<Intl.LDMLPluralRule, ANSIColors>>) => string;
|
|
43
|
+
declare const removeColor: (text: string) => string;
|
|
42
44
|
/**
|
|
43
45
|
* Create a string of spaces of a given length.
|
|
44
46
|
*
|
|
45
47
|
* @param colSize - The length of the string to create.
|
|
46
48
|
* @returns A string of spaces.
|
|
47
49
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
declare const colon: (text: string | string[], options?: {
|
|
51
|
+
colSize?: number | number[] | string | string[];
|
|
52
|
+
minSize?: number;
|
|
53
|
+
maxSize?: number;
|
|
54
|
+
pad?: "left" | "right";
|
|
55
|
+
padChar?: string;
|
|
54
56
|
}) => string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
declare const x: string;
|
|
58
|
+
declare const v: string;
|
|
59
|
+
declare const clock: string;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x };
|
|
58
62
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","
|
|
1
|
+
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/logger.ts"],"sourcesContent":[],"mappings":";;;KAEY,OAAA;;EAAA,KAAA,CAAA,EAAA,MAAO,GAAA,MAGR,GAAA,OAAA,GAAA,OAAoB;EAGnB,MAAA,CAAA,EAHD,oBAG0C,CAAA,KAAA,CAAA;AAErD,CAAA;AAoCY,KAtCA,MAAA,GAsCU,CAAA,OAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAtCwB,OAsCxB,EAAA,GAAA,IAAA;AAeT,cAnDA,MAmDkE,EAnD1D,MAmD0D;AAOlE,aAtBD,UAAA;EAuBO,KAAA,GAAA,WAAA;EAAsC,IAAA,GAAA,YAAA;EAC9B,SAAA,GAAA,kBAAA;EAAO,IAAA,GAAA,YAAA;EAUrB,GAAA,GAAA,YAON;EAEM,KAAA,GAAA,YAQE;EAPJ,MAAA,GAAA,kBAAA;EAAS,OAAA,GAAA,YAAA;EAClB,KAAA,GAAA,gBAAA;EACiB,MAAA,GAAA,kBAAA;EAA6B,IAAA,GAAA,YAAA;EAOnC,KAAA,GAAA,YAQE;AAEf;AAgBa,cAhEA,aAmFZ,EAAA,MAAA,EAAA;;;;;;AAEY,cA9EA,YAgFwB,EAAA,CAAA,aAAA,CAAA,EA/ElB,oBA+EkB,EAAA,aAAA,CAAA,EA/EoB,OA+EpB,EAAA,GAAA,CAAA,OAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EA9EV,OA8EU,EAAA,GAAA,IAAA;AAiCxB,cArGA,QAmIA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EAjIH,UAiIG,EAAA,KAAA,CAAA,EAAA,OAAA,GAhIO,UAgIP,EAAA,GAAA,MAAA;AAEA,cA5HA,eA4HiC,EAAA,CAAA,OAAA,EA3HnC,MA2HmC,GA3H1B,MA2H0B,EAAA,EAAA,KAAA,CAAA,EA1H5C,UA0H4C,EAAA,KAAA,CAAA,EAAA,OAAA,GAzH3B,UAyH2B,EAAA,GAAA,MAAA;AACjC,cAnHA,WAmHmC,EAAA,CAAA,OAAA,EAAA,MAAA,GAAA,MAAA,EAAA,EAAA,KAAA,CAAA,EAjH9C,UAiH8C,EAAA,KAAA,CAAA,EAAA,OAAA,GAhH7B,UAgH6B,EAAA,GAAA,MAAA;AACnC,cA1GA,YA0GsC,EAAA,CAAA,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA,EAAA,KAAA,CAAA,EAxGjD,UAwGiD,EAAA,KAAA,CAAA,EAAA,OAAA,GAvGhC,UAuGgC,EAAA,GAAA,MAAA;;;;;;;cA1FtC,2CAEF,QAAQ,OAAO,IAAA,CAAK,gBAAgB;cAmBlC;;;;;;;cAmCA;;;;;;;cAgCA;cACA;cACA"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/retryManager.d.ts
|
|
2
|
+
type RetryManagerOptions = {
|
|
3
|
+
/** maximum number of retries before giving up */
|
|
4
|
+
maxRetry?: number;
|
|
5
|
+
/** delay between attempts, in milliseconds */
|
|
6
|
+
delay?: number;
|
|
7
|
+
/** function to call when an error occurs */
|
|
8
|
+
onError?: (details: {
|
|
9
|
+
error: string;
|
|
10
|
+
attempt: number;
|
|
11
|
+
maxRetry: number;
|
|
12
|
+
}) => void;
|
|
13
|
+
/** function to call when the maximum number of retries is reached */
|
|
14
|
+
onMaxTryReached?: (details: {
|
|
15
|
+
error: string;
|
|
16
|
+
attempt: number;
|
|
17
|
+
maxRetry: number;
|
|
18
|
+
}) => void;
|
|
8
19
|
};
|
|
9
20
|
/**
|
|
10
21
|
* Wrap an async function `fn` so it’s retried on failure.
|
|
@@ -13,5 +24,12 @@ export type RetryManagerOptions = {
|
|
|
13
24
|
* @param options { maxRetry, delay }
|
|
14
25
|
* @returns A new function with the same signature as `fn`
|
|
15
26
|
*/
|
|
16
|
-
|
|
27
|
+
declare const retryManager: <Args extends any[], R>(fn: (...args: Args) => Promise<R>, {
|
|
28
|
+
maxRetry,
|
|
29
|
+
delay,
|
|
30
|
+
onError,
|
|
31
|
+
onMaxTryReached
|
|
32
|
+
}?: RetryManagerOptions) => ((...args: Args) => Promise<R>);
|
|
33
|
+
//#endregion
|
|
34
|
+
export { RetryManagerOptions, retryManager };
|
|
17
35
|
//# sourceMappingURL=retryManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryManager.d.ts","
|
|
1
|
+
{"version":3,"file":"retryManager.d.ts","names":[],"sources":["../../src/retryManager.ts"],"sourcesContent":[],"mappings":";KAGY,mBAAA;EAAA;EA6BC,QAAA,CAAA,EAAA,MAmDV;EAjDe;EAAiB,KAAA,CAAA,EAAA,MAAA;EAAR;EACvB,OAAA,CAAA,EAAA,CAAA,OAAA,EAAA;IAAA,KAAA,EAAA,MAAA;IAAA,OAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA;EAKG,CAAA,EAAA,GAAA,IAAA;EACS;EAAiB,eAAA,CAAA,EAAA,CAAA,OAAA,EAAA;IAAR,KAAA,EAAA,MAAA;IAAO,OAAA,EAAA,MAAA;;;;;;;;;;;cATnB,oDAEK,SAAS,QAAQ;;;;;IAM5B,mCACS,SAAS,QAAQ"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/utils/ESMxCJSHelpers.d.ts
|
|
2
|
+
declare const isESModule: boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Require relative to the user project
|
|
5
|
+
*
|
|
6
|
+
* Note: Can resolve package that are installed in the user project, ex `'intlayer'`
|
|
7
|
+
*/
|
|
8
|
+
declare const ESMxCJSRequire: NodeJS.Require;
|
|
9
|
+
/**
|
|
10
|
+
* Require relative to the @intlayer/config package
|
|
11
|
+
*
|
|
12
|
+
* Note: Can resolve package that are installed in the config package, ex `'@intlayer/types'`
|
|
13
|
+
*/
|
|
14
|
+
declare const configESMxCJSRequire: NodeJS.Require;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ESMxCJSRequire, configESMxCJSRequire, isESModule };
|
|
3
17
|
//# sourceMappingURL=ESMxCJSHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESMxCJSHelpers.d.ts","
|
|
1
|
+
{"version":3,"file":"ESMxCJSHelpers.d.ts","names":[],"sources":["../../../src/utils/ESMxCJSHelpers.ts"],"sourcesContent":[],"mappings":";cAGa;AAAb;AAOA;AASA;;;cATa,gBAAgB,MAAA,CAAO;;;;;;cASvB,sBAAsB,MAAA,CAAO"}
|