@intlayer/cli 8.1.11 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.cjs +1 -1
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/extract.cjs +1 -1
- package/dist/cjs/extract.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/initMCP.cjs +2 -0
- package/dist/cjs/initMCP.cjs.map +1 -0
- package/dist/cjs/initSkills.cjs +1 -1
- package/dist/cjs/initSkills.cjs.map +1 -1
- package/dist/cjs/liveSync.cjs +3 -3
- package/dist/cjs/pull.cjs +1 -1
- package/dist/cjs/push/push.cjs +1 -1
- package/dist/cjs/utils/checkAccess.cjs +1 -1
- package/dist/cjs/utils/checkAccess.cjs.map +1 -1
- package/dist/cjs/watch.cjs +1 -1
- package/dist/cjs/watch.cjs.map +1 -1
- package/dist/esm/cli.mjs +1 -1
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/extract.mjs +1 -1
- package/dist/esm/extract.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/initMCP.mjs +2 -0
- package/dist/esm/initMCP.mjs.map +1 -0
- package/dist/esm/initSkills.mjs +1 -1
- package/dist/esm/initSkills.mjs.map +1 -1
- package/dist/esm/liveSync.mjs +2 -2
- package/dist/esm/pull.mjs +1 -1
- package/dist/esm/push/push.mjs +1 -1
- package/dist/esm/utils/checkAccess.mjs +1 -1
- package/dist/esm/utils/checkAccess.mjs.map +1 -1
- package/dist/esm/watch.mjs +1 -1
- package/dist/esm/watch.mjs.map +1 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/extract.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/initMCP.d.ts +5 -0
- package/dist/types/initMCP.d.ts.map +1 -0
- package/dist/types/initSkills.d.ts +6 -1
- package/dist/types/initSkills.d.ts.map +1 -1
- package/dist/types/utils/checkAccess.d.ts.map +1 -1
- package/package.json +12 -11
package/dist/esm/watch.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{runParallel as e}from"@intlayer/chokidar/utils";import{watch as t}from"@intlayer/chokidar/watcher";import{getConfiguration as n}from"@intlayer/config/node";import{getAppLogger as r}from"@intlayer/config/logger";const i=async i=>{let a=r(n(i?.configOptions)),o;i?.with&&(o=e(i.with),o.result.catch(()=>{process.exit(1)}))
|
|
1
|
+
import{runParallel as e}from"@intlayer/chokidar/utils";import{watch as t}from"@intlayer/chokidar/watcher";import{getConfiguration as n}from"@intlayer/config/node";import{getAppLogger as r}from"@intlayer/config/logger";const i=async i=>{let a=r(n(i?.configOptions)),o;i?.with&&(o=e(i.with),o.result.catch(()=>{process.exit(1)}));let s=t({persistent:!0,skipPrepare:i?.skipPrepare??!1}),c=async()=>{process.off(`SIGINT`,c),process.off(`SIGTERM`,c),a(`Stopping Intlayer watcher...`);try{await s.close(),o&&`child`in o&&o.child?.kill(`SIGTERM`)}catch(e){console.error(`Error during shutdown:`,e)}finally{process.exit(0)}};process.on(`SIGINT`,c),process.on(`SIGTERM`,c)};export{i as watchContentDeclaration};
|
|
2
2
|
//# sourceMappingURL=watch.mjs.map
|
package/dist/esm/watch.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.mjs","names":[],"sources":["../../src/watch.ts"],"sourcesContent":["import { runParallel } from '@intlayer/chokidar/utils';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { getAppLogger } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n} from '@intlayer/config/node';\n\ntype WatchOptions = {\n skipPrepare?: boolean;\n with?: string | string[];\n configOptions?: GetConfigurationOptions;\n};\n\n/**\n * Get locales dictionaries .content.{json|ts|tsx|js|jsx|mjs|cjs} and build the JSON dictionaries in the .intlayer directory.\n * Watch mode available to get the change in the .content.{json|ts|tsx|js|jsx|mjs|cjs}\n */\nexport const watchContentDeclaration = async (options?: WatchOptions) => {\n const config = getConfiguration(options?.configOptions);\n const appLogger = getAppLogger(config);\n\n // Store references to the child process\n let parallelProcess: ReturnType<typeof runParallel> | undefined;\n\n if (options?.with) {\n parallelProcess = runParallel(options.with);\n // Handle the promise to avoid unhandled rejection\n parallelProcess.result.catch(() => {\n // Parallel process failed or was terminated\n process.exit(1);\n });\n }\n\n
|
|
1
|
+
{"version":3,"file":"watch.mjs","names":[],"sources":["../../src/watch.ts"],"sourcesContent":["import { runParallel } from '@intlayer/chokidar/utils';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { getAppLogger } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n} from '@intlayer/config/node';\n\ntype WatchOptions = {\n skipPrepare?: boolean;\n with?: string | string[];\n configOptions?: GetConfigurationOptions;\n};\n\n/**\n * Get locales dictionaries .content.{json|ts|tsx|js|jsx|mjs|cjs} and build the JSON dictionaries in the .intlayer directory.\n * Watch mode available to get the change in the .content.{json|ts|tsx|js|jsx|mjs|cjs}\n */\nexport const watchContentDeclaration = async (options?: WatchOptions) => {\n const config = getConfiguration(options?.configOptions);\n const appLogger = getAppLogger(config);\n\n // Store references to the child process\n let parallelProcess: ReturnType<typeof runParallel> | undefined;\n\n if (options?.with) {\n parallelProcess = runParallel(options.with);\n // Handle the promise to avoid unhandled rejection\n parallelProcess.result.catch(() => {\n // Parallel process failed or was terminated\n process.exit(1);\n });\n }\n\n // Capture the watcher instance\n const watcher = watch({\n persistent: true,\n skipPrepare: options?.skipPrepare ?? false,\n });\n\n // Define a Graceful Shutdown function\n const handleShutdown = async () => {\n // Prevent multiple calls\n process.off('SIGINT', handleShutdown);\n process.off('SIGTERM', handleShutdown);\n\n appLogger('Stopping Intlayer watcher...');\n\n try {\n // Close the file watcher immediately to stop \"esbuild service not running\" errors\n await watcher.close();\n\n // If runParallel exposes the child process, we can try to kill it explicitly.\n // Even if it doesn't, process.exit() below usually cleans up attached children.\n if (parallelProcess && 'child' in parallelProcess) {\n // @ts-ignore - Assuming child exists on the return type if runParallel is based on spawn/exec\n parallelProcess.child?.kill('SIGTERM');\n }\n } catch (error) {\n console.error('Error during shutdown:', error);\n } finally {\n process.exit(0);\n }\n };\n\n // Attach Signal Listeners\n process.on('SIGINT', handleShutdown);\n process.on('SIGTERM', handleShutdown);\n};\n"],"mappings":"0NAkBA,MAAa,EAA0B,KAAO,IAA2B,CAEvE,IAAM,EAAY,EADH,EAAiB,GAAS,cAAc,CACjB,CAGlC,EAEA,GAAS,OACX,EAAkB,EAAY,EAAQ,KAAK,CAE3C,EAAgB,OAAO,UAAY,CAEjC,QAAQ,KAAK,EAAE,EACf,EAIJ,IAAM,EAAU,EAAM,CACpB,WAAY,GACZ,YAAa,GAAS,aAAe,GACtC,CAAC,CAGI,EAAiB,SAAY,CAEjC,QAAQ,IAAI,SAAU,EAAe,CACrC,QAAQ,IAAI,UAAW,EAAe,CAEtC,EAAU,+BAA+B,CAEzC,GAAI,CAEF,MAAM,EAAQ,OAAO,CAIjB,GAAmB,UAAW,GAEhC,EAAgB,OAAO,KAAK,UAAU,OAEjC,EAAO,CACd,QAAQ,MAAM,yBAA0B,EAAM,QACtC,CACR,QAAQ,KAAK,EAAE,GAKnB,QAAQ,GAAG,SAAU,EAAe,CACpC,QAAQ,GAAG,UAAW,EAAe"}
|
package/dist/types/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","names":[],"sources":["../../src/cli.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","names":[],"sources":["../../src/cli.ts"],"mappings":";;;cAyCa,OAAA;AAAA,KA2IR,UAAA;EACH,MAAA;EACA,OAAA;AAAA;AAAA,KAGU,oBAAA;EACV,OAAA;EACA,GAAA;EACA,OAAA;EACA,OAAA;EACA,UAAA;AAAA,IACE,UAAA;AANJ;;;;;;;;AAAA,cAuEa,MAAA,QAAa,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","names":[],"sources":["../../src/extract.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"extract.d.ts","names":[],"sources":["../../src/extract.ts"],"mappings":";;;KAaK,cAAA;EACH,KAAA;EACA,yBAAA;EACA,aAAA,GAAgB,uBAAA;EAChB,QAAA;EACA,eAAA;AAAA;AAAA,cAoBW,OAAA,GAAiB,OAAA,EAAS,cAAA,KAAc,OAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { startEditor } from "./editor.js";
|
|
|
4
4
|
import { extract } from "./extract.js";
|
|
5
5
|
import { FillOptions, fill } from "./fill/fill.js";
|
|
6
6
|
import { findProjectRoot, init } from "./init.js";
|
|
7
|
-
import { getDetectedPlatform, initSkills } from "./initSkills.js";
|
|
7
|
+
import { PLATFORM_OPTIONS, getDetectedPlatform, initSkills } from "./initSkills.js";
|
|
8
8
|
import { listContentDeclaration, listContentDeclarationRows } from "./listContentDeclaration.js";
|
|
9
9
|
import { liveSync } from "./liveSync.js";
|
|
10
10
|
import { pull } from "./pull.js";
|
|
@@ -14,10 +14,9 @@ import { reviewDoc } from "./reviewDoc/reviewDoc.js";
|
|
|
14
14
|
import { searchDoc } from "./searchDoc.js";
|
|
15
15
|
import { listMissingTranslations, listMissingTranslationsWithConfig } from "./test/listMissingTranslations.js";
|
|
16
16
|
import { testMissingTranslations } from "./test/test.js";
|
|
17
|
-
import "./test/index.js";
|
|
18
17
|
import { translateDoc } from "./translateDoc/translateDoc.js";
|
|
19
18
|
export * from "@intlayer/chokidar/cli";
|
|
20
19
|
export * from "@intlayer/chokidar/utils";
|
|
21
20
|
export * from "@intlayer/chokidar/build";
|
|
22
21
|
export * from "@intlayer/chokidar/watcher";
|
|
23
|
-
export { ConfigurationOptions, FillOptions, build, dirname, extract, fill, findProjectRoot, getDetectedPlatform, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations, translateDoc };
|
|
22
|
+
export { ConfigurationOptions, FillOptions, PLATFORM_OPTIONS, build, dirname, extract, fill, findProjectRoot, getDetectedPlatform, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations, translateDoc };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initMCP.d.ts","names":[],"sources":["../../src/initMCP.ts"],"mappings":";cAWa,OAAA,GAAiB,WAAA,cAAoB,OAAA"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Platform } from "@intlayer/chokidar/cli";
|
|
2
2
|
|
|
3
3
|
//#region src/initSkills.d.ts
|
|
4
|
+
declare const PLATFORM_OPTIONS: Array<{
|
|
5
|
+
value: Platform;
|
|
6
|
+
label: string;
|
|
7
|
+
hint: string;
|
|
8
|
+
}>;
|
|
4
9
|
declare const getDetectedPlatform: () => Platform | undefined;
|
|
5
10
|
declare const initSkills: (projectRoot?: string) => Promise<void>;
|
|
6
11
|
//#endregion
|
|
7
|
-
export { getDetectedPlatform, initSkills };
|
|
12
|
+
export { PLATFORM_OPTIONS, getDetectedPlatform, initSkills };
|
|
8
13
|
//# sourceMappingURL=initSkills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initSkills.d.ts","names":[],"sources":["../../src/initSkills.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"initSkills.d.ts","names":[],"sources":["../../src/initSkills.ts"],"mappings":";;;cAuBa,gBAAA,EAAkB,KAAA;EAC7B,KAAA,EAAO,QAAA;EACP,KAAA;EACA,IAAA;AAAA;AAAA,cAOW,mBAAA,QAA0B,QAAA;AAAA,cAiB1B,UAAA,GAAoB,WAAA,cAAoB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkAccess.d.ts","names":[],"sources":["../../../src/utils/checkAccess.ts"],"mappings":";;;;cAOa,YAAA,GACX,aAAA,EAAe,cAAA,EACf,4BAAA,eACC,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"checkAccess.d.ts","names":[],"sources":["../../../src/utils/checkAccess.ts"],"mappings":";;;;cAOa,YAAA,GACX,aAAA,EAAe,cAAA,EACf,4BAAA,eACC,OAAA;AAAA,cAuFU,aAAA,GACX,aAAA,EAAe,cAAA,EACf,SAAA,GAAY,SAAA,EACZ,4BAAA,eACC,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/cli",
|
|
3
|
-
"version": "8.1
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides uniform command-line interface scripts for Intlayer, used in packages like intlayer-cli and intlayer.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,15 +67,16 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@clack/prompts": "0.11.0",
|
|
70
|
-
"@intlayer/ai": "8.1
|
|
71
|
-
"@intlayer/api": "8.1
|
|
72
|
-
"@intlayer/
|
|
73
|
-
"@intlayer/
|
|
74
|
-
"@intlayer/
|
|
75
|
-
"@intlayer/
|
|
76
|
-
"@intlayer/
|
|
77
|
-
"@intlayer/
|
|
78
|
-
"@intlayer/
|
|
70
|
+
"@intlayer/ai": "8.2.1",
|
|
71
|
+
"@intlayer/api": "8.2.1",
|
|
72
|
+
"@intlayer/babel": "8.2.1",
|
|
73
|
+
"@intlayer/chokidar": "8.2.1",
|
|
74
|
+
"@intlayer/config": "8.2.1",
|
|
75
|
+
"@intlayer/core": "8.2.1",
|
|
76
|
+
"@intlayer/dictionaries-entry": "8.2.1",
|
|
77
|
+
"@intlayer/remote-dictionaries-entry": "8.2.1",
|
|
78
|
+
"@intlayer/types": "8.2.1",
|
|
79
|
+
"@intlayer/unmerged-dictionaries-entry": "8.2.1",
|
|
79
80
|
"commander": "14.0.3",
|
|
80
81
|
"enquirer": "^2.4.1",
|
|
81
82
|
"eventsource": "4.1.0",
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"vitest": "4.0.18"
|
|
93
94
|
},
|
|
94
95
|
"peerDependencies": {
|
|
95
|
-
"@intlayer/ai": "8.1
|
|
96
|
+
"@intlayer/ai": "8.2.1"
|
|
96
97
|
},
|
|
97
98
|
"peerDependenciesMeta": {
|
|
98
99
|
"@intlayer/ai": {
|