@theatrical/cli 0.1.0
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/LICENSE +21 -0
- package/bin/theatrical.js +16 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +1303 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bruno Hart
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Binary entry point for the Theatrical CLI.
|
|
5
|
+
* Referenced by package.json "bin"; runs when users invoke `theatrical`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { run } from '../dist/index.js';
|
|
9
|
+
|
|
10
|
+
run().catch((err) => {
|
|
11
|
+
console.error(`\n theatrical: ${err.message}\n`);
|
|
12
|
+
if (process.env.THEATRICAL_VERBOSE === '1') {
|
|
13
|
+
console.error(err.stack);
|
|
14
|
+
}
|
|
15
|
+
process.exit(1);
|
|
16
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @module @theatrical/cli
|
|
5
|
+
* Developer CLI for cinema platform APIs.
|
|
6
|
+
*
|
|
7
|
+
* Commands:
|
|
8
|
+
* - `theatrical init` — Scaffold a new project with SDK integration
|
|
9
|
+
* - `theatrical codegen` — Generate TypeScript types from OpenAPI specs
|
|
10
|
+
* - `theatrical inspect` — Interactive API explorer with formatted output
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```bash
|
|
14
|
+
* # Initialize a new cinema app project
|
|
15
|
+
* theatrical init my-cinema-app --template default
|
|
16
|
+
*
|
|
17
|
+
* # Generate types from a Vista OpenAPI spec
|
|
18
|
+
* theatrical codegen --spec ./openapi.yaml --output ./src/types
|
|
19
|
+
*
|
|
20
|
+
* # Explore API responses interactively
|
|
21
|
+
* theatrical inspect sessions list --site abc123 --date 2026-04-15
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create and configure the root Commander program.
|
|
27
|
+
*
|
|
28
|
+
* This is the main entry point for the CLI. It sets up the root command,
|
|
29
|
+
* global options, and registers subcommands. Each subcommand is defined
|
|
30
|
+
* in its own module under `./commands/`.
|
|
31
|
+
*
|
|
32
|
+
* @returns Configured Commander program ready to parse argv
|
|
33
|
+
*/
|
|
34
|
+
declare function createProgram(): Command;
|
|
35
|
+
/**
|
|
36
|
+
* Run the CLI program with process.argv.
|
|
37
|
+
* This is called from the bin entry point.
|
|
38
|
+
*/
|
|
39
|
+
declare function run(argv?: string[]): Promise<void>;
|
|
40
|
+
|
|
41
|
+
export { createProgram, run };
|