@nu-art/build-and-install 0.300.8 → 0.400.1

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 (195) hide show
  1. package/build-and-install-v3.d.ts +29 -0
  2. package/build-and-install-v3.js +132 -0
  3. package/build-and-install-v3.js.map +1 -0
  4. package/build-and-install.js +18 -24
  5. package/build-and-install.js.map +1 -0
  6. package/core/consts.d.ts +7 -2
  7. package/core/consts.js +12 -9
  8. package/core/consts.js.map +1 -0
  9. package/core/exceptions/PhaseAggregatedException.d.ts +5 -0
  10. package/core/exceptions/PhaseAggregatedException.js +9 -0
  11. package/core/exceptions/PhaseAggregatedException.js.map +1 -0
  12. package/core/package/consts.d.ts +1 -1
  13. package/core/package/consts.js +7 -9
  14. package/core/package/consts.js.map +1 -0
  15. package/core/params/params.d.ts +18 -19
  16. package/core/params/params.js +142 -178
  17. package/core/params/params.js.map +1 -0
  18. package/core/types/configs/firebasejson.js +2 -2
  19. package/core/types/configs/firebasejson.js.map +1 -0
  20. package/core/types/configs/firebaserc.js +2 -2
  21. package/core/types/configs/firebaserc.js.map +1 -0
  22. package/core/types/configs/index.d.ts +3 -3
  23. package/core/types/configs/index.js +4 -19
  24. package/core/types/configs/index.js.map +1 -0
  25. package/core/types/configs/package-json.d.ts +2 -1
  26. package/core/types/configs/package-json.js +2 -2
  27. package/core/types/configs/package-json.js.map +1 -0
  28. package/core/types/core.js +2 -2
  29. package/core/types/core.js.map +1 -0
  30. package/core/types/index.d.ts +4 -4
  31. package/core/types/index.js +5 -20
  32. package/core/types/index.js.map +1 -0
  33. package/core/types/package/index.d.ts +2 -2
  34. package/core/types/package/index.js +3 -18
  35. package/core/types/package/index.js.map +1 -0
  36. package/core/types/package/package.d.ts +10 -14
  37. package/core/types/package/package.js +15 -12
  38. package/core/types/package/package.js.map +1 -0
  39. package/core/types/package/runtime-package.d.ts +2 -2
  40. package/core/types/package/runtime-package.js +2 -2
  41. package/core/types/package/runtime-package.js.map +1 -0
  42. package/core/types/project-config.d.ts +31 -2
  43. package/core/types/project-config.js +2 -2
  44. package/core/types/project-config.js.map +1 -0
  45. package/defaults/backend-proxy/proxy._ts +3 -1
  46. package/defaults/consts.d.ts +0 -7
  47. package/defaults/consts.js +10 -10
  48. package/defaults/consts.js.map +1 -0
  49. package/{v2/phase-runner → old}/PhaseRunnerDispatcher.d.ts +4 -4
  50. package/old/PhaseRunnerDispatcher.js +33 -0
  51. package/old/PhaseRunnerDispatcher.js.map +1 -0
  52. package/{v2/unit → old}/runner-dispatchers.d.ts +3 -3
  53. package/old/runner-dispatchers.js +4 -0
  54. package/old/runner-dispatchers.js.map +1 -0
  55. package/package.json +20 -15
  56. package/v3/PhaseManager.d.ts +26 -0
  57. package/v3/PhaseManager.js +144 -0
  58. package/v3/PhaseManager.js.map +1 -0
  59. package/v3/RunningStatusHandler.d.ts +16 -0
  60. package/v3/RunningStatusHandler.js +57 -0
  61. package/v3/RunningStatusHandler.js.map +1 -0
  62. package/v3/UnitsDependencyMapper/UnitsDependencyMapper.d.ts +52 -0
  63. package/v3/UnitsDependencyMapper/UnitsDependencyMapper.js +287 -0
  64. package/v3/UnitsDependencyMapper/UnitsDependencyMapper.js.map +1 -0
  65. package/v3/UnitsMapper/UnitsMapper.d.ts +21 -0
  66. package/v3/UnitsMapper/UnitsMapper.js +60 -0
  67. package/v3/UnitsMapper/UnitsMapper.js.map +1 -0
  68. package/v3/UnitsMapper/resolvers/UnitMapper_Base.d.ts +23 -0
  69. package/v3/UnitsMapper/resolvers/UnitMapper_Base.js +17 -0
  70. package/v3/UnitsMapper/resolvers/UnitMapper_Base.js.map +1 -0
  71. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseFunction.d.ts +62 -0
  72. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseFunction.js +56 -0
  73. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseFunction.js.map +1 -0
  74. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseHosting.d.ts +38 -0
  75. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseHosting.js +49 -0
  76. package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseHosting.js.map +1 -0
  77. package/v3/UnitsMapper/resolvers/UnitMapper_Node.d.ts +30 -0
  78. package/v3/UnitsMapper/resolvers/UnitMapper_Node.js +59 -0
  79. package/v3/UnitsMapper/resolvers/UnitMapper_Node.js.map +1 -0
  80. package/v3/UnitsMapper/resolvers/UnitMapper_NodeLib.d.ts +25 -0
  81. package/v3/UnitsMapper/resolvers/UnitMapper_NodeLib.js +29 -0
  82. package/v3/UnitsMapper/resolvers/UnitMapper_NodeLib.js.map +1 -0
  83. package/v3/UnitsMapper/resolvers/UnitMapper_NodeProject.d.ts +24 -0
  84. package/v3/UnitsMapper/resolvers/UnitMapper_NodeProject.js +23 -0
  85. package/v3/UnitsMapper/resolvers/UnitMapper_NodeProject.js.map +1 -0
  86. package/v3/UnitsMapper/resolvers/index.d.ts +4 -0
  87. package/v3/UnitsMapper/resolvers/index.js +5 -0
  88. package/v3/UnitsMapper/resolvers/index.js.map +1 -0
  89. package/v3/UnitsMapper/types.d.ts +25 -0
  90. package/v3/UnitsMapper/types.js +2 -0
  91. package/v3/UnitsMapper/types.js.map +1 -0
  92. package/v3/core/FileSystemUtils.d.ts +34 -0
  93. package/v3/core/FileSystemUtils.js +152 -0
  94. package/v3/core/FileSystemUtils.js.map +1 -0
  95. package/v3/core/FilesCache.d.ts +7 -0
  96. package/v3/core/FilesCache.js +34 -0
  97. package/v3/core/FilesCache.js.map +1 -0
  98. package/v3/core/Unit_HelpPrinter.d.ts +16 -0
  99. package/v3/core/Unit_HelpPrinter.js +48 -0
  100. package/v3/core/Unit_HelpPrinter.js.map +1 -0
  101. package/v3/core/types.d.ts +17 -0
  102. package/v3/core/types.js +6 -0
  103. package/v3/core/types.js.map +1 -0
  104. package/v3/phase/consts.d.ts +52 -0
  105. package/v3/phase/consts.js +127 -0
  106. package/v3/phase/consts.js.map +1 -0
  107. package/v3/phase/index.d.ts +2 -0
  108. package/v3/phase/index.js +3 -0
  109. package/v3/phase/index.js.map +1 -0
  110. package/v3/phase/types.d.ts +9 -0
  111. package/v3/phase/types.js +2 -0
  112. package/v3/phase/types.js.map +1 -0
  113. package/v3/units/BaseUnit.d.ts +46 -0
  114. package/v3/units/BaseUnit.js +120 -0
  115. package/v3/units/BaseUnit.js.map +1 -0
  116. package/v3/units/ProjectUnit.d.ts +18 -0
  117. package/v3/units/ProjectUnit.js +12 -0
  118. package/v3/units/ProjectUnit.js.map +1 -0
  119. package/v3/units/Unit_NodeProject.d.ts +30 -0
  120. package/v3/units/Unit_NodeProject.js +244 -0
  121. package/v3/units/Unit_NodeProject.js.map +1 -0
  122. package/v3/units/Unit_PackageJson.d.ts +18 -0
  123. package/v3/units/Unit_PackageJson.js +51 -0
  124. package/v3/units/Unit_PackageJson.js.map +1 -0
  125. package/v3/units/Unit_TypescriptLib.d.ts +45 -0
  126. package/v3/units/Unit_TypescriptLib.js +377 -0
  127. package/v3/units/Unit_TypescriptLib.js.map +1 -0
  128. package/v3/units/firebase/Unit_FirebaseFunctionsApp.d.ts +60 -0
  129. package/v3/units/firebase/Unit_FirebaseFunctionsApp.js +281 -0
  130. package/v3/units/firebase/Unit_FirebaseFunctionsApp.js.map +1 -0
  131. package/v3/units/firebase/Unit_FirebaseHostingApp.d.ts +49 -0
  132. package/v3/units/firebase/Unit_FirebaseHostingApp.js +100 -0
  133. package/v3/units/firebase/Unit_FirebaseHostingApp.js.map +1 -0
  134. package/v3/units/index.d.ts +5 -0
  135. package/v3/units/index.js +6 -0
  136. package/v3/units/index.js.map +1 -0
  137. package/core/params/types.d.ts +0 -51
  138. package/core/params/types.js +0 -2
  139. package/tsconfig.json +0 -23
  140. package/v2/phase/consts.d.ts +0 -53
  141. package/v2/phase/consts.js +0 -151
  142. package/v2/phase/index.d.ts +0 -2
  143. package/v2/phase/index.js +0 -18
  144. package/v2/phase/types.d.ts +0 -12
  145. package/v2/phase/types.js +0 -2
  146. package/v2/phase-runner/PhaseRunner.d.ts +0 -69
  147. package/v2/phase-runner/PhaseRunner.js +0 -472
  148. package/v2/phase-runner/PhaseRunnerDispatcher.js +0 -37
  149. package/v2/phase-runner/RunnerParams.d.ts +0 -12
  150. package/v2/phase-runner/RunnerParams.js +0 -9
  151. package/v2/phase-runner/consts.d.ts +0 -7
  152. package/v2/phase-runner/consts.js +0 -9
  153. package/v2/phase-runner/kaki.d.ts +0 -0
  154. package/v2/phase-runner/kaki.js +0 -1
  155. package/v2/phase-runner/types.d.ts +0 -13
  156. package/v2/phase-runner/types.js +0 -6
  157. package/v2/project/types.d.ts +0 -8
  158. package/v2/project/types.js +0 -2
  159. package/v2/screens/BAIScreen.d.ts +0 -22
  160. package/v2/screens/BAIScreen.js +0 -82
  161. package/v2/screens/BAIScreenManager.d.ts +0 -28
  162. package/v2/screens/BAIScreenManager.js +0 -77
  163. package/v2/screens/BAIScreen_Launch.d.ts +0 -28
  164. package/v2/screens/BAIScreen_Launch.js +0 -173
  165. package/v2/screens/BAIScreen_UnitList.d.ts +0 -36
  166. package/v2/screens/BAIScreen_UnitList.js +0 -203
  167. package/v2/unit/consts.d.ts +0 -6
  168. package/v2/unit/consts.js +0 -8
  169. package/v2/unit/core/BaseUnit.d.ts +0 -39
  170. package/v2/unit/core/BaseUnit.js +0 -138
  171. package/v2/unit/core/Unit_Python.d.ts +0 -16
  172. package/v2/unit/core/Unit_Python.js +0 -26
  173. package/v2/unit/core/Unit_Typescript.d.ts +0 -49
  174. package/v2/unit/core/Unit_Typescript.js +0 -143
  175. package/v2/unit/core/Unit_TypescriptLib.d.ts +0 -48
  176. package/v2/unit/core/Unit_TypescriptLib.js +0 -226
  177. package/v2/unit/core/Unit_TypescriptProject.d.ts +0 -31
  178. package/v2/unit/core/Unit_TypescriptProject.js +0 -194
  179. package/v2/unit/core/index.d.ts +0 -5
  180. package/v2/unit/core/index.js +0 -21
  181. package/v2/unit/firebase-units/Unit_FirebaseFunctionsApp.d.ts +0 -35
  182. package/v2/unit/firebase-units/Unit_FirebaseFunctionsApp.js +0 -309
  183. package/v2/unit/firebase-units/Unit_FirebaseHostingApp.d.ts +0 -24
  184. package/v2/unit/firebase-units/Unit_FirebaseHostingApp.js +0 -138
  185. package/v2/unit/firebase-units/consts.d.ts +0 -2
  186. package/v2/unit/firebase-units/consts.js +0 -9
  187. package/v2/unit/firebase-units/index.d.ts +0 -2
  188. package/v2/unit/firebase-units/index.js +0 -18
  189. package/v2/unit/runner-dispatchers.js +0 -6
  190. package/v2/unit/thunderstorm.d.ts +0 -171
  191. package/v2/unit/thunderstorm.js +0 -199
  192. package/v2/unit/tools/tools.d.ts +0 -2
  193. package/v2/unit/tools/tools.js +0 -15
  194. package/v2/unit/types.d.ts +0 -8
  195. package/v2/unit/types.js +0 -2
@@ -0,0 +1,56 @@
1
+ import { ImplementationMissingException, tsValidate_OptionalArray, tsValidateAnyString, tsValidateBoolean, tsValidateDynamicObject, tsValidateOptionalAnyNumber, tsValidateOptionalAnyString, tsValidateValue } from '@nu-art/ts-common';
2
+ import { UnitMapper_Node } from './UnitMapper_Node.js';
3
+ import { Unit_FirebaseFunctionsApp } from '../../units/firebase/Unit_FirebaseFunctionsApp.js';
4
+ import { resolve } from 'path';
5
+ import { BaiParam_SetEnv } from '../../../core/params/params.js';
6
+ const valuesValidator = {
7
+ defaultConfig: tsValidateOptionalAnyString,
8
+ envConfig: tsValidateOptionalAnyString,
9
+ projectId: tsValidateAnyString,
10
+ isLocal: tsValidateBoolean(false),
11
+ };
12
+ export class UnitMapper_FirebaseFunction_Class extends UnitMapper_Node {
13
+ static tsValidator_FirebaseFunction = {
14
+ type: tsValidateValue(['firebase-function']),
15
+ ignore: tsValidate_OptionalArray(tsValidateOptionalAnyString),
16
+ envs: tsValidateDynamicObject(valuesValidator, tsValidateAnyString),
17
+ debugPort: tsValidateOptionalAnyNumber,
18
+ basePort: tsValidateOptionalAnyNumber,
19
+ sslKey: tsValidateOptionalAnyString,
20
+ sslCert: tsValidateOptionalAnyString,
21
+ ...UnitMapper_Node.tsValidator_Node,
22
+ };
23
+ constructor() {
24
+ super(UnitMapper_FirebaseFunction_Class.tsValidator_FirebaseFunction);
25
+ }
26
+ async resolveNodeUnit(context) {
27
+ const outputDir = context.packageJson.publishConfig?.directory;
28
+ const env = this.runtimeParams[BaiParam_SetEnv.keyName];
29
+ const envUnitConfig = context.packageJson.unitConfig.envs[env];
30
+ if (!envUnitConfig)
31
+ throw new ImplementationMissingException(`Missing configuration for env: ${env}`);
32
+ const envConfig = {
33
+ defaultConfig: envUnitConfig.defaultConfig,
34
+ envConfig: envUnitConfig.envConfig,
35
+ projectId: envUnitConfig.projectId,
36
+ isLocal: envUnitConfig.isLocal ?? env === 'local'
37
+ };
38
+ const { type, ...unitConfig } = context.packageJson.unitConfig;
39
+ return new Unit_FirebaseFunctionsApp({
40
+ ...context.baseConfig,
41
+ ...Unit_FirebaseFunctionsApp.DefaultConfig_FirebaseFunction,
42
+ ...unitConfig,
43
+ envConfig,
44
+ isTopLevelApp: true,
45
+ hasSelfHotReload: unitConfig.hasSelfHotReload ?? false,
46
+ packageJson: context.packageJson,
47
+ customESLintConfig: context.customESLintConfig,
48
+ customTSConfig: context.customTSConfig,
49
+ output: resolve(context.baseConfig.fullPath, outputDir ?? Unit_FirebaseFunctionsApp.DefaultConfig_FirebaseFunction.output),
50
+ sslCert: resolve(context.baseConfig.fullPath, unitConfig.sslCert ?? Unit_FirebaseFunctionsApp.DefaultConfig_FirebaseFunction.sslCert),
51
+ sslKey: resolve(context.baseConfig.fullPath, unitConfig.sslKey ?? Unit_FirebaseFunctionsApp.DefaultConfig_FirebaseFunction.sslKey),
52
+ });
53
+ }
54
+ }
55
+ export const UnitMapper_FirebaseFunction = new UnitMapper_FirebaseFunction_Class();
56
+ //# sourceMappingURL=UnitMapper_FirebaseFunction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnitMapper_FirebaseFunction.js","sourceRoot":"/Users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AC;SAClI,CAAC,CAAC;IACJ,CAAC;;AAGF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,iCAAiC,EAAE,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { TypedMap } from '@nu-art/ts-common';
2
+ import { UnitMapper_Node, UnitMapper_NodeContext } from './UnitMapper_Node.js';
3
+ import { FirebaseHosting_EnvConfig, Unit_FirebaseHostingApp, UnitConfigJSON_FirebaseHosting } from '../../units/firebase/Unit_FirebaseHostingApp.js';
4
+ export declare class UnitMapper_FirebaseHosting_Class extends UnitMapper_Node<Unit_FirebaseHostingApp, UnitConfigJSON_FirebaseHosting> {
5
+ static tsValidator_FirebaseHosting: {
6
+ label: import("@nu-art/ts-common").Validator<string>;
7
+ customESLintConfig: import("@nu-art/ts-common").Validator<boolean>;
8
+ customTSConfig: import("@nu-art/ts-common").Validator<boolean>;
9
+ hasSelfHotReload: import("@nu-art/ts-common").Validator<boolean>;
10
+ type: import("@nu-art/ts-common").Validator<any>;
11
+ servingPort: import("@nu-art/ts-common").Validator<number>;
12
+ envs: (import("@nu-art/ts-common").ValidatorImpl<any> | ((input?: TypedMap<FirebaseHosting_EnvConfig> | undefined) => import("@nu-art/ts-common").InvalidResultObject<TypedMap<FirebaseHosting_EnvConfig>> | undefined))[];
13
+ hostingConfig: import("@nu-art/ts-common").ValidatorImpl<any>;
14
+ };
15
+ constructor();
16
+ protected resolveNodeUnit(context: UnitMapper_NodeContext<UnitConfigJSON_FirebaseHosting>): Promise<Unit_FirebaseHostingApp<{
17
+ envConfig: {
18
+ config: import("@nu-art/ts-common").TS_Object;
19
+ projectId: string;
20
+ isLocal: boolean;
21
+ };
22
+ isTopLevelApp: true;
23
+ hasSelfHotReload: boolean;
24
+ customESLintConfig: boolean;
25
+ customTSConfig: boolean;
26
+ output: string;
27
+ packageJson: import("../types.js").TS_PackageJSON<UnitConfigJSON_FirebaseHosting>;
28
+ label: string;
29
+ servingPort: number;
30
+ hostingConfig?: import("../../units/firebase/Unit_FirebaseHostingApp.js").FirebaseHostingConfig | undefined;
31
+ envs: TypedMap<FirebaseHosting_EnvConfig>;
32
+ fullPath: import("@nu-art/ts-common").AbsolutePath;
33
+ relativePath: import("@nu-art/ts-common").RelativePath;
34
+ key: string;
35
+ dependencies: import("@nu-art/ts-common").StringMap;
36
+ }>>;
37
+ }
38
+ export declare const UnitMapper_FirebaseHosting: UnitMapper_FirebaseHosting_Class;
@@ -0,0 +1,49 @@
1
+ import { ImplementationMissingException, tsValidateAnyString, tsValidateBoolean, tsValidateDynamicObject, tsValidateMustExist, tsValidateOptional, tsValidateOptionalAnyNumber, tsValidateValue } from '@nu-art/ts-common';
2
+ import { UnitMapper_Node } from './UnitMapper_Node.js';
3
+ import { Unit_FirebaseHostingApp } from '../../units/firebase/Unit_FirebaseHostingApp.js';
4
+ import { resolve } from 'path';
5
+ import { BaiParam_SetEnv } from '../../../core/params/params.js';
6
+ const valuesValidator = {
7
+ config: tsValidateMustExist,
8
+ projectId: tsValidateAnyString,
9
+ isLocal: tsValidateBoolean(false),
10
+ };
11
+ export class UnitMapper_FirebaseHosting_Class extends UnitMapper_Node {
12
+ static tsValidator_FirebaseHosting = {
13
+ type: tsValidateValue(['firebase-hosting']),
14
+ servingPort: tsValidateOptionalAnyNumber,
15
+ envs: tsValidateDynamicObject(valuesValidator, tsValidateAnyString),
16
+ hostingConfig: tsValidateOptional,
17
+ ...UnitMapper_Node.tsValidator_Node,
18
+ };
19
+ constructor() {
20
+ super(UnitMapper_FirebaseHosting_Class.tsValidator_FirebaseHosting);
21
+ }
22
+ async resolveNodeUnit(context) {
23
+ const outputDir = context.packageJson.publishConfig?.directory;
24
+ const env = this.runtimeParams[BaiParam_SetEnv.keyName];
25
+ const envUnitConfig = context.packageJson.unitConfig.envs[env];
26
+ if (!envUnitConfig)
27
+ throw new ImplementationMissingException(`Missing configuration for env: ${env}`);
28
+ const envConfig = {
29
+ config: envUnitConfig.config,
30
+ projectId: envUnitConfig.projectId,
31
+ isLocal: envUnitConfig.isLocal ?? env === 'local'
32
+ };
33
+ const { type, ...unitConfig } = context.packageJson.unitConfig;
34
+ return new Unit_FirebaseHostingApp({
35
+ ...context.baseConfig,
36
+ ...Unit_FirebaseHostingApp.DefaultConfig_FirebaseHosting,
37
+ ...unitConfig,
38
+ envConfig,
39
+ isTopLevelApp: true,
40
+ hasSelfHotReload: unitConfig.hasSelfHotReload ?? false,
41
+ customESLintConfig: context.customESLintConfig,
42
+ customTSConfig: context.customTSConfig,
43
+ output: resolve(context.baseConfig.fullPath, outputDir ?? Unit_FirebaseHostingApp.DefaultConfig_FirebaseHosting.output),
44
+ packageJson: context.packageJson,
45
+ });
46
+ }
47
+ }
48
+ export const UnitMapper_FirebaseHosting = new UnitMapper_FirebaseHosting_Class();
49
+ //# sourceMappingURL=UnitMapper_FirebaseHosting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnitMapper_FirebaseHosting.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/resolvers/UnitMapper_FirebaseHosting.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,8BAA8B,EAC9B,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,eAAe,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,eAAe,EAAyB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA4B,uBAAuB,EAAiC,MAAM,iDAAiD,CAAC;AACnJ,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,eAAe,GAAG;IACvB,MAAM,EAAE,mBAAmB;IAC3B,SAAS,EAAE,mBAAmB;IAC9B,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC;CACjC,CAAC;AAGF,MAAM,OAAO,gCACZ,SAAQ,eAAwE;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ACtC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,IAAI,uBAAuB,CAAC,6BAA6B,CAAC,MAAM,CAAC;YACvH,WAAW,EAAE,OAAO,CAAC,WAAW;SAChC,CAAC,CAAC;IACJ,CAAC;;AAGF,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,gCAAgC,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { TS_PackageJSON } from '../types.js';
2
+ import { TypeValidator } from '@nu-art/ts-common';
3
+ import { BaseUnit } from '../../units/index.js';
4
+ import { BaseUnitConfig, UnitConfigJSON_Base, UnitMapper_Base } from './UnitMapper_Base.js';
5
+ export type UnitConfigJSON_Node = UnitConfigJSON_Base & {
6
+ label: string;
7
+ customESLintConfig?: boolean;
8
+ customTSConfig?: boolean;
9
+ hasSelfHotReload?: boolean;
10
+ };
11
+ export type UnitMapper_NodeContext<ConfigJSON extends UnitConfigJSON_Node = UnitConfigJSON_Node> = {
12
+ path: string;
13
+ root: string;
14
+ packageJson: TS_PackageJSON<ConfigJSON>;
15
+ baseConfig: BaseUnitConfig;
16
+ customESLintConfig: boolean;
17
+ customTSConfig: boolean;
18
+ };
19
+ export declare abstract class UnitMapper_Node<T extends BaseUnit<any>, ConfigJSON extends UnitConfigJSON_Node = UnitConfigJSON_Node> extends UnitMapper_Base<T, ConfigJSON> {
20
+ private static invalidPaths;
21
+ static tsValidator_Node: {
22
+ label: import("@nu-art/ts-common").Validator<string>;
23
+ customESLintConfig: import("@nu-art/ts-common").Validator<boolean>;
24
+ customTSConfig: import("@nu-art/ts-common").Validator<boolean>;
25
+ hasSelfHotReload: import("@nu-art/ts-common").Validator<boolean>;
26
+ };
27
+ protected constructor(validator: TypeValidator<ConfigJSON>);
28
+ resolveUnit(path: string, root: string): Promise<T | undefined>;
29
+ protected abstract resolveNodeUnit(nodeContext: UnitMapper_NodeContext<ConfigJSON>): Promise<T | undefined>;
30
+ }
@@ -0,0 +1,59 @@
1
+ import { _keys, deepClone, tsValidate, tsValidateBoolean, tsValidateOptionalAnyString, tsValidateResult } from '@nu-art/ts-common';
2
+ import { FilesCache } from '../../core/FilesCache.js';
3
+ import { UnitMapper_Base } from './UnitMapper_Base.js';
4
+ import { FileSystemUtils } from '../../core/FileSystemUtils.js';
5
+ export class UnitMapper_Node extends UnitMapper_Base {
6
+ static invalidPaths = [];
7
+ static tsValidator_Node = {
8
+ label: tsValidateOptionalAnyString,
9
+ customESLintConfig: tsValidateBoolean(false),
10
+ customTSConfig: tsValidateBoolean(false),
11
+ hasSelfHotReload: tsValidateBoolean(false),
12
+ };
13
+ constructor(validator) {
14
+ super(validator);
15
+ }
16
+ async resolveUnit(path, root) {
17
+ if (UnitMapper_Node.invalidPaths.includes(path))
18
+ return;
19
+ const pathToFile = `${path}/__package.json`;
20
+ if (!await FileSystemUtils.file.exists(pathToFile))
21
+ return;
22
+ let packageJson = await FilesCache.load.json(pathToFile);
23
+ if (!packageJson)
24
+ return;
25
+ if (!packageJson.unitConfig) {
26
+ this.logWarning(`Found a package.json without unitConfig at: ${pathToFile}`);
27
+ UnitMapper_Node.invalidPaths.push(path);
28
+ return;
29
+ }
30
+ if (tsValidateResult(packageJson.unitConfig.type, this.validator.type))
31
+ return; // not the expected type for this mapper
32
+ packageJson = deepClone(packageJson);
33
+ tsValidate(packageJson.unitConfig, this.validator);
34
+ const dependencies = packageJson.dependencies;
35
+ if (dependencies)
36
+ packageJson.dependencies = _keys(dependencies).reduce((acc, key) => {
37
+ acc[key] = dependencies[key] === '?' ? `{{${key}}}` : dependencies[key];
38
+ return acc;
39
+ }, {});
40
+ const devDependencies = packageJson.devDependencies;
41
+ if (devDependencies)
42
+ packageJson.devDependencies = _keys(devDependencies).reduce((acc, key) => {
43
+ acc[key] = devDependencies[key] === '?' ? `{{${key}}}` : devDependencies[key];
44
+ return acc;
45
+ }, {});
46
+ Object.freeze(packageJson);
47
+ const baseConfig = {
48
+ key: packageJson.name,
49
+ fullPath: path,
50
+ relativePath: path.replace(root, '.'),
51
+ label: packageJson.unitConfig.label ?? packageJson.name,
52
+ dependencies: { ...dependencies, ...packageJson.devDependencies },
53
+ };
54
+ const customESLintConfig = packageJson.unitConfig.customESLintConfig ?? false;
55
+ const customTSConfig = packageJson.unitConfig.customTSConfig ?? false;
56
+ return this.resolveNodeUnit({ path, root, packageJson, baseConfig, customESLintConfig, customTSConfig });
57
+ }
58
+ }
59
+ //# sourceMappingURL=UnitMapper_Node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnitMapper_Node.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/resolvers/UnitMapper_Node.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,EACS,SAAS,EAEvB,UAAU,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,gBAAgB,EAGhB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAsC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAmB9D,MAAM,OAAgB,eAGrB,SAAQ,eAA8B;IAE9B,MAAM,CAAC,YAAY,GAAa,EAAE,CAAC;IAC3C,MAAM,CAAC,gBAAgB,GAAG;QACzB,KAAK,EAAE,2BAA2B;QAClC,kBAAkB,EAAE,iBAAiB,CAAC,KAAK,CAAC;QAC5C,cAAc,EAAE,iBAAiB,CAAC,KAAK,CAAC;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,KAAK,CAAC;KAC1C,CAAC;IAEF,YAAsB,SAAoC;QACzD,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,IAAY,EAAE,IAAY;QAClD,IAAI,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9C,OAAO;QAER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AAG,EAAE,GAAG,EAAE,EAAE;gBACnF,GAAG,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;gBAC9E,OAAO,GAAG,CAAC;YACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QAER,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAE3B,MAAM,UAAU,GAAmB;YAClC,GAAG,EAAE,WAAW,CAAC,IAAI;YACrB,QAAQ,EAAE,IAAoB;YAC9B,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAiB;YACrD,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI;YACvD,YAAY,EAAE,EAAC,GAAG,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAC;SAC/D,CAAC;QAEF,MAAM,kBAAkB,GAAG,WAAW,CAAC,UAAU,CAAC,kBAAkB,IAAI,KAAK,CAAC;QAC9E,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,CAAC,cAAc,IAAI,KAAK,CAAC;QACtE,OAAO,IAAI,CAAC,eAAe,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAC,CAAC,CAAC;IACxG,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Unit_TypescriptLib } from '../../units/index.js';
2
+ import { UnitMapper_Node, UnitMapper_NodeContext } from './UnitMapper_Node.js';
3
+ export declare class UnitMapper_NodeLib_Class extends UnitMapper_Node<Unit_TypescriptLib> {
4
+ static tsValidator_NodeProject: {
5
+ label: import("@nu-art/ts-common").Validator<string>;
6
+ customESLintConfig: import("@nu-art/ts-common").Validator<boolean>;
7
+ customTSConfig: import("@nu-art/ts-common").Validator<boolean>;
8
+ hasSelfHotReload: import("@nu-art/ts-common").Validator<boolean>;
9
+ type: import("@nu-art/ts-common").Validator<any>;
10
+ };
11
+ constructor();
12
+ protected resolveNodeUnit(context: UnitMapper_NodeContext): Promise<Unit_TypescriptLib<{
13
+ hasSelfHotReload: boolean;
14
+ customESLintConfig: boolean;
15
+ customTSConfig: boolean;
16
+ output: string;
17
+ packageJson: import("../types.js").TS_PackageJSON<import("./UnitMapper_Node.js").UnitConfigJSON_Node>;
18
+ fullPath: import("@nu-art/ts-common").AbsolutePath;
19
+ relativePath: import("@nu-art/ts-common").RelativePath;
20
+ label: string;
21
+ key: string;
22
+ dependencies: import("@nu-art/ts-common").StringMap;
23
+ }>>;
24
+ }
25
+ export declare const UnitMapper_NodeLib: UnitMapper_NodeLib_Class;
@@ -0,0 +1,29 @@
1
+ import { Unit_TypescriptLib } from '../../units/index.js';
2
+ import { BadImplementationException, tsValidateValue } from '@nu-art/ts-common';
3
+ import { UnitMapper_Node } from './UnitMapper_Node.js';
4
+ import { resolve } from 'path';
5
+ export class UnitMapper_NodeLib_Class extends UnitMapper_Node {
6
+ static tsValidator_NodeProject = {
7
+ type: tsValidateValue(['typescript-lib']),
8
+ ...UnitMapper_Node.tsValidator_Node,
9
+ };
10
+ constructor() {
11
+ super(UnitMapper_NodeLib_Class.tsValidator_NodeProject);
12
+ }
13
+ async resolveNodeUnit(context) {
14
+ const outputDir = context.packageJson.publishConfig?.directory;
15
+ if (!outputDir)
16
+ throw new BadImplementationException('package.json MUST specify \'publishConfig.directory\'');
17
+ const unitConfig = context.packageJson.unitConfig;
18
+ return new Unit_TypescriptLib({
19
+ ...context.baseConfig,
20
+ hasSelfHotReload: unitConfig.hasSelfHotReload ?? false,
21
+ customESLintConfig: context.customESLintConfig,
22
+ customTSConfig: context.customTSConfig,
23
+ output: resolve(context.baseConfig.fullPath, outputDir),
24
+ packageJson: context.packageJson,
25
+ });
26
+ }
27
+ }
28
+ export const UnitMapper_NodeLib = new UnitMapper_NodeLib_Class();
29
+ //# sourceMappingURL=UnitMapper_NodeLib.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnitMapper_NodeLib.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/resolvers/UnitMapper_NodeLib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,0BAA0B,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAC,eAAe,EAAyB,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAG7B,MAAM,OAAO,wBACZ,SAAQ,eAAmC;IAE3C,MAAM,CAAC,uBAAuB,GAAG;QAChC,IAAI,EAAE,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;QACzC,GAAG,eAAe,CAAC,gBAAgB;KACnC,CAAC;IAEF;QACC,KAAK,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;IACzD,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA+B;QAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,SAAS,CAAC;QAC/D,IAAI,CAAC,SAAS;YACb,MAAM,IAAI,0BAA0B,CAAC,uDAAuD,CAAC,CAAC;QAE/F,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC;QAElD,OAAO,IAAI,kBAAkB,CAAC;YAC7B,GAAG,OAAO,CAAC,UAAU;YACrB,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,IAAI,KAAK;YACtD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC;YACvD,WAAW,EAAE,OAAO,CAAC,WAAW;SAChC,CAAC,CAAC;IACJ,CAAC;;AAGF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Unit_NodeProject } from '../../units/index.js';
2
+ import { UnitMapper_Node, UnitMapper_NodeContext } from './UnitMapper_Node.js';
3
+ export declare class UnitMapper_NodeProject_Class extends UnitMapper_Node<Unit_NodeProject> {
4
+ static tsValidator_NodeProject: {
5
+ label: import("@nu-art/ts-common").Validator<string>;
6
+ customESLintConfig: import("@nu-art/ts-common").Validator<boolean>;
7
+ customTSConfig: import("@nu-art/ts-common").Validator<boolean>;
8
+ hasSelfHotReload: import("@nu-art/ts-common").Validator<boolean>;
9
+ type: import("@nu-art/ts-common").Validator<any>;
10
+ };
11
+ constructor();
12
+ protected resolveNodeUnit(context: UnitMapper_NodeContext): Promise<Unit_NodeProject<{
13
+ isTopLevelApp: true;
14
+ isRoot: true;
15
+ hasSelfHotReload: boolean;
16
+ packageJson: import("../types.js").TS_PackageJSON<import("./UnitMapper_Node.js").UnitConfigJSON_Node>;
17
+ fullPath: import("@nu-art/ts-common").AbsolutePath;
18
+ relativePath: import("@nu-art/ts-common").RelativePath;
19
+ label: string;
20
+ key: string;
21
+ dependencies: import("@nu-art/ts-common").StringMap;
22
+ }>>;
23
+ }
24
+ export declare const UnitMapper_NodeProject: UnitMapper_NodeProject_Class;
@@ -0,0 +1,23 @@
1
+ import { Unit_NodeProject } from '../../units/index.js';
2
+ import { tsValidateValue } from '@nu-art/ts-common';
3
+ import { UnitMapper_Node } from './UnitMapper_Node.js';
4
+ export class UnitMapper_NodeProject_Class extends UnitMapper_Node {
5
+ static tsValidator_NodeProject = {
6
+ type: tsValidateValue(['node-project']),
7
+ ...UnitMapper_Node.tsValidator_Node,
8
+ };
9
+ constructor() {
10
+ super(UnitMapper_NodeProject_Class.tsValidator_NodeProject);
11
+ }
12
+ async resolveNodeUnit(context) {
13
+ return new Unit_NodeProject({
14
+ ...context.baseConfig,
15
+ isTopLevelApp: true,
16
+ isRoot: true,
17
+ hasSelfHotReload: true,
18
+ packageJson: context.packageJson,
19
+ });
20
+ }
21
+ }
22
+ export const UnitMapper_NodeProject = new UnitMapper_NodeProject_Class();
23
+ //# sourceMappingURL=UnitMapper_NodeProject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnitMapper_NodeProject.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/resolvers/UnitMapper_NodeProject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,eAAe,EAAyB,MAAM,sBAAsB,CAAC;AAG7E,MAAM,OAAO,4BACZ,SAAQ,eAAiC;IAEzC,MAAM,CAAC,uBAAuB,GAAG;QAChC,IAAI,EAAE,eAAe,CAAC,CAAC,cAAc,CAAC,CAAC;QACvC,GAAG,eAAe,CAAC,gBAAgB;KACnC,CAAC;IAEF;QACC,KAAK,CAAC,4BAA4B,CAAC,uBAAuB,CAAC,CAAC;IAC7D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA+B;QAC9D,OAAO,IAAI,gBAAgB,CAAC;YAC3B,GAAG,OAAO,CAAC,UAAU;YACrB,aAAa,EAAE,IAAI;YACnB,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,OAAO,CAAC,WAAW;SAChC,CAAC,CAAC;IACJ,CAAC;;AAGF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './UnitMapper_NodeLib.js';
2
+ export * from './UnitMapper_NodeProject.js';
3
+ export * from './UnitMapper_FirebaseFunction.js';
4
+ export * from './UnitMapper_FirebaseHosting.js';
@@ -0,0 +1,5 @@
1
+ export * from './UnitMapper_NodeLib.js';
2
+ export * from './UnitMapper_NodeProject.js';
3
+ export * from './UnitMapper_FirebaseFunction.js';
4
+ export * from './UnitMapper_FirebaseHosting.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/resolvers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { StringMap, TS_Object } from '@nu-art/ts-common';
2
+ export type TS_UnitConfig = TS_Object & {
3
+ type: string;
4
+ key: string;
5
+ label: string;
6
+ };
7
+ export type TS_PackageJSON<T = any> = {
8
+ 'name': string;
9
+ 'description'?: string;
10
+ version: string;
11
+ private?: boolean;
12
+ 'publishConfig'?: {
13
+ 'directory': string;
14
+ 'linkDirectory': boolean;
15
+ };
16
+ 'license'?: 'Apache-2.0' | string;
17
+ 'author'?: string;
18
+ 'main'?: string;
19
+ 'types'?: string;
20
+ 'scripts'?: StringMap;
21
+ 'dependencies'?: StringMap;
22
+ 'devDependencies'?: StringMap;
23
+ '_moduleAliases'?: StringMap;
24
+ unitConfig: T;
25
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/UnitsMapper/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import { StringMap } from '@nu-art/ts-common';
2
+ export declare const DEFAULT_TEMPLATE_PATTERN: RegExp;
3
+ export declare const DEFAULT_OLD_TEMPLATE_PATTERN: RegExp;
4
+ export declare const FileSystemUtils: {
5
+ file: {
6
+ exists: (pathToFile: string) => Promise<boolean>;
7
+ delete: (pathToFile: string, mustExist?: boolean) => Promise<void>;
8
+ write: (pathToFile: string, content: string) => Promise<void>;
9
+ read: (pathToFile: string) => Promise<string>;
10
+ copy: (sourcePath: string, targetPath: string) => Promise<void>;
11
+ template: {
12
+ read: (pathToFile: string, params: StringMap, pattern?: RegExp) => Promise<string>;
13
+ transform: (input: string, params: StringMap, pattern?: RegExp) => string;
14
+ write: (pathToFile: string, content: string, params: StringMap, pattern?: RegExp) => Promise<void>;
15
+ copy: (sourcePath: string, targetPath: string, params: StringMap, pattern?: RegExp) => Promise<void>;
16
+ };
17
+ };
18
+ folder: {
19
+ delete: (pathToFolder: string, mustExist?: boolean) => Promise<void>;
20
+ empty: (pathToFolder: string, mustExist?: boolean) => Promise<void>;
21
+ create: (pathToFolder: string) => Promise<string | void>;
22
+ list: ((pathToFolder: string) => Promise<string[]>) & {
23
+ forEach: ((pathToFolder: string, callback: (path: string) => Promise<any>) => Promise<void>) & {
24
+ file: (pathToFolder: string, callback: (path: string) => Promise<any>) => Promise<void>;
25
+ folder: (pathToFolder: string, callback: (path: string) => Promise<any>) => Promise<void>;
26
+ };
27
+ };
28
+ };
29
+ symlink: {
30
+ create: (targetPath: string, linkPath: string) => Promise<void>;
31
+ delete: (pathToLink: string, mustExist?: boolean) => Promise<void>;
32
+ read: (pathToLink: string) => Promise<string>;
33
+ };
34
+ };
@@ -0,0 +1,152 @@
1
+ import { promises as _fs } from 'fs';
2
+ import { resolve } from 'path';
3
+ import { BadImplementationException, exists } from '@nu-art/ts-common';
4
+ async function isFile(path) {
5
+ return (await _fs.stat(path)).isFile();
6
+ }
7
+ async function isFolder(path) {
8
+ return (await _fs.stat(path)).isDirectory();
9
+ }
10
+ async function assertFile(path) {
11
+ if (!(await isFile(path)))
12
+ throw new BadImplementationException(`Expected file but found directory or non-file: ${path}`);
13
+ }
14
+ async function assertFolder(path) {
15
+ if (!(await isFolder(path)))
16
+ throw new BadImplementationException(`Expected folder but found file or non-directory: ${path}`);
17
+ }
18
+ async function fileExists(path) {
19
+ try {
20
+ await _fs.access(path);
21
+ return true;
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ }
27
+ async function assertExists(path, mustExist, type) {
28
+ const doesExist = await fileExists(path);
29
+ if (!doesExist) {
30
+ if (mustExist)
31
+ throw new BadImplementationException(`${type} does not exist: ${path}`);
32
+ return false;
33
+ }
34
+ return true;
35
+ }
36
+ const escapeRegExp = (string) => string.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
37
+ export const DEFAULT_TEMPLATE_PATTERN = new RegExp(`\{\{(\\S*?)\}\}`);
38
+ export const DEFAULT_OLD_TEMPLATE_PATTERN = new RegExp(`(?<!\\\\)\\$([a-zA-Z]\\w{2,})`);
39
+ export const FileSystemUtils = {
40
+ file: {
41
+ exists: async (pathToFile) => {
42
+ return await fileExists(pathToFile);
43
+ },
44
+ delete: async (pathToFile, mustExist = false) => {
45
+ if (!await assertExists(pathToFile, mustExist, 'File'))
46
+ return;
47
+ await assertFile(pathToFile);
48
+ return _fs.rm(pathToFile);
49
+ },
50
+ write: async (pathToFile, content) => {
51
+ await FileSystemUtils.folder.create(resolve(pathToFile, '..'));
52
+ return _fs.writeFile(pathToFile, content, 'utf-8');
53
+ },
54
+ read: async (pathToFile) => {
55
+ await assertFile(pathToFile);
56
+ return _fs.readFile(pathToFile, 'utf-8');
57
+ },
58
+ copy: async (sourcePath, targetPath) => {
59
+ await assertExists(targetPath, false, 'File');
60
+ await assertFile(sourcePath);
61
+ await FileSystemUtils.folder.create(resolve(targetPath, '..'));
62
+ return _fs.copyFile(sourcePath, targetPath);
63
+ },
64
+ template: {
65
+ read: async (pathToFile, params, pattern = DEFAULT_TEMPLATE_PATTERN) => {
66
+ const content = await FileSystemUtils.file.read(pathToFile);
67
+ return FileSystemUtils.file.template.transform(content, params, pattern);
68
+ },
69
+ transform: (input, params, pattern = DEFAULT_TEMPLATE_PATTERN) => {
70
+ let match;
71
+ while (match = input.match(pattern)) {
72
+ const value = params[match[1]];
73
+ if (!exists(value))
74
+ throw new BadImplementationException(`Missing template param: ${match[1]}`);
75
+ const fullMatchRegex = new RegExp(escapeRegExp(match[0]), 'g');
76
+ input = input.replace(fullMatchRegex, value);
77
+ }
78
+ return input;
79
+ },
80
+ write: async (pathToFile, content, params, pattern = DEFAULT_TEMPLATE_PATTERN) => {
81
+ const transformedContent = FileSystemUtils.file.template.transform(content, params, pattern);
82
+ return FileSystemUtils.file.write(pathToFile, transformedContent);
83
+ },
84
+ copy: async (sourcePath, targetPath, params, pattern = DEFAULT_TEMPLATE_PATTERN) => {
85
+ const content = await FileSystemUtils.file.read(sourcePath);
86
+ const transformedContent = FileSystemUtils.file.template.transform(content, params, pattern);
87
+ return FileSystemUtils.file.write(targetPath, transformedContent);
88
+ }
89
+ },
90
+ },
91
+ folder: {
92
+ delete: async (pathToFolder, mustExist = false) => {
93
+ if (!await assertExists(pathToFolder, mustExist, 'Folder'))
94
+ return;
95
+ await assertFolder(pathToFolder);
96
+ return _fs.rm(pathToFolder, { recursive: true, force: true });
97
+ },
98
+ empty: async (pathToFolder, mustExist = true) => {
99
+ if (!await assertExists(pathToFolder, mustExist, 'Folder'))
100
+ return;
101
+ await assertFolder(pathToFolder);
102
+ const entries = await _fs.readdir(pathToFolder);
103
+ await Promise.all(entries.map(entry => _fs.rm(resolve(pathToFolder, entry), { recursive: true, force: true })));
104
+ },
105
+ create: async (pathToFolder) => {
106
+ if (await fileExists(pathToFolder))
107
+ return assertFolder(pathToFolder);
108
+ return _fs.mkdir(pathToFolder, { recursive: true });
109
+ },
110
+ list: Object.assign(async (pathToFolder) => {
111
+ return await _fs.readdir(pathToFolder);
112
+ }, {
113
+ forEach: Object.assign(async (pathToFolder, callback) => {
114
+ const entries = await _fs.readdir(pathToFolder);
115
+ for (const entry of entries)
116
+ await callback(resolve(pathToFolder, entry));
117
+ }, {
118
+ file: async (pathToFolder, callback) => {
119
+ await FileSystemUtils.folder.list.forEach(pathToFolder, async (entry) => {
120
+ if (!await isFile(entry))
121
+ return;
122
+ await callback(entry);
123
+ });
124
+ },
125
+ folder: async (pathToFolder, callback) => {
126
+ await FileSystemUtils.folder.list.forEach(pathToFolder, async (entry) => {
127
+ if (!await isFolder(entry))
128
+ return;
129
+ await callback(entry);
130
+ });
131
+ }
132
+ })
133
+ })
134
+ },
135
+ symlink: {
136
+ create: async (targetPath, linkPath) => {
137
+ return _fs.symlink(targetPath, linkPath);
138
+ },
139
+ delete: async (pathToLink, mustExist = false) => {
140
+ if (!await assertExists(pathToLink, mustExist, 'Symlink'))
141
+ return;
142
+ const stat = await _fs.lstat(pathToLink);
143
+ if (!stat.isSymbolicLink())
144
+ throw new BadImplementationException(`Expected symlink but found something else: ${pathToLink}`);
145
+ return _fs.unlink(pathToLink);
146
+ },
147
+ read: async (pathToLink) => {
148
+ return _fs.readlink(pathToLink);
149
+ }
150
+ }
151
+ };
152
+ //# sourceMappingURL=FileSystemUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileSystemUtils.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/build-and-install/src/main/","sources":["v3/core/FileSystemUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,IAAI,GAAG,EAAC,MAAM,IAAI,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAC,0BAA0B,EAAE,MAAM,EAAY,MAAM,mBAAmB,CAAC;AAGhF,KAAK,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7C,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACrC,IAAI,CA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,KAAK,EAAE,UAAkB,EAAE,QAAgB,EAAE,EAAE;YACtD,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,UAAkB,EAAE,SAAS,GAAG,KAAK,EAAE,EAAE;YACvD,IAAI,CAAC,MAAM,YAAY,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC;gBACxD,OAAO;YACR,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACzB,MAAM,IAAI,0BAA0B,CAAC,8CAA8C,UAAU,EAAE,CAAC,CAAC;YAClG,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC/B,CAAC;QAED,IAAI,EAAE,KAAK,EAAE,UAAkB,EAAE,EAAE;YAClC,OAAO,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC;KACD;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const FilesCache: {
2
+ clear: () => {};
3
+ load: {
4
+ json: <T>(pathToFile: string) => Promise<T>;
5
+ text: (pathToFile: string) => Promise<string>;
6
+ };
7
+ };