tnp-core 19.0.83 → 19.0.84

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.
Files changed (52) hide show
  1. package/browser/fesm2022/tnp-core.mjs +176 -129
  2. package/browser/fesm2022/tnp-core.mjs.map +1 -1
  3. package/browser/lib/constants.d.ts +2 -1
  4. package/browser/lib/helpers.d.ts +4 -3
  5. package/browser/lib/utils.d.ts +30 -0
  6. package/browser/package.json +1 -1
  7. package/cli.backend.js +2 -2
  8. package/lib/build-info._auto-generated_.d.ts +1 -1
  9. package/lib/build-info._auto-generated_.js +1 -1
  10. package/lib/command-exists.js +10 -10
  11. package/lib/command-exists.js.map +1 -1
  12. package/lib/constants.d.ts +1 -0
  13. package/lib/constants.js +2 -1
  14. package/lib/constants.js.map +1 -1
  15. package/lib/env.backend.d.ts +34 -0
  16. package/lib/env.backend.js +40 -0
  17. package/lib/env.backend.js.map +1 -0
  18. package/lib/env.browser.d.ts +34 -0
  19. package/lib/helpers.d.ts +5 -3
  20. package/lib/helpers.js +14 -96
  21. package/lib/helpers.js.map +1 -1
  22. package/lib/node-chalk-mock.js +2 -2
  23. package/lib/node-path-mock.js +2 -2
  24. package/lib/required.d.ts +44 -0
  25. package/lib/required.js +76 -0
  26. package/lib/required.js.map +1 -0
  27. package/lib/utils.d.ts +30 -0
  28. package/lib/utils.js +146 -16
  29. package/lib/utils.js.map +1 -1
  30. package/package.json +1 -1
  31. package/tmp-environment.json +7 -11
  32. package/websql/fesm2022/tnp-core.mjs +176 -129
  33. package/websql/fesm2022/tnp-core.mjs.map +1 -1
  34. package/websql/lib/constants.d.ts +2 -1
  35. package/websql/lib/helpers.d.ts +4 -3
  36. package/websql/lib/utils.d.ts +30 -0
  37. package/websql/package.json +1 -1
  38. package/env.d.ts +0 -2
  39. package/environments/angular-node-app/env.angular-node-app.__.d.ts +0 -3
  40. package/environments/angular-node-app/env.angular-node-app.dev.d.ts +0 -3
  41. package/environments/angular-node-app/env.angular-node-app.localhost.d.ts +0 -3
  42. package/environments/angular-node-app/env.angular-node-app.prod.d.ts +0 -3
  43. package/environments/angular-node-app/env.angular-node-app.stage.d.ts +0 -3
  44. package/environments/docs-webapp/env.docs-webapp.__.d.ts +0 -3
  45. package/environments/electron-app/env.electron-app.__.d.ts +0 -3
  46. package/environments/electron-app/env.electron-app.prod.d.ts +0 -3
  47. package/environments/mobile-app/env.mobile-app.__.d.ts +0 -3
  48. package/environments/mobile-app/env.mobile-app.prod.d.ts +0 -3
  49. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.__.d.ts +0 -3
  50. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.prod.d.ts +0 -3
  51. package/environments/vscode-plugin/env.vscode-plugin.__.d.ts +0 -6
  52. package/environments/vscode-plugin/env.vscode-plugin.prod.d.ts +0 -4
@@ -1504,7 +1504,7 @@ var Utils;
1504
1504
  var UtilsStringRegex;
1505
1505
  (function (UtilsStringRegex) {
1506
1506
  UtilsStringRegex.containsNonAscii = (pathStringOrPathParts) => {
1507
- const hasNonAscii = /[^\u0000-\u0080]+/.test(pathStringOrPathParts); // eslint-disable-line no-control-regex
1507
+ const hasNonAscii = /[^\u0000-\u0080]+/.test(pathStringOrPathParts);
1508
1508
  return hasNonAscii;
1509
1509
  };
1510
1510
  })(UtilsStringRegex || (UtilsStringRegex = {}));
@@ -2949,21 +2949,177 @@ var UtilsSudo;
2949
2949
  //#endregion
2950
2950
  })(UtilsSudo || (UtilsSudo = {}));
2951
2951
  //#endregion
2952
- //#region TODO IN_PROGRESS utils files folders operations
2952
+ //#region utils files folders sync
2953
+ var UtilsFilesFoldersSync;
2954
+ (function (UtilsFilesFoldersSync) {
2955
+ //#region utils files folders sync / read file
2956
+ UtilsFilesFoldersSync.readFile = (absoluteFilePath, // @ts-ignore
2957
+ options) => {
2958
+ /* */
2959
+ /* */
2960
+ /* */
2961
+ /* */
2962
+ /* */
2963
+ /* */
2964
+ /* */
2965
+ /* */
2966
+ /* */
2967
+ /* */
2968
+ /* */
2969
+ /* */
2970
+ /* */
2971
+ /* */
2972
+ /* */
2973
+ /* */
2974
+ /* */
2975
+ /* */
2976
+ /* */
2977
+ /* */
2978
+ /* */
2979
+ /* */
2980
+ /* */
2981
+ /* */
2982
+ /* */
2983
+ /* */
2984
+ /* */
2985
+ /* */
2986
+ /* */
2987
+ /* */
2988
+ /* */
2989
+ /* */
2990
+ /* */
2991
+ /* */
2992
+ /* */
2993
+ /* */
2994
+ /* */
2995
+ /* */
2996
+ return (void 0);
2997
+ };
2998
+ //#endregion
2999
+ //#region utils files folders sync / write file
3000
+ UtilsFilesFoldersSync.writeFile = (absoluteFilePath, input, options) => {
3001
+ /* */
3002
+ /* */
3003
+ /* */
3004
+ /* */
3005
+ /* */
3006
+ /* */
3007
+ /* */
3008
+ /* */
3009
+ /* */
3010
+ /* */
3011
+ /* */
3012
+ /* */
3013
+ /* */
3014
+ /* */
3015
+ /* */
3016
+ /* */
3017
+ /* */
3018
+ /* */
3019
+ /* */
3020
+ /* */
3021
+ /* */
3022
+ /* */
3023
+ /* */
3024
+ /* */
3025
+ /* */
3026
+ /* */
3027
+ /* */
3028
+ /* */
3029
+ /* */
3030
+ /* */
3031
+ /* */
3032
+ /* */
3033
+ /* */
3034
+ /* */
3035
+ /* */
3036
+ /* */
3037
+ /* */
3038
+ /* */
3039
+ /* */
3040
+ /* */
3041
+ /* */
3042
+ /* */
3043
+ /* */
3044
+ /* */
3045
+ /* */
3046
+ /* */
3047
+ /* */
3048
+ /* */
3049
+ /* */
3050
+ /* */
3051
+ /* */
3052
+ /* */
3053
+ /* */
3054
+ /* */
3055
+ /* */
3056
+ /* */
3057
+ /* */
3058
+ /* */
3059
+ /* */
3060
+ /* */
3061
+ /* */
3062
+ /* */
3063
+ /* */
3064
+ /* */
3065
+ /* */
3066
+ /* */
3067
+ /* */
3068
+ /* */
3069
+ /* */
3070
+ /* */
3071
+ /* */
3072
+ /* */
3073
+ /* */
3074
+ /* */
3075
+ /* */
3076
+ /* */
3077
+ /* */
3078
+ /* */
3079
+ /* */
3080
+ /* */
3081
+ /* */
3082
+ /* */
3083
+ /* */
3084
+ /* */
3085
+ /* */
3086
+ /* */
3087
+ /* */
3088
+ /* */
3089
+ /* */
3090
+ /* */
3091
+ /* */
3092
+ /* */
3093
+ /* */
3094
+ /* */
3095
+ /* */
3096
+ /* */
3097
+ /* */
3098
+ /* */
3099
+ /* */
3100
+ /* */
3101
+ /* */
3102
+ /* */
3103
+ return (void 0);
3104
+ };
3105
+ //#endregion
3106
+ })(UtilsFilesFoldersSync || (UtilsFilesFoldersSync = {}));
3107
+ //#endregion
3108
+ //#region utils files folders
2953
3109
  /**
2954
3110
  * TODO @LAST @IN_PROGRESS
2955
3111
  * - utils for files and folders operations
2956
3112
  * - export when ready
2957
3113
  * - should be ready for everything async refactor
2958
3114
  */
2959
- var UtilsFilesFoldersOperations;
2960
- (function (UtilsFilesFoldersOperations) {
3115
+ var UtilsFilesFolders;
3116
+ (function (UtilsFilesFolders) {
2961
3117
  //#endregion
2962
3118
  //#region utils files folders operations / remove file or folder or link
2963
3119
  /**
2964
3120
  * remove file or folder or link
2965
3121
  */
2966
- UtilsFilesFoldersOperations.remove = async (absolutePath, options) => {
3122
+ const remove = async (absolutePath, options) => {
2967
3123
  /* */
2968
3124
  /* */
2969
3125
  /* */
@@ -2976,7 +3132,7 @@ var UtilsFilesFoldersOperations;
2976
3132
  /**
2977
3133
  * remove file or folder or link
2978
3134
  */
2979
- UtilsFilesFoldersOperations.removeByPattern = async (globPattern, options) => {
3135
+ const removeByPattern = async (globPattern, options) => {
2980
3136
  /* */
2981
3137
  /* */
2982
3138
  /* */
@@ -3046,13 +3202,12 @@ var UtilsFilesFoldersOperations;
3046
3202
  /* */
3047
3203
  return (void 0);
3048
3204
  }
3049
- UtilsFilesFoldersOperations.getFilesFromAsync = getFilesFromAsync;
3050
3205
  //#endregion
3051
3206
  //#region utils files folders operations / read file
3052
3207
  /**
3053
3208
  * TODO @IN_PROGRESS
3054
3209
  */
3055
- UtilsFilesFoldersOperations.readFileAsync = async (absoluteFilePath, options) => {
3210
+ const readFileAsync = async (absoluteFilePath, options) => {
3056
3211
  return void 0;
3057
3212
  };
3058
3213
  /* */
@@ -3060,7 +3215,7 @@ var UtilsFilesFoldersOperations;
3060
3215
  /**
3061
3216
  * TODO @IN_PROGRESS
3062
3217
  */
3063
- UtilsFilesFoldersOperations.writeFileAsync = async (absoluteFilePath, input, options) => {
3218
+ const writeFileAsync = async (absoluteFilePath, input, options) => {
3064
3219
  return void 0;
3065
3220
  };
3066
3221
  //#endregion
@@ -3068,7 +3223,7 @@ var UtilsFilesFoldersOperations;
3068
3223
  /**
3069
3224
  * TODO @IN_PROGRESS
3070
3225
  */
3071
- UtilsFilesFoldersOperations.isExistedSymlink = async (absoluteFilePath) => {
3226
+ const isExistedSymlink = async (absoluteFilePath) => {
3072
3227
  return void 0;
3073
3228
  };
3074
3229
  //#endregion
@@ -3076,11 +3231,11 @@ var UtilsFilesFoldersOperations;
3076
3231
  /**
3077
3232
  * TODO @IN_PROGRESS
3078
3233
  */
3079
- UtilsFilesFoldersOperations.isUnExistedLink = async (absoluteFilePath) => {
3234
+ const isUnExistedLink = async (absoluteFilePath) => {
3080
3235
  return void 0;
3081
3236
  };
3082
3237
  //#endregion
3083
- })(UtilsFilesFoldersOperations || (UtilsFilesFoldersOperations = {}));
3238
+ })(UtilsFilesFolders || (UtilsFilesFolders = {}));
3084
3239
  //#endregion
3085
3240
  //#region utils os
3086
3241
  var UtilsOs;
@@ -6920,28 +7075,10 @@ class HelpersMessages extends HelpersIsomorphic {
6920
7075
  }
6921
7076
  }
6922
7077
 
6923
- //#region import
6924
- /* */
6925
- /* */
6926
- /* */
6927
7078
  /* */
6928
7079
  /* */
6929
7080
  /* */
6930
7081
  /* */
6931
- /* */
6932
- /* */
6933
- /* */
6934
- /* */
6935
- /* */
6936
- /* */
6937
- /* */
6938
- /* */
6939
- /* */
6940
- /* */
6941
- //#region @browser
6942
- const encoding = 'utf8';
6943
- /* */
6944
- /* */
6945
7082
  const WEBSQL_PROC_MOCK_PROCESSES_PID = {};
6946
7083
  const WEBSQL_PROC_MOCK_PROCESSES_PPID = {};
6947
7084
  //#endregion
@@ -6984,6 +7121,7 @@ class HelpersCore extends HelpersMessages {
6984
7121
  //#region fields / getters
6985
7122
  /* */
6986
7123
  /* */
7124
+ /* */
6987
7125
  this.bigMaxBuffer = 2024 * 500;
6988
7126
  /* */
6989
7127
  /* */
@@ -8906,34 +9044,15 @@ class HelpersCore extends HelpersMessages {
8906
9044
  return (void 0);
8907
9045
  }
8908
9046
  /**
9047
+ * @deprecated use UtilsFilesFoldersSync.readFile
8909
9048
  * wrapper for fs.readFileSync
8910
9049
  */
8911
9050
  readFile(absoluteFilePath, // @ts-ignore
8912
9051
  defaultValueWhenNotExists = void 0, notTrim = false) {
8913
- /* */
8914
- /* */
8915
- /* */
8916
- /* */
8917
- /* */
8918
- /* */
8919
- /* */
8920
- /* */
8921
- /* */
8922
- /* */
8923
- /* */
8924
- /* */
8925
- /* */
8926
- /* */
8927
- /* */
8928
- /* */
8929
- /* */
8930
- /* */
8931
- /* */
8932
- /* */
8933
- /* */
8934
- /* */
8935
- /* */
8936
- return (void 0);
9052
+ return UtilsFilesFoldersSync.readFile(absoluteFilePath, {
9053
+ defaultValueWhenNotExists,
9054
+ notTrim,
9055
+ });
8937
9056
  }
8938
9057
  //#endregion
8939
9058
  //#region methods / read json
@@ -9027,80 +9146,6 @@ class HelpersCore extends HelpersMessages {
9027
9146
  /* */
9028
9147
  /* */
9029
9148
  /* */
9030
- /* */
9031
- /* */
9032
- /* */
9033
- /* */
9034
- /* */
9035
- /* */
9036
- /* */
9037
- /* */
9038
- /* */
9039
- /* */
9040
- /* */
9041
- /* */
9042
- /* */
9043
- /* */
9044
- /* */
9045
- /* */
9046
- /* */
9047
- /* */
9048
- /* */
9049
- /* */
9050
- /* */
9051
- /* */
9052
- /* */
9053
- /* */
9054
- /* */
9055
- /* */
9056
- /* */
9057
- /* */
9058
- /* */
9059
- /* */
9060
- /* */
9061
- /* */
9062
- /* */
9063
- /* */
9064
- /* */
9065
- /* */
9066
- /* */
9067
- /* */
9068
- /* */
9069
- /* */
9070
- /* */
9071
- /* */
9072
- /* */
9073
- /* */
9074
- /* */
9075
- /* */
9076
- /* */
9077
- /* */
9078
- /* */
9079
- /* */
9080
- /* */
9081
- /* */
9082
- /* */
9083
- /* */
9084
- /* */
9085
- /* */
9086
- /* */
9087
- /* */
9088
- /* */
9089
- /* */
9090
- /* */
9091
- /* */
9092
- /* */
9093
- /* */
9094
- /* */
9095
- /* */
9096
- /* */
9097
- /* */
9098
- /* */
9099
- /* */
9100
- /* */
9101
- /* */
9102
- /* */
9103
- /* */
9104
9149
  //#endregion
9105
9150
  //#region methods / write json
9106
9151
  /* */
@@ -9171,6 +9216,7 @@ class HelpersCore extends HelpersMessages {
9171
9216
  /* */
9172
9217
  /* */
9173
9218
  /* */
9219
+ /* */
9174
9220
  //#endregion
9175
9221
  //#region methods / folders from
9176
9222
  /* */
@@ -10020,6 +10066,7 @@ const notAllowedProjectNames = [
10020
10066
  ...notAllowedNames,
10021
10067
  ...backendNodejsOnlyFiles,
10022
10068
  ];
10069
+ const encoding = 'utf8';
10023
10070
 
10024
10071
  //#region imports & constants
10025
10072
  /* */
@@ -10165,5 +10212,5 @@ let Helpers = HelpersCore.InstanceCore;
10165
10212
  * Generated bundle index. Do not edit.
10166
10213
  */
10167
10214
 
10168
- export { $, BaselineSiteJoinprefix, CLI, CoreConfig, HelpersCore as CoreHelpers, CoreLibCategoryArr, CoreModels, FilePathMetaData, FilesNames, GlobalLibTypeName, Helpers, LibTypeArr, PREFIXES, PROGRESS_DATA, REGEX_REGION, TAGS, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsExecProc, UtilsJson, UtilsMessages, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsStringRegex, UtilsSudo, UtilsTerminal, UtilsYaml, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, http, https, isElevated, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requiredForDev, rimraf, spawn, tempFoldersName, urlRepoTaon, urlRepoTaonContainers, win32Path };
10215
+ export { $, BaselineSiteJoinprefix, CLI, CoreConfig, HelpersCore as CoreHelpers, CoreLibCategoryArr, CoreModels, FilePathMetaData, FilesNames, GlobalLibTypeName, Helpers, LibTypeArr, PREFIXES, PROGRESS_DATA, REGEX_REGION, TAGS, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsExecProc, UtilsFilesFoldersSync, UtilsJson, UtilsMessages, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsStringRegex, UtilsSudo, UtilsTerminal, UtilsYaml, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, encoding, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, http, https, isElevated, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requiredForDev, rimraf, spawn, tempFoldersName, urlRepoTaon, urlRepoTaonContainers, win32Path };
10169
10216
  //# sourceMappingURL=tnp-core.mjs.map