@tolgee/cli 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/commands/push.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
import { extname, join } from 'path';
|
2
2
|
import { readdir, readFile, stat } from 'fs/promises';
|
3
3
|
import { Command, Option } from 'commander';
|
4
|
-
import { glob } from 'glob';
|
5
4
|
import { loading, success, error, warn, exitWithError, } from '../utils/logger.js';
|
6
5
|
import { askString } from '../utils/ask.js';
|
7
6
|
import { mapImportFormat } from '../utils/mapImportFormat.js';
|
8
7
|
import { handleLoadableError } from '../client/TolgeeClient.js';
|
8
|
+
import { windowsCompatibleGlob } from '../utils/windowsCompatibleGlob.js';
|
9
9
|
async function allInPattern(pattern) {
|
10
10
|
const files = [];
|
11
|
-
const items = await
|
11
|
+
const items = await windowsCompatibleGlob(pattern);
|
12
12
|
for (const item of items) {
|
13
13
|
if ((await stat(item)).isDirectory()) {
|
14
14
|
files.push(...(await readDirectory(item)));
|
package/dist/config/tolgeerc.js
CHANGED
package/dist/extractor/runner.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { glob } from 'glob';
|
2
1
|
import { extname } from 'path';
|
3
2
|
import { callWorker } from './worker.js';
|
4
3
|
import { exitWithError } from '../utils/logger.js';
|
4
|
+
import { windowsCompatibleGlob } from '../utils/windowsCompatibleGlob.js';
|
5
5
|
export const NullNamespace = Symbol('namespace.null');
|
6
6
|
function parseVerbose(v) {
|
7
7
|
return Array.isArray(v) ? v : v ? [] : undefined;
|
@@ -54,9 +54,8 @@ export async function extractKeysOfFiles(opts) {
|
|
54
54
|
if (!opts.patterns?.length) {
|
55
55
|
exitWithError("Missing '--patterns' or 'config.patterns' option");
|
56
56
|
}
|
57
|
-
const files = await
|
57
|
+
const files = await windowsCompatibleGlob(opts.patterns, {
|
58
58
|
nodir: true,
|
59
|
-
windowsPathsNoEscape: process.platform === 'win32',
|
60
59
|
});
|
61
60
|
if (files.length === 0) {
|
62
61
|
exitWithError('No files were matched for extraction');
|