@c15t/cli 2.0.0-rc.0 → 2.0.0-rc.10
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 +47 -18
- package/dist/145.mjs +7401 -0
- package/dist/generate-files.mjs +1771 -0
- package/dist/index.mjs +1 -3399
- 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 +2 -3
- 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 +1 -2
- 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/add-stylesheet-imports.d.ts +54 -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 +1 -2
- 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-types/commands/generate/templates/css.d.ts +10 -0
- 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 +2 -2
- 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 +2 -2
- package/{dist → dist-types}/commands/generate/templates/next-config.d.ts +1 -4
- package/{dist → dist-types}/commands/generate/templates/shared/components.d.ts +3 -4
- 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 +1 -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 +3 -2
- package/dist-types/commands/instances/index.d.ts +26 -0
- 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 +0 -1
- package/{dist → dist-types}/commands/self-host/migrate/orm-result.d.ts +0 -1
- package/{dist → dist-types}/commands/self-host/migrate/read-config.d.ts +0 -1
- package/dist-types/commands/shared/stylesheets.d.ts +19 -0
- package/dist-types/commands/skills.d.ts +10 -0
- package/{dist → dist-types}/components/intro.d.ts +0 -1
- package/{dist → dist-types}/constants.d.ts +31 -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 +3 -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 +10 -16
- 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-types/core/telemetry.d.ts +2 -0
- 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 +15 -13
- package/{dist → dist-types}/machines/generate/guards.d.ts +4 -5
- package/{dist → dist-types}/machines/generate/machine.d.ts +20 -28
- package/{dist → dist-types}/machines/generate/runner.d.ts +0 -1
- package/{dist → dist-types}/machines/generate/types.d.ts +6 -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 +13 -20
- 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 +6 -6
- package/{dist → dist-types}/utils/spinner.d.ts +0 -1
- package/{dist/core → dist-types/utils}/telemetry.d.ts +75 -32
- package/{dist → dist-types}/utils/validation.d.ts +2 -3
- package/package.json +21 -19
- package/readme.json +22 -8
- package/dist/760.mjs +0 -1720
- 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 +0 -12
- 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 +0 -22
- 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/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 +0 -178
- package/dist/utils/telemetry.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
|
@@ -7,7 +7,7 @@ import { type StorageMode } from '../../../constants';
|
|
|
7
7
|
* Mode option definitions with user-friendly labels
|
|
8
8
|
*/
|
|
9
9
|
export declare const MODE_OPTIONS: readonly [{
|
|
10
|
-
readonly value: "
|
|
10
|
+
readonly value: "hosted";
|
|
11
11
|
readonly label: "Cloud Hosted";
|
|
12
12
|
readonly hint: "Managed by consent.io (Recommended)";
|
|
13
13
|
readonly description: "Store consent data securely in the cloud with zero infrastructure";
|
|
@@ -16,11 +16,6 @@ export declare const MODE_OPTIONS: readonly [{
|
|
|
16
16
|
readonly label: "Browser-Only";
|
|
17
17
|
readonly hint: "No backend needed";
|
|
18
18
|
readonly description: "Store consent in browser cookies/localStorage (GDPR-compatible)";
|
|
19
|
-
}, {
|
|
20
|
-
readonly value: "self-hosted";
|
|
21
|
-
readonly label: "Self-Hosted";
|
|
22
|
-
readonly hint: "Your own server";
|
|
23
|
-
readonly description: "Run your own c15t backend for full control";
|
|
24
19
|
}, {
|
|
25
20
|
readonly value: "custom";
|
|
26
21
|
readonly label: "Custom Backend";
|
|
@@ -39,4 +34,3 @@ export declare function promptForMode(context: CliContext): Promise<StorageMode>
|
|
|
39
34
|
* Display mode explanation
|
|
40
35
|
*/
|
|
41
36
|
export declare function explainMode(context: CliContext, mode: StorageMode): void;
|
|
42
|
-
//# sourceMappingURL=mode-select.d.ts.map
|
|
@@ -42,5 +42,4 @@ export declare function generateThemeConfig(theme: ThemeId): string;
|
|
|
42
42
|
/**
|
|
43
43
|
* Generate CSS import for theme
|
|
44
44
|
*/
|
|
45
|
-
export declare function getThemeCssImport(theme: ThemeId): string | null;
|
|
46
|
-
//# sourceMappingURL=theme.d.ts.map
|
|
45
|
+
export declare function getThemeCssImport(theme: ThemeId, framework?: 'react' | 'nextjs'): string | null;
|
|
@@ -33,4 +33,3 @@ export declare function getUIStyleInfo(style: UIStyle): (typeof UI_STYLE_OPTIONS
|
|
|
33
33
|
* @returns The selected UI style ('prebuilt' or 'expanded')
|
|
34
34
|
*/
|
|
35
35
|
export declare function promptForUIStyle(context: CliContext, handleCancel?: (value: unknown) => boolean): Promise<UIStyle>;
|
|
36
|
-
//# sourceMappingURL=ui-style.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type EnsureGlobalCssStylesheetImportsResult, type StyledPackageName } from '../../shared/stylesheets';
|
|
2
|
+
export interface UpdateAppStylesheetImportsOptions {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
packageName: Exclude<StyledPackageName, '@c15t/ui'>;
|
|
5
|
+
tailwindVersion: string | null;
|
|
6
|
+
entrypointPath?: string | null;
|
|
7
|
+
dryRun?: boolean;
|
|
8
|
+
includeIab?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function updateAppStylesheetImports(options: UpdateAppStylesheetImportsOptions): Promise<EnsureGlobalCssStylesheetImportsResult>;
|
|
@@ -17,6 +17,7 @@ interface UpdateAppLayoutOptions {
|
|
|
17
17
|
uiStyle?: UIStyle;
|
|
18
18
|
expandedTheme?: ExpandedTheme;
|
|
19
19
|
selectedScripts?: string[];
|
|
20
|
+
layoutFilePath?: string;
|
|
20
21
|
}
|
|
21
22
|
interface ComponentFilePaths {
|
|
22
23
|
consentManager: string;
|
|
@@ -39,11 +40,10 @@ interface ComponentFilePaths {
|
|
|
39
40
|
* 4. Adds ConsentManager import to layout
|
|
40
41
|
* 5. Wraps layout content with ConsentManager component
|
|
41
42
|
*/
|
|
42
|
-
export declare function updateAppLayout({ projectRoot, mode, backendURL, useEnvFile, proxyNextjs, enableSSR, enableDevTools, uiStyle, expandedTheme, selectedScripts, }: UpdateAppLayoutOptions): Promise<{
|
|
43
|
+
export declare function updateAppLayout({ projectRoot, mode, backendURL, useEnvFile, proxyNextjs, enableSSR, enableDevTools, uiStyle, expandedTheme, selectedScripts, layoutFilePath, }: UpdateAppLayoutOptions): Promise<{
|
|
43
44
|
updated: boolean;
|
|
44
45
|
filePath: string | null;
|
|
45
46
|
alreadyModified: boolean;
|
|
46
47
|
componentFiles?: ComponentFilePaths;
|
|
47
48
|
}>;
|
|
48
49
|
export {};
|
|
49
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -13,6 +13,7 @@ interface UpdatePagesLayoutOptions {
|
|
|
13
13
|
proxyNextjs?: boolean;
|
|
14
14
|
enableDevTools?: boolean;
|
|
15
15
|
selectedScripts?: string[];
|
|
16
|
+
layoutFilePath?: string;
|
|
16
17
|
}
|
|
17
18
|
interface ComponentFilePaths {
|
|
18
19
|
consentManager: string;
|
|
@@ -37,11 +38,10 @@ interface ComponentFilePaths {
|
|
|
37
38
|
* Unlike App Directory, Pages Directory only needs one component file because
|
|
38
39
|
* it doesn't use the 'use client' directive pattern.
|
|
39
40
|
*/
|
|
40
|
-
export declare function updatePagesLayout({ projectRoot, mode, backendURL, useEnvFile, proxyNextjs, enableDevTools, selectedScripts, }: UpdatePagesLayoutOptions): Promise<{
|
|
41
|
+
export declare function updatePagesLayout({ projectRoot, mode, backendURL, useEnvFile, proxyNextjs, enableDevTools, selectedScripts, layoutFilePath, }: UpdatePagesLayoutOptions): Promise<{
|
|
41
42
|
updated: boolean;
|
|
42
43
|
filePath: string | null;
|
|
43
44
|
alreadyModified: boolean;
|
|
44
45
|
componentFiles?: ComponentFilePaths;
|
|
45
46
|
}>;
|
|
46
47
|
export {};
|
|
47
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -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
|
|
@@ -17,7 +17,7 @@ interface GenerateConsentComponentOptions {
|
|
|
17
17
|
defaultExport?: boolean;
|
|
18
18
|
/** Whether to add ssrData prop passed inside options object (App Dir client with SSR) */
|
|
19
19
|
ssrDataOption?: boolean;
|
|
20
|
-
/** Whether to add geo override for development
|
|
20
|
+
/** Whether to add geo override for development */
|
|
21
21
|
includeOverrides?: boolean;
|
|
22
22
|
/** Whether to add c15t DevTools component */
|
|
23
23
|
enableDevTools?: boolean;
|
|
@@ -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
|
|
@@ -20,6 +20,7 @@ export interface LayoutPipelineConfig {
|
|
|
20
20
|
filePatterns: string[];
|
|
21
21
|
/** Root directory of the project */
|
|
22
22
|
projectRoot: string;
|
|
23
|
+
knownFilePath?: string;
|
|
23
24
|
/** Framework directory name for getFrameworkDirectory (e.g., 'app' or 'pages') */
|
|
24
25
|
frameworkDirName: string;
|
|
25
26
|
/** Creates the consent-manager component files. Receives the layout file path and framework directory. */
|
|
@@ -44,4 +45,3 @@ export interface LayoutPipelineConfig {
|
|
|
44
45
|
*/
|
|
45
46
|
export declare function runLayoutUpdatePipeline(config: LayoutPipelineConfig): Promise<LayoutUpdateResult>;
|
|
46
47
|
export {};
|
|
47
|
-
//# sourceMappingURL=layout-pipeline.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,7 +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
|
-
export {
|
|
7
|
+
export { instancesAliasCommand, projectsCommand } from './instances';
|
|
7
8
|
export { selfHost } from './self-host';
|
|
8
|
-
|
|
9
|
+
export { installSkills } from './skills';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project management commands
|
|
3
|
+
*/
|
|
4
|
+
import type { CliCommand, CliContext } from '../../context/types';
|
|
5
|
+
/**
|
|
6
|
+
* List projects command
|
|
7
|
+
*/
|
|
8
|
+
declare function listAction(context: CliContext): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Select project command
|
|
11
|
+
*/
|
|
12
|
+
declare function selectAction(context: CliContext): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Create project command
|
|
15
|
+
*/
|
|
16
|
+
declare function createAction(context: CliContext): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Main projects command (defaults to list)
|
|
19
|
+
*/
|
|
20
|
+
declare function projectsAction(context: CliContext): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Projects command definition
|
|
23
|
+
*/
|
|
24
|
+
export declare const projectsCommand: CliCommand;
|
|
25
|
+
export declare const instancesAliasCommand: CliCommand;
|
|
26
|
+
export { createAction, listAction, projectsAction, selectAction };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { MigrationResult } from '@c15t/backend/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
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type StyledPackageName = '@c15t/react' | '@c15t/nextjs' | '@c15t/ui';
|
|
2
|
+
export interface EnsureGlobalCssStylesheetImportsOptions {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
packageName: StyledPackageName;
|
|
5
|
+
tailwindVersion: string | null;
|
|
6
|
+
entrypointPath?: string | null;
|
|
7
|
+
includeBase: boolean;
|
|
8
|
+
includeIab: boolean;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface EnsureGlobalCssStylesheetImportsResult {
|
|
12
|
+
updated: boolean;
|
|
13
|
+
filePath: string | null;
|
|
14
|
+
searchedPaths: string[];
|
|
15
|
+
changes: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function formatSearchedCssPaths(projectRoot: string, searchedPaths: string[]): string;
|
|
18
|
+
export declare function isTailwindV3(version: string | null): boolean;
|
|
19
|
+
export declare function ensureGlobalCssStylesheetImports(options: EnsureGlobalCssStylesheetImportsOptions): Promise<EnsureGlobalCssStylesheetImportsResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install Skills command
|
|
3
|
+
*
|
|
4
|
+
* Installs c15t agent skills for AI-assisted development (Claude, Cursor, etc.)
|
|
5
|
+
*/
|
|
6
|
+
import type { CliContext } from '../context/types';
|
|
7
|
+
/**
|
|
8
|
+
* Install c15t agent skills for AI coding assistants
|
|
9
|
+
*/
|
|
10
|
+
export declare function installSkills(context: CliContext): Promise<void>;
|
|
@@ -7,22 +7,30 @@
|
|
|
7
7
|
export declare const URLS: {
|
|
8
8
|
/** Default c15t cloud platform URL */
|
|
9
9
|
readonly CONSENT_IO: "https://consent.io";
|
|
10
|
+
/** First-party telemetry logs endpoint */
|
|
11
|
+
readonly TELEMETRY: "https://telemetry.c15t.com/c15t/v1/logs";
|
|
10
12
|
/** Documentation website */
|
|
11
|
-
readonly DOCS: "https://c15t.
|
|
13
|
+
readonly DOCS: "https://v2.c15t.com/docs";
|
|
12
14
|
/** GitHub repository */
|
|
13
15
|
readonly GITHUB: "https://github.com/c15t/c15t";
|
|
14
16
|
/** Discord community */
|
|
15
|
-
readonly DISCORD: "https://c15t.
|
|
17
|
+
readonly DISCORD: "https://v2.c15t.com/discord";
|
|
16
18
|
/** API documentation */
|
|
17
|
-
readonly API_DOCS: "https://c15t.
|
|
19
|
+
readonly API_DOCS: "https://v2.c15t.com/docs/api";
|
|
18
20
|
/** CLI documentation */
|
|
19
|
-
readonly CLI_DOCS: "https://c15t.
|
|
21
|
+
readonly CLI_DOCS: "https://v2.c15t.com/docs/cli";
|
|
22
|
+
/** Product changelog */
|
|
23
|
+
readonly CHANGELOG: "https://v2.c15t.com/changelog";
|
|
20
24
|
};
|
|
21
25
|
export declare const PATHS: {
|
|
22
26
|
/** c15t config directory name (in home dir) */
|
|
23
27
|
readonly CONFIG_DIR: ".c15t";
|
|
24
28
|
/** Config file name */
|
|
25
29
|
readonly CONFIG_FILE: "config.json";
|
|
30
|
+
/** Telemetry state file name */
|
|
31
|
+
readonly TELEMETRY_STATE_FILE: "telemetry.json";
|
|
32
|
+
/** Telemetry retry queue file name */
|
|
33
|
+
readonly TELEMETRY_QUEUE_FILE: "telemetry-queue.json";
|
|
26
34
|
/** Project config file name */
|
|
27
35
|
readonly PROJECT_CONFIG: "c15t.config.ts";
|
|
28
36
|
/** Alternative project config file name */
|
|
@@ -49,8 +57,8 @@ export declare const CLI_INFO: {
|
|
|
49
57
|
readonly NAME: "c15t";
|
|
50
58
|
/** CLI binary name */
|
|
51
59
|
readonly BIN: "c15t";
|
|
52
|
-
/**
|
|
53
|
-
readonly
|
|
60
|
+
/** Control-plane client name */
|
|
61
|
+
readonly CONTROL_PLANE_CLIENT_NAME: "c15t-cli";
|
|
54
62
|
/** Current version (updated during build) */
|
|
55
63
|
readonly VERSION: "2.0.0";
|
|
56
64
|
};
|
|
@@ -61,12 +69,22 @@ export declare const TIMEOUTS: {
|
|
|
61
69
|
readonly DEVICE_FLOW_EXPIRY: 900;
|
|
62
70
|
/** HTTP request timeout (ms) */
|
|
63
71
|
readonly HTTP_REQUEST: 10000;
|
|
64
|
-
/**
|
|
65
|
-
readonly
|
|
72
|
+
/** Control-plane connection timeout (ms) */
|
|
73
|
+
readonly CONTROL_PLANE_CONNECTION: 30000;
|
|
66
74
|
};
|
|
67
75
|
export declare const ENV_VARS: {
|
|
76
|
+
/** Enable v2 feature-flagged behavior */
|
|
77
|
+
readonly V2: "V2";
|
|
68
78
|
/** Disable telemetry */
|
|
69
79
|
readonly TELEMETRY_DISABLED: "C15T_TELEMETRY_DISABLED";
|
|
80
|
+
/** Override telemetry ingest endpoint */
|
|
81
|
+
readonly TELEMETRY_ENDPOINT: "C15T_TELEMETRY_ENDPOINT";
|
|
82
|
+
/** Optional write key for telemetry ingest */
|
|
83
|
+
readonly TELEMETRY_WRITE_KEY: "C15T_TELEMETRY_WRITE_KEY";
|
|
84
|
+
/** Optional Axiom org ID for telemetry ingest */
|
|
85
|
+
readonly TELEMETRY_ORG_ID: "C15T_TELEMETRY_ORG_ID";
|
|
86
|
+
/** Control-plane/dashboard base URL override */
|
|
87
|
+
readonly CONSENT_URL: "CONSENT_URL";
|
|
70
88
|
/** c15t backend URL */
|
|
71
89
|
readonly BACKEND_URL: "C15T_URL";
|
|
72
90
|
/** c15t API key */
|
|
@@ -75,6 +93,11 @@ export declare const ENV_VARS: {
|
|
|
75
93
|
readonly DEBUG: "C15T_DEBUG";
|
|
76
94
|
};
|
|
77
95
|
export declare const STORAGE_MODES: {
|
|
96
|
+
readonly HOSTED: "hosted";
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated Use HOSTED instead; remove in v3.0.0.
|
|
99
|
+
* @see HOSTED
|
|
100
|
+
*/
|
|
78
101
|
readonly C15T: "c15t";
|
|
79
102
|
readonly OFFLINE: "offline";
|
|
80
103
|
readonly SELF_HOSTED: "self-hosted";
|
|
@@ -98,4 +121,3 @@ export declare const FRAMEWORK_KEYS: {
|
|
|
98
121
|
};
|
|
99
122
|
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
123
|
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 '@c15t/backend';
|
|
1
|
+
import type { C15TOptions } from '@c15t/backend/core';
|
|
2
2
|
import type { CliLogger } from '../utils/logger';
|
|
3
3
|
import type { Telemetry } from '../utils/telemetry';
|
|
4
4
|
import type { FrameworkDetectionResult } from './framework-detection';
|
|
@@ -9,6 +9,8 @@ export interface CliCommand {
|
|
|
9
9
|
hint: string;
|
|
10
10
|
description: string;
|
|
11
11
|
action: (context: CliContext) => Promise<void>;
|
|
12
|
+
subcommands?: CliCommand[];
|
|
13
|
+
hidden?: boolean;
|
|
12
14
|
}
|
|
13
15
|
export type FlagType = 'boolean' | 'string' | 'special';
|
|
14
16
|
export interface CliFlag {
|
|
@@ -57,4 +59,3 @@ export interface CliContext {
|
|
|
57
59
|
framework: FrameworkDetectionResult;
|
|
58
60
|
packageManager: PackageManagerResult;
|
|
59
61
|
}
|
|
60
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control-plane client for c15t hosted projects.
|
|
3
|
+
*/
|
|
4
|
+
import type { Instance } from '../types';
|
|
5
|
+
import type { ControlPlaneClientConfig, ControlPlaneConnectionState, ControlPlaneOrganization, ControlPlaneRegion, CreateInstanceRequest } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Client for c15t hosted projects.
|
|
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 hosted projects for the authenticated user.
|
|
34
|
+
*/
|
|
35
|
+
listInstances(): Promise<Instance[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Get a specific hosted project by ID.
|
|
38
|
+
*/
|
|
39
|
+
getInstance(id: string): Promise<Instance>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a new hosted project.
|
|
42
|
+
*/
|
|
43
|
+
createInstance(request: CreateInstanceRequest): Promise<Instance>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete a hosted project.
|
|
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';
|