@intlayer/cli 8.0.5 → 8.1.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 +6 -6
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/{transform.cjs → extract.cjs} +13 -13
- package/dist/cjs/extract.cjs.map +1 -0
- package/dist/cjs/index.cjs +3 -2
- package/dist/cjs/init.cjs +242 -35
- package/dist/cjs/init.cjs.map +1 -1
- package/dist/cjs/pull.cjs +1 -1
- package/dist/cjs/push/push.cjs +1 -1
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs +1 -1
- package/dist/esm/cli.mjs +6 -6
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/{transform.mjs → extract.mjs} +13 -13
- package/dist/esm/extract.mjs.map +1 -0
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/init.mjs +242 -36
- package/dist/esm/init.mjs.map +1 -1
- package/dist/esm/pull.mjs +1 -1
- package/dist/esm/push/push.mjs +1 -1
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs +1 -1
- package/dist/types/{transform.d.ts → extract.d.ts} +5 -5
- package/dist/types/extract.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/init.d.ts +4 -1
- package/dist/types/init.d.ts.map +1 -1
- package/package.json +13 -12
- package/dist/cjs/transform.cjs.map +0 -1
- package/dist/esm/transform.mjs.map +0 -1
- package/dist/types/transform.d.ts.map +0 -1
|
@@ -2,11 +2,11 @@ import { transformFiles } from "@intlayer/chokidar";
|
|
|
2
2
|
import { colorizePath, getAppLogger, getConfiguration } from "@intlayer/config";
|
|
3
3
|
import { relative, resolve } from "node:path";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
|
-
import { multiselect } from "@clack/prompts";
|
|
6
5
|
import { readFile } from "node:fs/promises";
|
|
6
|
+
import { multiselect } from "@clack/prompts";
|
|
7
7
|
import fg from "fast-glob";
|
|
8
8
|
|
|
9
|
-
//#region src/
|
|
9
|
+
//#region src/extract.ts
|
|
10
10
|
const getDependencies = async (baseDir) => {
|
|
11
11
|
try {
|
|
12
12
|
const packageJsonPath = resolve(baseDir, "package.json");
|
|
@@ -17,7 +17,7 @@ const getDependencies = async (baseDir) => {
|
|
|
17
17
|
return {};
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const
|
|
20
|
+
const extract = async (options) => {
|
|
21
21
|
const configuration = getConfiguration(options.configOptions);
|
|
22
22
|
const appLogger = getAppLogger(configuration);
|
|
23
23
|
const { baseDir, codeDir } = configuration.content;
|
|
@@ -34,8 +34,8 @@ const transform = async (options) => {
|
|
|
34
34
|
else if (dependencies["solid-intlayer"]) packageName = "solid-intlayer";
|
|
35
35
|
else if (dependencies["angular-intlayer"]) packageName = "angular-intlayer";
|
|
36
36
|
else if (dependencies["express-intlayer"]) packageName = "express-intlayer";
|
|
37
|
-
let
|
|
38
|
-
if (
|
|
37
|
+
let filesToExtract = options.files ?? [];
|
|
38
|
+
if (filesToExtract.length === 0) {
|
|
39
39
|
const globPattern = "**/*.{tsx,jsx,vue,svelte,ts,js}";
|
|
40
40
|
const excludePattern = [
|
|
41
41
|
"**/*.content.{ts,tsx,js,jsx,mjs,cjs}",
|
|
@@ -58,22 +58,22 @@ const transform = async (options) => {
|
|
|
58
58
|
};
|
|
59
59
|
});
|
|
60
60
|
if (choices.length === 0) {
|
|
61
|
-
appLogger("No
|
|
61
|
+
appLogger("No extractable files found in the project.");
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
const selectedFiles = await multiselect({
|
|
65
|
-
message: "Select files to
|
|
65
|
+
message: "Select files to extract:",
|
|
66
66
|
options: choices,
|
|
67
67
|
required: false
|
|
68
68
|
});
|
|
69
69
|
if (typeof selectedFiles === "symbol") process.exit(0);
|
|
70
|
-
|
|
70
|
+
filesToExtract = selectedFiles;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
appLogger("No files selected for
|
|
72
|
+
if (filesToExtract.length === 0) {
|
|
73
|
+
appLogger("No files selected for extraction.");
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
const absoluteFiles =
|
|
76
|
+
const absoluteFiles = filesToExtract.map((file) => resolve(baseDir, file)).filter((file) => {
|
|
77
77
|
if (!existsSync(file)) {
|
|
78
78
|
appLogger(`File not found: ${formatPath(file)}`);
|
|
79
79
|
return false;
|
|
@@ -90,5 +90,5 @@ const transform = async (options) => {
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
//#endregion
|
|
93
|
-
export {
|
|
94
|
-
//# sourceMappingURL=
|
|
93
|
+
export { extract };
|
|
94
|
+
//# sourceMappingURL=extract.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.mjs","names":[],"sources":["../../src/extract.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { relative, resolve } from 'node:path';\nimport { multiselect } from '@clack/prompts';\nimport { type PackageName, transformFiles } from '@intlayer/chokidar';\nimport {\n colorizePath,\n type GetConfigurationOptions,\n getAppLogger,\n getConfiguration,\n} from '@intlayer/config';\nimport fg from 'fast-glob';\n\ntype ExtractOptions = {\n files?: string[];\n outputContentDeclarations?: string;\n configOptions?: GetConfigurationOptions;\n codeOnly?: boolean;\n declarationOnly?: boolean;\n};\n\n// Helper to read package.json dependencies\nconst getDependencies = async (baseDir: string) => {\n try {\n const packageJsonPath = resolve(baseDir, 'package.json');\n if (!existsSync(packageJsonPath)) {\n // Try parent directory if not found in baseDir\n return {};\n }\n const file = await readFile(packageJsonPath, 'utf8');\n const packageJSON = JSON.parse(file);\n\n return packageJSON.dependencies;\n } catch {\n return {};\n }\n};\n\nexport const extract = async (options: ExtractOptions) => {\n const configuration = getConfiguration(options.configOptions);\n const appLogger = getAppLogger(configuration);\n const { baseDir, codeDir } = configuration.content;\n\n const formatPath = (path: string) => {\n const relativePath = relative(baseDir, path);\n return colorizePath(relativePath);\n };\n\n // Detect package\n const dependencies = await getDependencies(baseDir);\n let packageName: PackageName = 'react-intlayer';\n\n if (dependencies['next-intlayer']) {\n packageName = 'next-intlayer';\n } else if (dependencies['vue-intlayer']) {\n packageName = 'vue-intlayer';\n } else if (dependencies['svelte-intlayer']) {\n packageName = 'svelte-intlayer';\n } else if (dependencies['react-intlayer']) {\n packageName = 'react-intlayer';\n } else if (dependencies['preact-intlayer']) {\n packageName = 'preact-intlayer';\n } else if (dependencies['solid-intlayer']) {\n packageName = 'solid-intlayer';\n } else if (dependencies['angular-intlayer']) {\n packageName = 'angular-intlayer';\n } else if (dependencies['express-intlayer']) {\n packageName = 'express-intlayer';\n }\n\n let filesToExtract = options.files ?? [];\n\n if (filesToExtract.length === 0) {\n const globPattern = '**/*.{tsx,jsx,vue,svelte,ts,js}';\n const excludePattern = [\n '**/*.content.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.config.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.test.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.stories.{ts,tsx,js,jsx,mjs,cjs}',\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n ];\n\n // Await all promises simultaneously\n const resultsArray = await Promise.all(\n codeDir.map((dir) =>\n fg(globPattern, {\n cwd: dir,\n ignore: excludePattern,\n absolute: true,\n })\n )\n );\n\n // Flatten the nested arrays and remove duplicates\n const allFiles = resultsArray.flat();\n\n const uniqueFiles = [...new Set(allFiles)].filter((file) =>\n existsSync(file)\n );\n\n // Relative paths for selection\n const choices = uniqueFiles.map((file) => {\n const relPath = relative(baseDir, file);\n return {\n value: file,\n label: relPath,\n };\n });\n\n if (choices.length === 0) {\n appLogger('No extractable files found in the project.');\n return;\n }\n\n const selectedFiles = await multiselect({\n message: 'Select files to extract:',\n options: choices,\n required: false,\n });\n\n if (typeof selectedFiles === 'symbol') {\n // User cancelled\n process.exit(0);\n }\n\n filesToExtract = selectedFiles as string[];\n }\n\n if (filesToExtract.length === 0) {\n appLogger('No files selected for extraction.');\n return;\n }\n\n const absoluteFiles = filesToExtract\n .map((file) => resolve(baseDir, file))\n .filter((file) => {\n if (!existsSync(file)) {\n appLogger(`File not found: ${formatPath(file)}`);\n return false;\n }\n return true;\n });\n\n if (absoluteFiles.length === 0) {\n return;\n }\n\n await transformFiles(absoluteFiles, packageName, {\n configOptions: options.configOptions,\n outputDir: options.outputContentDeclarations,\n codeOnly: options.codeOnly,\n declarationOnly: options.declarationOnly,\n });\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAM,kBAAkB,OAAO,YAAoB;AACjD,KAAI;EACF,MAAM,kBAAkB,QAAQ,SAAS,eAAe;AACxD,MAAI,CAAC,WAAW,gBAAgB,CAE9B,QAAO,EAAE;EAEX,MAAM,OAAO,MAAM,SAAS,iBAAiB,OAAO;AAGpD,SAFoB,KAAK,MAAM,KAAK,CAEjB;SACb;AACN,SAAO,EAAE;;;AAIb,MAAa,UAAU,OAAO,YAA4B;CACxD,MAAM,gBAAgB,iBAAiB,QAAQ,cAAc;CAC7D,MAAM,YAAY,aAAa,cAAc;CAC7C,MAAM,EAAE,SAAS,YAAY,cAAc;CAE3C,MAAM,cAAc,SAAiB;AAEnC,SAAO,aADc,SAAS,SAAS,KAAK,CACX;;CAInC,MAAM,eAAe,MAAM,gBAAgB,QAAQ;CACnD,IAAI,cAA2B;AAE/B,KAAI,aAAa,iBACf,eAAc;UACL,aAAa,gBACtB,eAAc;UACL,aAAa,mBACtB,eAAc;UACL,aAAa,kBACtB,eAAc;UACL,aAAa,mBACtB,eAAc;UACL,aAAa,kBACtB,eAAc;UACL,aAAa,oBACtB,eAAc;UACL,aAAa,oBACtB,eAAc;CAGhB,IAAI,iBAAiB,QAAQ,SAAS,EAAE;AAExC,KAAI,eAAe,WAAW,GAAG;EAC/B,MAAM,cAAc;EACpB,MAAM,iBAAiB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EAcD,MAAM,YAXe,MAAM,QAAQ,IACjC,QAAQ,KAAK,QACX,GAAG,aAAa;GACd,KAAK;GACL,QAAQ;GACR,UAAU;GACX,CAAC,CACH,CACF,EAG6B,MAAM;EAOpC,MAAM,UALc,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC,CAAC,QAAQ,SACjD,WAAW,KAAK,CACjB,CAG2B,KAAK,SAAS;AAExC,UAAO;IACL,OAAO;IACP,OAHc,SAAS,SAAS,KAAK;IAItC;IACD;AAEF,MAAI,QAAQ,WAAW,GAAG;AACxB,aAAU,6CAA6C;AACvD;;EAGF,MAAM,gBAAgB,MAAM,YAAY;GACtC,SAAS;GACT,SAAS;GACT,UAAU;GACX,CAAC;AAEF,MAAI,OAAO,kBAAkB,SAE3B,SAAQ,KAAK,EAAE;AAGjB,mBAAiB;;AAGnB,KAAI,eAAe,WAAW,GAAG;AAC/B,YAAU,oCAAoC;AAC9C;;CAGF,MAAM,gBAAgB,eACnB,KAAK,SAAS,QAAQ,SAAS,KAAK,CAAC,CACrC,QAAQ,SAAS;AAChB,MAAI,CAAC,WAAW,KAAK,EAAE;AACrB,aAAU,mBAAmB,WAAW,KAAK,GAAG;AAChD,UAAO;;AAET,SAAO;GACP;AAEJ,KAAI,cAAc,WAAW,EAC3B;AAGF,OAAM,eAAe,eAAe,aAAa;EAC/C,eAAe,QAAQ;EACvB,WAAW,QAAQ;EACnB,UAAU,QAAQ;EAClB,iBAAiB,QAAQ;EAC1B,CAAC"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { build } from "./build.mjs";
|
|
2
2
|
import { startEditor } from "./editor.mjs";
|
|
3
|
+
import { extract } from "./extract.mjs";
|
|
3
4
|
import { listMissingTranslations, listMissingTranslationsWithConfig } from "./test/listMissingTranslations.mjs";
|
|
4
5
|
import { testMissingTranslations } from "./test/test.mjs";
|
|
5
6
|
import { fill } from "./fill/fill.mjs";
|
|
6
|
-
import { init, initSkills } from "./init.mjs";
|
|
7
|
+
import { getDetectedPlatform, init, initSkills } from "./init.mjs";
|
|
7
8
|
import { listContentDeclaration, listContentDeclarationRows } from "./listContentDeclaration.mjs";
|
|
8
9
|
import { liveSync } from "./liveSync.mjs";
|
|
9
10
|
import { pull } from "./pull.mjs";
|
|
@@ -11,8 +12,7 @@ import { push } from "./push/push.mjs";
|
|
|
11
12
|
import { pushConfig } from "./pushConfig.mjs";
|
|
12
13
|
import { reviewDoc } from "./reviewDoc/reviewDoc.mjs";
|
|
13
14
|
import { searchDoc } from "./searchDoc.mjs";
|
|
14
|
-
import { transform } from "./transform.mjs";
|
|
15
15
|
import { translateDoc } from "./translateDoc/translateDoc.mjs";
|
|
16
16
|
import { dirname, setAPI } from "./cli.mjs";
|
|
17
17
|
|
|
18
|
-
export { build, dirname, fill, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations,
|
|
18
|
+
export { build, dirname, extract, fill, getDetectedPlatform, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations, translateDoc };
|
package/dist/esm/init.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { SKILLS, SKILLS_METADATA, initIntlayer, installSkills } from "@intlayer/
|
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import * as p from "@clack/prompts";
|
|
5
|
+
import { AutoComplete } from "enquirer";
|
|
5
6
|
|
|
6
7
|
//#region src/init.ts
|
|
7
8
|
const findProjectRoot = (startDir) => {
|
|
@@ -15,45 +16,245 @@ const findProjectRoot = (startDir) => {
|
|
|
15
16
|
const init = async (projectRoot) => {
|
|
16
17
|
await initIntlayer(projectRoot ? findProjectRoot(resolve(projectRoot)) : findProjectRoot(process.cwd()));
|
|
17
18
|
};
|
|
19
|
+
const PLATFORM_CHECKS = [
|
|
20
|
+
{
|
|
21
|
+
check: () => process.env.CURSOR === "true" || process.env.TERM_PROGRAM === "cursor",
|
|
22
|
+
platform: "Cursor"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
check: () => process.env.WINDSURF === "true" || process.env.TERM_PROGRAM === "windsurf",
|
|
26
|
+
platform: "Windsurf"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
check: () => process.env.TRAE === "true" || process.env.TERM_PROGRAM === "trae",
|
|
30
|
+
platform: "Trae"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
check: () => process.env.TRAE_CN === "true",
|
|
34
|
+
platform: "TraeCN"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
check: () => process.env.VSCODE === "true" || process.env.TERM_PROGRAM === "vscode",
|
|
38
|
+
platform: "VSCode"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
check: () => process.env.OPENCODE === "true",
|
|
42
|
+
platform: "OpenCode"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
check: () => process.env.CLAUDE === "true",
|
|
46
|
+
platform: "Claude"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
check: () => process.env.GITHUB_ACTIONS === "true" || !!process.env.GITHUB_WORKSPACE,
|
|
50
|
+
platform: "GitHub"
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
const getDetectedPlatform = () => PLATFORM_CHECKS.find(({ check }) => check())?.platform;
|
|
18
54
|
const initSkills = async (projectRoot) => {
|
|
19
55
|
const root = projectRoot ? findProjectRoot(resolve(projectRoot)) : findProjectRoot(process.cwd());
|
|
20
56
|
p.intro("Initializing Intlayer skills");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
const detectedPlatform = getDetectedPlatform();
|
|
58
|
+
const PLATFORM_OPTIONS = [
|
|
59
|
+
{
|
|
60
|
+
value: "Cursor",
|
|
61
|
+
label: "Cursor",
|
|
62
|
+
hint: "(.cursor/skills)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
value: "Windsurf",
|
|
66
|
+
label: "Windsurf",
|
|
67
|
+
hint: "(.windsurf/skills)"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: "Trae",
|
|
71
|
+
label: "Trae",
|
|
72
|
+
hint: "(.trae/skills)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: "TraeCN",
|
|
76
|
+
label: "Trae CN",
|
|
77
|
+
hint: "(.trae/skills)"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
value: "VSCode",
|
|
81
|
+
label: "VS Code",
|
|
82
|
+
hint: "(.github/skills)"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: "OpenCode",
|
|
86
|
+
label: "OpenCode",
|
|
87
|
+
hint: "(.opencode/skills)"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: "Claude",
|
|
91
|
+
label: "Claude Code",
|
|
92
|
+
hint: "(.claude/skills)"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "GitHub",
|
|
96
|
+
label: "GitHub Copilot Workspace",
|
|
97
|
+
hint: "(.github/skills)"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: "Antigravity",
|
|
101
|
+
label: "Antigravity",
|
|
102
|
+
hint: "(.agent/skills)"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
value: "Augment",
|
|
106
|
+
label: "Augment",
|
|
107
|
+
hint: "(.augment/skills)"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "OpenClaw",
|
|
111
|
+
label: "OpenClaw",
|
|
112
|
+
hint: "(skills)"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
value: "Cline",
|
|
116
|
+
label: "Cline",
|
|
117
|
+
hint: "(.cline/skills)"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
value: "CodeBuddy",
|
|
121
|
+
label: "CodeBuddy",
|
|
122
|
+
hint: "(.codebuddy/skills)"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
value: "CommandCode",
|
|
126
|
+
label: "Command Code",
|
|
127
|
+
hint: "(.commandcode/skills)"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: "Continue",
|
|
131
|
+
label: "Continue",
|
|
132
|
+
hint: "(.continue/skills)"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "Crush",
|
|
136
|
+
label: "Crush",
|
|
137
|
+
hint: "(.crush/skills)"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
value: "Droid",
|
|
141
|
+
label: "Droid",
|
|
142
|
+
hint: "(.factory/skills)"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
value: "Goose",
|
|
146
|
+
label: "Goose",
|
|
147
|
+
hint: "(.goose/skills)"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: "IFlow",
|
|
151
|
+
label: "iFlow CLI",
|
|
152
|
+
hint: "(.iflow/skills)"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: "Junie",
|
|
156
|
+
label: "Junie",
|
|
157
|
+
hint: "(.junie/skills)"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
value: "KiloCode",
|
|
161
|
+
label: "Kilo Code",
|
|
162
|
+
hint: "(.kilocode/skills)"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
value: "Kiro",
|
|
166
|
+
label: "Kiro CLI",
|
|
167
|
+
hint: "(.kiro/skills)"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
value: "Kode",
|
|
171
|
+
label: "Kode",
|
|
172
|
+
hint: "(.kode/skills)"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
value: "MCPJam",
|
|
176
|
+
label: "MCPJam",
|
|
177
|
+
hint: "(.mcpjam/skills)"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
value: "MistralVibe",
|
|
181
|
+
label: "Mistral Vibe",
|
|
182
|
+
hint: "(.vibe/skills)"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
value: "Mux",
|
|
186
|
+
label: "Mux",
|
|
187
|
+
hint: "(.mux/skills)"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
value: "OpenHands",
|
|
191
|
+
label: "OpenHands",
|
|
192
|
+
hint: "(.openhands/skills)"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
value: "Pi",
|
|
196
|
+
label: "Pi",
|
|
197
|
+
hint: "(.pi/skills)"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
value: "Qoder",
|
|
201
|
+
label: "Qoder",
|
|
202
|
+
hint: "(.qoder/skills)"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: "Qwen",
|
|
206
|
+
label: "Qwen Code",
|
|
207
|
+
hint: "(.qwen/skills)"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: "RooCode",
|
|
211
|
+
label: "Roo Code",
|
|
212
|
+
hint: "(.roo/skills)"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
value: "Zencoder",
|
|
216
|
+
label: "Zencoder",
|
|
217
|
+
hint: "(.zencoder/skills)"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
value: "Neovate",
|
|
221
|
+
label: "Neovate",
|
|
222
|
+
hint: "(.neovate/skills)"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: "Pochi",
|
|
226
|
+
label: "Pochi",
|
|
227
|
+
hint: "(.pochi/skills)"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
value: "Other",
|
|
231
|
+
label: "Other",
|
|
232
|
+
hint: "(skills)"
|
|
233
|
+
}
|
|
234
|
+
];
|
|
235
|
+
const prompt = new AutoComplete({
|
|
236
|
+
name: "platforms",
|
|
237
|
+
message: "Which platforms are you using?",
|
|
238
|
+
limit: 10,
|
|
239
|
+
initial: detectedPlatform ? PLATFORM_OPTIONS.findIndex((p) => p.value === detectedPlatform) : void 0,
|
|
240
|
+
multiple: true,
|
|
241
|
+
choices: PLATFORM_OPTIONS.map((p) => ({
|
|
242
|
+
name: p.value,
|
|
243
|
+
message: p.label,
|
|
244
|
+
hint: p.hint
|
|
245
|
+
}))
|
|
52
246
|
});
|
|
53
|
-
|
|
247
|
+
let platforms;
|
|
248
|
+
try {
|
|
249
|
+
platforms = await prompt.run();
|
|
250
|
+
} catch (error) {
|
|
54
251
|
p.cancel("Operation cancelled");
|
|
55
252
|
return;
|
|
56
253
|
}
|
|
254
|
+
if (platforms.length === 0) {
|
|
255
|
+
p.log.warn("No platform selected. Nothing to install.");
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
57
258
|
let dependencies = {};
|
|
58
259
|
try {
|
|
59
260
|
const packageJsonPath = join(root, "package.json");
|
|
@@ -66,7 +267,6 @@ const initSkills = async (projectRoot) => {
|
|
|
66
267
|
}
|
|
67
268
|
} catch {}
|
|
68
269
|
const initialValues = [
|
|
69
|
-
"Setup",
|
|
70
270
|
"Usage",
|
|
71
271
|
"Config",
|
|
72
272
|
"Content",
|
|
@@ -74,6 +274,8 @@ const initSkills = async (projectRoot) => {
|
|
|
74
274
|
];
|
|
75
275
|
if (dependencies.react || dependencies.next) initialValues.push("React");
|
|
76
276
|
if (dependencies.next) initialValues.push("NextJS");
|
|
277
|
+
if (dependencies.preact) initialValues.push("Preact");
|
|
278
|
+
if (dependencies["solid-js"]) initialValues.push("Solid");
|
|
77
279
|
if (dependencies.vue || dependencies.nuxt) initialValues.push("Vue");
|
|
78
280
|
if (dependencies.svelte || dependencies["@sveltejs/kit"]) initialValues.push("Svelte");
|
|
79
281
|
if (dependencies.astro) initialValues.push("Astro");
|
|
@@ -97,9 +299,13 @@ const initSkills = async (projectRoot) => {
|
|
|
97
299
|
const s = p.spinner();
|
|
98
300
|
s.start("Installing skills...");
|
|
99
301
|
try {
|
|
100
|
-
const
|
|
302
|
+
const results = [];
|
|
303
|
+
for (const platform of platforms) {
|
|
304
|
+
const result = await installSkills(root, platform, selectedSkills);
|
|
305
|
+
results.push(result);
|
|
306
|
+
}
|
|
101
307
|
s.stop("Skills installed successfully");
|
|
102
|
-
p.note(result, "Success");
|
|
308
|
+
for (const result of results) p.note(result, "Success");
|
|
103
309
|
} catch (error) {
|
|
104
310
|
s.stop("Failed to install skills");
|
|
105
311
|
p.log.error(String(error));
|
|
@@ -108,5 +314,5 @@ const initSkills = async (projectRoot) => {
|
|
|
108
314
|
};
|
|
109
315
|
|
|
110
316
|
//#endregion
|
|
111
|
-
export { init, initSkills };
|
|
317
|
+
export { getDetectedPlatform, init, initSkills };
|
|
112
318
|
//# sourceMappingURL=init.mjs.map
|
package/dist/esm/init.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.mjs","names":[],"sources":["../../src/init.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport * as p from '@clack/prompts';\nimport {\n initIntlayer,\n installSkills,\n SKILLS,\n SKILLS_METADATA,\n} from '@intlayer/chokidar';\n\nconst findProjectRoot = (startDir: string) => {\n let currentDir = startDir;\n\n while (currentDir !== resolve(currentDir, '..')) {\n if (existsSync(join(currentDir, 'package.json'))) {\n return currentDir;\n }\n currentDir = resolve(currentDir, '..');\n }\n\n // If no package.json is found, return the start directory.\n // The initIntlayer function will handle the missing package.json error.\n return startDir;\n};\n\nexport const init = async (projectRoot?: string) => {\n const root = projectRoot\n ? findProjectRoot(resolve(projectRoot))\n : findProjectRoot(process.cwd());\n\n await initIntlayer(root);\n};\n\nexport const initSkills = async (projectRoot?: string) => {\n const root = projectRoot\n ? findProjectRoot(resolve(projectRoot))\n : findProjectRoot(process.cwd());\n\n p.intro('Initializing Intlayer skills');\n\n // Detect platform\n let detectedPlatform: 'Cursor' | 'VSCode' | 'OpenCode' | 'Claude' | 'Other' =\n 'Other';\n\n if (process.env.OPENCODE) {\n detectedPlatform = 'OpenCode';\n } else if (process.env.CLAUDE_CODE) {\n detectedPlatform = 'Claude';\n } else if (existsSync(join(root, 'claude', 'skills'))) {\n detectedPlatform = 'Claude';\n } else if (existsSync(join(root, '.cursorrules'))) {\n detectedPlatform = 'Cursor';\n } else if (process.env.TERM_PROGRAM === 'vscode') {\n detectedPlatform = 'VSCode';\n }\n\n // Confirm or choose platform\n const platform = (await p.select({\n message: 'Which platform are you using?',\n initialValue: detectedPlatform,\n options: [\n { value: 'Cursor', label: 'Cursor' },\n { value: 'VSCode', label: 'VSCode' },\n { value: 'OpenCode', label: 'OpenCode' },\n { value: 'Claude', label: 'Claude Code' },\n { value: 'Other', label: 'Other' },\n ],\n })) as 'Cursor' | 'VSCode' | 'OpenCode' | 'Claude' | 'Other';\n\n if (p.isCancel(platform)) {\n p.cancel('Operation cancelled');\n return;\n }\n\n // Detect framework skills\n let dependencies: Record<string, string> = {};\n try {\n const packageJsonPath = join(root, 'package.json');\n if (existsSync(packageJsonPath)) {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n dependencies = {\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n };\n }\n } catch {\n // Ignore errors reading package.json\n }\n\n const initialValues: (keyof typeof SKILLS_METADATA)[] = [\n 'Setup',\n 'Usage',\n 'Config',\n 'Content',\n 'RemoteContent',\n ];\n\n if (dependencies.react || dependencies.next) {\n initialValues.push('React');\n }\n if (dependencies.next) {\n initialValues.push('NextJS');\n }\n if (dependencies.vue || dependencies.nuxt) {\n initialValues.push('Vue');\n }\n if (dependencies.svelte || dependencies['@sveltejs/kit']) {\n initialValues.push('Svelte');\n }\n if (dependencies.astro) {\n initialValues.push('Astro');\n }\n\n // Show list of available skills and allow selecting multiple\n const selectedSkills = (await p.multiselect({\n message: 'Select the documentation skills to provide to your AI:',\n initialValues,\n options: SKILLS.map((skill) => ({\n value: skill,\n label: skill,\n hint: SKILLS_METADATA[skill],\n })),\n })) as (keyof typeof SKILLS_METADATA)[];\n\n if (p.isCancel(selectedSkills)) {\n p.cancel('Operation cancelled');\n return;\n }\n\n if (selectedSkills.length === 0) {\n p.log.warn('No skills selected. Nothing to install.');\n return;\n }\n\n // Call installSkills\n const s = p.spinner();\n s.start('Installing skills...');\n try {\n const result = await installSkills(root, platform, selectedSkills);\n s.stop('Skills installed successfully');\n\n // 6. Show success message\n p.note(result, 'Success');\n } catch (error) {\n s.stop('Failed to install skills');\n p.log.error(String(error));\n }\n\n p.outro('Intlayer skills initialization complete');\n};\n"],"mappings":";;;;;;AAUA,MAAM,mBAAmB,aAAqB;CAC5C,IAAI,aAAa;AAEjB,QAAO,eAAe,QAAQ,YAAY,KAAK,EAAE;AAC/C,MAAI,WAAW,KAAK,YAAY,eAAe,CAAC,CAC9C,QAAO;AAET,eAAa,QAAQ,YAAY,KAAK;;AAKxC,QAAO;;AAGT,MAAa,OAAO,OAAO,gBAAyB;AAKlD,OAAM,aAJO,cACT,gBAAgB,QAAQ,YAAY,CAAC,GACrC,gBAAgB,QAAQ,KAAK,CAAC,CAEV;;AAG1B,MAAa,aAAa,OAAO,gBAAyB;CACxD,MAAM,OAAO,cACT,gBAAgB,QAAQ,YAAY,CAAC,GACrC,gBAAgB,QAAQ,KAAK,CAAC;AAElC,GAAE,MAAM,+BAA+B;CAGvC,IAAI,mBACF;AAEF,KAAI,QAAQ,IAAI,SACd,oBAAmB;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EAAE;AAC9B,IAAE,OAAO,sBAAsB;AAC/B;;AAGF,KAAI,eAAe,WAAW,GAAG;AAC/B,IAAE,IAAI,KAAK,0CAA0C;AACrD;;CAIF,MAAM,IAAI,EAAE,SAAS;AACrB,GAAE,MAAM,uBAAuB;AAC/B,KAAI;EACF,MAAM,SAAS,MAAM,cAAc,MAAM,UAAU,eAAe;AAClE,IAAE,KAAK,gCAAgC;AAGvC,IAAE,KAAK,QAAQ,UAAU;UAClB,OAAO;AACd,IAAE,KAAK,2BAA2B;AAClC,IAAE,IAAI,MAAM,OAAO,MAAM,CAAC;;AAG5B,GAAE,MAAM,0CAA0C"}
|
|
1
|
+
{"version":3,"file":"init.mjs","names":[],"sources":["../../src/init.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport * as p from '@clack/prompts';\nimport {\n initIntlayer,\n installSkills,\n type Platform,\n SKILLS,\n SKILLS_METADATA,\n} from '@intlayer/chokidar';\n// @ts-ignore\nimport { AutoComplete } from 'enquirer';\n\nconst findProjectRoot = (startDir: string) => {\n let currentDir = startDir;\n\n while (currentDir !== resolve(currentDir, '..')) {\n if (existsSync(join(currentDir, 'package.json'))) {\n return currentDir;\n }\n currentDir = resolve(currentDir, '..');\n }\n\n // If no package.json is found, return the start directory.\n // The initIntlayer function will handle the missing package.json error.\n return startDir;\n};\n\nexport const init = async (projectRoot?: string) => {\n const root = projectRoot\n ? findProjectRoot(resolve(projectRoot))\n : findProjectRoot(process.cwd());\n\n await initIntlayer(root);\n};\n\nconst PLATFORM_CHECKS: Array<{ check: () => boolean; platform: Platform }> = [\n {\n check: () =>\n process.env.CURSOR === 'true' || process.env.TERM_PROGRAM === 'cursor',\n platform: 'Cursor',\n },\n {\n check: () =>\n process.env.WINDSURF === 'true' ||\n process.env.TERM_PROGRAM === 'windsurf',\n platform: 'Windsurf',\n },\n {\n check: () =>\n process.env.TRAE === 'true' || process.env.TERM_PROGRAM === 'trae',\n platform: 'Trae',\n },\n { check: () => process.env.TRAE_CN === 'true', platform: 'TraeCN' },\n {\n check: () =>\n process.env.VSCODE === 'true' || process.env.TERM_PROGRAM === 'vscode',\n platform: 'VSCode',\n },\n { check: () => process.env.OPENCODE === 'true', platform: 'OpenCode' },\n { check: () => process.env.CLAUDE === 'true', platform: 'Claude' },\n {\n check: () =>\n process.env.GITHUB_ACTIONS === 'true' || !!process.env.GITHUB_WORKSPACE,\n platform: 'GitHub',\n },\n];\n\nexport const getDetectedPlatform = (): Platform | undefined =>\n PLATFORM_CHECKS.find(({ check }) => check())?.platform;\n\nexport const initSkills = async (projectRoot?: string) => {\n const root = projectRoot\n ? findProjectRoot(resolve(projectRoot))\n : findProjectRoot(process.cwd());\n\n p.intro('Initializing Intlayer skills');\n\n // Detect if running in a specific platform\n const detectedPlatform = getDetectedPlatform();\n\n const PLATFORM_OPTIONS = [\n { value: 'Cursor', label: 'Cursor', hint: '(.cursor/skills)' },\n { value: 'Windsurf', label: 'Windsurf', hint: '(.windsurf/skills)' },\n { value: 'Trae', label: 'Trae', hint: '(.trae/skills)' },\n { value: 'TraeCN', label: 'Trae CN', hint: '(.trae/skills)' },\n { value: 'VSCode', label: 'VS Code', hint: '(.github/skills)' },\n { value: 'OpenCode', label: 'OpenCode', hint: '(.opencode/skills)' },\n { value: 'Claude', label: 'Claude Code', hint: '(.claude/skills)' },\n {\n value: 'GitHub',\n label: 'GitHub Copilot Workspace',\n hint: '(.github/skills)',\n },\n { value: 'Antigravity', label: 'Antigravity', hint: '(.agent/skills)' },\n { value: 'Augment', label: 'Augment', hint: '(.augment/skills)' },\n { value: 'OpenClaw', label: 'OpenClaw', hint: '(skills)' },\n { value: 'Cline', label: 'Cline', hint: '(.cline/skills)' },\n { value: 'CodeBuddy', label: 'CodeBuddy', hint: '(.codebuddy/skills)' },\n {\n value: 'CommandCode',\n label: 'Command Code',\n hint: '(.commandcode/skills)',\n },\n { value: 'Continue', label: 'Continue', hint: '(.continue/skills)' },\n { value: 'Crush', label: 'Crush', hint: '(.crush/skills)' },\n { value: 'Droid', label: 'Droid', hint: '(.factory/skills)' },\n { value: 'Goose', label: 'Goose', hint: '(.goose/skills)' },\n { value: 'IFlow', label: 'iFlow CLI', hint: '(.iflow/skills)' },\n { value: 'Junie', label: 'Junie', hint: '(.junie/skills)' },\n { value: 'KiloCode', label: 'Kilo Code', hint: '(.kilocode/skills)' },\n { value: 'Kiro', label: 'Kiro CLI', hint: '(.kiro/skills)' },\n { value: 'Kode', label: 'Kode', hint: '(.kode/skills)' },\n { value: 'MCPJam', label: 'MCPJam', hint: '(.mcpjam/skills)' },\n { value: 'MistralVibe', label: 'Mistral Vibe', hint: '(.vibe/skills)' },\n { value: 'Mux', label: 'Mux', hint: '(.mux/skills)' },\n { value: 'OpenHands', label: 'OpenHands', hint: '(.openhands/skills)' },\n { value: 'Pi', label: 'Pi', hint: '(.pi/skills)' },\n { value: 'Qoder', label: 'Qoder', hint: '(.qoder/skills)' },\n { value: 'Qwen', label: 'Qwen Code', hint: '(.qwen/skills)' },\n { value: 'RooCode', label: 'Roo Code', hint: '(.roo/skills)' },\n { value: 'Zencoder', label: 'Zencoder', hint: '(.zencoder/skills)' },\n { value: 'Neovate', label: 'Neovate', hint: '(.neovate/skills)' },\n { value: 'Pochi', label: 'Pochi', hint: '(.pochi/skills)' },\n { value: 'Other', label: 'Other', hint: '(skills)' },\n ] as { value: Platform; label: string; hint: string }[];\n\n // Confirm or choose platforms\n const prompt = new AutoComplete({\n name: 'platforms',\n message: 'Which platforms are you using?',\n limit: 10,\n initial: detectedPlatform\n ? PLATFORM_OPTIONS.findIndex((p) => p.value === detectedPlatform)\n : undefined,\n multiple: true,\n choices: PLATFORM_OPTIONS.map((p) => ({\n name: p.value,\n message: p.label,\n hint: p.hint,\n })),\n });\n\n let platforms: Platform[];\n try {\n platforms = (await prompt.run()) as Platform[];\n } catch (error) {\n p.cancel('Operation cancelled');\n return;\n }\n\n if (platforms.length === 0) {\n p.log.warn('No platform selected. Nothing to install.');\n return;\n }\n\n // Detect framework skills\n let dependencies: Record<string, string> = {};\n try {\n const packageJsonPath = join(root, 'package.json');\n if (existsSync(packageJsonPath)) {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n dependencies = {\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n };\n }\n } catch {\n // Ignore errors reading package.json\n }\n\n const initialValues: (keyof typeof SKILLS_METADATA)[] = [\n 'Usage',\n 'Config',\n 'Content',\n 'RemoteContent',\n ];\n\n if (dependencies.react || dependencies.next) {\n initialValues.push('React');\n }\n if (dependencies.next) {\n initialValues.push('NextJS');\n }\n if (dependencies.preact) {\n initialValues.push('Preact');\n }\n if (dependencies['solid-js']) {\n initialValues.push('Solid');\n }\n if (dependencies.vue || dependencies.nuxt) {\n initialValues.push('Vue');\n }\n if (dependencies.svelte || dependencies['@sveltejs/kit']) {\n initialValues.push('Svelte');\n }\n if (dependencies.astro) {\n initialValues.push('Astro');\n }\n\n // Show list of available skills and allow selecting multiple\n const selectedSkills = (await p.multiselect({\n message: 'Select the documentation skills to provide to your AI:',\n initialValues,\n options: SKILLS.map((skill) => ({\n value: skill,\n label: skill,\n hint: SKILLS_METADATA[skill],\n })),\n })) as (keyof typeof SKILLS_METADATA)[];\n\n if (p.isCancel(selectedSkills)) {\n p.cancel('Operation cancelled');\n return;\n }\n\n if (selectedSkills.length === 0) {\n p.log.warn('No skills selected. Nothing to install.');\n return;\n }\n\n // Call installSkills for each platform\n const s = p.spinner();\n s.start('Installing skills...');\n try {\n const results: string[] = [];\n for (const platform of platforms) {\n const result = await installSkills(root, platform, selectedSkills);\n results.push(result);\n }\n s.stop('Skills installed successfully');\n\n // Show success messages\n for (const result of results) {\n p.note(result, 'Success');\n }\n } catch (error) {\n s.stop('Failed to install skills');\n p.log.error(String(error));\n }\n\n p.outro('Intlayer skills initialization complete');\n};\n"],"mappings":";;;;;;;AAaA,MAAM,mBAAmB,aAAqB;CAC5C,IAAI,aAAa;AAEjB,QAAO,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AI,aAAa,YACf,eAAc,KAAK,QAAQ;AAE7B,KAAI,aAAa,OAAO,aAAa,KACnC,eAAc,KAAK,MAAM;AAE3B,KAAI,aAAa,UAAU,aAAa,iBACtC,eAAc,KAAK,SAAS;AAE9B,KAAI,aAAa,MACf,eAAc,KAAK,QAAQ;CAI7B,MAAM,iBAAkB,MAAM,EAAE,YAAY;EAC1C,SAAS;EACT;EACA,SAAS,OAAO,KAAK,WAAW;GAC9B,OAAO;GACP,OAAO;GACP,MAAM,gBAAgB;GACvB,EAAE;EACJ,CAAC;AAEF,KAAI,EAAE,SAAS,eAAe,EAAE;AAC9B,IAAE,OAAO,sBAAsB;AAC/B;;AAGF,KAAI,eAAe,WAAW,GAAG;AAC/B,IAAE,IAAI,KAAK,0CAA0C;AACrD;;CAIF,MAAM,IAAI,EAAE,SAAS;AACrB,GAAE,MAAM,uBAAuB;AAC/B,KAAI;EACF,MAAM,UAAoB,EAAE;AAC5B,OAAK,MAAM,YAAY,WAAW;GAChC,MAAM,SAAS,MAAM,cAAc,MAAM,UAAU,eAAe;AAClE,WAAQ,KAAK,OAAO;;AAEtB,IAAE,KAAK,gCAAgC;AAGvC,OAAK,MAAM,UAAU,QACnB,GAAE,KAAK,QAAQ,UAAU;UAEpB,OAAO;AACd,IAAE,KAAK,2BAA2B;AAClC,IAAE,IAAI,MAAM,OAAO,MAAM,CAAC;;AAG5B,GAAE,MAAM,0CAA0C"}
|
package/dist/esm/pull.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { getIntlayerAPIProxy } from "@intlayer/api";
|
|
|
4
4
|
import { parallelize, writeContentDeclaration } from "@intlayer/chokidar";
|
|
5
5
|
import { ANSIColors, getAppLogger, getConfiguration, getProjectRequire } from "@intlayer/config";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
import { getUnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
8
7
|
import { existsSync } from "node:fs";
|
|
8
|
+
import { getUnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
9
9
|
|
|
10
10
|
//#region src/pull.ts
|
|
11
11
|
/**
|
package/dist/esm/push/push.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { getIntlayerAPIProxy } from "@intlayer/api";
|
|
|
4
4
|
import { formatPath, listGitFiles, parallelize, prepareIntlayer, writeContentDeclaration } from "@intlayer/chokidar";
|
|
5
5
|
import { ANSIColors, colorize, colorizeKey, getAppLogger, getConfiguration } from "@intlayer/config";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
import { getUnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
8
7
|
import * as fsPromises from "node:fs/promises";
|
|
8
|
+
import { getUnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
9
9
|
|
|
10
10
|
//#region src/push/push.ts
|
|
11
11
|
const statusIconsAndColors = {
|
|
@@ -7,9 +7,9 @@ import { fixChunkStartEndChars } from "../utils/fixChunkStartEndChars.mjs";
|
|
|
7
7
|
import { formatLocale, formatPath } from "@intlayer/chokidar";
|
|
8
8
|
import { ANSIColors, colon, colorize, colorizeNumber, getAppLogger, getConfiguration, retryManager } from "@intlayer/config";
|
|
9
9
|
import { dirname } from "node:path";
|
|
10
|
-
import { getLocaleName } from "@intlayer/core";
|
|
11
10
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
12
11
|
import { readFile } from "node:fs/promises";
|
|
12
|
+
import { getLocaleName } from "@intlayer/core";
|
|
13
13
|
import { Locales } from "@intlayer/types";
|
|
14
14
|
|
|
15
15
|
//#region src/reviewDoc/reviewDocBlockAware.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { GetConfigurationOptions } from "@intlayer/config";
|
|
2
2
|
|
|
3
|
-
//#region src/
|
|
4
|
-
type
|
|
3
|
+
//#region src/extract.d.ts
|
|
4
|
+
type ExtractOptions = {
|
|
5
5
|
files?: string[];
|
|
6
6
|
outputContentDeclarations?: string;
|
|
7
7
|
configOptions?: GetConfigurationOptions;
|
|
8
8
|
codeOnly?: boolean;
|
|
9
9
|
declarationOnly?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
11
|
+
declare const extract: (options: ExtractOptions) => Promise<void>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
14
|
-
//# sourceMappingURL=
|
|
13
|
+
export { extract };
|
|
14
|
+
//# sourceMappingURL=extract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { build } from "./build.js";
|
|
2
2
|
import { ConfigurationOptions, dirname, setAPI } from "./cli.js";
|
|
3
3
|
import { startEditor } from "./editor.js";
|
|
4
|
+
import { extract } from "./extract.js";
|
|
4
5
|
import { FillOptions, fill } from "./fill/fill.js";
|
|
5
|
-
import { init, initSkills } from "./init.js";
|
|
6
|
+
import { getDetectedPlatform, init, initSkills } from "./init.js";
|
|
6
7
|
import { listContentDeclaration, listContentDeclarationRows } from "./listContentDeclaration.js";
|
|
7
8
|
import { liveSync } from "./liveSync.js";
|
|
8
9
|
import { pull } from "./pull.js";
|
|
@@ -13,7 +14,6 @@ import { searchDoc } from "./searchDoc.js";
|
|
|
13
14
|
import { listMissingTranslations, listMissingTranslationsWithConfig } from "./test/listMissingTranslations.js";
|
|
14
15
|
import { testMissingTranslations } from "./test/test.js";
|
|
15
16
|
import "./test/index.js";
|
|
16
|
-
import { transform } from "./transform.js";
|
|
17
17
|
import { translateDoc } from "./translateDoc/translateDoc.js";
|
|
18
18
|
export * from "@intlayer/chokidar";
|
|
19
|
-
export { ConfigurationOptions, FillOptions, build, dirname, fill, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations,
|
|
19
|
+
export { ConfigurationOptions, FillOptions, build, dirname, extract, fill, getDetectedPlatform, init, initSkills, listContentDeclaration, listContentDeclarationRows, listMissingTranslations, listMissingTranslationsWithConfig, liveSync, pull, push, pushConfig, reviewDoc, searchDoc, setAPI, startEditor, testMissingTranslations, translateDoc };
|
package/dist/types/init.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { Platform } from "@intlayer/chokidar";
|
|
2
|
+
|
|
1
3
|
//#region src/init.d.ts
|
|
2
4
|
declare const init: (projectRoot?: string) => Promise<void>;
|
|
5
|
+
declare const getDetectedPlatform: () => Platform | undefined;
|
|
3
6
|
declare const initSkills: (projectRoot?: string) => Promise<void>;
|
|
4
7
|
//#endregion
|
|
5
|
-
export { init, initSkills };
|
|
8
|
+
export { getDetectedPlatform, init, initSkills };
|
|
6
9
|
//# sourceMappingURL=init.d.ts.map
|
package/dist/types/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","names":[],"sources":["../../src/init.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","names":[],"sources":["../../src/init.ts"],"mappings":";;;cA4Ba,IAAA,GAAc,WAAA,cAAoB,OAAA;AAAA,cAwClC,mBAAA,QAA0B,QAAA;AAAA,cAG1B,UAAA,GAAoB,WAAA,cAAoB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.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": [
|
|
@@ -68,21 +68,22 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@clack/prompts": "0.11.0",
|
|
71
|
-
"@intlayer/ai": "8.
|
|
72
|
-
"@intlayer/api": "8.
|
|
73
|
-
"@intlayer/chokidar": "8.
|
|
74
|
-
"@intlayer/config": "8.
|
|
75
|
-
"@intlayer/core": "8.
|
|
76
|
-
"@intlayer/dictionaries-entry": "8.
|
|
77
|
-
"@intlayer/remote-dictionaries-entry": "8.
|
|
78
|
-
"@intlayer/types": "8.
|
|
79
|
-
"@intlayer/unmerged-dictionaries-entry": "8.
|
|
71
|
+
"@intlayer/ai": "8.1.1",
|
|
72
|
+
"@intlayer/api": "8.1.1",
|
|
73
|
+
"@intlayer/chokidar": "8.1.1",
|
|
74
|
+
"@intlayer/config": "8.1.1",
|
|
75
|
+
"@intlayer/core": "8.1.1",
|
|
76
|
+
"@intlayer/dictionaries-entry": "8.1.1",
|
|
77
|
+
"@intlayer/remote-dictionaries-entry": "8.1.1",
|
|
78
|
+
"@intlayer/types": "8.1.1",
|
|
79
|
+
"@intlayer/unmerged-dictionaries-entry": "8.1.1",
|
|
80
80
|
"commander": "14.0.2",
|
|
81
|
+
"enquirer": "^2.4.1",
|
|
81
82
|
"eventsource": "4.1.0",
|
|
82
83
|
"fast-glob": "3.3.3"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
85
|
-
"@types/node": "25.2.
|
|
86
|
+
"@types/node": "25.2.3",
|
|
86
87
|
"@utils/ts-config": "1.0.4",
|
|
87
88
|
"@utils/ts-config-types": "1.0.4",
|
|
88
89
|
"@utils/tsdown-config": "1.0.4",
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"vitest": "4.0.18"
|
|
93
94
|
},
|
|
94
95
|
"peerDependencies": {
|
|
95
|
-
"@intlayer/ai": "8.
|
|
96
|
+
"@intlayer/ai": "8.1.1"
|
|
96
97
|
},
|
|
97
98
|
"peerDependenciesMeta": {
|
|
98
99
|
"@intlayer/ai": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform.cjs","names":[],"sources":["../../src/transform.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { relative, resolve } from 'node:path';\nimport { multiselect } from '@clack/prompts';\nimport { type PackageName, transformFiles } from '@intlayer/chokidar';\nimport {\n colorizePath,\n type GetConfigurationOptions,\n getAppLogger,\n getConfiguration,\n} from '@intlayer/config';\nimport fg from 'fast-glob';\n\ntype TransformOptions = {\n files?: string[];\n outputContentDeclarations?: string;\n configOptions?: GetConfigurationOptions;\n codeOnly?: boolean;\n declarationOnly?: boolean;\n};\n\n// Helper to read package.json dependencies\nconst getDependencies = async (baseDir: string) => {\n try {\n const packageJsonPath = resolve(baseDir, 'package.json');\n if (!existsSync(packageJsonPath)) {\n // Try parent directory if not found in baseDir\n return {};\n }\n const file = await readFile(packageJsonPath, 'utf8');\n const packageJSON = JSON.parse(file);\n\n return packageJSON.dependencies;\n } catch {\n return {};\n }\n};\n\nexport const transform = async (options: TransformOptions) => {\n const configuration = getConfiguration(options.configOptions);\n const appLogger = getAppLogger(configuration);\n const { baseDir, codeDir } = configuration.content;\n\n const formatPath = (path: string) => {\n const relativePath = relative(baseDir, path);\n return colorizePath(relativePath);\n };\n\n // Detect package\n const dependencies = await getDependencies(baseDir);\n let packageName: PackageName = 'react-intlayer';\n\n if (dependencies['next-intlayer']) {\n packageName = 'next-intlayer';\n } else if (dependencies['vue-intlayer']) {\n packageName = 'vue-intlayer';\n } else if (dependencies['svelte-intlayer']) {\n packageName = 'svelte-intlayer';\n } else if (dependencies['react-intlayer']) {\n packageName = 'react-intlayer';\n } else if (dependencies['preact-intlayer']) {\n packageName = 'preact-intlayer';\n } else if (dependencies['solid-intlayer']) {\n packageName = 'solid-intlayer';\n } else if (dependencies['angular-intlayer']) {\n packageName = 'angular-intlayer';\n } else if (dependencies['express-intlayer']) {\n packageName = 'express-intlayer';\n }\n\n let filesToTransform = options.files ?? [];\n\n if (filesToTransform.length === 0) {\n const globPattern = '**/*.{tsx,jsx,vue,svelte,ts,js}';\n const excludePattern = [\n '**/*.content.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.config.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.test.{ts,tsx,js,jsx,mjs,cjs}',\n '**/*.stories.{ts,tsx,js,jsx,mjs,cjs}',\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n ];\n\n // Await all promises simultaneously\n const resultsArray = await Promise.all(\n codeDir.map((dir) =>\n fg(globPattern, {\n cwd: dir,\n ignore: excludePattern,\n absolute: true,\n })\n )\n );\n\n // Flatten the nested arrays and remove duplicates\n const allFiles = resultsArray.flat();\n\n const uniqueFiles = [...new Set(allFiles)].filter((file) =>\n existsSync(file)\n );\n\n // Relative paths for selection\n const choices = uniqueFiles.map((file) => {\n const relPath = relative(baseDir, file);\n return {\n value: file,\n label: relPath,\n };\n });\n\n if (choices.length === 0) {\n appLogger('No transformable files found in the project.');\n return;\n }\n\n const selectedFiles = await multiselect({\n message: 'Select files to transform:',\n options: choices,\n required: false,\n });\n\n if (typeof selectedFiles === 'symbol') {\n // User cancelled\n process.exit(0);\n }\n\n filesToTransform = selectedFiles as string[];\n }\n\n if (filesToTransform.length === 0) {\n appLogger('No files selected for transformation.');\n return;\n }\n\n const absoluteFiles = filesToTransform\n .map((file) => resolve(baseDir, file))\n .filter((file) => {\n if (!existsSync(file)) {\n appLogger(`File not found: ${formatPath(file)}`);\n return false;\n }\n return true;\n });\n\n if (absoluteFiles.length === 0) {\n return;\n }\n\n await transformFiles(absoluteFiles, packageName, {\n configOptions: options.configOptions,\n outputDir: options.outputContentDeclarations,\n codeOnly: options.codeOnly,\n declarationOnly: options.declarationOnly,\n });\n};\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,kBAAkB,OAAO,YAAoB;AACjD,KAAI;EACF,MAAM,yCAA0B,SAAS,eAAe;AACxD,MAAI,yBAAY,gBAAgB,CAE9B,QA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