mulink 1.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.
@@ -0,0 +1,338 @@
1
+ #!/usr/bin/env node
2
+ import { BridgeLogger, __name, createBridgeVersionChecker, ConfigurationLoader, BridgeCore } from './chunk-SMOCRKWL.js';
3
+ import { Command } from 'commander';
4
+
5
+ var BANNER = /* @__PURE__ */ __name((version) => `
6
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
7
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
8
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557
9
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D
10
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
11
+ \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D
12
+
13
+ \u{1F517} Mulink - Universal Type-Safe API Integration
14
+ \u{1F517} Connect APIs \u2022 Generate Clients \u2022 Type Safety
15
+ \u{1F4E6} Version: ${version} \u2022 \u{1F680} Next.js 16+ \u2022 \u26A1 OpenAPI 3.x
16
+ `, "BANNER");
17
+ var logger = new BridgeLogger({ prefix: "\u{1F517} Mulink CLI" });
18
+ function displayBanner(version, updateInfo) {
19
+ let banner = BANNER(version);
20
+ if (updateInfo && updateInfo.updateAvailable) {
21
+ const upgradeCommand = updateInfo.upgradeCommand || "npm update mulink";
22
+ banner += `
23
+
24
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u{1F504} UPDATE AVAILABLE \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
25
+
26
+ Current Version: ${updateInfo.current}
27
+ Latest Version: ${updateInfo.latest}
28
+
29
+ Upgrade Command:
30
+ ${upgradeCommand}
31
+
32
+ Run 'mulink check-updates' for more information
33
+
34
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
35
+ `;
36
+ }
37
+ console.log(banner);
38
+ }
39
+ __name(displayBanner, "displayBanner");
40
+ function displayColoredBanner(version, updateInfo) {
41
+ const colors = {
42
+ reset: "\x1B[0m",
43
+ green: "\x1B[32m",
44
+ yellow: "\x1B[33m",
45
+ cyan: "\x1B[36m",
46
+ magenta: "\x1B[35m"};
47
+ let banner = BANNER(version).replace(/█/g, `${colors.cyan}\u2588${colors.reset}`).replace(/🌉/g, `${colors.yellow}\u{1F309}${colors.reset}`).replace(/🔗/g, `${colors.cyan}\u{1F517}${colors.reset}`).replace(/📦/g, `${colors.green}\u{1F4E6}${colors.reset}`).replace(/🚀/g, `${colors.magenta}\u{1F680}${colors.reset}`).replace(/⚡/g, `${colors.yellow}\u26A1${colors.reset}`);
48
+ if (updateInfo && updateInfo.updateAvailable) {
49
+ const upgradeCommand = updateInfo.upgradeCommand || "npm update mulink";
50
+ const updateBox = `
51
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u{1F504} UPDATE AVAILABLE \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
52
+
53
+ Current Version: ${updateInfo.current}
54
+ Latest Version: ${updateInfo.latest}
55
+
56
+ Upgrade Command:
57
+ ${upgradeCommand}
58
+
59
+ Run 'mulink check-updates' for more information
60
+
61
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
62
+ `;
63
+ banner += updateBox;
64
+ }
65
+ console.log(banner);
66
+ }
67
+ __name(displayColoredBanner, "displayColoredBanner");
68
+ var program = new Command();
69
+ var versionChecker = createBridgeVersionChecker(logger);
70
+ program.name("mulink").description("Universal type-safe API integration library for modern web applications").version(versionChecker.getCurrentVersion()).option("-v, --verbose", "Enable verbose logging").option("-q, --quiet", "Suppress non-error output").option("--no-color", "Disable colored output").option("--no-banner", "Disable banner display").hook("preAction", async (thisCommand) => {
71
+ const opts = thisCommand.opts();
72
+ if (opts.verbose) {
73
+ logger.options.level = 0 /* DEBUG */;
74
+ } else if (opts.quiet) {
75
+ logger.options.level = 3 /* ERROR */;
76
+ }
77
+ if (opts.noColor) {
78
+ logger.options.colors = false;
79
+ }
80
+ let updateInfo = null;
81
+ if (!opts.quiet) {
82
+ try {
83
+ const versionChecker2 = createBridgeVersionChecker(logger);
84
+ const versionInfo = await versionChecker2.checkForUpdates();
85
+ if (versionInfo && versionInfo.updateAvailable) {
86
+ const upgradeCommand = versionChecker2.getUpgradeCommand(versionInfo);
87
+ updateInfo = {
88
+ current: versionInfo.current,
89
+ latest: versionInfo.latest,
90
+ updateAvailable: versionInfo.updateAvailable,
91
+ upgradeCommand
92
+ };
93
+ }
94
+ } catch (error) {
95
+ logger.debug("Version check failed:", error);
96
+ }
97
+ }
98
+ if (!opts.noBanner && !opts.quiet) {
99
+ const currentVersion = versionChecker.getCurrentVersion();
100
+ if (opts.noColor) {
101
+ displayBanner(currentVersion, updateInfo || void 0);
102
+ } else {
103
+ displayColoredBanner(currentVersion, updateInfo || void 0);
104
+ }
105
+ }
106
+ });
107
+ program.command("generate").alias("gen").description("Generate API client code from OpenAPI schema").option("-c, --config <path>", "Path to config file", "link.config.json").option("-w, --watch", "Watch for schema changes and regenerate automatically").option("--dry-run", "Show what would be generated without writing files").action(async (options) => {
108
+ const spinner = logger.spinner("Initializing generation...");
109
+ try {
110
+ const configLoader = new ConfigurationLoader();
111
+ const config = await configLoader.load(options.config);
112
+ spinner.succeed("Configuration loaded");
113
+ const bridge = new BridgeCore();
114
+ if (options.dryRun) {
115
+ logger.info("\u{1F50D} Dry run mode - validation only");
116
+ const validationSpinner = logger.spinner("Validating schema...");
117
+ try {
118
+ const isValid = await bridge.validateSchema(config.schema);
119
+ if (isValid) {
120
+ validationSpinner.succeed("Schema is valid");
121
+ const info = await bridge.getSchemaInfo(config.schema);
122
+ logger.info(`Schema: ${info.title} v${info.version}`);
123
+ if (info.description) {
124
+ logger.info(`Description: ${info.description}`);
125
+ }
126
+ } else {
127
+ validationSpinner.fail("Schema validation failed");
128
+ process.exit(1);
129
+ }
130
+ } catch (error) {
131
+ validationSpinner.fail("Schema validation failed");
132
+ logger.error("Schema validation error:", error);
133
+ process.exit(1);
134
+ }
135
+ } else if (options.watch) {
136
+ logger.warn("\u{1F440} Watch mode is not yet implemented");
137
+ logger.info("Falling back to single generation...");
138
+ await bridge.generate(config);
139
+ } else {
140
+ const generationSpinner = logger.spinner("Generating API client...");
141
+ try {
142
+ await bridge.generate(config);
143
+ generationSpinner.succeed("API client generated successfully");
144
+ } catch (error) {
145
+ generationSpinner.fail("Generation failed");
146
+ throw error;
147
+ }
148
+ }
149
+ } catch (error) {
150
+ spinner.fail("Generation failed");
151
+ if (error instanceof Error) {
152
+ logger.error("Error:", error.message);
153
+ if (logger.options.level === 0 /* DEBUG */) {
154
+ logger.error("Stack trace:", error.stack);
155
+ }
156
+ } else {
157
+ logger.error("Unknown error:", error);
158
+ }
159
+ process.exit(1);
160
+ }
161
+ });
162
+ program.command("init").description("Initialize a new Mulink project").option("-f, --framework <type>", "Framework type", "nextjs").option("--router <type>", "Next.js router type", "app").option("-s, --schema <url>", "OpenAPI schema URL").option("-o, --output <dir>", "Output directory", "src/generated").action(async (options) => {
163
+ const spinner = logger.spinner("Initializing Mulink project...");
164
+ try {
165
+ const configLoader = new ConfigurationLoader();
166
+ const config = await configLoader.createDefault(options.framework);
167
+ if (options.schema) config.schema = options.schema;
168
+ if (options.output) config.outputDir = options.output;
169
+ if (options.router) config.framework.router = options.router;
170
+ await configLoader.save(config);
171
+ spinner.succeed("Mulink configuration created successfully!");
172
+ logger.info("\u{1F4CB} Configuration Summary:");
173
+ logger.info(` Framework: ${config.framework.type}`);
174
+ logger.info(` Router: ${config.framework.router}`);
175
+ logger.info(` Schema: ${config.schema}`);
176
+ logger.info(` Output: ${config.outputDir}`);
177
+ logger.info("\n\u{1F680} Next steps:");
178
+ logger.info("1. Edit link.config.json to configure your API");
179
+ logger.info('2. Run "mulink generate" to create your API client');
180
+ logger.info('3. Run "mulink validate" to check your configuration');
181
+ } catch (error) {
182
+ spinner.fail("Initialization failed");
183
+ if (error instanceof Error) {
184
+ logger.error("Error:", error.message);
185
+ if (logger.options.level === 0 /* DEBUG */) {
186
+ logger.error("Stack trace:", error.stack);
187
+ }
188
+ } else {
189
+ logger.error("Unknown error:", error);
190
+ }
191
+ process.exit(1);
192
+ }
193
+ });
194
+ program.command("validate").description("Validate OpenAPI schema and configuration").option("-c, --config <path>", "Path to config file", "link.config.json").option("--schema-only", "Only validate the OpenAPI schema").action(async (options) => {
195
+ try {
196
+ const configLoader = new ConfigurationLoader();
197
+ const config = await configLoader.load(options.config);
198
+ const bridge = new BridgeCore();
199
+ if (options.schemaOnly) {
200
+ const isValid = await bridge.validateSchema(config.schema);
201
+ if (isValid) {
202
+ logger.success("\u2705 Schema is valid");
203
+ const info = await bridge.getSchemaInfo(config.schema);
204
+ logger.info(`Title: ${info.title}`);
205
+ logger.info(`Version: ${info.version}`);
206
+ if (info.description) logger.info(`Description: ${info.description}`);
207
+ } else {
208
+ logger.error("\u274C Schema validation failed");
209
+ process.exit(1);
210
+ }
211
+ } else {
212
+ logger.success("\u2705 Configuration is valid");
213
+ const isValid = await bridge.validateSchema(config.schema);
214
+ if (isValid) {
215
+ logger.success("\u2705 Schema is valid");
216
+ } else {
217
+ logger.error("\u274C Schema validation failed");
218
+ process.exit(1);
219
+ }
220
+ }
221
+ } catch (error) {
222
+ logger.error("Validation failed:", error);
223
+ process.exit(1);
224
+ }
225
+ });
226
+ program.command("clean").description("Clean generated files and cache").option("-c, --config <path>", "Path to config file", "link.config.json").option("--force", "Force clean without confirmation").action(async (options) => {
227
+ const spinner = logger.spinner("Cleaning cache and generated files...");
228
+ try {
229
+ const configLoader = new ConfigurationLoader();
230
+ const config = await configLoader.load(options.config);
231
+ const bridge = new BridgeCore();
232
+ bridge.clearCache();
233
+ spinner.succeed("Cache and generated files cleared successfully");
234
+ logger.info("\u{1F9F9} Cleaned:");
235
+ logger.info(" - Schema cache");
236
+ logger.info(" - Generated files");
237
+ logger.info(" - Build artifacts");
238
+ } catch (error) {
239
+ spinner.fail("Clean failed");
240
+ if (error instanceof Error) {
241
+ logger.error("Error:", error.message);
242
+ if (logger.options.level === 0 /* DEBUG */) {
243
+ logger.error("Stack trace:", error.stack);
244
+ }
245
+ } else {
246
+ logger.error("Unknown error:", error);
247
+ }
248
+ process.exit(1);
249
+ }
250
+ });
251
+ program.command("info").description("Show project information and status").option("-c, --config <path>", "Path to config file", "link.config.json").action(async (options) => {
252
+ try {
253
+ const configLoader = new ConfigurationLoader();
254
+ const config = await configLoader.load(options.config);
255
+ logger.info("\u{1F4CA} Mulink Project Information");
256
+ logger.info("=".repeat(40));
257
+ logger.info(`Framework: ${config.framework.type}`);
258
+ logger.info(`Router: ${config.framework.router}`);
259
+ logger.info(`Schema: ${config.schema}`);
260
+ logger.info(`Output: ${config.outputDir}`);
261
+ logger.info(`Features:`);
262
+ logger.info(` - Server Actions: ${config.framework.features.serverActions ? "\u2705" : "\u274C"}`);
263
+ logger.info(` - Middleware: ${config.framework.features.middleware ? "\u2705" : "\u274C"}`);
264
+ logger.info(` - Streaming: ${config.framework.features.streaming ? "\u2705" : "\u274C"}`);
265
+ logger.info(` - Revalidation: ${config.framework.features.revalidation ? "\u2705" : "\u274C"}`);
266
+ if (config.auth?.enabled) {
267
+ logger.info(`Auth: ${config.auth.provider}`);
268
+ }
269
+ if (config.cache) {
270
+ logger.info(`Cache: ${config.cache.strategy} (TTL: ${config.cache.ttl}s)`);
271
+ }
272
+ } catch (error) {
273
+ logger.error("Failed to load project info:", error);
274
+ process.exit(1);
275
+ }
276
+ });
277
+ program.command("check-updates").alias("update-check").description("Check for available updates").option("--force", "Force check even if recently checked").option("--show-current", "Show current version information").action(async (options) => {
278
+ const spinner = logger.spinner("Checking for updates...");
279
+ try {
280
+ const versionChecker2 = createBridgeVersionChecker(logger);
281
+ const versionInfo = await versionChecker2.checkForUpdates();
282
+ const currentVersion = versionChecker2.getCurrentVersion();
283
+ if (versionInfo) {
284
+ spinner.succeed("Version check completed");
285
+ if (versionInfo.updateAvailable) {
286
+ const upgradeCommand = versionChecker2.getUpgradeCommand(versionInfo);
287
+ const updateInfo = {
288
+ current: versionInfo.current,
289
+ latest: versionInfo.latest,
290
+ updateAvailable: versionInfo.updateAvailable,
291
+ upgradeCommand
292
+ };
293
+ if (logger.options.colors) {
294
+ displayColoredBanner(currentVersion, updateInfo);
295
+ } else {
296
+ displayBanner(currentVersion, updateInfo);
297
+ }
298
+ } else if (options.showCurrent) {
299
+ logger.info(`Current version: ${versionInfo.current}`);
300
+ logger.info(`Latest version: ${versionInfo.latest}`);
301
+ logger.info("\u2705 You are using the latest version");
302
+ }
303
+ } else {
304
+ spinner.fail("Could not check for updates");
305
+ logger.warn("Unable to fetch version information. Please check your internet connection.");
306
+ }
307
+ } catch (error) {
308
+ spinner.fail("Update check failed");
309
+ logger.error("Failed to check for updates:", error);
310
+ process.exit(1);
311
+ }
312
+ });
313
+ program.on("command:*", () => {
314
+ logger.error(`Unknown command: ${program.args.join(" ")}`);
315
+ logger.info("Run 'mulink --help' for available commands");
316
+ process.exit(1);
317
+ });
318
+ process.on("uncaughtException", (error) => {
319
+ logger.error("Uncaught exception:", error);
320
+ process.exit(1);
321
+ });
322
+ process.on("unhandledRejection", (reason) => {
323
+ logger.error("Unhandled rejection:", reason);
324
+ process.exit(1);
325
+ });
326
+ if (process.argv.length === 2) {
327
+ const hasNoColor = process.argv.includes("--no-color");
328
+ const currentVersion = versionChecker.getCurrentVersion();
329
+ if (hasNoColor) {
330
+ displayBanner(currentVersion);
331
+ } else {
332
+ displayColoredBanner(currentVersion);
333
+ }
334
+ program.help();
335
+ }
336
+ program.parse();
337
+ //# sourceMappingURL=cli.js.map
338
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli/index.ts"],"names":["versionChecker"],"mappings":";;;;AAQA,IAAM,MAAA,2BAAU,OAAA,KAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,uBAAA,EAUlB,OAAO,CAAA;AAAA,CAAA,EAVV,QAAA,CAAA;AAaf,IAAM,SAAS,IAAI,YAAA,CAAa,EAAE,MAAA,EAAQ,wBAAiB,CAAA;AAG3D,SAAS,aAAA,CAAc,SAAiB,UAAA,EAAqG;AAC3I,EAAA,IAAI,MAAA,GAAS,OAAO,OAAO,CAAA;AAE3B,EAAA,IAAI,UAAA,IAAc,WAAW,eAAA,EAAiB;AAC5C,IAAA,MAAM,cAAA,GAAiB,WAAW,cAAA,IAAkB,mBAAA;AAEpD,IAAA,MAAA,IAAU;;AAAA;;AAAA,mBAAA,EAIO,WAAW,OAAO;AAAA,mBAAA,EAClB,WAAW,MAAM;;AAAA;AAAA,EAAA,EAGlC,cAAc;;AAAA;;AAAA;AAAA,CAAA;AAAA,EAMhB;AAEA,EAAA,OAAA,CAAQ,IAAI,MAAM,CAAA;AACpB;AAvBS,MAAA,CAAA,aAAA,EAAA,eAAA,CAAA;AA0BT,SAAS,oBAAA,CAAqB,SAAiB,UAAA,EAAqG;AAClJ,EAAA,MAAM,MAAA,GAAS;AAAA,IACb,KAAA,EAAO,SAAA;AAAA,IAGP,KAAA,EAAO,UAAA;AAAA,IACP,MAAA,EAAQ,UAAA;AAAA,IAER,IAAA,EAAM,UAAA;AAAA,IACN,OAAA,EAAS,UAEX,CAAA;AAEA,EAAA,IAAI,MAAA,GAAS,MAAA,CAAO,OAAO,CAAA,CACxB,OAAA,CAAQ,IAAA,EA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A,EAAM","file":"cli.js","sourcesContent":["#!/usr/bin/env node\r\nimport { Command } from 'commander';\r\nimport { BridgeCore } from '@/core/bridge-core';\r\nimport { ConfigurationLoader } from '@/config/configuration-loader';\r\nimport { BridgeLogger, LogLevel } from '@/utils/logger';\r\nimport { checkAndNotifyUpdates, createBridgeVersionChecker } from '@/utils/version-checker';\r\n\r\n// ASCII Art Banner\r\nconst BANNER = (version: string) => `\r\n ██████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗\r\n ██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██╔════╝\r\n ██████╔╝██║ ██║██║██║ ██║██║ ███╗█████╗ \r\n ██╔══██╗██║ ██║██║██║ ██║██║ ██║██╔══╝ \r\n ██████╔╝██████╔╝██║██████╔╝╚██████╔╝███████╗\r\n ╚═════╝ ╚═════╝ ╚═╝╚═════╝ ╚═════╝ ╚══════╝\r\n\r\n 🔗 Mulink - Universal Type-Safe API Integration\r\n 🔗 Connect APIs • Generate Clients • Type Safety\r\n 📦 Version: ${version} • 🚀 Next.js 16+ • ⚡ OpenAPI 3.x\r\n`;\r\n\r\nconst logger = new BridgeLogger({ prefix: '🔗 Mulink CLI' });\r\n\r\n// Enhanced banner display with update notification integration\r\nfunction displayBanner(version: string, updateInfo?: { current: string; latest: string; updateAvailable: boolean; upgradeCommand?: string }) {\r\n let banner = BANNER(version);\r\n \r\n if (updateInfo && updateInfo.updateAvailable) {\r\n const upgradeCommand = updateInfo.upgradeCommand || 'npm update mulink';\r\n \r\n banner += `\r\n\r\n─────────────────── 🔄 UPDATE AVAILABLE ──────────────────\r\n\r\n Current Version: ${updateInfo.current}\r\n Latest Version: ${updateInfo.latest}\r\n\r\n Upgrade Command:\r\n ${upgradeCommand}\r\n\r\n Run 'mulink check-updates' for more information\r\n\r\n──────────────────────────────────────────────────────────\r\n`;\r\n }\r\n \r\n console.log(banner);\r\n}\r\n\r\n// Enhanced colored banner display with update notification integration\r\nfunction displayColoredBanner(version: string, updateInfo?: { current: string; latest: string; updateAvailable: boolean; upgradeCommand?: string }) {\r\n const colors = {\r\n reset: '\\x1b[0m',\r\n bright: '\\x1b[1m',\r\n red: '\\x1b[31m',\r\n green: '\\x1b[32m',\r\n yellow: '\\x1b[33m',\r\n blue: '\\x1b[34m',\r\n cyan: '\\x1b[36m',\r\n magenta: '\\x1b[35m',\r\n orange: '\\x1b[38;5;208m',\r\n };\r\n\r\n let banner = BANNER(version)\r\n .replace(/█/g, `${colors.cyan}█${colors.reset}`)\r\n .replace(/🌉/g, `${colors.yellow}🌉${colors.reset}`)\r\n .replace(/🔗/g, `${colors.cyan}🔗${colors.reset}`)\r\n .replace(/📦/g, `${colors.green}📦${colors.reset}`)\r\n .replace(/🚀/g, `${colors.magenta}🚀${colors.reset}`)\r\n .replace(/⚡/g, `${colors.yellow}⚡${colors.reset}`);\r\n\r\n if (updateInfo && updateInfo.updateAvailable) {\r\n const upgradeCommand = updateInfo.upgradeCommand || 'npm update mulink';\r\n \r\n const updateBox = `\r\n─────────────────── 🔄 UPDATE AVAILABLE ──────────────────\r\n\r\n Current Version: ${updateInfo.current}\r\n Latest Version: ${updateInfo.latest}\r\n\r\n Upgrade Command:\r\n ${upgradeCommand}\r\n\r\n Run 'mulink check-updates' for more information\r\n\r\n──────────────────────────────────────────────────────────\r\n`;\r\n\r\n banner += updateBox;\r\n }\r\n\r\n console.log(banner);\r\n}\r\n\r\nconst program = new Command();\r\nconst versionChecker = createBridgeVersionChecker(logger);\r\nprogram\r\n .name('mulink')\r\n .description('Universal type-safe API integration library for modern web applications')\r\n .version(versionChecker.getCurrentVersion())\r\n .option('-v, --verbose', 'Enable verbose logging')\r\n .option('-q, --quiet', 'Suppress non-error output')\r\n .option('--no-color', 'Disable colored output')\r\n .option('--no-banner', 'Disable banner display')\r\n .hook('preAction', async (thisCommand) => {\r\n const opts = thisCommand.opts();\r\n if (opts.verbose) {\r\n logger.options.level = LogLevel.DEBUG;\r\n } else if (opts.quiet) {\r\n logger.options.level = LogLevel.ERROR;\r\n }\r\n if (opts.noColor) {\r\n logger.options.colors = false;\r\n }\r\n\r\n // Check for updates first (synchronously for banner integration)\r\n let updateInfo = null;\r\n if (!opts.quiet) {\r\n try {\r\n const versionChecker = createBridgeVersionChecker(logger);\r\n const versionInfo = await versionChecker.checkForUpdates();\r\n \r\n if (versionInfo && versionInfo.updateAvailable) {\r\n const upgradeCommand = versionChecker.getUpgradeCommand(versionInfo);\r\n updateInfo = {\r\n current: versionInfo.current,\r\n latest: versionInfo.latest,\r\n updateAvailable: versionInfo.updateAvailable,\r\n upgradeCommand\r\n };\r\n }\r\n } catch (error) {\r\n // Silently fail - version check should not interrupt user workflow\r\n logger.debug('Version check failed:', error);\r\n }\r\n }\r\n\r\n // Display banner with integrated update notification\r\n if (!opts.noBanner && !opts.quiet) {\r\n const currentVersion = versionChecker.getCurrentVersion();\r\n if (opts.noColor) {\r\n displayBanner(currentVersion, updateInfo || undefined);\r\n } else {\r\n displayColoredBanner(currentVersion, updateInfo || undefined);\r\n }\r\n }\r\n });\r\n\r\nprogram\r\n .command('generate')\r\n .alias('gen')\r\n .description('Generate API client code from OpenAPI schema')\r\n .option('-c, --config <path>', 'Path to config file', 'link.config.json')\r\n .option('-w, --watch', 'Watch for schema changes and regenerate automatically')\r\n .option('--dry-run', 'Show what would be generated without writing files')\r\n .action(async options => {\r\n const spinner = logger.spinner('Initializing generation...');\r\n\r\n try {\r\n const configLoader = new ConfigurationLoader();\r\n const config = await configLoader.load(options.config);\r\n spinner.succeed('Configuration loaded');\r\n\r\n const bridge = new BridgeCore();\r\n\r\n if (options.dryRun) {\r\n logger.info('🔍 Dry run mode - validation only');\r\n const validationSpinner = logger.spinner('Validating schema...');\r\n\r\n try {\r\n const isValid = await bridge.validateSchema(config.schema);\r\n if (isValid) {\r\n validationSpinner.succeed('Schema is valid');\r\n const info = await bridge.getSchemaInfo(config.schema);\r\n logger.info(`Schema: ${info.title} v${info.version}`);\r\n if (info.description) {\r\n logger.info(`Description: ${info.description}`);\r\n }\r\n } else {\r\n validationSpinner.fail('Schema validation failed');\r\n process.exit(1);\r\n }\r\n } catch (error) {\r\n validationSpinner.fail('Schema validation failed');\r\n logger.error('Schema validation error:', error);\r\n process.exit(1);\r\n }\r\n } else if (options.watch) {\r\n logger.warn('👀 Watch mode is not yet implemented');\r\n logger.info('Falling back to single generation...');\r\n await bridge.generate(config);\r\n } else {\r\n const generationSpinner = logger.spinner('Generating API client...');\r\n try {\r\n await bridge.generate(config);\r\n generationSpinner.succeed('API client generated successfully');\r\n } catch (error) {\r\n generationSpinner.fail('Generation failed');\r\n throw error;\r\n }\r\n }\r\n } catch (error) {\r\n spinner.fail('Generation failed');\r\n if (error instanceof Error) {\r\n logger.error('Error:', error.message);\r\n if (logger.options.level === LogLevel.DEBUG) {\r\n logger.error('Stack trace:', error.stack);\r\n }\r\n } else {\r\n logger.error('Unknown error:', error);\r\n }\r\n process.exit(1);\r\n }\r\n });\r\n\r\nprogram\r\n .command('init')\r\n .description('Initialize a new Mulink project')\r\n .option('-f, --framework <type>', 'Framework type', 'nextjs')\r\n .option('--router <type>', 'Next.js router type', 'app')\r\n .option('-s, --schema <url>', 'OpenAPI schema URL')\r\n .option('-o, --output <dir>', 'Output directory', 'src/generated')\r\n .action(async options => {\r\n const spinner = logger.spinner('Initializing Mulink project...');\r\n\r\n try {\r\n const configLoader = new ConfigurationLoader();\r\n const config = await configLoader.createDefault(options.framework);\r\n\r\n // Override defaults with provided options\r\n if (options.schema) config.schema = options.schema;\r\n if (options.output) config.outputDir = options.output;\r\n if (options.router) config.framework.router = options.router;\r\n\r\n await configLoader.save(config);\r\n spinner.succeed('Mulink configuration created successfully!');\r\n\r\n logger.info('📋 Configuration Summary:');\r\n logger.info(` Framework: ${config.framework.type}`);\r\n logger.info(` Router: ${config.framework.router}`);\r\n logger.info(` Schema: ${config.schema}`);\r\n logger.info(` Output: ${config.outputDir}`);\r\n\r\n logger.info('\\n🚀 Next steps:');\r\n logger.info('1. Edit link.config.json to configure your API');\r\n logger.info('2. Run \"mulink generate\" to create your API client');\r\n logger.info('3. Run \"mulink validate\" to check your configuration');\r\n } catch (error) {\r\n spinner.fail('Initialization failed');\r\n if (error instanceof Error) {\r\n logger.error('Error:', error.message);\r\n if (logger.options.level === LogLevel.DEBUG) {\r\n logger.error('Stack trace:', error.stack);\r\n }\r\n } else {\r\n logger.error('Unknown error:', error);\r\n }\r\n process.exit(1);\r\n }\r\n });\r\n\r\nprogram\r\n .command('validate')\r\n .description('Validate OpenAPI schema and configuration')\r\n .option('-c, --config <path>', 'Path to config file', 'link.config.json')\r\n .option('--schema-only', 'Only validate the OpenAPI schema')\r\n .action(async options => {\r\n try {\r\n const configLoader = new ConfigurationLoader();\r\n const config = await configLoader.load(options.config);\r\n\r\n const bridge = new BridgeCore();\r\n\r\n if (options.schemaOnly) {\r\n const isValid = await bridge.validateSchema(config.schema);\r\n if (isValid) {\r\n logger.success('✅ Schema is valid');\r\n const info = await bridge.getSchemaInfo(config.schema);\r\n logger.info(`Title: ${info.title}`);\r\n logger.info(`Version: ${info.version}`);\r\n if (info.description) logger.info(`Description: ${info.description}`);\r\n } else {\r\n logger.error('❌ Schema validation failed');\r\n process.exit(1);\r\n }\r\n } else {\r\n logger.success('✅ Configuration is valid');\r\n const isValid = await bridge.validateSchema(config.schema);\r\n if (isValid) {\r\n logger.success('✅ Schema is valid');\r\n } else {\r\n logger.error('❌ Schema validation failed');\r\n process.exit(1);\r\n }\r\n }\r\n } catch (error) {\r\n logger.error('Validation failed:', error);\r\n process.exit(1);\r\n }\r\n });\r\n\r\nprogram\r\n .command('clean')\r\n .description('Clean generated files and cache')\r\n .option('-c, --config <path>', 'Path to config file', 'link.config.json')\r\n .option('--force', 'Force clean without confirmation')\r\n .action(async options => {\r\n const spinner = logger.spinner('Cleaning cache and generated files...');\r\n\r\n try {\r\n const configLoader = new ConfigurationLoader();\r\n const config = await configLoader.load(options.config);\r\n\r\n const bridge = new BridgeCore();\r\n bridge.clearCache();\r\n\r\n // TODO: Implement file cleanup\r\n spinner.succeed('Cache and generated files cleared successfully');\r\n\r\n logger.info('🧹 Cleaned:');\r\n logger.info(' - Schema cache');\r\n logger.info(' - Generated files');\r\n logger.info(' - Build artifacts');\r\n } catch (error) {\r\n spinner.fail('Clean failed');\r\n if (error instanceof Error) {\r\n logger.error('Error:', error.message);\r\n if (logger.options.level === LogLevel.DEBUG) {\r\n logger.error('Stack trace:', error.stack);\r\n }\r\n } else {\r\n logger.error('Unknown error:', error);\r\n }\r\n process.exit(1);\r\n }\r\n });\r\n\r\nprogram\r\n .command('info')\r\n .description('Show project information and status')\r\n .option('-c, --config <path>', 'Path to config file', 'link.config.json')\r\n .action(async options => {\r\n try {\r\n const configLoader = new ConfigurationLoader();\r\n const config = await configLoader.load(options.config);\r\n\r\n logger.info('📊 Mulink Project Information');\r\n logger.info('='.repeat(40));\r\n logger.info(`Framework: ${config.framework.type}`);\r\n logger.info(`Router: ${config.framework.router}`);\r\n logger.info(`Schema: ${config.schema}`);\r\n logger.info(`Output: ${config.outputDir}`);\r\n logger.info(`Features:`);\r\n logger.info(` - Server Actions: ${config.framework.features.serverActions ? '✅' : '❌'}`);\r\n logger.info(` - Middleware: ${config.framework.features.middleware ? '✅' : '❌'}`);\r\n logger.info(` - Streaming: ${config.framework.features.streaming ? '✅' : '❌'}`);\r\n logger.info(` - Revalidation: ${config.framework.features.revalidation ? '✅' : '❌'}`);\r\n\r\n if (config.auth?.enabled) {\r\n logger.info(`Auth: ${config.auth.provider}`);\r\n }\r\n\r\n if (config.cache) {\r\n logger.info(`Cache: ${config.cache.strategy} (TTL: ${config.cache.ttl}s)`);\r\n }\r\n } catch (error) {\r\n logger.error('Failed to load project info:', error);\r\n process.exit(1);\r\n }\r\n });\r\n\r\nprogram\r\n .command('check-updates')\r\n .alias('update-check')\r\n .description('Check for available updates')\r\n .option('--force', 'Force check even if recently checked')\r\n .option('--show-current', 'Show current version information')\r\n .action(async options => {\r\n const spinner = logger.spinner('Checking for updates...');\r\n \r\n try {\r\n const versionChecker = createBridgeVersionChecker(logger);\r\n const versionInfo = await versionChecker.checkForUpdates();\r\n const currentVersion = versionChecker.getCurrentVersion();\r\n \r\n if (versionInfo) {\r\n spinner.succeed('Version check completed');\r\n \r\n // Display the enhanced banner with update info\r\n if (versionInfo.updateAvailable) {\r\n const upgradeCommand = versionChecker.getUpgradeCommand(versionInfo);\r\n const updateInfo = {\r\n current: versionInfo.current,\r\n latest: versionInfo.latest,\r\n updateAvailable: versionInfo.updateAvailable,\r\n upgradeCommand\r\n };\r\n \r\n if (logger.options.colors) {\r\n displayColoredBanner(currentVersion,updateInfo);\r\n } else {\r\n displayBanner(currentVersion,updateInfo);\r\n }\r\n } else if (options.showCurrent) {\r\n logger.info(`Current version: ${versionInfo.current}`);\r\n logger.info(`Latest version: ${versionInfo.latest}`);\r\n logger.info('✅ You are using the latest version');\r\n }\r\n } else {\r\n spinner.fail('Could not check for updates');\r\n logger.warn('Unable to fetch version information. Please check your internet connection.');\r\n }\r\n } catch (error) {\r\n spinner.fail('Update check failed');\r\n logger.error('Failed to check for updates:', error);\r\n process.exit(1);\r\n }\r\n });\r\n\r\n// Handle unknown commands\r\nprogram.on('command:*', () => {\r\n logger.error(`Unknown command: ${program.args.join(' ')}`);\r\n logger.info(\"Run 'mulink --help' for available commands\");\r\n process.exit(1);\r\n});\r\n\r\n// Handle errors gracefully\r\nprocess.on('uncaughtException', error => {\r\n logger.error('Uncaught exception:', error);\r\n process.exit(1);\r\n});\r\n\r\nprocess.on('unhandledRejection', reason => {\r\n logger.error('Unhandled rejection:', reason);\r\n process.exit(1);\r\n});\r\n\r\n// Show help if no command provided\r\nif (process.argv.length === 2) {\r\n // Check if colors are disabled\r\n const hasNoColor = process.argv.includes('--no-color');\r\n const currentVersion = versionChecker.getCurrentVersion();\r\n if (hasNoColor) {\r\n displayBanner(currentVersion);\r\n } else {\r\n displayColoredBanner(currentVersion);\r\n }\r\n program.help();\r\n}\r\n\r\nprogram.parse();\r\n"]}
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var chunkF6QVO6NR_cjs = require('./chunk-F6QVO6NR.cjs');
4
+
5
+ // src/client/index.ts
6
+ function createBridgeClient(config) {
7
+ return new chunkF6QVO6NR_cjs.BridgeCore();
8
+ }
9
+ chunkF6QVO6NR_cjs.__name(createBridgeClient, "createBridgeClient");
10
+ function createTypedClient(config) {
11
+ return new chunkF6QVO6NR_cjs.BridgeCore();
12
+ }
13
+ chunkF6QVO6NR_cjs.__name(createTypedClient, "createTypedClient");
14
+
15
+ Object.defineProperty(exports, "BridgeCore", {
16
+ enumerable: true,
17
+ get: function () { return chunkF6QVO6NR_cjs.BridgeCore; }
18
+ });
19
+ Object.defineProperty(exports, "BridgeError", {
20
+ enumerable: true,
21
+ get: function () { return chunkF6QVO6NR_cjs.BridgeError; }
22
+ });
23
+ Object.defineProperty(exports, "BridgeLogger", {
24
+ enumerable: true,
25
+ get: function () { return chunkF6QVO6NR_cjs.BridgeLogger; }
26
+ });
27
+ Object.defineProperty(exports, "ConfigurationLoader", {
28
+ enumerable: true,
29
+ get: function () { return chunkF6QVO6NR_cjs.ConfigurationLoader; }
30
+ });
31
+ Object.defineProperty(exports, "FileSystemManager", {
32
+ enumerable: true,
33
+ get: function () { return chunkF6QVO6NR_cjs.FileSystemManager; }
34
+ });
35
+ Object.defineProperty(exports, "GenerationError", {
36
+ enumerable: true,
37
+ get: function () { return chunkF6QVO6NR_cjs.GenerationError; }
38
+ });
39
+ Object.defineProperty(exports, "LogLevel", {
40
+ enumerable: true,
41
+ get: function () { return chunkF6QVO6NR_cjs.LogLevel; }
42
+ });
43
+ Object.defineProperty(exports, "OpenApiSchemaParser", {
44
+ enumerable: true,
45
+ get: function () { return chunkF6QVO6NR_cjs.OpenApiSchemaParser; }
46
+ });
47
+ Object.defineProperty(exports, "SchemaParseError", {
48
+ enumerable: true,
49
+ get: function () { return chunkF6QVO6NR_cjs.SchemaParseError; }
50
+ });
51
+ Object.defineProperty(exports, "ValidationError", {
52
+ enumerable: true,
53
+ get: function () { return chunkF6QVO6NR_cjs.ValidationError; }
54
+ });
55
+ Object.defineProperty(exports, "VersionChecker", {
56
+ enumerable: true,
57
+ get: function () { return chunkF6QVO6NR_cjs.VersionChecker; }
58
+ });
59
+ Object.defineProperty(exports, "checkAndNotifyUpdates", {
60
+ enumerable: true,
61
+ get: function () { return chunkF6QVO6NR_cjs.checkAndNotifyUpdates; }
62
+ });
63
+ Object.defineProperty(exports, "createBridgeVersionChecker", {
64
+ enumerable: true,
65
+ get: function () { return chunkF6QVO6NR_cjs.createBridgeVersionChecker; }
66
+ });
67
+ exports.createBridgeClient = createBridgeClient;
68
+ exports.createTypedClient = createTypedClient;
69
+ //# sourceMappingURL=client.cjs.map
70
+ //# sourceMappingURL=client.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/index.ts"],"names":["BridgeCore","__name"],"mappings":";;;;;AAsDO,SAAS,mBAAmB,MAAA,EAA6B;AAC9D,EAAA,OAAO,IAAIA,4BAAA,EAAW;AACxB;AAFgBC,wBAAA,CAAA,kBAAA,EAAA,oBAAA,CAAA;AAIT,SAAS,kBAAqB,MAAA,EAA6B;AAEhE,EAAA,OAAO,IAAID,4BAAA,EAAW;AACxB;AAHgBC,wBAAA,CAAA,iBAAA,EAAA,mBAAA,CAAA","file":"client.cjs","sourcesContent":["// Client exports for the Mulink library\r\nexport { BridgeCore } from '@/core/bridge-core';\r\nexport { OpenApiSchemaParser } from '@/core/schema-parser';\r\nexport { ConfigurationLoader } from '@/config/configuration-loader';\r\nexport { FileSystemManager } from '@/utils/file-manager';\r\nexport { BridgeLogger, LogLevel } from '@/utils/logger';\r\nexport { VersionChecker, createBridgeVersionChecker, checkAndNotifyUpdates } from '@/utils/version-checker';\r\n\r\n// Import types for internal use\r\nimport type { BridgeConfiguration } from '@/core/types';\r\nimport { BridgeCore } from '@/core/bridge-core';\r\n\r\n// Client-specific types and utilities\r\nexport type {\r\n BridgeConfiguration,\r\n FrameworkConfiguration,\r\n ApiConfiguration,\r\n AuthConfiguration,\r\n CacheConfiguration,\r\n DevelopmentConfiguration,\r\n PluginConfiguration,\r\n GenerationConfiguration,\r\n OpenApiDocument,\r\n ParsedApiSchema,\r\n ApiEndpointDefinition,\r\n ParameterDefinition,\r\n RequestBodyDefinition,\r\n ApiResponseDefinition,\r\n SchemaDefinition,\r\n SecuritySchemeDefinition,\r\n ServerDefinition,\r\n SchemaMetadata,\r\n EndpointMetadata,\r\n SecurityRequirement,\r\n HttpMethod,\r\n CacheStrategy,\r\n RateLimit,\r\n GenerationContext,\r\n GeneratedFile,\r\n FileMetadata,\r\n BridgePlugin,\r\n ClientConfiguration,\r\n RequestConfiguration,\r\n ClientResponse,\r\n StreamingResponse,\r\n} from '@/core/types';\r\n\r\n// Error exports\r\nexport { BridgeError, ValidationError, SchemaParseError, GenerationError } from '@/core/types';\r\n\r\n// Version checker exports\r\nexport type { VersionInfo } from '@/utils/version-checker';\r\n\r\n// Client factory functions\r\nexport function createBridgeClient(config: BridgeConfiguration) {\r\n return new BridgeCore();\r\n}\r\n\r\nexport function createTypedClient<T>(config: BridgeConfiguration) {\r\n // Implementation for typed client creation\r\n return new BridgeCore();\r\n}\r\n"]}
@@ -0,0 +1,9 @@
1
+ import { B as BridgeConfiguration, b as BridgeCore } from './version-checker-BWdifiXN.cjs';
2
+ export { A as ApiConfiguration, l as ApiEndpointDefinition, n as ApiResponseDefinition, g as AuthConfiguration, x as BridgeError, c as BridgeLogger, v as BridgePlugin, h as CacheConfiguration, s as CacheStrategy, J as ClientConfiguration, M as ClientResponse, C as ConfigurationLoader, D as DevelopmentConfiguration, E as EndpointMetadata, u as FileMetadata, F as FileSystemManager, f as FrameworkConfiguration, a as GeneratedFile, i as GenerationConfiguration, G as GenerationContext, I as GenerationError, H as HttpMethod, L as LogLevel, j as OpenApiDocument, O as OpenApiSchemaParser, m as ParameterDefinition, k as ParsedApiSchema, P as PluginConfiguration, t as RateLimit, R as RequestBodyDefinition, K as RequestConfiguration, S as SchemaDefinition, q as SchemaMetadata, z as SchemaParseError, r as SecurityRequirement, o as SecuritySchemeDefinition, p as ServerDefinition, N as StreamingResponse, y as ValidationError, V as VersionChecker, w as VersionInfo, e as checkAndNotifyUpdates, d as createBridgeVersionChecker } from './version-checker-BWdifiXN.cjs';
3
+ import 'openapi-types';
4
+ import 'zod';
5
+
6
+ declare function createBridgeClient(config: BridgeConfiguration): BridgeCore;
7
+ declare function createTypedClient<T>(config: BridgeConfiguration): BridgeCore;
8
+
9
+ export { BridgeConfiguration, BridgeCore, createBridgeClient, createTypedClient };
@@ -0,0 +1,9 @@
1
+ import { B as BridgeConfiguration, b as BridgeCore } from './version-checker-BWdifiXN.js';
2
+ export { A as ApiConfiguration, l as ApiEndpointDefinition, n as ApiResponseDefinition, g as AuthConfiguration, x as BridgeError, c as BridgeLogger, v as BridgePlugin, h as CacheConfiguration, s as CacheStrategy, J as ClientConfiguration, M as ClientResponse, C as ConfigurationLoader, D as DevelopmentConfiguration, E as EndpointMetadata, u as FileMetadata, F as FileSystemManager, f as FrameworkConfiguration, a as GeneratedFile, i as GenerationConfiguration, G as GenerationContext, I as GenerationError, H as HttpMethod, L as LogLevel, j as OpenApiDocument, O as OpenApiSchemaParser, m as ParameterDefinition, k as ParsedApiSchema, P as PluginConfiguration, t as RateLimit, R as RequestBodyDefinition, K as RequestConfiguration, S as SchemaDefinition, q as SchemaMetadata, z as SchemaParseError, r as SecurityRequirement, o as SecuritySchemeDefinition, p as ServerDefinition, N as StreamingResponse, y as ValidationError, V as VersionChecker, w as VersionInfo, e as checkAndNotifyUpdates, d as createBridgeVersionChecker } from './version-checker-BWdifiXN.js';
3
+ import 'openapi-types';
4
+ import 'zod';
5
+
6
+ declare function createBridgeClient(config: BridgeConfiguration): BridgeCore;
7
+ declare function createTypedClient<T>(config: BridgeConfiguration): BridgeCore;
8
+
9
+ export { BridgeConfiguration, BridgeCore, createBridgeClient, createTypedClient };
@@ -0,0 +1,16 @@
1
+ import { __name, BridgeCore } from './chunk-SMOCRKWL.js';
2
+ export { BridgeCore, BridgeError, BridgeLogger, ConfigurationLoader, FileSystemManager, GenerationError, LogLevel, OpenApiSchemaParser, SchemaParseError, ValidationError, VersionChecker, checkAndNotifyUpdates, createBridgeVersionChecker } from './chunk-SMOCRKWL.js';
3
+
4
+ // src/client/index.ts
5
+ function createBridgeClient(config) {
6
+ return new BridgeCore();
7
+ }
8
+ __name(createBridgeClient, "createBridgeClient");
9
+ function createTypedClient(config) {
10
+ return new BridgeCore();
11
+ }
12
+ __name(createTypedClient, "createTypedClient");
13
+
14
+ export { createBridgeClient, createTypedClient };
15
+ //# sourceMappingURL=client.js.map
16
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/index.ts"],"names":[],"mappings":";;;;AAsDO,SAAS,mBAAmB,MAAA,EAA6B;AAC9D,EAAA,OAAO,IAAI,UAAA,EAAW;AACxB;AAFgB,MAAA,CAAA,kBAAA,EAAA,oBAAA,CAAA;AAIT,SAAS,kBAAqB,MAAA,EAA6B;AAEhE,EAAA,OAAO,IAAI,UAAA,EAAW;AACxB;AAHgB,MAAA,CAAA,iBAAA,EAAA,mBAAA,CAAA","file":"client.js","sourcesContent":["// Client exports for the Mulink library\r\nexport { BridgeCore } from '@/core/bridge-core';\r\nexport { OpenApiSchemaParser } from '@/core/schema-parser';\r\nexport { ConfigurationLoader } from '@/config/configuration-loader';\r\nexport { FileSystemManager } from '@/utils/file-manager';\r\nexport { BridgeLogger, LogLevel } from '@/utils/logger';\r\nexport { VersionChecker, createBridgeVersionChecker, checkAndNotifyUpdates } from '@/utils/version-checker';\r\n\r\n// Import types for internal use\r\nimport type { BridgeConfiguration } from '@/core/types';\r\nimport { BridgeCore } from '@/core/bridge-core';\r\n\r\n// Client-specific types and utilities\r\nexport type {\r\n BridgeConfiguration,\r\n FrameworkConfiguration,\r\n ApiConfiguration,\r\n AuthConfiguration,\r\n CacheConfiguration,\r\n DevelopmentConfiguration,\r\n PluginConfiguration,\r\n GenerationConfiguration,\r\n OpenApiDocument,\r\n ParsedApiSchema,\r\n ApiEndpointDefinition,\r\n ParameterDefinition,\r\n RequestBodyDefinition,\r\n ApiResponseDefinition,\r\n SchemaDefinition,\r\n SecuritySchemeDefinition,\r\n ServerDefinition,\r\n SchemaMetadata,\r\n EndpointMetadata,\r\n SecurityRequirement,\r\n HttpMethod,\r\n CacheStrategy,\r\n RateLimit,\r\n GenerationContext,\r\n GeneratedFile,\r\n FileMetadata,\r\n BridgePlugin,\r\n ClientConfiguration,\r\n RequestConfiguration,\r\n ClientResponse,\r\n StreamingResponse,\r\n} from '@/core/types';\r\n\r\n// Error exports\r\nexport { BridgeError, ValidationError, SchemaParseError, GenerationError } from '@/core/types';\r\n\r\n// Version checker exports\r\nexport type { VersionInfo } from '@/utils/version-checker';\r\n\r\n// Client factory functions\r\nexport function createBridgeClient(config: BridgeConfiguration) {\r\n return new BridgeCore();\r\n}\r\n\r\nexport function createTypedClient<T>(config: BridgeConfiguration) {\r\n // Implementation for typed client creation\r\n return new BridgeCore();\r\n}\r\n"]}
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ var chunkF6QVO6NR_cjs = require('./chunk-F6QVO6NR.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "BridgeCore", {
8
+ enumerable: true,
9
+ get: function () { return chunkF6QVO6NR_cjs.BridgeCore; }
10
+ });
11
+ Object.defineProperty(exports, "BridgeError", {
12
+ enumerable: true,
13
+ get: function () { return chunkF6QVO6NR_cjs.BridgeError; }
14
+ });
15
+ Object.defineProperty(exports, "BridgeLogger", {
16
+ enumerable: true,
17
+ get: function () { return chunkF6QVO6NR_cjs.BridgeLogger; }
18
+ });
19
+ Object.defineProperty(exports, "ConfigurationLoader", {
20
+ enumerable: true,
21
+ get: function () { return chunkF6QVO6NR_cjs.ConfigurationLoader; }
22
+ });
23
+ Object.defineProperty(exports, "FileSystemManager", {
24
+ enumerable: true,
25
+ get: function () { return chunkF6QVO6NR_cjs.FileSystemManager; }
26
+ });
27
+ Object.defineProperty(exports, "GenerationError", {
28
+ enumerable: true,
29
+ get: function () { return chunkF6QVO6NR_cjs.GenerationError; }
30
+ });
31
+ Object.defineProperty(exports, "LogLevel", {
32
+ enumerable: true,
33
+ get: function () { return chunkF6QVO6NR_cjs.LogLevel; }
34
+ });
35
+ Object.defineProperty(exports, "NextJsCodeGenerator", {
36
+ enumerable: true,
37
+ get: function () { return chunkF6QVO6NR_cjs.NextJsCodeGenerator; }
38
+ });
39
+ Object.defineProperty(exports, "OpenApiSchemaParser", {
40
+ enumerable: true,
41
+ get: function () { return chunkF6QVO6NR_cjs.OpenApiSchemaParser; }
42
+ });
43
+ Object.defineProperty(exports, "SchemaParseError", {
44
+ enumerable: true,
45
+ get: function () { return chunkF6QVO6NR_cjs.SchemaParseError; }
46
+ });
47
+ Object.defineProperty(exports, "ValidationError", {
48
+ enumerable: true,
49
+ get: function () { return chunkF6QVO6NR_cjs.ValidationError; }
50
+ });
51
+ Object.defineProperty(exports, "VersionChecker", {
52
+ enumerable: true,
53
+ get: function () { return chunkF6QVO6NR_cjs.VersionChecker; }
54
+ });
55
+ Object.defineProperty(exports, "checkAndNotifyUpdates", {
56
+ enumerable: true,
57
+ get: function () { return chunkF6QVO6NR_cjs.checkAndNotifyUpdates; }
58
+ });
59
+ Object.defineProperty(exports, "createBridgeVersionChecker", {
60
+ enumerable: true,
61
+ get: function () { return chunkF6QVO6NR_cjs.createBridgeVersionChecker; }
62
+ });
63
+ //# sourceMappingURL=index.cjs.map
64
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,15 @@
1
+ import { B as BridgeConfiguration, G as GenerationContext, a as GeneratedFile } from './version-checker-BWdifiXN.cjs';
2
+ export { A as ApiConfiguration, l as ApiEndpointDefinition, n as ApiResponseDefinition, g as AuthConfiguration, b as BridgeCore, x as BridgeError, c as BridgeLogger, v as BridgePlugin, h as CacheConfiguration, s as CacheStrategy, C as ConfigurationLoader, D as DevelopmentConfiguration, E as EndpointMetadata, u as FileMetadata, F as FileSystemManager, f as FrameworkConfiguration, i as GenerationConfiguration, I as GenerationError, H as HttpMethod, L as LogLevel, j as OpenApiDocument, O as OpenApiSchemaParser, m as ParameterDefinition, k as ParsedApiSchema, P as PluginConfiguration, t as RateLimit, R as RequestBodyDefinition, S as SchemaDefinition, q as SchemaMetadata, z as SchemaParseError, r as SecurityRequirement, o as SecuritySchemeDefinition, p as ServerDefinition, y as ValidationError, V as VersionChecker, w as VersionInfo, e as checkAndNotifyUpdates, d as createBridgeVersionChecker } from './version-checker-BWdifiXN.cjs';
3
+ import 'openapi-types';
4
+ import 'zod';
5
+
6
+ declare class NextJsCodeGenerator {
7
+ private readonly configuration;
8
+ constructor(configuration: BridgeConfiguration);
9
+ private buildImportPath;
10
+ private updateFilePaths;
11
+ generate(context: GenerationContext): Promise<GeneratedFile[]>;
12
+ private generateSafeActionClient;
13
+ }
14
+
15
+ export { BridgeConfiguration, GeneratedFile, GenerationContext, NextJsCodeGenerator };
@@ -0,0 +1,15 @@
1
+ import { B as BridgeConfiguration, G as GenerationContext, a as GeneratedFile } from './version-checker-BWdifiXN.js';
2
+ export { A as ApiConfiguration, l as ApiEndpointDefinition, n as ApiResponseDefinition, g as AuthConfiguration, b as BridgeCore, x as BridgeError, c as BridgeLogger, v as BridgePlugin, h as CacheConfiguration, s as CacheStrategy, C as ConfigurationLoader, D as DevelopmentConfiguration, E as EndpointMetadata, u as FileMetadata, F as FileSystemManager, f as FrameworkConfiguration, i as GenerationConfiguration, I as GenerationError, H as HttpMethod, L as LogLevel, j as OpenApiDocument, O as OpenApiSchemaParser, m as ParameterDefinition, k as ParsedApiSchema, P as PluginConfiguration, t as RateLimit, R as RequestBodyDefinition, S as SchemaDefinition, q as SchemaMetadata, z as SchemaParseError, r as SecurityRequirement, o as SecuritySchemeDefinition, p as ServerDefinition, y as ValidationError, V as VersionChecker, w as VersionInfo, e as checkAndNotifyUpdates, d as createBridgeVersionChecker } from './version-checker-BWdifiXN.js';
3
+ import 'openapi-types';
4
+ import 'zod';
5
+
6
+ declare class NextJsCodeGenerator {
7
+ private readonly configuration;
8
+ constructor(configuration: BridgeConfiguration);
9
+ private buildImportPath;
10
+ private updateFilePaths;
11
+ generate(context: GenerationContext): Promise<GeneratedFile[]>;
12
+ private generateSafeActionClient;
13
+ }
14
+
15
+ export { BridgeConfiguration, GeneratedFile, GenerationContext, NextJsCodeGenerator };
@@ -0,0 +1,3 @@
1
+ export { BridgeCore, BridgeError, BridgeLogger, ConfigurationLoader, FileSystemManager, GenerationError, LogLevel, NextJsCodeGenerator, OpenApiSchemaParser, SchemaParseError, ValidationError, VersionChecker, checkAndNotifyUpdates, createBridgeVersionChecker } from './chunk-SMOCRKWL.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map