@c15t/cli 2.0.4 → 2.1.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/dist/145.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import { createLogger, initLogger } from "evlog";
|
|
|
12
12
|
import { createDrainPipeline } from "evlog/pipeline";
|
|
13
13
|
import { spawn as external_node_child_process_spawn } from "node:child_process";
|
|
14
14
|
import { once } from "node:events";
|
|
15
|
+
import { BUILT_IN_INTEGRATION_CATEGORIES, builtInScriptIntegrations } from "@c15t/scripts/registry";
|
|
15
16
|
import { createLogger as logger_createLogger } from "@c15t/logger";
|
|
16
17
|
import { migrator } from "@c15t/backend/db/migrator";
|
|
17
18
|
import { DB } from "@c15t/backend/db/schema";
|
|
@@ -4786,53 +4787,11 @@ const frontendOptionsActor = fromPromise(async ({ input })=>{
|
|
|
4786
4787
|
expandedTheme
|
|
4787
4788
|
};
|
|
4788
4789
|
});
|
|
4789
|
-
const AVAILABLE_SCRIPTS =
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
},
|
|
4795
|
-
{
|
|
4796
|
-
value: 'google-tag',
|
|
4797
|
-
label: 'Google Tag (gtag.js)',
|
|
4798
|
-
hint: 'Google Analytics 4'
|
|
4799
|
-
},
|
|
4800
|
-
{
|
|
4801
|
-
value: 'meta-pixel',
|
|
4802
|
-
label: 'Meta Pixel',
|
|
4803
|
-
hint: 'Facebook/Instagram tracking'
|
|
4804
|
-
},
|
|
4805
|
-
{
|
|
4806
|
-
value: 'posthog',
|
|
4807
|
-
label: 'PostHog',
|
|
4808
|
-
hint: 'Product analytics'
|
|
4809
|
-
},
|
|
4810
|
-
{
|
|
4811
|
-
value: 'linkedin-insights',
|
|
4812
|
-
label: 'LinkedIn Insight Tag',
|
|
4813
|
-
hint: 'LinkedIn conversion tracking'
|
|
4814
|
-
},
|
|
4815
|
-
{
|
|
4816
|
-
value: 'tiktok-pixel',
|
|
4817
|
-
label: 'TikTok Pixel',
|
|
4818
|
-
hint: 'TikTok ads tracking'
|
|
4819
|
-
},
|
|
4820
|
-
{
|
|
4821
|
-
value: 'x-pixel',
|
|
4822
|
-
label: 'X (Twitter) Pixel',
|
|
4823
|
-
hint: 'X/Twitter conversion tracking'
|
|
4824
|
-
},
|
|
4825
|
-
{
|
|
4826
|
-
value: 'microsoft-uet',
|
|
4827
|
-
label: 'Microsoft UET',
|
|
4828
|
-
hint: 'Bing Ads tracking'
|
|
4829
|
-
},
|
|
4830
|
-
{
|
|
4831
|
-
value: 'databuddy',
|
|
4832
|
-
label: 'Databuddy',
|
|
4833
|
-
hint: 'Data collection'
|
|
4834
|
-
}
|
|
4835
|
-
];
|
|
4790
|
+
const AVAILABLE_SCRIPTS = BUILT_IN_INTEGRATION_CATEGORIES.flatMap((category)=>builtInScriptIntegrations.filter((integration)=>integration.integrationCategory === category.key).map((integration)=>({
|
|
4791
|
+
value: integration.packageSubpath,
|
|
4792
|
+
label: integration.label,
|
|
4793
|
+
hint: integration.hint
|
|
4794
|
+
})));
|
|
4836
4795
|
const scriptsOptionActor = fromPromise(async ({ input })=>{
|
|
4837
4796
|
const { cliContext } = input;
|
|
4838
4797
|
cliContext.logger.info("The @c15t/scripts package provides pre-configured third-party scripts with consent management.");
|
|
@@ -4845,13 +4804,14 @@ const scriptsOptionActor = fromPromise(async ({ input })=>{
|
|
|
4845
4804
|
addScripts: false,
|
|
4846
4805
|
selectedScripts: []
|
|
4847
4806
|
};
|
|
4807
|
+
const scriptOptions = AVAILABLE_SCRIPTS.map((script)=>({
|
|
4808
|
+
value: script.value,
|
|
4809
|
+
label: script.label,
|
|
4810
|
+
hint: script.hint
|
|
4811
|
+
}));
|
|
4848
4812
|
const selected = await __rspack_external__clack_prompts_3cae1695.multiselect({
|
|
4849
4813
|
message: "Which scripts do you want to add?",
|
|
4850
|
-
options:
|
|
4851
|
-
value: s.value,
|
|
4852
|
-
label: s.label,
|
|
4853
|
-
hint: s.hint
|
|
4854
|
-
})),
|
|
4814
|
+
options: scriptOptions,
|
|
4855
4815
|
required: false
|
|
4856
4816
|
});
|
|
4857
4817
|
if (isCancel(selected)) throw new PromptCancelledError("scripts_selection");
|
|
@@ -36,7 +36,7 @@ export declare const SCRIPT_OPTIONS: readonly [{
|
|
|
36
36
|
readonly hint: "Heatmaps & recordings";
|
|
37
37
|
readonly category: "analytics";
|
|
38
38
|
}, {
|
|
39
|
-
readonly value: "clarity";
|
|
39
|
+
readonly value: "microsoft-clarity";
|
|
40
40
|
readonly label: "Microsoft Clarity";
|
|
41
41
|
readonly hint: "Session replay";
|
|
42
42
|
readonly category: "analytics";
|
|
@@ -53,43 +53,11 @@ export declare const frontendOptionsActor: import("xstate").PromiseActorLogic<Fr
|
|
|
53
53
|
/**
|
|
54
54
|
* Available scripts from @c15t/scripts package
|
|
55
55
|
*/
|
|
56
|
-
export declare const AVAILABLE_SCRIPTS:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
readonly value: "google-tag";
|
|
62
|
-
readonly label: "Google Tag (gtag.js)";
|
|
63
|
-
readonly hint: "Google Analytics 4";
|
|
64
|
-
}, {
|
|
65
|
-
readonly value: "meta-pixel";
|
|
66
|
-
readonly label: "Meta Pixel";
|
|
67
|
-
readonly hint: "Facebook/Instagram tracking";
|
|
68
|
-
}, {
|
|
69
|
-
readonly value: "posthog";
|
|
70
|
-
readonly label: "PostHog";
|
|
71
|
-
readonly hint: "Product analytics";
|
|
72
|
-
}, {
|
|
73
|
-
readonly value: "linkedin-insights";
|
|
74
|
-
readonly label: "LinkedIn Insight Tag";
|
|
75
|
-
readonly hint: "LinkedIn conversion tracking";
|
|
76
|
-
}, {
|
|
77
|
-
readonly value: "tiktok-pixel";
|
|
78
|
-
readonly label: "TikTok Pixel";
|
|
79
|
-
readonly hint: "TikTok ads tracking";
|
|
80
|
-
}, {
|
|
81
|
-
readonly value: "x-pixel";
|
|
82
|
-
readonly label: "X (Twitter) Pixel";
|
|
83
|
-
readonly hint: "X/Twitter conversion tracking";
|
|
84
|
-
}, {
|
|
85
|
-
readonly value: "microsoft-uet";
|
|
86
|
-
readonly label: "Microsoft UET";
|
|
87
|
-
readonly hint: "Bing Ads tracking";
|
|
88
|
-
}, {
|
|
89
|
-
readonly value: "databuddy";
|
|
90
|
-
readonly label: "Databuddy";
|
|
91
|
-
readonly hint: "Data collection";
|
|
92
|
-
}];
|
|
56
|
+
export declare const AVAILABLE_SCRIPTS: {
|
|
57
|
+
value: "posthog" | "hotjar" | "microsoft-clarity" | "intercom" | "google-tag-manager" | "google-tag" | "meta-pixel" | "linkedin-insights" | "tiktok-pixel" | "x-pixel" | "microsoft-uet" | "databuddy" | "ahrefs-analytics" | "cloudflare-web-analytics" | "fathom-analytics" | "mixpanel-analytics" | "matomo-analytics" | "promptwatch" | "segment" | "rybbit-analytics" | "plausible-analytics" | "umami-analytics" | "vercel-analytics" | "crisp" | "reddit-pixel" | "snapchat-pixel";
|
|
58
|
+
label: "Google Tag Manager" | "PostHog" | "Meta Pixel" | "Hotjar" | "Microsoft Clarity" | "Intercom" | "Google Tag (gtag.js)" | "Ahrefs Analytics" | "Cloudflare Web Analytics" | "Databuddy" | "Fathom Analytics" | "Mixpanel Analytics" | "Matomo Analytics" | "Promptwatch" | "Segment" | "Rybbit Analytics" | "Plausible Analytics" | "Umami Analytics" | "Vercel Analytics" | "Crisp" | "Reddit Pixel" | "TikTok Pixel" | "LinkedIn Insight Tag" | "Microsoft UET" | "Snapchat Pixel" | "X (Twitter) Pixel";
|
|
59
|
+
hint: "Product analytics" | "GTM container script" | "Google Analytics 4" | "Cookieless web analytics from Ahrefs" | "Cookieless analytics from Cloudflare" | "Session replay and heatmaps" | "Data collection" | "Privacy-friendly cookieless analytics" | "Product analytics and funnels" | "Heatmaps and session recordings" | "Self-hosted privacy analytics" | "AI traffic analytics" | "Customer data platform" | "Privacy-friendly web analytics" | "Open-source cookieless analytics" | "Vercel web analytics" | "Live chat widget" | "Messenger and live chat widget" | "Facebook/Instagram tracking" | "Reddit ads tracking" | "TikTok ads tracking" | "LinkedIn conversion tracking" | "Bing Ads tracking" | "Snapchat ads tracking" | "X/Twitter conversion tracking";
|
|
60
|
+
}[];
|
|
93
61
|
export type AvailableScript = (typeof AVAILABLE_SCRIPTS)[number]['value'];
|
|
94
62
|
export interface ScriptsOptionInput {
|
|
95
63
|
cliContext: CliContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/cli",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
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
5
|
"keywords": [
|
|
6
6
|
"c15t",
|
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
"test:watch": "vitest"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@c15t/backend": "2.0
|
|
61
|
-
"@c15t/logger": "2.
|
|
60
|
+
"@c15t/backend": "2.1.0",
|
|
61
|
+
"@c15t/logger": "2.1.0",
|
|
62
|
+
"@c15t/scripts": "2.1.0",
|
|
62
63
|
"@clack/prompts": "1.1.0",
|
|
63
64
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
64
65
|
"c12": "3.3.3",
|