@intlayer/cli 8.1.10 → 8.2.0

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.
Files changed (41) hide show
  1. package/dist/cjs/cli.cjs +1 -1
  2. package/dist/cjs/cli.cjs.map +1 -1
  3. package/dist/cjs/extract.cjs +1 -1
  4. package/dist/cjs/extract.cjs.map +1 -1
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/initMCP.cjs +2 -0
  7. package/dist/cjs/initMCP.cjs.map +1 -0
  8. package/dist/cjs/initSkills.cjs +1 -1
  9. package/dist/cjs/initSkills.cjs.map +1 -1
  10. package/dist/cjs/liveSync.cjs +3 -3
  11. package/dist/cjs/pull.cjs +1 -1
  12. package/dist/cjs/push/push.cjs +1 -1
  13. package/dist/cjs/utils/checkAccess.cjs +1 -1
  14. package/dist/cjs/utils/checkAccess.cjs.map +1 -1
  15. package/dist/cjs/watch.cjs +1 -1
  16. package/dist/cjs/watch.cjs.map +1 -1
  17. package/dist/esm/cli.mjs +1 -1
  18. package/dist/esm/cli.mjs.map +1 -1
  19. package/dist/esm/extract.mjs +1 -1
  20. package/dist/esm/extract.mjs.map +1 -1
  21. package/dist/esm/index.mjs +1 -1
  22. package/dist/esm/initMCP.mjs +2 -0
  23. package/dist/esm/initMCP.mjs.map +1 -0
  24. package/dist/esm/initSkills.mjs +1 -1
  25. package/dist/esm/initSkills.mjs.map +1 -1
  26. package/dist/esm/liveSync.mjs +2 -2
  27. package/dist/esm/pull.mjs +1 -1
  28. package/dist/esm/push/push.mjs +1 -1
  29. package/dist/esm/utils/checkAccess.mjs +1 -1
  30. package/dist/esm/utils/checkAccess.mjs.map +1 -1
  31. package/dist/esm/watch.mjs +1 -1
  32. package/dist/esm/watch.mjs.map +1 -1
  33. package/dist/types/cli.d.ts.map +1 -1
  34. package/dist/types/extract.d.ts.map +1 -1
  35. package/dist/types/index.d.ts +2 -3
  36. package/dist/types/initMCP.d.ts +5 -0
  37. package/dist/types/initMCP.d.ts.map +1 -0
  38. package/dist/types/initSkills.d.ts +6 -1
  39. package/dist/types/initSkills.d.ts.map +1 -1
  40. package/dist/types/utils/checkAccess.d.ts.map +1 -1
  41. package/package.json +12 -11
@@ -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)})),a(`Watching Intlayer content declarations`);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};
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
@@ -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 appLogger('Watching Intlayer content declarations');\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,EAGJ,EAAU,yCAAyC,CAGnD,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"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","names":[],"sources":["../../src/cli.ts"],"mappings":";;;cAwCa,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,cA2Ea,MAAA,QAAa,OAAA"}
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":";;;KAYK,cAAA;EACH,KAAA;EACA,yBAAA;EACA,aAAA,GAAgB,uBAAA;EAChB,QAAA;EACA,eAAA;AAAA;AAAA,cAoBW,OAAA,GAAiB,OAAA,EAAS,cAAA,KAAc,OAAA"}
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"}
@@ -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,5 @@
1
+ //#region src/initMCP.d.ts
2
+ declare const initMCP: (projectRoot?: string) => Promise<void>;
3
+ //#endregion
4
+ export { initMCP };
5
+ //# sourceMappingURL=initMCP.d.ts.map
@@ -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":";;;cAkGa,mBAAA,QAA0B,QAAA;AAAA,cAyC1B,UAAA,GAAoB,WAAA,cAAoB,OAAA"}
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,cAwFU,aAAA,GACX,aAAA,EAAe,cAAA,EACf,SAAA,GAAY,SAAA,EACZ,4BAAA,eACC,OAAA"}
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.10",
3
+ "version": "8.2.0",
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.10",
71
- "@intlayer/api": "8.1.10",
72
- "@intlayer/chokidar": "8.1.10",
73
- "@intlayer/config": "8.1.10",
74
- "@intlayer/core": "8.1.10",
75
- "@intlayer/dictionaries-entry": "8.1.10",
76
- "@intlayer/remote-dictionaries-entry": "8.1.10",
77
- "@intlayer/types": "8.1.10",
78
- "@intlayer/unmerged-dictionaries-entry": "8.1.10",
70
+ "@intlayer/ai": "8.1.11",
71
+ "@intlayer/api": "8.1.11",
72
+ "@intlayer/babel": "8.1.11",
73
+ "@intlayer/chokidar": "8.1.11",
74
+ "@intlayer/config": "8.1.11",
75
+ "@intlayer/core": "8.1.11",
76
+ "@intlayer/dictionaries-entry": "8.1.11",
77
+ "@intlayer/remote-dictionaries-entry": "8.1.11",
78
+ "@intlayer/types": "8.2.0",
79
+ "@intlayer/unmerged-dictionaries-entry": "8.1.11",
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.10"
96
+ "@intlayer/ai": "8.1.11"
96
97
  },
97
98
  "peerDependenciesMeta": {
98
99
  "@intlayer/ai": {