@nu-art/build-and-install 0.401.0 → 0.401.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.
- package/BuildAndInstall.d.ts +40 -0
- package/BuildAndInstall.js +155 -0
- package/build-and-install-v3.d.ts +1 -44
- package/build-and-install-v3.js +1 -157
- package/build-and-install.js +11 -11
- package/config/consts.d.ts +43 -0
- package/config/consts.js +42 -0
- package/{core → config}/package/consts.d.ts +1 -1
- package/{core → config}/types/project-config.d.ts +3 -0
- package/core/FilesCache.d.ts +50 -0
- package/core/FilesCache.js +76 -0
- package/core/Unit_HelpPrinter.d.ts +16 -0
- package/core/Unit_HelpPrinter.js +47 -0
- package/core/params/params.d.ts +1 -41
- package/core/params/params.js +1 -332
- package/core/params.d.ts +50 -0
- package/core/params.js +441 -0
- package/{v3/core → core}/types.d.ts +1 -1
- package/{v3/UnitsDependencyMapper → dependencies}/UnitsDependencyMapper.d.ts +21 -1
- package/{v3/UnitsDependencyMapper → dependencies}/UnitsDependencyMapper.js +26 -3
- package/dependencies/types.d.ts +1 -0
- package/dependencies/types.js +1 -0
- package/exceptions/PhaseAggregatedException.d.ts +34 -0
- package/{core/exceptions → exceptions}/PhaseAggregatedException.js +26 -0
- package/exceptions/UnitPhaseException.d.ts +20 -0
- package/exceptions/UnitPhaseException.js +21 -0
- package/exports/ExportIndexCache.d.ts +25 -0
- package/exports/ExportIndexCache.js +115 -0
- package/exports/ExportMapper.d.ts +43 -0
- package/exports/ExportMapper.js +519 -0
- package/exports/IndicesMcpServer.d.ts +22 -0
- package/exports/IndicesMcpServer.js +220 -0
- package/exports/types.js +3 -0
- package/package.json +20 -9
- package/phases/PhaseManager.d.ts +130 -0
- package/{v3 → phases}/PhaseManager.js +99 -2
- package/{v3/phase → phases/definitions}/consts.d.ts +36 -0
- package/{v3/phase → phases/definitions}/consts.js +44 -2
- package/phases/definitions/types.d.ts +40 -0
- package/phases/index.d.ts +2 -0
- package/phases/index.js +2 -0
- package/run.js +10 -0
- package/runtime/RunningStatusHandler.d.ts +104 -0
- package/runtime/RunningStatusHandler.js +153 -0
- package/runtime/types.d.ts +1 -0
- package/runtime/types.js +2 -0
- package/{defaults → templates}/consts.d.ts +9 -0
- package/{defaults → templates}/consts.js +12 -2
- package/templates/firebase/functions/cloudbuild.yaml +17 -0
- package/templates/firebase/functions/dockerfile +19 -0
- package/templates/firebase/functions/service.yaml +49 -0
- package/{v3/units → units/base}/BaseUnit.d.ts +34 -4
- package/{v3/units → units/base}/BaseUnit.js +22 -2
- package/units/base/ProjectUnit.d.ts +32 -0
- package/units/base/ProjectUnit.js +25 -0
- package/units/base/types.js +1 -0
- package/units/discovery/UnitsMapper.d.ts +69 -0
- package/{v3/UnitsMapper → units/discovery}/UnitsMapper.js +50 -2
- package/units/discovery/resolvers/UnitMapper_Base.d.ts +65 -0
- package/units/discovery/resolvers/UnitMapper_Base.js +46 -0
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_FirebaseFunction.d.ts +5 -3
- package/units/discovery/resolvers/UnitMapper_FirebaseFunction.js +105 -0
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_FirebaseHosting.d.ts +3 -2
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_FirebaseHosting.js +14 -10
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_Node.d.ts +1 -1
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_Node.js +2 -2
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_NodeLib.d.ts +24 -1
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_NodeLib.js +24 -1
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_NodeProject.d.ts +22 -1
- package/{v3/UnitsMapper → units/discovery}/resolvers/UnitMapper_NodeProject.js +22 -1
- package/units/discovery/types.js +1 -0
- package/units/implementations/Unit_NodeProject.d.ts +59 -0
- package/{v3/units → units/implementations}/Unit_NodeProject.js +65 -5
- package/units/implementations/Unit_PackageJson.d.ts +56 -0
- package/{v3/units → units/implementations}/Unit_PackageJson.js +39 -3
- package/{v3/units → units/implementations}/Unit_TypescriptLib.d.ts +40 -4
- package/{v3/units → units/implementations}/Unit_TypescriptLib.js +167 -17
- package/units/implementations/firebase/Unit_FirebaseFunctionsApp.d.ts +233 -0
- package/units/implementations/firebase/Unit_FirebaseFunctionsApp.js +804 -0
- package/units/implementations/firebase/Unit_FirebaseHostingApp.d.ts +113 -0
- package/units/implementations/firebase/Unit_FirebaseHostingApp.js +320 -0
- package/units/implementations/firebase/common.d.ts +26 -0
- package/units/implementations/firebase/common.js +65 -0
- package/units/index.d.ts +6 -0
- package/units/index.js +6 -0
- package/v3/core/Unit_HelpPrinter.d.ts +1 -16
- package/v3/core/Unit_HelpPrinter.js +1 -47
- package/{v3 → workspace}/Workspace.d.ts +30 -15
- package/{v3 → workspace}/Workspace.js +48 -35
- package/core/consts.d.ts +0 -13
- package/core/consts.js +0 -12
- package/core/exceptions/PhaseAggregatedException.d.ts +0 -8
- package/core/exceptions/UnitPhaseException.d.ts +0 -5
- package/core/exceptions/UnitPhaseException.js +0 -6
- package/old/PhaseRunnerDispatcher.d.ts +0 -24
- package/old/PhaseRunnerDispatcher.js +0 -32
- package/old/runner-dispatchers.d.ts +0 -10
- package/old/runner-dispatchers.js +0 -3
- package/v3/PhaseManager.d.ts +0 -27
- package/v3/RunningStatusHandler.d.ts +0 -18
- package/v3/RunningStatusHandler.js +0 -67
- package/v3/UnitsMapper/UnitsMapper.d.ts +0 -21
- package/v3/UnitsMapper/resolvers/UnitMapper_Base.d.ts +0 -23
- package/v3/UnitsMapper/resolvers/UnitMapper_Base.js +0 -16
- package/v3/UnitsMapper/resolvers/UnitMapper_FirebaseFunction.js +0 -66
- package/v3/core/FilesCache.d.ts +0 -7
- package/v3/core/FilesCache.js +0 -33
- package/v3/phase/types.d.ts +0 -10
- package/v3/units/ProjectUnit.d.ts +0 -18
- package/v3/units/ProjectUnit.js +0 -11
- package/v3/units/Unit_NodeProject.d.ts +0 -30
- package/v3/units/Unit_PackageJson.d.ts +0 -17
- package/v3/units/firebase/Unit_FirebaseFunctionsApp.d.ts +0 -64
- package/v3/units/firebase/Unit_FirebaseFunctionsApp.js +0 -306
- package/v3/units/firebase/Unit_FirebaseHostingApp.d.ts +0 -49
- package/v3/units/firebase/Unit_FirebaseHostingApp.js +0 -118
- package/v3/units/firebase/common.d.ts +0 -3
- package/v3/units/firebase/common.js +0 -13
- package/v3/units/index.d.ts +0 -6
- package/v3/units/index.js +0 -6
- /package/{core → config}/package/consts.js +0 -0
- /package/{core → config}/types/configs/firebasejson.d.ts +0 -0
- /package/{core → config}/types/configs/firebasejson.js +0 -0
- /package/{core → config}/types/configs/firebaserc.d.ts +0 -0
- /package/{core → config}/types/configs/firebaserc.js +0 -0
- /package/{core → config}/types/configs/index.d.ts +0 -0
- /package/{core → config}/types/configs/index.js +0 -0
- /package/{core → config}/types/configs/package-json.d.ts +0 -0
- /package/{core → config}/types/configs/package-json.js +0 -0
- /package/{core → config}/types/core.d.ts +0 -0
- /package/{core → config}/types/core.js +0 -0
- /package/{core → config}/types/index.d.ts +0 -0
- /package/{core → config}/types/index.js +0 -0
- /package/{core → config}/types/package/index.d.ts +0 -0
- /package/{core → config}/types/package/index.js +0 -0
- /package/{core → config}/types/package/package.d.ts +0 -0
- /package/{core → config}/types/package/package.js +0 -0
- /package/{core → config}/types/package/runtime-package.d.ts +0 -0
- /package/{core → config}/types/package/runtime-package.js +0 -0
- /package/{core → config}/types/project-config.js +0 -0
- /package/{v3/core → core}/types.js +0 -0
- /package/{v3/UnitsMapper/types.js → exports/types.d.ts} +0 -0
- /package/{v3/phase → phases/definitions}/index.d.ts +0 -0
- /package/{v3/phase → phases/definitions}/index.js +0 -0
- /package/{v3/phase → phases/definitions}/types.js +0 -0
- /package/{v3/units/types.js → run.d.ts} +0 -0
- /package/{defaults/backend-proxy → templates/backend/proxy}/proxy._ts +0 -0
- /package/{defaults/.firebase_config → templates/firebase/config}/database.rules.json +0 -0
- /package/{defaults/.firebase_config → templates/firebase/config}/firestore.indexes.json +0 -0
- /package/{defaults/.firebase_config → templates/firebase/config}/firestore.rules +0 -0
- /package/{defaults/.firebase_config → templates/firebase/config}/storage.rules +0 -0
- /package/{v3/units → units/base}/types.d.ts +0 -0
- /package/{v3/UnitsMapper → units/discovery}/resolvers/index.d.ts +0 -0
- /package/{v3/UnitsMapper → units/discovery}/resolvers/index.js +0 -0
- /package/{v3/UnitsMapper → units/discovery}/types.d.ts +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCliParam, CliParams } from '@nu-art/commando/cli-params/types';
|
|
2
|
+
import { UnitPhaseImplementor } from './types.js';
|
|
3
|
+
import { Phase } from '../phases/definitions/index.js';
|
|
4
|
+
import { ProjectUnit } from '../units/index.js';
|
|
5
|
+
export declare const BaiParam_Help: BaseCliParam<'help', boolean>;
|
|
6
|
+
declare const AllBaiParams_Help: (BaseCliParam<"allUnits", boolean> | BaseCliParam<"dependencyTree", boolean> | BaseCliParam<"environment", string> | BaseCliParam<"install", boolean> | BaseCliParam<"clean", boolean> | BaseCliParam<"purge", boolean> | BaseCliParam<"generate", boolean> | BaseCliParam<"generateDocs", boolean> | BaseCliParam<"noBuild", boolean> | BaseCliParam<"prepare", boolean> | BaseCliParam<"dryRun", boolean> | BaseCliParam<"lint", boolean> | BaseCliParam<"watch", boolean> | BaseCliParam<"watchBuildTree", boolean> | BaseCliParam<"continue", boolean> | BaseCliParam<"test", boolean> | BaseCliParam<"testType", string[]> | BaseCliParam<"testFiles", string[]> | BaseCliParam<"testCases", string[]> | BaseCliParam<"testDebugPort", number> | BaseCliParam<"launch", boolean> | BaseCliParam<"debugBackend", boolean> | BaseCliParam<"deploy", boolean> | BaseCliParam<"buildPushImage", string> | BaseCliParam<"deployImage", string> | BaseCliParam<"deployFunction", string> | BaseCliParam<"deleteFunctions", boolean> | BaseCliParam<"deleteFunction", string> | BaseCliParam<"debug", boolean> | BaseCliParam<"debugLifecycle", boolean> | BaseCliParam<"verbose", boolean> | BaseCliParam<"publish", "patch" | "minor" | "major"> | BaseCliParam<"usePackage", string[]> | BaseCliParam<"buildTree", boolean> | BaseCliParam<"includeApps", string[]> | BaseCliParam<"toESM", boolean> | BaseCliParam<"simulation", boolean> | BaseCliParam<"checkCyclicImports", boolean> | BaseCliParam<"extractDynamicDeps", boolean> | BaseCliParam<"mapExports", boolean> | BaseCliParam<"indicesMcpServer", boolean> | BaseCliParam<"indicesMcpPort", number> | BaseCliParam<"help", boolean>)[];
|
|
7
|
+
export type Help_BaiParams = CliParams<typeof AllBaiParams_Help>;
|
|
8
|
+
export type Phase_Help = typeof phase_Help;
|
|
9
|
+
export declare const phaseKey_Help = "help";
|
|
10
|
+
export declare const phase_Help: Phase<'printHelp'>;
|
|
11
|
+
declare class _Unit_HelpPrinter extends ProjectUnit implements UnitPhaseImplementor<[Phase_Help]> {
|
|
12
|
+
constructor();
|
|
13
|
+
printHelp(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare const Unit_HelpPrinter: _Unit_HelpPrinter;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { _keys, LogLevel, reduceToMap } from '@nu-art/ts-common';
|
|
2
|
+
import { AllBaiParams, BaiParam_AllUnits, BaiParam_NoBuild, BaiParam_Prepare } from './params.js';
|
|
3
|
+
import { ProjectUnit } from '../units/index.js';
|
|
4
|
+
export const BaiParam_Help = {
|
|
5
|
+
keys: ['--help', '-h'],
|
|
6
|
+
keyName: 'help',
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
group: 'General',
|
|
9
|
+
description: 'This help menu',
|
|
10
|
+
dependencies: [{ param: BaiParam_NoBuild, value: true }, { param: BaiParam_Prepare, value: false }, { param: BaiParam_AllUnits, value: true }],
|
|
11
|
+
};
|
|
12
|
+
const AllBaiParams_Help = [...AllBaiParams, BaiParam_Help];
|
|
13
|
+
export const phaseKey_Help = 'help';
|
|
14
|
+
export const phase_Help = {
|
|
15
|
+
key: phaseKey_Help,
|
|
16
|
+
name: 'Help',
|
|
17
|
+
method: 'printHelp',
|
|
18
|
+
filter: (params) => params.help,
|
|
19
|
+
};
|
|
20
|
+
const config = { key: 'help-printer', fullPath: process.cwd(), relativePath: '.', dependencies: {}, label: 'Help Printer' };
|
|
21
|
+
class _Unit_HelpPrinter extends ProjectUnit {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(config);
|
|
24
|
+
this.setMinLevel(LogLevel.Verbose);
|
|
25
|
+
}
|
|
26
|
+
async printHelp() {
|
|
27
|
+
this.logInfo('Build and install parameters:');
|
|
28
|
+
const noGroupConst = 'No Group';
|
|
29
|
+
//Resolve all params by group
|
|
30
|
+
const paramsByGroup = reduceToMap(AllBaiParams, param => param.group ?? noGroupConst, (item, index, mapper) => {
|
|
31
|
+
mapper[item.group ?? noGroupConst] = [...mapper[item.group ?? noGroupConst] ?? [], item];
|
|
32
|
+
return mapper[item.group ?? noGroupConst];
|
|
33
|
+
});
|
|
34
|
+
_keys(paramsByGroup).map(paramGroup => {
|
|
35
|
+
this.logErrorBold(`${paramGroup}: \n`);
|
|
36
|
+
// commando.append(`echo "${paramGroup}:" \n`);
|
|
37
|
+
paramsByGroup[paramGroup].map(param => {
|
|
38
|
+
const paramKeys = param.keys.join(' | ');
|
|
39
|
+
const paramDescription = param.description.trim().split('\n').join('\n\t\t');
|
|
40
|
+
this.logDebug(`${paramKeys}`);
|
|
41
|
+
this.logVerbose(`\t${paramDescription}\n`);
|
|
42
|
+
// commando.append(`echo "\n ${param.keys.join(' | ')} \n \t\t${param.description.trim().split('\n').join('\n\t\t')} \n"`);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export const Unit_HelpPrinter = new _Unit_HelpPrinter();
|
package/core/params/params.d.ts
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const BaiParam_AllUnits: BaseCliParam<'allUnits', boolean>;
|
|
3
|
-
export declare const BaiParam_DependencyTree: BaseCliParam<'dependencyTree', boolean>;
|
|
4
|
-
export declare const BaiParam_SetEnv: BaseCliParam<'environment', string>;
|
|
5
|
-
export declare const BaiParam_Install: BaseCliParam<'install', boolean>;
|
|
6
|
-
export declare const BaiParam_Clean: BaseCliParam<'clean', boolean>;
|
|
7
|
-
export declare const BaiParam_Purge: BaseCliParam<'purge', boolean>;
|
|
8
|
-
export declare const BaiParam_Generate: BaseCliParam<'generate', boolean>;
|
|
9
|
-
export declare const BaiParam_GenerateDocs: BaseCliParam<'generateDocs', boolean>;
|
|
10
|
-
export declare const BaiParam_NoBuild: BaseCliParam<'noBuild', boolean>;
|
|
11
|
-
export declare const BaiParam_Prepare: BaseCliParam<'prepare', boolean>;
|
|
12
|
-
export declare const BaiParam_DryRun: BaseCliParam<'dryRun', boolean>;
|
|
13
|
-
export declare const BaiParam_Lint: BaseCliParam<'lint', boolean>;
|
|
14
|
-
export declare const BaiParam_Watch: BaseCliParam<'watch', boolean>;
|
|
15
|
-
export declare const BaiParam_WatchBuildTree: BaseCliParam<'watchBuildTree', boolean>;
|
|
16
|
-
export declare const BaiParam_continue: BaseCliParam<'continue', boolean>;
|
|
17
|
-
export declare const BaiParam_Test: BaseCliParam<'test', boolean>;
|
|
18
|
-
export declare const TestTypes: string[];
|
|
19
|
-
export type TestType = typeof TestTypes[number];
|
|
20
|
-
export declare const BaiParam_TestType: BaseCliParam<'testType', TestType[]>;
|
|
21
|
-
export declare const BaiParam_TestFile: BaseCliParam<'testFiles', string[]>;
|
|
22
|
-
export declare const BaiParam_TestCase: BaseCliParam<'testCases', string[]>;
|
|
23
|
-
export declare const BaiParam_TestDebugPort: BaseCliParam<'testDebugPort', number>;
|
|
24
|
-
export declare const BaiParam_Launch: BaseCliParam<'launch', boolean>;
|
|
25
|
-
export declare const BaiParam_DebugBackend: BaseCliParam<'debugBackend', boolean>;
|
|
26
|
-
export declare const BaiParam_Deploy: BaseCliParam<'deploy', boolean>;
|
|
27
|
-
export declare const BaiParam_Debug: BaseCliParam<'debug', boolean>;
|
|
28
|
-
export declare const BaiParam_DebugLifecycle: BaseCliParam<'debugLifecycle', boolean>;
|
|
29
|
-
export declare const BaiParam_Verbose: BaseCliParam<'verbose', boolean>;
|
|
30
|
-
export declare const BaiParam_QuickDeploy: BaseCliParam<'quickDeploy', boolean>;
|
|
31
|
-
type PromoteType = 'patch' | 'minor' | 'major';
|
|
32
|
-
export declare const BaiParam_Publish: BaseCliParam<'publish', PromoteType>;
|
|
33
|
-
export declare const BaiParam_UsePackage: BaseCliParam<'usePackage', string[]>;
|
|
34
|
-
export declare const BaiParam_BuildTree: BaseCliParam<'buildTree', boolean>;
|
|
35
|
-
export declare const BaiParam_Apps: BaseCliParam<'includeApps', string[]>;
|
|
36
|
-
export declare const BaiParam_ToESM: BaseCliParam<'toESM', boolean>;
|
|
37
|
-
export declare const BaiParam_Simulate: BaseCliParam<'simulation', boolean>;
|
|
38
|
-
export declare const BaiParam_CheckCyclicImports: BaseCliParam<'checkCyclicImports', boolean>;
|
|
39
|
-
export declare const AllBaiParams: (BaseCliParam<"allUnits", boolean> | BaseCliParam<"dependencyTree", boolean> | BaseCliParam<"environment", string> | BaseCliParam<"install", boolean> | BaseCliParam<"clean", boolean> | BaseCliParam<"purge", boolean> | BaseCliParam<"generate", boolean> | BaseCliParam<"generateDocs", boolean> | BaseCliParam<"noBuild", boolean> | BaseCliParam<"prepare", boolean> | BaseCliParam<"dryRun", boolean> | BaseCliParam<"lint", boolean> | BaseCliParam<"watch", boolean> | BaseCliParam<"watchBuildTree", boolean> | BaseCliParam<"continue", boolean> | BaseCliParam<"test", boolean> | BaseCliParam<"testType", string[]> | BaseCliParam<"testFiles", string[]> | BaseCliParam<"testCases", string[]> | BaseCliParam<"testDebugPort", number> | BaseCliParam<"launch", boolean> | BaseCliParam<"debugBackend", boolean> | BaseCliParam<"deploy", boolean> | BaseCliParam<"debug", boolean> | BaseCliParam<"debugLifecycle", boolean> | BaseCliParam<"verbose", boolean> | BaseCliParam<"publish", PromoteType> | BaseCliParam<"usePackage", string[]> | BaseCliParam<"buildTree", boolean> | BaseCliParam<"includeApps", string[]> | BaseCliParam<"toESM", boolean> | BaseCliParam<"simulation", boolean> | BaseCliParam<"checkCyclicImports", boolean>)[];
|
|
40
|
-
export type BaiParams = CliParams<typeof AllBaiParams>;
|
|
41
|
-
export {};
|
|
1
|
+
export * from '../params.js';
|
package/core/params/params.js
CHANGED
|
@@ -1,332 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
keys: ['--all-units', '-all'],
|
|
3
|
-
keyName: 'allUnits',
|
|
4
|
-
type: 'boolean',
|
|
5
|
-
group: 'Build',
|
|
6
|
-
description: 'By default only top level and their dependencies are included, using this flag will include ALL the units'
|
|
7
|
-
};
|
|
8
|
-
export const BaiParam_DependencyTree = {
|
|
9
|
-
keys: ['--dependency-tree', '-dt'],
|
|
10
|
-
keyName: 'dependencyTree',
|
|
11
|
-
type: 'boolean',
|
|
12
|
-
group: 'General',
|
|
13
|
-
description: 'Will print the projects packages dependencies tree into the .trash folder'
|
|
14
|
-
};
|
|
15
|
-
export const BaiParam_SetEnv = {
|
|
16
|
-
keys: ['--set-env', '-se'],
|
|
17
|
-
keyName: 'environment',
|
|
18
|
-
type: 'string',
|
|
19
|
-
group: 'Build',
|
|
20
|
-
initialValue: 'local',
|
|
21
|
-
description: 'Will set the .config-${environment}.json as the current .config.json and prepare it as base 64 for local usage \ninput required: envName(string)'
|
|
22
|
-
};
|
|
23
|
-
export const BaiParam_Install = {
|
|
24
|
-
keys: ['--install', '-i'],
|
|
25
|
-
keyName: 'install',
|
|
26
|
-
type: 'boolean',
|
|
27
|
-
group: 'Build',
|
|
28
|
-
description: 'Will run \'pnpm install\' on entire project and will install global packages'
|
|
29
|
-
};
|
|
30
|
-
export const BaiParam_Clean = {
|
|
31
|
-
keys: ['--clean', '-c'],
|
|
32
|
-
keyName: 'clean',
|
|
33
|
-
type: 'boolean',
|
|
34
|
-
group: 'Clean',
|
|
35
|
-
description: 'Will delete the output(dist) & test output(dist-test) folders in all project packages'
|
|
36
|
-
};
|
|
37
|
-
export const BaiParam_Purge = {
|
|
38
|
-
keys: ['--purge', '-p'],
|
|
39
|
-
dependencies: [{ param: BaiParam_Clean, value: true }, { param: BaiParam_Install, value: true }],
|
|
40
|
-
keyName: 'purge',
|
|
41
|
-
group: 'Clean',
|
|
42
|
-
type: 'boolean',
|
|
43
|
-
description: 'Will delete the node_modules folder in all project packages \nWill perform --clean --install'
|
|
44
|
-
};
|
|
45
|
-
export const BaiParam_Generate = {
|
|
46
|
-
keys: ['--generate', '-g'],
|
|
47
|
-
keyName: 'generate',
|
|
48
|
-
type: 'boolean',
|
|
49
|
-
group: 'Build',
|
|
50
|
-
description: 'Will generate sources in the apps if needed'
|
|
51
|
-
};
|
|
52
|
-
export const BaiParam_GenerateDocs = {
|
|
53
|
-
keys: ['--generate-docs', '-docs'],
|
|
54
|
-
keyName: 'generateDocs',
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
group: 'Build',
|
|
57
|
-
description: 'Would generate ts-docs documentation'
|
|
58
|
-
};
|
|
59
|
-
export const BaiParam_NoBuild = {
|
|
60
|
-
keys: ['--no-build', '-nb'],
|
|
61
|
-
keyName: 'noBuild',
|
|
62
|
-
group: 'Build',
|
|
63
|
-
type: 'boolean',
|
|
64
|
-
description: 'Skip the build and link steps',
|
|
65
|
-
};
|
|
66
|
-
export const BaiParam_Prepare = {
|
|
67
|
-
keys: [],
|
|
68
|
-
keyName: 'prepare',
|
|
69
|
-
group: 'Build',
|
|
70
|
-
type: 'boolean',
|
|
71
|
-
initialValue: true,
|
|
72
|
-
description: '-- internal param --'
|
|
73
|
-
};
|
|
74
|
-
export const BaiParam_DryRun = {
|
|
75
|
-
keys: ['--dry-run', '-dry', '--dryrun'],
|
|
76
|
-
keyName: 'dryRun',
|
|
77
|
-
group: 'Other',
|
|
78
|
-
type: 'boolean',
|
|
79
|
-
description: 'Do not perform any phase impl, only log the process'
|
|
80
|
-
};
|
|
81
|
-
export const BaiParam_Lint = {
|
|
82
|
-
keys: ['--lint'],
|
|
83
|
-
keyName: 'lint',
|
|
84
|
-
type: 'boolean',
|
|
85
|
-
group: 'Build',
|
|
86
|
-
description: 'Run lint on all the project packages'
|
|
87
|
-
};
|
|
88
|
-
export const BaiParam_Watch = {
|
|
89
|
-
keys: ['--watch', '-w'],
|
|
90
|
-
keyName: 'watch',
|
|
91
|
-
type: 'boolean',
|
|
92
|
-
group: 'Build',
|
|
93
|
-
description: 'will build and listen for changes in the libraries',
|
|
94
|
-
dependencies: [{ param: BaiParam_NoBuild, value: true }, { param: BaiParam_AllUnits, value: true }]
|
|
95
|
-
};
|
|
96
|
-
export const BaiParam_WatchBuildTree = {
|
|
97
|
-
keys: ['--watchBuildTree', '-wbt'],
|
|
98
|
-
keyName: 'watchBuildTree',
|
|
99
|
-
type: 'boolean',
|
|
100
|
-
group: 'Build',
|
|
101
|
-
description: 'Once watch triggers, will build the entire tree that depends on the libs that changed',
|
|
102
|
-
dependencies: [{ param: BaiParam_Watch, value: true }, { param: BaiParam_NoBuild, value: true }, { param: BaiParam_Prepare, value: false }]
|
|
103
|
-
};
|
|
104
|
-
export const BaiParam_continue = {
|
|
105
|
-
keys: ['--continue', '-con'],
|
|
106
|
-
keyName: 'continue',
|
|
107
|
-
type: 'boolean',
|
|
108
|
-
group: 'Build',
|
|
109
|
-
description: 'Will pick up where last build process failed',
|
|
110
|
-
dependencies: [{ param: BaiParam_Watch, value: false }]
|
|
111
|
-
};
|
|
112
|
-
export const BaiParam_Test = {
|
|
113
|
-
keys: ['--test', '-t'],
|
|
114
|
-
keyName: 'test',
|
|
115
|
-
type: 'boolean',
|
|
116
|
-
group: 'Test',
|
|
117
|
-
description: 'Run the tests in all the project packages',
|
|
118
|
-
};
|
|
119
|
-
export const TestTypes = ['pure', 'firebase', 'ui', 'mobile'];
|
|
120
|
-
export const BaiParam_TestType = {
|
|
121
|
-
keys: ['--test-type', '-tt'],
|
|
122
|
-
keyName: 'testType',
|
|
123
|
-
type: 'string[]',
|
|
124
|
-
isArray: true,
|
|
125
|
-
group: 'Test',
|
|
126
|
-
options: TestTypes,
|
|
127
|
-
description: 'Run the tests in all the project packages',
|
|
128
|
-
dependencies: [{ param: BaiParam_Test, value: true }],
|
|
129
|
-
};
|
|
130
|
-
export const BaiParam_TestFile = {
|
|
131
|
-
keys: ['--test-file', '-tf'],
|
|
132
|
-
keyName: 'testFiles',
|
|
133
|
-
type: 'string[]',
|
|
134
|
-
isArray: true,
|
|
135
|
-
group: 'Test',
|
|
136
|
-
description: 'Run the specified test files',
|
|
137
|
-
dependencies: [{ param: BaiParam_Test, value: true }],
|
|
138
|
-
};
|
|
139
|
-
export const BaiParam_TestCase = {
|
|
140
|
-
keys: ['--test-case', '-tc'],
|
|
141
|
-
keyName: 'testCases',
|
|
142
|
-
type: 'string[]',
|
|
143
|
-
isArray: true,
|
|
144
|
-
group: 'Test',
|
|
145
|
-
description: 'Run only the specified test cases',
|
|
146
|
-
dependencies: [{ param: BaiParam_Test, value: true }],
|
|
147
|
-
};
|
|
148
|
-
export const BaiParam_TestDebugPort = {
|
|
149
|
-
keys: ['--test-debug', '-td'],
|
|
150
|
-
keyName: 'testDebugPort',
|
|
151
|
-
type: 'number',
|
|
152
|
-
group: 'Test',
|
|
153
|
-
defaultValue: 8010,
|
|
154
|
-
description: 'If provided will allow a debugger connection on the specified port, and will run the tests in watch mode',
|
|
155
|
-
dependencies: [{ param: BaiParam_Test, value: true }],
|
|
156
|
-
};
|
|
157
|
-
export const BaiParam_Launch = {
|
|
158
|
-
keys: ['--launch', '-l'],
|
|
159
|
-
keyName: 'launch',
|
|
160
|
-
type: 'boolean',
|
|
161
|
-
group: 'Apps',
|
|
162
|
-
description: 'Will perform the launch phast on packages that supports it. use the --use-package flag to filter out for specific packages'
|
|
163
|
-
};
|
|
164
|
-
export const BaiParam_DebugBackend = {
|
|
165
|
-
keys: ['--debug-backend', '-lbd'],
|
|
166
|
-
keyName: 'debugBackend',
|
|
167
|
-
type: 'boolean',
|
|
168
|
-
group: 'Apps',
|
|
169
|
-
description: 'Will add the app backend to the launch list - in debug mode'
|
|
170
|
-
};
|
|
171
|
-
export const BaiParam_Deploy = {
|
|
172
|
-
keys: ['--deploy', '-dep'],
|
|
173
|
-
keyName: 'deploy',
|
|
174
|
-
type: 'boolean',
|
|
175
|
-
group: 'Apps',
|
|
176
|
-
description: 'Will perform the deploy phast on packages that supports it. use the --use-package flag to filter out for specific packages',
|
|
177
|
-
dependencies: [
|
|
178
|
-
{ param: BaiParam_Launch, value: false },
|
|
179
|
-
{ param: BaiParam_Watch, value: false },
|
|
180
|
-
{ param: BaiParam_WatchBuildTree, value: false },
|
|
181
|
-
{ param: BaiParam_GenerateDocs, value: false },
|
|
182
|
-
]
|
|
183
|
-
};
|
|
184
|
-
export const BaiParam_Debug = {
|
|
185
|
-
keys: ['--debug', '-d'],
|
|
186
|
-
keyName: 'debug',
|
|
187
|
-
group: 'Other',
|
|
188
|
-
type: 'boolean',
|
|
189
|
-
description: 'Will print the parameters the script is running with'
|
|
190
|
-
};
|
|
191
|
-
export const BaiParam_DebugLifecycle = {
|
|
192
|
-
keys: ['--debug-lifecycle', '-dl'],
|
|
193
|
-
keyName: 'debugLifecycle',
|
|
194
|
-
group: 'Other',
|
|
195
|
-
type: 'boolean',
|
|
196
|
-
description: 'Will only print the run config and die'
|
|
197
|
-
};
|
|
198
|
-
export const BaiParam_Verbose = {
|
|
199
|
-
keys: ['--verbose', '-v'],
|
|
200
|
-
keyName: 'verbose',
|
|
201
|
-
group: 'Other',
|
|
202
|
-
type: 'boolean',
|
|
203
|
-
description: 'Set log level to verbose'
|
|
204
|
-
};
|
|
205
|
-
export const BaiParam_QuickDeploy = {
|
|
206
|
-
keys: ['--quick-deploy', '-qd'],
|
|
207
|
-
keyName: 'quickDeploy',
|
|
208
|
-
type: 'boolean',
|
|
209
|
-
group: 'Other',
|
|
210
|
-
description: 'Will perform the deploy phase without other lifecycle options',
|
|
211
|
-
dependencies: [
|
|
212
|
-
...BaiParam_Deploy.dependencies,
|
|
213
|
-
{ param: BaiParam_Purge, value: false },
|
|
214
|
-
{ param: BaiParam_Lint, value: false },
|
|
215
|
-
{ param: BaiParam_Test, value: false },
|
|
216
|
-
{ param: BaiParam_NoBuild, value: true },
|
|
217
|
-
]
|
|
218
|
-
};
|
|
219
|
-
export const BaiParam_Publish = {
|
|
220
|
-
keys: ['--publish'],
|
|
221
|
-
keyName: 'publish',
|
|
222
|
-
type: 'string',
|
|
223
|
-
group: 'Other',
|
|
224
|
-
options: ['patch', 'minor', 'major'],
|
|
225
|
-
defaultValue: 'patch',
|
|
226
|
-
description: 'Will publish to NPM any package that is not marked as private in its __package.json \nenum options: patch | minor | major \nDefault Param: patch',
|
|
227
|
-
process: (part) => part ?? 'patch'
|
|
228
|
-
};
|
|
229
|
-
export const BaiParam_UsePackage = {
|
|
230
|
-
keys: ['-up', '--use-packages'],
|
|
231
|
-
keyName: 'usePackage',
|
|
232
|
-
type: 'string[]',
|
|
233
|
-
group: 'Build',
|
|
234
|
-
description: 'Will specify units to process',
|
|
235
|
-
process: (value) => {
|
|
236
|
-
if (!value)
|
|
237
|
-
return [];
|
|
238
|
-
return value.split(',').map(str => str.trim());
|
|
239
|
-
},
|
|
240
|
-
dependencies: [{ param: BaiParam_AllUnits, value: true }]
|
|
241
|
-
};
|
|
242
|
-
export const BaiParam_BuildTree = {
|
|
243
|
-
keys: ['--build-tree', '-bt'],
|
|
244
|
-
keyName: 'buildTree',
|
|
245
|
-
type: 'boolean',
|
|
246
|
-
group: 'Build',
|
|
247
|
-
description: 'When used with -up, makes all transitive dependencies active (compile/test them too)',
|
|
248
|
-
};
|
|
249
|
-
export const BaiParam_Apps = {
|
|
250
|
-
keys: ['-app', '--application'],
|
|
251
|
-
keyName: 'includeApps',
|
|
252
|
-
type: 'string[]',
|
|
253
|
-
group: 'Build',
|
|
254
|
-
description: 'Will include the applications and all their dependency units to the build process',
|
|
255
|
-
process: (value) => {
|
|
256
|
-
if (!value)
|
|
257
|
-
return [];
|
|
258
|
-
return value.split(',').map(str => str.trim());
|
|
259
|
-
},
|
|
260
|
-
isArray: true,
|
|
261
|
-
dependencies: [
|
|
262
|
-
{ param: BaiParam_UsePackage, value: (currentValue) => currentValue },
|
|
263
|
-
{ param: BaiParam_BuildTree, value: true }
|
|
264
|
-
]
|
|
265
|
-
};
|
|
266
|
-
export const BaiParam_ToESM = {
|
|
267
|
-
keys: ['-tesm', '--to-esm'],
|
|
268
|
-
keyName: 'toESM',
|
|
269
|
-
type: 'boolean',
|
|
270
|
-
group: 'Other',
|
|
271
|
-
description: 'Will migrate existing CJS code to ESM',
|
|
272
|
-
dependencies: [{ param: BaiParam_AllUnits, value: true }]
|
|
273
|
-
};
|
|
274
|
-
export const BaiParam_Simulate = {
|
|
275
|
-
keys: ['--simulate', '-sim', '--simulation'],
|
|
276
|
-
keyName: 'simulation',
|
|
277
|
-
type: 'boolean',
|
|
278
|
-
group: 'Other',
|
|
279
|
-
description: 'In combination with other params, will not perform the outbound operation, but instead simulate it',
|
|
280
|
-
dependencies: [{ param: BaiParam_AllUnits, value: true }]
|
|
281
|
-
};
|
|
282
|
-
export const BaiParam_CheckCyclicImports = {
|
|
283
|
-
keys: ['--check-cyclic-imports', '-cci'],
|
|
284
|
-
keyName: 'checkCyclicImports',
|
|
285
|
-
type: 'boolean',
|
|
286
|
-
group: 'General',
|
|
287
|
-
description: 'will check for cyclic imports and render an svg with the import graph',
|
|
288
|
-
dependencies: [
|
|
289
|
-
{ param: BaiParam_NoBuild, value: true },
|
|
290
|
-
{ param: BaiParam_Launch, value: false },
|
|
291
|
-
{ param: BaiParam_Install, value: false },
|
|
292
|
-
{ param: BaiParam_Deploy, value: false },
|
|
293
|
-
{ param: BaiParam_Publish, value: false },
|
|
294
|
-
{ param: BaiParam_Purge, value: false },
|
|
295
|
-
{ param: BaiParam_Clean, value: false },
|
|
296
|
-
]
|
|
297
|
-
};
|
|
298
|
-
export const AllBaiParams = [
|
|
299
|
-
BaiParam_AllUnits,
|
|
300
|
-
BaiParam_DependencyTree,
|
|
301
|
-
BaiParam_CheckCyclicImports,
|
|
302
|
-
BaiParam_Purge,
|
|
303
|
-
BaiParam_Clean,
|
|
304
|
-
BaiParam_continue,
|
|
305
|
-
BaiParam_Prepare,
|
|
306
|
-
BaiParam_SetEnv,
|
|
307
|
-
BaiParam_Install,
|
|
308
|
-
BaiParam_Generate, // TODO: to implement
|
|
309
|
-
BaiParam_GenerateDocs, // TODO: to implement
|
|
310
|
-
BaiParam_NoBuild,
|
|
311
|
-
BaiParam_Apps,
|
|
312
|
-
BaiParam_DryRun,
|
|
313
|
-
BaiParam_Lint,
|
|
314
|
-
BaiParam_Watch,
|
|
315
|
-
BaiParam_WatchBuildTree,
|
|
316
|
-
BaiParam_Test,
|
|
317
|
-
BaiParam_TestType,
|
|
318
|
-
BaiParam_TestFile,
|
|
319
|
-
BaiParam_TestCase,
|
|
320
|
-
BaiParam_TestDebugPort,
|
|
321
|
-
BaiParam_Launch,
|
|
322
|
-
BaiParam_Deploy,
|
|
323
|
-
BaiParam_DebugBackend,
|
|
324
|
-
BaiParam_Debug,
|
|
325
|
-
BaiParam_Verbose,
|
|
326
|
-
BaiParam_Publish,
|
|
327
|
-
BaiParam_UsePackage,
|
|
328
|
-
BaiParam_BuildTree,
|
|
329
|
-
BaiParam_ToESM,
|
|
330
|
-
BaiParam_Simulate,
|
|
331
|
-
BaiParam_DebugLifecycle
|
|
332
|
-
];
|
|
1
|
+
export * from '../params.js';
|
package/core/params.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseCliParam, CliParams } from '@nu-art/commando/cli-params/types';
|
|
2
|
+
export declare const BaiParam_AllUnits: BaseCliParam<'allUnits', boolean>;
|
|
3
|
+
export declare const BaiParam_DependencyTree: BaseCliParam<'dependencyTree', boolean>;
|
|
4
|
+
export declare const BaiParam_SetEnv: BaseCliParam<'environment', string>;
|
|
5
|
+
export declare const BaiParam_Install: BaseCliParam<'install', boolean>;
|
|
6
|
+
export declare const BaiParam_Clean: BaseCliParam<'clean', boolean>;
|
|
7
|
+
export declare const BaiParam_Purge: BaseCliParam<'purge', boolean>;
|
|
8
|
+
export declare const BaiParam_Generate: BaseCliParam<'generate', boolean>;
|
|
9
|
+
export declare const BaiParam_GenerateDocs: BaseCliParam<'generateDocs', boolean>;
|
|
10
|
+
export declare const BaiParam_NoBuild: BaseCliParam<'noBuild', boolean>;
|
|
11
|
+
export declare const BaiParam_Prepare: BaseCliParam<'prepare', boolean>;
|
|
12
|
+
export declare const BaiParam_DryRun: BaseCliParam<'dryRun', boolean>;
|
|
13
|
+
export declare const BaiParam_Lint: BaseCliParam<'lint', boolean>;
|
|
14
|
+
export declare const BaiParam_Watch: BaseCliParam<'watch', boolean>;
|
|
15
|
+
export declare const BaiParam_WatchBuildTree: BaseCliParam<'watchBuildTree', boolean>;
|
|
16
|
+
export declare const BaiParam_continue: BaseCliParam<'continue', boolean>;
|
|
17
|
+
export declare const BaiParam_Test: BaseCliParam<'test', boolean>;
|
|
18
|
+
export declare const TestTypes: string[];
|
|
19
|
+
export type TestType = typeof TestTypes[number];
|
|
20
|
+
export declare const BaiParam_TestType: BaseCliParam<'testType', TestType[]>;
|
|
21
|
+
export declare const BaiParam_TestFile: BaseCliParam<'testFiles', string[]>;
|
|
22
|
+
export declare const BaiParam_TestCase: BaseCliParam<'testCases', string[]>;
|
|
23
|
+
export declare const BaiParam_TestDebugPort: BaseCliParam<'testDebugPort', number>;
|
|
24
|
+
export declare const BaiParam_Launch: BaseCliParam<'launch', boolean>;
|
|
25
|
+
export declare const BaiParam_DebugBackend: BaseCliParam<'debugBackend', boolean>;
|
|
26
|
+
export declare const BaiParam_Deploy: BaseCliParam<'deploy', boolean>;
|
|
27
|
+
export declare const BaiParam_BuildPushImage: BaseCliParam<'buildPushImage', string>;
|
|
28
|
+
export declare const BaiParam_DeployImage: BaseCliParam<'deployImage', string>;
|
|
29
|
+
export declare const BaiParam_DeployFunction: BaseCliParam<'deployFunction', string>;
|
|
30
|
+
export declare const BaiParam_DeleteFunctions: BaseCliParam<'deleteFunctions', boolean>;
|
|
31
|
+
export declare const BaiParam_DeleteFunction: BaseCliParam<'deleteFunction', string>;
|
|
32
|
+
export declare const BaiParam_Debug: BaseCliParam<'debug', boolean>;
|
|
33
|
+
export declare const BaiParam_DebugLifecycle: BaseCliParam<'debugLifecycle', boolean>;
|
|
34
|
+
export declare const BaiParam_Verbose: BaseCliParam<'verbose', boolean>;
|
|
35
|
+
export declare const BaiParam_QuickDeploy: BaseCliParam<'quickDeploy', boolean>;
|
|
36
|
+
type PromoteType = 'patch' | 'minor' | 'major';
|
|
37
|
+
export declare const BaiParam_Publish: BaseCliParam<'publish', PromoteType>;
|
|
38
|
+
export declare const BaiParam_UsePackage: BaseCliParam<'usePackage', string[]>;
|
|
39
|
+
export declare const BaiParam_BuildTree: BaseCliParam<'buildTree', boolean>;
|
|
40
|
+
export declare const BaiParam_Apps: BaseCliParam<'includeApps', string[]>;
|
|
41
|
+
export declare const BaiParam_ToESM: BaseCliParam<'toESM', boolean>;
|
|
42
|
+
export declare const BaiParam_Simulate: BaseCliParam<'simulation', boolean>;
|
|
43
|
+
export declare const BaiParam_CheckCyclicImports: BaseCliParam<'checkCyclicImports', boolean>;
|
|
44
|
+
export declare const BaiParam_ExtractDynamicDeps: BaseCliParam<'extractDynamicDeps', boolean>;
|
|
45
|
+
export declare const BaiParam_MapExports: BaseCliParam<'mapExports', boolean>;
|
|
46
|
+
export declare const BaiParam_IndicesMcpServer: BaseCliParam<'indicesMcpServer', boolean>;
|
|
47
|
+
export declare const BaiParam_IndicesMcpPort: BaseCliParam<'indicesMcpPort', number>;
|
|
48
|
+
export declare const AllBaiParams: (BaseCliParam<"allUnits", boolean> | BaseCliParam<"dependencyTree", boolean> | BaseCliParam<"environment", string> | BaseCliParam<"install", boolean> | BaseCliParam<"clean", boolean> | BaseCliParam<"purge", boolean> | BaseCliParam<"generate", boolean> | BaseCliParam<"generateDocs", boolean> | BaseCliParam<"noBuild", boolean> | BaseCliParam<"prepare", boolean> | BaseCliParam<"dryRun", boolean> | BaseCliParam<"lint", boolean> | BaseCliParam<"watch", boolean> | BaseCliParam<"watchBuildTree", boolean> | BaseCliParam<"continue", boolean> | BaseCliParam<"test", boolean> | BaseCliParam<"testType", string[]> | BaseCliParam<"testFiles", string[]> | BaseCliParam<"testCases", string[]> | BaseCliParam<"testDebugPort", number> | BaseCliParam<"launch", boolean> | BaseCliParam<"debugBackend", boolean> | BaseCliParam<"deploy", boolean> | BaseCliParam<"buildPushImage", string> | BaseCliParam<"deployImage", string> | BaseCliParam<"deployFunction", string> | BaseCliParam<"deleteFunctions", boolean> | BaseCliParam<"deleteFunction", string> | BaseCliParam<"debug", boolean> | BaseCliParam<"debugLifecycle", boolean> | BaseCliParam<"verbose", boolean> | BaseCliParam<"publish", PromoteType> | BaseCliParam<"usePackage", string[]> | BaseCliParam<"buildTree", boolean> | BaseCliParam<"includeApps", string[]> | BaseCliParam<"toESM", boolean> | BaseCliParam<"simulation", boolean> | BaseCliParam<"checkCyclicImports", boolean> | BaseCliParam<"extractDynamicDeps", boolean> | BaseCliParam<"mapExports", boolean> | BaseCliParam<"indicesMcpServer", boolean> | BaseCliParam<"indicesMcpPort", number>)[];
|
|
49
|
+
export type BaiParams = CliParams<typeof AllBaiParams>;
|
|
50
|
+
export {};
|