@mono-labs/cli 0.0.98 → 0.0.99
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/index.js +34 -2
- package/package.json +3 -1
- package/types.d.ts +75 -0
package/index.js
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
// Main entry point for @mono-labs/cli package
|
|
2
|
+
export { boot } from './lib/commands/build-process/boot.js';
|
|
3
|
+
export { buildCommands } from './lib/commands/build-process/cliFactory.js';
|
|
4
|
+
export { runHasteCommand } from './lib/commands/build-process/runHasteCommand.js';
|
|
5
|
+
export { verifyOptionValue } from './lib/commands/build-process/validators.js';
|
|
6
|
+
export {
|
|
7
|
+
setData,
|
|
8
|
+
getData,
|
|
9
|
+
mergeData,
|
|
10
|
+
replaceTokens,
|
|
11
|
+
} from './lib/commands/build-process/dataLayer.js';
|
|
12
|
+
export {
|
|
13
|
+
getHasteConfig,
|
|
14
|
+
getRootDirectory,
|
|
15
|
+
getRootJson,
|
|
16
|
+
} from './lib/commands/loadFromRoot.js';
|
|
17
|
+
import { generateNewEnvList } from './lib/commands/build-process/env.js';
|
|
18
|
+
export { program } from './lib/app.js';
|
|
2
19
|
|
|
3
|
-
|
|
20
|
+
// Default export for convenience
|
|
21
|
+
export default {
|
|
22
|
+
generateNewEnvList,
|
|
23
|
+
boot,
|
|
24
|
+
buildCommands,
|
|
25
|
+
runHasteCommand,
|
|
26
|
+
verifyOptionValue,
|
|
27
|
+
setData,
|
|
28
|
+
getData,
|
|
29
|
+
mergeData,
|
|
30
|
+
replaceTokens,
|
|
31
|
+
getHasteConfig,
|
|
32
|
+
getRootDirectory,
|
|
33
|
+
getRootJson,
|
|
34
|
+
program,
|
|
35
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mono-labs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.99",
|
|
4
4
|
"description": "A CLI tool for building and deploying projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"types": "types.d.ts",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "https://github.com/codymurphyjones/mono-labs-cli.git"
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"files": [
|
|
53
54
|
"bin/",
|
|
54
55
|
"lib/",
|
|
56
|
+
"types.d.ts",
|
|
55
57
|
"README.md"
|
|
56
58
|
],
|
|
57
59
|
"packageManager": "yarn@4.5.0"
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Type definitions for mono-labs CLI
|
|
2
|
+
|
|
3
|
+
declare module '@mono-labs/cli' {
|
|
4
|
+
export interface HasteConfig {
|
|
5
|
+
envMap?: Record<string, string>;
|
|
6
|
+
workspace?: {
|
|
7
|
+
packageMaps?: Record<string, string>;
|
|
8
|
+
preactions?: string[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface HasteFiles {
|
|
13
|
+
[commandName: string]: CommandConfig;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CommandConfig {
|
|
17
|
+
description?: string;
|
|
18
|
+
argument?: {
|
|
19
|
+
type?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
default?: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
};
|
|
24
|
+
options?: Record<string, OptionConfig>;
|
|
25
|
+
preactions?: string[];
|
|
26
|
+
actions?: string[];
|
|
27
|
+
environments?: {
|
|
28
|
+
dev?: Record<string, string>;
|
|
29
|
+
stage?: Record<string, string>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface OptionConfig {
|
|
34
|
+
type?: 'string' | 'boolean';
|
|
35
|
+
description?: string;
|
|
36
|
+
default?: string | boolean;
|
|
37
|
+
shortcut?: string;
|
|
38
|
+
options?: string[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface BootResult {
|
|
42
|
+
rootDir: string;
|
|
43
|
+
rootJson: any;
|
|
44
|
+
files: HasteFiles;
|
|
45
|
+
config: HasteConfig;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Function type declarations
|
|
49
|
+
export declare function generateNewEnvList(
|
|
50
|
+
processEnv: NodeJS.ProcessEnv
|
|
51
|
+
): NodeJS.ProcessEnv;
|
|
52
|
+
|
|
53
|
+
export declare function boot(): BootResult;
|
|
54
|
+
|
|
55
|
+
export declare function getHasteConfig(): {
|
|
56
|
+
files: HasteFiles;
|
|
57
|
+
config: HasteConfig;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export declare function getRootDirectory(): string;
|
|
61
|
+
export declare function getRootJson(): any;
|
|
62
|
+
|
|
63
|
+
export declare function buildCommands(files: HasteFiles): void;
|
|
64
|
+
|
|
65
|
+
export declare function runHasteCommand(
|
|
66
|
+
configObject: CommandConfig,
|
|
67
|
+
options: Record<string, any>
|
|
68
|
+
): Promise<void>;
|
|
69
|
+
|
|
70
|
+
export declare function verifyOptionValue(
|
|
71
|
+
optionKey: string,
|
|
72
|
+
value: any,
|
|
73
|
+
optionsData: Record<string, OptionConfig>
|
|
74
|
+
): any;
|
|
75
|
+
}
|