@intlayer/babel 9.7.0 → 9.7.2
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/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/analyzeContentUsage.cjs +4 -5
- package/dist/cjs/babel-plugin-intlayer-extract.cjs +6 -7
- package/dist/cjs/babel-plugin-intlayer-field-rename.cjs +3 -4
- package/dist/cjs/babel-plugin-intlayer-minify.cjs +4 -5
- package/dist/cjs/babel-plugin-intlayer-optimize.cjs +5 -6
- package/dist/cjs/babel-plugin-intlayer-purge.cjs +10 -11
- package/dist/cjs/babel-plugin-intlayer-usage-analyzer.cjs +6 -7
- package/dist/cjs/babelParser.cjs +1 -2
- package/dist/cjs/compat/namespaceResolution.cjs +2 -3
- package/dist/cjs/compat/optimizePass.cjs +3 -4
- package/dist/cjs/compat/usageAnalysis.cjs +5 -6
- package/dist/cjs/dictionaryImports.cjs +1 -2
- package/dist/cjs/extractContent/babelProcessor.cjs +6 -7
- package/dist/cjs/extractContent/contentWriter.cjs +4 -5
- package/dist/cjs/extractContent/extractContent.cjs +12 -13
- package/dist/cjs/extractContent/index.cjs +8 -8
- package/dist/cjs/extractContent/processTsxFile.cjs +5 -6
- package/dist/cjs/extractContent/utils/constants.cjs +1 -2
- package/dist/cjs/extractContent/utils/detectPackageName.cjs +2 -3
- package/dist/cjs/extractContent/utils/extractDictionaryInfo.cjs +5 -6
- package/dist/cjs/extractContent/utils/extractDictionaryKey.cjs +1 -2
- package/dist/cjs/extractContent/utils/generateKey.cjs +1 -2
- package/dist/cjs/extractContent/utils/getComponentName.cjs +2 -3
- package/dist/cjs/extractContent/utils/getExistingIntlayerInfo.cjs +2 -3
- package/dist/cjs/extractContent/utils/getOrGenerateKey.cjs +2 -3
- package/dist/cjs/extractContent/utils/index.cjs +9 -9
- package/dist/cjs/extractContent/utils/resolveDictionaryKey.cjs +1 -2
- package/dist/cjs/extractScriptBlocks.cjs +1 -2
- package/dist/cjs/getExtractPluginOptions.cjs +6 -7
- package/dist/cjs/getOptimizePluginOptions.cjs +2 -3
- package/dist/cjs/getPurgePluginOptions.cjs +2 -3
- package/dist/cjs/index.cjs +22 -22
- package/dist/cjs/nativeCallers.cjs +1 -2
- package/dist/cjs/normalizedFilesList.cjs +1 -2
- package/dist/cjs/pruneContext.cjs +1 -2
- package/dist/cjs/staticAstReaders.cjs +1 -2
- package/dist/cjs/transformers.cjs +6 -7
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/esm/analyzeContentUsage.mjs +2 -3
- package/dist/esm/babel-plugin-intlayer-extract.mjs +4 -5
- package/dist/esm/babel-plugin-intlayer-field-rename.mjs +2 -3
- package/dist/esm/babel-plugin-intlayer-minify.mjs +2 -3
- package/dist/esm/babel-plugin-intlayer-optimize.mjs +2 -3
- package/dist/esm/babel-plugin-intlayer-purge.mjs +4 -5
- package/dist/esm/babel-plugin-intlayer-usage-analyzer.mjs +4 -5
- package/dist/esm/babelParser.mjs +1 -2
- package/dist/esm/compat/namespaceResolution.mjs +1 -2
- package/dist/esm/compat/optimizePass.mjs +1 -2
- package/dist/esm/compat/usageAnalysis.mjs +3 -4
- package/dist/esm/dictionaryImports.mjs +1 -2
- package/dist/esm/extractContent/babelProcessor.mjs +2 -3
- package/dist/esm/extractContent/contentWriter.mjs +2 -3
- package/dist/esm/extractContent/extractContent.mjs +7 -8
- package/dist/esm/extractContent/index.mjs +3 -3
- package/dist/esm/extractContent/processTsxFile.mjs +3 -4
- package/dist/esm/extractContent/utils/constants.mjs +1 -2
- package/dist/esm/extractContent/utils/detectPackageName.mjs +1 -2
- package/dist/esm/extractContent/utils/extractDictionaryInfo.mjs +3 -4
- package/dist/esm/extractContent/utils/extractDictionaryKey.mjs +1 -2
- package/dist/esm/extractContent/utils/generateKey.mjs +1 -2
- package/dist/esm/extractContent/utils/getComponentName.mjs +1 -2
- package/dist/esm/extractContent/utils/getExistingIntlayerInfo.mjs +1 -2
- package/dist/esm/extractContent/utils/getOrGenerateKey.mjs +1 -2
- package/dist/esm/extractContent/utils/index.mjs +1 -1
- package/dist/esm/extractContent/utils/resolveDictionaryKey.mjs +1 -2
- package/dist/esm/extractScriptBlocks.mjs +1 -2
- package/dist/esm/getExtractPluginOptions.mjs +3 -4
- package/dist/esm/getOptimizePluginOptions.mjs +2 -3
- package/dist/esm/getPurgePluginOptions.mjs +2 -3
- package/dist/esm/index.mjs +15 -15
- package/dist/esm/nativeCallers.mjs +1 -2
- package/dist/esm/normalizedFilesList.mjs +1 -2
- package/dist/esm/pruneContext.mjs +1 -2
- package/dist/esm/staticAstReaders.mjs +1 -2
- package/dist/esm/transformers.mjs +3 -4
- package/dist/types/analyzeContentUsage.d.ts +0 -2
- package/dist/types/analyzeContentUsage.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-extract.d.ts +1 -3
- package/dist/types/babel-plugin-intlayer-extract.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-field-rename.d.ts +0 -2
- package/dist/types/babel-plugin-intlayer-field-rename.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-minify.d.ts +0 -2
- package/dist/types/babel-plugin-intlayer-minify.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-optimize.d.ts +0 -2
- package/dist/types/babel-plugin-intlayer-optimize.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-purge.d.ts +1 -3
- package/dist/types/babel-plugin-intlayer-purge.d.ts.map +1 -1
- package/dist/types/babel-plugin-intlayer-usage-analyzer.d.ts +1 -3
- package/dist/types/babel-plugin-intlayer-usage-analyzer.d.ts.map +1 -1
- package/dist/types/babelParser.d.ts +0 -2
- package/dist/types/babelParser.d.ts.map +1 -1
- package/dist/types/compat/namespaceResolution.d.ts +1 -3
- package/dist/types/compat/namespaceResolution.d.ts.map +1 -1
- package/dist/types/compat/optimizePass.d.ts +1 -3
- package/dist/types/compat/optimizePass.d.ts.map +1 -1
- package/dist/types/compat/usageAnalysis.d.ts +1 -3
- package/dist/types/compat/usageAnalysis.d.ts.map +1 -1
- package/dist/types/dictionaryImports.d.ts +0 -2
- package/dist/types/dictionaryImports.d.ts.map +1 -1
- package/dist/types/extractContent/babelProcessor.d.ts +1 -3
- package/dist/types/extractContent/babelProcessor.d.ts.map +1 -1
- package/dist/types/extractContent/contentWriter.d.ts +1 -2
- package/dist/types/extractContent/contentWriter.d.ts.map +1 -1
- package/dist/types/extractContent/extractContent.d.ts +1 -2
- package/dist/types/extractContent/extractContent.d.ts.map +1 -1
- package/dist/types/extractContent/index.d.ts +2 -2
- package/dist/types/extractContent/processTsxFile.d.ts +0 -2
- package/dist/types/extractContent/processTsxFile.d.ts.map +1 -1
- package/dist/types/extractContent/utils/constants.d.ts +0 -2
- package/dist/types/extractContent/utils/constants.d.ts.map +1 -1
- package/dist/types/extractContent/utils/detectPackageName.d.ts +0 -2
- package/dist/types/extractContent/utils/detectPackageName.d.ts.map +1 -1
- package/dist/types/extractContent/utils/extractDictionaryInfo.d.ts +1 -3
- package/dist/types/extractContent/utils/extractDictionaryInfo.d.ts.map +1 -1
- package/dist/types/extractContent/utils/extractDictionaryKey.d.ts +0 -2
- package/dist/types/extractContent/utils/extractDictionaryKey.d.ts.map +1 -1
- package/dist/types/extractContent/utils/generateKey.d.ts +0 -2
- package/dist/types/extractContent/utils/generateKey.d.ts.map +1 -1
- package/dist/types/extractContent/utils/getComponentName.d.ts +0 -2
- package/dist/types/extractContent/utils/getComponentName.d.ts.map +1 -1
- package/dist/types/extractContent/utils/getExistingIntlayerInfo.d.ts +0 -2
- package/dist/types/extractContent/utils/getExistingIntlayerInfo.d.ts.map +1 -1
- package/dist/types/extractContent/utils/getOrGenerateKey.d.ts +0 -2
- package/dist/types/extractContent/utils/getOrGenerateKey.d.ts.map +1 -1
- package/dist/types/extractContent/utils/resolveDictionaryKey.d.ts +0 -2
- package/dist/types/extractContent/utils/resolveDictionaryKey.d.ts.map +1 -1
- package/dist/types/extractScriptBlocks.d.ts +0 -2
- package/dist/types/extractScriptBlocks.d.ts.map +1 -1
- package/dist/types/getExtractPluginOptions.d.ts +0 -2
- package/dist/types/getExtractPluginOptions.d.ts.map +1 -1
- package/dist/types/getOptimizePluginOptions.d.ts +2 -3
- package/dist/types/getOptimizePluginOptions.d.ts.map +1 -1
- package/dist/types/getPurgePluginOptions.d.ts +2 -3
- package/dist/types/getPurgePluginOptions.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -9
- package/dist/types/nativeCallers.d.ts +0 -2
- package/dist/types/nativeCallers.d.ts.map +1 -1
- package/dist/types/normalizedFilesList.d.ts +0 -2
- package/dist/types/normalizedFilesList.d.ts.map +1 -1
- package/dist/types/pruneContext.d.ts +0 -2
- package/dist/types/pruneContext.d.ts.map +1 -1
- package/dist/types/staticAstReaders.d.ts +0 -2
- package/dist/types/staticAstReaders.d.ts.map +1 -1
- package/dist/types/transformers.d.ts +1 -3
- package/dist/types/transformers.d.ts.map +1 -1
- package/package.json +47 -47
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_extractContent_utils_constants = require(
|
|
3
|
-
const require_extractContent_utils_detectPackageName = require(
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const require_extractContent_utils_generateKey = require(
|
|
7
|
-
const require_extractContent_utils_getComponentName = require(
|
|
8
|
-
const require_extractContent_utils_getExistingIntlayerInfo = require(
|
|
9
|
-
const require_extractContent_utils_getOrGenerateKey = require(
|
|
10
|
-
const require_extractContent_utils_resolveDictionaryKey = require(
|
|
2
|
+
const require_extractContent_utils_constants = require("./constants.cjs");
|
|
3
|
+
const require_extractContent_utils_detectPackageName = require("./detectPackageName.cjs");
|
|
4
|
+
const require_extractContent_utils_extractDictionaryInfo = require("./extractDictionaryInfo.cjs");
|
|
5
|
+
const require_extractContent_utils_extractDictionaryKey = require("./extractDictionaryKey.cjs");
|
|
6
|
+
const require_extractContent_utils_generateKey = require("./generateKey.cjs");
|
|
7
|
+
const require_extractContent_utils_getComponentName = require("./getComponentName.cjs");
|
|
8
|
+
const require_extractContent_utils_getExistingIntlayerInfo = require("./getExistingIntlayerInfo.cjs");
|
|
9
|
+
const require_extractContent_utils_getOrGenerateKey = require("./getOrGenerateKey.cjs");
|
|
10
|
+
const require_extractContent_utils_resolveDictionaryKey = require("./resolveDictionaryKey.cjs");
|
|
11
11
|
|
|
12
12
|
exports.SERVER_CAPABLE_PACKAGES = require_extractContent_utils_constants.SERVER_CAPABLE_PACKAGES;
|
|
13
13
|
exports.detectPackageName = require_extractContent_utils_detectPackageName.detectPackageName;
|
|
@@ -4,7 +4,7 @@ let node_path = require("node:path");
|
|
|
4
4
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
5
5
|
let _intlayer_dictionaries_entry_unmerged = require("@intlayer/dictionaries-entry/unmerged");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/extractContent/utils/resolveDictionaryKey.ts
|
|
8
8
|
/**
|
|
9
9
|
* Resolves a unique dictionary key, checking for existing dictionaries and files.
|
|
10
10
|
* Note: this chokidar-specific variant fetches unmergedDictionaries internally
|
|
@@ -31,6 +31,5 @@ const resolveDictionaryKey = (initialKey, filePath, configuration, unmergedDicti
|
|
|
31
31
|
return initialKey;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
exports.resolveDictionaryKey = resolveDictionaryKey;
|
|
36
35
|
//# sourceMappingURL=resolveDictionaryKey.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/extractScriptBlocks.ts
|
|
5
5
|
/**
|
|
6
6
|
* Regex that matches every `<script …>…<\/script>` block in an SFC (Vue or
|
|
7
7
|
* Svelte). Works for both instance scripts and module/setup scripts.
|
|
@@ -98,7 +98,6 @@ const injectScriptBlocks = (originalCode, modifications) => {
|
|
|
98
98
|
return result;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
//#endregion
|
|
102
101
|
exports.extractScriptBlocks = extractScriptBlocks;
|
|
103
102
|
exports.injectScriptBlocks = injectScriptBlocks;
|
|
104
103
|
//# sourceMappingURL=extractScriptBlocks.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require(
|
|
3
|
-
const require_extractContent_contentWriter = require(
|
|
4
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
5
|
-
let _intlayer_config_node = require("@intlayer/config/node");
|
|
6
|
-
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_extractContent_contentWriter = require("./extractContent/contentWriter.cjs");
|
|
7
4
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
8
5
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
6
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
7
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
8
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
9
|
+
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/getExtractPluginOptions.ts
|
|
12
12
|
/**
|
|
13
13
|
* Get the options for the Intlayer Babel extraction plugin
|
|
14
14
|
* This function loads the Intlayer configuration and sets up the onExtract callback
|
|
@@ -39,6 +39,5 @@ const getExtractPluginOptions = (configuration = (0, _intlayer_config_node.getCo
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
exports.getExtractPluginOptions = getExtractPluginOptions;
|
|
44
43
|
//# sourceMappingURL=getExtractPluginOptions.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
3
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
4
3
|
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
5
4
|
let node_path = require("node:path");
|
|
5
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/getOptimizePluginOptions.ts
|
|
8
8
|
/**
|
|
9
9
|
* Load dictionaries from the dictionaries-entry package
|
|
10
10
|
*/
|
|
@@ -58,6 +58,5 @@ const getOptimizePluginOptions = (params) => {
|
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
exports.getOptimizePluginOptions = getOptimizePluginOptions;
|
|
63
62
|
//# sourceMappingURL=getOptimizePluginOptions.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
3
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
4
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
5
4
|
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
5
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/getPurgePluginOptions.ts
|
|
8
8
|
/**
|
|
9
9
|
* Attempts to load compiled dictionaries from `@intlayer/dictionaries-entry`.
|
|
10
10
|
* Returns an empty array if the entry point is not available (e.g. dictionaries
|
|
@@ -104,7 +104,6 @@ const getMinifyPluginOptions = (params) => {
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
//#endregion
|
|
108
107
|
exports.getMinifyPluginOptions = getMinifyPluginOptions;
|
|
109
108
|
exports.getPurgePluginOptions = getPurgePluginOptions;
|
|
110
109
|
//# sourceMappingURL=getPurgePluginOptions.cjs.map
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
2
|
+
const require_extractContent_utils_extractDictionaryKey = require("./extractContent/utils/extractDictionaryKey.cjs");
|
|
3
|
+
const require_extractContent_utils_extractDictionaryInfo = require("./extractContent/utils/extractDictionaryInfo.cjs");
|
|
4
|
+
const require_extractContent_contentWriter = require("./extractContent/contentWriter.cjs");
|
|
5
|
+
const require_babel_plugin_intlayer_extract = require("./babel-plugin-intlayer-extract.cjs");
|
|
6
|
+
const require_extractContent_utils_constants = require("./extractContent/utils/constants.cjs");
|
|
7
|
+
const require_extractContent_utils_detectPackageName = require("./extractContent/utils/detectPackageName.cjs");
|
|
8
|
+
const require_extractContent_utils_generateKey = require("./extractContent/utils/generateKey.cjs");
|
|
9
|
+
const require_extractContent_utils_getComponentName = require("./extractContent/utils/getComponentName.cjs");
|
|
10
|
+
const require_extractContent_extractContent = require("./extractContent/extractContent.cjs");
|
|
11
|
+
const require_babel_plugin_intlayer_field_rename = require("./babel-plugin-intlayer-field-rename.cjs");
|
|
12
|
+
const require_nativeCallers = require("./nativeCallers.cjs");
|
|
13
|
+
const require_pruneContext = require("./pruneContext.cjs");
|
|
14
|
+
const require_staticAstReaders = require("./staticAstReaders.cjs");
|
|
15
|
+
const require_babel_plugin_intlayer_minify = require("./babel-plugin-intlayer-minify.cjs");
|
|
16
|
+
const require_babel_plugin_intlayer_optimize = require("./babel-plugin-intlayer-optimize.cjs");
|
|
17
|
+
const require_babel_plugin_intlayer_purge = require("./babel-plugin-intlayer-purge.cjs");
|
|
18
|
+
const require_babel_plugin_intlayer_usage_analyzer = require("./babel-plugin-intlayer-usage-analyzer.cjs");
|
|
19
|
+
const require_extractScriptBlocks = require("./extractScriptBlocks.cjs");
|
|
20
|
+
const require_getExtractPluginOptions = require("./getExtractPluginOptions.cjs");
|
|
21
|
+
const require_getOptimizePluginOptions = require("./getOptimizePluginOptions.cjs");
|
|
22
|
+
const require_getPurgePluginOptions = require("./getPurgePluginOptions.cjs");
|
|
23
|
+
const require_transformers = require("./transformers.cjs");
|
|
24
24
|
|
|
25
25
|
exports.BABEL_PARSER_OPTIONS = require_transformers.BABEL_PARSER_OPTIONS;
|
|
26
26
|
exports.CHAINABLE_RUNTIME_METHOD_NAMES = require_nativeCallers.CHAINABLE_RUNTIME_METHOD_NAMES;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/nativeCallers.ts
|
|
3
3
|
/**
|
|
4
4
|
* The intlayer getters the build pipeline recognises without any adapter, and
|
|
5
5
|
* the runtime methods their result carries.
|
|
@@ -34,7 +34,6 @@ const NATIVE_CALLER_NAME_SET = new Set(INTLAYER_CALLER_NAMES);
|
|
|
34
34
|
*/
|
|
35
35
|
const CHAINABLE_RUNTIME_METHOD_NAMES = /* @__PURE__ */ new Set(["onChange"]);
|
|
36
36
|
|
|
37
|
-
//#endregion
|
|
38
37
|
exports.CHAINABLE_RUNTIME_METHOD_NAMES = CHAINABLE_RUNTIME_METHOD_NAMES;
|
|
39
38
|
exports.INTLAYER_CALLER_NAMES = INTLAYER_CALLER_NAMES;
|
|
40
39
|
exports.NATIVE_CALLER_NAME_SET = NATIVE_CALLER_NAME_SET;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/normalizedFilesList.ts
|
|
5
5
|
/**
|
|
6
6
|
* Cache of normalized files-list sets, keyed by the files-list array
|
|
7
7
|
* reference. Babel reuses the same plugin options object for every file of a
|
|
@@ -25,6 +25,5 @@ const getNormalizedFilesListSet = (filesList) => {
|
|
|
25
25
|
return normalizedSet;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
28
|
exports.getNormalizedFilesListSet = getNormalizedFilesListSet;
|
|
30
29
|
//# sourceMappingURL=normalizedFilesList.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/pruneContext.ts
|
|
3
3
|
const createPruneContext = () => ({
|
|
4
4
|
dictionaryKeyToFieldUsageMap: /* @__PURE__ */ new Map(),
|
|
5
5
|
dictionariesWithEdgeCases: /* @__PURE__ */ new Set(),
|
|
@@ -72,7 +72,6 @@ const recordFieldUsage = (pruneContext, dictionaryKey, fieldUsage) => {
|
|
|
72
72
|
pruneContext.dictionaryKeyToFieldUsageMap.set(dictionaryKey, new Set(fieldUsage));
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
//#endregion
|
|
76
75
|
exports.createPruneContext = createPruneContext;
|
|
77
76
|
exports.preserveNestedDictionaryFields = preserveNestedDictionaryFields;
|
|
78
77
|
exports.recordFieldUsage = recordFieldUsage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/staticAstReaders.ts
|
|
3
3
|
/**
|
|
4
4
|
* Static-value readers shared by every pass that has to decide, at build time,
|
|
5
5
|
* which dictionary a call site reads.
|
|
@@ -218,7 +218,6 @@ const isTestOnlyUse = (babelTypes, path) => {
|
|
|
218
218
|
return false;
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
-
//#endregion
|
|
222
221
|
exports.ABSENT_VALUE = ABSENT_VALUE;
|
|
223
222
|
exports.findObjectProperty = findObjectProperty;
|
|
224
223
|
exports.firstPathSegment = firstPathSegment;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_nativeCallers = require(
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
2
|
+
const require_nativeCallers = require("./nativeCallers.cjs");
|
|
3
|
+
const require_babel_plugin_intlayer_field_rename = require("./babel-plugin-intlayer-field-rename.cjs");
|
|
4
|
+
const require_babel_plugin_intlayer_optimize = require("./babel-plugin-intlayer-optimize.cjs");
|
|
5
|
+
const require_babel_plugin_intlayer_usage_analyzer = require("./babel-plugin-intlayer-usage-analyzer.cjs");
|
|
6
|
+
const require_extractScriptBlocks = require("./extractScriptBlocks.cjs");
|
|
7
7
|
let _babel_core = require("@babel/core");
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/transformers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Babel parser options covering the superset of syntaxes used across all
|
|
12
12
|
* supported frameworks (React / Vue / Svelte / Angular / …).
|
|
@@ -206,7 +206,6 @@ const optimizeSourceFile = async (code, sourceFilePath, options, fieldRenamePrun
|
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
208
|
|
|
209
|
-
//#endregion
|
|
210
209
|
exports.BABEL_PARSER_OPTIONS = BABEL_PARSER_OPTIONS;
|
|
211
210
|
exports.INTLAYER_USAGE_REGEX = INTLAYER_USAGE_REGEX;
|
|
212
211
|
exports.SOURCE_FILE_REGEX = SOURCE_FILE_REGEX;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
3
3
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
4
4
|
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
//#endregion
|
|
8
7
|
export { __require };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isTestOnlyUse, resolveContentRoot, skipTransparentWrappers } from "./staticAstReaders.mjs";
|
|
2
1
|
import { CHAINABLE_RUNTIME_METHOD_NAMES } from "./nativeCallers.mjs";
|
|
3
2
|
import { recordFieldUsage } from "./pruneContext.mjs";
|
|
3
|
+
import { isTestOnlyUse, resolveContentRoot, skipTransparentWrappers } from "./staticAstReaders.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/analyzeContentUsage.ts
|
|
6
6
|
/**
|
|
7
7
|
* Analyses how the result of a single `useIntlayer('key')` / `getIntlayer('key')`
|
|
8
8
|
* call expression is consumed, then records the field usage into `pruneContext`.
|
|
@@ -323,6 +323,5 @@ const analyzeCallExpressionUsage = (babelTypes, pruneContext, callExpressionPath
|
|
|
323
323
|
analyzeContentRoot(callExpressionPath);
|
|
324
324
|
};
|
|
325
325
|
|
|
326
|
-
//#endregion
|
|
327
326
|
export { analyzeCallExpressionUsage };
|
|
328
327
|
//# sourceMappingURL=analyzeContentUsage.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { getNormalizedFilesListSet } from "./normalizedFilesList.mjs";
|
|
2
|
-
import { detectPackageName } from "./extractContent/utils/detectPackageName.mjs";
|
|
3
1
|
import { extractContentSync } from "./extractContent/extractContent.mjs";
|
|
4
|
-
import {
|
|
2
|
+
import { detectPackageName } from "./extractContent/utils/detectPackageName.mjs";
|
|
3
|
+
import { getNormalizedFilesListSet } from "./normalizedFilesList.mjs";
|
|
5
4
|
import * as ANSIColors from "@intlayer/config/colors";
|
|
6
5
|
import { colorize, colorizePath, getAppLogger } from "@intlayer/config/logger";
|
|
6
|
+
import { relative } from "node:path";
|
|
7
7
|
import { normalizePath } from "@intlayer/config/utils";
|
|
8
8
|
import { parse } from "@babel/parser";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/babel-plugin-intlayer-extract.ts
|
|
11
11
|
/**
|
|
12
12
|
* Babel plugin that extracts translatable content from source files and
|
|
13
13
|
* injects Intlayer hooks (`useIntlayer` / `getIntlayer`) automatically.
|
|
@@ -80,6 +80,5 @@ const extractBabelPlugin = (_babel) => {
|
|
|
80
80
|
*/
|
|
81
81
|
const intlayerExtractBabelPlugin = extractBabelPlugin;
|
|
82
82
|
|
|
83
|
-
//#endregion
|
|
84
83
|
export { intlayerExtractBabelPlugin };
|
|
85
84
|
//# sourceMappingURL=babel-plugin-intlayer-extract.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolveContentRoot, skipTransparentWrappers } from "./staticAstReaders.mjs";
|
|
2
1
|
import { CHAINABLE_RUNTIME_METHOD_NAMES, NATIVE_CALLER_NAME_SET } from "./nativeCallers.mjs";
|
|
2
|
+
import { resolveContentRoot, skipTransparentWrappers } from "./staticAstReaders.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/babel-plugin-intlayer-field-rename.ts
|
|
5
5
|
/**
|
|
6
6
|
* Intlayer internal property names that must never be used as short-name
|
|
7
7
|
* targets. These appear inside content-node values (e.g. `{ nodeType:
|
|
@@ -421,6 +421,5 @@ const makeFieldRenameBabelPlugin = (pruneContext) => ({ types: babelTypes }) =>
|
|
|
421
421
|
} } }
|
|
422
422
|
});
|
|
423
423
|
|
|
424
|
-
//#endregion
|
|
425
424
|
export { buildNestedRenameMapFromContent, generateShortFieldName, getNestedRenameEntryAtPath, makeFieldRenameBabelPlugin, renameIntlayerFieldAccesses, serializeFieldRenameMap };
|
|
426
425
|
//# sourceMappingURL=babel-plugin-intlayer-field-rename.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { renameIntlayerFieldAccesses } from "./babel-plugin-intlayer-field-rename.mjs";
|
|
2
|
-
import { INTLAYER_USAGE_REGEX } from "./transformers.mjs";
|
|
3
2
|
import { getSharedPruneContext } from "./babel-plugin-intlayer-purge.mjs";
|
|
3
|
+
import { INTLAYER_USAGE_REGEX } from "./transformers.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/babel-plugin-intlayer-minify.ts
|
|
6
6
|
/**
|
|
7
7
|
* Babel plugin that rewrites component source files to use the short
|
|
8
8
|
* alphabetic aliases assigned to dictionary content fields during the
|
|
@@ -60,6 +60,5 @@ const intlayerMinifyBabelPlugin = (babel) => ({
|
|
|
60
60
|
} } }
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
//#endregion
|
|
64
63
|
export { intlayerMinifyBabelPlugin };
|
|
65
64
|
//# sourceMappingURL=babel-plugin-intlayer-minify.mjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { readStaticString } from "./staticAstReaders.mjs";
|
|
2
1
|
import { createCompatOptimizePass } from "./compat/optimizePass.mjs";
|
|
3
2
|
import { createDictionaryImportRegistry } from "./dictionaryImports.mjs";
|
|
4
3
|
import { getNormalizedFilesListSet } from "./normalizedFilesList.mjs";
|
|
4
|
+
import { readStaticString } from "./staticAstReaders.mjs";
|
|
5
5
|
import { dirname, join, relative } from "node:path";
|
|
6
6
|
import { normalizePath } from "@intlayer/config/utils";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/babel-plugin-intlayer-optimize.ts
|
|
9
9
|
const PACKAGE_LIST = [
|
|
10
10
|
"intlayer",
|
|
11
11
|
"@intlayer/core",
|
|
@@ -456,6 +456,5 @@ const optimizeBabelPlugin = (babel) => {
|
|
|
456
456
|
*/
|
|
457
457
|
const intlayerOptimizeBabelPlugin = optimizeBabelPlugin;
|
|
458
458
|
|
|
459
|
-
//#endregion
|
|
460
459
|
export { intlayerOptimizeBabelPlugin };
|
|
461
460
|
//# sourceMappingURL=babel-plugin-intlayer-optimize.mjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createPruneContext, preserveNestedDictionaryFields } from "./pruneContext.mjs";
|
|
2
|
-
import { makeUsageAnalyzerBabelPlugin } from "./babel-plugin-intlayer-usage-analyzer.mjs";
|
|
3
2
|
import { buildNestedRenameMapFromContent, getNestedRenameEntryAtPath } from "./babel-plugin-intlayer-field-rename.mjs";
|
|
3
|
+
import { makeUsageAnalyzerBabelPlugin } from "./babel-plugin-intlayer-usage-analyzer.mjs";
|
|
4
4
|
import { extractScriptBlocks } from "./extractScriptBlocks.mjs";
|
|
5
5
|
import { BABEL_PARSER_OPTIONS, SOURCE_FILE_REGEX, getUsageCheckRegex } from "./transformers.mjs";
|
|
6
|
+
import * as ANSIColors from "@intlayer/config/colors";
|
|
7
|
+
import { colorize, colorizeKey, colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
6
8
|
import { formatPath } from "@intlayer/engine/utils";
|
|
7
9
|
import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
8
10
|
import { join } from "node:path";
|
|
9
11
|
import { transformSync } from "@babel/core";
|
|
10
|
-
import * as ANSIColors from "@intlayer/config/colors";
|
|
11
|
-
import { colorize, colorizeKey, colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/babel-plugin-intlayer-purge.ts
|
|
14
14
|
/**
|
|
15
15
|
* Cache of built {@link PruneContext} objects, keyed by the project's
|
|
16
16
|
* `baseDir`. Each context is built exactly once per Node.js process:
|
|
@@ -483,6 +483,5 @@ const intlayerPurgeBabelPlugin = (_babel) => ({
|
|
|
483
483
|
visitor: {}
|
|
484
484
|
});
|
|
485
485
|
|
|
486
|
-
//#endregion
|
|
487
486
|
export { getSharedPruneContext, intlayerPurgeBabelPlugin, runIntlayerPurgePipeline };
|
|
488
487
|
//# sourceMappingURL=babel-plugin-intlayer-purge.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { readStaticString, unwrapAwait } from "./staticAstReaders.mjs";
|
|
2
|
-
import { CHAINABLE_RUNTIME_METHOD_NAMES, INTLAYER_CALLER_NAMES, NATIVE_CALLER_NAME_SET } from "./nativeCallers.mjs";
|
|
3
|
-
import { createPruneContext, preserveNestedDictionaryFields } from "./pruneContext.mjs";
|
|
4
1
|
import { analyzeCallExpressionUsage } from "./analyzeContentUsage.mjs";
|
|
5
2
|
import { createCompatUsageAnalyzer } from "./compat/usageAnalysis.mjs";
|
|
3
|
+
import { CHAINABLE_RUNTIME_METHOD_NAMES, INTLAYER_CALLER_NAMES, NATIVE_CALLER_NAME_SET } from "./nativeCallers.mjs";
|
|
4
|
+
import { readStaticString, unwrapAwait } from "./staticAstReaders.mjs";
|
|
5
|
+
import { createPruneContext, preserveNestedDictionaryFields } from "./pruneContext.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/babel-plugin-intlayer-usage-analyzer.ts
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated Always empty. Compat callers are injected per build through
|
|
10
10
|
* `options.compatCallers`; there is no default registry to fall back to.
|
|
@@ -86,6 +86,5 @@ const makeUsageAnalyzerBabelPlugin = (pruneContext, options) => ({ types: babelT
|
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
//#endregion
|
|
90
89
|
export { CHAINABLE_RUNTIME_METHOD_NAMES, DEFAULT_COMPAT_CALLERS, INTLAYER_CALLER_NAMES, NATIVE_CALLER_NAME_SET, createPruneContext, makeUsageAnalyzerBabelPlugin, preserveNestedDictionaryFields, unwrapAwait };
|
|
91
90
|
//# sourceMappingURL=babel-plugin-intlayer-usage-analyzer.mjs.map
|
package/dist/esm/babelParser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse } from "@babel/parser";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/babelParser.ts
|
|
4
4
|
/**
|
|
5
5
|
* Recast-compatible parsers backed by the `@babel/parser` version owned by
|
|
6
6
|
* `@intlayer/babel`.
|
|
@@ -54,6 +54,5 @@ const typescriptParser = { parse: (source) => parse(source, buildBabelOptions(["
|
|
|
54
54
|
/** Drop-in replacement for `recast/parsers/babel-ts` (TS *and* JSX). */
|
|
55
55
|
const babelTsParser = { parse: (source) => parse(source, buildBabelOptions(["jsx", "typescript"])) };
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { babelTsParser, typescriptParser };
|
|
59
58
|
//# sourceMappingURL=babelParser.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ABSENT_VALUE, findObjectProperty, readObjectProperty, readObjectPropertyNode, readStaticFirstSegment, readStaticString } from "../staticAstReaders.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/compat/namespaceResolution.ts
|
|
4
4
|
/**
|
|
5
5
|
* Resolution of a compat caller's namespace from its
|
|
6
6
|
* {@link CallerValueSource} list.
|
|
@@ -115,6 +115,5 @@ const resolveNamespaceForRewrite = (babelTypes, callArguments, descriptor) => {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
118
|
export { DEFAULT_COMPAT_NAMESPACE, resolveKeyPrefixForAnalysis, resolveNamespaceForAnalysis, resolveNamespaceForRewrite };
|
|
120
119
|
//# sourceMappingURL=namespaceResolution.mjs.map
|
|
@@ -2,7 +2,7 @@ import { ABSENT_VALUE, readJsxAttributeString, readObjectPropertyNode, readStati
|
|
|
2
2
|
import { resolveNamespaceForAnalysis, resolveNamespaceForRewrite } from "./namespaceResolution.mjs";
|
|
3
3
|
import { getRewritableCallers } from "@intlayer/config/callers";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/compat/optimizePass.ts
|
|
6
6
|
/**
|
|
7
7
|
* Factories a JSX element compiles into — `jsx(Trans, props)` /
|
|
8
8
|
* `_jsxs(Trans, props)` / `jsxRuntime.jsxDEV(Trans, props)` for the automatic
|
|
@@ -438,6 +438,5 @@ const createCompatOptimizePass = (babelTypes, compatCallers, imports, buildModes
|
|
|
438
438
|
};
|
|
439
439
|
};
|
|
440
440
|
|
|
441
|
-
//#endregion
|
|
442
441
|
export { createCompatOptimizePass };
|
|
443
442
|
//# sourceMappingURL=optimizePass.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ABSENT_VALUE, firstPathSegment, readJsxAttributeString, readObjectProperty, readStaticFirstSegment, readStaticString, unwrapAwait } from "../staticAstReaders.mjs";
|
|
2
|
-
import { recordFieldUsage } from "../pruneContext.mjs";
|
|
3
1
|
import { analyzeCallExpressionUsage } from "../analyzeContentUsage.mjs";
|
|
2
|
+
import { recordFieldUsage } from "../pruneContext.mjs";
|
|
3
|
+
import { ABSENT_VALUE, firstPathSegment, readJsxAttributeString, readObjectProperty, readStaticFirstSegment, readStaticString, unwrapAwait } from "../staticAstReaders.mjs";
|
|
4
4
|
import { DEFAULT_COMPAT_NAMESPACE, resolveKeyPrefixForAnalysis, resolveNamespaceForAnalysis } from "./namespaceResolution.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/compat/usageAnalysis.ts
|
|
7
7
|
/**
|
|
8
8
|
* Analyses how the translation function produced by a compat namespace caller
|
|
9
9
|
* (`useTranslation`, `useTranslations`, `getTranslations`, `getFixedT`,
|
|
@@ -188,6 +188,5 @@ const createCompatUsageAnalyzer = (babelTypes, pruneContext, compatCallers, file
|
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
//#endregion
|
|
192
191
|
export { analyzeNamespaceCallerUsage, createCompatUsageAnalyzer };
|
|
193
192
|
//# sourceMappingURL=usageAnalysis.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getPathHash } from "@intlayer/engine/utils";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryImports.ts
|
|
4
4
|
/** Identifier suffix that also tells the injection step which directory to read. */
|
|
5
5
|
const IDENT_SUFFIX = {
|
|
6
6
|
static: "",
|
|
@@ -33,6 +33,5 @@ const createDictionaryImportRegistry = (babelTypes) => {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
36
|
export { createDictionaryImportRegistry, makeDictionaryIdent };
|
|
38
37
|
//# sourceMappingURL=dictionaryImports.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { resolveDictionaryKey } from "./utils/resolveDictionaryKey.mjs";
|
|
1
2
|
import { getComponentName } from "./utils/getComponentName.mjs";
|
|
2
3
|
import { getExistingIntlayerInfo } from "./utils/getExistingIntlayerInfo.mjs";
|
|
3
4
|
import { getOrGenerateKey } from "./utils/getOrGenerateKey.mjs";
|
|
4
|
-
import { resolveDictionaryKey } from "./utils/resolveDictionaryKey.mjs";
|
|
5
5
|
import { ATTRIBUTES_TO_EXTRACT, shouldExtract } from "@intlayer/config/extract";
|
|
6
6
|
import _traverse from "@babel/traverse";
|
|
7
7
|
import * as t from "@babel/types";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/extractContent/babelProcessor.ts
|
|
10
10
|
const traverse = typeof _traverse === "function" ? _traverse : _traverse.default;
|
|
11
11
|
/**
|
|
12
12
|
* Method names whose string arguments are technical operands — lookups,
|
|
@@ -491,6 +491,5 @@ const extractTsContent = (ast, fileCode, existingKeys, configuration, filePath,
|
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
-
//#endregion
|
|
495
494
|
export { extractBabelContentForComponents, extractTsContent, handleJsxInsertionBabel };
|
|
496
495
|
//# sourceMappingURL=babelProcessor.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveContentFilePaths } from "./utils/extractDictionaryInfo.mjs";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
import { dirname, relative } from "node:path";
|
|
4
3
|
import { mkdir } from "node:fs/promises";
|
|
4
|
+
import { dirname, relative } from "node:path";
|
|
5
5
|
import { insertContentInDictionary } from "@intlayer/core/plugins";
|
|
6
6
|
import { buildDictionary, ensureIntlayerBundle, loadContentDeclaration, writeContentDeclaration } from "@intlayer/engine/build";
|
|
7
7
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/extractContent/contentWriter.ts
|
|
10
10
|
const hasInsertionVars = (str) => /\{\{[^}]+\}\}/.test(str);
|
|
11
11
|
const getInsertionFields = (template) => {
|
|
12
12
|
const fields = /* @__PURE__ */ new Set();
|
|
@@ -130,6 +130,5 @@ const writeContentHelper = async (extractedContent, dictionaryKey, filePath, con
|
|
|
130
130
|
return absolutePath;
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
//#endregion
|
|
134
133
|
export { mergeWithExistingMultilingualDictionary, mergeWithExistingPerLocaleDictionary, writeContentHelper };
|
|
135
134
|
//# sourceMappingURL=contentWriter.mjs.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { extractDictionaryKey, extractDictionaryKeyFromPath } from "./utils/extractDictionaryKey.mjs";
|
|
2
|
-
import { generateKey } from "./utils/generateKey.mjs";
|
|
3
1
|
import { extractTsContent } from "./babelProcessor.mjs";
|
|
4
2
|
import { writeContentHelper } from "./contentWriter.mjs";
|
|
5
3
|
import { processTsxFile } from "./processTsxFile.mjs";
|
|
4
|
+
import { extractDictionaryKey, extractDictionaryKeyFromPath } from "./utils/extractDictionaryKey.mjs";
|
|
5
|
+
import { generateKey } from "./utils/generateKey.mjs";
|
|
6
|
+
import * as ANSIColors from "@intlayer/config/colors";
|
|
7
|
+
import { colorize, colorizePath, getAppLogger } from "@intlayer/config/logger";
|
|
6
8
|
import { getConfiguration } from "@intlayer/config/node";
|
|
7
9
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
8
10
|
import { extname, relative } from "node:path";
|
|
9
|
-
import * as ANSIColors from "@intlayer/config/colors";
|
|
10
|
-
import { colorize, colorizePath, getAppLogger } from "@intlayer/config/logger";
|
|
11
11
|
import { getProjectRequire } from "@intlayer/config/utils";
|
|
12
|
-
import { execSync } from "node:child_process";
|
|
13
|
-
import { ATTRIBUTES_TO_EXTRACT, shouldExtract } from "@intlayer/config/extract";
|
|
14
12
|
import { getUnmergedDictionaries } from "@intlayer/dictionaries-entry/unmerged";
|
|
15
13
|
import { detectFormatCommand } from "@intlayer/engine/cli";
|
|
14
|
+
import { execSync } from "node:child_process";
|
|
15
|
+
import { ATTRIBUTES_TO_EXTRACT, shouldExtract } from "@intlayer/config/extract";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/extractContent/extractContent.ts
|
|
18
18
|
let vueCompiler = null;
|
|
19
19
|
let svelteCompiler = null;
|
|
20
20
|
const formatCompilerResult = (componentKey, res) => {
|
|
@@ -211,6 +211,5 @@ const extractContentSync = (filePath, packageName, options) => {
|
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
//#endregion
|
|
215
214
|
export { extractContent, extractContentSync };
|
|
216
215
|
//# sourceMappingURL=extractContent.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { mergeWithExistingMultilingualDictionary, mergeWithExistingPerLocaleDictionary, writeContentHelper } from "./contentWriter.mjs";
|
|
2
|
+
import { extractContent, extractContentSync } from "./extractContent.mjs";
|
|
1
3
|
import { SERVER_CAPABLE_PACKAGES, packageList } from "./utils/constants.mjs";
|
|
2
4
|
import { detectPackageName } from "./utils/detectPackageName.mjs";
|
|
3
|
-
import { extractDictionaryKey, extractDictionaryKeyFromPath } from "./utils/extractDictionaryKey.mjs";
|
|
4
5
|
import { extractDictionaryInfo, getOutput, resolveContentFilePaths } from "./utils/extractDictionaryInfo.mjs";
|
|
6
|
+
import { extractDictionaryKey, extractDictionaryKeyFromPath } from "./utils/extractDictionaryKey.mjs";
|
|
5
7
|
import { generateKey } from "./utils/generateKey.mjs";
|
|
6
8
|
import { getComponentName } from "./utils/getComponentName.mjs";
|
|
7
|
-
import { mergeWithExistingMultilingualDictionary, mergeWithExistingPerLocaleDictionary, writeContentHelper } from "./contentWriter.mjs";
|
|
8
|
-
import { extractContent, extractContentSync } from "./extractContent.mjs";
|
|
9
9
|
|
|
10
10
|
export { SERVER_CAPABLE_PACKAGES, detectPackageName, extractContent, extractContentSync, extractDictionaryInfo, extractDictionaryKey, extractDictionaryKeyFromPath, generateKey, getComponentName, getOutput, mergeWithExistingMultilingualDictionary, mergeWithExistingPerLocaleDictionary, packageList, resolveContentFilePaths, writeContentHelper };
|