@stacksjs/cli 0.70.88 → 0.70.90
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/dist/actions/index.d.ts +1 -0
- package/dist/actions/install.d.ts +24 -0
- package/dist/cli.d.ts +14 -0
- package/dist/exec.d.ts +40 -0
- package/dist/helpers.d.ts +14 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1024 -0
- package/dist/parse.d.ts +20 -0
- package/dist/prompts.d.ts +48 -0
- package/dist/run.d.ts +63 -0
- package/dist/signals.d.ts +29 -0
- package/dist/spinner.d.ts +17 -0
- package/dist/utils.d.ts +137 -0
- package/package.json +9 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './install';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install an npm package.
|
|
3
|
+
*
|
|
4
|
+
* @param name - The package name to install.
|
|
5
|
+
* @param options - The options to pass to the install.
|
|
6
|
+
* @returns The result of the install.
|
|
7
|
+
*/
|
|
8
|
+
export declare function installPackage(name: string, options?: InstallPackageOptions): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Install a Stack into your project.
|
|
11
|
+
*
|
|
12
|
+
* @param name - The Stack name to install.
|
|
13
|
+
* @param options - The options to pass to the install.
|
|
14
|
+
* @returns The result of the install.
|
|
15
|
+
*/
|
|
16
|
+
export declare function installStack(name: string, options?: InstallPackageOptions): Promise<void>;
|
|
17
|
+
declare interface InstallPackageOptions {
|
|
18
|
+
cwd?: string
|
|
19
|
+
dev?: boolean
|
|
20
|
+
silent?: boolean
|
|
21
|
+
packageManager?: string
|
|
22
|
+
preferOffline?: boolean
|
|
23
|
+
additionalArgs?: string[]
|
|
24
|
+
}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CLI, onUnknownSubcommand } from '@stacksjs/clapp';
|
|
2
|
+
export declare function cli(name?: string | CliOptions, options?: CliOptions): CLI;
|
|
3
|
+
// Note: applyTheme and getAvailableThemes will be available after @stacksjs/clapp npm package is updated
|
|
4
|
+
// import { applyTheme, getAvailableThemes } from '@stacksjs/clapp'
|
|
5
|
+
export declare interface ParsedArgv {
|
|
6
|
+
args: ReadonlyArray<string>
|
|
7
|
+
options: {
|
|
8
|
+
[k: string]: any
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare interface CliOptions {
|
|
12
|
+
name?: string
|
|
13
|
+
}
|
|
14
|
+
export { CLI, onUnknownSubcommand };
|
package/dist/exec.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CliOptions, Subprocess } from '@stacksjs/types';
|
|
2
|
+
import type { Result } from '@stacksjs/error-handling';
|
|
3
|
+
/**
|
|
4
|
+
* Execute a command.
|
|
5
|
+
*
|
|
6
|
+
* @param command The command to execute.
|
|
7
|
+
* @param options The options to pass to the command.
|
|
8
|
+
* @returns The result of the command.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const result = await exec('ls')
|
|
12
|
+
*
|
|
13
|
+
* if (result.isErr)
|
|
14
|
+
* console.error(result.error)
|
|
15
|
+
* else
|
|
16
|
+
* console.log(result)
|
|
17
|
+
* ```
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const result = await exec('ls', { cwd: '/home' })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function exec(command: string | string[], options?: CliOptions): Promise<Result<Subprocess, Error>>;
|
|
24
|
+
/**
|
|
25
|
+
* Execute a command and return result.
|
|
26
|
+
*
|
|
27
|
+
* @param command The command to execute.
|
|
28
|
+
* @returns The result of the command.
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const output = execSync('ls')
|
|
32
|
+
*
|
|
33
|
+
* console.log(output)
|
|
34
|
+
* ```
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const output = execSync('ls', { cwd: '/home' })
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function execSync(command: string | string[], options?: CliOptions): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { bold, cyan, dim, gray, green, italic } from './utils';
|
|
2
|
+
import { log } from '@stacksjs/logging';
|
|
3
|
+
import type { IntroOptions, OutroOptions } from '@stacksjs/types';
|
|
4
|
+
/**
|
|
5
|
+
* Prints the intro message.
|
|
6
|
+
*/
|
|
7
|
+
export declare function intro(command: string, options?: IntroOptions): Promise<number>;
|
|
8
|
+
/**
|
|
9
|
+
* Prints the outro message.
|
|
10
|
+
*/
|
|
11
|
+
export declare function outro(text: string, options?: OutroOptions, error?: Error | string): Promise<number>;
|
|
12
|
+
// Re-export commonly used CLI utilities
|
|
13
|
+
export { log };
|
|
14
|
+
export { italic, bold, cyan, dim, gray, green } from './utils';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './actions/index';
|
|
2
|
+
export * from './cli';
|
|
3
|
+
export * from './exec';
|
|
4
|
+
export * from './helpers';
|
|
5
|
+
export * from './parse';
|
|
6
|
+
export * from './prompts';
|
|
7
|
+
export * from './run';
|
|
8
|
+
export * from './signals';
|
|
9
|
+
export * from './spinner';
|
|
10
|
+
export * from './utils';
|