@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.
- package/BuildAndInstall.d.ts +2 -2
- package/BuildAndInstall.js +10 -2
- package/config/consts.d.ts +2 -2
- package/config/consts.js +1 -1
- package/config/package/consts.d.ts +1 -1
- package/config/types/package/runtime-package.d.ts +1 -1
- package/config/types/project-config.d.ts +17 -2
- package/core/FilesCache.d.ts +5 -1
- package/core/FilesCache.js +5 -1
- package/core/Unit_HelpPrinter.d.ts +4 -7
- package/core/Unit_HelpPrinter.js +3 -11
- package/core/params.d.ts +2 -1
- package/core/params.js +12 -3
- package/core/types.d.ts +2 -2
- package/dependencies/UnitsDependencyMapper.d.ts +8 -0
- package/dependencies/UnitsDependencyMapper.js +58 -4
- package/exceptions/UnitPhaseException.d.ts +1 -1
- package/exports/IndicesMcpServer.js +1 -1
- package/package.json +5 -5
- package/phases/PhaseManager.d.ts +2 -2
- package/phases/PhaseManager.js +4 -4
- package/phases/definitions/consts.d.ts +3 -0
- package/phases/definitions/consts.js +7 -0
- package/phases/definitions/types.d.ts +1 -1
- package/templates/backend/proxy/proxy._ts +36 -31
- package/templates/firebase/config/database.rules.json +6 -0
- package/units/base/BaseUnit.d.ts +1 -1
- package/units/discovery/UnitsMapper.d.ts +3 -2
- package/units/discovery/resolvers/UnitMapper_Base.d.ts +2 -2
- package/units/discovery/resolvers/UnitMapper_FirebaseFunction.d.ts +12 -1
- package/units/discovery/resolvers/UnitMapper_FirebaseFunction.js +48 -18
- package/units/discovery/resolvers/UnitMapper_FirebaseHosting.d.ts +5 -9
- package/units/discovery/resolvers/UnitMapper_FirebaseHosting.js +3 -1
- package/units/discovery/resolvers/UnitMapper_Node.d.ts +1 -1
- package/units/discovery/resolvers/UnitMapper_Node.js +8 -15
- package/units/discovery/resolvers/UnitMapper_ViteHosting.d.ts +46 -0
- package/units/discovery/resolvers/UnitMapper_ViteHosting.js +59 -0
- package/units/implementations/Unit_NodeProject.d.ts +3 -2
- package/units/implementations/Unit_NodeProject.js +30 -6
- package/units/implementations/Unit_PackageJson.d.ts +8 -2
- package/units/implementations/Unit_PackageJson.js +46 -11
- package/units/implementations/Unit_TypescriptLib.d.ts +8 -2
- package/units/implementations/Unit_TypescriptLib.js +155 -4
- package/units/implementations/firebase/Unit_FirebaseFunctionsApp.d.ts +12 -2
- package/units/implementations/firebase/Unit_FirebaseFunctionsApp.js +73 -17
- package/units/implementations/firebase/Unit_FirebaseHostingApp.d.ts +19 -97
- package/units/implementations/firebase/Unit_FirebaseHostingApp.js +28 -290
- package/units/implementations/firebase/Unit_HostingApp.d.ts +59 -0
- package/units/implementations/firebase/Unit_HostingApp.js +225 -0
- package/units/implementations/firebase/Unit_ViteHostingApp.d.ts +10 -0
- package/units/implementations/firebase/Unit_ViteHostingApp.js +28 -0
- package/workspace/Workspace.d.ts +3 -1
- package/workspace/Workspace.js +2 -1
- package/config/types/configs/index.d.ts +0 -3
- package/config/types/configs/index.js +0 -3
- package/config/types/index.d.ts +0 -4
- package/config/types/index.js +0 -4
- package/config/types/package/index.d.ts +0 -2
- package/config/types/package/index.js +0 -2
- package/phases/definitions/index.d.ts +0 -2
- package/phases/definitions/index.js +0 -2
- package/phases/index.d.ts +0 -2
- package/phases/index.js +0 -2
- package/units/discovery/resolvers/index.d.ts +0 -4
- package/units/discovery/resolvers/index.js +0 -4
- package/units/index.d.ts +0 -6
- 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
|
+
}
|
package/workspace/Workspace.d.ts
CHANGED
|
@@ -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
|
|
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
|
*
|
package/workspace/Workspace.js
CHANGED
|
@@ -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
|
|
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
|
*
|
package/config/types/index.d.ts
DELETED
package/config/types/index.js
DELETED
package/phases/index.d.ts
DELETED
package/phases/index.js
DELETED
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';
|