@c15t/cli 1.2.0-beta.17 → 1.2.0-canary.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.md +595 -0
- package/README.md +106 -0
- package/dist/actions/get-config/config-extraction.d.ts +37 -0
- package/dist/actions/get-config/config-extraction.d.ts.map +1 -0
- package/dist/actions/get-config/config-validation.d.ts +7 -0
- package/dist/actions/get-config/config-validation.d.ts.map +1 -0
- package/dist/actions/get-config/constants.d.ts +13 -0
- package/dist/actions/get-config/constants.d.ts.map +1 -0
- package/dist/actions/get-config/directory-search.d.ts +6 -0
- package/dist/actions/get-config/directory-search.d.ts.map +1 -0
- package/dist/actions/get-config/jiti-options.d.ts +9 -0
- package/dist/actions/get-config/jiti-options.d.ts.map +1 -0
- package/dist/actions/get-config.d.ts +13 -0
- package/dist/actions/get-config.d.ts.map +1 -0
- package/dist/actions/load-config-and-onboard.d.ts +9 -0
- package/dist/actions/load-config-and-onboard.d.ts.map +1 -0
- package/dist/actions/show-help-menu.d.ts +11 -0
- package/dist/actions/show-help-menu.d.ts.map +1 -0
- package/dist/commands/generate/actions/handle-existing-file.d.ts +7 -0
- package/dist/commands/generate/actions/handle-existing-file.d.ts.map +1 -0
- package/dist/commands/generate/actions/handle-new-file.d.ts +7 -0
- package/dist/commands/generate/actions/handle-new-file.d.ts.map +1 -0
- package/dist/commands/generate/actions/perform-write-action.d.ts +6 -0
- package/dist/commands/generate/actions/perform-write-action.d.ts.map +1 -0
- package/dist/commands/generate/generators/drizzle.d.ts +4 -0
- package/dist/commands/generate/generators/drizzle.d.ts.map +1 -0
- package/dist/commands/generate/generators/index.d.ts +19 -0
- package/dist/commands/generate/generators/index.d.ts.map +1 -0
- package/dist/commands/generate/generators/kysely.d.ts +11 -0
- package/dist/commands/generate/generators/kysely.d.ts.map +1 -0
- package/dist/commands/generate/generators/prisma.d.ts +3 -0
- package/dist/commands/generate/generators/prisma.d.ts.map +1 -0
- package/dist/commands/generate/generators/types.d.ts +13 -0
- package/dist/commands/generate/generators/types.d.ts.map +1 -0
- package/dist/commands/generate/schema.d.ts +10 -0
- package/dist/commands/generate/schema.d.ts.map +1 -0
- package/dist/commands/generate/setup.d.ts +13 -0
- package/dist/commands/generate/setup.d.ts.map +1 -0
- package/dist/commands/generate/write.d.ts +8 -0
- package/dist/commands/generate/write.d.ts.map +1 -0
- package/dist/commands/generate.d.ts +6 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/migrate/execute.d.ts +7 -0
- package/dist/commands/migrate/execute.d.ts.map +1 -0
- package/dist/commands/migrate/plan.d.ts +12 -0
- package/dist/commands/migrate/plan.d.ts.map +1 -0
- package/dist/commands/migrate/setup.d.ts +12 -0
- package/dist/commands/migrate/setup.d.ts.map +1 -0
- package/dist/commands/migrate.d.ts +3 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/components/intro.d.ts +9 -0
- package/dist/components/intro.d.ts.map +1 -0
- package/dist/context/config-management.d.ts +20 -0
- package/dist/context/config-management.d.ts.map +1 -0
- package/dist/context/creator.d.ts +11 -0
- package/dist/context/creator.d.ts.map +1 -0
- package/dist/context/error-handlers.d.ts +18 -0
- package/dist/context/error-handlers.d.ts.map +1 -0
- package/dist/context/file-system.d.ts +11 -0
- package/dist/context/file-system.d.ts.map +1 -0
- package/dist/context/parser.d.ts +11 -0
- package/dist/context/parser.d.ts.map +1 -0
- package/dist/context/types.d.ts +53 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/context/user-interaction.d.ts +14 -0
- package/dist/context/user-interaction.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +2002 -993
- package/dist/onboarding/dependencies.d.ts +20 -0
- package/dist/onboarding/dependencies.d.ts.map +1 -0
- package/dist/onboarding/detection.d.ts +33 -0
- package/dist/onboarding/detection.d.ts.map +1 -0
- package/dist/onboarding/index.d.ts +11 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/storage-modes/c15t-mode.d.ts +22 -0
- package/dist/onboarding/storage-modes/c15t-mode.d.ts.map +1 -0
- package/dist/onboarding/storage-modes/custom-mode.d.ts +18 -0
- package/dist/onboarding/storage-modes/custom-mode.d.ts.map +1 -0
- package/dist/onboarding/storage-modes/index.d.ts +5 -0
- package/dist/onboarding/storage-modes/index.d.ts.map +1 -0
- package/dist/onboarding/storage-modes/offline-mode.d.ts +19 -0
- package/dist/onboarding/storage-modes/offline-mode.d.ts.map +1 -0
- package/dist/onboarding/storage-modes/self-hosted-mode.d.ts +22 -0
- package/dist/onboarding/storage-modes/self-hosted-mode.d.ts.map +1 -0
- package/dist/onboarding/templates.d.ts +30 -0
- package/dist/onboarding/templates.d.ts.map +1 -0
- package/dist/onboarding.d.ts +15 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/utils/capitalize-first-letter.d.ts +2 -0
- package/dist/utils/capitalize-first-letter.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +30 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/telemetry.d.ts +173 -0
- package/dist/utils/telemetry.d.ts.map +1 -0
- package/package.json +36 -31
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://c15t.com/logo-icon.png" alt="c15t Logo" width="64" height="64" />
|
|
3
|
+
<h1>@c15t/cli</h1>
|
|
4
|
+
<p>Transform privacy consent from a compliance checkbox into a fully observable system</p>
|
|
5
|
+
|
|
6
|
+
[](https://github.com/c15t/c15t)
|
|
7
|
+
[](https://github.com/c15t/c15t/actions/workflows/ci.yml)
|
|
8
|
+
[]([LICENSE.md](https://github.com/c15t/c15t/blob/main/LICENSE.md))
|
|
9
|
+
[](https://c15t.com/discord)
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @c15t/cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or using yarn:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
yarn add @c15t/cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
The CLI can be invoked directly if installed globally:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
c15t [command] [options]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or with npx:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx @c15t/cli [command] [options]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
- `generate` - Generate schema/code based on your c15t config
|
|
41
|
+
- `migrate` - Run database migrations based on your c15t config
|
|
42
|
+
- `github` - Open the c15t GitHub repository
|
|
43
|
+
- `docs` - Open the c15t documentation in your browser
|
|
44
|
+
|
|
45
|
+
## Options
|
|
46
|
+
|
|
47
|
+
- `--help, -h` - Show the help menu
|
|
48
|
+
- `--version, -v` - Show the CLI version
|
|
49
|
+
- `--logger` - Set log level (fatal, error, warn, info, debug)
|
|
50
|
+
- `--config` - Specify path to configuration file
|
|
51
|
+
- `-y` - Skip confirmation prompts (use with caution)
|
|
52
|
+
- `--no-telemetry` - Disable telemetry data collection
|
|
53
|
+
|
|
54
|
+
## Telemetry
|
|
55
|
+
|
|
56
|
+
The c15t CLI collects anonymous telemetry data to help us understand how the CLI is being used and improve the tool. This data is completely anonymous and does not contain any personal information.
|
|
57
|
+
|
|
58
|
+
### What we collect
|
|
59
|
+
|
|
60
|
+
We collect structured events with descriptive names following a `category.action` pattern such as:
|
|
61
|
+
|
|
62
|
+
- **CLI lifecycle events**: `cli.invoked`, `cli.completed`, `cli.exited`
|
|
63
|
+
- **Command events**: `command.executed`, `command.succeeded`, `command.failed`, `command.unknown`
|
|
64
|
+
- **UI events**: `ui.menu.opened`, `ui.menu.exited`
|
|
65
|
+
- **Configuration events**: `config.loaded`, `config.error`
|
|
66
|
+
- **Help and version events**: `help.displayed`, `version.displayed`
|
|
67
|
+
- **Onboarding events**: `onboarding.started`, `onboarding.completed`
|
|
68
|
+
- **Error events**: `error.occurred`
|
|
69
|
+
|
|
70
|
+
Each event includes relevant contextual information, but never includes sensitive data such as:
|
|
71
|
+
- Personal information
|
|
72
|
+
- Configuration file contents
|
|
73
|
+
- File paths
|
|
74
|
+
- Project-specific data
|
|
75
|
+
|
|
76
|
+
### Disabling Telemetry
|
|
77
|
+
|
|
78
|
+
You can disable telemetry in any of the following ways:
|
|
79
|
+
|
|
80
|
+
1. Use the `--no-telemetry` flag when running a command:
|
|
81
|
+
```bash
|
|
82
|
+
c15t generate --no-telemetry
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. Set the environment variable `C15T_TELEMETRY_DISABLED`:
|
|
86
|
+
```bash
|
|
87
|
+
# In your shell
|
|
88
|
+
export C15T_TELEMETRY_DISABLED=1
|
|
89
|
+
|
|
90
|
+
# Or for a single command
|
|
91
|
+
C15T_TELEMETRY_DISABLED=1 c15t generate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
For more detailed documentation, visit [https://c15t.com](https://c15t.com).
|
|
97
|
+
|
|
98
|
+
## 📜 License
|
|
99
|
+
|
|
100
|
+
[GNU General Public License v3.0](https://github.com/c15t/c15t/blob/main/LICENSE.md) - See [LICENSE]([LICENSE.md](https://github.com/c15t/c15t/blob/main/LICENSE.md)) for details.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
<div align="center">
|
|
105
|
+
<strong>Built with ❤️ by the <a href="www.consent.io"/>consent.io</a> team</strong>
|
|
106
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend';
|
|
2
|
+
import type { ConsentManagerOptions } from '@c15t/react';
|
|
3
|
+
type MaybeC15TOptions = Partial<C15TOptions>;
|
|
4
|
+
type MaybeClientOptions = Partial<ConsentManagerOptions>;
|
|
5
|
+
type MaybeC15TFunc = (...args: unknown[]) => unknown;
|
|
6
|
+
export type LoadedConfig = {
|
|
7
|
+
c15t?: MaybeC15TOptions | MaybeC15TFunc | {
|
|
8
|
+
options?: MaybeC15TOptions;
|
|
9
|
+
};
|
|
10
|
+
default?: MaybeC15TOptions | MaybeC15TFunc | {
|
|
11
|
+
options?: MaybeC15TOptions;
|
|
12
|
+
};
|
|
13
|
+
c15tInstance?: MaybeC15TOptions | MaybeC15TFunc | {
|
|
14
|
+
options?: MaybeC15TOptions;
|
|
15
|
+
};
|
|
16
|
+
c15tConfig?: MaybeClientOptions;
|
|
17
|
+
c15tOptions?: MaybeClientOptions;
|
|
18
|
+
consent?: MaybeC15TOptions | MaybeC15TFunc | {
|
|
19
|
+
options?: MaybeC15TOptions;
|
|
20
|
+
};
|
|
21
|
+
instance?: {
|
|
22
|
+
options?: MaybeC15TOptions;
|
|
23
|
+
};
|
|
24
|
+
config?: {
|
|
25
|
+
options?: MaybeC15TOptions;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
export declare function isC15TOptions(obj: unknown): obj is C15TOptions;
|
|
30
|
+
export declare function isClientOptions(obj: unknown): obj is ConsentManagerOptions;
|
|
31
|
+
/**
|
|
32
|
+
* Extract c15t options from a loaded config object.
|
|
33
|
+
* Looks for various common export names for the c15t instance or options.
|
|
34
|
+
*/
|
|
35
|
+
export declare function extractOptionsFromConfig(config: LoadedConfig): C15TOptions | ConsentManagerOptions | null;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=config-extraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-extraction.d.ts","sourceRoot":"","sources":["../../../src/actions/get-config/config-extraction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,KAAK,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAC7C,KAAK,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACzD,KAAK,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACzE,OAAO,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC5E,YAAY,CAAC,EACV,gBAAgB,GAChB,aAAa,GACb;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAClC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC5E,QAAQ,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC1C,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAGxC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CAAC;AAGF,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAE9D;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,qBAAqB,CAM1E;AAkBD;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,YAAY,GAClB,WAAW,GAAG,qBAAqB,GAAG,IAAI,CAqH5C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend';
|
|
2
|
+
import type { ConsentManagerOptions } from '@c15t/react';
|
|
3
|
+
/**
|
|
4
|
+
* Validate the extracted config object (either client or backend).
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateConfig(config: C15TOptions | ConsentManagerOptions | null): boolean;
|
|
7
|
+
//# sourceMappingURL=config-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-validation.d.ts","sourceRoot":"","sources":["../../../src/actions/get-config/config-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIzD;;GAEG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,WAAW,GAAG,qBAAqB,GAAG,IAAI,GAChD,OAAO,CA8BT"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of possible config file names and locations to search.
|
|
3
|
+
* Priority order:
|
|
4
|
+
* 1. c15t.config.ts - Primary frontend configuration (recommended)
|
|
5
|
+
* 2. c15t.backend.ts - Optional backend configuration (recommended)
|
|
6
|
+
* 3. Legacy/alternative names for backward compatibility
|
|
7
|
+
*/
|
|
8
|
+
export declare const configFileNames: string[];
|
|
9
|
+
export declare const extensions: string[];
|
|
10
|
+
export declare let possiblePaths: string[];
|
|
11
|
+
export declare const directories: string[];
|
|
12
|
+
export declare const monorepoSubdirs: string[];
|
|
13
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/actions/get-config/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,UAc3B,CAAC;AAEF,eAAO,MAAM,UAAU,UAiBtB,CAAC;AAGF,eAAO,IAAI,aAAa,UAEvB,CAAC;AAGF,eAAO,MAAM,WAAW,UASvB,CAAC;AAQF,eAAO,MAAM,eAAe,UAA2B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find all directories that match the glob pattern(s) relative to the CWD.
|
|
3
|
+
* Only supports simple prefix* patterns (e.g., 'packages/*').
|
|
4
|
+
*/
|
|
5
|
+
export declare function findDirectories(cwd: string, patterns: string[]): string[];
|
|
6
|
+
//# sourceMappingURL=directory-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-search.d.ts","sourceRoot":"","sources":["../../../src/actions/get-config/directory-search.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAuCzE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliContext } from '../../context/types';
|
|
2
|
+
/**
|
|
3
|
+
* Get Jiti options for transpiling TypeScript/JSX
|
|
4
|
+
*/
|
|
5
|
+
export declare const jitiOptions: (context: CliContext, cwd: string) => {
|
|
6
|
+
extensions: string[];
|
|
7
|
+
alias: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=jiti-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jiti-options.d.ts","sourceRoot":"","sources":["../../../src/actions/get-config/jiti-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,UAAU,EAAE,KAAK,MAAM;;;CAM3D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend';
|
|
2
|
+
import type { ConsentManagerOptions } from '@c15t/react';
|
|
3
|
+
import type { CliContext } from '../context/types';
|
|
4
|
+
/**
|
|
5
|
+
* Gets the configuration for the CLI.
|
|
6
|
+
* @param contextOrOptions Either a CliContext object or a simplified object with just cwd and configPath
|
|
7
|
+
* @returns The loaded configuration or null if it could not be loaded
|
|
8
|
+
*/
|
|
9
|
+
export declare function getConfig(contextOrOptions: CliContext | {
|
|
10
|
+
cwd: string;
|
|
11
|
+
configPath?: string;
|
|
12
|
+
}): Promise<C15TOptions | ConsentManagerOptions | null>;
|
|
13
|
+
//# sourceMappingURL=get-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-config.d.ts","sourceRoot":"","sources":["../../src/actions/get-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAUnD;;;;GAIG;AACH,wBAAsB,SAAS,CAC9B,gBAAgB,EAAE,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,CAAC,WAAW,GAAG,qBAAqB,GAAG,IAAI,CAAC,CA6IrD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import type { CliContext } from '../context/types';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the c15t configuration, triggering onboarding if necessary.
|
|
5
|
+
* Exits the process if loading fails or after onboarding is triggered.
|
|
6
|
+
* Returns the loaded config if found.
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadConfigAndOnboard(context: CliContext): Promise<C15TOptions<C15TPlugin[]>>;
|
|
9
|
+
//# sourceMappingURL=load-config-and-onboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config-and-onboard.d.ts","sourceRoot":"","sources":["../../src/actions/load-config-and-onboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;;GAIG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,UAAU,GACjB,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CA4BpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CliCommand, CliContext, CliFlag } from '../context/types';
|
|
2
|
+
/**
|
|
3
|
+
* Displays the CLI help menu, generating commands and options dynamically.
|
|
4
|
+
*
|
|
5
|
+
* @param context The CLI context
|
|
6
|
+
* @param version The current CLI version.
|
|
7
|
+
* @param commands The array of available CLI commands.
|
|
8
|
+
* @param flags The array of available global CLI flags.
|
|
9
|
+
*/
|
|
10
|
+
export declare function showHelpMenu(context: CliContext, version: string, commands: CliCommand[], flags: CliFlag[]): void;
|
|
11
|
+
//# sourceMappingURL=show-help-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-help-menu.d.ts","sourceRoot":"","sources":["../../src/actions/show-help-menu.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,UAAU,EAAE,EACtB,KAAK,EAAE,OAAO,EAAE,GACd,IAAI,CAgCN"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CliContext } from '../../../context/types';
|
|
2
|
+
import type { SchemaResult } from '../schema';
|
|
3
|
+
/**
|
|
4
|
+
* Handles the logic for confirming and overwriting/appending to an existing schema file.
|
|
5
|
+
*/
|
|
6
|
+
export declare function handleExistingFile(context: CliContext, schema: SchemaResult, filePath: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=handle-existing-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-existing-file.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/actions/handle-existing-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C;;GAEG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CliContext } from '../../../context/types';
|
|
2
|
+
import type { SchemaResult } from '../schema';
|
|
3
|
+
/**
|
|
4
|
+
* Handles the logic for confirming and writing a new schema file.
|
|
5
|
+
*/
|
|
6
|
+
export declare function handleNewFile(context: CliContext, schema: SchemaResult, filePath: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=handle-new-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-new-file.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/actions/handle-new-file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C;;GAEG;AACH,wBAAsB,aAAa,CAClC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAiCf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CliContext } from '../../../context/types';
|
|
2
|
+
/**
|
|
3
|
+
* Helper to perform the actual file write operation
|
|
4
|
+
*/
|
|
5
|
+
export declare function performWriteAction(context: CliContext, filePath: string, code: string, actionDescription: string, successMessage: string): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=perform-write-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perform-write-action.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/actions/perform-write-action.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generators/drizzle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,UAM7C;AAED,eAAO,MAAM,qBAAqB,EAAE,eA6KnC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend';
|
|
2
|
+
import type { Adapter } from '@c15t/backend/pkgs/db-adapters';
|
|
3
|
+
import type { CliContext } from '../../../context/types';
|
|
4
|
+
export declare const adapters: {
|
|
5
|
+
prisma: import("./types").SchemaGenerator;
|
|
6
|
+
drizzle: import("./types").SchemaGenerator;
|
|
7
|
+
kysely: import("./types").SchemaGenerator;
|
|
8
|
+
};
|
|
9
|
+
export declare const getGenerator: (context: CliContext, opts: {
|
|
10
|
+
adapter: Adapter;
|
|
11
|
+
file?: string;
|
|
12
|
+
options: C15TOptions;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
code?: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
overwrite?: boolean;
|
|
17
|
+
append?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,eAAO,MAAM,YAAY,GACxB,SAAS,UAAU,EACnB,MAAM;IACL,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACrB;;;;;EAYD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SchemaGenerator } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Generates SQL migration files for Kysely
|
|
4
|
+
*
|
|
5
|
+
* @param options - The configuration options
|
|
6
|
+
* @param file - Optional output file path
|
|
7
|
+
* @param adapter - Database adapter
|
|
8
|
+
* @returns Object containing formatted SQL code and filename
|
|
9
|
+
*/
|
|
10
|
+
export declare const generateMigrations: SchemaGenerator;
|
|
11
|
+
//# sourceMappingURL=kysely.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kysely.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generators/kysely.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAoN/C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAgDhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generators/prisma.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,eAAO,MAAM,oBAAoB,EAAE,eAuNlC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend';
|
|
2
|
+
import type { Adapter } from '@c15t/backend/pkgs/db-adapters';
|
|
3
|
+
export type SchemaGenerator = (opts: {
|
|
4
|
+
file?: string;
|
|
5
|
+
adapter: Adapter;
|
|
6
|
+
options: C15TOptions;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
code?: string;
|
|
9
|
+
fileName: string;
|
|
10
|
+
overwrite?: boolean;
|
|
11
|
+
append?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generators/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;CACrB,KAAK,OAAO,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import type { Adapter } from '@c15t/backend/pkgs/db-adapters';
|
|
3
|
+
import type { CliContext } from '../../context/types';
|
|
4
|
+
import { getGenerator } from './generators';
|
|
5
|
+
export type SchemaResult = Awaited<ReturnType<typeof getGenerator>>;
|
|
6
|
+
/**
|
|
7
|
+
* Calls the schema generator and handles associated errors.
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateSchema(context: CliContext, adapter: Adapter, config: C15TOptions<C15TPlugin[]>): Promise<SchemaResult | null>;
|
|
10
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/commands/generate/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAEpE;;GAEG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,GAC/B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA2B9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import { type Adapter } from '@c15t/backend/pkgs/db-adapters';
|
|
3
|
+
import type { ConsentManagerOptions } from '@c15t/react';
|
|
4
|
+
import type { CliContext } from '../../context/types';
|
|
5
|
+
/**
|
|
6
|
+
* Handles config loading, onboarding, and adapter setup using the context.
|
|
7
|
+
* Returns the loaded config (if any) and adapter.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setupGenerateEnvironment(context: CliContext): Promise<{
|
|
10
|
+
config: C15TOptions<C15TPlugin[]> | ConsentManagerOptions | null;
|
|
11
|
+
adapter: Adapter;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/commands/generate/setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5E,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,GAAG,qBAAqB,GAAG,IAAI,CAAC;IACjE,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC,CAyED"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CliContext } from '../../context/types';
|
|
2
|
+
import type { SchemaResult } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* Handles confirming and writing the generated schema to a file.
|
|
5
|
+
* Acts as a decision tree, delegating to action handlers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function writeSchemaFile(context: CliContext, schema: SchemaResult): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/commands/generate/write.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;GAGG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CliContext } from '../context/types';
|
|
2
|
+
/**
|
|
3
|
+
* Generate command - loads config, allows updating via onboarding, then generates artifacts.
|
|
4
|
+
*/
|
|
5
|
+
export declare function generate(context: CliContext): Promise<undefined>;
|
|
6
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAUlD;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,UAAU,sBA2HjD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MigrationResult } from '@c15t/backend/pkgs/migrations';
|
|
2
|
+
import type { CliContext } from '../../context/types';
|
|
3
|
+
/**
|
|
4
|
+
* Executes the provided runMigrations function with spinner and error handling.
|
|
5
|
+
*/
|
|
6
|
+
export declare function executeMigrations(context: CliContext, runMigrationsFn: MigrationResult['runMigrations']): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,UAAU,EACnB,eAAe,EAAE,eAAe,CAAC,eAAe,CAAC,GAC/C,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import { type MigrationResult } from '@c15t/backend/pkgs/migrations';
|
|
3
|
+
import type { CliContext } from '../../context/types';
|
|
4
|
+
/**
|
|
5
|
+
* Fetches migrations, displays the plan, and asks for confirmation.
|
|
6
|
+
* Returns whether to proceed and the function to run migrations.
|
|
7
|
+
*/
|
|
8
|
+
export declare function planMigrations(context: CliContext, config: C15TOptions<C15TPlugin[]>, skipConfirmation: boolean): Promise<{
|
|
9
|
+
shouldRun: boolean;
|
|
10
|
+
runMigrationsFn: MigrationResult['runMigrations'] | null;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACN,KAAK,eAAe,EAEpB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;GAGG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,EACjC,gBAAgB,EAAE,OAAO,GACvB,OAAO,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;CACzD,CAAC,CA2ED"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import { type Adapter } from '@c15t/backend/pkgs/db-adapters';
|
|
3
|
+
import type { CliContext } from '../../context/types';
|
|
4
|
+
/**
|
|
5
|
+
* Loads config, checks for onboarding, initializes and validates the DB adapter using context.
|
|
6
|
+
* Returns the config and adapter if successful, otherwise handles exit/errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setupEnvironment(context: CliContext): Promise<{
|
|
9
|
+
config: C15TOptions<C15TPlugin[]>;
|
|
10
|
+
adapter: Adapter;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate/setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,gCAAgC,CAAC;AAE1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgClD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC;IACpE,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC,CA8BD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAMlD,wBAAsB,OAAO,CAAC,OAAO,EAAE,UAAU,iBAwDhD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliContext } from '../context/types';
|
|
2
|
+
/**
|
|
3
|
+
* Displays the CLI introduction sequence, including
|
|
4
|
+
* welcome message, figlet art, version, and docs link.
|
|
5
|
+
* @param context - The CLI context
|
|
6
|
+
* @param version - The CLI version string.
|
|
7
|
+
*/
|
|
8
|
+
export declare function displayIntro(context: CliContext, version: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=intro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro.d.ts","sourceRoot":"","sources":["../../src/components/intro.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,wBAAsB,YAAY,CACjC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAwFf"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { C15TOptions, C15TPlugin } from '@c15t/backend';
|
|
2
|
+
import type { CliContext } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates configuration management utilities for the CLI context
|
|
5
|
+
*/
|
|
6
|
+
export declare function createConfigManagement(context: CliContext): {
|
|
7
|
+
/**
|
|
8
|
+
* Load configuration, returns null if not found
|
|
9
|
+
*/
|
|
10
|
+
loadConfig: () => Promise<C15TOptions<C15TPlugin[]> | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Load configuration and throw an error if not found
|
|
13
|
+
*/
|
|
14
|
+
requireConfig: () => Promise<C15TOptions<C15TPlugin[]>>;
|
|
15
|
+
/**
|
|
16
|
+
* Extract path aliases from tsconfig.json or jsconfig.json
|
|
17
|
+
*/
|
|
18
|
+
getPathAliases: (configDir?: string) => Record<string, string> | null;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=config-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-management.d.ts","sourceRoot":"","sources":["../../src/context/config-management.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU;IAIxD;;OAEG;sBACmB,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC;IAoB/D;;OAEG;yBACsB,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;IAa3D;;OAEG;iCAC0B,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;EA2BpE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CliCommand, CliContext } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Parses arguments, creates the logger, and returns the application context.
|
|
4
|
+
*
|
|
5
|
+
* @param rawArgs - The raw command line arguments (process.argv.slice(2)).
|
|
6
|
+
* @param cwd - The current working directory (process.cwd()).
|
|
7
|
+
* @param commands - The list of available CLI commands.
|
|
8
|
+
* @returns The CLI context object.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createCliContext(rawArgs: string[], cwd: string, commands: CliCommand[]): CliContext;
|
|
11
|
+
//# sourceMappingURL=creator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creator.d.ts","sourceRoot":"","sources":["../../src/context/creator.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,UAAU,EAAE,GACpB,UAAU,CAyEZ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CliContext } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates error handling utilities for the CLI context
|
|
4
|
+
*/
|
|
5
|
+
export declare function createErrorHandlers(context: CliContext): {
|
|
6
|
+
/**
|
|
7
|
+
* Handles errors in a consistent way across the CLI
|
|
8
|
+
* @param error The error that occurred
|
|
9
|
+
* @param message A message describing the error context
|
|
10
|
+
*/
|
|
11
|
+
handleError: (error: unknown, message: string) => never;
|
|
12
|
+
/**
|
|
13
|
+
* Handles user cancellation in a consistent way
|
|
14
|
+
* @param message Optional message to display when cancelling
|
|
15
|
+
*/
|
|
16
|
+
handleCancel: (message?: string) => never;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=error-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handlers.d.ts","sourceRoot":"","sources":["../../src/context/error-handlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU;IAIrD;;;;OAIG;yBACkB,OAAO,WAAW,MAAM,KAAG,KAAK;IAgBrD;;;OAGG;wCAC+C,KAAK;EAQxD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CliContext, PackageInfo } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates file system utilities for the CLI context
|
|
4
|
+
*/
|
|
5
|
+
export declare function createFileSystem(context: CliContext): {
|
|
6
|
+
/**
|
|
7
|
+
* Reads and returns the content of the package.json in the current directory
|
|
8
|
+
*/
|
|
9
|
+
getPackageInfo: () => PackageInfo;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=file-system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/context/file-system.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEvD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU;IAIlD;;OAEG;0BACiB,WAAW;EA2BhC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CliCommand, CliFlag, ParsedArgs } from './types';
|
|
2
|
+
export declare const globalFlags: CliFlag[];
|
|
3
|
+
/**
|
|
4
|
+
* Parses raw command line arguments into structured flags, command name, and command args.
|
|
5
|
+
*
|
|
6
|
+
* @param rawArgs - Raw arguments from process.argv.slice(2).
|
|
7
|
+
* @param commands - The list of available CLI commands (needed to identify command name).
|
|
8
|
+
* @returns A ParsedArgs object.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseCliArgs(rawArgs: string[], commands: CliCommand[]): ParsedArgs;
|
|
11
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/context/parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,OAAO,EAqChC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,EAAE,UAAU,EAAE,GACpB,UAAU,CAoEZ"}
|