@nu-art/build-and-install 0.401.9 → 0.500.6

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 (67) hide show
  1. package/BuildAndInstall.d.ts +2 -2
  2. package/BuildAndInstall.js +10 -2
  3. package/config/consts.d.ts +2 -2
  4. package/config/consts.js +1 -1
  5. package/config/package/consts.d.ts +1 -1
  6. package/config/types/package/runtime-package.d.ts +1 -1
  7. package/config/types/project-config.d.ts +17 -2
  8. package/core/FilesCache.d.ts +5 -1
  9. package/core/FilesCache.js +5 -1
  10. package/core/Unit_HelpPrinter.d.ts +4 -7
  11. package/core/Unit_HelpPrinter.js +3 -11
  12. package/core/params.d.ts +2 -1
  13. package/core/params.js +12 -3
  14. package/core/types.d.ts +2 -2
  15. package/dependencies/UnitsDependencyMapper.d.ts +8 -0
  16. package/dependencies/UnitsDependencyMapper.js +58 -4
  17. package/exceptions/UnitPhaseException.d.ts +1 -1
  18. package/exports/IndicesMcpServer.js +1 -1
  19. package/package.json +5 -5
  20. package/phases/PhaseManager.d.ts +2 -2
  21. package/phases/PhaseManager.js +4 -4
  22. package/phases/definitions/consts.d.ts +3 -0
  23. package/phases/definitions/consts.js +7 -0
  24. package/phases/definitions/types.d.ts +1 -1
  25. package/templates/backend/proxy/proxy._ts +36 -31
  26. package/templates/firebase/config/database.rules.json +6 -0
  27. package/units/base/BaseUnit.d.ts +1 -1
  28. package/units/discovery/UnitsMapper.d.ts +3 -2
  29. package/units/discovery/resolvers/UnitMapper_Base.d.ts +2 -2
  30. package/units/discovery/resolvers/UnitMapper_FirebaseFunction.d.ts +12 -1
  31. package/units/discovery/resolvers/UnitMapper_FirebaseFunction.js +48 -18
  32. package/units/discovery/resolvers/UnitMapper_FirebaseHosting.d.ts +5 -9
  33. package/units/discovery/resolvers/UnitMapper_FirebaseHosting.js +3 -1
  34. package/units/discovery/resolvers/UnitMapper_Node.d.ts +1 -1
  35. package/units/discovery/resolvers/UnitMapper_Node.js +8 -15
  36. package/units/discovery/resolvers/UnitMapper_ViteHosting.d.ts +46 -0
  37. package/units/discovery/resolvers/UnitMapper_ViteHosting.js +59 -0
  38. package/units/implementations/Unit_NodeProject.d.ts +3 -2
  39. package/units/implementations/Unit_NodeProject.js +30 -6
  40. package/units/implementations/Unit_PackageJson.d.ts +8 -2
  41. package/units/implementations/Unit_PackageJson.js +46 -11
  42. package/units/implementations/Unit_TypescriptLib.d.ts +8 -2
  43. package/units/implementations/Unit_TypescriptLib.js +155 -4
  44. package/units/implementations/firebase/Unit_FirebaseFunctionsApp.d.ts +12 -2
  45. package/units/implementations/firebase/Unit_FirebaseFunctionsApp.js +73 -17
  46. package/units/implementations/firebase/Unit_FirebaseHostingApp.d.ts +19 -97
  47. package/units/implementations/firebase/Unit_FirebaseHostingApp.js +28 -290
  48. package/units/implementations/firebase/Unit_HostingApp.d.ts +59 -0
  49. package/units/implementations/firebase/Unit_HostingApp.js +225 -0
  50. package/units/implementations/firebase/Unit_ViteHostingApp.d.ts +10 -0
  51. package/units/implementations/firebase/Unit_ViteHostingApp.js +28 -0
  52. package/workspace/Workspace.d.ts +3 -1
  53. package/workspace/Workspace.js +2 -1
  54. package/config/types/configs/index.d.ts +0 -3
  55. package/config/types/configs/index.js +0 -3
  56. package/config/types/index.d.ts +0 -4
  57. package/config/types/index.js +0 -4
  58. package/config/types/package/index.d.ts +0 -2
  59. package/config/types/package/index.js +0 -2
  60. package/phases/definitions/index.d.ts +0 -2
  61. package/phases/definitions/index.js +0 -2
  62. package/phases/index.d.ts +0 -2
  63. package/phases/index.js +0 -2
  64. package/units/discovery/resolvers/index.d.ts +0 -4
  65. package/units/discovery/resolvers/index.js +0 -4
  66. package/units/index.d.ts +0 -6
  67. package/units/index.js +0 -6
@@ -0,0 +1,28 @@
1
+ import { Commando_NVM, CommandoException } from '@nu-art/commando';
2
+ import { Unit_HostingApp } from './Unit_HostingApp.js';
3
+ /**
4
+ * Firebase Hosting application unit (Vite bundler).
5
+ * Extends Unit_HostingApp; implements compile via vite build, launch via vite (dev server).
6
+ */
7
+ export class Unit_ViteHostingApp extends Unit_HostingApp {
8
+ constructor(config) {
9
+ super(config);
10
+ this.addToClassStack(Unit_ViteHostingApp);
11
+ }
12
+ async compileImpl() {
13
+ const commando = this.allocateCommando(Commando_NVM).applyNVM()
14
+ .cd(this.config.fullPath);
15
+ await this.executeAsyncCommando(commando, `${this.npmCommand('vite')} build`, (stdout, stderr, exitCode) => {
16
+ if (exitCode > 0)
17
+ throw new CommandoException(`Vite build failed`, stdout, stderr, exitCode);
18
+ });
19
+ }
20
+ async runApp() {
21
+ const commando = this.allocateCommando(Commando_NVM).applyNVM()
22
+ .setUID(this.config.key)
23
+ .cd(this.config.fullPath);
24
+ const port = this.config.servingPort;
25
+ await this.executeAsyncCommando(commando, `PORT=${port} ${this.npmCommand('vite')}`);
26
+ this.logWarning('HOSTING TERMINATED');
27
+ }
28
+ }
@@ -2,7 +2,9 @@ import { AnyConstructor, Logger } from '@nu-art/ts-common';
2
2
  import { BaiParams } from '../core/params.js';
3
3
  import { UnitsMapper } from '../units/discovery/UnitsMapper.js';
4
4
  import { UnitsDependencyMapper } from '../dependencies/UnitsDependencyMapper.js';
5
- import { BaseUnit, ProjectUnit, Unit_NodeProject } from '../units/index.js';
5
+ import { BaseUnit } from '../units/base/BaseUnit.js';
6
+ import { ProjectUnit } from '../units/base/ProjectUnit.js';
7
+ import { Unit_NodeProject } from '../units/implementations/Unit_NodeProject.js';
6
8
  /**
7
9
  * Central workspace manager for all units in the build system.
8
10
  *
@@ -1,6 +1,7 @@
1
1
  import { _keys, arrayToMap, BadImplementationException, flatArray, ImplementationMissingException, Logger } from '@nu-art/ts-common';
2
2
  import { UnitsDependencyMapper } from '../dependencies/UnitsDependencyMapper.js';
3
- import { ProjectUnit, Unit_NodeProject } from '../units/index.js';
3
+ import { ProjectUnit } from '../units/base/ProjectUnit.js';
4
+ import { Unit_NodeProject } from '../units/implementations/Unit_NodeProject.js';
4
5
  /**
5
6
  * Central workspace manager for all units in the build system.
6
7
  *
@@ -1,3 +0,0 @@
1
- export * from './firebasejson.js';
2
- export * from './firebaserc.js';
3
- export * from './package-json.js';
@@ -1,3 +0,0 @@
1
- export * from './firebasejson.js';
2
- export * from './firebaserc.js';
3
- export * from './package-json.js';
@@ -1,4 +0,0 @@
1
- export * from './core.js';
2
- export * from './configs/index.js';
3
- export * from './package/index.js';
4
- export * from './project-config.js';
@@ -1,4 +0,0 @@
1
- export * from './core.js';
2
- export * from './configs/index.js';
3
- export * from './package/index.js';
4
- export * from './project-config.js';
@@ -1,2 +0,0 @@
1
- export * from './package.js';
2
- export * from './runtime-package.js';
@@ -1,2 +0,0 @@
1
- export * from './package.js';
2
- export * from './runtime-package.js';
@@ -1,2 +0,0 @@
1
- export * from './types.js';
2
- export * from './consts.js';
@@ -1,2 +0,0 @@
1
- export * from './types.js';
2
- export * from './consts.js';
package/phases/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './definitions/index.js';
2
- export * from './PhaseManager.js';
package/phases/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './definitions/index.js';
2
- export * from './PhaseManager.js';
@@ -1,4 +0,0 @@
1
- export * from './UnitMapper_NodeLib.js';
2
- export * from './UnitMapper_NodeProject.js';
3
- export * from './UnitMapper_FirebaseFunction.js';
4
- export * from './UnitMapper_FirebaseHosting.js';
@@ -1,4 +0,0 @@
1
- export * from './UnitMapper_NodeLib.js';
2
- export * from './UnitMapper_NodeProject.js';
3
- export * from './UnitMapper_FirebaseFunction.js';
4
- export * from './UnitMapper_FirebaseHosting.js';
package/units/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './base/BaseUnit.js';
2
- export * from './base/ProjectUnit.js';
3
- export * from './implementations/Unit_TypescriptLib.js';
4
- export * from './implementations/Unit_PackageJson.js';
5
- export * from './implementations/Unit_NodeProject.js';
6
- export * from './base/types.js';
package/units/index.js DELETED
@@ -1,6 +0,0 @@
1
- export * from './base/BaseUnit.js';
2
- export * from './base/ProjectUnit.js';
3
- export * from './implementations/Unit_TypescriptLib.js';
4
- export * from './implementations/Unit_PackageJson.js';
5
- export * from './implementations/Unit_NodeProject.js';
6
- export * from './base/types.js';