@localheroai/cli 0.0.70 → 0.0.71-rc.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 (54) hide show
  1. package/dist/utils/translation-utils.js +11 -11
  2. package/dist/utils/translation-utils.js.map +1 -1
  3. package/package.json +1 -1
  4. package/dist/api/auth.d.ts +0 -2
  5. package/dist/api/client.d.ts +0 -3
  6. package/dist/api/imports.d.ts +0 -5
  7. package/dist/api/projects.d.ts +0 -2
  8. package/dist/api/translation-jobs.js +0 -28
  9. package/dist/api/translation-jobs.js.map +0 -1
  10. package/dist/api/translations.d.ts +0 -15
  11. package/dist/cli.d.ts +0 -2
  12. package/dist/commands/_sync.js +0 -22
  13. package/dist/commands/_sync.js.map +0 -1
  14. package/dist/commands/_translate.js +0 -3
  15. package/dist/commands/_translate.js.map +0 -1
  16. package/dist/commands/github-action.js +0 -111
  17. package/dist/commands/github-action.js.map +0 -1
  18. package/dist/commands/init.d.ts +0 -1
  19. package/dist/commands/login.d.ts +0 -16
  20. package/dist/commands/sync.d.ts +0 -20
  21. package/dist/commands/sync.js +0 -22
  22. package/dist/commands/sync.js.map +0 -1
  23. package/dist/commands/translate.d.ts +0 -14
  24. package/dist/index.d.ts +0 -5
  25. package/dist/types/index.d.ts +0 -75
  26. package/dist/types/translate/index.js +0 -2
  27. package/dist/types/translate/index.js.map +0 -1
  28. package/dist/utils/auth.d.ts +0 -2
  29. package/dist/utils/chunked-json-processor.js +0 -52
  30. package/dist/utils/chunked-json-processor.js.map +0 -1
  31. package/dist/utils/common.js +0 -9
  32. package/dist/utils/common.js.map +0 -1
  33. package/dist/utils/config.d.ts +0 -23
  34. package/dist/utils/errors.js +0 -37
  35. package/dist/utils/errors.js.map +0 -1
  36. package/dist/utils/files.d.ts +0 -32
  37. package/dist/utils/git-diff.js +0 -251
  38. package/dist/utils/git-diff.js.map +0 -1
  39. package/dist/utils/git.d.ts +0 -21
  40. package/dist/utils/github.d.ts +0 -241
  41. package/dist/utils/import-service.d.ts +0 -4
  42. package/dist/utils/po-utils-fallback.js +0 -254
  43. package/dist/utils/po-utils-fallback.js.map +0 -1
  44. package/dist/utils/prompt-service.d.ts +0 -44
  45. package/dist/utils/streaming-json-processor.js +0 -125
  46. package/dist/utils/streaming-json-processor.js.map +0 -1
  47. package/dist/utils/sync-service.d.ts +0 -58
  48. package/dist/utils/translation-updater/common.d.ts +0 -6
  49. package/dist/utils/translation-updater/index.d.ts +0 -5
  50. package/dist/utils/translation-updater/json-handler.d.ts +0 -5
  51. package/dist/utils/translation-updater/yaml-handler.d.ts +0 -5
  52. package/dist/utils/translation-utils.d.ts +0 -30
  53. package/dist/utils/updater.js +0 -38
  54. package/dist/utils/updater.js.map +0 -1
@@ -1,9 +0,0 @@
1
- /**
2
- * Sleep for a specified number of milliseconds
3
- * @param ms Number of milliseconds to sleep
4
- * @returns Promise that resolves after the specified time
5
- */
6
- export function sleep(ms) {
7
- return new Promise(resolve => setTimeout(resolve, ms));
8
- }
9
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC"}
@@ -1,23 +0,0 @@
1
- import { promises as fs } from 'fs';
2
- import path from 'path';
3
- import { AuthConfig, ProjectConfig } from '../types/index.js';
4
- interface ConfigDependencies {
5
- fs: typeof fs;
6
- path: typeof path;
7
- process: typeof process;
8
- cwd: () => string;
9
- }
10
- interface ConfigService {
11
- deps: ConfigDependencies;
12
- setDependencies(customDeps?: Partial<ConfigDependencies>): ConfigService;
13
- configFilePath(basePath?: string): string;
14
- getAuthConfig(basePath?: string): Promise<AuthConfig | null>;
15
- saveAuthConfig(config: AuthConfig, basePath?: string): Promise<void>;
16
- getProjectConfig(basePath?: string): Promise<ProjectConfig | null>;
17
- saveProjectConfig(config: Partial<ProjectConfig>, basePath?: string): Promise<void>;
18
- validateProjectConfig(config: ProjectConfig): Promise<boolean>;
19
- getValidProjectConfig(basePath?: string): Promise<ProjectConfig>;
20
- updateLastSyncedAt(basePath?: string): Promise<ProjectConfig>;
21
- }
22
- export declare const configService: ConfigService;
23
- export {};
@@ -1,37 +0,0 @@
1
- /**
2
- * Custom error class for CLI errors that should exit the process
3
- */
4
- export class CliError extends Error {
5
- exitCode;
6
- constructor(message, exitCode = 1) {
7
- super(message);
8
- this.name = 'CliError';
9
- this.exitCode = exitCode;
10
- }
11
- }
12
- /**
13
- * Create a new CLI error
14
- * @param message Error message
15
- * @param exitCode Optional exit code, defaults to 1
16
- * @returns A new CliError
17
- */
18
- export function cliError(message, exitCode = 1) {
19
- return new CliError(message, exitCode);
20
- }
21
- /**
22
- * Handle a CLI error
23
- * @param error The error to handle
24
- * @param exitProcess Whether to exit the process (defaults to true)
25
- * @returns The exit code if not exiting process
26
- */
27
- export function handleCliError(error, exitProcess = true) {
28
- const isCliError = error instanceof CliError;
29
- const exitCode = isCliError ? error.exitCode : 1;
30
- const message = error instanceof Error ? error.message : String(error);
31
- console.error(`\n✖ ${message}\n`);
32
- if (exitProcess) {
33
- process.exit(exitCode);
34
- }
35
- return exitCode;
36
- }
37
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,QAAQ,CAAS;IAEjB,YAAY,OAAe,EAAE,WAAmB,CAAC;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,WAAmB,CAAC;IAC5D,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,cAAuB,IAAI;IACxE,MAAM,UAAU,GAAG,KAAK,YAAY,QAAQ,CAAC;IAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEvE,OAAO,CAAC,KAAK,CAAC,OAAO,OAAO,IAAI,CAAC,CAAC;IAElC,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,32 +0,0 @@
1
- export function parseFile(content: any, format: any, filePath?: string): any;
2
- export function extractLocaleFromPath(filePath: any, localeRegex: any, knownLocales?: any[]): any;
3
- export function isValidLocale(locale: any): boolean;
4
- export function flattenTranslations(obj: any, parentKey?: string): {};
5
- export function findTranslationFiles(config: any, options?: {}): Promise<{
6
- path: any;
7
- format: string;
8
- locale: any;
9
- }[] | {
10
- allFiles: {
11
- path: any;
12
- format: string;
13
- locale: any;
14
- }[];
15
- sourceFiles: {
16
- path: any;
17
- format: string;
18
- locale: any;
19
- }[];
20
- targetFilesByLocale: {};
21
- }>;
22
- export function unflattenTranslations(flatObj: any): {};
23
- export function detectJsonFormat(obj: any): "nested" | "mixed" | "flat";
24
- export function preserveJsonStructure(originalObj: any, newTranslations: any, format: any): any;
25
- export function directoryExists(path: any, fsModule?: typeof fs): Promise<boolean>;
26
- export function findFirstExistingPath(paths: any, fsModule?: typeof fs): Promise<any>;
27
- export function getDirectoryContents(dir: any, fsModule?: typeof fs): Promise<{
28
- files: string[];
29
- jsonFiles: string[];
30
- yamlFiles: string[];
31
- } | null>;
32
- import { promises as fs } from 'fs';
@@ -1,251 +0,0 @@
1
- import { execSync } from 'child_process';
2
- import { readFileSync } from 'fs';
3
- import chalk from 'chalk';
4
- import { parseFile, flattenTranslations } from './files.js';
5
- /**
6
- * Git diff integration for --changed-only flag
7
- * This module filters translations to only include keys that changed in the current branch
8
- */
9
- /**
10
- * Main entry point for git diff filtering
11
- * Returns null to fall back, {} for no changes, or filtered data for success
12
- */
13
- export function filterByGitChanges(sourceFiles, missingByLocale, config, verbose) {
14
- try {
15
- // Quick validation
16
- if (!canUseGitDiff()) {
17
- if (verbose) {
18
- console.log(chalk.dim('Git not available or not in a repository'));
19
- }
20
- return null;
21
- }
22
- const baseBranch = getBaseBranch(config);
23
- if (verbose) {
24
- console.log(chalk.blue(`Comparing against: ${baseBranch}`));
25
- }
26
- // Validate and check if base branch exists
27
- let safeBranch;
28
- try {
29
- safeBranch = sanitizeBranchName(baseBranch);
30
- }
31
- catch (error) {
32
- if (verbose) {
33
- const err = error;
34
- console.log(chalk.yellow(`Invalid branch name: ${err.message}`));
35
- }
36
- return null;
37
- }
38
- if (!branchExists(safeBranch)) {
39
- if (verbose) {
40
- console.log(chalk.yellow(`Base branch '${baseBranch}' not found`));
41
- }
42
- return null;
43
- }
44
- // Get changed keys from source files
45
- const changedKeys = getChangedKeys(sourceFiles, safeBranch, verbose);
46
- if (changedKeys.size === 0) {
47
- if (verbose) {
48
- console.log(chalk.dim('No changes detected in source files'));
49
- }
50
- return {};
51
- }
52
- if (verbose) {
53
- console.log(chalk.blue(`Found ${changedKeys.size} changed key${changedKeys.size === 1 ? '' : 's'}:`));
54
- // Show first 10 keys, with indication if there are more
55
- const keysArray = Array.from(changedKeys);
56
- const displayKeys = keysArray.slice(0, 10);
57
- displayKeys.forEach(key => {
58
- console.log(chalk.dim(` - ${key}`));
59
- });
60
- if (keysArray.length > 10) {
61
- console.log(chalk.dim(` ... and ${keysArray.length - 10} more`));
62
- }
63
- }
64
- // Filter missing translations by changed keys
65
- return filterMissing(missingByLocale, changedKeys);
66
- }
67
- catch (error) {
68
- if (verbose) {
69
- const err = error;
70
- console.log(chalk.yellow(`Git diff failed: ${err.message}`));
71
- }
72
- return null;
73
- }
74
- }
75
- /**
76
- * Check if git is available and we're in a repository
77
- */
78
- export function canUseGitDiff() {
79
- try {
80
- execSync('git rev-parse --git-dir', { stdio: 'ignore' });
81
- return true;
82
- }
83
- catch {
84
- return false;
85
- }
86
- }
87
- /**
88
- * Get base branch from config, environment, or default
89
- */
90
- function getBaseBranch(config) {
91
- return config.translationFiles?.baseBranch
92
- || process.env.GITHUB_BASE_REF
93
- || 'main';
94
- }
95
- /**
96
- * Sanitize branch name to prevent command injection
97
- * Allows only alphanumeric, hyphen, and underscore
98
- * Supports remote branches like origin/main explicitly
99
- */
100
- function sanitizeBranchName(branch) {
101
- // Handle remote branches explicitly (e.g., origin/main)
102
- if (branch.startsWith('origin/')) {
103
- const remotePart = 'origin/';
104
- const branchPart = branch.slice(remotePart.length).replace(/[^a-zA-Z0-9_\-]/g, '');
105
- if (!branchPart) {
106
- throw new Error(`Invalid branch name: ${branch}`);
107
- }
108
- return remotePart + branchPart;
109
- }
110
- // For local branches, no slashes allowed (prevents path traversal)
111
- const sanitized = branch.replace(/[^a-zA-Z0-9_\-]/g, '');
112
- if (!sanitized) {
113
- throw new Error(`Invalid branch name: ${branch}`);
114
- }
115
- return sanitized;
116
- }
117
- /**
118
- * Sanitize file path for use in git commands
119
- * Removes characters that could break out of quotes
120
- */
121
- function sanitizeGitPath(path) {
122
- return path.replace(/["'`$\\]/g, '');
123
- }
124
- /**
125
- * Check if a branch exists (local or remote)
126
- * @param branch - Already sanitized branch name
127
- */
128
- function branchExists(branch) {
129
- try {
130
- execSync(`git rev-parse --verify ${branch}`, { stdio: 'ignore' });
131
- return true;
132
- }
133
- catch {
134
- // If not a remote branch already, try with origin/ prefix
135
- if (!branch.startsWith('origin/')) {
136
- try {
137
- execSync(`git rev-parse --verify origin/${branch}`, { stdio: 'ignore' });
138
- return true;
139
- }
140
- catch {
141
- return false;
142
- }
143
- }
144
- return false;
145
- }
146
- }
147
- /**
148
- * Get all changed keys from source files using object-based diff
149
- * Compares parsed and flattened objects from base branch vs current working directory
150
- * @param baseBranch - Already sanitized branch name
151
- */
152
- function getChangedKeys(sourceFiles, baseBranch, verbose) {
153
- const allChangedKeys = new Set();
154
- for (const file of sourceFiles) {
155
- try {
156
- // Sanitize file path for git command
157
- const sanitizedPath = sanitizeGitPath(file.path);
158
- // Get old version from base branch
159
- let oldFlat = {};
160
- try {
161
- const oldContent = execSync(`git show ${baseBranch}:"${sanitizedPath}"`, {
162
- encoding: 'utf-8',
163
- maxBuffer: 10 * 1024 * 1024,
164
- stdio: ['pipe', 'pipe', 'ignore']
165
- });
166
- const oldObj = parseFile(oldContent, file.format, file.path);
167
- oldFlat = flattenTranslations(oldObj);
168
- }
169
- catch (error) {
170
- const err = error;
171
- if (verbose) {
172
- // Check if it's a git error (file doesn't exist) or parse error
173
- if (err.message.includes('exists on disk, but not in') || err.message.includes('does not exist')) {
174
- console.log(chalk.dim(` ${file.path}: new file (all keys changed)`));
175
- }
176
- else {
177
- console.log(chalk.yellow(` ${file.path}: Parse error - ${err.message}`));
178
- }
179
- }
180
- // If parse fails or file doesn't exist, oldFlat remains {} - all keys will be treated as new
181
- }
182
- // Get current version from working directory
183
- const newContent = readFileSync(file.path, 'utf-8');
184
- const newObj = parseFile(newContent, file.format, file.path);
185
- const newFlat = flattenTranslations(newObj);
186
- // Compare flattened objects to find changed keys
187
- const fileChangedKeys = [];
188
- const MAX_KEYS_TO_COLLECT = 100; // Cap to prevent memory issues
189
- let totalChangedInFile = 0;
190
- for (const [key, value] of Object.entries(newFlat)) {
191
- // Check if key exists in old using 'in' operator (handles falsy values correctly)
192
- const keyExistsInOld = key in oldFlat;
193
- if (!keyExistsInOld || oldFlat[key] !== value) {
194
- allChangedKeys.add(key);
195
- totalChangedInFile++;
196
- // Only collect keys for verbose output up to a limit
197
- if (verbose && fileChangedKeys.length < MAX_KEYS_TO_COLLECT) {
198
- fileChangedKeys.push(key);
199
- }
200
- }
201
- }
202
- if (verbose && totalChangedInFile > 0) {
203
- console.log(chalk.dim(` ${file.path}: ${totalChangedInFile} changed key${totalChangedInFile === 1 ? '' : 's'}`));
204
- // Show first 5 keys per file
205
- const displayKeys = fileChangedKeys.slice(0, 5);
206
- displayKeys.forEach(key => {
207
- const status = (key in oldFlat) ? 'modified' : 'new';
208
- console.log(chalk.dim(` - ${key} (${status})`));
209
- });
210
- if (totalChangedInFile > 5) {
211
- console.log(chalk.dim(` ... and ${totalChangedInFile - 5} more`));
212
- }
213
- }
214
- }
215
- catch (error) {
216
- // Skip this file, continue with others
217
- if (verbose) {
218
- const err = error;
219
- console.log(chalk.dim(` Skipping ${file.path}: ${err.message}`));
220
- }
221
- }
222
- }
223
- return allChangedKeys;
224
- }
225
- /**
226
- * Filter missing translations by changed keys
227
- */
228
- function filterMissing(missingByLocale, changedKeys) {
229
- const filtered = {};
230
- for (const [localeKey, entry] of Object.entries(missingByLocale)) {
231
- // Filter the keys Record to only include changed keys
232
- const filteredKeys = {};
233
- let count = 0;
234
- for (const [key, details] of Object.entries(entry.keys)) {
235
- if (changedKeys.has(key)) {
236
- filteredKeys[key] = details;
237
- count++;
238
- }
239
- }
240
- // Only include this entry if it has matching keys
241
- if (count > 0) {
242
- filtered[localeKey] = {
243
- ...entry,
244
- keys: filteredKeys,
245
- keyCount: count
246
- };
247
- }
248
- }
249
- return filtered;
250
- }
251
- //# sourceMappingURL=git-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-diff.js","sourceRoot":"","sources":["../../src/utils/git-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,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CAAC;YACf,uCAAuC;YACvC,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,GAAG,GAAG,KAAc,CAAC;gBAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CACpB,eAAmD,EACnD,WAAwB;IAExB,MAAM,QAAQ,GAAuC,EAAE,CAAC;IAExD,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QACjE,sDAAsD;QACtD,MAAM,YAAY,GAAwB,EAAE,CAAC;QAC7C,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACxD,IAAI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;gBAC5B,KAAK,EAAE,CAAC;YACV,CAAC;QACH,CAAC;QAED,kDAAkD;QAClD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,QAAQ,CAAC,SAAS,CAAC,GAAG;gBACpB,GAAG,KAAK;gBACR,IAAI,EAAE,YAAY;gBAClB,QAAQ,EAAE,KAAK;aAChB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,21 +0,0 @@
1
- import { promises as fs } from 'fs';
2
- import path from 'path';
3
- interface ExecResult {
4
- stdout: string;
5
- stderr: string;
6
- }
7
- interface GitDependencies {
8
- fs: typeof fs;
9
- path: typeof path;
10
- exec: (file: string, args: string[]) => Promise<ExecResult>;
11
- }
12
- interface GitService {
13
- deps: GitDependencies;
14
- setDependencies: (customDeps?: Partial<GitDependencies>) => GitService;
15
- updateGitignore: (basePath: string) => Promise<boolean>;
16
- getCurrentBranch: () => Promise<string | null>;
17
- }
18
- export declare const gitService: GitService;
19
- export declare function updateGitignore(basePath: string): Promise<boolean>;
20
- export declare function getCurrentBranch(): Promise<string | null>;
21
- export {};
@@ -1,241 +0,0 @@
1
- export function createGitHubActionFile(basePath: any, translationPaths: any): Promise<string>;
2
- export function workflowExists(basePath: any): boolean;
3
- export function autoCommitChanges(filesPath: any): void;
4
- export namespace githubService {
5
- namespace deps {
6
- export function exec(cmd: any, options: any): string;
7
- export let fs: {
8
- existsSync: typeof existsSync;
9
- access(path: import("fs").PathLike, mode?: number): Promise<void>;
10
- copyFile(src: import("fs").PathLike, dest: import("fs").PathLike, mode?: number): Promise<void>;
11
- open(path: import("fs").PathLike, flags?: string | number, mode?: import("fs").Mode): Promise<fs.FileHandle>;
12
- rename(oldPath: import("fs").PathLike, newPath: import("fs").PathLike): Promise<void>;
13
- truncate(path: import("fs").PathLike, len?: number): Promise<void>;
14
- rmdir(path: import("fs").PathLike, options?: import("fs").RmDirOptions): Promise<void>;
15
- rm(path: import("fs").PathLike, options?: import("fs").RmOptions): Promise<void>;
16
- mkdir(path: import("fs").PathLike, options: import("fs").MakeDirectoryOptions & {
17
- recursive: true;
18
- }): Promise<string | undefined>;
19
- mkdir(path: import("fs").PathLike, options?: import("fs").Mode | (import("fs").MakeDirectoryOptions & {
20
- recursive?: false | undefined;
21
- }) | null): Promise<void>;
22
- mkdir(path: import("fs").PathLike, options?: import("fs").Mode | import("fs").MakeDirectoryOptions | null): Promise<string | undefined>;
23
- readdir(path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
24
- withFileTypes?: false | undefined;
25
- recursive?: boolean | undefined;
26
- }) | BufferEncoding | null): Promise<string[]>;
27
- readdir(path: import("fs").PathLike, options: {
28
- encoding: "buffer";
29
- withFileTypes?: false | undefined;
30
- recursive?: boolean | undefined;
31
- } | "buffer"): Promise<Buffer[]>;
32
- readdir(path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
33
- withFileTypes?: false | undefined;
34
- recursive?: boolean | undefined;
35
- }) | BufferEncoding | null): Promise<string[] | Buffer[]>;
36
- readdir(path: import("fs").PathLike, options: import("fs").ObjectEncodingOptions & {
37
- withFileTypes: true;
38
- recursive?: boolean | undefined;
39
- }): Promise<import("fs").Dirent[]>;
40
- readlink(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
41
- readlink(path: import("fs").PathLike, options: import("fs").BufferEncodingOption): Promise<Buffer>;
42
- readlink(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | string | null): Promise<string | Buffer>;
43
- symlink(target: import("fs").PathLike, path: import("fs").PathLike, type?: string | null): Promise<void>;
44
- lstat(path: import("fs").PathLike, opts?: import("fs").StatOptions & {
45
- bigint?: false | undefined;
46
- }): Promise<import("fs").Stats>;
47
- lstat(path: import("fs").PathLike, opts: import("fs").StatOptions & {
48
- bigint: true;
49
- }): Promise<import("fs").BigIntStats>;
50
- lstat(path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
51
- stat(path: import("fs").PathLike, opts?: import("fs").StatOptions & {
52
- bigint?: false | undefined;
53
- }): Promise<import("fs").Stats>;
54
- stat(path: import("fs").PathLike, opts: import("fs").StatOptions & {
55
- bigint: true;
56
- }): Promise<import("fs").BigIntStats>;
57
- stat(path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
58
- statfs(path: import("fs").PathLike, opts?: import("fs").StatFsOptions & {
59
- bigint?: false | undefined;
60
- }): Promise<import("fs").StatsFs>;
61
- statfs(path: import("fs").PathLike, opts: import("fs").StatFsOptions & {
62
- bigint: true;
63
- }): Promise<import("fs").BigIntStatsFs>;
64
- statfs(path: import("fs").PathLike, opts?: import("fs").StatFsOptions): Promise<import("fs").StatsFs | import("fs").BigIntStatsFs>;
65
- link(existingPath: import("fs").PathLike, newPath: import("fs").PathLike): Promise<void>;
66
- unlink(path: import("fs").PathLike): Promise<void>;
67
- chmod(path: import("fs").PathLike, mode: import("fs").Mode): Promise<void>;
68
- lchmod(path: import("fs").PathLike, mode: import("fs").Mode): Promise<void>;
69
- lchown(path: import("fs").PathLike, uid: number, gid: number): Promise<void>;
70
- lutimes(path: import("fs").PathLike, atime: import("fs").TimeLike, mtime: import("fs").TimeLike): Promise<void>;
71
- chown(path: import("fs").PathLike, uid: number, gid: number): Promise<void>;
72
- utimes(path: import("fs").PathLike, atime: import("fs").TimeLike, mtime: import("fs").TimeLike): Promise<void>;
73
- realpath(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
74
- realpath(path: import("fs").PathLike, options: import("fs").BufferEncodingOption): Promise<Buffer>;
75
- realpath(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
76
- mkdtemp(prefix: string, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
77
- mkdtemp(prefix: string, options: import("fs").BufferEncodingOption): Promise<Buffer>;
78
- mkdtemp(prefix: string, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
79
- writeFile(file: import("fs").PathLike | fs.FileHandle, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | import("stream"), options?: (import("fs").ObjectEncodingOptions & {
80
- mode?: import("fs").Mode | undefined;
81
- flag?: import("fs").OpenMode | undefined;
82
- flush?: boolean | undefined;
83
- } & import("events").Abortable) | BufferEncoding | null): Promise<void>;
84
- appendFile(path: import("fs").PathLike | fs.FileHandle, data: string | Uint8Array, options?: (import("fs").ObjectEncodingOptions & fs.FlagAndOpenMode & {
85
- flush?: boolean | undefined;
86
- }) | BufferEncoding | null): Promise<void>;
87
- readFile(path: import("fs").PathLike | fs.FileHandle, options?: ({
88
- encoding?: null | undefined;
89
- flag?: import("fs").OpenMode | undefined;
90
- } & import("events").Abortable) | null): Promise<Buffer>;
91
- readFile(path: import("fs").PathLike | fs.FileHandle, options: ({
92
- encoding: BufferEncoding;
93
- flag?: import("fs").OpenMode | undefined;
94
- } & import("events").Abortable) | BufferEncoding): Promise<string>;
95
- readFile(path: import("fs").PathLike | fs.FileHandle, options?: (import("fs").ObjectEncodingOptions & import("events").Abortable & {
96
- flag?: import("fs").OpenMode | undefined;
97
- }) | BufferEncoding | null): Promise<string | Buffer>;
98
- opendir(path: import("fs").PathLike, options?: import("fs").OpenDirOptions): Promise<import("fs").Dir>;
99
- watch(filename: import("fs").PathLike, options: (import("fs").WatchOptions & {
100
- encoding: "buffer";
101
- }) | "buffer"): AsyncIterable<fs.FileChangeInfo<Buffer>>;
102
- watch(filename: import("fs").PathLike, options?: import("fs").WatchOptions | BufferEncoding): AsyncIterable<fs.FileChangeInfo<string>>;
103
- watch(filename: import("fs").PathLike, options: import("fs").WatchOptions | string): AsyncIterable<fs.FileChangeInfo<string>> | AsyncIterable<fs.FileChangeInfo<Buffer>>;
104
- cp(source: string | URL, destination: string | URL, opts?: import("fs").CopyOptions): Promise<void>;
105
- glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
106
- glob(pattern: string | string[], opt: import("fs").GlobOptionsWithFileTypes): NodeJS.AsyncIterator<import("fs").Dirent>;
107
- glob(pattern: string | string[], opt: import("fs").GlobOptionsWithoutFileTypes): NodeJS.AsyncIterator<string>;
108
- glob(pattern: string | string[], opt: import("fs").GlobOptions): NodeJS.AsyncIterator<import("fs").Dirent | string>;
109
- constants: typeof import("fs").constants;
110
- };
111
- export { path };
112
- export let env: NodeJS.ProcessEnv;
113
- }
114
- function setDependencies(customDeps?: {}): {
115
- deps: {
116
- exec: (cmd: any, options: any) => string;
117
- fs: {
118
- existsSync: typeof existsSync;
119
- access(path: import("fs").PathLike, mode?: number): Promise<void>;
120
- copyFile(src: import("fs").PathLike, dest: import("fs").PathLike, mode?: number): Promise<void>;
121
- open(path: import("fs").PathLike, flags?: string | number, mode?: import("fs").Mode): Promise<fs.FileHandle>;
122
- rename(oldPath: import("fs").PathLike, newPath: import("fs").PathLike): Promise<void>;
123
- truncate(path: import("fs").PathLike, len?: number): Promise<void>;
124
- rmdir(path: import("fs").PathLike, options?: import("fs").RmDirOptions): Promise<void>;
125
- rm(path: import("fs").PathLike, options?: import("fs").RmOptions): Promise<void>;
126
- mkdir(path: import("fs").PathLike, options: import("fs").MakeDirectoryOptions & {
127
- recursive: true;
128
- }): Promise<string | undefined>;
129
- mkdir(path: import("fs").PathLike, options?: import("fs").Mode | (import("fs").MakeDirectoryOptions & {
130
- recursive?: false | undefined;
131
- }) | null): Promise<void>;
132
- mkdir(path: import("fs").PathLike, options?: import("fs").Mode | import("fs").MakeDirectoryOptions | null): Promise<string | undefined>;
133
- readdir(path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
134
- withFileTypes?: false | undefined;
135
- recursive?: boolean | undefined;
136
- }) | BufferEncoding | null): Promise<string[]>;
137
- readdir(path: import("fs").PathLike, options: {
138
- encoding: "buffer";
139
- withFileTypes?: false | undefined;
140
- recursive?: boolean | undefined;
141
- } | "buffer"): Promise<Buffer[]>;
142
- readdir(path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
143
- withFileTypes?: false | undefined;
144
- recursive?: boolean | undefined;
145
- }) | BufferEncoding | null): Promise<string[] | Buffer[]>;
146
- readdir(path: import("fs").PathLike, options: import("fs").ObjectEncodingOptions & {
147
- withFileTypes: true;
148
- recursive?: boolean | undefined;
149
- }): Promise<import("fs").Dirent[]>;
150
- readlink(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
151
- readlink(path: import("fs").PathLike, options: import("fs").BufferEncodingOption): Promise<Buffer>;
152
- readlink(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | string | null): Promise<string | Buffer>;
153
- symlink(target: import("fs").PathLike, path: import("fs").PathLike, type?: string | null): Promise<void>;
154
- lstat(path: import("fs").PathLike, opts?: import("fs").StatOptions & {
155
- bigint?: false | undefined;
156
- }): Promise<import("fs").Stats>;
157
- lstat(path: import("fs").PathLike, opts: import("fs").StatOptions & {
158
- bigint: true;
159
- }): Promise<import("fs").BigIntStats>;
160
- lstat(path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
161
- stat(path: import("fs").PathLike, opts?: import("fs").StatOptions & {
162
- bigint?: false | undefined;
163
- }): Promise<import("fs").Stats>;
164
- stat(path: import("fs").PathLike, opts: import("fs").StatOptions & {
165
- bigint: true;
166
- }): Promise<import("fs").BigIntStats>;
167
- stat(path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
168
- statfs(path: import("fs").PathLike, opts?: import("fs").StatFsOptions & {
169
- bigint?: false | undefined;
170
- }): Promise<import("fs").StatsFs>;
171
- statfs(path: import("fs").PathLike, opts: import("fs").StatFsOptions & {
172
- bigint: true;
173
- }): Promise<import("fs").BigIntStatsFs>;
174
- statfs(path: import("fs").PathLike, opts?: import("fs").StatFsOptions): Promise<import("fs").StatsFs | import("fs").BigIntStatsFs>;
175
- link(existingPath: import("fs").PathLike, newPath: import("fs").PathLike): Promise<void>;
176
- unlink(path: import("fs").PathLike): Promise<void>;
177
- chmod(path: import("fs").PathLike, mode: import("fs").Mode): Promise<void>;
178
- lchmod(path: import("fs").PathLike, mode: import("fs").Mode): Promise<void>;
179
- lchown(path: import("fs").PathLike, uid: number, gid: number): Promise<void>;
180
- lutimes(path: import("fs").PathLike, atime: import("fs").TimeLike, mtime: import("fs").TimeLike): Promise<void>;
181
- chown(path: import("fs").PathLike, uid: number, gid: number): Promise<void>;
182
- utimes(path: import("fs").PathLike, atime: import("fs").TimeLike, mtime: import("fs").TimeLike): Promise<void>;
183
- realpath(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
184
- realpath(path: import("fs").PathLike, options: import("fs").BufferEncodingOption): Promise<Buffer>;
185
- realpath(path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
186
- mkdtemp(prefix: string, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
187
- mkdtemp(prefix: string, options: import("fs").BufferEncodingOption): Promise<Buffer>;
188
- mkdtemp(prefix: string, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
189
- writeFile(file: import("fs").PathLike | fs.FileHandle, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | import("stream"), options?: (import("fs").ObjectEncodingOptions & {
190
- mode?: import("fs").Mode | undefined;
191
- flag?: import("fs").OpenMode | undefined;
192
- flush?: boolean | undefined;
193
- } & import("events").Abortable) | BufferEncoding | null): Promise<void>;
194
- appendFile(path: import("fs").PathLike | fs.FileHandle, data: string | Uint8Array, options?: (import("fs").ObjectEncodingOptions & fs.FlagAndOpenMode & {
195
- flush?: boolean | undefined;
196
- }) | BufferEncoding | null): Promise<void>;
197
- readFile(path: import("fs").PathLike | fs.FileHandle, options?: ({
198
- encoding?: null | undefined;
199
- flag?: import("fs").OpenMode | undefined;
200
- } & import("events").Abortable) | null): Promise<Buffer>;
201
- readFile(path: import("fs").PathLike | fs.FileHandle, options: ({
202
- encoding: BufferEncoding;
203
- flag?: import("fs").OpenMode | undefined;
204
- } & import("events").Abortable) | BufferEncoding): Promise<string>;
205
- readFile(path: import("fs").PathLike | fs.FileHandle, options?: (import("fs").ObjectEncodingOptions & import("events").Abortable & {
206
- flag?: import("fs").OpenMode | undefined;
207
- }) | BufferEncoding | null): Promise<string | Buffer>;
208
- opendir(path: import("fs").PathLike, options?: import("fs").OpenDirOptions): Promise<import("fs").Dir>;
209
- watch(filename: import("fs").PathLike, options: (import("fs").WatchOptions & {
210
- encoding: "buffer";
211
- }) | "buffer"): AsyncIterable<fs.FileChangeInfo<Buffer>>;
212
- watch(filename: import("fs").PathLike, options?: import("fs").WatchOptions | BufferEncoding): AsyncIterable<fs.FileChangeInfo<string>>;
213
- watch(filename: import("fs").PathLike, options: import("fs").WatchOptions | string): AsyncIterable<fs.FileChangeInfo<string>> | AsyncIterable<fs.FileChangeInfo<Buffer>>;
214
- cp(source: string | URL, destination: string | URL, opts?: import("fs").CopyOptions): Promise<void>;
215
- glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
216
- glob(pattern: string | string[], opt: import("fs").GlobOptionsWithFileTypes): NodeJS.AsyncIterator<import("fs").Dirent>;
217
- glob(pattern: string | string[], opt: import("fs").GlobOptionsWithoutFileTypes): NodeJS.AsyncIterator<string>;
218
- glob(pattern: string | string[], opt: import("fs").GlobOptions): NodeJS.AsyncIterator<import("fs").Dirent | string>;
219
- constants: typeof import("fs").constants;
220
- };
221
- path: path.PlatformPath;
222
- env: NodeJS.ProcessEnv;
223
- };
224
- setDependencies(customDeps?: {}): /*elided*/ any;
225
- isGitHubAction(): boolean;
226
- workflowExists(basePath: any): boolean;
227
- getWorkflowDir(basePath: any): string;
228
- getGithubActionWorkflowFilePath(basePath: any): string;
229
- createGitHubActionFile(basePath: any, translationPaths: any): Promise<string>;
230
- autoCommitChanges(filesPath: any): void;
231
- };
232
- function isGitHubAction(): boolean;
233
- function workflowExists(basePath: any): boolean;
234
- function getWorkflowDir(basePath: any): string;
235
- function getGithubActionWorkflowFilePath(basePath: any): string;
236
- function createGitHubActionFile(basePath: any, translationPaths: any): Promise<string>;
237
- function autoCommitChanges(filesPath: any): void;
238
- }
239
- import { existsSync } from 'fs';
240
- import { promises as fs_1 } from 'fs';
241
- import path from 'path';
@@ -1,4 +0,0 @@
1
- export namespace importService {
2
- function findTranslationFiles(config: any, basePath?: string): Promise<any>;
3
- function importTranslations(config: any, basePath?: string): Promise<any>;
4
- }