@c15t/cli 2.0.0-rc.8 → 2.0.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/README.md +7 -7
- package/dist/145.mjs +30 -31
- package/dist/generate-files.mjs +18 -18
- package/dist-types/auth/base-url.d.ts +1 -1
- package/dist-types/commands/generate/prompts/mode-select.d.ts +1 -1
- package/dist-types/constants.d.ts +7 -7
- package/dist-types/core/errors.d.ts +6 -6
- package/dist-types/machines/generate/actors/prompts.d.ts +1 -1
- package/dist-types/machines/generate/types.d.ts +2 -2
- package/package.json +6 -6
- package/readme.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://
|
|
2
|
+
<a href="https://c15t.com?utm_source=github&utm_medium=repopage_%40c15t%2Fcli" target="_blank" rel="noopener noreferrer">
|
|
3
3
|
<picture>
|
|
4
4
|
<source media="(prefers-color-scheme: dark)" srcset="../../docs/assets/c15t-banner-readme-dark.svg" type="image/svg+xml">
|
|
5
5
|
<img src="../../docs/assets/c15t-banner-readme-light.svg" alt="c15t Banner" type="image/svg+xml">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
[](https://github.com/c15t/c15t)
|
|
13
13
|
[](https://github.com/c15t/c15t/actions/workflows/ci.yml)
|
|
14
|
-
[](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
15
15
|
[](https://c15t.link/discord)
|
|
16
16
|
[](https://www.npmjs.com/package/@c15t/cli)
|
|
17
17
|
[](https://github.com/c15t/c15t)
|
|
@@ -117,7 +117,7 @@ Disable telemetry by:
|
|
|
117
117
|
|
|
118
118
|
## Documentation
|
|
119
119
|
|
|
120
|
-
For further information, guides, and examples visit the [reference documentation](https://
|
|
120
|
+
For further information, guides, and examples visit the [reference documentation](https://c15t.com/docs/cli/overview).
|
|
121
121
|
|
|
122
122
|
## Support
|
|
123
123
|
|
|
@@ -129,8 +129,8 @@ For further information, guides, and examples visit the [reference documentation
|
|
|
129
129
|
## Contributing
|
|
130
130
|
|
|
131
131
|
- We're open to all community contributions!
|
|
132
|
-
- Read our [Contribution Guidelines](https://
|
|
133
|
-
- Review our [Code of Conduct](https://
|
|
132
|
+
- Read our [Contribution Guidelines](https://c15t.com/docs/oss/contributing)
|
|
133
|
+
- Review our [Code of Conduct](https://c15t.com/docs/oss/code-of-conduct)
|
|
134
134
|
- Fork the repository
|
|
135
135
|
- Create a new branch for your feature
|
|
136
136
|
- Submit a pull request
|
|
@@ -151,8 +151,8 @@ Our preference is that you make use of GitHub's private vulnerability reporting
|
|
|
151
151
|
|
|
152
152
|
## License
|
|
153
153
|
|
|
154
|
-
[
|
|
154
|
+
[Apache License 2.0](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
155
155
|
|
|
156
156
|
---
|
|
157
157
|
|
|
158
|
-
**Built
|
|
158
|
+
**Built by [Inth](https://inth.com?utm_source=github&utm_medium=repopage_%40c15t%2Fcli)**
|
package/dist/145.mjs
CHANGED
|
@@ -115,7 +115,7 @@ ${optionLines}
|
|
|
115
115
|
|
|
116
116
|
Run a command directly (e.g., ${picocolors.cyan('c15t setup')}) or select one interactively when no command is provided.
|
|
117
117
|
|
|
118
|
-
For more help, visit: https://
|
|
118
|
+
For more help, visit: https://c15t.com`;
|
|
119
119
|
logger.debug('Help menu content generated.');
|
|
120
120
|
logger.note(helpContent, 'Usage');
|
|
121
121
|
}
|
|
@@ -2372,14 +2372,14 @@ const codemodsCommand = {
|
|
|
2372
2372
|
action: runCodemods
|
|
2373
2373
|
};
|
|
2374
2374
|
const constants_URLS = {
|
|
2375
|
-
CONSENT_IO: 'https://
|
|
2375
|
+
CONSENT_IO: 'https://inth.com',
|
|
2376
2376
|
TELEMETRY: 'https://telemetry.c15t.com/c15t/v1/logs',
|
|
2377
|
-
DOCS: 'https://
|
|
2377
|
+
DOCS: 'https://c15t.com/docs',
|
|
2378
2378
|
GITHUB: 'https://github.com/c15t/c15t',
|
|
2379
|
-
DISCORD: 'https://
|
|
2380
|
-
API_DOCS: 'https://
|
|
2381
|
-
CLI_DOCS: 'https://
|
|
2382
|
-
CHANGELOG: 'https://
|
|
2379
|
+
DISCORD: 'https://c15t.com/discord',
|
|
2380
|
+
API_DOCS: 'https://c15t.com/docs/api',
|
|
2381
|
+
CLI_DOCS: 'https://c15t.com/docs/cli',
|
|
2382
|
+
CHANGELOG: 'https://c15t.com/changelog'
|
|
2383
2383
|
};
|
|
2384
2384
|
const PATHS = {
|
|
2385
2385
|
CONFIG_DIR: '.c15t',
|
|
@@ -2393,7 +2393,7 @@ const PATHS = {
|
|
|
2393
2393
|
};
|
|
2394
2394
|
const constants_REGEX = {
|
|
2395
2395
|
URL: /^https?:\/\/.+/,
|
|
2396
|
-
C15T_URL: /^https:\/\/[\w-]+\.c15t\.dev$/,
|
|
2396
|
+
C15T_URL: /^https:\/\/[\w-]+\.(?:c15t\.dev|inth\.app)$/,
|
|
2397
2397
|
DYNAMIC_SEGMENT: /\[[\w-]+\]/,
|
|
2398
2398
|
SEMVER: /^\d+\.\d+\.\d+(-[\w.]+)?$/,
|
|
2399
2399
|
PACKAGE_NAME: /^(@[\w-]+\/)?[\w-]+$/
|
|
@@ -3237,7 +3237,7 @@ const ERROR_CATALOG = {
|
|
|
3237
3237
|
},
|
|
3238
3238
|
CONTROL_PLANE_CONNECTION_FAILED: {
|
|
3239
3239
|
code: 'CONTROL_PLANE_CONNECTION_FAILED',
|
|
3240
|
-
message: 'Could not connect to
|
|
3240
|
+
message: 'Could not connect to inth.com',
|
|
3241
3241
|
hint: `Check if ${constants_URLS.CONSENT_IO} is accessible`
|
|
3242
3242
|
},
|
|
3243
3243
|
API_ERROR: {
|
|
@@ -3248,7 +3248,7 @@ const ERROR_CATALOG = {
|
|
|
3248
3248
|
URL_INVALID: {
|
|
3249
3249
|
code: 'URL_INVALID',
|
|
3250
3250
|
message: 'Invalid URL format',
|
|
3251
|
-
hint: 'Expected format: https://your-project.
|
|
3251
|
+
hint: 'Expected format: https://your-project.inth.app'
|
|
3252
3252
|
},
|
|
3253
3253
|
INSTANCE_NOT_FOUND: {
|
|
3254
3254
|
code: 'INSTANCE_NOT_FOUND',
|
|
@@ -4038,7 +4038,7 @@ function sleep(ms) {
|
|
|
4038
4038
|
async function getDevToolsOption({ context, handleCancel, onCancel }) {
|
|
4039
4039
|
const isReactProject = '@c15t/react' === context.framework.pkg || '@c15t/nextjs' === context.framework.pkg;
|
|
4040
4040
|
context.logger.info("c15t DevTools helps you inspect consent state, scripts, and location overrides during development.");
|
|
4041
|
-
context.logger.info('Learn more: https://
|
|
4041
|
+
context.logger.info('Learn more: https://c15t.com/docs/dev-tools/overview');
|
|
4042
4042
|
const enableDevTools = await __rspack_external__clack_prompts_3cae1695.select({
|
|
4043
4043
|
message: 'Install and enable c15t DevTools?',
|
|
4044
4044
|
options: [
|
|
@@ -4069,7 +4069,7 @@ async function getSSROption({ context, handleCancel, onCancel }) {
|
|
|
4069
4069
|
context.logger.info('SSR consent prefetch starts data loading on the server for faster banner visibility.');
|
|
4070
4070
|
context.logger.info('Tradeoff: this uses Next.js headers() and makes the route dynamic (not fully static).');
|
|
4071
4071
|
context.logger.info('On slow backends or cross-region setups, SSR can increase TTFB. Measure both TTFB and banner visibility.');
|
|
4072
|
-
context.logger.info('Learn more: https://
|
|
4072
|
+
context.logger.info('Learn more: https://c15t.com/docs/frameworks/nextjs/ssr');
|
|
4073
4073
|
const enableSSR = await __rspack_external__clack_prompts_3cae1695.select({
|
|
4074
4074
|
message: 'Enable SSR consent prefetch? (faster first banner visibility, dynamic route)',
|
|
4075
4075
|
options: [
|
|
@@ -4292,7 +4292,7 @@ function createValidator(validate, errorMessage) {
|
|
|
4292
4292
|
};
|
|
4293
4293
|
}
|
|
4294
4294
|
createValidator(isValidUrl, 'Please enter a valid URL (e.g., https://example.com)');
|
|
4295
|
-
createValidator(isValidC15tUrl, 'Please enter a valid
|
|
4295
|
+
createValidator(isValidC15tUrl, 'Please enter a valid hosted URL (e.g., https://my-app.inth.app)');
|
|
4296
4296
|
const validateInstanceName = createValidator(isValidInstanceName, 'Project slug must be 3-63 lowercase alphanumeric characters with hyphens');
|
|
4297
4297
|
createValidator((value)=>value.trim().length > 0, 'This field is required');
|
|
4298
4298
|
function isCancel(value) {
|
|
@@ -4325,7 +4325,7 @@ const modeSelectionActor = fromPromise(async ({ input })=>{
|
|
|
4325
4325
|
{
|
|
4326
4326
|
value: 'hosted',
|
|
4327
4327
|
label: 'Hosted',
|
|
4328
|
-
hint: '
|
|
4328
|
+
hint: 'inth.com or self-hosted backend URL'
|
|
4329
4329
|
},
|
|
4330
4330
|
{
|
|
4331
4331
|
value: 'offline',
|
|
@@ -4485,7 +4485,7 @@ async function createInstanceInteractively(client, cliContext) {
|
|
|
4485
4485
|
}
|
|
4486
4486
|
async function selectOrCreateInstance(cliContext) {
|
|
4487
4487
|
const baseUrl = getControlPlaneBaseUrl();
|
|
4488
|
-
const listSpinner = createTaskSpinner('Fetching your
|
|
4488
|
+
const listSpinner = createTaskSpinner('Fetching your inth.com projects...');
|
|
4489
4489
|
listSpinner.start();
|
|
4490
4490
|
const client = await createControlPlaneClientFromConfig(baseUrl);
|
|
4491
4491
|
if (!client) {
|
|
@@ -4510,7 +4510,7 @@ async function selectOrCreateInstance(cliContext) {
|
|
|
4510
4510
|
{
|
|
4511
4511
|
value: '__create__',
|
|
4512
4512
|
label: 'Create new project',
|
|
4513
|
-
hint: 'Provision a new
|
|
4513
|
+
hint: 'Provision a new inth.com project now'
|
|
4514
4514
|
}
|
|
4515
4515
|
]
|
|
4516
4516
|
});
|
|
@@ -4534,8 +4534,8 @@ const hostedModeActor = fromPromise(async ({ input })=>{
|
|
|
4534
4534
|
message: 'Choose your hosted backend option:',
|
|
4535
4535
|
options: [
|
|
4536
4536
|
{
|
|
4537
|
-
value: '
|
|
4538
|
-
label: '
|
|
4537
|
+
value: 'inth.com',
|
|
4538
|
+
label: 'inth.com (Recommended)',
|
|
4539
4539
|
hint: 'Managed infrastucture'
|
|
4540
4540
|
},
|
|
4541
4541
|
{
|
|
@@ -4544,7 +4544,7 @@ const hostedModeActor = fromPromise(async ({ input })=>{
|
|
|
4544
4544
|
hint: 'Use your own deployed c15t backend'
|
|
4545
4545
|
}
|
|
4546
4546
|
],
|
|
4547
|
-
initialValue: '
|
|
4547
|
+
initialValue: 'inth.com'
|
|
4548
4548
|
});
|
|
4549
4549
|
if (isCancel(providerSelection)) throw new PromptCancelledError('hosted_provider');
|
|
4550
4550
|
provider = providerSelection;
|
|
@@ -4562,20 +4562,19 @@ const hostedModeActor = fromPromise(async ({ input })=>{
|
|
|
4562
4562
|
};
|
|
4563
4563
|
}
|
|
4564
4564
|
if (!isV2ModeEnabled()) {
|
|
4565
|
-
cliContext.logger.info('consent.io sign-in is currently disabled. Set V2=1 to enable sign-in and project selection.');
|
|
4566
4565
|
const url = await promptBackendURL({
|
|
4567
|
-
message: 'Enter your
|
|
4568
|
-
placeholder: 'https://your-project.
|
|
4566
|
+
message: 'Enter your inth.com project URL:',
|
|
4567
|
+
placeholder: 'https://your-project.inth.app',
|
|
4569
4568
|
initialURL,
|
|
4570
4569
|
stage: 'consent_manual_url'
|
|
4571
4570
|
});
|
|
4572
4571
|
return {
|
|
4573
4572
|
url,
|
|
4574
|
-
provider: '
|
|
4573
|
+
provider: 'inth.com'
|
|
4575
4574
|
};
|
|
4576
4575
|
}
|
|
4577
4576
|
const setupMethod = await __rspack_external__clack_prompts_3cae1695.select({
|
|
4578
|
-
message: 'How do you want to configure
|
|
4577
|
+
message: 'How do you want to configure inth.com?',
|
|
4579
4578
|
options: [
|
|
4580
4579
|
{
|
|
4581
4580
|
value: 'sign-in',
|
|
@@ -4593,14 +4592,14 @@ const hostedModeActor = fromPromise(async ({ input })=>{
|
|
|
4593
4592
|
if (isCancel(setupMethod)) throw new PromptCancelledError('consent_setup_method');
|
|
4594
4593
|
if ('manual-url' === setupMethod) {
|
|
4595
4594
|
const url = await promptBackendURL({
|
|
4596
|
-
message: 'Enter your
|
|
4597
|
-
placeholder: 'https://your-project.
|
|
4595
|
+
message: 'Enter your inth.com project URL:',
|
|
4596
|
+
placeholder: 'https://your-project.inth.app',
|
|
4598
4597
|
initialURL,
|
|
4599
4598
|
stage: 'consent_manual_url'
|
|
4600
4599
|
});
|
|
4601
4600
|
return {
|
|
4602
4601
|
url,
|
|
4603
|
-
provider: '
|
|
4602
|
+
provider: 'inth.com'
|
|
4604
4603
|
};
|
|
4605
4604
|
}
|
|
4606
4605
|
await runConsentLogin(cliContext);
|
|
@@ -4609,7 +4608,7 @@ const hostedModeActor = fromPromise(async ({ input })=>{
|
|
|
4609
4608
|
cliContext.logger.info(`Using project ${picocolors.cyan(instance.name)} (${picocolors.dim(instance.id)})`);
|
|
4610
4609
|
return {
|
|
4611
4610
|
url: instance.url,
|
|
4612
|
-
provider: '
|
|
4611
|
+
provider: 'inth.com'
|
|
4613
4612
|
};
|
|
4614
4613
|
});
|
|
4615
4614
|
const backendOptionsActor = fromPromise(async ({ input })=>{
|
|
@@ -4660,7 +4659,7 @@ const frontendOptionsActor = fromPromise(async ({ input })=>{
|
|
|
4660
4659
|
});
|
|
4661
4660
|
}
|
|
4662
4661
|
cliContext.logger.info('Choose how you want your consent UI components generated.');
|
|
4663
|
-
cliContext.logger.info('Learn more: https://
|
|
4662
|
+
cliContext.logger.info('Learn more: https://c15t.com/docs/frameworks/nextjs/customization');
|
|
4664
4663
|
const styleResult = await __rspack_external__clack_prompts_3cae1695.select({
|
|
4665
4664
|
message: 'UI component style:',
|
|
4666
4665
|
options: [
|
|
@@ -5066,7 +5065,7 @@ function normalizeSelectedMode(mode) {
|
|
|
5066
5065
|
}
|
|
5067
5066
|
function getHostedProviderFromMode(mode) {
|
|
5068
5067
|
if ('self-hosted' === mode) return 'self-hosted';
|
|
5069
|
-
if ('c15t' === mode) return '
|
|
5068
|
+
if ('c15t' === mode) return 'inth.com';
|
|
5070
5069
|
return null;
|
|
5071
5070
|
}
|
|
5072
5071
|
const generateMachine = setup({
|
|
@@ -5461,7 +5460,7 @@ const generateMachine = setup({
|
|
|
5461
5460
|
const { logger, packageManager } = context.cliContext;
|
|
5462
5461
|
if ('hosted' === context.selectedMode && 'self-hosted' === context.hostedProvider) {
|
|
5463
5462
|
logger.info('Setup your backend with the c15t docs:');
|
|
5464
|
-
logger.info('https://
|
|
5463
|
+
logger.info('https://c15t.com/docs/self-host/v2');
|
|
5465
5464
|
} else if ('custom' === context.selectedMode) logger.info('Configuration Complete! Implement your custom endpoint handlers.');
|
|
5466
5465
|
if (context.installConfirmed && !context.installSucceeded) logger.warn('Dependency installation failed. Please check errors and install manually.');
|
|
5467
5466
|
else if (!context.installConfirmed && context.dependenciesToAdd.length > 0) {
|
package/dist/generate-files.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function generateClientConfigContent(mode, backendURL, useEnvFile, enableDevTool
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function generateHostedConfig(backendURL, useEnvFile, enableDevTools = false) {
|
|
22
|
-
const url = useEnvFile ? 'process.env.NEXT_PUBLIC_C15T_URL' : `'${backendURL || 'https://your-project.
|
|
22
|
+
const url = useEnvFile ? 'process.env.NEXT_PUBLIC_C15T_URL' : `'${backendURL || 'https://your-project.inth.app'}'`;
|
|
23
23
|
const devToolsImport = enableDevTools ? "import { createDevTools } from '@c15t/dev-tools';\n" : '';
|
|
24
24
|
const devToolsCall = enableDevTools ? 'createDevTools();\n' : '';
|
|
25
25
|
return `import { getOrCreateConsentRuntime } from 'c15t';
|
|
@@ -185,7 +185,7 @@ function generateEnvFileContent(backendURL, pkg) {
|
|
|
185
185
|
}
|
|
186
186
|
function generateEnvExampleContent(pkg) {
|
|
187
187
|
const envVarName = getEnvVarName(pkg);
|
|
188
|
-
return `\n# c15t Configuration\n${envVarName}=https://your-project.
|
|
188
|
+
return `\n# c15t Configuration\n${envVarName}=https://your-project.inth.app\n`;
|
|
189
189
|
}
|
|
190
190
|
async function findMatchingFiles(projectRoot, patterns, logger) {
|
|
191
191
|
const matches = [];
|
|
@@ -349,7 +349,7 @@ function generateConsentComponent({ importSource, optionsText, selectedScripts =
|
|
|
349
349
|
ConsentBanner,`;
|
|
350
350
|
const frameworkPropsImport = useConsentManagerProps ? `import type { ConsentManagerProps } from '${useFrameworkProps}';\n` : '';
|
|
351
351
|
let propsDestructure;
|
|
352
|
-
propsDestructure = useConsentManagerProps ?
|
|
352
|
+
propsDestructure = useConsentManagerProps ? '{ children, ssrData }: ConsentManagerProps' : ssrDataOption ? `{
|
|
353
353
|
children,
|
|
354
354
|
ssrData,
|
|
355
355
|
}: {
|
|
@@ -400,17 +400,17 @@ function buildDocComment({ defaultExport, initialDataProp, ssrDataOption, docsSl
|
|
|
400
400
|
const slug = docsSlug || 'nextjs';
|
|
401
401
|
return `/**
|
|
402
402
|
* Client-side consent manager provider.
|
|
403
|
-
* @see https://
|
|
403
|
+
* @see https://c15t.com/docs/frameworks/${slug}/quickstart
|
|
404
404
|
*/`;
|
|
405
405
|
}
|
|
406
406
|
if (initialDataProp) return `/**
|
|
407
407
|
* Consent management wrapper for Next.js Pages Router.
|
|
408
|
-
* @see https://
|
|
408
|
+
* @see https://c15t.com/docs/frameworks/nextjs/quickstart
|
|
409
409
|
*/`;
|
|
410
410
|
const slug = docsSlug || 'react';
|
|
411
411
|
return `/**
|
|
412
412
|
* Consent manager provider.
|
|
413
|
-
* @see https://
|
|
413
|
+
* @see https://c15t.com/docs/frameworks/${slug}/quickstart
|
|
414
414
|
*/`;
|
|
415
415
|
}
|
|
416
416
|
async function directory_getComponentsDirectory(projectRoot, sourceDir) {
|
|
@@ -477,7 +477,7 @@ import { theme } from './theme';
|
|
|
477
477
|
${propsInterface}
|
|
478
478
|
/**
|
|
479
479
|
* Client-side consent manager provider with compound components.
|
|
480
|
-
* @see https://
|
|
480
|
+
* @see https://c15t.com/docs/frameworks/${framework.docsSlug}/quickstart
|
|
481
481
|
*/
|
|
482
482
|
export default function ConsentManagerClient(${propsDestructure}) {
|
|
483
483
|
return (
|
|
@@ -508,7 +508,7 @@ import { ConsentDialog, ConsentWidget } from '${framework.consentDialogImport}';
|
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
510
|
* Consent dialog using compound components.
|
|
511
|
-
* @see https://
|
|
511
|
+
* @see https://c15t.com/docs/frameworks/${framework.docsSlug}/components/consent-dialog
|
|
512
512
|
*/
|
|
513
513
|
export default function () {
|
|
514
514
|
const [openItem, setOpenItem] = useState('');
|
|
@@ -549,7 +549,7 @@ import { ConsentBanner } from '${framework.consentBannerImport}';
|
|
|
549
549
|
|
|
550
550
|
/**
|
|
551
551
|
* Consent banner using compound components.
|
|
552
|
-
* @see https://
|
|
552
|
+
* @see https://c15t.com/docs/frameworks/${framework.docsSlug}/components/consent-banner
|
|
553
553
|
*/
|
|
554
554
|
export default function () {
|
|
555
555
|
return (
|
|
@@ -592,7 +592,7 @@ function generateTailwindTheme(framework) {
|
|
|
592
592
|
*
|
|
593
593
|
* Customize the colors, typography, and slots below to match your design.
|
|
594
594
|
*
|
|
595
|
-
* @see https://
|
|
595
|
+
* @see https://c15t.com/docs/customization/theming
|
|
596
596
|
*/
|
|
597
597
|
export const theme: Theme = {
|
|
598
598
|
colors: {
|
|
@@ -644,7 +644,7 @@ function generateMinimalTheme(framework) {
|
|
|
644
644
|
*
|
|
645
645
|
* Customize the colors, typography, and slots below to match your design.
|
|
646
646
|
*
|
|
647
|
-
* @see https://
|
|
647
|
+
* @see https://c15t.com/docs/customization/theming
|
|
648
648
|
*/
|
|
649
649
|
export const theme: Theme = {
|
|
650
650
|
colors: {
|
|
@@ -747,7 +747,7 @@ function generateDarkTheme(framework) {
|
|
|
747
747
|
*
|
|
748
748
|
* Customize the colors, typography, and slots below to match your design.
|
|
749
749
|
*
|
|
750
|
-
* @see https://
|
|
750
|
+
* @see https://c15t.com/docs/customization/theming
|
|
751
751
|
*/
|
|
752
752
|
export const theme: Theme = {
|
|
753
753
|
colors: {
|
|
@@ -928,7 +928,7 @@ async function runLayoutUpdatePipeline(config) {
|
|
|
928
928
|
function getBackendURLValue(backendURL, useEnvFile, proxyNextjs, envVarPrefix = 'NEXT_PUBLIC') {
|
|
929
929
|
if (proxyNextjs) return '"/api/c15t"';
|
|
930
930
|
if (useEnvFile) return `process.env.${envVarPrefix}_C15T_URL!`;
|
|
931
|
-
return `'${backendURL || 'https://your-project.
|
|
931
|
+
return `'${backendURL || 'https://your-project.inth.app'}'`;
|
|
932
932
|
}
|
|
933
933
|
function generateOptionsText(mode, backendURL, useEnvFile, proxyNextjs, inlineCustomHandlers, envVarPrefix = 'NEXT_PUBLIC') {
|
|
934
934
|
switch(mode){
|
|
@@ -972,7 +972,7 @@ import ConsentManagerProvider from './provider';
|
|
|
972
972
|
|
|
973
973
|
/**
|
|
974
974
|
* Server-side consent management wrapper with SSR data prefetching.
|
|
975
|
-
* @see https://
|
|
975
|
+
* @see https://c15t.com/docs/frameworks/${framework.docsSlug}/quickstart
|
|
976
976
|
*/
|
|
977
977
|
export function ConsentManager({ children }: { children: ReactNode }) {
|
|
978
978
|
const ssrData = fetchInitialData({
|
|
@@ -991,7 +991,7 @@ import ConsentManagerProvider from './provider';
|
|
|
991
991
|
|
|
992
992
|
/**
|
|
993
993
|
* Consent management wrapper.
|
|
994
|
-
* @see https://
|
|
994
|
+
* @see https://c15t.com/docs/frameworks/${framework.docsSlug}/quickstart
|
|
995
995
|
*/
|
|
996
996
|
export function ConsentManager({ children }: { children: ReactNode }) {
|
|
997
997
|
return (
|
|
@@ -1008,7 +1008,7 @@ import ConsentManagerProvider from './provider';
|
|
|
1008
1008
|
|
|
1009
1009
|
/**
|
|
1010
1010
|
* Consent management wrapper.
|
|
1011
|
-
* @see https://
|
|
1011
|
+
* @see https://c15t.com/docs/frameworks/${docsSlug}/quickstart
|
|
1012
1012
|
*/
|
|
1013
1013
|
export function ConsentManager({ children }: { children: ReactNode }) {
|
|
1014
1014
|
return <ConsentManagerProvider>{children}</ConsentManagerProvider>;
|
|
@@ -1202,7 +1202,7 @@ async function createConsentManagerComponent(projectRoot, pagesDir, optionsText,
|
|
|
1202
1202
|
function addServerSideDataComment(appFile, backendURL, useEnvFile, proxyNextjs) {
|
|
1203
1203
|
const existingComments = appFile.getLeadingCommentRanges();
|
|
1204
1204
|
let urlExample;
|
|
1205
|
-
urlExample = proxyNextjs ? "'/api/c15t'" : useEnvFile ? 'process.env.NEXT_PUBLIC_C15T_URL!' : `'${backendURL || 'https://your-project.
|
|
1205
|
+
urlExample = proxyNextjs ? "'/api/c15t'" : useEnvFile ? 'process.env.NEXT_PUBLIC_C15T_URL!' : `'${backendURL || 'https://your-project.inth.app'}'`;
|
|
1206
1206
|
const serverSideComment = `/**
|
|
1207
1207
|
* Note: To get the initial server-side data on other pages, add this to each page:
|
|
1208
1208
|
*
|
|
@@ -1465,7 +1465,7 @@ function generateRewriteDestination(backendURL, useEnvFile) {
|
|
|
1465
1465
|
isTemplateLiteral: true
|
|
1466
1466
|
};
|
|
1467
1467
|
return {
|
|
1468
|
-
destination: `${backendURL || 'https://your-project.
|
|
1468
|
+
destination: `${backendURL || 'https://your-project.inth.app'}/:path*`,
|
|
1469
1469
|
isTemplateLiteral: false
|
|
1470
1470
|
};
|
|
1471
1471
|
}
|
|
@@ -9,7 +9,7 @@ import { type StorageMode } from '../../../constants';
|
|
|
9
9
|
export declare const MODE_OPTIONS: readonly [{
|
|
10
10
|
readonly value: "hosted";
|
|
11
11
|
readonly label: "Cloud Hosted";
|
|
12
|
-
readonly hint: "Managed by
|
|
12
|
+
readonly hint: "Managed by inth.com (Recommended)";
|
|
13
13
|
readonly description: "Store consent data securely in the cloud with zero infrastructure";
|
|
14
14
|
}, {
|
|
15
15
|
readonly value: "offline";
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const URLS: {
|
|
8
8
|
/** Default c15t cloud platform URL */
|
|
9
|
-
readonly CONSENT_IO: "https://
|
|
9
|
+
readonly CONSENT_IO: "https://inth.com";
|
|
10
10
|
/** First-party telemetry logs endpoint */
|
|
11
11
|
readonly TELEMETRY: "https://telemetry.c15t.com/c15t/v1/logs";
|
|
12
12
|
/** Documentation website */
|
|
13
|
-
readonly DOCS: "https://
|
|
13
|
+
readonly DOCS: "https://c15t.com/docs";
|
|
14
14
|
/** GitHub repository */
|
|
15
15
|
readonly GITHUB: "https://github.com/c15t/c15t";
|
|
16
16
|
/** Discord community */
|
|
17
|
-
readonly DISCORD: "https://
|
|
17
|
+
readonly DISCORD: "https://c15t.com/discord";
|
|
18
18
|
/** API documentation */
|
|
19
|
-
readonly API_DOCS: "https://
|
|
19
|
+
readonly API_DOCS: "https://c15t.com/docs/api";
|
|
20
20
|
/** CLI documentation */
|
|
21
|
-
readonly CLI_DOCS: "https://
|
|
21
|
+
readonly CLI_DOCS: "https://c15t.com/docs/cli";
|
|
22
22
|
/** Product changelog */
|
|
23
|
-
readonly CHANGELOG: "https://
|
|
23
|
+
readonly CHANGELOG: "https://c15t.com/changelog";
|
|
24
24
|
};
|
|
25
25
|
export declare const PATHS: {
|
|
26
26
|
/** c15t config directory name (in home dir) */
|
|
@@ -43,7 +43,7 @@ export declare const PATHS: {
|
|
|
43
43
|
export declare const REGEX: {
|
|
44
44
|
/** Generic URL pattern */
|
|
45
45
|
readonly URL: RegExp;
|
|
46
|
-
/** c15t platform URL pattern */
|
|
46
|
+
/** Hosted c15t platform URL pattern (legacy and current domains) */
|
|
47
47
|
readonly C15T_URL: RegExp;
|
|
48
48
|
/** Dynamic route segment pattern (e.g., [locale]) */
|
|
49
49
|
readonly DYNAMIC_SEGMENT: RegExp;
|
|
@@ -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://
|
|
13
|
+
readonly docs: "https://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://
|
|
54
|
+
readonly docs: "https://c15t.com/docs/cli/frameworks";
|
|
55
55
|
};
|
|
56
56
|
readonly LAYOUT_NOT_FOUND: {
|
|
57
57
|
readonly code: "LAYOUT_NOT_FOUND";
|
|
@@ -72,7 +72,7 @@ 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://
|
|
75
|
+
readonly docs: "https://c15t.com/docs/configuration";
|
|
76
76
|
};
|
|
77
77
|
readonly NETWORK_ERROR: {
|
|
78
78
|
readonly code: "NETWORK_ERROR";
|
|
@@ -81,8 +81,8 @@ export declare const ERROR_CATALOG: {
|
|
|
81
81
|
};
|
|
82
82
|
readonly CONTROL_PLANE_CONNECTION_FAILED: {
|
|
83
83
|
readonly code: "CONTROL_PLANE_CONNECTION_FAILED";
|
|
84
|
-
readonly message: "Could not connect to
|
|
85
|
-
readonly hint: "Check if https://
|
|
84
|
+
readonly message: "Could not connect to inth.com";
|
|
85
|
+
readonly hint: "Check if https://inth.com is accessible";
|
|
86
86
|
};
|
|
87
87
|
readonly API_ERROR: {
|
|
88
88
|
readonly code: "API_ERROR";
|
|
@@ -92,7 +92,7 @@ export declare const ERROR_CATALOG: {
|
|
|
92
92
|
readonly URL_INVALID: {
|
|
93
93
|
readonly code: "URL_INVALID";
|
|
94
94
|
readonly message: "Invalid URL format";
|
|
95
|
-
readonly hint: "Expected format: https://your-project.
|
|
95
|
+
readonly hint: "Expected format: https://your-project.inth.app";
|
|
96
96
|
};
|
|
97
97
|
readonly INSTANCE_NOT_FOUND: {
|
|
98
98
|
readonly code: "INSTANCE_NOT_FOUND";
|
|
@@ -19,7 +19,7 @@ export interface ModeSelectionOutput {
|
|
|
19
19
|
mode: StorageMode;
|
|
20
20
|
}
|
|
21
21
|
export declare const modeSelectionActor: import("xstate").PromiseActorLogic<ModeSelectionOutput, ModeSelectionInput, import("xstate").EventObject>;
|
|
22
|
-
type HostedProvider = '
|
|
22
|
+
type HostedProvider = 'inth.com' | 'self-hosted';
|
|
23
23
|
export interface HostedModeInput {
|
|
24
24
|
cliContext: CliContext;
|
|
25
25
|
initialURL?: string;
|
|
@@ -44,8 +44,8 @@ export interface GenerateMachineContext extends BaseMachineContext {
|
|
|
44
44
|
/** Mode passed as CLI argument */
|
|
45
45
|
modeArg: StorageMode | null;
|
|
46
46
|
/** Hosted provider selection when mode is hosted */
|
|
47
|
-
hostedProvider: '
|
|
48
|
-
/** Backend URL for hosted mode (
|
|
47
|
+
hostedProvider: 'inth.com' | 'self-hosted' | null;
|
|
48
|
+
/** Backend URL for hosted mode (inth.com or self-hosted provider) */
|
|
49
49
|
backendURL: string | null;
|
|
50
50
|
/** Whether to store backend URL in .env file */
|
|
51
51
|
useEnvFile: boolean;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/cli",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "CLI for rapid c15t setup. Scaffold React and Next.js cookie banners and a preferences centre, generate types and config, and run migration tooling for self-hosted deployments.",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://c15t.com",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/c15t/c15t.git",
|
|
9
9
|
"directory": "packages/cli"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"exports": "./dist/index.mjs",
|
|
14
14
|
"main": "./dist/index.mjs",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"test:watch": "vitest"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@c15t/backend": "2.0.0
|
|
37
|
-
"@c15t/logger": "
|
|
36
|
+
"@c15t/backend": "2.0.0",
|
|
37
|
+
"@c15t/logger": "2.0.0",
|
|
38
38
|
"@clack/prompts": "1.1.0",
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
40
40
|
"c12": "3.3.3",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"zod": "4.3.6"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@c15t/typescript-config": "0.0.1
|
|
53
|
+
"@c15t/typescript-config": "0.0.1",
|
|
54
54
|
"@c15t/vitest-config": "1.0.0",
|
|
55
55
|
"@types/figlet": "1.7.0",
|
|
56
56
|
"@types/fs-extra": "11.0.4",
|
package/readme.json
CHANGED
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"Set `C15T_TELEMETRY_DISABLED=1` in your environment"
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"docsLink": "https://
|
|
81
|
-
"quickStartLink": "https://
|
|
80
|
+
"docsLink": "https://c15t.com/docs/cli/overview",
|
|
81
|
+
"quickStartLink": "https://c15t.com/docs/cli/quickstart",
|
|
82
82
|
"githubLink": "https://github.com/c15t/c15t",
|
|
83
83
|
"showCLIGeneration": true
|
|
84
84
|
}
|