@c15t/cli 1.0.3 → 1.0.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 +17 -4
- package/dist/context/creator.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +105 -26
- package/dist/onboarding/index.d.ts.map +1 -1
- package/dist/utils/telemetry.d.ts +37 -4
- package/dist/utils/telemetry.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://c15t.com/logo-icon.png" alt="c15t Logo" width="64" height="64" />
|
|
3
|
+
<h1>@c15t/cli</h1>
|
|
4
|
+
<p>Transform privacy consent from a compliance checkbox into a fully observable system</p>
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
[](https://github.com/c15t/c15t)
|
|
7
|
+
[](https://github.com/c15t/c15t/actions/workflows/ci.yml)
|
|
8
|
+
[]([LICENSE.md](https://github.com/c15t/c15t/blob/main/LICENSE.md))
|
|
9
|
+
[](https://c15t.com/discord)
|
|
10
|
+
</div>
|
|
4
11
|
|
|
5
12
|
## Installation
|
|
6
13
|
|
|
@@ -88,6 +95,12 @@ You can disable telemetry in any of the following ways:
|
|
|
88
95
|
|
|
89
96
|
For more detailed documentation, visit [https://c15t.com](https://c15t.com).
|
|
90
97
|
|
|
91
|
-
## License
|
|
98
|
+
## 📜 License
|
|
92
99
|
|
|
93
|
-
|
|
100
|
+
[GNU General Public License v3.0](https://github.com/c15t/c15t/blob/main/LICENSE.md) - See [LICENSE]([LICENSE.md](https://github.com/c15t/c15t/blob/main/LICENSE.md)) for details.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
<div align="center">
|
|
105
|
+
<strong>Built with ❤️ by the <a href="www.consent.io"/>consent.io</a> team</strong>
|
|
106
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creator.d.ts","sourceRoot":"","sources":["../../src/context/creator.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,UAAU,EAAE,GACpB,UAAU,
|
|
1
|
+
{"version":3,"file":"creator.d.ts","sourceRoot":"","sources":["../../src/context/creator.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,UAAU,EAAE,GACpB,UAAU,CAyEZ"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,eAAe,CAAC;AAuEvB,wBAAsB,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,eAAe,CAAC;AAuEvB,wBAAsB,IAAI,uBAqOzB"}
|
package/dist/index.mjs
CHANGED
|
@@ -371,29 +371,45 @@ class Telemetry {
|
|
|
371
371
|
defaultProperties;
|
|
372
372
|
distinctId;
|
|
373
373
|
apiKey = 'phc_ViY5LtTmh4kqoumXZB2olPFoTz4AbbDfrogNgFi1MH3';
|
|
374
|
+
debug = false;
|
|
375
|
+
logger;
|
|
374
376
|
constructor(options){
|
|
375
377
|
const envDisabled = '1' === process.env[TELEMETRY_DISABLED_ENV] || process.env[TELEMETRY_DISABLED_ENV]?.toLowerCase() === 'true';
|
|
376
378
|
const hasValidApiKey = !!(this.apiKey && '' !== this.apiKey.trim());
|
|
377
379
|
this.disabled = options?.disabled ?? envDisabled ?? !hasValidApiKey;
|
|
378
380
|
this.defaultProperties = options?.defaultProperties ?? {};
|
|
381
|
+
this.logger = options?.logger;
|
|
379
382
|
this.distinctId = this.generateAnonymousId();
|
|
380
383
|
if (this.disabled) {
|
|
381
|
-
if (!hasValidApiKey)
|
|
384
|
+
if (!hasValidApiKey) this.logDebug('Telemetry disabled: No API key provided');
|
|
382
385
|
} else this.initClient(options?.client);
|
|
383
386
|
}
|
|
384
|
-
|
|
385
|
-
if (this.disabled || !this.client)
|
|
387
|
+
trackEventSync(eventName, properties = {}) {
|
|
388
|
+
if (this.disabled || !this.client) {
|
|
389
|
+
if (this.debug) this.logDebug('Telemetry disabled or client not initialized');
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
386
392
|
const safeProperties = {};
|
|
387
393
|
for (const [key, value] of Object.entries(properties))if ('config' !== key && void 0 !== value) safeProperties[key] = value;
|
|
388
|
-
this.
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
394
|
+
if (this.debug) this.logDebug(`Sending telemetry event: ${eventName}`);
|
|
395
|
+
try {
|
|
396
|
+
this.client.capture({
|
|
397
|
+
distinctId: this.distinctId,
|
|
398
|
+
event: eventName,
|
|
399
|
+
properties: {
|
|
400
|
+
...this.defaultProperties,
|
|
401
|
+
...safeProperties,
|
|
402
|
+
timestamp: new Date().toISOString()
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
this.client.flush();
|
|
406
|
+
if (this.debug) this.logDebug(`Flushed telemetry event: ${eventName}`);
|
|
407
|
+
} catch (error) {
|
|
408
|
+
if (this.debug) this.logDebug(`Error sending telemetry: ${error}`);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
trackEvent(eventName, properties = {}) {
|
|
412
|
+
this.trackEventSync(eventName, properties);
|
|
397
413
|
}
|
|
398
414
|
trackCommand(command, args = [], flags = {}) {
|
|
399
415
|
if (this.disabled || !this.client) return;
|
|
@@ -415,7 +431,11 @@ class Telemetry {
|
|
|
415
431
|
});
|
|
416
432
|
}
|
|
417
433
|
setLogLevel(level) {
|
|
418
|
-
if (this.client && 'debug' === level)
|
|
434
|
+
if (this.client && 'debug' === level) {
|
|
435
|
+
this.debug = true;
|
|
436
|
+
this.client.debug(true);
|
|
437
|
+
this.logDebug('Telemetry debug mode enabled');
|
|
438
|
+
}
|
|
419
439
|
}
|
|
420
440
|
disable() {
|
|
421
441
|
this.disabled = true;
|
|
@@ -433,22 +453,53 @@ class Telemetry {
|
|
|
433
453
|
this.client = null;
|
|
434
454
|
}
|
|
435
455
|
}
|
|
456
|
+
setLogger(logger) {
|
|
457
|
+
this.logger = logger;
|
|
458
|
+
}
|
|
459
|
+
logDebug(message, ...args) {
|
|
460
|
+
if (this.logger) this.logger.debug(message, ...args);
|
|
461
|
+
else console.debug(message, ...args);
|
|
462
|
+
}
|
|
436
463
|
initClient(customClient) {
|
|
437
|
-
if (customClient)
|
|
438
|
-
|
|
464
|
+
if (customClient) {
|
|
465
|
+
this.client = customClient;
|
|
466
|
+
if (this.debug) this.logDebug('Using custom PostHog client');
|
|
467
|
+
} else {
|
|
439
468
|
if (!this.apiKey || '' === this.apiKey.trim()) {
|
|
440
469
|
this.disabled = true;
|
|
441
|
-
|
|
470
|
+
this.logDebug('Telemetry disabled: No API key provided');
|
|
442
471
|
return;
|
|
443
472
|
}
|
|
473
|
+
const startTime = Date.now();
|
|
444
474
|
try {
|
|
445
|
-
|
|
475
|
+
const clientConfig = {
|
|
446
476
|
host: 'https://eu.i.posthog.com',
|
|
447
|
-
flushInterval: 0
|
|
448
|
-
|
|
477
|
+
flushInterval: 0,
|
|
478
|
+
flushAt: 1,
|
|
479
|
+
requestTimeout: 3000
|
|
480
|
+
};
|
|
481
|
+
if (this.debug) this.logDebug('Initializing PostHog client with config:', JSON.stringify(clientConfig));
|
|
482
|
+
this.client = new __WEBPACK_EXTERNAL_MODULE_posthog_node_1b07bdf4__.PostHog(this.apiKey, clientConfig);
|
|
483
|
+
const initTime = Date.now() - startTime;
|
|
484
|
+
if (this.debug) this.logDebug('PostHog client initialized in', initTime, 'ms');
|
|
449
485
|
} catch (error) {
|
|
450
486
|
this.disabled = true;
|
|
451
|
-
|
|
487
|
+
const errorDetails = error instanceof Error ? {
|
|
488
|
+
message: error.message,
|
|
489
|
+
name: error.name,
|
|
490
|
+
stack: error.stack
|
|
491
|
+
} : {
|
|
492
|
+
rawError: String(error)
|
|
493
|
+
};
|
|
494
|
+
if (this.debug) this.logDebug('Telemetry disabled due to initialization error:', JSON.stringify(errorDetails, null, 2));
|
|
495
|
+
try {
|
|
496
|
+
if (this.debug) this.logDebug('Attempting fallback PostHog initialization');
|
|
497
|
+
this.client = new __WEBPACK_EXTERNAL_MODULE_posthog_node_1b07bdf4__.PostHog(this.apiKey);
|
|
498
|
+
this.disabled = false;
|
|
499
|
+
if (this.debug) this.logDebug('PostHog client initialized using fallback method');
|
|
500
|
+
} catch (fallbackError) {
|
|
501
|
+
this.logDebug('Fallback initialization also failed:', fallbackError instanceof Error ? fallbackError.message : String(fallbackError));
|
|
502
|
+
}
|
|
452
503
|
}
|
|
453
504
|
}
|
|
454
505
|
}
|
|
@@ -456,6 +507,15 @@ class Telemetry {
|
|
|
456
507
|
const machineId = __WEBPACK_EXTERNAL_MODULE_node_crypto_9ba42079__["default"].createHash('sha256').update(__WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__["default"].hostname() + __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__["default"].platform() + __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__["default"].arch() + __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__["default"].totalmem()).digest('hex');
|
|
457
508
|
return machineId;
|
|
458
509
|
}
|
|
510
|
+
flushSync() {
|
|
511
|
+
if (this.disabled || !this.client) return;
|
|
512
|
+
try {
|
|
513
|
+
this.client.flush();
|
|
514
|
+
if (this.debug) this.logDebug('Manually flushed telemetry events');
|
|
515
|
+
} catch (error) {
|
|
516
|
+
if (this.debug) this.logDebug(`Error flushing telemetry: ${error}`);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
459
519
|
}
|
|
460
520
|
function createTelemetry(options) {
|
|
461
521
|
return new Telemetry(options);
|
|
@@ -936,6 +996,7 @@ async function startOnboarding(context, existingConfig) {
|
|
|
936
996
|
telemetry.trackEvent(isUpdate ? telemetry_TelemetryEventName.CONFIG_UPDATED : telemetry_TelemetryEventName.ONBOARDING_STARTED, {
|
|
937
997
|
isUpdate
|
|
938
998
|
});
|
|
999
|
+
telemetry.flushSync();
|
|
939
1000
|
logger.note(isUpdate ? "Let's update your c15t configuration." : `Welcome to c15t! Let's set up your consent management configuration.\nFirst, we'll help you choose the best storage approach for your needs.`, isUpdate ? 'Update Configuration' : 'First time setup');
|
|
940
1001
|
const projectRoot = await detectProjectRoot(cwd);
|
|
941
1002
|
if (projectRoot !== cwd) logger.debug(`Project root identified: ${projectRoot}`);
|
|
@@ -1798,7 +1859,8 @@ function createCliContext(rawArgs, cwd, commands) {
|
|
|
1798
1859
|
disabled: telemetryDisabled,
|
|
1799
1860
|
defaultProperties: {
|
|
1800
1861
|
cliVersion: context.fs.getPackageInfo().version
|
|
1801
|
-
}
|
|
1862
|
+
},
|
|
1863
|
+
logger: context.logger
|
|
1802
1864
|
});
|
|
1803
1865
|
context.telemetry.setLogLevel(desiredLogLevel);
|
|
1804
1866
|
if (telemetryDisabled) logger.debug('Telemetry is disabled by user preference');
|
|
@@ -1852,17 +1914,27 @@ async function main() {
|
|
|
1852
1914
|
const { logger, flags, commandName, commandArgs, error, telemetry } = context;
|
|
1853
1915
|
const packageInfo = context.fs.getPackageInfo();
|
|
1854
1916
|
const version = packageInfo.version;
|
|
1855
|
-
telemetry.
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1917
|
+
if (!telemetry.isDisabled()) logger.note(`c15t collects anonymous usage data to help improve the CLI.
|
|
1918
|
+
This data is not personally identifiable and helps us prioritize features.
|
|
1919
|
+
To disable telemetry, use the ${__WEBPACK_EXTERNAL_MODULE_picocolors__["default"].cyan('--no-telemetry')}
|
|
1920
|
+
flag or set ${__WEBPACK_EXTERNAL_MODULE_picocolors__["default"].cyan('C15T_TELEMETRY_DISABLED=1')} in your environment.`, `${formatLogMessage('info', 'Telemetry Notice')}`);
|
|
1921
|
+
try {
|
|
1922
|
+
telemetry.trackEvent(telemetry_TelemetryEventName.CLI_INVOKED, {
|
|
1923
|
+
version,
|
|
1924
|
+
nodeVersion: process.version,
|
|
1925
|
+
platform: process.platform
|
|
1926
|
+
});
|
|
1927
|
+
telemetry.flushSync();
|
|
1928
|
+
} catch (error) {
|
|
1929
|
+
logger.debug('Failed to track CLI invocation:', error);
|
|
1930
|
+
}
|
|
1860
1931
|
if (flags.version) {
|
|
1861
1932
|
logger.debug('Version flag detected');
|
|
1862
1933
|
logger.message(`c15t CLI version ${version}`);
|
|
1863
1934
|
telemetry.trackEvent(telemetry_TelemetryEventName.VERSION_DISPLAYED, {
|
|
1864
1935
|
version
|
|
1865
1936
|
});
|
|
1937
|
+
telemetry.flushSync();
|
|
1866
1938
|
await telemetry.shutdown();
|
|
1867
1939
|
process.exit(0);
|
|
1868
1940
|
}
|
|
@@ -1871,6 +1943,7 @@ async function main() {
|
|
|
1871
1943
|
telemetry.trackEvent(telemetry_TelemetryEventName.HELP_DISPLAYED, {
|
|
1872
1944
|
version
|
|
1873
1945
|
});
|
|
1946
|
+
telemetry.flushSync();
|
|
1874
1947
|
showHelpMenu(context, version, src_commands, globalFlags);
|
|
1875
1948
|
await telemetry.shutdown();
|
|
1876
1949
|
process.exit(0);
|
|
@@ -1921,11 +1994,13 @@ async function main() {
|
|
|
1921
1994
|
command: command.name,
|
|
1922
1995
|
executionTime: Date.now() - performance.now()
|
|
1923
1996
|
});
|
|
1997
|
+
telemetry.flushSync();
|
|
1924
1998
|
} else {
|
|
1925
1999
|
logger.error(`Unknown command: ${commandName}`);
|
|
1926
2000
|
telemetry.trackEvent(telemetry_TelemetryEventName.COMMAND_UNKNOWN, {
|
|
1927
2001
|
unknownCommand: commandName
|
|
1928
2002
|
});
|
|
2003
|
+
telemetry.flushSync();
|
|
1929
2004
|
logger.info('Run c15t --help to see available commands.');
|
|
1930
2005
|
await telemetry.shutdown();
|
|
1931
2006
|
process.exit(1);
|
|
@@ -1963,10 +2038,12 @@ async function main() {
|
|
|
1963
2038
|
command: selectedCommand.name,
|
|
1964
2039
|
executionTime: Date.now() - performance.now()
|
|
1965
2040
|
});
|
|
2041
|
+
telemetry.flushSync();
|
|
1966
2042
|
} else {
|
|
1967
2043
|
telemetry.trackEvent(telemetry_TelemetryEventName.COMMAND_UNKNOWN, {
|
|
1968
2044
|
unknownCommand: String(selectedCommandName)
|
|
1969
2045
|
});
|
|
2046
|
+
telemetry.flushSync();
|
|
1970
2047
|
error.handleError(new Error(`Command '${selectedCommandName}' not found`), 'An internal error occurred');
|
|
1971
2048
|
}
|
|
1972
2049
|
}
|
|
@@ -1975,11 +2052,13 @@ async function main() {
|
|
|
1975
2052
|
telemetry.trackEvent(telemetry_TelemetryEventName.CLI_COMPLETED, {
|
|
1976
2053
|
success: true
|
|
1977
2054
|
});
|
|
2055
|
+
telemetry.flushSync();
|
|
1978
2056
|
} catch (executionError) {
|
|
1979
2057
|
telemetry.trackEvent(telemetry_TelemetryEventName.COMMAND_FAILED, {
|
|
1980
2058
|
command: commandName,
|
|
1981
2059
|
error: executionError instanceof Error ? executionError.message : String(executionError)
|
|
1982
2060
|
});
|
|
2061
|
+
telemetry.flushSync();
|
|
1983
2062
|
error.handleError(executionError, 'An unexpected error occurred during command execution');
|
|
1984
2063
|
}
|
|
1985
2064
|
await telemetry.shutdown();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/onboarding/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AASzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoBnD;;;;;GAKG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,UAAU,EACnB,cAAc,CAAC,EAAE,WAAW,GAAG,qBAAqB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/onboarding/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AASzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoBnD;;;;;GAKG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,UAAU,EACnB,cAAc,CAAC,EAAE,WAAW,GAAG,qBAAqB,GAAG,IAAI,sBAsc3D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Logger } from '@c15t/backend/pkgs/logger';
|
|
1
2
|
import { PostHog } from 'posthog-node';
|
|
2
3
|
import type { LogLevel } from './logger';
|
|
3
4
|
export declare enum TelemetryEventName {
|
|
@@ -50,6 +51,10 @@ export interface TelemetryOptions {
|
|
|
50
51
|
* Default properties to add to all telemetry events
|
|
51
52
|
*/
|
|
52
53
|
defaultProperties?: Record<string, string | number | boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Logger instance to use for logging telemetry events
|
|
56
|
+
*/
|
|
57
|
+
logger?: Logger;
|
|
53
58
|
}
|
|
54
59
|
/**
|
|
55
60
|
* Manages telemetry for the CLI
|
|
@@ -63,6 +68,8 @@ export declare class Telemetry {
|
|
|
63
68
|
private defaultProperties;
|
|
64
69
|
private distinctId;
|
|
65
70
|
private apiKey;
|
|
71
|
+
private debug;
|
|
72
|
+
private logger;
|
|
66
73
|
/**
|
|
67
74
|
* Creates a new telemetry instance
|
|
68
75
|
*
|
|
@@ -70,12 +77,19 @@ export declare class Telemetry {
|
|
|
70
77
|
*/
|
|
71
78
|
constructor(options?: TelemetryOptions);
|
|
72
79
|
/**
|
|
73
|
-
* Track a
|
|
80
|
+
* Track a telemetry event synchronously
|
|
81
|
+
*
|
|
82
|
+
* This method ensures the event is sent before returning
|
|
74
83
|
*
|
|
75
84
|
* @param eventName - The event name to track
|
|
76
|
-
* @param
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
* @param properties - Properties to include with the event
|
|
86
|
+
*/
|
|
87
|
+
trackEventSync(eventName: TelemetryEventName, properties?: Record<string, string | number | boolean | undefined>): void;
|
|
88
|
+
/**
|
|
89
|
+
* Track a telemetry event
|
|
90
|
+
*
|
|
91
|
+
* @param eventName - The event name to track
|
|
92
|
+
* @param properties - Properties to include with the event
|
|
79
93
|
*/
|
|
80
94
|
trackEvent(eventName: TelemetryEventName, properties?: Record<string, string | number | boolean | undefined>): void;
|
|
81
95
|
/**
|
|
@@ -117,6 +131,19 @@ export declare class Telemetry {
|
|
|
117
131
|
* Shutdown telemetry client
|
|
118
132
|
*/
|
|
119
133
|
shutdown(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Set the logger instance to use for logging
|
|
136
|
+
*
|
|
137
|
+
* @param logger - The logger instance to use
|
|
138
|
+
*/
|
|
139
|
+
setLogger(logger: Logger): void;
|
|
140
|
+
/**
|
|
141
|
+
* Log a debug message using the configured logger or console.debug as fallback
|
|
142
|
+
*
|
|
143
|
+
* @param message - The message to log
|
|
144
|
+
* @param args - Additional arguments to log
|
|
145
|
+
*/
|
|
146
|
+
private logDebug;
|
|
120
147
|
/**
|
|
121
148
|
* Initialize the PostHog client
|
|
122
149
|
*
|
|
@@ -129,6 +156,12 @@ export declare class Telemetry {
|
|
|
129
156
|
* @returns A hash that uniquely identifies the machine without PII
|
|
130
157
|
*/
|
|
131
158
|
private generateAnonymousId;
|
|
159
|
+
/**
|
|
160
|
+
* Force immediate flushing of any pending telemetry events
|
|
161
|
+
*
|
|
162
|
+
* This is useful when you need to ensure events are sent before process exit
|
|
163
|
+
*/
|
|
164
|
+
flushSync(): void;
|
|
132
165
|
}
|
|
133
166
|
/**
|
|
134
167
|
* Creates a telemetry instance with sensible defaults
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/utils/telemetry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAMzC,oBAAY,kBAAkB;IAE7B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,wBAAwB,6BAA6B;IAGrD,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAGnC,uBAAuB,mBAAmB;IAC1C,uBAAuB,mBAAmB;IAG1C,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IAGjC,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IAGvC,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,gCAAgC,qCAAqC;IACrE,+BAA+B,oCAAoC;IACnE,kCAAkC,uCAAuC;IACzE,iCAAiC,sCAAsC;IACvE,iCAAiC,sCAAsC;IACvE,8BAA8B,mCAAmC;IACjE,iCAAiC,sCAAsC;IACvE,sBAAsB,2BAA2B;IAGjD,cAAc,mBAAmB;IAGjC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IAGrC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,eAAe,oBAAoB;C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AAE,MAAM,GAAG,IAAI;IAahD;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAQlC;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,MAAM,IAAI,IAAI;IAOd;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAO/B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAQhB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAyElB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;;OAIG;IACH,SAAS,IAAI,IAAI;CAgBjB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAErE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "The CLI for c15t",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"posthog-node": "^4.11.7",
|
|
29
29
|
"zod": "^3.24.2",
|
|
30
30
|
"@c15t/backend": "1.0.0",
|
|
31
|
-
"@c15t/react": "1.0.
|
|
31
|
+
"@c15t/react": "1.0.5"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/figlet": "^1.7.0",
|