wgc 0.79.5 → 0.80.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.
Files changed (31) hide show
  1. package/dist/package.json +13 -4
  2. package/dist/src/commands/router/commands/compose.js +179 -89
  3. package/dist/src/commands/router/commands/compose.js.map +1 -1
  4. package/dist/src/commands/router/index.js +5 -1
  5. package/dist/src/commands/router/index.js.map +1 -1
  6. package/dist/src/commands/router/plugin/commands/build.d.ts +4 -0
  7. package/dist/src/commands/router/plugin/commands/build.js +76 -0
  8. package/dist/src/commands/router/plugin/commands/build.js.map +1 -0
  9. package/dist/src/commands/router/plugin/commands/init.d.ts +4 -0
  10. package/dist/src/commands/router/plugin/commands/init.js +98 -0
  11. package/dist/src/commands/router/plugin/commands/init.js.map +1 -0
  12. package/dist/src/commands/router/plugin/commands/test.d.ts +4 -0
  13. package/dist/src/commands/router/plugin/commands/test.js +62 -0
  14. package/dist/src/commands/router/plugin/commands/test.js.map +1 -0
  15. package/dist/src/commands/router/plugin/helper.d.ts +10 -0
  16. package/dist/src/commands/router/plugin/helper.js +47 -0
  17. package/dist/src/commands/router/plugin/helper.js.map +1 -0
  18. package/dist/src/commands/router/plugin/index.d.ts +4 -0
  19. package/dist/src/commands/router/plugin/index.js +13 -0
  20. package/dist/src/commands/router/plugin/index.js.map +1 -0
  21. package/dist/src/commands/router/plugin/templates/go-plugin.d.ts +5 -0
  22. package/dist/src/commands/router/plugin/templates/go-plugin.js +342 -0
  23. package/dist/src/commands/router/plugin/templates/go-plugin.js.map +1 -0
  24. package/dist/src/commands/router/plugin/toolchain.d.ts +36 -0
  25. package/dist/src/commands/router/plugin/toolchain.js +413 -0
  26. package/dist/src/commands/router/plugin/toolchain.js.map +1 -0
  27. package/dist/src/core/config.d.ts +1 -0
  28. package/dist/src/core/config.js +1 -0
  29. package/dist/src/core/config.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +16 -7
@@ -0,0 +1,36 @@
1
+ export declare const HOST_PLATFORM: string;
2
+ /**
3
+ * Check if tools need installation and ask the user if needed
4
+ */
5
+ export declare function checkAndInstallTools(force?: boolean): Promise<boolean>;
6
+ /**
7
+ * Generate proto and mapping files from schema
8
+ */
9
+ export declare function generateProtoAndMapping(pluginDir: string, goModulePath: string, spinner: any): Promise<{
10
+ serviceName: string;
11
+ }>;
12
+ /**
13
+ * Generate gRPC code using protoc
14
+ */
15
+ export declare function generateGRPCCode(pluginDir: string, spinner: any): Promise<void>;
16
+ /**
17
+ * Run Go tests
18
+ */
19
+ export declare function runGoTests(pluginDir: string, spinner: any, debug?: boolean): import("execa").ResultPromise<{
20
+ cwd: string;
21
+ stdout: "inherit";
22
+ stderr: "inherit";
23
+ env: NodeJS.ProcessEnv;
24
+ }>;
25
+ /**
26
+ * Install Go dependencies
27
+ */
28
+ export declare function installGoDependencies(pluginDir: string, spinner: any): Promise<void>;
29
+ /**
30
+ * Build binaries for specified platforms
31
+ */
32
+ export declare function buildBinaries(pluginDir: string, platforms: string[], debug: boolean, spinner: any): Promise<void>;
33
+ /**
34
+ * Normalize a platform list based on options
35
+ */
36
+ export declare function normalizePlatforms(platforms: string[], allPlatforms: boolean): string[];
@@ -0,0 +1,413 @@
1
+ import { chmod, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
2
+ import os from 'node:os';
3
+ import { existsSync } from 'node:fs';
4
+ import { basename, join, resolve } from 'pathe';
5
+ import pc from 'picocolors';
6
+ import { execa } from 'execa';
7
+ import { compileGraphQLToMapping, compileGraphQLToProto } from '@wundergraph/protographic';
8
+ import prompts from 'prompts';
9
+ import semver from 'semver';
10
+ import { camelCase, upperFirst } from 'lodash-es';
11
+ import { dataDir } from '../../../core/config.js';
12
+ // Define platform-architecture combinations
13
+ export const HOST_PLATFORM = `${os.platform()}-${os.arch()}`;
14
+ const ALL_PLATFORMS = ['linux-amd64', 'linux-arm64', 'darwin-amd64', 'darwin-arm64', 'windows-amd64'];
15
+ const installScriptUrl = 'https://raw.githubusercontent.com/wundergraph/cosmo/refs/tags/wgc%400.80.0/scripts/install-proto-tools.sh';
16
+ // Get paths for tool installation
17
+ const TOOLS_DIR = join(dataDir, 'proto-tools');
18
+ const TOOLS_BIN_DIR = join(TOOLS_DIR, 'bin');
19
+ const TOOLS_VERSIONS_FILE = join(TOOLS_DIR, 'versions.json');
20
+ // Exact tool versions to be installed for the script, but you can specify a semver range to express compatibility
21
+ const TOOL_VERSIONS = {
22
+ protoc: { range: '^29.3', envVar: 'PROTOC_VERSION', scriptVersion: '29.3' },
23
+ protocGenGo: { range: '^1.34.2', envVar: 'PROTOC_GEN_GO_VERSION', scriptVersion: '1.34.2' },
24
+ protocGenGoGrpc: { range: '^1.5.1', envVar: 'PROTOC_GEN_GO_GRPC_VERSION', scriptVersion: '1.5.1' },
25
+ go: { range: '>=1.22.0', envVar: 'GO_VERSION', scriptVersion: '1.24.1' },
26
+ };
27
+ /**
28
+ * Get the path to a tool, preferring the installed version if available
29
+ */
30
+ function getToolPath(toolName) {
31
+ return existsSync(join(TOOLS_BIN_DIR, toolName)) ? join(TOOLS_BIN_DIR, toolName) : toolName;
32
+ }
33
+ /**
34
+ * Check if tools need to be reinstalled by comparing version matrices
35
+ */
36
+ async function shouldReinstallTools(force = false) {
37
+ // If forcing reinstallation, return true
38
+ if (force) {
39
+ return true;
40
+ }
41
+ // If a version file exists, we assume the user manages the tools via toolchain
42
+ if (existsSync(TOOLS_VERSIONS_FILE)) {
43
+ try {
44
+ // Read stored versions and compare with current versions
45
+ const storedVersionsStr = await readFile(TOOLS_VERSIONS_FILE, 'utf8');
46
+ const storedVersions = JSON.parse(storedVersionsStr);
47
+ // Compare each tool version
48
+ for (const [tool, version] of Object.entries(TOOL_VERSIONS)) {
49
+ // Check if the stored exact version satisfies the required range
50
+ if (!storedVersions[tool] || !isSemverSatisfied(storedVersions[tool], version.range)) {
51
+ console.log(pc.yellow(`Version mismatch for ${tool}: found ${storedVersions[tool]}, required ${version.range}. Reinstalling...`));
52
+ return true;
53
+ }
54
+ }
55
+ // Check for any new tools that weren't in the stored versions
56
+ for (const tool of Object.keys(TOOL_VERSIONS)) {
57
+ if (!(tool in storedVersions)) {
58
+ return true;
59
+ }
60
+ }
61
+ // If we got here, all versions match
62
+ return false;
63
+ }
64
+ catch {
65
+ // If any error occurs during version checking, assume reinstallation is needed
66
+ return true;
67
+ }
68
+ }
69
+ // if we haven't installed the tools yet, we check first if the tools are installed on the host system,
70
+ // and if they are not, we need to install them through the toolchain installation
71
+ try {
72
+ const toolsOnHost = await areToolsInstalledOnHost();
73
+ if (toolsOnHost) {
74
+ return false;
75
+ }
76
+ return true;
77
+ }
78
+ catch {
79
+ // If error checking host tools, installation is needed
80
+ return true;
81
+ }
82
+ }
83
+ /**
84
+ * Check if all required tools are installed on the host system with correct versions
85
+ */
86
+ async function areToolsInstalledOnHost() {
87
+ try {
88
+ // Check Go version
89
+ const goVersion = await getCommandVersion('go', 'version');
90
+ if (!isSemverSatisfied(goVersion, TOOL_VERSIONS.go.range)) {
91
+ console.log(pc.yellow(`Go version mismatch: found ${goVersion}, required ${TOOL_VERSIONS.go.range}`));
92
+ return false;
93
+ }
94
+ // Check Protoc version
95
+ const protocVersion = await getCommandVersion('protoc', '--version');
96
+ if (!isSemverSatisfied(protocVersion, TOOL_VERSIONS.protoc.range)) {
97
+ console.log(pc.yellow(`Protoc version mismatch: found ${protocVersion}, required ${TOOL_VERSIONS.protoc.range}`));
98
+ return false;
99
+ }
100
+ // Check protoc-gen-go version
101
+ // The output format is typically "protoc-gen-go v1.36.5"
102
+ const protocGenGoVersion = await getCommandVersion('protoc-gen-go', '--version');
103
+ if (!isSemverSatisfied(protocGenGoVersion, TOOL_VERSIONS.protocGenGo.range)) {
104
+ console.log(pc.yellow(`protoc-gen-go version mismatch: found ${protocGenGoVersion}, required ${TOOL_VERSIONS.protocGenGo.range}`));
105
+ return false;
106
+ }
107
+ // Check protoc-gen-go-grpc version
108
+ // The output format is typically "protoc-gen-go-grpc 1.5.1"
109
+ const protocGenGoGrpcVersion = await getCommandVersion('protoc-gen-go-grpc', '--version');
110
+ if (!isSemverSatisfied(protocGenGoGrpcVersion, TOOL_VERSIONS.protocGenGoGrpc.range)) {
111
+ console.log(pc.yellow(`protoc-gen-go-grpc version mismatch: found ${protocGenGoGrpcVersion}, required ${TOOL_VERSIONS.protocGenGoGrpc.range}`));
112
+ return false;
113
+ }
114
+ return true;
115
+ }
116
+ catch (error) {
117
+ console.log(pc.yellow(`Error checking tools: ${error.message}`));
118
+ return false;
119
+ }
120
+ }
121
+ /**
122
+ * Compare versions using semver
123
+ */
124
+ function isSemverSatisfied(version, requiredVersion) {
125
+ var _a, _b;
126
+ try {
127
+ // Clean versions using semver.clean that handle v prefix
128
+ const cleanVersion = semver.clean(version) || version;
129
+ // For actual version, always coerce to a clean semver string
130
+ const coercedVersion = (_a = semver.coerce(cleanVersion)) === null || _a === void 0 ? void 0 : _a.version;
131
+ if (!coercedVersion) {
132
+ return false;
133
+ }
134
+ // For ranges, use as is (ranges are not supported for tool versions)
135
+ if (semver.validRange(requiredVersion)) {
136
+ return semver.satisfies(coercedVersion, requiredVersion);
137
+ }
138
+ // If not a range, coerce the required version too
139
+ const coercedRequiredVersion = (_b = semver.coerce(requiredVersion)) === null || _b === void 0 ? void 0 : _b.version;
140
+ if (!coercedRequiredVersion) {
141
+ return false;
142
+ }
143
+ return semver.satisfies(coercedVersion, coercedRequiredVersion);
144
+ }
145
+ catch {
146
+ // If any error in semver processing, fall back to string comparison
147
+ return version === requiredVersion;
148
+ }
149
+ }
150
+ /**
151
+ * Extract version from command output
152
+ */
153
+ async function getCommandVersion(command, versionFlag) {
154
+ // This pattern will match:
155
+ // Optional "v" or "V" prefix
156
+ // Versions with 2 or 3 components like "1.22", "29.3", or "1.22.0"
157
+ // Captures the version number in group 1
158
+ const versionRegex = /[Vv]?(\d+(?:\.\d+){1,2})/;
159
+ try {
160
+ const { stdout } = await execa(command, [versionFlag]);
161
+ const match = stdout.match(versionRegex);
162
+ if (!match || !match[1]) {
163
+ throw new Error(`Could not parse version from output: ${stdout}`);
164
+ }
165
+ return match[1];
166
+ }
167
+ catch (error) {
168
+ throw new Error(`Failed to get version for ${command}: ${error}`);
169
+ }
170
+ }
171
+ /**
172
+ * Check if tools need installation and ask the user if needed
173
+ */
174
+ export async function checkAndInstallTools(force = false) {
175
+ const needsReinstall = await shouldReinstallTools(force);
176
+ if (!needsReinstall) {
177
+ return true;
178
+ }
179
+ // Ask user for confirmation to install tools
180
+ const installMessage = existsSync(TOOLS_DIR)
181
+ ? 'Version changes detected. Install required toolchain?'
182
+ : 'Install required toolchain?';
183
+ // Create a more informative message with simple formatting
184
+ const toolsInfo = Object.entries(TOOL_VERSIONS)
185
+ .map(([tool, { range: version }]) => ` ${pc.cyan('•')} ${pc.bold(tool)}: ${version}`)
186
+ .join('\n');
187
+ console.log(pc.yellow('\n=== Required Toolchain ===') +
188
+ '\n\n' +
189
+ pc.white('The following tools are needed to build the router plugin:') +
190
+ '\n\n' +
191
+ toolsInfo +
192
+ '\n\n' +
193
+ pc.white('You can install them automatically or manually install them yourself') +
194
+ '\n' +
195
+ pc.white('by following the documentation at https://cosmo-docs.wundergraph.com') +
196
+ '\n');
197
+ const response = await prompts({
198
+ type: 'confirm',
199
+ name: 'installTools',
200
+ message: installMessage,
201
+ });
202
+ if (!response.installTools) {
203
+ console.log(pc.yellow('Tools installation skipped. Build may fail.'));
204
+ return false;
205
+ }
206
+ try {
207
+ await installTools();
208
+ return true;
209
+ }
210
+ catch (error) {
211
+ throw new Error(`Failed to install tools: ${error.message}`);
212
+ }
213
+ }
214
+ /**
215
+ * Get environment with TOOLS_BIN_DIR added to PATH
216
+ */
217
+ function getToolsEnv() {
218
+ const env = { ...process.env };
219
+ if (existsSync(TOOLS_BIN_DIR)) {
220
+ env.PATH = `${TOOLS_BIN_DIR}:${env.PATH}`;
221
+ // Set GOROOT to the parent directory of bin if Go is managed by the toolchain
222
+ if (existsSync(join(TOOLS_BIN_DIR, 'go'))) {
223
+ env.GOROOT = join(TOOLS_DIR, 'go');
224
+ }
225
+ }
226
+ return env;
227
+ }
228
+ /**
229
+ * Install tools using the install-proto-tools.sh script
230
+ */
231
+ async function installTools() {
232
+ const tmpDir = join(TOOLS_DIR, 'download');
233
+ const scriptPath = join(tmpDir, 'install-proto-tools.sh');
234
+ // Make installation idempotent - remove existing tools directory if it exists
235
+ if (existsSync(TOOLS_DIR)) {
236
+ try {
237
+ await rm(TOOLS_DIR, { recursive: true, force: true });
238
+ }
239
+ catch (error) {
240
+ throw new Error(`Failed to remove existing tools: ${error}`);
241
+ }
242
+ }
243
+ // Create tools directory structure
244
+ try {
245
+ await mkdir(tmpDir, { recursive: true });
246
+ }
247
+ catch (error) {
248
+ throw new Error(`Failed to create temporary directory: ${error}`);
249
+ }
250
+ try {
251
+ try {
252
+ await execa('curl', ['-fsSL', installScriptUrl, '-o', scriptPath]);
253
+ }
254
+ catch (error) {
255
+ throw new Error(`Failed to download installation script: ${error}`);
256
+ }
257
+ // Make script executable
258
+ await chmod(scriptPath, 0o755);
259
+ // Set up environment variables from tool versions
260
+ const env = {
261
+ ...process.env,
262
+ INSTALL_DIR: TOOLS_DIR,
263
+ PRINT_INSTRUCTIONS: 'false',
264
+ };
265
+ // Store exact versions that we install
266
+ const exactVersions = {};
267
+ // Add version variables to env
268
+ for (const [tool, version] of Object.entries(TOOL_VERSIONS)) {
269
+ env[version.envVar] = version.scriptVersion;
270
+ exactVersions[tool] = version.scriptVersion;
271
+ }
272
+ await execa(scriptPath, [], {
273
+ env,
274
+ stdio: 'inherit',
275
+ });
276
+ // Write the exact versions file
277
+ await writeFile(TOOLS_VERSIONS_FILE, JSON.stringify(exactVersions, null, 2));
278
+ }
279
+ finally {
280
+ // Clean up
281
+ if (existsSync(tmpDir)) {
282
+ await rm(tmpDir, { recursive: true, force: true });
283
+ }
284
+ }
285
+ return true;
286
+ }
287
+ /**
288
+ * Generate proto and mapping files from schema
289
+ */
290
+ export async function generateProtoAndMapping(pluginDir, goModulePath, spinner) {
291
+ const srcDir = resolve(pluginDir, 'src');
292
+ const generatedDir = resolve(pluginDir, 'generated');
293
+ // Ensure a generated directory exists
294
+ await mkdir(generatedDir, { recursive: true });
295
+ spinner.text = 'Reading schema...';
296
+ const schema = await readFile(resolve(srcDir, 'schema.graphql'), 'utf8');
297
+ const lockFile = resolve(generatedDir, 'service.proto.lock.json');
298
+ let lockData;
299
+ // check if file exists
300
+ if (existsSync(lockFile)) {
301
+ lockData = JSON.parse(await readFile(lockFile, 'utf8'));
302
+ }
303
+ // Get plugin name from the last segment of the directory path
304
+ const pluginName = basename(pluginDir);
305
+ const serviceName = upperFirst(camelCase(pluginName)) + 'Service';
306
+ spinner.text = 'Generating mapping and proto files...';
307
+ const mapping = compileGraphQLToMapping(schema, serviceName);
308
+ await writeFile(resolve(generatedDir, 'mapping.json'), JSON.stringify(mapping, null, 2));
309
+ const proto = compileGraphQLToProto(schema, {
310
+ serviceName,
311
+ packageName: 'service',
312
+ goPackage: goModulePath,
313
+ lockData,
314
+ });
315
+ await writeFile(resolve(generatedDir, 'service.proto'), proto.proto);
316
+ await writeFile(resolve(generatedDir, 'service.proto.lock.json'), JSON.stringify(proto.lockData, null, 2));
317
+ return { serviceName };
318
+ }
319
+ /**
320
+ * Generate gRPC code using protoc
321
+ */
322
+ export async function generateGRPCCode(pluginDir, spinner) {
323
+ spinner.text = 'Generating gRPC code...\n';
324
+ const env = getToolsEnv();
325
+ const protocPath = getToolPath('protoc');
326
+ console.log('');
327
+ await execa(protocPath, [
328
+ '--go_out=.',
329
+ '--go_opt=paths=source_relative',
330
+ '--go-grpc_out=.',
331
+ '--go-grpc_opt=paths=source_relative',
332
+ 'generated/service.proto',
333
+ ], { cwd: pluginDir, stdout: 'inherit', stderr: 'inherit', env });
334
+ }
335
+ /**
336
+ * Run Go tests
337
+ */
338
+ export function runGoTests(pluginDir, spinner, debug = false) {
339
+ spinner.text = 'Running tests...\n';
340
+ const env = getToolsEnv();
341
+ const goPath = getToolPath('go');
342
+ const args = ['test', './...'];
343
+ if (debug) {
344
+ args.push('-gcflags', 'all=-N -l');
345
+ }
346
+ return execa(goPath, args, {
347
+ cwd: pluginDir,
348
+ stdout: 'inherit',
349
+ stderr: 'inherit',
350
+ env,
351
+ });
352
+ }
353
+ /**
354
+ * Install Go dependencies
355
+ */
356
+ export async function installGoDependencies(pluginDir, spinner) {
357
+ spinner.text = 'Installing dependencies...\n';
358
+ const env = getToolsEnv();
359
+ const goPath = getToolPath('go');
360
+ await execa(goPath, ['mod', 'tidy'], {
361
+ cwd: pluginDir,
362
+ stdout: 'inherit',
363
+ stderr: 'inherit',
364
+ env,
365
+ });
366
+ }
367
+ /**
368
+ * Build binaries for specified platforms
369
+ */
370
+ export async function buildBinaries(pluginDir, platforms, debug, spinner) {
371
+ spinner.text = 'Building binaries...';
372
+ const binDir = resolve(pluginDir, 'bin');
373
+ // Ensure bin directory exists
374
+ await mkdir(binDir, { recursive: true });
375
+ const env = getToolsEnv();
376
+ const goPath = getToolPath('go');
377
+ await Promise.all(platforms.map(async (platformArch) => {
378
+ const [platform, arch] = platformArch.split('-');
379
+ if (!platform || !arch) {
380
+ throw new Error(`Invalid platform-architecture format: ${platformArch}. Use format like 'darwin-arm64'`);
381
+ }
382
+ spinner.text = `Building ${platform}-${arch}...`;
383
+ const binaryName = `${platform}_${arch}`;
384
+ const flags = ['build'];
385
+ if (debug) {
386
+ flags.push('-gcflags', 'all=-N -l');
387
+ }
388
+ flags.push('-o', join(binDir, binaryName), 'src/main.go');
389
+ await execa(goPath, flags, {
390
+ cwd: pluginDir,
391
+ env: {
392
+ ...env,
393
+ GOOS: platform,
394
+ GOARCH: arch,
395
+ // For better compatibility with different platforms
396
+ CGO_ENABLED: '0',
397
+ },
398
+ stdout: 'inherit',
399
+ stderr: 'inherit',
400
+ });
401
+ }));
402
+ }
403
+ /**
404
+ * Normalize a platform list based on options
405
+ */
406
+ export function normalizePlatforms(platforms, allPlatforms) {
407
+ if (!allPlatforms) {
408
+ return platforms;
409
+ }
410
+ // Add all platforms and remove duplicates
411
+ return [...new Set([...platforms, ...ALL_PLATFORMS])];
412
+ }
413
+ //# sourceMappingURL=toolchain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolchain.js","sourceRoot":"","sources":["../../../../../src/commands/router/plugin/toolchain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAa,MAAM,2BAA2B,CAAC;AACtG,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;AAC7D,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;AACtG,MAAM,gBAAgB,GACpB,2GAA2G,CAAC;AAE9G,kCAAkC;AAClC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK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D,WAAW,EAAE,GAAG;aACjB;YACD,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAmB,EAAE,YAAqB;IAC3E,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,0CAA0C;IAC1C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export declare const configDir: string;
2
+ export declare const dataDir: string;
2
3
  export declare const configFile: string;
3
4
  export declare const getLoginDetails: () => {
4
5
  accessToken: string;
@@ -5,6 +5,7 @@ import envPaths from 'env-paths';
5
5
  import info from '../../package.json' with { type: 'json' };
6
6
  const paths = envPaths('cosmo', { suffix: '' });
7
7
  export const configDir = paths.config;
8
+ export const dataDir = paths.data;
8
9
  export const configFile = join(configDir, 'config.yaml');
9
10
  export const getLoginDetails = () => {
10
11
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,IAAI,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5D,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;AACtC,MAAM,CAAC,MAAM,UAAU,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