@c15t/cli 2.0.0-rc.3 → 2.0.0-rc.5
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/README.md +43 -14
- package/dist/{153.mjs → 642.mjs} +45 -43
- package/dist/index.mjs +3113 -349
- package/{dist → dist-types}/actions/show-help-menu.d.ts +0 -1
- package/dist-types/auth/base-url.d.ts +7 -0
- package/{dist → dist-types}/auth/config-store.d.ts +0 -1
- package/{dist → dist-types}/auth/device-flow.d.ts +0 -1
- package/{dist → dist-types}/auth/index.d.ts +1 -1
- package/{dist → dist-types}/auth/types.d.ts +0 -1
- package/{dist → dist-types}/commands/auth/index.d.ts +0 -1
- package/dist-types/commands/codemods/active-ui-api.d.ts +41 -0
- package/dist-types/commands/codemods/component-renames.d.ts +41 -0
- package/dist-types/commands/codemods/gdpr-types-to-consent-categories.d.ts +41 -0
- package/dist-types/commands/codemods/ignore-geo-location-to-overrides.d.ts +41 -0
- package/dist-types/commands/codemods/index.d.ts +28 -0
- package/dist-types/commands/codemods/mode-c15t-to-hosted.d.ts +43 -0
- package/dist-types/commands/codemods/offline-add-policy-packs.d.ts +21 -0
- package/dist-types/commands/codemods/react-options-to-top-level.d.ts +41 -0
- package/dist-types/commands/codemods/tracking-blocker-to-network-blocker.d.ts +41 -0
- package/dist-types/commands/codemods/translations-to-i18n.d.ts +51 -0
- package/dist-types/commands/codemods/versioning.d.ts +49 -0
- package/{dist → dist-types}/commands/generate/index.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/shared/backend-options.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/shared/dev-tools.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/shared/frontend-ui-options.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/shared/scripts.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/shared/ssr.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/types.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/utils/dependencies.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/options/utils/generate-files.d.ts +2 -2
- package/{dist → dist-types}/commands/generate/preflight.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/prompts/expanded-theme.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/prompts/index.d.ts +0 -2
- package/{dist → dist-types}/commands/generate/prompts/mode-select.d.ts +1 -7
- package/{dist → dist-types}/commands/generate/prompts/scripts.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/prompts/theme.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/prompts/ui-style.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/summary.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/config.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/css.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/env.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/index.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/layout.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/next/app/layout.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/next/index.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/next/pages/layout.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/next-config.d.ts +1 -4
- package/{dist → dist-types}/commands/generate/templates/shared/components.d.ts +2 -3
- package/{dist → dist-types}/commands/generate/templates/shared/directory.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/expanded-components.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/framework-config.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/layout-pipeline.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/module-specifier.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/options.d.ts +5 -6
- package/{dist → dist-types}/commands/generate/templates/shared/scripts.d.ts +0 -1
- package/{dist → dist-types}/commands/generate/templates/shared/server-components.d.ts +0 -1
- package/{dist → dist-types}/commands/index.d.ts +1 -1
- package/{dist → dist-types}/commands/instances/index.d.ts +0 -1
- package/{dist → dist-types}/commands/self-host/index.d.ts +0 -1
- package/{dist → dist-types}/commands/self-host/migrate/ensure-backend-config.d.ts +0 -1
- package/{dist → dist-types}/commands/self-host/migrate/index.d.ts +0 -1
- package/{dist → dist-types}/commands/self-host/migrate/migrator-result.d.ts +1 -2
- package/{dist → dist-types}/commands/self-host/migrate/orm-result.d.ts +1 -2
- package/{dist → dist-types}/commands/self-host/migrate/read-config.d.ts +1 -2
- package/{dist → dist-types}/commands/skills.d.ts +0 -1
- package/{dist → dist-types}/components/intro.d.ts +0 -1
- package/{dist → dist-types}/constants.d.ts +19 -9
- package/{dist → dist-types}/context/creator.d.ts +0 -1
- package/{dist → dist-types}/context/error-handlers.d.ts +0 -1
- package/{dist → dist-types}/context/file-system.d.ts +0 -1
- package/{dist → dist-types}/context/framework-detection.d.ts +0 -1
- package/{dist → dist-types}/context/package-manager-detection.d.ts +0 -1
- package/{dist → dist-types}/context/parser.d.ts +0 -1
- package/{dist → dist-types}/context/types.d.ts +1 -2
- package/{dist → dist-types}/context/user-interaction.d.ts +0 -1
- package/dist-types/control-plane/client.d.ts +56 -0
- package/dist-types/control-plane/index.d.ts +5 -0
- package/dist-types/control-plane/types.d.ts +73 -0
- package/{dist → dist-types}/core/context.d.ts +0 -1
- package/{dist → dist-types}/core/errors.d.ts +5 -11
- package/{dist → dist-types}/core/index.d.ts +0 -1
- package/{dist → dist-types}/core/logger.d.ts +0 -1
- package/{dist → dist-types}/core/parser.d.ts +0 -1
- package/{dist → dist-types}/core/telemetry.d.ts +0 -1
- package/{dist → dist-types}/detection/framework.d.ts +0 -1
- package/{dist → dist-types}/detection/index.d.ts +0 -1
- package/{dist → dist-types}/detection/layout.d.ts +0 -1
- package/{dist → dist-types}/detection/package-manager.d.ts +0 -1
- package/{dist → dist-types}/index.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/actions.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/actors/dependencies.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/actors/file-generation.d.ts +1 -2
- package/{dist → dist-types}/machines/generate/actors/preflight.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/actors/prompts.d.ts +8 -13
- package/{dist → dist-types}/machines/generate/guards.d.ts +4 -5
- package/{dist → dist-types}/machines/generate/machine.d.ts +10 -23
- package/{dist → dist-types}/machines/generate/runner.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/types.d.ts +4 -3
- package/{dist → dist-types}/machines/index.d.ts +1 -2
- package/{dist → dist-types}/machines/persistence.d.ts +0 -1
- package/{dist → dist-types}/machines/telemetry-plugin.d.ts +0 -1
- package/{dist → dist-types}/machines/types.d.ts +0 -1
- package/{dist → dist-types}/types.d.ts +6 -3
- package/{dist → dist-types}/utils/capitalize-first-letter.d.ts +0 -1
- package/{dist → dist-types}/utils/formatter.d.ts +0 -1
- package/{dist → dist-types}/utils/fs.d.ts +0 -1
- package/{dist → dist-types}/utils/index.d.ts +0 -1
- package/{dist → dist-types}/utils/logger.d.ts +1 -2
- package/{dist → dist-types}/utils/spinner.d.ts +0 -1
- package/{dist → dist-types}/utils/telemetry.d.ts +1 -2
- package/{dist → dist-types}/utils/validation.d.ts +0 -1
- package/package.json +7 -5
- package/readme.json +22 -8
- package/dist/__tests__/auth/config-store.test.d.ts +0 -2
- package/dist/__tests__/auth/config-store.test.d.ts.map +0 -1
- package/dist/__tests__/constants.test.d.ts +0 -2
- package/dist/__tests__/constants.test.d.ts.map +0 -1
- package/dist/__tests__/detection/layout.test.d.ts +0 -2
- package/dist/__tests__/detection/layout.test.d.ts.map +0 -1
- package/dist/__tests__/mocks/prompts.d.ts +0 -25
- package/dist/__tests__/mocks/prompts.d.ts.map +0 -1
- package/dist/__tests__/utils/validation.test.d.ts +0 -2
- package/dist/__tests__/utils/validation.test.d.ts.map +0 -1
- package/dist/actions/show-help-menu.d.ts.map +0 -1
- package/dist/auth/config-store.d.ts.map +0 -1
- package/dist/auth/device-flow.d.ts.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/commands/auth/index.d.ts.map +0 -1
- package/dist/commands/generate/index.d.ts.map +0 -1
- package/dist/commands/generate/options/c15t-mode.d.ts +0 -27
- package/dist/commands/generate/options/c15t-mode.d.ts.map +0 -1
- package/dist/commands/generate/options/custom-mode.d.ts +0 -26
- package/dist/commands/generate/options/custom-mode.d.ts.map +0 -1
- package/dist/commands/generate/options/offline-mode.d.ts +0 -26
- package/dist/commands/generate/options/offline-mode.d.ts.map +0 -1
- package/dist/commands/generate/options/self-hosted-mode.d.ts +0 -19
- package/dist/commands/generate/options/self-hosted-mode.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/backend-options.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/dev-tools.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/frontend-ui-options.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/index.d.ts +0 -9
- package/dist/commands/generate/options/shared/index.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/scripts.d.ts.map +0 -1
- package/dist/commands/generate/options/shared/ssr.d.ts.map +0 -1
- package/dist/commands/generate/options/types.d.ts.map +0 -1
- package/dist/commands/generate/options/utils/dependencies.d.ts.map +0 -1
- package/dist/commands/generate/options/utils/generate-files.d.ts.map +0 -1
- package/dist/commands/generate/preflight.d.ts.map +0 -1
- package/dist/commands/generate/prompts/expanded-theme.d.ts.map +0 -1
- package/dist/commands/generate/prompts/index.d.ts.map +0 -1
- package/dist/commands/generate/prompts/instance.d.ts +0 -33
- package/dist/commands/generate/prompts/instance.d.ts.map +0 -1
- package/dist/commands/generate/prompts/mode-select.d.ts.map +0 -1
- package/dist/commands/generate/prompts/scripts.d.ts.map +0 -1
- package/dist/commands/generate/prompts/theme.d.ts.map +0 -1
- package/dist/commands/generate/prompts/ui-style.d.ts.map +0 -1
- package/dist/commands/generate/summary.d.ts.map +0 -1
- package/dist/commands/generate/templates/config.d.ts.map +0 -1
- package/dist/commands/generate/templates/css.d.ts.map +0 -1
- package/dist/commands/generate/templates/env.d.ts.map +0 -1
- package/dist/commands/generate/templates/index.d.ts.map +0 -1
- package/dist/commands/generate/templates/layout.d.ts.map +0 -1
- package/dist/commands/generate/templates/next/app/layout.d.ts.map +0 -1
- package/dist/commands/generate/templates/next/index.d.ts.map +0 -1
- package/dist/commands/generate/templates/next/pages/layout.d.ts.map +0 -1
- package/dist/commands/generate/templates/next-config.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/components.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/directory.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/expanded-components.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/framework-config.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/layout-pipeline.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/module-specifier.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/options.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/scripts.d.ts.map +0 -1
- package/dist/commands/generate/templates/shared/server-components.d.ts.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/instances/index.d.ts.map +0 -1
- package/dist/commands/self-host/index.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/ensure-backend-config.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/ensure-backend-config.test.d.ts +0 -2
- package/dist/commands/self-host/migrate/ensure-backend-config.test.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/index.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/index.test.d.ts +0 -2
- package/dist/commands/self-host/migrate/index.test.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/migrator-result.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/migrator-result.test.d.ts +0 -2
- package/dist/commands/self-host/migrate/migrator-result.test.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/orm-result.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/orm-result.test.d.ts +0 -2
- package/dist/commands/self-host/migrate/orm-result.test.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/read-config.d.ts.map +0 -1
- package/dist/commands/self-host/migrate/read-config.test.d.ts +0 -2
- package/dist/commands/self-host/migrate/read-config.test.d.ts.map +0 -1
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/components/intro.d.ts.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/context/creator.d.ts.map +0 -1
- package/dist/context/error-handlers.d.ts.map +0 -1
- package/dist/context/file-system.d.ts.map +0 -1
- package/dist/context/framework-detection.d.ts.map +0 -1
- package/dist/context/package-manager-detection.d.ts.map +0 -1
- package/dist/context/parser.d.ts.map +0 -1
- package/dist/context/types.d.ts.map +0 -1
- package/dist/context/user-interaction.d.ts.map +0 -1
- package/dist/core/context.d.ts.map +0 -1
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/parser.d.ts.map +0 -1
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/detection/framework.d.ts.map +0 -1
- package/dist/detection/index.d.ts.map +0 -1
- package/dist/detection/layout.d.ts.map +0 -1
- package/dist/detection/package-manager.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/machines/generate/actions.d.ts.map +0 -1
- package/dist/machines/generate/actors/dependencies.d.ts.map +0 -1
- package/dist/machines/generate/actors/file-generation.d.ts.map +0 -1
- package/dist/machines/generate/actors/preflight.d.ts.map +0 -1
- package/dist/machines/generate/actors/prompts.d.ts.map +0 -1
- package/dist/machines/generate/guards.d.ts.map +0 -1
- package/dist/machines/generate/machine.d.ts.map +0 -1
- package/dist/machines/generate/runner.d.ts.map +0 -1
- package/dist/machines/generate/types.d.ts.map +0 -1
- package/dist/machines/index.d.ts.map +0 -1
- package/dist/machines/persistence.d.ts.map +0 -1
- package/dist/machines/telemetry-plugin.d.ts.map +0 -1
- package/dist/machines/types.d.ts.map +0 -1
- package/dist/mcp/client.d.ts +0 -61
- package/dist/mcp/client.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -6
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/types.d.ts +0 -84
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/capitalize-first-letter.d.ts.map +0 -1
- package/dist/utils/formatter.d.ts.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/spinner.d.ts.map +0 -1
- package/dist/utils/telemetry.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
|
@@ -16,10 +16,8 @@ interface UpdateNextConfigOptions {
|
|
|
16
16
|
* ```ts
|
|
17
17
|
* const result = await updateNextConfig({
|
|
18
18
|
* projectRoot: '/path/to/project',
|
|
19
|
-
* mode: 'c15t',
|
|
20
19
|
* backendURL: 'https://api.example.com',
|
|
21
|
-
* useEnvFile: true
|
|
22
|
-
* pkg: '@c15t/nextjs'
|
|
20
|
+
* useEnvFile: true
|
|
23
21
|
* });
|
|
24
22
|
* ```
|
|
25
23
|
*/
|
|
@@ -30,4 +28,3 @@ export declare function updateNextConfig({ projectRoot, backendURL, useEnvFile,
|
|
|
30
28
|
created: boolean;
|
|
31
29
|
}>;
|
|
32
30
|
export {};
|
|
33
|
-
//# sourceMappingURL=next-config.d.ts.map
|
|
@@ -49,14 +49,14 @@ interface GenerateConsentComponentOptions {
|
|
|
49
49
|
* // Next.js Pages
|
|
50
50
|
* generateConsentComponent({
|
|
51
51
|
* importSource: '@c15t/nextjs',
|
|
52
|
-
* optionsText: "mode: '
|
|
52
|
+
* optionsText: "mode: 'hosted',\n\t\t\t\tbackendURL: '/api/c15t',",
|
|
53
53
|
* initialDataProp: true,
|
|
54
54
|
* });
|
|
55
55
|
*
|
|
56
56
|
* // Next.js App Dir client
|
|
57
57
|
* generateConsentComponent({
|
|
58
58
|
* importSource: '@c15t/nextjs',
|
|
59
|
-
* optionsText: "mode: '
|
|
59
|
+
* optionsText: "mode: 'hosted',\n\t\t\t\tbackendURL: '/api/c15t',",
|
|
60
60
|
* useClientDirective: true,
|
|
61
61
|
* defaultExport: true,
|
|
62
62
|
* ssrDataOption: true,
|
|
@@ -66,4 +66,3 @@ interface GenerateConsentComponentOptions {
|
|
|
66
66
|
*/
|
|
67
67
|
export declare function generateConsentComponent({ importSource, optionsText, selectedScripts, initialDataProp, useClientDirective, defaultExport, ssrDataOption, includeOverrides, enableDevTools, useFrameworkProps, includeTheme, docsSlug, }: GenerateConsentComponentOptions): string;
|
|
68
68
|
export {};
|
|
69
|
-
//# sourceMappingURL=components.d.ts.map
|
|
@@ -30,10 +30,10 @@ export declare function getBackendURLValue(backendURL?: string, useEnvFile?: boo
|
|
|
30
30
|
/**
|
|
31
31
|
* Generates the inner options text for ConsentManagerProvider based on mode and configuration
|
|
32
32
|
*
|
|
33
|
-
* @param mode - The storage mode ('
|
|
34
|
-
* @param backendURL - URL for the c15t backend/API (for '
|
|
33
|
+
* @param mode - The storage mode ('hosted', 'self-hosted', 'offline', or 'custom')
|
|
34
|
+
* @param backendURL - URL for the c15t backend/API (for 'hosted'/'self-hosted' modes)
|
|
35
35
|
* @param useEnvFile - Whether to use environment variable for backendURL
|
|
36
|
-
* @param proxyNextjs - Whether to use Next.js API proxy for
|
|
36
|
+
* @param proxyNextjs - Whether to use Next.js API proxy for hosted mode
|
|
37
37
|
* @param inlineCustomHandlers - When true, generates inline fetch-based endpoint handlers
|
|
38
38
|
* for 'custom' mode instead of referencing createCustomHandlers(). Used by React templates
|
|
39
39
|
* that don't generate a separate handlers file.
|
|
@@ -46,9 +46,8 @@ export declare function getBackendURLValue(backendURL?: string, useEnvFile?: boo
|
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* ```ts
|
|
49
|
-
* const options = generateOptionsText('
|
|
50
|
-
* // Returns: "mode: '
|
|
49
|
+
* const options = generateOptionsText('hosted', 'https://api.example.com', false, true);
|
|
50
|
+
* // Returns: "mode: 'hosted',\n\t\t\t\tbackendURL: '/api/c15t', ..."
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
export declare function generateOptionsText(mode: string, backendURL?: string, useEnvFile?: boolean, proxyNextjs?: boolean, inlineCustomHandlers?: boolean, envVarPrefix?: string): string;
|
|
54
|
-
//# sourceMappingURL=options.d.ts.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Command exports
|
|
3
3
|
*/
|
|
4
4
|
export { authCommands, loginCommand, logoutCommand } from './auth';
|
|
5
|
+
export { codemodsCommand, runCodemods } from './codemods';
|
|
5
6
|
export { generate, generateCommand } from './generate';
|
|
6
7
|
export { instancesCommand } from './instances';
|
|
7
8
|
export { selfHost } from './self-host';
|
|
8
9
|
export { installSkills } from './skills';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { MigrationResult } from '
|
|
1
|
+
import type { MigrationResult } from '../../../../../backend/dist-types/db/migrator';
|
|
2
2
|
import type { CliContext } from '../../../context/types';
|
|
3
3
|
export declare function handleMigrationResult(context: CliContext, result: MigrationResult): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=migrator-result.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ORMResult } from '
|
|
1
|
+
import type { ORMResult } from '../../../../../backend/dist-types/db/migrator';
|
|
2
2
|
import type { CliContext } from '../../../context/types';
|
|
3
3
|
export declare function handleORMResult(context: CliContext, result: ORMResult): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=orm-result.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DB } from '
|
|
1
|
+
import { DB } from '../../../../../backend/dist-types/db/schema';
|
|
2
2
|
import type { CliContext } from '../../../context/types';
|
|
3
3
|
export declare function readConfigAndGetDb(context: CliContext, absoluteConfigPath: string): Promise<{
|
|
4
4
|
db: ReturnType<typeof DB.client>;
|
|
5
5
|
}>;
|
|
6
|
-
//# sourceMappingURL=read-config.d.ts.map
|
|
@@ -8,15 +8,17 @@ export declare const URLS: {
|
|
|
8
8
|
/** Default c15t cloud platform URL */
|
|
9
9
|
readonly CONSENT_IO: "https://consent.io";
|
|
10
10
|
/** Documentation website */
|
|
11
|
-
readonly DOCS: "https://c15t.
|
|
11
|
+
readonly DOCS: "https://v2.c15t.com/docs";
|
|
12
12
|
/** GitHub repository */
|
|
13
13
|
readonly GITHUB: "https://github.com/c15t/c15t";
|
|
14
14
|
/** Discord community */
|
|
15
|
-
readonly DISCORD: "https://c15t.
|
|
15
|
+
readonly DISCORD: "https://v2.c15t.com/discord";
|
|
16
16
|
/** API documentation */
|
|
17
|
-
readonly API_DOCS: "https://c15t.
|
|
17
|
+
readonly API_DOCS: "https://v2.c15t.com/docs/api";
|
|
18
18
|
/** CLI documentation */
|
|
19
|
-
readonly CLI_DOCS: "https://c15t.
|
|
19
|
+
readonly CLI_DOCS: "https://v2.c15t.com/docs/cli";
|
|
20
|
+
/** Product changelog */
|
|
21
|
+
readonly CHANGELOG: "https://v2.c15t.com/changelog";
|
|
20
22
|
};
|
|
21
23
|
export declare const PATHS: {
|
|
22
24
|
/** c15t config directory name (in home dir) */
|
|
@@ -49,8 +51,8 @@ export declare const CLI_INFO: {
|
|
|
49
51
|
readonly NAME: "c15t";
|
|
50
52
|
/** CLI binary name */
|
|
51
53
|
readonly BIN: "c15t";
|
|
52
|
-
/**
|
|
53
|
-
readonly
|
|
54
|
+
/** Control-plane client name */
|
|
55
|
+
readonly CONTROL_PLANE_CLIENT_NAME: "c15t-cli";
|
|
54
56
|
/** Current version (updated during build) */
|
|
55
57
|
readonly VERSION: "2.0.0";
|
|
56
58
|
};
|
|
@@ -61,12 +63,16 @@ export declare const TIMEOUTS: {
|
|
|
61
63
|
readonly DEVICE_FLOW_EXPIRY: 900;
|
|
62
64
|
/** HTTP request timeout (ms) */
|
|
63
65
|
readonly HTTP_REQUEST: 10000;
|
|
64
|
-
/**
|
|
65
|
-
readonly
|
|
66
|
+
/** Control-plane connection timeout (ms) */
|
|
67
|
+
readonly CONTROL_PLANE_CONNECTION: 30000;
|
|
66
68
|
};
|
|
67
69
|
export declare const ENV_VARS: {
|
|
70
|
+
/** Enable v2 feature-flagged behavior */
|
|
71
|
+
readonly V2: "V2";
|
|
68
72
|
/** Disable telemetry */
|
|
69
73
|
readonly TELEMETRY_DISABLED: "C15T_TELEMETRY_DISABLED";
|
|
74
|
+
/** Control-plane/dashboard base URL override */
|
|
75
|
+
readonly CONSENT_URL: "CONSENT_URL";
|
|
70
76
|
/** c15t backend URL */
|
|
71
77
|
readonly BACKEND_URL: "C15T_URL";
|
|
72
78
|
/** c15t API key */
|
|
@@ -75,6 +81,11 @@ export declare const ENV_VARS: {
|
|
|
75
81
|
readonly DEBUG: "C15T_DEBUG";
|
|
76
82
|
};
|
|
77
83
|
export declare const STORAGE_MODES: {
|
|
84
|
+
readonly HOSTED: "hosted";
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated Use HOSTED instead; remove in v3.0.0.
|
|
87
|
+
* @see HOSTED
|
|
88
|
+
*/
|
|
78
89
|
readonly C15T: "c15t";
|
|
79
90
|
readonly OFFLINE: "offline";
|
|
80
91
|
readonly SELF_HOSTED: "self-hosted";
|
|
@@ -98,4 +109,3 @@ export declare const FRAMEWORK_KEYS: {
|
|
|
98
109
|
};
|
|
99
110
|
export declare const LAYOUT_PATTERNS: readonly ["app/layout.tsx", "app/layout.ts", "app/layout.jsx", "app/layout.js", "src/app/layout.tsx", "src/app/layout.ts", "src/app/layout.jsx", "src/app/layout.js", "app/*/layout.tsx", "app/*/layout.ts", "app/*/layout.jsx", "app/*/layout.js", "src/app/*/layout.tsx", "src/app/*/layout.ts", "src/app/*/layout.jsx", "src/app/*/layout.js", "app/*/*/layout.tsx", "app/*/*/layout.ts", "src/app/*/*/layout.tsx", "src/app/*/*/layout.ts"];
|
|
100
111
|
export declare const PAGES_APP_PATTERNS: readonly ["pages/_app.tsx", "pages/_app.ts", "pages/_app.jsx", "pages/_app.js", "src/pages/_app.tsx", "src/pages/_app.ts", "src/pages/_app.jsx", "src/pages/_app.js"];
|
|
101
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -30,4 +30,3 @@ export declare function detectFramework(projectRoot: string, logger?: CliLogger)
|
|
|
30
30
|
* @returns The project root directory path or cwd if not found
|
|
31
31
|
*/
|
|
32
32
|
export declare function detectProjectRoot(cwd: string, logger?: CliLogger): Promise<string>;
|
|
33
|
-
//# sourceMappingURL=framework-detection.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { C15TOptions } from '
|
|
1
|
+
import type { C15TOptions } from '../../../backend/dist-types/core.d.ts';
|
|
2
2
|
import type { CliLogger } from '../utils/logger';
|
|
3
3
|
import type { Telemetry } from '../utils/telemetry';
|
|
4
4
|
import type { FrameworkDetectionResult } from './framework-detection';
|
|
@@ -57,4 +57,3 @@ export interface CliContext {
|
|
|
57
57
|
framework: FrameworkDetectionResult;
|
|
58
58
|
packageManager: PackageManagerResult;
|
|
59
59
|
}
|
|
60
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control-plane client for c15t instances.
|
|
3
|
+
*/
|
|
4
|
+
import type { Instance } from '../types';
|
|
5
|
+
import type { ControlPlaneClientConfig, ControlPlaneConnectionState, ControlPlaneOrganization, ControlPlaneRegion, CreateInstanceRequest } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Client for c15t instances.
|
|
8
|
+
*
|
|
9
|
+
* Uses direct control-plane HTTP endpoints under /api/v1.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ControlPlaneClient {
|
|
12
|
+
private config;
|
|
13
|
+
private connected;
|
|
14
|
+
constructor(config: ControlPlaneClientConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Connect the client.
|
|
17
|
+
*/
|
|
18
|
+
connect(): Promise<ControlPlaneConnectionState>;
|
|
19
|
+
/**
|
|
20
|
+
* Disconnect the client.
|
|
21
|
+
*/
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Check if connected.
|
|
25
|
+
*/
|
|
26
|
+
isConnected(): boolean;
|
|
27
|
+
private ensureConnected;
|
|
28
|
+
private buildUrl;
|
|
29
|
+
private request;
|
|
30
|
+
listOrganizations(): Promise<ControlPlaneOrganization[]>;
|
|
31
|
+
listRegions(): Promise<ControlPlaneRegion[]>;
|
|
32
|
+
/**
|
|
33
|
+
* List all instances for the authenticated user.
|
|
34
|
+
*/
|
|
35
|
+
listInstances(): Promise<Instance[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Get a specific instance by ID.
|
|
38
|
+
*/
|
|
39
|
+
getInstance(id: string): Promise<Instance>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a new instance.
|
|
42
|
+
*/
|
|
43
|
+
createInstance(request: CreateInstanceRequest): Promise<Instance>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete an instance.
|
|
46
|
+
*/
|
|
47
|
+
deleteInstance(id: string): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create and connect a client.
|
|
51
|
+
*/
|
|
52
|
+
export declare function createControlPlaneClient(accessToken: string, baseUrl?: string): Promise<ControlPlaneClient>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a client from stored config.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createControlPlaneClientFromConfig(baseUrl?: string): Promise<ControlPlaneClient | null>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control-plane module exports
|
|
3
|
+
*/
|
|
4
|
+
export { ControlPlaneClient, createControlPlaneClient, createControlPlaneClientFromConfig, } from './client';
|
|
5
|
+
export type { ControlPlaneCapabilities, ControlPlaneClientConfig, ControlPlaneConnectionState, ControlPlaneOrganization, ControlPlaneRegion, CreateInstanceRequest, } from './types';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control-plane client types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Control-plane client configuration
|
|
6
|
+
*/
|
|
7
|
+
export interface ControlPlaneClientConfig {
|
|
8
|
+
/** Base URL of the control plane */
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
/** Access token for authentication */
|
|
11
|
+
accessToken: string;
|
|
12
|
+
/** Client name */
|
|
13
|
+
clientName?: string;
|
|
14
|
+
/** Client version */
|
|
15
|
+
clientVersion?: string;
|
|
16
|
+
/** Request timeout in ms */
|
|
17
|
+
timeout?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Control-plane connection state
|
|
21
|
+
*/
|
|
22
|
+
export interface ControlPlaneConnectionState {
|
|
23
|
+
/** Whether connected to the service */
|
|
24
|
+
connected: boolean;
|
|
25
|
+
/** Server capabilities */
|
|
26
|
+
capabilities?: ControlPlaneCapabilities;
|
|
27
|
+
/** Error if connection failed */
|
|
28
|
+
error?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Control-plane capabilities
|
|
32
|
+
*/
|
|
33
|
+
export interface ControlPlaneCapabilities {
|
|
34
|
+
/** Supported resources */
|
|
35
|
+
resources?: string[];
|
|
36
|
+
/** Supported tools */
|
|
37
|
+
tools?: string[];
|
|
38
|
+
/** Server version */
|
|
39
|
+
version?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create instance request
|
|
43
|
+
*/
|
|
44
|
+
export interface CreateInstanceRequest {
|
|
45
|
+
/** Instance name */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Instance configuration */
|
|
48
|
+
config: {
|
|
49
|
+
/** Organization slug to create the instance under */
|
|
50
|
+
organizationSlug: string;
|
|
51
|
+
/** Region ID for provisioning */
|
|
52
|
+
region: string;
|
|
53
|
+
/** Optional trusted origins */
|
|
54
|
+
trustedOrigins?: string[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Organization available to the authenticated control-plane user
|
|
59
|
+
*/
|
|
60
|
+
export interface ControlPlaneOrganization {
|
|
61
|
+
organizationId: string;
|
|
62
|
+
organizationSlug: string;
|
|
63
|
+
organizationName: string;
|
|
64
|
+
role: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Provisioning region for control-plane instances
|
|
68
|
+
*/
|
|
69
|
+
export interface ControlPlaneRegion {
|
|
70
|
+
id: string;
|
|
71
|
+
label: string;
|
|
72
|
+
family: string;
|
|
73
|
+
}
|
|
@@ -10,7 +10,7 @@ export declare const ERROR_CATALOG: {
|
|
|
10
10
|
readonly code: "AUTH_FAILED";
|
|
11
11
|
readonly message: "Authentication failed";
|
|
12
12
|
readonly hint: "Try running `c15t login` again";
|
|
13
|
-
readonly docs: "https://c15t.
|
|
13
|
+
readonly docs: "https://v2.c15t.com/docs/cli/auth";
|
|
14
14
|
};
|
|
15
15
|
readonly AUTH_EXPIRED: {
|
|
16
16
|
readonly code: "AUTH_EXPIRED";
|
|
@@ -51,7 +51,7 @@ export declare const ERROR_CATALOG: {
|
|
|
51
51
|
readonly code: "FRAMEWORK_NOT_DETECTED";
|
|
52
52
|
readonly message: "Could not detect framework";
|
|
53
53
|
readonly hint: "Supported frameworks: Next.js, React, Remix, Vite";
|
|
54
|
-
readonly docs: "https://c15t.
|
|
54
|
+
readonly docs: "https://v2.c15t.com/docs/cli/frameworks";
|
|
55
55
|
};
|
|
56
56
|
readonly LAYOUT_NOT_FOUND: {
|
|
57
57
|
readonly code: "LAYOUT_NOT_FOUND";
|
|
@@ -72,23 +72,18 @@ export declare const ERROR_CATALOG: {
|
|
|
72
72
|
readonly code: "CONFIG_INVALID";
|
|
73
73
|
readonly message: "Invalid c15t configuration";
|
|
74
74
|
readonly hint: "Check your c15t.config.ts file for errors";
|
|
75
|
-
readonly docs: "https://c15t.
|
|
75
|
+
readonly docs: "https://v2.c15t.com/docs/configuration";
|
|
76
76
|
};
|
|
77
77
|
readonly NETWORK_ERROR: {
|
|
78
78
|
readonly code: "NETWORK_ERROR";
|
|
79
79
|
readonly message: "Network request failed";
|
|
80
80
|
readonly hint: "Check your internet connection";
|
|
81
81
|
};
|
|
82
|
-
readonly
|
|
83
|
-
readonly code: "
|
|
82
|
+
readonly CONTROL_PLANE_CONNECTION_FAILED: {
|
|
83
|
+
readonly code: "CONTROL_PLANE_CONNECTION_FAILED";
|
|
84
84
|
readonly message: "Could not connect to consent.io";
|
|
85
85
|
readonly hint: "Check if https://consent.io is accessible";
|
|
86
86
|
};
|
|
87
|
-
readonly MCP_REQUEST_FAILED: {
|
|
88
|
-
readonly code: "MCP_REQUEST_FAILED";
|
|
89
|
-
readonly message: "MCP request failed";
|
|
90
|
-
readonly hint: "Try again or check your network connection";
|
|
91
|
-
};
|
|
92
87
|
readonly API_ERROR: {
|
|
93
88
|
readonly code: "API_ERROR";
|
|
94
89
|
readonly message: "API request failed";
|
|
@@ -211,4 +206,3 @@ export declare function createErrorHandlers(logger: CliLogger, telemetry?: {
|
|
|
211
206
|
export declare function withErrorHandling<T extends (...args: unknown[]) => Promise<unknown>>(fn: T, logger: CliLogger, context?: {
|
|
212
207
|
command?: string;
|
|
213
208
|
}): T;
|
|
214
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { CliError, createErrorHandlers, ERROR_CATALOG, type ErrorCode, isCliErro
|
|
|
6
6
|
export { color, colors, createCliLogger, createSpinner, formatLogMessage, formatStep, LOG_LEVELS, type LogLevel, type Spinner, withSpinner, } from './logger';
|
|
7
7
|
export { formatFlagHelp, generateFlagsHelp, getFlagValue, globalFlags, hasFlag, parseCliArgs, parseSubcommand, } from './parser';
|
|
8
8
|
export { createDisabledTelemetry, createTelemetry, TelemetryEventName, type TelemetryEventNameType, type TelemetryOptions, } from './telemetry';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,4 +28,3 @@ export declare function getFrameworkDisplayName(framework: FrameworkDetectionRes
|
|
|
28
28
|
* Get the recommended package for a framework
|
|
29
29
|
*/
|
|
30
30
|
export declare function getRecommendedPackage(framework: FrameworkDetectionResult): string;
|
|
31
|
-
//# sourceMappingURL=framework.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { detectFramework, detectProjectRoot, getFrameworkDisplayName, getRecommendedPackage, isNextJs, isReactBased, } from './framework';
|
|
5
5
|
export { findLayoutFile, getComponentsDirectory, getProvidersDirectory, isAppRouter, isPagesRouter, } from './layout';
|
|
6
6
|
export { detectPackageManager, getExecCommand, getInstallCommand, getRunCommand, isPackageInstalled, } from './package-manager';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -33,4 +33,3 @@ export declare function getComponentsDirectory(projectRoot: string, layout: Layo
|
|
|
33
33
|
* Get the providers directory path
|
|
34
34
|
*/
|
|
35
35
|
export declare function getProvidersDirectory(projectRoot: string, layout: LayoutDetectionResult): string;
|
|
36
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -28,4 +28,3 @@ export declare function getExecCommand(pm: PackageManagerResult, binary: string,
|
|
|
28
28
|
* Check if a package is installed
|
|
29
29
|
*/
|
|
30
30
|
export declare function isPackageInstalled(projectRoot: string, packageName: string): Promise<boolean>;
|
|
31
|
-
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -36,7 +36,7 @@ export interface FileGenerationOutput {
|
|
|
36
36
|
/**
|
|
37
37
|
* File generation actor
|
|
38
38
|
*
|
|
39
|
-
* Creates and modifies files for the
|
|
39
|
+
* Creates and modifies files for the hosted setup with backup support.
|
|
40
40
|
*/
|
|
41
41
|
export declare const fileGenerationActor: import("xstate").PromiseActorLogic<FileGenerationOutput, FileGenerationInput, import("xstate").EventObject>;
|
|
42
42
|
/**
|
|
@@ -51,4 +51,3 @@ export interface RollbackOutput {
|
|
|
51
51
|
errors: string[];
|
|
52
52
|
}
|
|
53
53
|
export declare const rollbackActor: import("xstate").PromiseActorLogic<RollbackOutput, RollbackInput, import("xstate").EventObject>;
|
|
54
|
-
//# sourceMappingURL=file-generation.d.ts.map
|
|
@@ -43,4 +43,3 @@ export declare function displayPreflightResults(context: CliContext, checks: Pre
|
|
|
43
43
|
* Display preflight failure message (synchronous)
|
|
44
44
|
*/
|
|
45
45
|
export declare function displayPreflightFailure(context: CliContext, checks: PreflightCheckResult[]): void;
|
|
46
|
-
//# sourceMappingURL=preflight.d.ts.map
|