@c15t/cli 2.0.0 → 2.0.2
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 +12 -36
- package/dist/145.mjs +20 -2
- package/package.json +29 -5
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://c15t.com?utm_source=
|
|
2
|
+
<a href="https://c15t.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%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">
|
|
6
6
|
</picture>
|
|
7
7
|
</a>
|
|
8
|
-
<br />
|
|
9
|
-
<h1 align="center">@c15t/cli: c15t's CLI</h1>
|
|
10
8
|
</p>
|
|
11
9
|
|
|
10
|
+
# @c15t/cli: c15t's CLI
|
|
11
|
+
|
|
12
12
|
[](https://github.com/c15t/c15t)
|
|
13
13
|
[](https://github.com/c15t/c15t/actions/workflows/ci.yml)
|
|
14
14
|
[](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
@@ -40,7 +40,7 @@ CLI for rapid c15t setup. Scaffold React and Next.js cookie banners and a prefer
|
|
|
40
40
|
Easiest setup with @c15t/cli:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
# Set up c15t
|
|
43
|
+
# Set up c15t in your project
|
|
44
44
|
pnpm dlx @c15t/cli setup
|
|
45
45
|
# Alternatives:
|
|
46
46
|
# npx @c15t/cli setup
|
|
@@ -50,7 +50,7 @@ pnpm dlx @c15t/cli setup
|
|
|
50
50
|
The CLI will:
|
|
51
51
|
|
|
52
52
|
- Install necessary packages
|
|
53
|
-
- Configure your c15t
|
|
53
|
+
- Configure your c15t instance
|
|
54
54
|
- Set up environment variables
|
|
55
55
|
- Add consent management components to your app
|
|
56
56
|
|
|
@@ -65,37 +65,13 @@ The CLI will:
|
|
|
65
65
|
## Available Commands
|
|
66
66
|
|
|
67
67
|
- `setup`: Set up c15t in your project
|
|
68
|
-
- `codemods`: Run migration codemods
|
|
68
|
+
- `codemods`: Run migration codemods for c15t upgrades
|
|
69
69
|
- `self-host`: Self-hosted workflow commands (currently database migrations)
|
|
70
70
|
- `skills`: Install c15t agent skills for AI-assisted development
|
|
71
71
|
- `changelog`: Open the c15t changelog in your browser
|
|
72
72
|
- `github`: Open the project's GitHub repository to star the project
|
|
73
73
|
- `docs`: Open the c15t documentation in your browser
|
|
74
74
|
|
|
75
|
-
### Codemods
|
|
76
|
-
|
|
77
|
-
Run codemods interactively:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
c15t codemods
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Preview changes without writing files:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
c15t codemods --dry-run
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Bundled Docs
|
|
90
|
-
|
|
91
|
-
Supported c15t packages now include local docs inside the installed package:
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
node_modules/<package>/docs/
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
These docs are version-matched to the installed package and can be used as local agent context alongside c15t skills.
|
|
98
|
-
|
|
99
75
|
## Global Flags
|
|
100
76
|
|
|
101
77
|
- `--help`: Display help menu
|
|
@@ -123,24 +99,24 @@ For further information, guides, and examples visit the [reference documentation
|
|
|
123
99
|
|
|
124
100
|
- Join our [Discord community](https://c15t.link/discord)
|
|
125
101
|
- Open an issue on our [GitHub repository](https://github.com/c15t/c15t/issues)
|
|
126
|
-
- Visit [
|
|
127
|
-
- Contact our support team via email [support@
|
|
102
|
+
- Visit [inth.com](https://inth.com) and use the chat widget
|
|
103
|
+
- Contact our support team via email [support@inth.com](mailto:support@inth.com)
|
|
128
104
|
|
|
129
105
|
## Contributing
|
|
130
106
|
|
|
131
|
-
- We're open to all community contributions
|
|
107
|
+
- We're open to all community contributions.
|
|
132
108
|
- Read our [Contribution Guidelines](https://c15t.com/docs/oss/contributing)
|
|
133
109
|
- Review our [Code of Conduct](https://c15t.com/docs/oss/code-of-conduct)
|
|
134
110
|
- Fork the repository
|
|
135
111
|
- Create a new branch for your feature
|
|
136
112
|
- Submit a pull request
|
|
137
|
-
- **All contributions, big or small, are welcome and appreciated
|
|
113
|
+
- **All contributions, big or small, are welcome and appreciated.**
|
|
138
114
|
|
|
139
115
|
## Security
|
|
140
116
|
|
|
141
117
|
If you believe you have found a security vulnerability in c15t, we encourage you to **_responsibly disclose this and NOT open a public issue_**. We will investigate all legitimate reports.
|
|
142
118
|
|
|
143
|
-
Our preference is that you make use of GitHub's private vulnerability reporting feature to disclose potential security vulnerabilities in our
|
|
119
|
+
Our preference is that you make use of GitHub's private vulnerability reporting feature to disclose potential security vulnerabilities in our open-source software. To do this, please visit [https://github.com/c15t/c15t/security](https://github.com/c15t/c15t/security) and click the "Report a vulnerability" button.
|
|
144
120
|
|
|
145
121
|
### Security Policy
|
|
146
122
|
|
|
@@ -155,4 +131,4 @@ Our preference is that you make use of GitHub's private vulnerability reporting
|
|
|
155
131
|
|
|
156
132
|
---
|
|
157
133
|
|
|
158
|
-
**Built by [Inth](https://inth.com?utm_source=
|
|
134
|
+
**Built by [Inth](https://inth.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%40c15t%2Fcli)**
|
package/dist/145.mjs
CHANGED
|
@@ -372,6 +372,7 @@ const CSS_ENTRYPOINT_CANDIDATES = [
|
|
|
372
372
|
'src/App.css'
|
|
373
373
|
];
|
|
374
374
|
const LOCAL_CSS_IMPORT_RE = /^\s*import(?:\s+[^'"]+\s+from\s+)?['"]([^'"]+\.css)['"];\s*$/gm;
|
|
375
|
+
const CSS_IMPORT_RE = /^\s*@import\b.+;\s*(?:(?:\/\*.*\*\/|\/\/.*)\s*)?$/;
|
|
375
376
|
const TAILWIND_V4_IMPORT_RE = /^\s*@import\s+['"]tailwindcss['"];\s*$/;
|
|
376
377
|
const TAILWIND_COMPONENTS_RE = /^\s*@tailwind\s+components\s*;\s*$/;
|
|
377
378
|
const TAILWIND_UTILITIES_RE = /^\s*@tailwind\s+utilities\s*;\s*$/;
|
|
@@ -432,6 +433,22 @@ function findTopInsertionLineIndex(lines) {
|
|
|
432
433
|
}
|
|
433
434
|
return index;
|
|
434
435
|
}
|
|
436
|
+
function findTailwindV4InsertionLineIndex(lines, tailwindImportIndex) {
|
|
437
|
+
let lastImportIndex = tailwindImportIndex;
|
|
438
|
+
for(let index = tailwindImportIndex + 1; index < lines.length; index += 1){
|
|
439
|
+
const line = lines[index];
|
|
440
|
+
const trimmed = line?.trim() ?? '';
|
|
441
|
+
const isStandaloneCommentLine = /^\/\*.*\*\/\s*$/.test(trimmed) || /^\/\/.*\s*$/.test(trimmed) || /^\/\*.*\s*$/.test(trimmed) || /^\*(?:\/|$|\s(?!\{).*)$/.test(trimmed);
|
|
442
|
+
if ('' !== trimmed && !isStandaloneCommentLine) {
|
|
443
|
+
if (CSS_IMPORT_RE.test(line ?? '')) {
|
|
444
|
+
lastImportIndex = index;
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return lastImportIndex + 1;
|
|
451
|
+
}
|
|
435
452
|
function insertImportsIntoCssContent(content, desiredImports, tailwindVersion, managedPackages) {
|
|
436
453
|
const normalizedContent = content.replace(/\r\n/g, '\n');
|
|
437
454
|
const hadTrailingNewline = normalizedContent.endsWith('\n');
|
|
@@ -450,7 +467,7 @@ function insertImportsIntoCssContent(content, desiredImports, tailwindVersion, m
|
|
|
450
467
|
}
|
|
451
468
|
} else {
|
|
452
469
|
const tailwindImportIndex = filteredLines.findIndex((line)=>TAILWIND_V4_IMPORT_RE.test(line));
|
|
453
|
-
if (tailwindImportIndex >= 0) insertionIndex = tailwindImportIndex
|
|
470
|
+
if (tailwindImportIndex >= 0) insertionIndex = findTailwindV4InsertionLineIndex(filteredLines, tailwindImportIndex);
|
|
454
471
|
}
|
|
455
472
|
const nextLines = [
|
|
456
473
|
...filteredLines.slice(0, insertionIndex),
|
|
@@ -7034,7 +7051,8 @@ const globalFlags = [
|
|
|
7034
7051
|
},
|
|
7035
7052
|
{
|
|
7036
7053
|
names: [
|
|
7037
|
-
'-y'
|
|
7054
|
+
'-y',
|
|
7055
|
+
'--yes'
|
|
7038
7056
|
],
|
|
7039
7057
|
description: 'Skip confirmation prompts (use with caution).',
|
|
7040
7058
|
type: 'boolean',
|
package/package.json
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/cli",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "CLI for rapid c15t setup. Scaffold React and Next.js cookie banners and a
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "CLI for rapid c15t setup. Scaffold React and Next.js cookie banners and a preference center, generate types and config, and run migration tooling for self-hosted deployments.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"c15t",
|
|
7
|
+
"cli",
|
|
8
|
+
"consent",
|
|
9
|
+
"privacy",
|
|
10
|
+
"gdpr",
|
|
11
|
+
"ccpa",
|
|
12
|
+
"lgpd",
|
|
13
|
+
"tcf",
|
|
14
|
+
"cmp",
|
|
15
|
+
"cookie-banner",
|
|
16
|
+
"cookie-consent",
|
|
17
|
+
"consent-management",
|
|
18
|
+
"scaffold",
|
|
19
|
+
"codegen",
|
|
20
|
+
"migrations",
|
|
21
|
+
"codemod",
|
|
22
|
+
"nextjs",
|
|
23
|
+
"react",
|
|
24
|
+
"typescript"
|
|
25
|
+
],
|
|
26
|
+
"homepage": "https://c15t.com/docs/cli/overview",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/c15t/c15t/issues"
|
|
29
|
+
},
|
|
6
30
|
"repository": {
|
|
7
31
|
"type": "git",
|
|
8
32
|
"url": "https://github.com/c15t/c15t.git",
|
|
@@ -24,7 +48,7 @@
|
|
|
24
48
|
"scripts": {
|
|
25
49
|
"build": "rslib build && bun ../../scripts/normalize-dist-types.mjs",
|
|
26
50
|
"check-types": "tsc --noEmit",
|
|
27
|
-
"dev": "rslib build &&
|
|
51
|
+
"dev": "sh -c 'rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
|
|
28
52
|
"fmt": "bun biome format --write . && bun biome check --formatter-enabled=false --linter-enabled=false --write",
|
|
29
53
|
"knip": "knip",
|
|
30
54
|
"lint": "bun biome lint ./src",
|
|
@@ -33,7 +57,7 @@
|
|
|
33
57
|
"test:watch": "vitest"
|
|
34
58
|
},
|
|
35
59
|
"dependencies": {
|
|
36
|
-
"@c15t/backend": "2.0.
|
|
60
|
+
"@c15t/backend": "2.0.2",
|
|
37
61
|
"@c15t/logger": "2.0.0",
|
|
38
62
|
"@clack/prompts": "1.1.0",
|
|
39
63
|
"@modelcontextprotocol/sdk": "^1.29.0",
|