@alagoni97/cli 0.72.1
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/LICENSE +201 -0
- package/README.md +336 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.mjs +3 -0
- package/bin/run.cmd +3 -0
- package/bin/run.mjs +4 -0
- package/dist/LoggingInterface.d.ts +123 -0
- package/dist/LoggingInterface.js +300 -0
- package/dist/PersistedConfig.d.ts +46 -0
- package/dist/PersistedConfig.js +94 -0
- package/dist/browser/adapters/output.d.ts +69 -0
- package/dist/browser/adapters/output.js +91 -0
- package/dist/browser/config.d.ts +18 -0
- package/dist/browser/config.js +59 -0
- package/dist/browser/generate.d.ts +20 -0
- package/dist/browser/generate.js +129 -0
- package/dist/browser/index.d.ts +17 -0
- package/dist/browser/index.js +26 -0
- package/dist/browser/parser.d.ts +9 -0
- package/dist/browser/parser.js +61 -0
- package/dist/browser/shims/asyncapi-parser.d.ts +30 -0
- package/dist/browser/shims/asyncapi-parser.js +52 -0
- package/dist/browser/shims/fs.d.ts +190 -0
- package/dist/browser/shims/fs.js +188 -0
- package/dist/browser/shims/json-schema-ref-parser.d.ts +73 -0
- package/dist/browser/shims/json-schema-ref-parser.js +246 -0
- package/dist/browser/shims/swagger-parser.d.ts +20 -0
- package/dist/browser/shims/swagger-parser.js +40 -0
- package/dist/codegen/configurationSchemaBuilder.d.ts +15 -0
- package/dist/codegen/configurationSchemaBuilder.js +48 -0
- package/dist/codegen/configurations.d.ts +29 -0
- package/dist/codegen/configurations.js +260 -0
- package/dist/codegen/detection.d.ts +19 -0
- package/dist/codegen/detection.js +174 -0
- package/dist/codegen/errors.d.ts +111 -0
- package/dist/codegen/errors.js +352 -0
- package/dist/codegen/generators/generic/custom.d.ts +75 -0
- package/dist/codegen/generators/generic/custom.js +66 -0
- package/dist/codegen/generators/index.d.ts +14 -0
- package/dist/codegen/generators/index.js +42 -0
- package/dist/codegen/generators/typescript/channels/asyncapi.d.ts +10 -0
- package/dist/codegen/generators/typescript/channels/asyncapi.js +131 -0
- package/dist/codegen/generators/typescript/channels/index.d.ts +8 -0
- package/dist/codegen/generators/typescript/channels/index.js +142 -0
- package/dist/codegen/generators/typescript/channels/openapi.d.ts +9 -0
- package/dist/codegen/generators/typescript/channels/openapi.js +168 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/index.d.ts +7 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/index.js +149 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/publishExchange.d.ts +5 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/publishExchange.js +106 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/publishQueue.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/publishQueue.js +102 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/subscribeQueue.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/amqp/subscribeQueue.js +133 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/express.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/express.js +100 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/fetch.d.ts +5 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/fetch.js +144 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/index.d.ts +6 -0
- package/dist/codegen/generators/typescript/channels/protocols/eventsource/index.js +132 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/client.d.ts +10 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/client.js +224 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/common-types.d.ts +14 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/common-types.js +800 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/index.d.ts +8 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/index.js +96 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/security.d.ts +48 -0
- package/dist/codegen/generators/typescript/channels/protocols/http/security.js +491 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/index.d.ts +6 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/index.js +127 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/publish.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/publish.js +108 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/subscribe.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/subscribe.js +154 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/utils.d.ts +11 -0
- package/dist/codegen/generators/typescript/channels/protocols/kafka/utils.js +58 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/index.d.ts +6 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/index.js +113 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/publish.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/publish.js +99 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/subscribe.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/mqtt/subscribe.js +186 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/corePublish.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/corePublish.js +90 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreReply.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreReply.js +142 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreRequest.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreRequest.js +100 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreSubscribe.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/coreSubscribe.js +143 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/index.d.ts +11 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/index.js +224 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPublish.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPublish.js +89 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPullSubscribe.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPullSubscribe.js +146 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPushSubscription.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/jetstreamPushSubscription.js +149 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/utils.d.ts +35 -0
- package/dist/codegen/generators/typescript/channels/protocols/nats/utils.js +120 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/index.d.ts +7 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/index.js +152 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/publish.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/publish.js +64 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/register.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/register.js +115 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/subscribe.d.ts +3 -0
- package/dist/codegen/generators/typescript/channels/protocols/websocket/subscribe.js +151 -0
- package/dist/codegen/generators/typescript/channels/types.d.ts +181 -0
- package/dist/codegen/generators/typescript/channels/types.js +131 -0
- package/dist/codegen/generators/typescript/channels/utils.d.ts +64 -0
- package/dist/codegen/generators/typescript/channels/utils.js +163 -0
- package/dist/codegen/generators/typescript/client/index.d.ts +8 -0
- package/dist/codegen/generators/typescript/client/index.js +61 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/corePublish.d.ts +6 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/corePublish.js +53 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/coreSubscribe.d.ts +6 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/coreSubscribe.js +90 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetStreamPullSubscription.d.ts +6 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetStreamPullSubscription.js +83 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetstreamPublish.d.ts +6 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetstreamPublish.js +54 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetstreamPushSubscription.d.ts +6 -0
- package/dist/codegen/generators/typescript/client/protocols/nats/jetstreamPushSubscription.js +82 -0
- package/dist/codegen/generators/typescript/client/protocols/nats.d.ts +2 -0
- package/dist/codegen/generators/typescript/client/protocols/nats.js +182 -0
- package/dist/codegen/generators/typescript/client/types.d.ts +49 -0
- package/dist/codegen/generators/typescript/client/types.js +37 -0
- package/dist/codegen/generators/typescript/headers.d.ts +54 -0
- package/dist/codegen/generators/typescript/headers.js +138 -0
- package/dist/codegen/generators/typescript/index.d.ts +7 -0
- package/dist/codegen/generators/typescript/index.js +38 -0
- package/dist/codegen/generators/typescript/models.d.ts +21761 -0
- package/dist/codegen/generators/typescript/models.js +64 -0
- package/dist/codegen/generators/typescript/parameters.d.ts +37 -0
- package/dist/codegen/generators/typescript/parameters.js +101 -0
- package/dist/codegen/generators/typescript/payloads.d.ts +73 -0
- package/dist/codegen/generators/typescript/payloads.js +250 -0
- package/dist/codegen/generators/typescript/types.d.ts +34 -0
- package/dist/codegen/generators/typescript/types.js +70 -0
- package/dist/codegen/generators/typescript/utils.d.ts +38 -0
- package/dist/codegen/generators/typescript/utils.js +195 -0
- package/dist/codegen/index.d.ts +7 -0
- package/dist/codegen/index.js +38 -0
- package/dist/codegen/inputs/asyncapi/generators/headers.d.ts +3 -0
- package/dist/codegen/inputs/asyncapi/generators/headers.js +41 -0
- package/dist/codegen/inputs/asyncapi/generators/parameters.d.ts +14 -0
- package/dist/codegen/inputs/asyncapi/generators/parameters.js +120 -0
- package/dist/codegen/inputs/asyncapi/generators/payloads.d.ts +16 -0
- package/dist/codegen/inputs/asyncapi/generators/payloads.js +124 -0
- package/dist/codegen/inputs/asyncapi/generators/types.d.ts +9 -0
- package/dist/codegen/inputs/asyncapi/generators/types.js +61 -0
- package/dist/codegen/inputs/asyncapi/index.d.ts +1 -0
- package/dist/codegen/inputs/asyncapi/index.js +7 -0
- package/dist/codegen/inputs/asyncapi/parser.d.ts +4 -0
- package/dist/codegen/inputs/asyncapi/parser.js +90 -0
- package/dist/codegen/inputs/index.d.ts +3 -0
- package/dist/codegen/inputs/index.js +19 -0
- package/dist/codegen/inputs/jsonschema/generators/index.d.ts +1 -0
- package/dist/codegen/inputs/jsonschema/generators/index.js +5 -0
- package/dist/codegen/inputs/jsonschema/generators/models.d.ts +7 -0
- package/dist/codegen/inputs/jsonschema/generators/models.js +26 -0
- package/dist/codegen/inputs/jsonschema/index.d.ts +1 -0
- package/dist/codegen/inputs/jsonschema/index.js +7 -0
- package/dist/codegen/inputs/jsonschema/parser.d.ts +31 -0
- package/dist/codegen/inputs/jsonschema/parser.js +128 -0
- package/dist/codegen/inputs/openapi/generators/headers.d.ts +3 -0
- package/dist/codegen/inputs/openapi/generators/headers.js +101 -0
- package/dist/codegen/inputs/openapi/generators/parameters.d.ts +10 -0
- package/dist/codegen/inputs/openapi/generators/parameters.js +852 -0
- package/dist/codegen/inputs/openapi/generators/payloads.d.ts +3 -0
- package/dist/codegen/inputs/openapi/generators/payloads.js +231 -0
- package/dist/codegen/inputs/openapi/generators/types.d.ts +9 -0
- package/dist/codegen/inputs/openapi/generators/types.js +86 -0
- package/dist/codegen/inputs/openapi/index.d.ts +2 -0
- package/dist/codegen/inputs/openapi/index.js +8 -0
- package/dist/codegen/inputs/openapi/parser.d.ts +4 -0
- package/dist/codegen/inputs/openapi/parser.js +115 -0
- package/dist/codegen/inputs/openapi/security.d.ts +56 -0
- package/dist/codegen/inputs/openapi/security.js +193 -0
- package/dist/codegen/modelina/index.d.ts +2 -0
- package/dist/codegen/modelina/index.js +20 -0
- package/dist/codegen/modelina/presets/index.d.ts +3 -0
- package/dist/codegen/modelina/presets/index.js +14 -0
- package/dist/codegen/modelina/presets/primitives.d.ts +34 -0
- package/dist/codegen/modelina/presets/primitives.js +211 -0
- package/dist/codegen/modelina/presets/union.d.ts +33 -0
- package/dist/codegen/modelina/presets/union.js +197 -0
- package/dist/codegen/modelina/presets/validation.d.ts +66 -0
- package/dist/codegen/modelina/presets/validation.js +183 -0
- package/dist/codegen/modelina/types.d.ts +61845 -0
- package/dist/codegen/modelina/types.js +412 -0
- package/dist/codegen/output/filesystem.d.ts +30 -0
- package/dist/codegen/output/filesystem.js +61 -0
- package/dist/codegen/output/index.d.ts +16 -0
- package/dist/codegen/output/index.js +57 -0
- package/dist/codegen/output/memory.d.ts +54 -0
- package/dist/codegen/output/memory.js +81 -0
- package/dist/codegen/output/modelina.d.ts +30 -0
- package/dist/codegen/output/modelina.js +30 -0
- package/dist/codegen/output/types.d.ts +47 -0
- package/dist/codegen/output/types.js +6 -0
- package/dist/codegen/renderer.d.ts +13 -0
- package/dist/codegen/renderer.js +309 -0
- package/dist/codegen/schemaPostProcess.d.ts +25 -0
- package/dist/codegen/schemaPostProcess.js +38 -0
- package/dist/codegen/types.d.ts +285187 -0
- package/dist/codegen/types.js +177 -0
- package/dist/codegen/utils.d.ts +126 -0
- package/dist/codegen/utils.js +373 -0
- package/dist/commands/base.d.ts +18 -0
- package/dist/commands/base.js +59 -0
- package/dist/commands/generate.d.ts +46 -0
- package/dist/commands/generate.js +305 -0
- package/dist/commands/init.d.ts +55 -0
- package/dist/commands/init.js +544 -0
- package/dist/commands/telemetry.d.ts +25 -0
- package/dist/commands/telemetry.js +115 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +35 -0
- package/dist/telemetry/anonymize.d.ts +19 -0
- package/dist/telemetry/anonymize.js +73 -0
- package/dist/telemetry/collector.d.ts +26 -0
- package/dist/telemetry/collector.js +57 -0
- package/dist/telemetry/config.d.ts +32 -0
- package/dist/telemetry/config.js +97 -0
- package/dist/telemetry/events.d.ts +72 -0
- package/dist/telemetry/events.js +5 -0
- package/dist/telemetry/index.d.ts +46 -0
- package/dist/telemetry/index.js +91 -0
- package/dist/telemetry/notice.d.ts +8 -0
- package/dist/telemetry/notice.js +50 -0
- package/dist/telemetry/sender.d.ts +14 -0
- package/dist/telemetry/sender.js +125 -0
- package/dist/utils/gitignore.d.ts +66 -0
- package/dist/utils/gitignore.js +111 -0
- package/dist/utils/inputSource.d.ts +3 -0
- package/dist/utils/inputSource.js +26 -0
- package/dist/utils/refResolvers.d.ts +29 -0
- package/dist/utils/refResolvers.js +83 -0
- package/dist/utils/remoteFetch.d.ts +18 -0
- package/dist/utils/remoteFetch.js +64 -0
- package/oclif.manifest.json +510 -0
- package/package.json +155 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'verbose' | 'debug';
|
|
2
|
+
/**
|
|
3
|
+
* Logging interface for the model generation library
|
|
4
|
+
*/
|
|
5
|
+
export interface LoggingInterface {
|
|
6
|
+
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
7
|
+
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
8
|
+
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
9
|
+
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Extended logging interface with additional capabilities
|
|
13
|
+
*/
|
|
14
|
+
export interface ExtendedLoggingInterface extends LoggingInterface {
|
|
15
|
+
verbose(message?: unknown, ...optionalParams: unknown[]): void;
|
|
16
|
+
startSpinner(text: string): void;
|
|
17
|
+
updateSpinner(text: string): void;
|
|
18
|
+
succeedSpinner(text?: string): void;
|
|
19
|
+
failSpinner(text?: string): void;
|
|
20
|
+
stopSpinner(): void;
|
|
21
|
+
json(data: unknown): void;
|
|
22
|
+
setLevel(level: LogLevel): void;
|
|
23
|
+
setJsonMode(enabled: boolean): void;
|
|
24
|
+
setColors(enabled: boolean): void;
|
|
25
|
+
getLevel(): LogLevel;
|
|
26
|
+
isJsonMode(): boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Logger class with enhanced capabilities
|
|
30
|
+
*
|
|
31
|
+
* Supports log levels, colors, spinners, and JSON output mode.
|
|
32
|
+
* Acts as a forefront for any external loggers.
|
|
33
|
+
*/
|
|
34
|
+
export declare class LoggerClass implements ExtendedLoggingInterface {
|
|
35
|
+
private logger?;
|
|
36
|
+
private level;
|
|
37
|
+
private jsonMode;
|
|
38
|
+
private colorsEnabled;
|
|
39
|
+
private spinner;
|
|
40
|
+
/**
|
|
41
|
+
* Check if a message at the given level should be logged
|
|
42
|
+
*/
|
|
43
|
+
private shouldLog;
|
|
44
|
+
/**
|
|
45
|
+
* Format a message with optional color
|
|
46
|
+
*/
|
|
47
|
+
private formatMessage;
|
|
48
|
+
/**
|
|
49
|
+
* Stop spinner before logging to prevent output overlap
|
|
50
|
+
*/
|
|
51
|
+
private pauseSpinner;
|
|
52
|
+
/**
|
|
53
|
+
* Resume spinner after logging
|
|
54
|
+
*/
|
|
55
|
+
private resumeSpinner;
|
|
56
|
+
/**
|
|
57
|
+
* Render the spinner
|
|
58
|
+
*/
|
|
59
|
+
private renderSpinner;
|
|
60
|
+
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
61
|
+
verbose(message?: unknown, ...optionalParams: unknown[]): void;
|
|
62
|
+
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
63
|
+
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
64
|
+
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
65
|
+
/**
|
|
66
|
+
* Start a spinner with the given text
|
|
67
|
+
*/
|
|
68
|
+
startSpinner(text: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Update the spinner text
|
|
71
|
+
*/
|
|
72
|
+
updateSpinner(text: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Stop the spinner with a success message
|
|
75
|
+
*/
|
|
76
|
+
succeedSpinner(text?: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Stop the spinner with a failure message
|
|
79
|
+
*/
|
|
80
|
+
failSpinner(text?: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Stop the spinner without a message
|
|
83
|
+
*/
|
|
84
|
+
stopSpinner(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Output structured JSON data
|
|
87
|
+
* Only outputs in JSON mode or when explicitly called
|
|
88
|
+
*/
|
|
89
|
+
json(data: unknown): void;
|
|
90
|
+
/**
|
|
91
|
+
* Set the log level
|
|
92
|
+
*/
|
|
93
|
+
setLevel(level: LogLevel): void;
|
|
94
|
+
/**
|
|
95
|
+
* Enable or disable JSON mode
|
|
96
|
+
* In JSON mode, only json() output is shown
|
|
97
|
+
*/
|
|
98
|
+
setJsonMode(enabled: boolean): void;
|
|
99
|
+
/**
|
|
100
|
+
* Enable or disable colored output
|
|
101
|
+
*/
|
|
102
|
+
setColors(enabled: boolean): void;
|
|
103
|
+
/**
|
|
104
|
+
* Get the current log level
|
|
105
|
+
*/
|
|
106
|
+
getLevel(): LogLevel;
|
|
107
|
+
/**
|
|
108
|
+
* Check if JSON mode is enabled
|
|
109
|
+
*/
|
|
110
|
+
isJsonMode(): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Sets the logger to use for the model generation library
|
|
113
|
+
*
|
|
114
|
+
* @param logger to add
|
|
115
|
+
*/
|
|
116
|
+
setLogger(logger?: LoggingInterface): void;
|
|
117
|
+
/**
|
|
118
|
+
* Reset the logger to default state.
|
|
119
|
+
* Useful for testing or when re-initializing the logger.
|
|
120
|
+
*/
|
|
121
|
+
reset(): void;
|
|
122
|
+
}
|
|
123
|
+
export declare const Logger: LoggerClass;
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Logger = exports.LoggerClass = void 0;
|
|
7
|
+
/* eslint-disable no-undef, no-console, security/detect-object-injection */
|
|
8
|
+
/**
|
|
9
|
+
* Enhanced logging interface with levels, colors, and spinners
|
|
10
|
+
*/
|
|
11
|
+
const picocolors_1 = __importDefault(require("picocolors"));
|
|
12
|
+
const LOG_LEVEL_PRIORITY = {
|
|
13
|
+
silent: 0,
|
|
14
|
+
error: 1,
|
|
15
|
+
warn: 2,
|
|
16
|
+
info: 3,
|
|
17
|
+
verbose: 4,
|
|
18
|
+
debug: 5
|
|
19
|
+
};
|
|
20
|
+
// Simple spinner implementation using console
|
|
21
|
+
const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
22
|
+
/**
|
|
23
|
+
* Logger class with enhanced capabilities
|
|
24
|
+
*
|
|
25
|
+
* Supports log levels, colors, spinners, and JSON output mode.
|
|
26
|
+
* Acts as a forefront for any external loggers.
|
|
27
|
+
*/
|
|
28
|
+
class LoggerClass {
|
|
29
|
+
logger = undefined;
|
|
30
|
+
level = 'info';
|
|
31
|
+
jsonMode = false;
|
|
32
|
+
colorsEnabled = true;
|
|
33
|
+
spinner = null;
|
|
34
|
+
/**
|
|
35
|
+
* Check if a message at the given level should be logged
|
|
36
|
+
*/
|
|
37
|
+
shouldLog(messageLevel) {
|
|
38
|
+
return (LOG_LEVEL_PRIORITY[messageLevel] <= LOG_LEVEL_PRIORITY[this.level] &&
|
|
39
|
+
!this.jsonMode);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Format a message with optional color
|
|
43
|
+
*/
|
|
44
|
+
formatMessage(message, colorFn) {
|
|
45
|
+
const msg = String(message);
|
|
46
|
+
if (this.colorsEnabled && colorFn) {
|
|
47
|
+
return colorFn(msg);
|
|
48
|
+
}
|
|
49
|
+
return msg;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Stop spinner before logging to prevent output overlap
|
|
53
|
+
*/
|
|
54
|
+
pauseSpinner() {
|
|
55
|
+
if (this.spinner?.interval) {
|
|
56
|
+
clearInterval(this.spinner.interval);
|
|
57
|
+
this.spinner.interval = null;
|
|
58
|
+
// Clear the current line
|
|
59
|
+
if (process.stdout.isTTY) {
|
|
60
|
+
process.stdout.clearLine(0);
|
|
61
|
+
process.stdout.cursorTo(0);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Resume spinner after logging
|
|
67
|
+
*/
|
|
68
|
+
resumeSpinner() {
|
|
69
|
+
if (this.spinner && !this.spinner.interval) {
|
|
70
|
+
this.renderSpinner();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Render the spinner
|
|
75
|
+
*/
|
|
76
|
+
renderSpinner() {
|
|
77
|
+
if (!this.spinner || !process.stdout.isTTY) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.spinner.interval = setInterval(() => {
|
|
81
|
+
if (!this.spinner) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const frame = this.colorsEnabled
|
|
85
|
+
? picocolors_1.default.cyan(SPINNER_FRAMES[this.spinner.frameIndex])
|
|
86
|
+
: SPINNER_FRAMES[this.spinner.frameIndex];
|
|
87
|
+
process.stdout.clearLine(0);
|
|
88
|
+
process.stdout.cursorTo(0);
|
|
89
|
+
process.stdout.write(`${frame} ${this.spinner.text}`);
|
|
90
|
+
this.spinner.frameIndex =
|
|
91
|
+
(this.spinner.frameIndex + 1) % SPINNER_FRAMES.length;
|
|
92
|
+
}, 80);
|
|
93
|
+
}
|
|
94
|
+
debug(message, ...optionalParams) {
|
|
95
|
+
if (!this.shouldLog('debug')) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.pauseSpinner();
|
|
99
|
+
const prefix = this.formatMessage('[DEBUG] ', picocolors_1.default.gray);
|
|
100
|
+
const formattedMessage = this.formatMessage(message, picocolors_1.default.gray);
|
|
101
|
+
if (this.logger) {
|
|
102
|
+
this.logger.debug(prefix + formattedMessage, ...optionalParams);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
console.debug(prefix + formattedMessage, ...optionalParams);
|
|
106
|
+
}
|
|
107
|
+
this.resumeSpinner();
|
|
108
|
+
}
|
|
109
|
+
verbose(message, ...optionalParams) {
|
|
110
|
+
if (!this.shouldLog('verbose')) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.pauseSpinner();
|
|
114
|
+
const formattedMessage = this.formatMessage(message, picocolors_1.default.dim);
|
|
115
|
+
if (this.logger) {
|
|
116
|
+
this.logger.info(formattedMessage, ...optionalParams);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
console.log(formattedMessage, ...optionalParams);
|
|
120
|
+
}
|
|
121
|
+
this.resumeSpinner();
|
|
122
|
+
}
|
|
123
|
+
info(message, ...optionalParams) {
|
|
124
|
+
if (!this.shouldLog('info')) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.pauseSpinner();
|
|
128
|
+
const msg = String(message);
|
|
129
|
+
if (this.logger) {
|
|
130
|
+
this.logger.info(msg, ...optionalParams);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// Use process.stdout.write for better capture by oclif test utilities
|
|
134
|
+
const fullMsg = optionalParams.length > 0
|
|
135
|
+
? `${msg} ${optionalParams.join(' ')}\n`
|
|
136
|
+
: `${msg}\n`;
|
|
137
|
+
process.stdout.write(fullMsg);
|
|
138
|
+
}
|
|
139
|
+
this.resumeSpinner();
|
|
140
|
+
}
|
|
141
|
+
warn(message, ...optionalParams) {
|
|
142
|
+
if (!this.shouldLog('warn')) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.pauseSpinner();
|
|
146
|
+
const formattedMessage = this.formatMessage(message, picocolors_1.default.yellow);
|
|
147
|
+
if (this.logger) {
|
|
148
|
+
this.logger.warn(formattedMessage, ...optionalParams);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
console.warn(formattedMessage, ...optionalParams);
|
|
152
|
+
}
|
|
153
|
+
this.resumeSpinner();
|
|
154
|
+
}
|
|
155
|
+
error(message, ...optionalParams) {
|
|
156
|
+
if (!this.shouldLog('error')) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.pauseSpinner();
|
|
160
|
+
const formattedMessage = this.formatMessage(message, picocolors_1.default.red);
|
|
161
|
+
if (this.logger) {
|
|
162
|
+
this.logger.error(formattedMessage, ...optionalParams);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
console.error(formattedMessage, ...optionalParams);
|
|
166
|
+
}
|
|
167
|
+
this.resumeSpinner();
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Start a spinner with the given text
|
|
171
|
+
*/
|
|
172
|
+
startSpinner(text) {
|
|
173
|
+
if (this.jsonMode) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.stopSpinner();
|
|
177
|
+
this.spinner = {
|
|
178
|
+
text,
|
|
179
|
+
interval: null,
|
|
180
|
+
frameIndex: 0
|
|
181
|
+
};
|
|
182
|
+
if (process.stdout.isTTY) {
|
|
183
|
+
this.renderSpinner();
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
// In non-TTY mode, just print the text
|
|
187
|
+
console.log(text);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Update the spinner text
|
|
192
|
+
*/
|
|
193
|
+
updateSpinner(text) {
|
|
194
|
+
if (this.spinner) {
|
|
195
|
+
this.spinner.text = text;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Stop the spinner with a success message
|
|
200
|
+
*/
|
|
201
|
+
succeedSpinner(text) {
|
|
202
|
+
const spinnerText = this.spinner?.text;
|
|
203
|
+
this.stopSpinner();
|
|
204
|
+
const displayText = text || spinnerText || '';
|
|
205
|
+
if (displayText && this.shouldLog('info')) {
|
|
206
|
+
const symbol = this.colorsEnabled ? picocolors_1.default.green('✓') : '[OK]';
|
|
207
|
+
console.log(`${symbol} ${displayText}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Stop the spinner with a failure message
|
|
212
|
+
*/
|
|
213
|
+
failSpinner(text) {
|
|
214
|
+
const spinnerText = this.spinner?.text;
|
|
215
|
+
this.stopSpinner();
|
|
216
|
+
const displayText = text || spinnerText || '';
|
|
217
|
+
if (displayText && this.shouldLog('error')) {
|
|
218
|
+
const symbol = this.colorsEnabled ? picocolors_1.default.red('✗') : '[FAIL]';
|
|
219
|
+
console.log(`${symbol} ${displayText}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Stop the spinner without a message
|
|
224
|
+
*/
|
|
225
|
+
stopSpinner() {
|
|
226
|
+
if (this.spinner) {
|
|
227
|
+
if (this.spinner.interval) {
|
|
228
|
+
clearInterval(this.spinner.interval);
|
|
229
|
+
}
|
|
230
|
+
if (process.stdout.isTTY) {
|
|
231
|
+
process.stdout.clearLine(0);
|
|
232
|
+
process.stdout.cursorTo(0);
|
|
233
|
+
}
|
|
234
|
+
this.spinner = null;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Output structured JSON data
|
|
239
|
+
* Only outputs in JSON mode or when explicitly called
|
|
240
|
+
*/
|
|
241
|
+
json(data) {
|
|
242
|
+
this.stopSpinner();
|
|
243
|
+
console.log(JSON.stringify(data, null, 2));
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Set the log level
|
|
247
|
+
*/
|
|
248
|
+
setLevel(level) {
|
|
249
|
+
this.level = level;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Enable or disable JSON mode
|
|
253
|
+
* In JSON mode, only json() output is shown
|
|
254
|
+
*/
|
|
255
|
+
setJsonMode(enabled) {
|
|
256
|
+
this.jsonMode = enabled;
|
|
257
|
+
if (enabled) {
|
|
258
|
+
this.stopSpinner();
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Enable or disable colored output
|
|
263
|
+
*/
|
|
264
|
+
setColors(enabled) {
|
|
265
|
+
this.colorsEnabled = enabled;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Get the current log level
|
|
269
|
+
*/
|
|
270
|
+
getLevel() {
|
|
271
|
+
return this.level;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Check if JSON mode is enabled
|
|
275
|
+
*/
|
|
276
|
+
isJsonMode() {
|
|
277
|
+
return this.jsonMode;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Sets the logger to use for the model generation library
|
|
281
|
+
*
|
|
282
|
+
* @param logger to add
|
|
283
|
+
*/
|
|
284
|
+
setLogger(logger) {
|
|
285
|
+
this.logger = logger;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Reset the logger to default state.
|
|
289
|
+
* Useful for testing or when re-initializing the logger.
|
|
290
|
+
*/
|
|
291
|
+
reset() {
|
|
292
|
+
this.stopSpinner();
|
|
293
|
+
this.level = 'info';
|
|
294
|
+
this.jsonMode = false;
|
|
295
|
+
this.colorsEnabled = true;
|
|
296
|
+
this.logger = undefined;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.LoggerClass = LoggerClass;
|
|
300
|
+
exports.Logger = new LoggerClass();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global configuration interface stored in ~/.the-codegen-project/config.json
|
|
3
|
+
* This configuration persists across all projects and CLI sessions.
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalConfig {
|
|
6
|
+
version: string;
|
|
7
|
+
telemetry: TelemetryConfig;
|
|
8
|
+
hasShownTelemetryNotice: boolean;
|
|
9
|
+
lastUpdated?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Telemetry configuration interface
|
|
13
|
+
*/
|
|
14
|
+
export interface TelemetryConfig {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
anonymousId: string;
|
|
17
|
+
endpoint: string;
|
|
18
|
+
trackingId: string;
|
|
19
|
+
apiSecret: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get global configuration.
|
|
23
|
+
* Creates default config if it doesn't exist.
|
|
24
|
+
* This function never throws - returns default config on any error.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getGlobalConfig(): Promise<GlobalConfig>;
|
|
27
|
+
/**
|
|
28
|
+
* Update global configuration.
|
|
29
|
+
* Creates config directory if it doesn't exist.
|
|
30
|
+
* This function never throws - fails silently on errors.
|
|
31
|
+
*/
|
|
32
|
+
export declare function updateGlobalConfig(config: GlobalConfig): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if the global config file exists.
|
|
35
|
+
*/
|
|
36
|
+
export declare function configFileExists(): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Get the path to the global config file.
|
|
39
|
+
* Useful for debugging and testing.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getConfigFilePath(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get the path to the config directory.
|
|
44
|
+
* Useful for debugging and testing.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getConfigDirectoryPath(): string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getConfigDirectoryPath = exports.getConfigFilePath = exports.configFileExists = exports.updateGlobalConfig = exports.getGlobalConfig = void 0;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
const CONFIG_DIR = path_1.default.join(os_1.default.homedir(), '.the-codegen-project');
|
|
12
|
+
const CONFIG_FILE = path_1.default.join(CONFIG_DIR, 'config.json');
|
|
13
|
+
/**
|
|
14
|
+
* Get global configuration.
|
|
15
|
+
* Creates default config if it doesn't exist.
|
|
16
|
+
* This function never throws - returns default config on any error.
|
|
17
|
+
*/
|
|
18
|
+
async function getGlobalConfig() {
|
|
19
|
+
try {
|
|
20
|
+
const data = await promises_1.default.readFile(CONFIG_FILE, 'utf-8');
|
|
21
|
+
return JSON.parse(data);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// Config doesn't exist or is invalid, create default
|
|
25
|
+
return await createDefaultGlobalConfig();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.getGlobalConfig = getGlobalConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Update global configuration.
|
|
31
|
+
* Creates config directory if it doesn't exist.
|
|
32
|
+
* This function never throws - fails silently on errors.
|
|
33
|
+
*/
|
|
34
|
+
async function updateGlobalConfig(config) {
|
|
35
|
+
try {
|
|
36
|
+
await promises_1.default.mkdir(CONFIG_DIR, { recursive: true });
|
|
37
|
+
config.lastUpdated = new Date().toISOString();
|
|
38
|
+
await promises_1.default.writeFile(CONFIG_FILE, JSON.stringify(config, null, 2));
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// Fail silently - config update is not critical
|
|
42
|
+
// Debug logging intentionally omitted to avoid dependencies
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.updateGlobalConfig = updateGlobalConfig;
|
|
46
|
+
/**
|
|
47
|
+
* Create default global configuration with telemetry enabled.
|
|
48
|
+
* Uses GA4 Measurement Protocol as the default endpoint.
|
|
49
|
+
*/
|
|
50
|
+
async function createDefaultGlobalConfig() {
|
|
51
|
+
const globalConfig = {
|
|
52
|
+
version: '1.0.0',
|
|
53
|
+
telemetry: {
|
|
54
|
+
enabled: true,
|
|
55
|
+
anonymousId: (0, uuid_1.v4)(),
|
|
56
|
+
endpoint: 'https://www.google-analytics.com/mp/collect',
|
|
57
|
+
trackingId: 'G-45KZ589PCT',
|
|
58
|
+
apiSecret: 'emUAvwyZRDqCKYbmvWUM9g' // NOTE: is OKAY to be committed as its a public API secret
|
|
59
|
+
},
|
|
60
|
+
hasShownTelemetryNotice: false,
|
|
61
|
+
lastUpdated: new Date().toISOString()
|
|
62
|
+
};
|
|
63
|
+
await updateGlobalConfig(globalConfig);
|
|
64
|
+
return globalConfig;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Check if the global config file exists.
|
|
68
|
+
*/
|
|
69
|
+
async function configFileExists() {
|
|
70
|
+
try {
|
|
71
|
+
await promises_1.default.access(CONFIG_FILE);
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.configFileExists = configFileExists;
|
|
79
|
+
/**
|
|
80
|
+
* Get the path to the global config file.
|
|
81
|
+
* Useful for debugging and testing.
|
|
82
|
+
*/
|
|
83
|
+
function getConfigFilePath() {
|
|
84
|
+
return CONFIG_FILE;
|
|
85
|
+
}
|
|
86
|
+
exports.getConfigFilePath = getConfigFilePath;
|
|
87
|
+
/**
|
|
88
|
+
* Get the path to the config directory.
|
|
89
|
+
* Useful for debugging and testing.
|
|
90
|
+
*/
|
|
91
|
+
function getConfigDirectoryPath() {
|
|
92
|
+
return CONFIG_DIR;
|
|
93
|
+
}
|
|
94
|
+
exports.getConfigDirectoryPath = getConfigDirectoryPath;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory file output adapter for browser environments.
|
|
3
|
+
* Replaces filesystem writes with Map<string, string> storage.
|
|
4
|
+
* Implements OutputAdapter interface for compatibility with shared generators.
|
|
5
|
+
*/
|
|
6
|
+
import { OutputAdapter } from '../../codegen/output/types';
|
|
7
|
+
export declare class BrowserOutput implements OutputAdapter {
|
|
8
|
+
private files;
|
|
9
|
+
/**
|
|
10
|
+
* Write a file to memory.
|
|
11
|
+
* @param path - The file path (e.g., 'src/models/User.ts')
|
|
12
|
+
* @param content - The file content
|
|
13
|
+
*/
|
|
14
|
+
write(path: string, content: string): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* No-op for browser - directories are virtual.
|
|
17
|
+
*/
|
|
18
|
+
mkdir(_dirPath: string, _options?: {
|
|
19
|
+
recursive?: boolean;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Get all file paths that were written.
|
|
23
|
+
* Implements OutputAdapter interface.
|
|
24
|
+
*/
|
|
25
|
+
getWrittenFiles(): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Get all files with their content.
|
|
28
|
+
* Implements OutputAdapter interface.
|
|
29
|
+
*/
|
|
30
|
+
getAllFiles(): Record<string, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Read a file from memory.
|
|
33
|
+
* @param path - The file path
|
|
34
|
+
* @returns The file content, or undefined if not found
|
|
35
|
+
*/
|
|
36
|
+
read(path: string): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Get all files as a Record.
|
|
39
|
+
* @deprecated Use getAllFiles() instead for OutputAdapter compatibility
|
|
40
|
+
* @returns A copy of all files as Record<path, content>
|
|
41
|
+
*/
|
|
42
|
+
getAll(): Record<string, string>;
|
|
43
|
+
/**
|
|
44
|
+
* Clear all files from memory.
|
|
45
|
+
*/
|
|
46
|
+
clear(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Check if a file exists.
|
|
49
|
+
* @param path - The file path
|
|
50
|
+
* @returns True if the file exists
|
|
51
|
+
*/
|
|
52
|
+
has(path: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Delete a specific file.
|
|
55
|
+
* @param path - The file path
|
|
56
|
+
* @returns True if the file was deleted, false if it didn't exist
|
|
57
|
+
*/
|
|
58
|
+
delete(path: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get all file paths.
|
|
61
|
+
* @deprecated Use getWrittenFiles() instead for OutputAdapter compatibility
|
|
62
|
+
* @returns Array of file paths
|
|
63
|
+
*/
|
|
64
|
+
getPaths(): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Get the number of files.
|
|
67
|
+
*/
|
|
68
|
+
get size(): number;
|
|
69
|
+
}
|