@intlayer/engine 9.8.0 → 9.8.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/assets/initConfig/templates/cjs.txt +16 -15
- package/dist/assets/initConfig/templates/json.txt +8 -7
- package/dist/assets/initConfig/templates/mjs.txt +16 -15
- package/dist/assets/initConfig/templates/ts.txt +16 -15
- package/dist/cjs/_virtual/_utils_asset.cjs +1 -1
- package/dist/cjs/build.cjs +9 -9
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +3 -3
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeNestedDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +2 -2
- package/dist/cjs/cleanOutputDir.cjs +1 -1
- package/dist/cjs/cleanRemovedContentDeclaration.cjs +1 -1
- package/dist/cjs/cli.cjs +22 -7
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +2 -2
- package/dist/cjs/createType/createModuleAugmentation.cjs +1 -1
- package/dist/cjs/createType/createType.cjs +1 -1
- package/dist/cjs/detectFormatCommand.cjs +45 -0
- package/dist/cjs/detectFormatCommand.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +2 -2
- package/dist/cjs/init/aiSetup.cjs +280 -0
- package/dist/cjs/init/aiSetup.cjs.map +1 -0
- package/dist/cjs/init/cms.cjs +50 -6
- package/dist/cjs/init/cms.cjs.map +1 -1
- package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +2 -2
- package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs +1 -1
- package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +1 -1
- package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs +1 -1
- package/dist/cjs/init/index.cjs +29 -3
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/configManipulation.cjs +47 -10
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
- package/dist/cjs/init/utils/fileSystem.cjs +2 -2
- package/dist/cjs/init/utils/githubActions.cjs +1 -1
- package/dist/cjs/init/utils/index.cjs +11 -0
- package/dist/cjs/init/utils/intlayerDependencies.cjs +2 -2
- package/dist/cjs/init/utils/packageManager.cjs +1 -1
- package/dist/cjs/init/utils/toolConfigManipulation.cjs +247 -0
- package/dist/cjs/init/utils/toolConfigManipulation.cjs.map +1 -0
- package/dist/cjs/initConfig/index.cjs +1 -1
- package/dist/cjs/installLSP.cjs +1 -1
- package/dist/cjs/installMCP/installMCP.cjs +44 -2
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +1 -1
- package/dist/cjs/listGitFiles.cjs +1 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +1 -1
- package/dist/cjs/prepareIntlayer.cjs +2 -2
- package/dist/cjs/scan/index.cjs +7 -7
- package/dist/cjs/syncPluginKit/createFileAdapter.cjs +1 -1
- package/dist/cjs/utils/buildComponentFilesList.cjs +1 -1
- package/dist/cjs/utils/contentWatcherLock.cjs +2 -2
- package/dist/cjs/utils/readDictionariesFromDisk.cjs +1 -1
- package/dist/cjs/utils/runOnce.cjs +2 -2
- package/dist/cjs/utils/withFileLock.cjs +2 -2
- package/dist/cjs/watcher.cjs +4 -4
- package/dist/cjs/writeConfiguration/index.cjs +2 -2
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +3 -12
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +3 -12
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +2 -11
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +2 -11
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs.map +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +2 -2
- package/dist/esm/_virtual/_utils_asset.mjs +1 -1
- package/dist/esm/build.mjs +9 -9
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +3 -3
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeNestedDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +2 -2
- package/dist/esm/cleanOutputDir.mjs +1 -1
- package/dist/esm/cleanRemovedContentDeclaration.mjs +1 -1
- package/dist/esm/cli.mjs +12 -11
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +2 -2
- package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
- package/dist/esm/createType/createType.mjs +1 -1
- package/dist/esm/detectFormatCommand.mjs +43 -1
- package/dist/esm/detectFormatCommand.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +2 -2
- package/dist/esm/init/aiSetup.mjs +270 -0
- package/dist/esm/init/aiSetup.mjs.map +1 -0
- package/dist/esm/init/cms.mjs +50 -8
- package/dist/esm/init/cms.mjs.map +1 -1
- package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +2 -2
- package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs +1 -1
- package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +1 -1
- package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs +1 -1
- package/dist/esm/init/index.mjs +29 -3
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/configManipulation.mjs +47 -11
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
- package/dist/esm/init/utils/fileSystem.mjs +2 -2
- package/dist/esm/init/utils/githubActions.mjs +1 -1
- package/dist/esm/init/utils/index.mjs +3 -2
- package/dist/esm/init/utils/intlayerDependencies.mjs +2 -2
- package/dist/esm/init/utils/packageManager.mjs +1 -1
- package/dist/esm/init/utils/toolConfigManipulation.mjs +236 -0
- package/dist/esm/init/utils/toolConfigManipulation.mjs.map +1 -0
- package/dist/esm/initConfig/index.mjs +1 -1
- package/dist/esm/installLSP.mjs +1 -1
- package/dist/esm/installMCP/installMCP.mjs +44 -3
- package/dist/esm/installMCP/installMCP.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +1 -1
- package/dist/esm/listGitFiles.mjs +1 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +1 -1
- package/dist/esm/loadDictionaries/log.mjs +1 -1
- package/dist/esm/prepareIntlayer.mjs +2 -2
- package/dist/esm/scan/index.mjs +7 -7
- package/dist/esm/syncPluginKit/createFileAdapter.mjs +1 -1
- package/dist/esm/utils/buildComponentFilesList.mjs +1 -1
- package/dist/esm/utils/contentWatcherLock.mjs +2 -2
- package/dist/esm/utils/readDictionariesFromDisk.mjs +1 -1
- package/dist/esm/utils/runOnce.mjs +2 -2
- package/dist/esm/utils/withFileLock.mjs +2 -2
- package/dist/esm/watcher.mjs +4 -4
- package/dist/esm/writeConfiguration/index.mjs +2 -2
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +4 -13
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +4 -13
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +3 -12
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +3 -12
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +1 -1
- package/dist/esm/writeFileIfChanged.mjs +2 -2
- package/dist/types/build.d.ts +15 -15
- package/dist/types/cli.d.ts +14 -13
- package/dist/types/detectFormatCommand.d.ts +24 -0
- package/dist/types/detectFormatCommand.d.ts.map +1 -1
- package/dist/types/init/aiSetup.d.ts +69 -0
- package/dist/types/init/aiSetup.d.ts.map +1 -0
- package/dist/types/init/cms.d.ts +13 -1
- package/dist/types/init/cms.d.ts.map +1 -1
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/configManipulation.d.ts +14 -0
- package/dist/types/init/utils/configManipulation.d.ts.map +1 -1
- package/dist/types/init/utils/index.d.ts +3 -2
- package/dist/types/init/utils/toolConfigManipulation.d.ts +46 -0
- package/dist/types/init/utils/toolConfigManipulation.d.ts.map +1 -0
- package/dist/types/installMCP/installMCP.d.ts +6 -0
- package/dist/types/installMCP/installMCP.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +1 -1
- package/dist/types/scan/index.d.ts +2 -2
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +1 -1
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -17,10 +17,10 @@ const config = {
|
|
|
17
17
|
routing: {
|
|
18
18
|
/**
|
|
19
19
|
* Locale routing strategy.
|
|
20
|
-
* - "prefix-no-default":
|
|
21
|
-
* - "prefix-all":
|
|
22
|
-
* - "no-prefix":
|
|
23
|
-
* - "search-params":
|
|
20
|
+
* - "prefix-no-default": Prefix all except the default locale (e.g., /dashboard, /fr/dashboard).
|
|
21
|
+
* - "prefix-all": Prefix all locales (e.g., /en/dashboard, /fr/dashboard).
|
|
22
|
+
* - "no-prefix": No locale in the URL.
|
|
23
|
+
* - "search-params": Use search params to define the locale (e.g., /dashboard/?locale=en, /dashboard/?locale=fr)
|
|
24
24
|
* Default: "prefix-no-default"
|
|
25
25
|
*/
|
|
26
26
|
mode: 'prefix-no-default',
|
|
@@ -88,15 +88,15 @@ const config = {
|
|
|
88
88
|
* ```
|
|
89
89
|
*
|
|
90
90
|
* Variable list:
|
|
91
|
-
* - `fileName`:
|
|
92
|
-
* - `key`:
|
|
93
|
-
* - `locale`:
|
|
94
|
-
* - `extension`:
|
|
95
|
-
* - `componentFileName`:
|
|
91
|
+
* - `fileName`: The name of the file.
|
|
92
|
+
* - `key`: The key of the content.
|
|
93
|
+
* - `locale`: The locale of the content.
|
|
94
|
+
* - `extension`: The extension of the file.
|
|
95
|
+
* - `componentFileName`: The name of the component file.
|
|
96
96
|
* - `componentExtension`: The extension of the component file.
|
|
97
|
-
* - `format`:
|
|
98
|
-
* - `componentFormat`:
|
|
99
|
-
* - `componentDirPath`:
|
|
97
|
+
* - `format`: The format of the dictionary.
|
|
98
|
+
* - `componentFormat`: The format of the component dictionary.
|
|
99
|
+
* - `componentDirPath`: The directory path of the component.
|
|
100
100
|
*/
|
|
101
101
|
output: ({ fileName }) => `./${fileName}.content.ts`,
|
|
102
102
|
|
|
@@ -112,9 +112,10 @@ const config = {
|
|
|
112
112
|
dictionary: {
|
|
113
113
|
/**
|
|
114
114
|
* Controls how dictionaries are imported.
|
|
115
|
-
* - "static":
|
|
116
|
-
* - "dynamic":
|
|
117
|
-
* - "fetch":
|
|
115
|
+
* - "static": Statically imported at build time.
|
|
116
|
+
* - "dynamic": Dynamically imported using Suspense.
|
|
117
|
+
* - "fetch": Fetched dynamically via the live sync API.
|
|
118
|
+
|
|
118
119
|
*/
|
|
119
120
|
importMode: 'static',
|
|
120
121
|
},
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"routing": {
|
|
14
14
|
/**
|
|
15
15
|
* Locale routing strategy.
|
|
16
|
-
* - "prefix-no-default":
|
|
17
|
-
* - "prefix-all":
|
|
18
|
-
* - "no-prefix":
|
|
19
|
-
* - "search-params":
|
|
16
|
+
* - "prefix-no-default": Prefix all except the default locale (e.g., /dashboard, /fr/dashboard).
|
|
17
|
+
* - "prefix-all": Prefix all locales (e.g., /en/dashboard, /fr/dashboard).
|
|
18
|
+
* - "no-prefix": No locale in the URL.
|
|
19
|
+
* - "search-params": Use search params to define the locale (e.g., /dashboard/?locale=en, /dashboard/?locale=fr)
|
|
20
20
|
* Default: "prefix-no-default"
|
|
21
21
|
*/
|
|
22
22
|
"mode": "prefix-no-default",
|
|
@@ -72,9 +72,10 @@
|
|
|
72
72
|
"dictionary": {
|
|
73
73
|
/**
|
|
74
74
|
* Controls how dictionaries are imported.
|
|
75
|
-
* - "static":
|
|
76
|
-
* - "dynamic":
|
|
77
|
-
* - "fetch":
|
|
75
|
+
* - "static": Statically imported at build time.
|
|
76
|
+
* - "dynamic": Dynamically imported using Suspense.
|
|
77
|
+
* - "fetch": Fetched dynamically via the live sync API.
|
|
78
|
+
|
|
78
79
|
*/
|
|
79
80
|
"importMode": "static"
|
|
80
81
|
},
|
|
@@ -17,10 +17,10 @@ const config = {
|
|
|
17
17
|
routing: {
|
|
18
18
|
/**
|
|
19
19
|
* Locale routing strategy.
|
|
20
|
-
* - "prefix-no-default":
|
|
21
|
-
* - "prefix-all":
|
|
22
|
-
* - "no-prefix":
|
|
23
|
-
* - "search-params":
|
|
20
|
+
* - "prefix-no-default": Prefix all except the default locale (e.g., /dashboard, /fr/dashboard).
|
|
21
|
+
* - "prefix-all": Prefix all locales (e.g., /en/dashboard, /fr/dashboard).
|
|
22
|
+
* - "no-prefix": No locale in the URL.
|
|
23
|
+
* - "search-params": Use search params to define the locale (e.g., /dashboard/?locale=en, /dashboard/?locale=fr)
|
|
24
24
|
* Default: "prefix-no-default"
|
|
25
25
|
*/
|
|
26
26
|
mode: 'prefix-no-default',
|
|
@@ -88,15 +88,15 @@ const config = {
|
|
|
88
88
|
* ```
|
|
89
89
|
*
|
|
90
90
|
* Variable list:
|
|
91
|
-
* - `fileName`:
|
|
92
|
-
* - `key`:
|
|
93
|
-
* - `locale`:
|
|
94
|
-
* - `extension`:
|
|
95
|
-
* - `componentFileName`:
|
|
91
|
+
* - `fileName`: The name of the file.
|
|
92
|
+
* - `key`: The key of the content.
|
|
93
|
+
* - `locale`: The locale of the content.
|
|
94
|
+
* - `extension`: The extension of the file.
|
|
95
|
+
* - `componentFileName`: The name of the component file.
|
|
96
96
|
* - `componentExtension`: The extension of the component file.
|
|
97
|
-
* - `format`:
|
|
98
|
-
* - `componentFormat`:
|
|
99
|
-
* - `componentDirPath`:
|
|
97
|
+
* - `format`: The format of the dictionary.
|
|
98
|
+
* - `componentFormat`: The format of the component dictionary.
|
|
99
|
+
* - `componentDirPath`: The directory path of the component.
|
|
100
100
|
*/
|
|
101
101
|
output: ({ fileName }) => `./${fileName}.content.ts`,
|
|
102
102
|
|
|
@@ -112,9 +112,10 @@ const config = {
|
|
|
112
112
|
dictionary: {
|
|
113
113
|
/**
|
|
114
114
|
* Controls how dictionaries are imported.
|
|
115
|
-
* - "static":
|
|
116
|
-
* - "dynamic":
|
|
117
|
-
* - "fetch":
|
|
115
|
+
* - "static": Statically imported at build time.
|
|
116
|
+
* - "dynamic": Dynamically imported using Suspense.
|
|
117
|
+
* - "fetch": Fetched dynamically via the live sync API.
|
|
118
|
+
|
|
118
119
|
*/
|
|
119
120
|
importMode: 'static',
|
|
120
121
|
},
|
|
@@ -16,10 +16,10 @@ const config: IntlayerConfig = {
|
|
|
16
16
|
routing: {
|
|
17
17
|
/**
|
|
18
18
|
* Locale routing strategy.
|
|
19
|
-
* - "prefix-no-default":
|
|
20
|
-
* - "prefix-all":
|
|
21
|
-
* - "no-prefix":
|
|
22
|
-
* - "search-params":
|
|
19
|
+
* - "prefix-no-default": Prefix all except the default locale (e.g., /dashboard, /fr/dashboard).
|
|
20
|
+
* - "prefix-all": Prefix all locales (e.g., /en/dashboard, /fr/dashboard).
|
|
21
|
+
* - "no-prefix": No locale in the URL.
|
|
22
|
+
* - "search-params": Use search params to define the locale (e.g., /dashboard/?locale=en, /dashboard/?locale=fr)
|
|
23
23
|
* Default: "prefix-no-default"
|
|
24
24
|
*/
|
|
25
25
|
mode: 'prefix-no-default',
|
|
@@ -87,15 +87,15 @@ const config: IntlayerConfig = {
|
|
|
87
87
|
* ```
|
|
88
88
|
*
|
|
89
89
|
* Variable list:
|
|
90
|
-
* - `fileName`:
|
|
91
|
-
* - `key`:
|
|
92
|
-
* - `locale`:
|
|
93
|
-
* - `extension`:
|
|
94
|
-
* - `componentFileName`:
|
|
90
|
+
* - `fileName`: The name of the file.
|
|
91
|
+
* - `key`: The key of the content.
|
|
92
|
+
* - `locale`: The locale of the content.
|
|
93
|
+
* - `extension`: The extension of the file.
|
|
94
|
+
* - `componentFileName`: The name of the component file.
|
|
95
95
|
* - `componentExtension`: The extension of the component file.
|
|
96
|
-
* - `format`:
|
|
97
|
-
* - `componentFormat`:
|
|
98
|
-
* - `componentDirPath`:
|
|
96
|
+
* - `format`: The format of the dictionary.
|
|
97
|
+
* - `componentFormat`: The format of the component dictionary.
|
|
98
|
+
* - `componentDirPath`: The directory path of the component.
|
|
99
99
|
*/
|
|
100
100
|
output: ({ fileName }) => `./${fileName}.content.ts`,
|
|
101
101
|
|
|
@@ -111,9 +111,10 @@ const config: IntlayerConfig = {
|
|
|
111
111
|
dictionary: {
|
|
112
112
|
/**
|
|
113
113
|
* Controls how dictionaries are imported.
|
|
114
|
-
* - "static":
|
|
115
|
-
* - "dynamic":
|
|
116
|
-
* - "fetch":
|
|
114
|
+
* - "static": Statically imported at build time.
|
|
115
|
+
* - "dynamic": Dynamically imported using Suspense.
|
|
116
|
+
* - "fetch": Fetched dynamically via the live sync API.
|
|
117
|
+
|
|
117
118
|
*/
|
|
118
119
|
importMode: 'static',
|
|
119
120
|
},
|
package/dist/cjs/build.cjs
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_cleanOutputDir = require("./cleanOutputDir.cjs");
|
|
3
3
|
const require_buildIntlayerDictionary_buildIntlayerDictionary = require("./buildIntlayerDictionary/buildIntlayerDictionary.cjs");
|
|
4
|
+
const require_buildIntlayerDictionary_processContentDeclaration = require("./buildIntlayerDictionary/processContentDeclaration.cjs");
|
|
5
|
+
const require_loadDictionaries_loadContentDeclaration = require("./loadDictionaries/loadContentDeclaration.cjs");
|
|
6
|
+
const require_formatDictionary = require("./formatDictionary.cjs");
|
|
7
|
+
const require_loadDictionaries_loadRemoteDictionaries = require("./loadDictionaries/loadRemoteDictionaries.cjs");
|
|
8
|
+
const require_loadDictionaries_loadDictionaries = require("./loadDictionaries/loadDictionaries.cjs");
|
|
9
|
+
const require_loadDictionaries_loadLocalDictionaries = require("./loadDictionaries/loadLocalDictionaries.cjs");
|
|
10
|
+
const require_prepareIntlayer = require("./prepareIntlayer.cjs");
|
|
4
11
|
const require_createDictionaryEntryPoint_generateDictionaryListContent = require("./createDictionaryEntryPoint/generateDictionaryListContent.cjs");
|
|
5
12
|
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require("./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs");
|
|
6
13
|
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require("./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs");
|
|
@@ -10,22 +17,15 @@ const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = requ
|
|
|
10
17
|
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require("./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs");
|
|
11
18
|
const require_createType_createModuleAugmentation = require("./createType/createModuleAugmentation.cjs");
|
|
12
19
|
const require_createType_createType = require("./createType/createType.cjs");
|
|
13
|
-
const require_buildIntlayerDictionary_processContentDeclaration = require("./buildIntlayerDictionary/processContentDeclaration.cjs");
|
|
14
|
-
const require_loadDictionaries_loadContentDeclaration = require("./loadDictionaries/loadContentDeclaration.cjs");
|
|
15
|
-
const require_loadDictionaries_loadLocalDictionaries = require("./loadDictionaries/loadLocalDictionaries.cjs");
|
|
16
|
-
const require_formatDictionary = require("./formatDictionary.cjs");
|
|
17
|
-
const require_loadDictionaries_loadRemoteDictionaries = require("./loadDictionaries/loadRemoteDictionaries.cjs");
|
|
18
|
-
const require_loadDictionaries_loadDictionaries = require("./loadDictionaries/loadDictionaries.cjs");
|
|
19
|
-
const require_prepareIntlayer = require("./prepareIntlayer.cjs");
|
|
20
20
|
const require_prepareIntlayerServer = require("./prepareIntlayerServer.cjs");
|
|
21
21
|
const require_utils_readDictionariesFromDisk = require("./utils/readDictionariesFromDisk.cjs");
|
|
22
|
+
const require_writeConfiguration_index = require("./writeConfiguration/index.cjs");
|
|
23
|
+
const require_buildIntlayerDictionary_rebuildUnmergedDictionaries = require("./buildIntlayerDictionary/rebuildUnmergedDictionaries.cjs");
|
|
22
24
|
const require_writeContentDeclaration_detectExportedComponentName = require("./writeContentDeclaration/detectExportedComponentName.cjs");
|
|
23
25
|
const require_writeContentDeclaration_transformJSFile = require("./writeContentDeclaration/transformJSFile.cjs");
|
|
24
26
|
const require_writeContentDeclaration_renderContentDeclaration = require("./writeContentDeclaration/renderContentDeclaration.cjs");
|
|
25
27
|
const require_writeContentDeclaration_writeJSFile = require("./writeContentDeclaration/writeJSFile.cjs");
|
|
26
28
|
const require_writeContentDeclaration_writeContentDeclaration = require("./writeContentDeclaration/writeContentDeclaration.cjs");
|
|
27
|
-
const require_writeConfiguration_index = require("./writeConfiguration/index.cjs");
|
|
28
|
-
const require_buildIntlayerDictionary_rebuildUnmergedDictionaries = require("./buildIntlayerDictionary/rebuildUnmergedDictionaries.cjs");
|
|
29
29
|
|
|
30
30
|
exports.INTLAYER_WATCH_ENV_VAR = require_prepareIntlayerServer.INTLAYER_WATCH_ENV_VAR;
|
|
31
31
|
exports.addStoredSiblingDictionaries = require_buildIntlayerDictionary_buildIntlayerDictionary.addStoredSiblingDictionaries;
|
|
@@ -2,11 +2,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
3
3
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
7
|
-
let node_path = require("node:path");
|
|
8
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
9
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
10
10
|
let _intlayer_core_plugins = require("@intlayer/core/plugins");
|
|
11
11
|
|
|
12
12
|
// src/buildIntlayerDictionary/writeDynamicDictionary.ts
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
3
3
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
|
-
let node_path = require("node:path");
|
|
7
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
8
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeFetchDictionary.ts
|
|
11
11
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
3
3
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
4
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
5
|
-
let node_path = require("node:path");
|
|
6
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
|
+
let node_path = require("node:path");
|
|
7
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
7
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
8
8
|
|
|
9
9
|
// src/buildIntlayerDictionary/writeMergedDictionary.ts
|
|
10
10
|
/**
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
3
3
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
|
-
let node_path = require("node:path");
|
|
7
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
8
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeNestedDictionary.ts
|
|
11
11
|
/**
|
|
@@ -4,10 +4,10 @@ const require_loadDictionaries_loadRemoteDictionaries = require("../loadDictiona
|
|
|
4
4
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
5
5
|
const require_buildIntlayerDictionary_writeUnmergedDictionary = require("./writeUnmergedDictionary.cjs");
|
|
6
6
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
7
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
8
|
-
let node_path = require("node:path");
|
|
9
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
|
+
let node_path = require("node:path");
|
|
10
9
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
11
11
|
|
|
12
12
|
// src/buildIntlayerDictionary/writeRemoteDictionary.ts
|
|
13
13
|
/**
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_filterInvalidDictionaries = require("../filterInvalidDictionaries.cjs");
|
|
3
3
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
|
-
let node_path = require("node:path");
|
|
7
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
8
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeUnmergedDictionary.ts
|
|
11
11
|
const groupDictionariesByKey = (dictionaries) => dictionaries.reduce((acc, dictionary) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_fs = require("node:fs");
|
|
5
5
|
|
|
6
6
|
// src/cleanOutputDir.ts
|
|
7
7
|
const cleanOutputDir = async (configuration) => {
|
|
@@ -4,8 +4,8 @@ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require(".
|
|
|
4
4
|
const require_utils_readDictionariesFromDisk = require("./utils/readDictionariesFromDisk.cjs");
|
|
5
5
|
const require_writeJsonIfChanged = require("./writeJsonIfChanged.cjs");
|
|
6
6
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
7
|
-
let node_path = require("node:path");
|
|
8
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
|
+
let node_path = require("node:path");
|
|
9
9
|
let fast_glob = require("fast-glob");
|
|
10
10
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
11
11
|
let _intlayer_config_client = require("@intlayer/config/client");
|
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_detectFormatCommand = require("./detectFormatCommand.cjs");
|
|
3
|
+
const require_init_aiSetup = require("./init/aiSetup.cjs");
|
|
3
4
|
const require_init_cms = require("./init/cms.cjs");
|
|
4
5
|
const require_init_index = require("./init/index.cjs");
|
|
5
|
-
const
|
|
6
|
+
const require_writeContentDeclaration_detectExportedComponentName = require("./writeContentDeclaration/detectExportedComponentName.cjs");
|
|
7
|
+
const require_writeContentDeclaration_transformJSFile = require("./writeContentDeclaration/transformJSFile.cjs");
|
|
8
|
+
const require_writeContentDeclaration_renderContentDeclaration = require("./writeContentDeclaration/renderContentDeclaration.cjs");
|
|
6
9
|
const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require("./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs");
|
|
10
|
+
const require_writeContentDeclaration_writeJSFile = require("./writeContentDeclaration/writeJSFile.cjs");
|
|
11
|
+
const require_writeContentDeclaration_writeContentDeclaration = require("./writeContentDeclaration/writeContentDeclaration.cjs");
|
|
12
|
+
const require_init_upgradeIntlayerPackages = require("./init/upgradeIntlayerPackages.cjs");
|
|
7
13
|
const require_init_utils_contentLayout = require("./init/utils/contentLayout.cjs");
|
|
8
|
-
const require_init_documentationRouter = require("./init/documentationRouter.cjs");
|
|
9
14
|
const require_init_utils_nextCompilerBabel = require("./init/utils/nextCompilerBabel.cjs");
|
|
10
15
|
const require_init_utils_packageManager = require("./init/utils/packageManager.cjs");
|
|
11
16
|
const require_init_utils_prettierConfig = require("./init/utils/prettierConfig.cjs");
|
|
12
17
|
const require_init_utils_urlRoutingFramework = require("./init/utils/urlRoutingFramework.cjs");
|
|
13
18
|
const require_installLSP = require("./installLSP.cjs");
|
|
19
|
+
const require_init_documentationRouter = require("./init/documentationRouter.cjs");
|
|
14
20
|
const require_installMCP_installMCP = require("./installMCP/installMCP.cjs");
|
|
15
21
|
const require_installSkills_index = require("./installSkills/index.cjs");
|
|
16
22
|
const require_listDictionariesPath = require("./listDictionariesPath.cjs");
|
|
@@ -18,12 +24,10 @@ const require_listGitFiles = require("./listGitFiles.cjs");
|
|
|
18
24
|
const require_listProjects = require("./listProjects.cjs");
|
|
19
25
|
const require_logConfigDetails = require("./logConfigDetails.cjs");
|
|
20
26
|
const require_prepareIntlayer = require("./prepareIntlayer.cjs");
|
|
21
|
-
const require_writeContentDeclaration_detectExportedComponentName = require("./writeContentDeclaration/detectExportedComponentName.cjs");
|
|
22
|
-
const require_writeContentDeclaration_transformJSFile = require("./writeContentDeclaration/transformJSFile.cjs");
|
|
23
|
-
const require_writeContentDeclaration_renderContentDeclaration = require("./writeContentDeclaration/renderContentDeclaration.cjs");
|
|
24
|
-
const require_writeContentDeclaration_writeJSFile = require("./writeContentDeclaration/writeJSFile.cjs");
|
|
25
|
-
const require_writeContentDeclaration_writeContentDeclaration = require("./writeContentDeclaration/writeContentDeclaration.cjs");
|
|
26
27
|
|
|
28
|
+
exports.AI_PACKAGE_NAME = require_init_aiSetup.AI_PACKAGE_NAME;
|
|
29
|
+
exports.AI_PROVIDER_CHOICES = require_init_aiSetup.AI_PROVIDER_CHOICES;
|
|
30
|
+
exports.AI_PROVIDER_SETUPS = require_init_aiSetup.AI_PROVIDER_SETUPS;
|
|
27
31
|
exports.CATALOG_MESSAGE_FORMATS = require_init_utils_contentLayout.CATALOG_MESSAGE_FORMATS;
|
|
28
32
|
exports.COMPAT_I18N_LIBRARIES = require_init_utils_packageManager.COMPAT_I18N_LIBRARIES;
|
|
29
33
|
exports.CONTENT_FORMATS_BY_LAYOUT = require_init_utils_contentLayout.CONTENT_FORMATS_BY_LAYOUT;
|
|
@@ -35,14 +39,18 @@ exports.PLATFORMS_METADATA = require_installSkills_index.PLATFORMS_METADATA;
|
|
|
35
39
|
exports.PRETTIER_CONFIG_FILES = require_init_utils_prettierConfig.PRETTIER_CONFIG_FILES;
|
|
36
40
|
exports.SKILLS = require_installSkills_index.SKILLS;
|
|
37
41
|
exports.SKILLS_METADATA = require_installSkills_index.SKILLS_METADATA;
|
|
42
|
+
exports.buildFormatCommand = require_detectFormatCommand.buildFormatCommand;
|
|
38
43
|
exports.detectCompatI18nLibraries = require_init_utils_packageManager.detectCompatI18nLibraries;
|
|
39
44
|
exports.detectExportedComponentName = require_writeContentDeclaration_detectExportedComponentName.detectExportedComponentName;
|
|
40
45
|
exports.detectFormatCommand = require_detectFormatCommand.detectFormatCommand;
|
|
41
46
|
exports.detectPackageManager = require_init_utils_packageManager.detectPackageManager;
|
|
42
47
|
exports.detectPlatform = require_installSkills_index.detectPlatform;
|
|
43
48
|
exports.enableEditorInConfig = require_init_cms.enableEditorInConfig;
|
|
49
|
+
exports.escapeShellFilePath = require_detectFormatCommand.escapeShellFilePath;
|
|
50
|
+
exports.fetchAiProviderModels = require_init_aiSetup.fetchAiProviderModels;
|
|
44
51
|
exports.findLockFileDir = require_init_utils_packageManager.findLockFileDir;
|
|
45
52
|
exports.formatContentDeclaration = require_writeContentDeclaration_renderContentDeclaration.formatContentDeclaration;
|
|
53
|
+
exports.getAiProviderSetup = require_init_aiSetup.getAiProviderSetup;
|
|
46
54
|
exports.getContentDeclarationFileTemplate = require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate.getContentDeclarationFileTemplate;
|
|
47
55
|
exports.getContentLayoutSetup = require_init_utils_contentLayout.getContentLayoutSetup;
|
|
48
56
|
exports.getDefaultApplicationURL = require_init_index.getDefaultApplicationURL;
|
|
@@ -53,6 +61,7 @@ exports.hasLintTooling = require_init_utils_packageManager.hasLintTooling;
|
|
|
53
61
|
exports.hasPrettier = require_init_utils_prettierConfig.hasPrettier;
|
|
54
62
|
exports.hasUrlRoutingFramework = require_init_utils_urlRoutingFramework.hasUrlRoutingFramework;
|
|
55
63
|
exports.initIntlayer = require_init_index.initIntlayer;
|
|
64
|
+
exports.installAiProviderPackages = require_init_aiSetup.installAiProviderPackages;
|
|
56
65
|
exports.installLSP = require_installLSP.installLSP;
|
|
57
66
|
exports.installMCP = require_installMCP_installMCP.installMCP;
|
|
58
67
|
exports.installPackages = require_init_utils_packageManager.installPackages;
|
|
@@ -65,13 +74,19 @@ exports.listGitLines = require_listGitFiles.listGitLines;
|
|
|
65
74
|
exports.listProjects = require_listProjects.listProjects;
|
|
66
75
|
exports.logConfigDetails = require_logConfigDetails.logConfigDetails;
|
|
67
76
|
exports.logInitSuccessMessage = require_init_index.logInitSuccessMessage;
|
|
77
|
+
exports.parseModelIds = require_init_aiSetup.parseModelIds;
|
|
68
78
|
exports.prepareIntlayer = require_prepareIntlayer.prepareIntlayer;
|
|
69
79
|
exports.renderContentDeclaration = require_writeContentDeclaration_renderContentDeclaration.renderContentDeclaration;
|
|
70
80
|
exports.renderMarkdownContentDeclaration = require_writeContentDeclaration_renderContentDeclaration.renderMarkdownContentDeclaration;
|
|
71
81
|
exports.renderYamlContentDeclaration = require_writeContentDeclaration_renderContentDeclaration.renderYamlContentDeclaration;
|
|
82
|
+
exports.runFormatCommand = require_detectFormatCommand.runFormatCommand;
|
|
83
|
+
exports.setAiInConfig = require_init_cms.setAiInConfig;
|
|
84
|
+
exports.setupAiProvider = require_init_aiSetup.setupAiProvider;
|
|
72
85
|
exports.setupCmsCredentials = require_init_cms.setupCmsCredentials;
|
|
73
86
|
exports.transformJSFile = require_writeContentDeclaration_transformJSFile.transformJSFile;
|
|
74
87
|
exports.upgradeIntlayerPackages = require_init_upgradeIntlayerPackages.upgradeIntlayerPackages;
|
|
88
|
+
exports.upgradeMCPConfigs = require_installMCP_installMCP.upgradeMCPConfigs;
|
|
75
89
|
exports.writeCmsCredentialsToEnv = require_init_cms.writeCmsCredentialsToEnv;
|
|
76
90
|
exports.writeContentDeclaration = require_writeContentDeclaration_writeContentDeclaration.writeContentDeclaration;
|
|
91
|
+
exports.writeEnvVariables = require_init_cms.writeEnvVariables;
|
|
77
92
|
exports.writeJSFile = require_writeContentDeclaration_writeJSFile.writeJSFile;
|
|
@@ -6,8 +6,8 @@ const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = requi
|
|
|
6
6
|
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require("./getBuiltFetchDictionariesPath.cjs");
|
|
7
7
|
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require("./getBuiltRemoteDictionariesPath.cjs");
|
|
8
8
|
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require("./getBuiltUnmergedDictionariesPath.cjs");
|
|
9
|
-
let node_path = require("node:path");
|
|
10
9
|
let node_fs_promises = require("node:fs/promises");
|
|
10
|
+
let node_path = require("node:path");
|
|
11
11
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
12
12
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
13
13
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
6
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
6
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
6
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
6
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
6
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
4
4
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
5
|
-
let node_path = require("node:path");
|
|
6
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
8
|
let _intlayer_core_localization = require("@intlayer/core/localization");
|
|
9
9
|
let fast_glob = require("fast-glob");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
3
|
-
let node_path = require("node:path");
|
|
4
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
5
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
6
|
|
|
7
7
|
// src/createType/createType.ts
|
|
@@ -1,8 +1,50 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
3
|
+
let node_child_process = require("node:child_process");
|
|
3
4
|
|
|
4
5
|
// src/detectFormatCommand.ts
|
|
5
6
|
let cachedFormatCommand = null;
|
|
7
|
+
/**
|
|
8
|
+
* Escapes shell variable/command-substitution markers (`$` and `` ` ``) in a
|
|
9
|
+
* file path before interpolating it into a shell command string.
|
|
10
|
+
*
|
|
11
|
+
* Route segments like TanStack Start's `{-$locale}` or `$locale` contain `$`,
|
|
12
|
+
* which POSIX shells (`sh`/`zsh`/`bash`) expand inside double-quoted strings
|
|
13
|
+
* (`"{-$locale}"` → `"{-}"`). On Windows (`cmd.exe`), `%` is the variable
|
|
14
|
+
* marker, not `$`, so leaving `$` unescaped is required there.
|
|
15
|
+
*/
|
|
16
|
+
const escapeShellFilePath = (filePath, platform = process.platform) => {
|
|
17
|
+
if (platform === "win32") return filePath;
|
|
18
|
+
return filePath.replace(/[$`]/g, "\\$&");
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Interpolates `filePath` into a `formatCommand` template (`{{file}}`),
|
|
22
|
+
* escaping shell expansion characters so dynamic route segments (e.g.
|
|
23
|
+
* `{-$locale}`, `$id`) survive double-quoted shell execution.
|
|
24
|
+
*
|
|
25
|
+
* Note: `String.prototype.replace` treats `$` in replacement strings as a
|
|
26
|
+
* special pattern (`$&`, `$'`, `` $` ``), so a replacement function is used.
|
|
27
|
+
*/
|
|
28
|
+
const buildFormatCommand = (formatCommand, filePath, platform = process.platform) => {
|
|
29
|
+
const escapedPath = escapeShellFilePath(filePath, platform);
|
|
30
|
+
return formatCommand.replaceAll("{{file}}", () => escapedPath);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Runs the configured or auto-detected formatter on `filePath` if one is
|
|
34
|
+
* available. Errors from the formatter are caught and logged without throwing.
|
|
35
|
+
*/
|
|
36
|
+
const runFormatCommand = (filePath, configuration) => {
|
|
37
|
+
const formatCommand = detectFormatCommand(configuration);
|
|
38
|
+
if (!formatCommand) return;
|
|
39
|
+
try {
|
|
40
|
+
(0, node_child_process.execSync)(buildFormatCommand(formatCommand, filePath), {
|
|
41
|
+
stdio: "inherit",
|
|
42
|
+
cwd: configuration.system.baseDir
|
|
43
|
+
});
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
6
48
|
const detectFormatCommand = (configuration, projectRequireProp) => {
|
|
7
49
|
const { baseDir } = configuration.system;
|
|
8
50
|
const { formatCommand } = configuration.content;
|
|
@@ -27,5 +69,8 @@ const detectFormatCommand = (configuration, projectRequireProp) => {
|
|
|
27
69
|
cachedFormatCommand = void 0;
|
|
28
70
|
};
|
|
29
71
|
|
|
72
|
+
exports.buildFormatCommand = buildFormatCommand;
|
|
30
73
|
exports.detectFormatCommand = detectFormatCommand;
|
|
74
|
+
exports.escapeShellFilePath = escapeShellFilePath;
|
|
75
|
+
exports.runFormatCommand = runFormatCommand;
|
|
31
76
|
//# sourceMappingURL=detectFormatCommand.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectFormatCommand.cjs","names":["getProjectRequire"],"sources":["../../src/detectFormatCommand.ts"],"sourcesContent":["import { getProjectRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n\nlet cachedFormatCommand: string | undefined | null = null;\n\nexport const detectFormatCommand = (\n configuration: IntlayerConfig,\n projectRequireProp?: NodeJS.Require\n) => {\n const { baseDir } = configuration.system;\n const { formatCommand } = configuration.content;\n const projectRequire = projectRequireProp ?? getProjectRequire(baseDir);\n\n // Priority: Explicit configuration\n // We do not cache this because the user might change their config file active-session.\n if (formatCommand) {\n return formatCommand;\n }\n\n // Priority: Cached detection\n // If not null, we have already performed the expensive checks.\n if (cachedFormatCommand !== null) {\n return cachedFormatCommand;\n }\n\n // Perform Detection\n\n // Try Prettier\n try {\n projectRequire.resolve('prettier');\n cachedFormatCommand = 'prettier --write \"{{file}}\" --log-level silent';\n return cachedFormatCommand;\n } catch (_error) {\n // Prettier not found, continue\n }\n\n // Try Biome\n try {\n projectRequire.resolve('biome');\n cachedFormatCommand = 'biome format \"{{file}}\" --write --log-level none';\n return cachedFormatCommand;\n } catch (_error) {\n // Biome not found, continue\n }\n\n // Try ESLint\n try {\n projectRequire.resolve('eslint');\n cachedFormatCommand =\n 'eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"';\n return cachedFormatCommand;\n } catch (_error) {\n // ESLint not found\n }\n\n // No formatter found\n // Set to undefined (not null) so we know we checked and found nothing.\n cachedFormatCommand = undefined;\n return undefined;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"detectFormatCommand.cjs","names":["getProjectRequire"],"sources":["../../src/detectFormatCommand.ts"],"sourcesContent":["import { execSync } from 'node:child_process';\nimport { getProjectRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n\nlet cachedFormatCommand: string | undefined | null = null;\n\n/**\n * Escapes shell variable/command-substitution markers (`$` and `` ` ``) in a\n * file path before interpolating it into a shell command string.\n *\n * Route segments like TanStack Start's `{-$locale}` or `$locale` contain `$`,\n * which POSIX shells (`sh`/`zsh`/`bash`) expand inside double-quoted strings\n * (`\"{-$locale}\"` → `\"{-}\"`). On Windows (`cmd.exe`), `%` is the variable\n * marker, not `$`, so leaving `$` unescaped is required there.\n */\nexport const escapeShellFilePath = (\n filePath: string,\n platform: NodeJS.Platform = process.platform\n): string => {\n if (platform === 'win32') {\n return filePath;\n }\n\n return filePath.replace(/[$`]/g, '\\\\$&');\n};\n\n/**\n * Interpolates `filePath` into a `formatCommand` template (`{{file}}`),\n * escaping shell expansion characters so dynamic route segments (e.g.\n * `{-$locale}`, `$id`) survive double-quoted shell execution.\n *\n * Note: `String.prototype.replace` treats `$` in replacement strings as a\n * special pattern (`$&`, `$'`, `` $` ``), so a replacement function is used.\n */\nexport const buildFormatCommand = (\n formatCommand: string,\n filePath: string,\n platform: NodeJS.Platform = process.platform\n): string => {\n const escapedPath = escapeShellFilePath(filePath, platform);\n return formatCommand.replaceAll('{{file}}', () => escapedPath);\n};\n\n/**\n * Runs the configured or auto-detected formatter on `filePath` if one is\n * available. Errors from the formatter are caught and logged without throwing.\n */\nexport const runFormatCommand = (\n filePath: string,\n configuration: IntlayerConfig\n): void => {\n const formatCommand = detectFormatCommand(configuration);\n\n if (!formatCommand) return;\n\n try {\n execSync(buildFormatCommand(formatCommand, filePath), {\n stdio: 'inherit',\n cwd: configuration.system.baseDir,\n });\n } catch (error) {\n console.error(error);\n }\n};\n\nexport const detectFormatCommand = (\n configuration: IntlayerConfig,\n projectRequireProp?: NodeJS.Require\n) => {\n const { baseDir } = configuration.system;\n const { formatCommand } = configuration.content;\n const projectRequire = projectRequireProp ?? getProjectRequire(baseDir);\n\n // Priority: Explicit configuration\n // We do not cache this because the user might change their config file active-session.\n if (formatCommand) {\n return formatCommand;\n }\n\n // Priority: Cached detection\n // If not null, we have already performed the expensive checks.\n if (cachedFormatCommand !== null) {\n return cachedFormatCommand;\n }\n\n // Perform Detection\n\n // Try Prettier\n try {\n projectRequire.resolve('prettier');\n cachedFormatCommand = 'prettier --write \"{{file}}\" --log-level silent';\n return cachedFormatCommand;\n } catch (_error) {\n // Prettier not found, continue\n }\n\n // Try Biome\n try {\n projectRequire.resolve('biome');\n cachedFormatCommand = 'biome format \"{{file}}\" --write --log-level none';\n return cachedFormatCommand;\n } catch (_error) {\n // Biome not found, continue\n }\n\n // Try ESLint\n try {\n projectRequire.resolve('eslint');\n cachedFormatCommand =\n 'eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"';\n return cachedFormatCommand;\n } catch (_error) {\n // ESLint not found\n }\n\n // No formatter found\n // Set to undefined (not null) so we know we checked and found nothing.\n cachedFormatCommand = undefined;\n return undefined;\n};\n"],"mappings":";;;;;AAIA,IAAI,sBAAiD;;;;;;;;;;AAWrD,MAAa,uBACX,UACA,WAA4B,QAAQ,aACzB;CACX,IAAI,aAAa,SACf,OAAO;CAGT,OAAO,SAAS,QAAQ,SAAS,MAAM;AACzC;;;;;;;;;AAUA,MAAa,sBACX,eACA,UACA,WAA4B,QAAQ,aACzB;CACX,MAAM,cAAc,oBAAoB,UAAU,QAAQ;CAC1D,OAAO,cAAc,WAAW,kBAAkB,WAAW;AAC/D;;;;;AAMA,MAAa,oBACX,UACA,kBACS;CACT,MAAM,gBAAgB,oBAAoB,aAAa;CAEvD,IAAI,CAAC,eAAe;CAEpB,IAAI;EACF,iCAAS,mBAAmB,eAAe,QAAQ,GAAG;GACpD,OAAO;GACP,KAAK,cAAc,OAAO;EAC5B,CAAC;CACH,SAAS,OAAO;EACd,QAAQ,MAAM,KAAK;CACrB;AACF;AAEA,MAAa,uBACX,eACA,uBACG;CACH,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,EAAE,kBAAkB,cAAc;CACxC,MAAM,iBAAiB,0BAAsBA,0CAAkB,OAAO;CAItE,IAAI,eACF,OAAO;CAKT,IAAI,wBAAwB,MAC1B,OAAO;CAMT,IAAI;EACF,eAAe,QAAQ,UAAU;EACjC,sBAAsB;EACtB,OAAO;CACT,SAAS,QAAQ,CAEjB;CAGA,IAAI;EACF,eAAe,QAAQ,OAAO;EAC9B,sBAAsB;EACtB,OAAO;CACT,SAAS,QAAQ,CAEjB;CAGA,IAAI;EACF,eAAe,QAAQ,QAAQ;EAC/B,sBACE;EACF,OAAO;CACT,SAAS,QAAQ,CAEjB;CAIA,sBAAsB;AAExB"}
|