@intlayer/chokidar 5.1.8 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chokidar/watcher.cjs +2 -36
- package/dist/cjs/chokidar/watcher.cjs.map +1 -1
- package/dist/cjs/index.cjs +2 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +83 -0
- package/dist/cjs/prepareIntlayer.cjs.map +1 -0
- package/dist/cjs/writeConfiguration/index.cjs +39 -0
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -0
- package/dist/esm/chokidar/watcher.mjs +1 -24
- package/dist/esm/chokidar/watcher.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +55 -0
- package/dist/esm/prepareIntlayer.mjs.map +1 -0
- package/dist/esm/writeConfiguration/index.mjs +15 -0
- package/dist/esm/writeConfiguration/index.mjs.map +1 -0
- package/dist/types/chokidar/watcher.d.ts +0 -1
- package/dist/types/chokidar/watcher.d.ts.map +1 -1
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadDistantDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -1
- package/dist/types/mergeDictionaries.d.ts.map +1 -1
- package/dist/types/prepareIntlayer.d.ts +3 -0
- package/dist/types/prepareIntlayer.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18next_dictionary/buildI18nextDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertContentDeclarationInto18nDictionaries.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertPluralsValues.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/i18next_dictionary/writeDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/reactIntl_dictionary/writeDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/dictionary_to_type/createModuleAugmentation.d.ts.map +1 -1
- package/dist/types/transpiler/dictionary_to_type/createType.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/writeConfiguration/index.d.ts +3 -0
- package/dist/types/writeConfiguration/index.d.ts.map +1 -0
- package/package.json +11 -11
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,55 +15,24 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var watcher_exports = {};
|
|
30
20
|
__export(watcher_exports, {
|
|
31
21
|
buildAndWatchIntlayer: () => buildAndWatchIntlayer,
|
|
32
22
|
handleAdditionalContentDeclarationFile: () => handleAdditionalContentDeclarationFile,
|
|
33
23
|
handleContentDeclarationFileChange: () => handleContentDeclarationFileChange,
|
|
34
|
-
prepareIntlayer: () => prepareIntlayer,
|
|
35
24
|
watch: () => watch
|
|
36
25
|
});
|
|
37
26
|
module.exports = __toCommonJS(watcher_exports);
|
|
38
27
|
var import_path = require("path");
|
|
39
28
|
var import_config = require("@intlayer/config");
|
|
40
29
|
var import_chokidar = require("chokidar");
|
|
41
|
-
var import_fast_glob = __toESM(require("fast-glob"));
|
|
42
|
-
var import_cleanOutputDir = require('../cleanOutputDir.cjs');
|
|
43
30
|
var import_getDictionariesPath = require('../getDictionariesPath.cjs');
|
|
44
|
-
var import_loadDictionaries = require('../loadDictionaries/loadDictionaries.cjs');
|
|
45
31
|
var import_loadLocalDictionaries = require('../loadDictionaries/loadLocalDictionaries.cjs');
|
|
46
32
|
var import_declaration_file_to_dictionary = require('../transpiler/declaration_file_to_dictionary/index.cjs');
|
|
47
33
|
var import_createDictionaryEntryPoint = require('../transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs');
|
|
48
34
|
var import_dictionary_to_type = require('../transpiler/dictionary_to_type/index.cjs');
|
|
49
|
-
|
|
50
|
-
const { content } = configuration ?? (0, import_config.getConfiguration)({
|
|
51
|
-
verbose: true
|
|
52
|
-
});
|
|
53
|
-
const { watchedFilesPatternWithPath } = content;
|
|
54
|
-
(0, import_cleanOutputDir.cleanOutputDir)();
|
|
55
|
-
(0, import_config.appLogger)("Output directory cleaned", {
|
|
56
|
-
isVerbose: true
|
|
57
|
-
});
|
|
58
|
-
const files = import_fast_glob.default.sync(watchedFilesPatternWithPath);
|
|
59
|
-
const dictionaries = await (0, import_loadDictionaries.loadDictionaries)(files);
|
|
60
|
-
const dictionariesPaths = await (0, import_declaration_file_to_dictionary.buildDictionary)(dictionaries);
|
|
61
|
-
(0, import_dictionary_to_type.createTypes)(dictionariesPaths);
|
|
62
|
-
(0, import_createDictionaryEntryPoint.createDictionaryEntryPoint)();
|
|
63
|
-
(0, import_config.appLogger)("Dictionaries built");
|
|
64
|
-
(0, import_dictionary_to_type.createModuleAugmentation)();
|
|
65
|
-
(0, import_config.appLogger)("Module augmentation built", {
|
|
66
|
-
isVerbose: true
|
|
67
|
-
});
|
|
68
|
-
};
|
|
35
|
+
var import_prepareIntlayer = require('../prepareIntlayer.cjs');
|
|
69
36
|
const handleAdditionalContentDeclarationFile = async (filePath, configuration) => {
|
|
70
37
|
const { content } = configuration ?? (0, import_config.getConfiguration)({
|
|
71
38
|
verbose: true
|
|
@@ -141,7 +108,7 @@ const watch = (options) => {
|
|
|
141
108
|
};
|
|
142
109
|
const buildAndWatchIntlayer = async (options) => {
|
|
143
110
|
const configuration = options?.configuration ?? (0, import_config.getConfiguration)();
|
|
144
|
-
await prepareIntlayer(configuration);
|
|
111
|
+
await (0, import_prepareIntlayer.prepareIntlayer)(configuration);
|
|
145
112
|
if (configuration.content.watch) {
|
|
146
113
|
watch({ ...options, configuration });
|
|
147
114
|
}
|
|
@@ -151,7 +118,6 @@ const buildAndWatchIntlayer = async (options) => {
|
|
|
151
118
|
buildAndWatchIntlayer,
|
|
152
119
|
handleAdditionalContentDeclarationFile,
|
|
153
120
|
handleContentDeclarationFileChange,
|
|
154
|
-
prepareIntlayer,
|
|
155
121
|
watch
|
|
156
122
|
});
|
|
157
123
|
//# sourceMappingURL=watcher.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/chokidar/watcher.ts"],"sourcesContent":["import { relative } from 'path';\nimport {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\n/** @ts-ignore remove error Module '\"chokidar\"' has no exported member 'ChokidarOptions' */\nimport { type ChokidarOptions, watch as chokidarWatch } from 'chokidar';\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/chokidar/watcher.ts"],"sourcesContent":["import { relative } from 'path';\nimport {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\n/** @ts-ignore remove error Module '\"chokidar\"' has no exported member 'ChokidarOptions' */\nimport { type ChokidarOptions, watch as chokidarWatch } from 'chokidar';\nimport { getDictionariesPath } from '../getDictionariesPath';\nimport { loadLocalDictionaries } from '../loadDictionaries/loadLocalDictionaries';\nimport { buildDictionary } from '../transpiler/declaration_file_to_dictionary/index';\nimport { createDictionaryEntryPoint } from '../transpiler/dictionary_to_main/createDictionaryEntryPoint';\nimport {\n createTypes,\n createModuleAugmentation,\n} from '../transpiler/dictionary_to_type/index';\nimport { prepareIntlayer } from '../prepareIntlayer';\n\nexport const handleAdditionalContentDeclarationFile = async (\n filePath: string,\n configuration?: IntlayerConfig\n) => {\n const { content } =\n configuration ??\n getConfiguration({\n verbose: true,\n });\n\n // Process the file with the functionToRun\n appLogger(\n `Additional file detected: ${relative(content.baseDir, filePath)}`,\n {\n isVerbose: true,\n }\n );\n\n const localeDictionaries = await loadLocalDictionaries(filePath);\n\n const dictionariesPaths = await buildDictionary(localeDictionaries);\n\n createTypes(dictionariesPaths);\n\n createDictionaryEntryPoint();\n\n appLogger('Dictionaries built', {\n isVerbose: true,\n });\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n};\n\nexport const handleContentDeclarationFileChange = async (\n filePath: string,\n configuration?: IntlayerConfig\n) => {\n const { content } =\n configuration ??\n getConfiguration({\n verbose: true,\n });\n\n // Process the file with the functionToRun\n appLogger(`Change detected: ${relative(content.baseDir, filePath)}`, {\n isVerbose: true,\n });\n\n const localeDictionaries = await loadLocalDictionaries(filePath);\n const updatedDictionariesPaths = await buildDictionary(localeDictionaries);\n const allDictionariesPaths: string[] = getDictionariesPath();\n\n createTypes(updatedDictionariesPaths);\n appLogger('TypeScript types built', {\n isVerbose: true,\n });\n\n if (\n updatedDictionariesPaths.some((updatedDictionaryPath) =>\n allDictionariesPaths.includes(updatedDictionaryPath)\n )\n ) {\n createDictionaryEntryPoint();\n\n appLogger('Dictionary list built', {\n isVerbose: true,\n });\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n }\n};\n\ntype WatchOptions = ChokidarOptions & {\n configuration?: IntlayerConfig;\n};\n\n// Initialize chokidar watcher (non-persistent)\nexport const watch = (options?: WatchOptions) => {\n const configuration =\n options?.configuration ??\n getConfiguration({\n verbose: true,\n });\n\n const { watch: isWatchMode, watchedFilesPatternWithPath } =\n configuration.content;\n\n /** @ts-ignore remove error Expected 0-1 arguments, but got 2. */\n return chokidarWatch(watchedFilesPatternWithPath, {\n persistent: isWatchMode, // Make the watcher persistent\n ignoreInitial: true, // Process existing files\n ...options,\n })\n .on(\n 'add',\n async (filePath) =>\n await handleAdditionalContentDeclarationFile(filePath, configuration)\n )\n .on(\n 'change',\n async (filePath) =>\n await handleContentDeclarationFileChange(filePath, configuration)\n )\n .on('error', (error) =>\n appLogger('Watcher error: ' + error, {\n level: 'error',\n })\n );\n};\n\nexport const buildAndWatchIntlayer = async (options?: WatchOptions) => {\n const configuration = options?.configuration ?? getConfiguration();\n\n await prepareIntlayer(configuration);\n\n if (configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ ...options, configuration });\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAyB;AACzB,oBAIO;AAEP,sBAA6D;AAC7D,iCAAoC;AACpC,mCAAsC;AACtC,4CAAgC;AAChC,wCAA2C;AAC3C,gCAGO;AACP,6BAAgC;AAEzB,MAAM,yCAAyC,OACpD,UACA,kBACG;AACH,QAAM,EAAE,QAAQ,IACd,qBACA,gCAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAGH;AAAA,IACE,iCAA6B,sBAAS,QAAQ,SAAS,QAAQ,CAAC;AAAA,IAChE;AAAA,MACE,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,qBAAqB,UAAM,oDAAsB,QAAQ;AAE/D,QAAM,oBAAoB,UAAM,uDAAgB,kBAAkB;AAElE,6CAAY,iBAAiB;AAE7B,oEAA2B;AAE3B,+BAAU,sBAAsB;AAAA,IAC9B,WAAW;AAAA,EACb,CAAC;AAED,0DAAyB;AAEzB,+BAAU,6BAA6B;AAAA,IACrC,WAAW;AAAA,EACb,CAAC;AACH;AAEO,MAAM,qCAAqC,OAChD,UACA,kBACG;AACH,QAAM,EAAE,QAAQ,IACd,qBACA,gCAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAGH,+BAAU,wBAAoB,sBAAS,QAAQ,SAAS,QAAQ,CAAC,IAAI;AAAA,IACnE,WAAW;AAAA,EACb,CAAC;AAED,QAAM,qBAAqB,UAAM,oDAAsB,QAAQ;AAC/D,QAAM,2BAA2B,UAAM,uDAAgB,kBAAkB;AACzE,QAAM,2BAAiC,gDAAoB;AAE3D,6CAAY,wBAAwB;AACpC,+BAAU,0BAA0B;AAAA,IAClC,WAAW;AAAA,EACb,CAAC;AAED,MACE,yBAAyB;AAAA,IAAK,CAAC,0BAC7B,qBAAqB,SAAS,qBAAqB;AAAA,EACrD,GACA;AACA,sEAA2B;AAE3B,iCAAU,yBAAyB;AAAA,MACjC,WAAW;AAAA,IACb,CAAC;AAED,4DAAyB;AAEzB,iCAAU,6BAA6B;AAAA,MACrC,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AACF;AAOO,MAAM,QAAQ,CAAC,YAA2B;AAC/C,QAAM,gBACJ,SAAS,qBACT,gCAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAEH,QAAM,EAAE,OAAO,aAAa,4BAA4B,IACtD,cAAc;AAGhB,aAAO,gBAAAA,OAAc,6BAA6B;AAAA,IAChD,YAAY;AAAA;AAAA,IACZ,eAAe;AAAA;AAAA,IACf,GAAG;AAAA,EACL,CAAC,EACE;AAAA,IACC;AAAA,IACA,OAAO,aACL,MAAM,uCAAuC,UAAU,aAAa;AAAA,EACxE,EACC;AAAA,IACC;AAAA,IACA,OAAO,aACL,MAAM,mCAAmC,UAAU,aAAa;AAAA,EACpE,EACC;AAAA,IAAG;AAAA,IAAS,CAAC,cACZ,yBAAU,oBAAoB,OAAO;AAAA,MACnC,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACJ;AAEO,MAAM,wBAAwB,OAAO,YAA2B;AACrE,QAAM,gBAAgB,SAAS,qBAAiB,gCAAiB;AAEjE,YAAM,wCAAgB,aAAa;AAEnC,MAAI,cAAc,QAAQ,OAAO;AAE/B,UAAM,EAAE,GAAG,SAAS,cAAc,CAAC;AAAA,EACrC;AACF;","names":["chokidarWatch"]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -29,11 +29,12 @@ __export(index_exports, {
|
|
|
29
29
|
loadDictionaries: () => import_loadDictionaries.loadDictionaries,
|
|
30
30
|
loadDistantDictionaries: () => import_loadDictionaries.loadDistantDictionaries,
|
|
31
31
|
loadLocalDictionaries: () => import_loadDictionaries.loadLocalDictionaries,
|
|
32
|
-
prepareIntlayer: () =>
|
|
32
|
+
prepareIntlayer: () => import_prepareIntlayer.prepareIntlayer,
|
|
33
33
|
watch: () => import_watcher.watch
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
var import_watcher = require('./chokidar/watcher.cjs');
|
|
37
|
+
var import_prepareIntlayer = require('./prepareIntlayer.cjs');
|
|
37
38
|
var import_declaration_file_to_dictionary = require('./transpiler/declaration_file_to_dictionary/index.cjs');
|
|
38
39
|
var import_createDictionaryEntryPoint = require('./transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs');
|
|
39
40
|
var import_createModuleAugmentation = require('./transpiler/dictionary_to_type/createModuleAugmentation.cjs');
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n watch,\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n watch,\n handleAdditionalContentDeclarationFile,\n handleContentDeclarationFileChange,\n buildAndWatchIntlayer,\n} from './chokidar/watcher';\nexport { prepareIntlayer } from './prepareIntlayer';\nexport { buildDictionary } from './transpiler/declaration_file_to_dictionary/index';\nexport { createDictionaryEntryPoint } from './transpiler/dictionary_to_main/createDictionaryEntryPoint';\nexport { createModuleAugmentation } from './transpiler/dictionary_to_type/createModuleAugmentation';\nexport { fetchDistantDictionaries } from './fetchDistantDictionaries';\nexport {\n loadDistantDictionaries,\n loadDictionaries,\n loadLocalDictionaries,\n} from './loadDictionaries/index';\nexport { checkDictionaryChanges } from './checkDictionaryChanges';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAKO;AACP,6BAAgC;AAChC,4CAAgC;AAChC,wCAA2C;AAC3C,sCAAyC;AACzC,sCAAyC;AACzC,8BAIO;AACP,oCAAuC;","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var prepareIntlayer_exports = {};
|
|
30
|
+
__export(prepareIntlayer_exports, {
|
|
31
|
+
prepareIntlayer: () => prepareIntlayer
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(prepareIntlayer_exports);
|
|
34
|
+
var import_config = require("@intlayer/config");
|
|
35
|
+
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
|
+
var import_cleanOutputDir = require('./cleanOutputDir.cjs');
|
|
37
|
+
var import_loadDictionaries = require('./loadDictionaries/loadDictionaries.cjs');
|
|
38
|
+
var import_declaration_file_to_dictionary = require('./transpiler/declaration_file_to_dictionary/index.cjs');
|
|
39
|
+
var import_createDictionaryEntryPoint = require('./transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs');
|
|
40
|
+
var import_dictionary_to_type = require('./transpiler/dictionary_to_type/index.cjs');
|
|
41
|
+
var import_writeConfiguration = require('./writeConfiguration/index.cjs');
|
|
42
|
+
const prepareIntlayer = async (configuration = (0, import_config.getConfiguration)()) => {
|
|
43
|
+
(0, import_cleanOutputDir.cleanOutputDir)();
|
|
44
|
+
(0, import_config.appLogger)("Output directory cleaned", {
|
|
45
|
+
isVerbose: true
|
|
46
|
+
});
|
|
47
|
+
const files = import_fast_glob.default.sync(
|
|
48
|
+
configuration.content.watchedFilesPatternWithPath,
|
|
49
|
+
{
|
|
50
|
+
ignore: [
|
|
51
|
+
"**/node_modules/**",
|
|
52
|
+
"**/.git/**",
|
|
53
|
+
"**/.github/**",
|
|
54
|
+
"**/.next/**",
|
|
55
|
+
"**/.expo/**",
|
|
56
|
+
"**/.expo-shared/**",
|
|
57
|
+
"**/.vercel/**",
|
|
58
|
+
"**/.cache/**",
|
|
59
|
+
"**/dist/**",
|
|
60
|
+
"**/build/**",
|
|
61
|
+
"**/.intlayer/**"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
const dictionaries = await (0, import_loadDictionaries.loadDictionaries)(files);
|
|
66
|
+
const dictionariesPaths = await (0, import_declaration_file_to_dictionary.buildDictionary)(dictionaries);
|
|
67
|
+
(0, import_dictionary_to_type.createTypes)(dictionariesPaths);
|
|
68
|
+
(0, import_createDictionaryEntryPoint.createDictionaryEntryPoint)();
|
|
69
|
+
(0, import_config.appLogger)("Dictionaries built");
|
|
70
|
+
(0, import_dictionary_to_type.createModuleAugmentation)();
|
|
71
|
+
(0, import_config.appLogger)("Module augmentation built", {
|
|
72
|
+
isVerbose: true
|
|
73
|
+
});
|
|
74
|
+
(0, import_writeConfiguration.writeConfiguration)(configuration);
|
|
75
|
+
(0, import_config.appLogger)("Configuration written", {
|
|
76
|
+
isVerbose: true
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
+
0 && (module.exports = {
|
|
81
|
+
prepareIntlayer
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=prepareIntlayer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/prepareIntlayer.ts"],"sourcesContent":["import {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\nimport fg from 'fast-glob';\nimport { cleanOutputDir } from './cleanOutputDir';\nimport { loadDictionaries } from './loadDictionaries/loadDictionaries';\nimport { buildDictionary } from './transpiler/declaration_file_to_dictionary/index';\nimport { createDictionaryEntryPoint } from './transpiler/dictionary_to_main/createDictionaryEntryPoint';\nimport {\n createTypes,\n createModuleAugmentation,\n} from './transpiler/dictionary_to_type/index';\nimport { writeConfiguration } from './writeConfiguration';\n\nexport const prepareIntlayer = async (\n configuration: IntlayerConfig = getConfiguration()\n) => {\n cleanOutputDir();\n\n appLogger('Output directory cleaned', {\n isVerbose: true,\n });\n\n const files: string[] = fg.sync(\n configuration.content.watchedFilesPatternWithPath,\n {\n ignore: [\n '**/node_modules/**',\n '**/.git/**',\n '**/.github/**',\n '**/.next/**',\n '**/.expo/**',\n '**/.expo-shared/**',\n '**/.vercel/**',\n '**/.cache/**',\n '**/dist/**',\n '**/build/**',\n '**/.intlayer/**',\n ],\n }\n );\n\n const dictionaries = await loadDictionaries(files);\n\n // Build locale dictionaries\n const dictionariesPaths = await buildDictionary(dictionaries);\n\n createTypes(dictionariesPaths);\n\n createDictionaryEntryPoint();\n\n appLogger('Dictionaries built');\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n\n writeConfiguration(configuration);\n\n appLogger('Configuration written', {\n isVerbose: true,\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAIO;AACP,uBAAe;AACf,4BAA+B;AAC/B,8BAAiC;AACjC,4CAAgC;AAChC,wCAA2C;AAC3C,gCAGO;AACP,gCAAmC;AAE5B,MAAM,kBAAkB,OAC7B,oBAAgC,gCAAiB,MAC9C;AACH,4CAAe;AAEf,+BAAU,4BAA4B;AAAA,IACpC,WAAW;AAAA,EACb,CAAC;AAED,QAAM,QAAkB,iBAAAA,QAAG;AAAA,IACzB,cAAc,QAAQ;AAAA,IACtB;AAAA,MACE,QAAQ;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,UAAM,0CAAiB,KAAK;AAGjD,QAAM,oBAAoB,UAAM,uDAAgB,YAAY;AAE5D,6CAAY,iBAAiB;AAE7B,oEAA2B;AAE3B,+BAAU,oBAAoB;AAE9B,0DAAyB;AAEzB,+BAAU,6BAA6B;AAAA,IACrC,WAAW;AAAA,EACb,CAAC;AAED,oDAAmB,aAAa;AAEhC,+BAAU,yBAAyB;AAAA,IACjC,WAAW;AAAA,EACb,CAAC;AACH;","names":["fg"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var writeConfiguration_exports = {};
|
|
20
|
+
__export(writeConfiguration_exports, {
|
|
21
|
+
writeConfiguration: () => writeConfiguration
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(writeConfiguration_exports);
|
|
24
|
+
var import_fs = require("fs");
|
|
25
|
+
var import_path = require("path");
|
|
26
|
+
const writeConfiguration = (configuration) => {
|
|
27
|
+
const { content } = configuration;
|
|
28
|
+
const { configDir } = content;
|
|
29
|
+
if (!(0, import_fs.existsSync)(configDir)) {
|
|
30
|
+
(0, import_fs.mkdirSync)(configDir, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
const configFilePath = (0, import_path.join)(configDir, "configuration.json");
|
|
33
|
+
(0, import_fs.writeFileSync)(configFilePath, JSON.stringify(configuration, null, 2));
|
|
34
|
+
};
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
writeConfiguration
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/writeConfiguration/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/config';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { join } from 'path';\n\nexport const writeConfiguration = (configuration: IntlayerConfig) => {\n const { content } = configuration;\n const { configDir } = content;\n\n // Create main directory if it doesn't exist\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const configFilePath = join(configDir, 'configuration.json');\n\n writeFileSync(configFilePath, JSON.stringify(configuration, null, 2));\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAqD;AACrD,kBAAqB;AAEd,MAAM,qBAAqB,CAAC,kBAAkC;AACnE,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,EAAE,UAAU,IAAI;AAGtB,MAAI,KAAC,sBAAW,SAAS,GAAG;AAC1B,6BAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AAAA,EAC1C;AAEA,QAAM,qBAAiB,kBAAK,WAAW,oBAAoB;AAE3D,+BAAc,gBAAgB,KAAK,UAAU,eAAe,MAAM,CAAC,CAAC;AACtE;","names":[]}
|
|
@@ -4,10 +4,7 @@ import {
|
|
|
4
4
|
getConfiguration
|
|
5
5
|
} from "@intlayer/config";
|
|
6
6
|
import { watch as chokidarWatch } from "chokidar";
|
|
7
|
-
import fg from "fast-glob";
|
|
8
|
-
import { cleanOutputDir } from "../cleanOutputDir.mjs";
|
|
9
7
|
import { getDictionariesPath } from "../getDictionariesPath.mjs";
|
|
10
|
-
import { loadDictionaries } from "../loadDictionaries/loadDictionaries.mjs";
|
|
11
8
|
import { loadLocalDictionaries } from "../loadDictionaries/loadLocalDictionaries.mjs";
|
|
12
9
|
import { buildDictionary } from "../transpiler/declaration_file_to_dictionary/index.mjs";
|
|
13
10
|
import { createDictionaryEntryPoint } from "../transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs";
|
|
@@ -15,26 +12,7 @@ import {
|
|
|
15
12
|
createTypes,
|
|
16
13
|
createModuleAugmentation
|
|
17
14
|
} from "../transpiler/dictionary_to_type/index.mjs";
|
|
18
|
-
|
|
19
|
-
const { content } = configuration ?? getConfiguration({
|
|
20
|
-
verbose: true
|
|
21
|
-
});
|
|
22
|
-
const { watchedFilesPatternWithPath } = content;
|
|
23
|
-
cleanOutputDir();
|
|
24
|
-
appLogger("Output directory cleaned", {
|
|
25
|
-
isVerbose: true
|
|
26
|
-
});
|
|
27
|
-
const files = fg.sync(watchedFilesPatternWithPath);
|
|
28
|
-
const dictionaries = await loadDictionaries(files);
|
|
29
|
-
const dictionariesPaths = await buildDictionary(dictionaries);
|
|
30
|
-
createTypes(dictionariesPaths);
|
|
31
|
-
createDictionaryEntryPoint();
|
|
32
|
-
appLogger("Dictionaries built");
|
|
33
|
-
createModuleAugmentation();
|
|
34
|
-
appLogger("Module augmentation built", {
|
|
35
|
-
isVerbose: true
|
|
36
|
-
});
|
|
37
|
-
};
|
|
15
|
+
import { prepareIntlayer } from "../prepareIntlayer.mjs";
|
|
38
16
|
const handleAdditionalContentDeclarationFile = async (filePath, configuration) => {
|
|
39
17
|
const { content } = configuration ?? getConfiguration({
|
|
40
18
|
verbose: true
|
|
@@ -119,7 +97,6 @@ export {
|
|
|
119
97
|
buildAndWatchIntlayer,
|
|
120
98
|
handleAdditionalContentDeclarationFile,
|
|
121
99
|
handleContentDeclarationFileChange,
|
|
122
|
-
prepareIntlayer,
|
|
123
100
|
watch
|
|
124
101
|
};
|
|
125
102
|
//# sourceMappingURL=watcher.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/chokidar/watcher.ts"],"sourcesContent":["import { relative } from 'path';\nimport {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\n/** @ts-ignore remove error Module '\"chokidar\"' has no exported member 'ChokidarOptions' */\nimport { type ChokidarOptions, watch as chokidarWatch } from 'chokidar';\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/chokidar/watcher.ts"],"sourcesContent":["import { relative } from 'path';\nimport {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\n/** @ts-ignore remove error Module '\"chokidar\"' has no exported member 'ChokidarOptions' */\nimport { type ChokidarOptions, watch as chokidarWatch } from 'chokidar';\nimport { getDictionariesPath } from '../getDictionariesPath';\nimport { loadLocalDictionaries } from '../loadDictionaries/loadLocalDictionaries';\nimport { buildDictionary } from '../transpiler/declaration_file_to_dictionary/index';\nimport { createDictionaryEntryPoint } from '../transpiler/dictionary_to_main/createDictionaryEntryPoint';\nimport {\n createTypes,\n createModuleAugmentation,\n} from '../transpiler/dictionary_to_type/index';\nimport { prepareIntlayer } from '../prepareIntlayer';\n\nexport const handleAdditionalContentDeclarationFile = async (\n filePath: string,\n configuration?: IntlayerConfig\n) => {\n const { content } =\n configuration ??\n getConfiguration({\n verbose: true,\n });\n\n // Process the file with the functionToRun\n appLogger(\n `Additional file detected: ${relative(content.baseDir, filePath)}`,\n {\n isVerbose: true,\n }\n );\n\n const localeDictionaries = await loadLocalDictionaries(filePath);\n\n const dictionariesPaths = await buildDictionary(localeDictionaries);\n\n createTypes(dictionariesPaths);\n\n createDictionaryEntryPoint();\n\n appLogger('Dictionaries built', {\n isVerbose: true,\n });\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n};\n\nexport const handleContentDeclarationFileChange = async (\n filePath: string,\n configuration?: IntlayerConfig\n) => {\n const { content } =\n configuration ??\n getConfiguration({\n verbose: true,\n });\n\n // Process the file with the functionToRun\n appLogger(`Change detected: ${relative(content.baseDir, filePath)}`, {\n isVerbose: true,\n });\n\n const localeDictionaries = await loadLocalDictionaries(filePath);\n const updatedDictionariesPaths = await buildDictionary(localeDictionaries);\n const allDictionariesPaths: string[] = getDictionariesPath();\n\n createTypes(updatedDictionariesPaths);\n appLogger('TypeScript types built', {\n isVerbose: true,\n });\n\n if (\n updatedDictionariesPaths.some((updatedDictionaryPath) =>\n allDictionariesPaths.includes(updatedDictionaryPath)\n )\n ) {\n createDictionaryEntryPoint();\n\n appLogger('Dictionary list built', {\n isVerbose: true,\n });\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n }\n};\n\ntype WatchOptions = ChokidarOptions & {\n configuration?: IntlayerConfig;\n};\n\n// Initialize chokidar watcher (non-persistent)\nexport const watch = (options?: WatchOptions) => {\n const configuration =\n options?.configuration ??\n getConfiguration({\n verbose: true,\n });\n\n const { watch: isWatchMode, watchedFilesPatternWithPath } =\n configuration.content;\n\n /** @ts-ignore remove error Expected 0-1 arguments, but got 2. */\n return chokidarWatch(watchedFilesPatternWithPath, {\n persistent: isWatchMode, // Make the watcher persistent\n ignoreInitial: true, // Process existing files\n ...options,\n })\n .on(\n 'add',\n async (filePath) =>\n await handleAdditionalContentDeclarationFile(filePath, configuration)\n )\n .on(\n 'change',\n async (filePath) =>\n await handleContentDeclarationFileChange(filePath, configuration)\n )\n .on('error', (error) =>\n appLogger('Watcher error: ' + error, {\n level: 'error',\n })\n );\n};\n\nexport const buildAndWatchIntlayer = async (options?: WatchOptions) => {\n const configuration = options?.configuration ?? getConfiguration();\n\n await prepareIntlayer(configuration);\n\n if (configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ ...options, configuration });\n }\n};\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AAEP,SAA+B,SAAS,qBAAqB;AAC7D,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAEzB,MAAM,yCAAyC,OACpD,UACA,kBACG;AACH,QAAM,EAAE,QAAQ,IACd,iBACA,iBAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAGH;AAAA,IACE,6BAA6B,SAAS,QAAQ,SAAS,QAAQ,CAAC;AAAA,IAChE;AAAA,MACE,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,qBAAqB,MAAM,sBAAsB,QAAQ;AAE/D,QAAM,oBAAoB,MAAM,gBAAgB,kBAAkB;AAElE,cAAY,iBAAiB;AAE7B,6BAA2B;AAE3B,YAAU,sBAAsB;AAAA,IAC9B,WAAW;AAAA,EACb,CAAC;AAED,2BAAyB;AAEzB,YAAU,6BAA6B;AAAA,IACrC,WAAW;AAAA,EACb,CAAC;AACH;AAEO,MAAM,qCAAqC,OAChD,UACA,kBACG;AACH,QAAM,EAAE,QAAQ,IACd,iBACA,iBAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAGH,YAAU,oBAAoB,SAAS,QAAQ,SAAS,QAAQ,CAAC,IAAI;AAAA,IACnE,WAAW;AAAA,EACb,CAAC;AAED,QAAM,qBAAqB,MAAM,sBAAsB,QAAQ;AAC/D,QAAM,2BAA2B,MAAM,gBAAgB,kBAAkB;AACzE,QAAM,uBAAiC,oBAAoB;AAE3D,cAAY,wBAAwB;AACpC,YAAU,0BAA0B;AAAA,IAClC,WAAW;AAAA,EACb,CAAC;AAED,MACE,yBAAyB;AAAA,IAAK,CAAC,0BAC7B,qBAAqB,SAAS,qBAAqB;AAAA,EACrD,GACA;AACA,+BAA2B;AAE3B,cAAU,yBAAyB;AAAA,MACjC,WAAW;AAAA,IACb,CAAC;AAED,6BAAyB;AAEzB,cAAU,6BAA6B;AAAA,MACrC,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AACF;AAOO,MAAM,QAAQ,CAAC,YAA2B;AAC/C,QAAM,gBACJ,SAAS,iBACT,iBAAiB;AAAA,IACf,SAAS;AAAA,EACX,CAAC;AAEH,QAAM,EAAE,OAAO,aAAa,4BAA4B,IACtD,cAAc;AAGhB,SAAO,cAAc,6BAA6B;AAAA,IAChD,YAAY;AAAA;AAAA,IACZ,eAAe;AAAA;AAAA,IACf,GAAG;AAAA,EACL,CAAC,EACE;AAAA,IACC;AAAA,IACA,OAAO,aACL,MAAM,uCAAuC,UAAU,aAAa;AAAA,EACxE,EACC;AAAA,IACC;AAAA,IACA,OAAO,aACL,MAAM,mCAAmC,UAAU,aAAa;AAAA,EACpE,EACC;AAAA,IAAG;AAAA,IAAS,CAAC,UACZ,UAAU,oBAAoB,OAAO;AAAA,MACnC,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACJ;AAEO,MAAM,wBAAwB,OAAO,YAA2B;AACrE,QAAM,gBAAgB,SAAS,iBAAiB,iBAAiB;AAEjE,QAAM,gBAAgB,aAAa;AAEnC,MAAI,cAAc,QAAQ,OAAO;AAE/B,UAAM,EAAE,GAAG,SAAS,cAAc,CAAC;AAAA,EACrC;AACF;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch,
|
|
3
|
-
prepareIntlayer,
|
|
4
3
|
handleAdditionalContentDeclarationFile,
|
|
5
4
|
handleContentDeclarationFileChange,
|
|
6
5
|
buildAndWatchIntlayer
|
|
7
6
|
} from "./chokidar/watcher.mjs";
|
|
7
|
+
import { prepareIntlayer } from "./prepareIntlayer.mjs";
|
|
8
8
|
import { buildDictionary } from "./transpiler/declaration_file_to_dictionary/index.mjs";
|
|
9
9
|
import { createDictionaryEntryPoint } from "./transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs";
|
|
10
10
|
import { createModuleAugmentation } from "./transpiler/dictionary_to_type/createModuleAugmentation.mjs";
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n watch,\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n watch,\n handleAdditionalContentDeclarationFile,\n handleContentDeclarationFileChange,\n buildAndWatchIntlayer,\n} from './chokidar/watcher';\nexport { prepareIntlayer } from './prepareIntlayer';\nexport { buildDictionary } from './transpiler/declaration_file_to_dictionary/index';\nexport { createDictionaryEntryPoint } from './transpiler/dictionary_to_main/createDictionaryEntryPoint';\nexport { createModuleAugmentation } from './transpiler/dictionary_to_type/createModuleAugmentation';\nexport { fetchDistantDictionaries } from './fetchDistantDictionaries';\nexport {\n loadDistantDictionaries,\n loadDictionaries,\n loadLocalDictionaries,\n} from './loadDictionaries/index';\nexport { checkDictionaryChanges } from './checkDictionaryChanges';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;","names":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appLogger,
|
|
3
|
+
getConfiguration
|
|
4
|
+
} from "@intlayer/config";
|
|
5
|
+
import fg from "fast-glob";
|
|
6
|
+
import { cleanOutputDir } from "./cleanOutputDir.mjs";
|
|
7
|
+
import { loadDictionaries } from "./loadDictionaries/loadDictionaries.mjs";
|
|
8
|
+
import { buildDictionary } from "./transpiler/declaration_file_to_dictionary/index.mjs";
|
|
9
|
+
import { createDictionaryEntryPoint } from "./transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs";
|
|
10
|
+
import {
|
|
11
|
+
createTypes,
|
|
12
|
+
createModuleAugmentation
|
|
13
|
+
} from "./transpiler/dictionary_to_type/index.mjs";
|
|
14
|
+
import { writeConfiguration } from "./writeConfiguration/index.mjs";
|
|
15
|
+
const prepareIntlayer = async (configuration = getConfiguration()) => {
|
|
16
|
+
cleanOutputDir();
|
|
17
|
+
appLogger("Output directory cleaned", {
|
|
18
|
+
isVerbose: true
|
|
19
|
+
});
|
|
20
|
+
const files = fg.sync(
|
|
21
|
+
configuration.content.watchedFilesPatternWithPath,
|
|
22
|
+
{
|
|
23
|
+
ignore: [
|
|
24
|
+
"**/node_modules/**",
|
|
25
|
+
"**/.git/**",
|
|
26
|
+
"**/.github/**",
|
|
27
|
+
"**/.next/**",
|
|
28
|
+
"**/.expo/**",
|
|
29
|
+
"**/.expo-shared/**",
|
|
30
|
+
"**/.vercel/**",
|
|
31
|
+
"**/.cache/**",
|
|
32
|
+
"**/dist/**",
|
|
33
|
+
"**/build/**",
|
|
34
|
+
"**/.intlayer/**"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
const dictionaries = await loadDictionaries(files);
|
|
39
|
+
const dictionariesPaths = await buildDictionary(dictionaries);
|
|
40
|
+
createTypes(dictionariesPaths);
|
|
41
|
+
createDictionaryEntryPoint();
|
|
42
|
+
appLogger("Dictionaries built");
|
|
43
|
+
createModuleAugmentation();
|
|
44
|
+
appLogger("Module augmentation built", {
|
|
45
|
+
isVerbose: true
|
|
46
|
+
});
|
|
47
|
+
writeConfiguration(configuration);
|
|
48
|
+
appLogger("Configuration written", {
|
|
49
|
+
isVerbose: true
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
prepareIntlayer
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=prepareIntlayer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/prepareIntlayer.ts"],"sourcesContent":["import {\n type IntlayerConfig,\n appLogger,\n getConfiguration,\n} from '@intlayer/config';\nimport fg from 'fast-glob';\nimport { cleanOutputDir } from './cleanOutputDir';\nimport { loadDictionaries } from './loadDictionaries/loadDictionaries';\nimport { buildDictionary } from './transpiler/declaration_file_to_dictionary/index';\nimport { createDictionaryEntryPoint } from './transpiler/dictionary_to_main/createDictionaryEntryPoint';\nimport {\n createTypes,\n createModuleAugmentation,\n} from './transpiler/dictionary_to_type/index';\nimport { writeConfiguration } from './writeConfiguration';\n\nexport const prepareIntlayer = async (\n configuration: IntlayerConfig = getConfiguration()\n) => {\n cleanOutputDir();\n\n appLogger('Output directory cleaned', {\n isVerbose: true,\n });\n\n const files: string[] = fg.sync(\n configuration.content.watchedFilesPatternWithPath,\n {\n ignore: [\n '**/node_modules/**',\n '**/.git/**',\n '**/.github/**',\n '**/.next/**',\n '**/.expo/**',\n '**/.expo-shared/**',\n '**/.vercel/**',\n '**/.cache/**',\n '**/dist/**',\n '**/build/**',\n '**/.intlayer/**',\n ],\n }\n );\n\n const dictionaries = await loadDictionaries(files);\n\n // Build locale dictionaries\n const dictionariesPaths = await buildDictionary(dictionaries);\n\n createTypes(dictionariesPaths);\n\n createDictionaryEntryPoint();\n\n appLogger('Dictionaries built');\n\n createModuleAugmentation();\n\n appLogger('Module augmentation built', {\n isVerbose: true,\n });\n\n writeConfiguration(configuration);\n\n appLogger('Configuration written', {\n isVerbose: true,\n });\n};\n"],"mappings":"AAAA;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AACP,OAAO,QAAQ;AACf,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAE5B,MAAM,kBAAkB,OAC7B,gBAAgC,iBAAiB,MAC9C;AACH,iBAAe;AAEf,YAAU,4BAA4B;AAAA,IACpC,WAAW;AAAA,EACb,CAAC;AAED,QAAM,QAAkB,GAAG;AAAA,IACzB,cAAc,QAAQ;AAAA,IACtB;AAAA,MACE,QAAQ;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,MAAM,iBAAiB,KAAK;AAGjD,QAAM,oBAAoB,MAAM,gBAAgB,YAAY;AAE5D,cAAY,iBAAiB;AAE7B,6BAA2B;AAE3B,YAAU,oBAAoB;AAE9B,2BAAyB;AAEzB,YAAU,6BAA6B;AAAA,IACrC,WAAW;AAAA,EACb,CAAC;AAED,qBAAmB,aAAa;AAEhC,YAAU,yBAAyB;AAAA,IACjC,WAAW;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
const writeConfiguration = (configuration) => {
|
|
4
|
+
const { content } = configuration;
|
|
5
|
+
const { configDir } = content;
|
|
6
|
+
if (!existsSync(configDir)) {
|
|
7
|
+
mkdirSync(configDir, { recursive: true });
|
|
8
|
+
}
|
|
9
|
+
const configFilePath = join(configDir, "configuration.json");
|
|
10
|
+
writeFileSync(configFilePath, JSON.stringify(configuration, null, 2));
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
writeConfiguration
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/writeConfiguration/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/config';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { join } from 'path';\n\nexport const writeConfiguration = (configuration: IntlayerConfig) => {\n const { content } = configuration;\n const { configDir } = content;\n\n // Create main directory if it doesn't exist\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const configFilePath = join(configDir, 'configuration.json');\n\n writeFileSync(configFilePath, JSON.stringify(configuration, null, 2));\n};\n"],"mappings":"AACA,SAAS,YAAY,WAAW,qBAAqB;AACrD,SAAS,YAAY;AAEd,MAAM,qBAAqB,CAAC,kBAAkC;AACnE,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,EAAE,UAAU,IAAI;AAGtB,MAAI,CAAC,WAAW,SAAS,GAAG;AAC1B,cAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AAAA,EAC1C;AAEA,QAAM,iBAAiB,KAAK,WAAW,oBAAoB;AAE3D,gBAAc,gBAAgB,KAAK,UAAU,eAAe,MAAM,CAAC,CAAC;AACtE;","names":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type IntlayerConfig } from '@intlayer/config';
|
|
2
2
|
/** @ts-ignore remove error Module '"chokidar"' has no exported member 'ChokidarOptions' */
|
|
3
3
|
import { type ChokidarOptions } from '../chokidar';
|
|
4
|
-
export declare const prepareIntlayer: (configuration?: IntlayerConfig) => Promise<void>;
|
|
5
4
|
export declare const handleAdditionalContentDeclarationFile: (filePath: string, configuration?: IntlayerConfig) => Promise<void>;
|
|
6
5
|
export declare const handleContentDeclarationFileChange: (filePath: string, configuration?: IntlayerConfig) => Promise<void>;
|
|
7
6
|
type WatchOptions = ChokidarOptions & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../../src/chokidar/watcher.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAC;AAC1B,2FAA2F;AAC3F,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../../src/chokidar/watcher.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAC;AAC1B,2FAA2F;AAC3F,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,UAAU,CAAC;AAWxE,eAAO,MAAM,sCAAsC,GACjD,UAAU,MAAM,EAChB,gBAAgB,cAAc,kBAiC/B,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAC7C,UAAU,MAAM,EAChB,gBAAgB,cAAc,kBAuC/B,CAAC;AAEF,KAAK,YAAY,GAAG,eAAe,GAAG;IACpC,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC,CAAC;AAGF,eAAO,MAAM,KAAK,GAAI,UAAU,YAAY,QA+B3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAU,UAAU,YAAY,kBASjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDistantDictionaries.d.ts","sourceRoot":"","sources":["../../src/fetchDistantDictionaries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvD,KAAK,+BAA+B,GAAG;IACrC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"fetchDistantDictionaries.d.ts","sourceRoot":"","sources":["../../src/fetchDistantDictionaries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvD,KAAK,+BAA+B,GAAG;IACrC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,+BAA+B,KACvC,OAAO,CAAC,aAAa,EAAE,CA8FzB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { watch,
|
|
1
|
+
export { watch, handleAdditionalContentDeclarationFile, handleContentDeclarationFileChange, buildAndWatchIntlayer, } from './chokidar/watcher';
|
|
2
|
+
export { prepareIntlayer } from './prepareIntlayer';
|
|
2
3
|
export { buildDictionary } from './transpiler/declaration_file_to_dictionary/index';
|
|
3
4
|
export { createDictionaryEntryPoint } from './transpiler/dictionary_to_main/createDictionaryEntryPoint';
|
|
4
5
|
export { createModuleAugmentation } from './transpiler/dictionary_to_type/createModuleAugmentation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,sCAAsC,EACtC,kCAAkC,EAClC,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadContentDeclaration.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadContentDeclaration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA+FjD,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"loadContentDeclaration.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadContentDeclaration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA+FjD,eAAO,MAAM,uBAAuB,GAClC,4BAA4B,MAAM,EAAE,KACnC,OAAO,CAAC,UAAU,EAAE,CAwBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadDictionaries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASjD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"loadDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadDictionaries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASjD,eAAO,MAAM,gBAAgB,GAC3B,0BAA0B,MAAM,EAAE,GAAG,MAAM,KAC1C,OAAO,CAAC,UAAU,EAAE,CAwEtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadDistantDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadDistantDictionaries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,KAAK,8BAA8B,GAAG;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"loadDistantDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadDistantDictionaries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,KAAK,8BAA8B,GAAG;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,SAAS,8BAA8B,KACtC,OAAO,CAAC,aAAa,EAAE,CASzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadLocalDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadLocalDictionaries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"loadLocalDictionaries.d.ts","sourceRoot":"","sources":["../../../src/loadDictionaries/loadLocalDictionaries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,qBAAqB,GAChC,0BAA0B,MAAM,EAAE,GAAG,MAAM,KAC1C,OAAO,CAAC,UAAU,EAAE,CA2BtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeDictionaries.d.ts","sourceRoot":"","sources":["../../src/mergeDictionaries.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"mergeDictionaries.d.ts","sourceRoot":"","sources":["../../src/mergeDictionaries.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,MAAM,CAAC,MACxD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,UAAU,OAAO,KAAG,CAAC,EA6BxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareIntlayer.d.ts","sourceRoot":"","sources":["../../src/prepareIntlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAC;AAY1B,eAAO,MAAM,eAAe,GAC1B,gBAAe,cAAmC,kBAiDnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildI18nextDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/buildI18nextDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD;;GAEG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"buildI18nextDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/buildI18nextDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,qBAAqB,UAAU,EAAE,sBAoBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertContentDeclarationInto18nDictionaries.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertContentDeclarationInto18nDictionaries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AA0F7E,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"convertContentDeclarationInto18nDictionaries.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertContentDeclarationInto18nDictionaries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AA0F7E,eAAO,MAAM,yBAAyB,GACpC,SAAS,WAAW,KACnB,yBAWF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertPluralsValues.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertPluralsValues.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"convertPluralsValues.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/convertPluralsValues.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,GAAG,MAAM,KAAG,MAS9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAKhG,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/i18next_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAKhG,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,yBAAyB,uBAAuB,sBA2BjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/declaration_file_to_dictionary/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQjD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/declaration_file_to_dictionary/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQjD,eAAO,MAAM,eAAe,GAC1B,cAAc,UAAU,EAAE,KACzB,OAAO,CAAC,MAAM,EAAE,CAUlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIntlayerDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;GAEG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"buildIntlayerDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,qBAAqB,CAAC,aAAa,GAAG,UAAU,CAAC,EAAE,sBAUpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processContentDeclaration.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmDjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"processContentDeclaration.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmDjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,GACpC,oBAAoB,UAAU,KAC7B,OAAO,CAAC,UAAU,GAAG,SAAS,CAehC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,eAAO,MAAM,eAAe,GAAU,cAAc,UAAU,EAAE,sBAsB/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/reactIntl_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oEAAoE,CAAC;AAKpH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/reactIntl_dictionary/writeDictionary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oEAAoE,CAAC;AAKpH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,yBAAyB,uBAAuB,sBA2BjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createModuleAugmentation.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/dictionary_to_type/createModuleAugmentation.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"createModuleAugmentation.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/dictionary_to_type/createModuleAugmentation.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MACH,CAAC;AAsFxC;;GAEG;AACH,eAAO,MAAM,wBAAwB,YAapC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createType.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/dictionary_to_type/createType.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAUjD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"createType.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/dictionary_to_type/createType.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAUjD,eAAO,MAAM,sBAAsB,GAAI,YAAY,UAAU,WAc5D,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,mBAAmB,MAAM,EAAE,KAAG,MAAM,EA0B/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,WAO3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MAoBnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,WAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/writeConfiguration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,eAAO,MAAM,kBAAkB,GAAI,eAAe,cAAc,SAY/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"esbuild": "^0.24.2",
|
|
63
63
|
"fast-glob": "^3.3.3",
|
|
64
64
|
"p-limit": "^3.1.0",
|
|
65
|
-
"@intlayer/api": "5.1
|
|
66
|
-
"intlayer": "5.1
|
|
67
|
-
"@intlayer/
|
|
68
|
-
"
|
|
65
|
+
"@intlayer/api": "5.2.1",
|
|
66
|
+
"@intlayer/config": "5.2.1",
|
|
67
|
+
"@intlayer/core": "5.2.1",
|
|
68
|
+
"intlayer": "5.2.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@changesets/cli": "2.27.12",
|
|
@@ -79,19 +79,19 @@
|
|
|
79
79
|
"tsc-alias": "^1.8.10",
|
|
80
80
|
"tsup": "^8.3.5",
|
|
81
81
|
"typescript": "^5.7.3",
|
|
82
|
+
"@intlayer/backend": "5.2.1",
|
|
82
83
|
"@utils/eslint-config": "1.0.4",
|
|
83
84
|
"@utils/ts-config": "1.0.4",
|
|
84
|
-
"@utils/tsup-config": "1.0.4",
|
|
85
85
|
"@utils/ts-config-types": "1.0.4",
|
|
86
|
-
"@
|
|
86
|
+
"@utils/tsup-config": "1.0.4"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"fast-glob": "^3.3.3",
|
|
90
90
|
"react": ">=16.0.0",
|
|
91
|
-
"@intlayer/
|
|
92
|
-
"intlayer": "5.1
|
|
93
|
-
"@intlayer/
|
|
94
|
-
"
|
|
91
|
+
"@intlayer/api": "5.2.1",
|
|
92
|
+
"@intlayer/config": "5.2.1",
|
|
93
|
+
"@intlayer/core": "5.2.1",
|
|
94
|
+
"intlayer": "5.2.1"
|
|
95
95
|
},
|
|
96
96
|
"engines": {
|
|
97
97
|
"node": ">=14.18"
|